blob: e6d47d5ec3c5ff35ab34e03641924c968c8e87aa [file] [log] [blame]
(function (root, factory) { if(typeof define === "function" && define.amd) { define( factory); } else if(typeof module === "object" && module.exports) { module.exports = factory(); } else { root.bodymovin = factory(); } }(window, function() {function roundValues(t){bm_rnd=t?Math.round:function(t){return t}}function roundTo2Decimals(t){return Math.round(1e4*t)/1e4}function roundTo3Decimals(t){return Math.round(100*t)/100}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin=t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility=t.style.webkitBackfaceVisibility="visible",t.style.transformStyle=t.style.webkitTransformStyle=t.style.mozTransformStyle="preserve-3d"}function styleUnselectableDiv(t){t.style.userSelect="none",t.style.MozUserSelect="none",t.style.webkitUserSelect="none",t.style.oUserSelect="none"}function BMEnterFrameEvent(t,e,i,s){this.type=t,this.currentTime=e,this.totalTime=i,this.direction=0>s?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=0>e?-1:1}function BMCompleteLoopEvent(t,e,i,s){this.type=t,this.currentLoop=e,this.totalLoops=i,this.direction=0>s?-1:1}function BMSegmentStartEvent(t,e,i){this.type=t,this.firstFrame=e,this.totalFrames=i}function BMDestroyEvent(t,e){this.type=t,this.target=e}function _addEventListener(t,e){this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e)}function _removeEventListener(t,e){if(e){if(this._cbs[t]){for(var i=0,s=this._cbs[t].length;s>i;)this._cbs[t][i]===e&&(this._cbs[t].splice(i,1),i-=1,s-=1),i+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}function _triggerEvent(t,e){if(this._cbs[t])for(var i=this._cbs[t].length,s=0;i>s;s++)this._cbs[t][s](e)}function randomString(t,e){void 0===e&&(e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");var i,s="";for(i=t;i>0;--i)s+=e[Math.round(Math.random()*(e.length-1))];return s}function HSVtoRGB(t,e,i){var s,r,a,n,o,h,p,l;switch(1===arguments.length&&(e=t.s,i=t.v,t=t.h),n=Math.floor(6*t),o=6*t-n,h=i*(1-e),p=i*(1-o*e),l=i*(1-(1-o)*e),n%6){case 0:s=i,r=l,a=h;break;case 1:s=p,r=i,a=h;break;case 2:s=h,r=i,a=l;break;case 3:s=h,r=p,a=i;break;case 4:s=l,r=h,a=i;break;case 5:s=i,r=h,a=p}return[s,r,a]}function RGBtoHSV(t,e,i){1===arguments.length&&(e=t.g,i=t.b,t=t.r);var s,r=Math.max(t,e,i),a=Math.min(t,e,i),n=r-a,o=0===r?0:n/r,h=r/255;switch(r){case a:s=0;break;case t:s=e-i+n*(i>e?6:0),s/=6*n;break;case e:s=i-t+2*n,s/=6*n;break;case i:s=t-e+4*n,s/=6*n}return[s,o,h]}function addSaturationToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[1]+=e,i[1]>1?i[1]=1:i[1]<=0&&(i[1]=0),HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[2]+=e,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[0]+=e/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),HSVtoRGB(i[0],i[1],i[2])}function componentToHex(t){var e=t.toString(16);return 1==e.length?"0"+e:e}function fillToRgba(t,e){if(!cachedColors[t]){var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);cachedColors[t]=parseInt(i[1],16)+","+parseInt(i[2],16)+","+parseInt(i[3],16)}return"rgba("+cachedColors[t]+","+e+")"}function RenderedFrame(t,e){this.tr=t,this.o=e}function LetterProps(t,e,i,s,r,a){this.o=t,this.sw=e,this.sc=i,this.fc=s,this.m=r,this.props=a}function iterateDynamicProperties(t){var e,i=this.dynamicProperties;for(e=0;i>e;e+=1)this.dynamicProperties[e].getValue(t)}function reversePath(t,e){var i,s,r=[],a=[],n=[],o={},h=0;e&&(r[0]=t.o[0],a[0]=t.i[0],n[0]=t.v[0],h=1),s=t.i.length;var p=s-1;for(i=h;s>i;i+=1)r.push(t.o[p]),a.push(t.i[p]),n.push(t.v[p]),p-=1;return o.i=r,o.o=a,o.v=n,o}function Matrix(){}function matrixManagerFunction(){var t=new Matrix,e=function(e,i,s,r,a){return t.reset().translate(r,a).rotate(e).scale(i,s).toCSS()},i=function(t){return e(t.tr.r[2],t.tr.s[0],t.tr.s[1],t.tr.p[0],t.tr.p[1])};return{getMatrix:i}}function createElement(t,e,i){if(!e){var s=Object.create(t.prototype,i),r={};return s&&"[object Function]"===r.toString.call(s.init)&&s.init(),s}e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.prototype._parent=t.prototype}function extendPrototype(t,e){for(var i in t.prototype)t.prototype.hasOwnProperty(i)&&(e.prototype[i]=t.prototype[i])}function bezFunction(){function t(t,e,i,s,r,a){var n=t*s+e*r+i*a-r*s-a*t-i*e;return n>-1e-4&&1e-4>n}function e(e,i,s,r,a,n,o,h,p){return t(e,i,r,a,o,h)&&t(e,s,r,n,o,p)}function i(t){this.segmentLength=0,this.points=new Array(t)}function s(t,e){this.partialLength=t,this.point=e}function r(t,e){var i=e.segments,s=i.length,r=bm_floor((s-1)*t),a=t*e.addedLength,n=0;if(a==i[r].l)return i[r].p;for(var o=i[r].l>a?-1:1,h=!0;h;)i[r].l<=a&&i[r+1].l>a?(n=(a-i[r].l)/(i[r+1].l-i[r].l),h=!1):r+=o,(0>r||r>=s-1)&&(h=!1);return i[r].p+(i[r+1].p-i[r].p)*n}function a(){this.pt1=new Array(2),this.pt2=new Array(2),this.pt3=new Array(2),this.pt4=new Array(2)}function n(t,e,i,s,n,o,h){var p=new a;n=0>n?0:n>1?1:n;var l=r(n,h);o=o>1?1:o;var m,d=r(o,h),f=t.length,c=1-l,u=1-d;for(m=0;f>m;m+=1)p.pt1[m]=Math.round(1e3*(c*c*c*t[m]+(l*c*c+c*l*c+c*c*l)*i[m]+(l*l*c+c*l*l+l*c*l)*s[m]+l*l*l*e[m]))/1e3,p.pt3[m]=Math.round(1e3*(c*c*u*t[m]+(l*c*u+c*l*u+c*c*d)*i[m]+(l*l*u+c*l*d+l*c*d)*s[m]+l*l*d*e[m]))/1e3,p.pt4[m]=Math.round(1e3*(c*u*u*t[m]+(l*u*u+c*d*u+c*u*d)*i[m]+(l*d*u+c*d*d+l*u*d)*s[m]+l*d*d*e[m]))/1e3,p.pt2[m]=Math.round(1e3*(u*u*u*t[m]+(d*u*u+u*d*u+u*u*d)*i[m]+(d*d*u+u*d*d+d*u*d)*s[m]+d*d*d*e[m]))/1e3;return p}var o=(Math,function(){function t(t,e){this.l=t,this.p=e}var e={};return function(i,s,r,a){var n=(i.join("_")+"_"+s.join("_")+"_"+r.join("_")+"_"+a.join("_")).replace(/\./g,"p");if(e[n])return e[n];var o,h,p,l,m,d,f=defaultCurveSegments,c=0,u=[],y=[],v={addedLength:0,segments:[]};for(p=r.length,o=0;f>o;o+=1){for(m=o/(f-1),d=0,h=0;p>h;h+=1)l=bm_pow(1-m,3)*i[h]+3*bm_pow(1-m,2)*m*r[h]+3*(1-m)*bm_pow(m,2)*a[h]+bm_pow(m,3)*s[h],u[h]=l,null!==y[h]&&(d+=bm_pow(u[h]-y[h],2)),y[h]=u[h];d&&(d=bm_sqrt(d),c+=d),v.segments.push(new t(c,m))}return v.addedLength=c,e[n]=v,v}}()),h=function(){var e={};return function(r){var a=r.s,n=r.e,o=r.to,h=r.ti,p=(a.join("_")+"_"+n.join("_")+"_"+o.join("_")+"_"+h.join("_")).replace(/\./g,"p");if(e[p])return void(r.bezierData=e[p]);var l,m,d,f,c,u,y,v=defaultCurveSegments,g=0,b=null;2===a.length&&(a[0]!=n[0]||a[1]!=n[1])&&t(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&t(a[0],a[1],n[0],n[1],n[0]+h[0],n[1]+h[1])&&(v=2);var P=new i(v);for(d=o.length,l=0;v>l;l+=1){for(y=new Array(d),c=l/(v-1),u=0,m=0;d>m;m+=1)f=bm_pow(1-c,3)*a[m]+3*bm_pow(1-c,2)*c*(a[m]+o[m])+3*(1-c)*bm_pow(c,2)*(n[m]+h[m])+bm_pow(c,3)*n[m],y[m]=f,null!==b&&(u+=bm_pow(y[m]-b[m],2));u=bm_sqrt(u),g+=u,P.points[l]=new s(u,y),b=y}P.segmentLength=g,r.bezierData=P,e[p]=P}}();return{getBezierLength:o,getNewSegment:n,buildBezierData:h,pointOnLine2D:t,pointOnLine3D:e}}function dataFunctionManager(){function t(r,a,o){var h,p,l,m,d,f,c,u,y=r.length;for(m=0;y>m;m+=1)if(h=r[m],"ks"in h&&!h.completed){if(h.completed=!0,h.tt&&(r[m-1].td=h.tt),p=[],l=-1,h.hasMask){var v=h.masksProperties;for(f=v.length,d=0;f>d;d+=1)if(v[d].pt.k.i)s(v[d].pt.k);else for(u=v[d].pt.k.length,c=0;u>c;c+=1)v[d].pt.k[c].s&&s(v[d].pt.k[c].s[0]),v[d].pt.k[c].e&&s(v[d].pt.k[c].e[0])}0===h.ty?(h.layers=e(h.refId,a),t(h.layers,a,o)):4===h.ty?i(h.shapes):5==h.ty&&n(h,o)}}function e(t,e){for(var i=0,s=e.length;s>i;){if(e[i].id===t)return JSON.parse(JSON.stringify(e[i].layers));i+=1}}function i(t){var e,r,a,n=t.length;for(e=n-1;e>=0;e-=1)if("sh"==t[e].ty)if(t[e].ks.k.i)s(t[e].ks.k);else for(a=t[e].ks.k.length,r=0;a>r;r+=1)t[e].ks.k[r].s&&s(t[e].ks.k[r].s[0]),t[e].ks.k[r].e&&s(t[e].ks.k[r].e[0]);else"gr"==t[e].ty&&i(t[e].it)}function s(t){var e,i=t.i.length;for(e=0;i>e;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function r(t,e){var i=e?e.split("."):[100,100,100];return t[0]>i[0]?!0:i[0]>t[0]?!1:t[1]>i[1]?!0:i[1]>t[1]?!1:t[2]>i[2]?!0:i[2]>t[2]?!1:void 0}function a(e,i){o(e),t(e.layers,e.assets,i)}function n(t,e){var i,s,r,a,n,o,h,p=[],l=t.t.d,m=0,d=t.t.m.g,f=0,c=0,u=0,y=[],v=0,g=0,b=e.getFontByName(l.f),P=0,S=b.fStyle.split(" "),k="normal",E="normal";for(s=S.length,i=0;s>i;i+=1)"italic"===S[i].toLowerCase()?E="italic":"bold"===S[i].toLowerCase()?k="700":"black"===S[i].toLowerCase()?k="900":"medium"===S[i].toLowerCase()?k="500":"regular"===S[i].toLowerCase()||"normal"===S[i].toLowerCase()?k="400":("light"===S[i].toLowerCase()||"thin"===S[i].toLowerCase())&&(k="200");if(l.fWeight=k,l.fStyle=E,s=l.t.length,l.sz){var M=l.sz[0],F=-1;for(i=0;s>i;i+=1)r=!1," "===l.t.charAt(i)?F=i:13===l.t.charCodeAt(i)&&(v=0,r=!0),e.chars?(h=e.getCharData(l.t.charAt(i),b.fStyle,b.fFamily),P=r?0:h.w*l.s/100):P=e.measureText(l.t.charAt(i),l.f,l.s),v+P>M?(-1===F?(l.t=l.t.substr(0,i)+"\r"+l.t.substr(i),s+=1):(i=F,l.t=l.t.substr(0,i)+"\r"+l.t.substr(i+1)),F=-1,v=0):v+=P;s=l.t.length}for(v=0,P=0,i=0;s>i;i+=1)if(r=!1," "===l.t.charAt(i)?a=" ":13===l.t.charCodeAt(i)?(y.push(v),g=v>g?v:g,v=0,a="",r=!0,u+=1):a=l.t.charAt(i),e.chars?(h=e.getCharData(l.t.charAt(i),b.fStyle,e.getFontByName(l.f).fFamily),P=r?0:h.w*l.s/100):P=e.measureText(a,l.f,l.s),v+=P,p.push({l:P,an:P,add:f,n:r,anIndexes:[],val:a,line:u}),2==d){if(f+=P,""==a||" "==a||i==s-1){for((""==a||" "==a)&&(f-=P);i>=c;)p[c].an=f,p[c].ind=m,p[c].extra=P,c+=1;m+=1,f=0}}else if(3==d){if(f+=P,""==a||i==s-1){for(""==a&&(f-=P);i>=c;)p[c].an=f,p[c].ind=m,p[c].extra=P,c+=1;f=0,m+=1}}else p[m].ind=m,p[m].extra=0,m+=1;if(l.l=p,g=v>g?v:g,y.push(v),l.sz)l.boxWidth=l.sz[0],t.t.d.justifyOffset=0;else switch(l.boxWidth=g,l.j){case 1:t.t.d.justifyOffset=-l.boxWidth;break;case 2:t.t.d.justifyOffset=-l.boxWidth/2;break;default:t.t.d.justifyOffset=0}l.lineWidths=y;var w=t.t.a;o=w.length;var A,I,T=[];for(n=0;o>n;n+=1){for(w[n].a.sc&&(l.strokeColorAnim=!0),w[n].a.sw&&(l.strokeWidthAnim=!0),(w[n].a.fc||w[n].a.fh||w[n].a.fs||w[n].a.fb)&&(l.fillColorAnim=!0),I=0,A=w[n].s.b,i=0;s>i;i+=1)p[i].anIndexes[n]=I,(1==A&&""!=p[i].val||2==A&&""!=p[i].val&&" "!=p[i].val||3==A&&(p[i].n||" "==p[i].val||i==s-1)||4==A&&(p[i].n||i==s-1))&&(1===w[n].s.rn&&T.push(I),I+=1);t.t.a[n].s.totalChars=I;var D,C=-1;if(1===w[n].s.rn)for(i=0;s>i;i+=1)C!=p[i].anIndexes[n]&&(C=p[i].anIndexes[n],D=T.splice(Math.floor(Math.random()*T.length),1)[0]),p[i].anIndexes[n]=D}0!==o||"m"in t.t.p||(t.singleShape=!0),l.yOffset=1.2*l.s,l.ascent=b.ascent*l.s/100}var o=function(){function t(e){var i,s,r,a=e.length;for(i=0;a>i;i+=1)if("gr"===e[i].ty)t(e[i].it);else if("fl"===e[i].ty||"st"===e[i].ty)if(e[i].c.k&&e[i].c.k[0].i)for(r=e[i].c.k.length,s=0;r>s;s+=1)e[i].c.k[s].s&&(e[i].c.k[s].s[0]/=255,e[i].c.k[s].s[1]/=255,e[i].c.k[s].s[2]/=255,e[i].c.k[s].s[3]/=255),e[i].c.k[s].e&&(e[i].c.k[s].e[0]/=255,e[i].c.k[s].e[1]/=255,e[i].c.k[s].e[2]/=255,e[i].c.k[s].e[3]/=255);else e[i].c.k[0]/=255,e[i].c.k[1]/=255,e[i].c.k[2]/=255,e[i].c.k[3]/=255}function e(e){var i,s=e.length;for(i=0;s>i;i+=1)4===e[i].ty&&t(e[i].shapes)}var i=[4,1,5];return function(t){if(r(i,t.v)&&(e(t.layers),t.assets)){var s,a=t.assets.length;for(s=0;a>s;s+=1)t.assets[s].layers&&e(t.assets[s].layers)}}}(),h={};return h.completeData=a,h}function ShapeModifier(){}function TrimModifier(){}function RoundCornersModifier(){}function SVGRenderer(t){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.globalData={frameNum:-1},this.elements=[],this.destroyed=!1}function MaskElement(t,e,i){this.dynamicProperties=[],this.data=t,this.element=e,this.globalData=i,this.paths=[],this.storedData=[],this.masksProperties=this.data.masksProperties,this.viewData=new Array(this.masksProperties.length),this.maskElement=null,this.firstFrame=!0;var s,r,a,n,o,h,p,l,m=(this.element.maskedElement,this.globalData.defs),d=this.masksProperties.length,f=this.masksProperties,c=0,u=[],y=randomString(10),v="clipPath",g="clip-path";for(s=0;d>s;s++)if(("a"!==f[s].mode&&"n"!==f[s].mode||f[s].inv)&&(v="mask",g="mask"),"s"!=f[s].mode&&"i"!=f[s].mode||0!=c||(o=document.createElementNS(svgNS,"rect"),o.setAttribute("fill","#ffffff"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("width","100%"),o.setAttribute("height","100%"),u.push(o)),"n"!=f[s].mode&&f[s].cl!==!1){if(c+=1,r=document.createElementNS(svgNS,"path"),f[s].cl?"s"==f[s].mode?r.setAttribute("fill","#000000"):r.setAttribute("fill","#ffffff"):(r.setAttribute("fill","none"),"s"==f[s].mode?r.setAttribute("fill","#000000"):r.setAttribute("fill","#ffffff"),r.setAttribute("stroke-width","1"),r.setAttribute("stroke-miterlimit","10")),r.setAttribute("clip-rule","nonzero"),0!==f[s].x.k){v="mask",g="mask",l=PropertyFactory.getProp(this.element,f[s].x,0,null,this.dynamicProperties);var b="fi_"+randomString(10);h=document.createElementNS(svgNS,"filter"),h.setAttribute("id",b),p=document.createElementNS(svgNS,"feMorphology"),p.setAttribute("operator","dilate"),p.setAttribute("in","SourceGraphic"),p.setAttribute("radius","0"),h.appendChild(p),m.appendChild(h),"s"==f[s].mode?r.setAttribute("stroke","#000000"):r.setAttribute("stroke","#ffffff")}else p=null,l=null;if(this.storedData[s]={elem:r,x:l,expan:p,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"==f[s].mode){n=u.length;var P=document.createElementNS(svgNS,"g");for(a=0;n>a;a+=1)P.appendChild(u[a]);var S=document.createElementNS(svgNS,"mask");S.setAttribute("mask-type","alpha"),S.setAttribute("id",y+"_"+c),S.appendChild(r),m.appendChild(S),P.setAttribute("mask","url(#"+y+"_"+c+")"),u.length=0,u.push(P)}else u.push(r);f[s].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[s]={elem:r,lastPath:"",prop:ShapePropertyFactory.getShapeProp(this.element,f[s],3,this.dynamicProperties,null)},this.viewData[s].prop.k||this.drawPath(f[s],this.viewData[s].prop.v,this.viewData[s])}else this.viewData[s]={prop:ShapePropertyFactory.getShapeProp(this.element,f[s],3,this.dynamicProperties,null)};for(this.maskElement=document.createElementNS(svgNS,v),d=u.length,s=0;d>s;s+=1)this.maskElement.appendChild(u[s]);this.maskElement.setAttribute("id",y),c>0&&this.element.maskedElement.setAttribute(g,"url(#"+y+")"),m.appendChild(this.maskElement)}function BaseElement(){}function SVGBaseElement(t,e,i,s,r){this.globalData=i,this.comp=s,this.data=t,this.matteElement=null,this.parentContainer=e,this.layerId=r?r.layerId:"ly_"+randomString(10),this.placeholder=r,this.init()}function ITextElement(t,e,i,s){}function SVGTextElement(t,e,i,s,r){this.textSpans=[],this.renderType="svg",this._parent.constructor.call(this,t,e,i,s,r)}function ICompElement(t,e,i,s,r){this._parent.constructor.call(this,t,e,i,s,r),this.layers=t.layers,this.isSvg=!0,this.data.tm&&(this.tm=PropertyFactory.getProp(this,this.data.tm,0,i.frameRate,this.dynamicProperties))}function IImageElement(t,e,i,s,r){this.assetData=i.getAssetData(t.refId),this.path=i.getPath(),this._parent.constructor.call(this,t,e,i,s,r)}function IShapeElement(t,e,i,s,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.viewData=[],this.shapeModifiers=[],this.shapesContainer=document.createElementNS(svgNS,"g"),this._parent.constructor.call(this,t,e,i,s,r)}function ISolidElement(t,e,i,s,r){this._parent.constructor.call(this,t,e,i,s,r)}var svgNS="http://www.w3.org/2000/svg",subframeEnabled=!0,expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),cachedColors={},bm_rounder=Math.round,bm_rnd,bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_abs=Math.abs,bm_floor=Math.floor,bm_max=Math.max,bm_min=Math.min,BMMath={pow:bm_pow,random:Math.random},defaultCurveSegments=75,degToRads=Math.PI/180,roundCorner=.5519;roundValues(!1);var rgbToHex=function(){var t,e,i=[];for(t=0;256>t;t+=1)e=t.toString(16),i[t]=1==e.length?"0"+e:e;return function(t,e,s){return 0>t&&(t=0),0>e&&(e=0),0>s&&(s=0),"#"+i[t]+i[e]+i[s]}}(),fillColorToString=function(){var t=[];return function(e,i){return void 0!==i&&(e[3]=i),t[e[0]]||(t[e[0]]={}),t[e[0]][e[1]]||(t[e[0]][e[1]]={}),t[e[0]][e[1]][e[2]]||(t[e[0]][e[1]][e[2]]={}),t[e[0]][e[1]][e[2]][e[3]]||(t[e[0]][e[1]][e[2]][e[3]]="rgba("+e.join(",")+")"),t[e[0]][e[1]][e[2]][e[3]]}}(),Matrix=function(){function t(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function e(t){if(0===t)return this;var e=Math.cos(t),i=Math.sin(t);return this._t(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1)}function i(t){if(0===t)return this;var e=Math.cos(t),i=Math.sin(t);return this._t(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1)}function s(t){if(0===t)return this;var e=Math.cos(t),i=Math.sin(t);return this._t(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1)}function r(t){if(0===t)return this;var e=Math.cos(t),i=Math.sin(t);return this._t(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1)}function a(t,e){return this._t(1,e,t,1,0,0)}function n(t,e){return this.shear(Math.tan(t),Math.tan(e))}function o(t,e){var i=Math.cos(e),s=Math.sin(e);return this._t(i,s,0,0,-s,i,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,Math.tan(t),1,0,0,0,0,1,0,0,0,0,1)._t(i,-s,0,0,s,i,0,0,0,0,1,0,0,0,0,1)}function h(t,e,i){return i=isNaN(i)?1:i,1==t&&1==e&&1==i?this:this._t(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1)}function p(t,e,i,s,r,a,n,o,h,p,l,m,d,f,c,u){return this.props[0]=t,this.props[1]=e,this.props[2]=i,this.props[3]=s,this.props[4]=r,this.props[5]=a,this.props[6]=n,this.props[7]=o,this.props[8]=h,this.props[9]=p,this.props[10]=l,this.props[11]=m,this.props[12]=d,this.props[13]=f,this.props[14]=c,this.props[15]=u,this}function l(t,e,i){return i=isNaN(i)?0:i,0!==t||0!==e||0!==i?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,i,1):this}function m(t,e,i,s,r,a,n,o,h,p,l,m,d,f,c,u){if(1===t&&0===e&&0===i&&0===s&&0===r&&1===a&&0===n&&0===o&&0===h&&0===p&&1===l&&0===m)return(0!==d||0!==f||0!==c)&&(this.props[12]=this.props[12]*t+this.props[13]*r+this.props[14]*h+this.props[15]*d,this.props[13]=this.props[12]*e+this.props[13]*a+this.props[14]*p+this.props[15]*f,this.props[14]=this.props[12]*i+this.props[13]*n+this.props[14]*l+this.props[15]*c,this.props[15]=this.props[12]*s+this.props[13]*o+this.props[14]*m+this.props[15]*u),this;var y=this.props[0],v=this.props[1],g=this.props[2],b=this.props[3],P=this.props[4],S=this.props[5],k=this.props[6],E=this.props[7],M=this.props[8],F=this.props[9],w=this.props[10],A=this.props[11],I=this.props[12],T=this.props[13],D=this.props[14],C=this.props[15];return this.props[0]=y*t+v*r+g*h+b*d,this.props[1]=y*e+v*a+g*p+b*f,this.props[2]=y*i+v*n+g*l+b*c,this.props[3]=y*s+v*o+g*m+b*u,this.props[4]=P*t+S*r+k*h+E*d,this.props[5]=P*e+S*a+k*p+E*f,this.props[6]=P*i+S*n+k*l+E*c,this.props[7]=P*s+S*o+k*m+E*u,this.props[8]=M*t+F*r+w*h+A*d,this.props[9]=M*e+F*a+w*p+A*f,this.props[10]=M*i+F*n+w*l+A*c,this.props[11]=M*s+F*o+w*m+A*u,this.props[12]=I*t+T*r+D*h+C*d,this.props[13]=I*e+T*a+D*p+C*f,this.props[14]=I*i+T*n+D*l+C*c,this.props[15]=I*s+T*o+D*m+C*u,this}function d(t){var e;for(e=0;16>e;e+=1)t.props[e]=this.props[e]}function f(t){var e;for(e=0;16>e;e+=1)this.props[e]=t[e]}function c(t,e,i){return{x:t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]}}function u(t,e,i){return t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12]}function y(t,e,i){return t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13]}function v(t,e,i){return t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]}function g(t,e,i){return[t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]]}function b(t,e){return bm_rnd(t*this.props[0]+e*this.props[4]+this.props[12])+","+bm_rnd(t*this.props[1]+e*this.props[5]+this.props[13])}function P(){return[this.props[0],this.props[1],this.props[2],this.props[3],this.props[4],this.props[5],this.props[6],this.props[7],this.props[8],this.props[9],this.props[10],this.props[11],this.props[12],this.props[13],this.props[14],this.props[15]]}function S(){return isSafari?"matrix3d("+roundTo2Decimals(this.props[0])+","+roundTo2Decimals(this.props[1])+","+roundTo2Decimals(this.props[2])+","+roundTo2Decimals(this.props[3])+","+roundTo2Decimals(this.props[4])+","+roundTo2Decimals(this.props[5])+","+roundTo2Decimals(this.props[6])+","+roundTo2Decimals(this.props[7])+","+roundTo2Decimals(this.props[8])+","+roundTo2Decimals(this.props[9])+","+roundTo2Decimals(this.props[10])+","+roundTo2Decimals(this.props[11])+","+roundTo2Decimals(this.props[12])+","+roundTo2Decimals(this.props[13])+","+roundTo2Decimals(this.props[14])+","+roundTo2Decimals(this.props[15])+")":(this.cssParts[1]=this.props.join(","),this.cssParts.join(""))}function k(){return"matrix("+this.props[0]+","+this.props[1]+","+this.props[4]+","+this.props[5]+","+this.props[12]+","+this.props[13]+")"}function E(){return""+this.toArray()}return function(){this.reset=t,this.rotate=e,this.rotateX=i,this.rotateY=s,this.rotateZ=r,this.skew=n,this.skewFromAxis=o,this.shear=a,this.scale=h,this.setTransform=p,this.translate=l,this.transform=m,this.applyToPoint=c,this.applyToX=u,this.applyToY=y,this.applyToZ=v,this.applyToPointArray=g,this.applyToPointStringified=b,this.toArray=P,this.toCSS=S,this.to2dCSS=k,this.toString=E,this.clone=d,this.cloneFromProps=f,this._t=this.transform,this.props=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],this.cssParts=["matrix3d(","",")"]}}();!function(t,e){function i(i,p,l){var f=[];p=1==p?{entropy:!0}:p||{};var g=n(a(p.entropy?[i,h(t)]:null==i?o():i,3),f),b=new s(f),P=function(){for(var t=b.g(d),e=u,i=0;y>t;)t=(t+i)*m,e*=m,i=b.g(1);for(;t>=v;)t/=2,e/=2,i>>>=1;return(t+i)/e};return P.int32=function(){return 0|b.g(4)},P.quick=function(){return b.g(4)/4294967296},P["double"]=P,n(h(b.S),t),(p.pass||l||function(t,i,s,a){return a&&(a.S&&r(a,b),t.state=function(){return r(b,{})}),s?(e[c]=t,i):t})(P,g,"global"in p?p.global:this==e,p.state)}function s(t){var e,i=t.length,s=this,r=0,a=s.i=s.j=0,n=s.S=[];for(i||(t=[i++]);m>r;)n[r]=r++;for(r=0;m>r;r++)n[r]=n[a=g&a+t[r%i]+(e=n[r])],n[a]=e;(s.g=function(t){for(var e,i=0,r=s.i,a=s.j,n=s.S;t--;)e=n[r=g&r+1],i=i*m+n[g&(n[r]=n[a=g&a+e])+(n[a]=e)];return s.i=r,s.j=a,i})(m)}function r(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function a(t,e){var i,s=[],r=typeof t;if(e&&"object"==r)for(i in t)try{s.push(a(t[i],e-1))}catch(n){}return s.length?s:"string"==r?t:t+"\x00"}function n(t,e){for(var i,s=t+"",r=0;r<s.length;)e[g&r]=g&(i^=19*e[g&r])+s.charCodeAt(r++);return h(e)}function o(){try{if(p)return h(p.randomBytes(m));var e=new Uint8Array(m);return(l.crypto||l.msCrypto).getRandomValues(e),h(e)}catch(i){var s=l.navigator,r=s&&s.plugins;return[+new Date,l,r,l.screen,h(t)]}}function h(t){return String.fromCharCode.apply(0,t)}var p,l=this,m=256,d=6,f=52,c="random",u=e.pow(m,d),y=e.pow(2,f),v=2*y,g=m-1;e["seed"+c]=i,n(e.random(),t)}([],BMMath);var BezierFactory=function(){function t(t,e,i,s,r){var a=r||("bez_"+t+"_"+e+"_"+i+"_"+s).replace(/\./g,"p");if(l[a])return l[a];var n=new h([t,e,i,s]);return l[a]=n,n}function e(t,e){return 1-3*e+3*t}function i(t,e){return 3*e-6*t}function s(t){return 3*t}function r(t,r,a){return((e(r,a)*t+i(r,a))*t+s(r))*t}function a(t,r,a){return 3*e(r,a)*t*t+2*i(r,a)*t+s(r)}function n(t,e,i,s,a){var n,o,h=0;do o=e+(i-e)/2,n=r(o,s,a)-t,n>0?i=o:e=o;while(Math.abs(n)>f&&++h<c);return o}function o(t,e,i,s){for(var n=0;m>n;++n){var o=a(e,i,s);if(0===o)return e;var h=r(e,i,s)-t;e-=h/o}return e}function h(t){this._p=t,this._mSampleValues=v?new Float32Array(u):new Array(u),this._precomputed=!1,this.get=this.get.bind(this)}var p={};p.getBezierEasing=t;var l={},m=4,d=.001,f=1e-7,c=10,u=11,y=1/(u-1),v="function"==typeof Float32Array;return h.prototype={get:function(t){var e=this._p[0],i=this._p[1],s=this._p[2],a=this._p[3];return this._precomputed||this._precompute(),e===i&&s===a?t:0===t?0:1===t?1:r(this._getTForX(t),i,a)},_precompute:function(){var t=this._p[0],e=this._p[1],i=this._p[2],s=this._p[3];this._precomputed=!0,(t!==e||i!==s)&&this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],i=0;u>i;++i)this._mSampleValues[i]=r(i*y,t,e)},_getTForX:function(t){for(var e=this._p[0],i=this._p[2],s=this._mSampleValues,r=0,h=1,p=u-1;h!==p&&s[h]<=t;++h)r+=y;--h;var l=(t-s[h])/(s[h+1]-s[h]),m=r+l*y,f=a(m,e,i);return f>=d?o(t,m,e,i):0===f?m:n(t,r,r+y,e,i)}},p}(),MatrixManager=matrixManagerFunction;!function(){for(var t=0,e=["ms","moz","webkit","o"],i=0;i<e.length&&!window.requestAnimationFrame;++i)window.requestAnimationFrame=window[e[i]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[i]+"CancelAnimationFrame"]||window[e[i]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,i){var s=(new Date).getTime(),r=Math.max(0,16-(s-t)),a=window.setTimeout(function(){e(s+r)},r);return t=s+r,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(t){clearTimeout(t)})}();var bez=bezFunction(),dataManager=dataFunctionManager(),FontManager=function(){function t(t,e){var i=document.createElement("span");i.style.fontFamily=e;var s=document.createElement("span");s.innerHTML="giItT1WQy@!-/#",i.style.position="absolute",i.style.left="-10000px",i.style.top="-10000px",i.style.fontSize="300px",i.style.fontVariant="normal",i.style.fontStyle="normal",i.style.fontWeight="normal",i.style.letterSpacing="0",i.appendChild(s),document.body.appendChild(i);var r=s.offsetWidth;return s.style.fontFamily=t+", "+e,{node:s,w:r,parent:i}}function e(){var t,i,s,r=this.fonts.length,a=r;for(t=0;r>t;t+=1)if(this.fonts[t].loaded)a-=1;else if("t"===this.fonts[t].fOrigin){if(window.Typekit&&window.Typekit.load&&0===this.typekitLoaded){this.typekitLoaded=1;try{Typekit.load({async:!0,active:function(){this.typekitLoaded=2}.bind(this)})}catch(n){}}2===this.typekitLoaded&&(this.fonts[t].loaded=!0)}else"n"===this.fonts[t].fOrigin?this.fonts[t].loaded=!0:(i=this.fonts[t].monoCase.node,s=this.fonts[t].monoCase.w,i.offsetWidth!==s?(a-=1,this.fonts[t].loaded=!0):(i=this.fonts[t].sansCase.node,s=this.fonts[t].sansCase.w,i.offsetWidth!==s&&(a-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==a&&Date.now()-this.initTime<h?setTimeout(e.bind(this),20):setTimeout(function(){this.loaded=!0}.bind(this),0)}function i(t,e){var i=document.createElementNS(svgNS,"text");i.style.fontSize="100px",i.style.fontFamily=e.fFamily,i.textContent="1",e.fClass?(i.style.fontFamily="inherit",i.className=e.fClass):i.style.fontFamily=e.fFamily,t.appendChild(i);var s=document.createElement("canvas").getContext("2d");return s.font="100px "+e.fFamily,s}function s(s,r){if(!s)return void(this.loaded=!0);if(this.chars)return this.loaded=!0,void(this.fonts=s.list);var a,n=s.list,o=n.length;for(a=0;o>a;a+=1){if(n[a].loaded=!1,n[a].monoCase=t(n[a].fFamily,"monospace"),n[a].sansCase=t(n[a].fFamily,"sans-serif"),n[a].fPath){if("p"===n[a].fOrigin){var h=document.createElement("style");h.type="text/css",h.innerHTML="@font-face {font-family: "+n[a].fFamily+"; font-style: normal; src: url('"+n[a].fPath+"');}",r.appendChild(h)}else if("g"===n[a].fOrigin){var p=document.createElement("link");p.type="text/css",p.rel="stylesheet",p.href=n[a].fPath,r.appendChild(p)}else if("t"===n[a].fOrigin){var l=document.createElement("script");l.setAttribute("src",n[a].fPath),r.appendChild(l)}}else n[a].loaded=!0;n[a].helper=i(r,n[a]),this.fonts.push(n[a])}e.bind(this)()}function r(t){if(t){this.chars||(this.chars=[]);var e,i,s,r=t.length,a=this.chars.length;for(e=0;r>e;e+=1){for(i=0,s=!1;a>i;)this.chars[i].style===t[e].style&&this.chars[i].fFamily===t[e].fFamily&&this.chars[i].ch===t[e].ch&&(s=!0),i+=1;s||(this.chars.push(t[e]),a+=1)}}}function a(t,e,i){for(var s=0,r=this.chars.length;r>s;){if(this.chars[s].ch===t&&this.chars[s].style===e&&this.chars[s].fFamily===i)return this.chars[s];s+=1}}function n(t,e,i){var s=this.getFontByName(e),r=s.helper;return r.measureText(t).width*i/100}function o(t){for(var e=0,i=this.fonts.length;i>e;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return"sans-serif"}var h=5e3,p=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.loaded=!1,this.initTime=Date.now()};return p.prototype.addChars=r,p.prototype.addFonts=s,p.prototype.getCharData=a,p.prototype.getFontByName=o,p.prototype.measureText=n,p}(),PropertyFactory=function(){function t(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime;if(t===this.lastFrame||this.lastFrame!==h&&(this.lastFrame>=this.keyframes[this.keyframes.length-1].t-this.offsetTime&&t>=this.keyframes[this.keyframes.length-1].t-this.offsetTime||this.lastFrame<this.keyframes[0].t-this.offsetTime&&t<this.keyframes[0].t-this.offsetTime));else{for(var e,i,s=0,r=this.keyframes.length-1,a=1,n=!0;n;){if(e=this.keyframes[s],i=this.keyframes[s+1],s==r-1&&t>=i.t-this.offsetTime){e.h&&(e=i);break}if(i.t-this.offsetTime>t)break;r-1>s?s+=a:n=!1}var o,p,l,m,d,f=0;if(e.to){e.bezierData||bez.buildBezierData(e);var c=e.bezierData;if(t>=i.t-this.offsetTime||t<e.t-this.offsetTime){var u=t>=i.t-this.offsetTime?c.points.length-1:0;for(p=c.points[u].point.length,o=0;p>o;o+=1)this.v[o]=this.mult?c.points[u].point[o]*this.mult:c.points[u].point[o],this.pv[o]=c.points[u].point[o],this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o])}else{e.__fnct?d=e.__fnct:(d=BezierFactory.getBezierEasing(e.o.x,e.o.y,e.i.x,e.i.y,e.n).get,e.__fnct=d),l=d((t-(e.t-this.offsetTime))/(i.t-this.offsetTime-(e.t-this.offsetTime)));var y,v=c.segmentLength*l,g=0;for(a=1,n=!0,m=c.points.length;n;){if(g+=c.points[f].partialLength*a,0===v||0===l||f==c.points.length-1){for(p=c.points[f].point.length,o=0;p>o;o+=1)this.v[o]=this.mult?c.points[f].point[o]*this.mult:c.points[f].point[o],this.pv[o]=c.points[f].point[o],this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o]);break}if(v>=g&&v<g+c.points[f+1].partialLength){for(y=(v-g)/c.points[f+1].partialLength,p=c.points[f].point.length,o=0;p>o;o+=1)this.v[o]=this.mult?(c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y)*this.mult:c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y,this.pv[o]=c.points[f].point[o]+(c.points[f+1].point[o]-c.points[f].point[o])*y,this.lastPValue[o]!==this.pv[o]&&(this.mdf=!0,this.lastPValue[o]=this.pv[o]);break}m-1>f&&1==a||f>0&&-1==a?f+=a:n=!1}}}else{var b,P,S,k,E,M=!1;for(r=e.s.length,s=0;r>s;s+=1){if(1!==e.h&&(e.o.x instanceof Array?(M=!0,e.__fnct||(e.__fnct=[]),e.__fnct[s]||(b=e.o.x[s]||e.o.x[0],P=e.o.y[s]||e.o.y[0],S=e.i.x[s]||e.i.x[0],k=e.i.y[s]||e.i.y[0])):(M=!1,e.__fnct||(b=e.o.x,P=e.o.y,S=e.i.x,k=e.i.y)),M?e.__fnct[s]?d=e.__fnct[s]:(d=BezierFactory.getBezierEasing(b,P,S,k).get,e.__fnct[s]=d):e.__fnct?d=e.__fnct:(d=BezierFactory.getBezierEasing(b,P,S,k).get,e.__fnct=d),l=t>=i.t-this.offsetTime?1:t<e.t-this.offsetTime?0:d((t-(e.t-this.offsetTime))/(i.t-this.offsetTime-(e.t-this.offsetTime)))),this.sh&&1!==e.h){var F=e.s[s],w=e.e[s];-180>F-w?F+=360:F-w>180&&(F-=360),E=F+(w-F)*l}else E=1===e.h?e.s[s]:e.s[s]+(e.e[s]-e.s[s])*l;1===r?(this.v=this.mult?E*this.mult:E,this.pv=E,this.lastPValue!=this.pv&&(this.mdf=!0,this.lastPValue=this.pv)):(this.v[s]=this.mult?E*this.mult:E,this.pv[s]=E,this.lastPValue[s]!==this.pv[s]&&(this.mdf=!0,this.lastPValue[s]=this.pv[s]))}}}this.lastFrame=t,this.frameId=this.elem.globalData.frameId}}function e(t,e,i){this.mult=i,this.v=i?e.k*i:e.k,this.pv=e.k,this.mdf=!1,this.comp=t.comp,this.k=!1}function i(t,e,i){this.mult=i,this.data=e,this.mdf=!1,this.comp=t.comp,this.k=!1,this.frameId=-1,this.v=new Array(e.k.length),this.pv=new Array(e.k.length),this.lastValue=new Array(e.k.length);var s,r=e.k.length;for(s=0;r>s;s+=1)this.v[s]=i?e.k[s]*i:e.k[s],this.pv[s]=e.k[s]}function s(e,i,s){this.keyframes=i.k,this.offsetTime=e.data.st,this.lastValue=-99999,this.lastPValue=-99999,this.frameId=-1,this.k=!0,this.data=i,this.mult=s,this.elem=e,this.comp=e.comp,this.lastFrame=h,this.v=s?i.k[0].s[0]*s:i.k[0].s[0],
this.pv=i.k[0].s[0],this.getValue=t}function r(e,i,s){var r,a,n,o,p,l=i.k.length;for(r=0;l-1>r;r+=1)i.k[r].to&&i.k[r].s&&i.k[r].e&&(a=i.k[r].s,n=i.k[r].e,o=i.k[r].to,p=i.k[r].ti,(2==a.length&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],a[0]+o[0],a[1]+o[1])&&bez.pointOnLine2D(a[0],a[1],n[0],n[1],n[0]+p[0],n[1]+p[1])||bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],a[0]+o[0],a[1]+o[1],a[2]+o[2])&&bez.pointOnLine3D(a[0],a[1],a[2],n[0],n[1],n[2],n[0]+p[0],n[1]+p[1],n[2]+p[2]))&&(i.k[r].to=null,i.k[r].ti=null));this.keyframes=i.k,this.offsetTime=e.data.st,this.k=!0,this.mult=s,this.elem=e,this.comp=e.comp,this.getValue=t,this.frameId=-1,this.v=new Array(i.k[0].s.length),this.pv=new Array(i.k[0].s.length),this.lastValue=new Array(i.k[0].s.length),this.lastPValue=new Array(i.k[0].s.length),this.lastFrame=h}function a(t,a,n,o,h){a||console.log((new Error).stack);var l;if(2===n)l=new p(t,a,h);else if(7===n)l=new TrimProperty(t,a,h);else if(a.k.length)if("number"==typeof a.k[0])l=new i(t,a,o);else switch(n){case 0:l=new s(t,a,o);break;case 1:l=new r(t,a,o)}else l=new e(t,a,o);return l.k&&h.push(l),l}function n(t,e,i,s){return new l(t,e,i,s)}function o(t,e,i){return new m(t,e,i)}var h=-999999,p=function(){function t(){return this.p.k&&this.p.getValue(),this.p.v}function e(){return this.px.k&&this.px.getValue(),this.px.v}function i(){return this.py.k&&this.py.getValue(),this.py.v}function s(){return this.a.k&&this.a.getValue(),this.a.v}function r(){return this.or.k&&this.or.getValue(),this.or.v}function a(){return this.r.k&&this.r.getValue(),this.r.v/degToRads}function n(){return this.s.k&&this.s.getValue(),this.s.v}function o(){return this.o.k&&this.o.getValue(),this.o.v}function h(){return this.sk.k&&this.sk.getValue(),this.sk.v}function p(){return this.sa.k&&this.sa.getValue(),this.sa.v}function l(t){var e,i=this.dynamicProperties.length;for(e=0;i>e;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.r?t.rotate(-this.r.v):t.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function m(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1;var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t].mdf&&(this.mdf=!0);this.mdf&&(this.v.reset(),this.a&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r?this.v.rotate(-this.r.v):this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])),this.frameId=this.elem.globalData.frameId}}function d(){this.inverted=!0,this.iv=new Matrix,this.k||(this.data.p.s?this.iv.translate(this.px.v,this.py.v,-this.pz.v):this.iv.translate(this.p.v[0],this.p.v[1],-this.p.v[2]),this.r?this.iv.rotate(-this.r.v):this.iv.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.s&&this.iv.scale(this.s.v[0],this.s.v[1],1),this.a&&this.iv.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]))}return function(f,c,u){this.elem=f,this.frameId=-1,this.dynamicProperties=[],this.mdf=!1,this.data=c,this.getValue=m,this.applyToMatrix=l,this.setInverted=d,this.v=new Matrix,c.p.s?(this.px=PropertyFactory.getProp(f,c.p.x,0,0,this.dynamicProperties),this.py=PropertyFactory.getProp(f,c.p.y,0,0,this.dynamicProperties),c.p.z&&(this.pz=PropertyFactory.getProp(f,c.p.z,0,0,this.dynamicProperties))):this.p=PropertyFactory.getProp(f,c.p,1,0,this.dynamicProperties),c.r?this.r=PropertyFactory.getProp(f,c.r,0,degToRads,this.dynamicProperties):c.rx&&(this.rx=PropertyFactory.getProp(f,c.rx,0,degToRads,this.dynamicProperties),this.ry=PropertyFactory.getProp(f,c.ry,0,degToRads,this.dynamicProperties),this.rz=PropertyFactory.getProp(f,c.rz,0,degToRads,this.dynamicProperties),this.or=PropertyFactory.getProp(f,c.or,0,degToRads,this.dynamicProperties)),c.sk&&(this.sk=PropertyFactory.getProp(f,c.sk,0,degToRads,this.dynamicProperties),this.sa=PropertyFactory.getProp(f,c.sa,0,degToRads,this.dynamicProperties)),c.a&&(this.a=PropertyFactory.getProp(f,c.a,1,0,this.dynamicProperties)),c.s&&(this.s=PropertyFactory.getProp(f,c.s,1,.01,this.dynamicProperties)),this.o=c.o?PropertyFactory.getProp(f,c.o,0,.01,u):{mdf:!1,v:1},this.dynamicProperties.length?u.push(this):(this.a&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r?this.v.rotate(-this.r.v):this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?c.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])),Object.defineProperty(this,"position",{get:t}),Object.defineProperty(this,"xPosition",{get:e}),Object.defineProperty(this,"yPosition",{get:i}),Object.defineProperty(this,"orientation",{get:r}),Object.defineProperty(this,"anchorPoint",{get:s}),Object.defineProperty(this,"rotation",{get:a}),Object.defineProperty(this,"scale",{get:n}),Object.defineProperty(this,"opacity",{get:o}),Object.defineProperty(this,"skew",{get:h}),Object.defineProperty(this,"skewAxis",{get:p})}}(),l=function(){function t(t){var e=0,i=this.dataProps.length;if(this.elem.globalData.frameId!==this.frameId||t){for(this.mdf=!1,this.frameId=this.elem.globalData.frameId;i>e;){if(this.dataProps[e].p.mdf){this.mdf=!0;break}e+=1}if(this.mdf||t)for("svg"===this.renderer&&(this.dasharray=""),e=0;i>e;e+=1)"o"!=this.dataProps[e].n?"svg"===this.renderer?this.dasharray+=" "+this.dataProps[e].p.v:this.dasharray[e]=this.dataProps[e].p.v:this.dashoffset=this.dataProps[e].p.v}}return function(e,i,s,r){this.elem=e,this.frameId=-1,this.dataProps=new Array(i.length),this.renderer=s,this.mdf=!1,this.k=!1,this.dasharray="svg"===this.renderer?"":new Array(i.length-1),this.dashoffset=0;var a,n,o=i.length;for(a=0;o>a;a+=1)n=PropertyFactory.getProp(e,i[a].v,0,0,r),this.k=n.k?!0:this.k,this.dataProps[a]={n:i[a].n,p:n};this.getValue=t,this.k?r.push(this):this.getValue(!0)}}(),m=function(){function t(){if(this.dynamicProperties.length){var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue()}var i=this.data.totalChars,s=2===this.data.r?1:100/i,r=this.o.v/s,a=this.s.v/s+r,n=this.e.v/s+r;if(a>n){var o=a;a=n,n=o}this.finalS=a,this.finalE=n}function e(t){var e=BezierFactory.getBezierEasing(this.ne.v/100,0,1-this.xe.v/100,1).get,a=0,n=this.finalS,o=this.finalE,h=this.data.sh;if(2==h)a=o===n?t>=o?1:0:i(0,s(.5/(o-n)+(t-n)/(o-n),1)),a=e(a);else if(3==h)a=o===n?t>=o?0:1:1-i(0,s(.5/(o-n)+(t-n)/(o-n),1)),a=e(a);else if(4==h)o===n?a=t>=o?0:1:(a=i(0,s(.5/(o-n)+(t-n)/(o-n),1)),.5>a?a*=2:a=1-a);else if(5==h)if(o===n)a=t>=o?0:1;else{var p=o-n;a=-4/(p*p)*t*t+4/p*t}else 6==h?a=o===n?t>=o?0:1:(1+(Math.cos(Math.PI+2*Math.PI*(t-n)/(o-n))+0))/2:t>=r(n)&&(a=0>t-n?1-(n-t):i(0,s(o-t,1)));return a*this.a.v}var i=Math.max,s=Math.min,r=Math.floor;return function(i,s,r){this.mdf=!1,this.k=!1,this.data=s,this.dynamicProperties=[],this.getValue=t,this.getMult=e,this.comp=i.comp,this.finalS=0,this.finalE=0,this.s=PropertyFactory.getProp(i,s.s||{k:0},0,0,this.dynamicProperties),this.e="e"in s?PropertyFactory.getProp(i,s.e,0,0,this.dynamicProperties):{v:2===s.r?s.totalChars:100},this.o=PropertyFactory.getProp(i,s.o||{k:0},0,0,this.dynamicProperties),this.xe=PropertyFactory.getProp(i,s.xe||{k:0},0,0,this.dynamicProperties),this.ne=PropertyFactory.getProp(i,s.ne||{k:0},0,0,this.dynamicProperties),this.a=PropertyFactory.getProp(i,s.a,0,.01,this.dynamicProperties),this.dynamicProperties.length?r.push(this):this.getValue()}}(),d={};return d.getProp=a,d.getDashProp=n,d.getTextSelectorProp=o,d}(),ShapePropertyFactory=function(){function t(){this.mdf=!1;var t=this.comp.renderedFrame-this.offsetTime;if(this.lastFrame!==n&&(this.lastFrame<this.keyframes[0].t-this.offsetTime&&t<this.keyframes[0].t-this.offsetTime||this.lastFrame>this.keyframes[this.keyframes.length-1].t-this.offsetTime&&t>this.keyframes[this.keyframes.length-1].t-this.offsetTime));else{var e,i,s;if(t<this.keyframes[0].t-this.offsetTime)e=this.keyframes[0].s[0],s=!0;else if(t>this.keyframes[this.keyframes.length-1].t-this.offsetTime)e=1===this.keyframes[this.keyframes.length-2].h?this.keyframes[this.keyframes.length-2].s[0]:this.keyframes[this.keyframes.length-2].e[0],s=!0;else{for(var r,a,o,h,p,l,m=0,d=this.keyframes.length-1,f=1,c=!0;c&&(r=this.keyframes[m],a=this.keyframes[m+1],!(a.t-this.offsetTime>t&&1==f));)d-1>m&&1==f||m>0&&-1==f?m+=f:c=!1;var u;if(1!==r.h){var y;r.__fnct?y=r.__fnct:(y=BezierFactory.getBezierEasing(r.o.x,r.o.y,r.i.x,r.i.y).get,r.__fnct=y),u=t>=a.t-this.offsetTime?1:t<r.t-this.offsetTime?0:y((t-(r.t-this.offsetTime))/(a.t-this.offsetTime-(r.t-this.offsetTime))),i=r.e[0]}e=r.s[0],s=1===r.h}h=this.v.i.length,l=e.i[0].length;var v,g=!1;for(o=0;h>o;o+=1)for(p=0;l>p;p+=1)s?(v=e.i[o][p],this.v.i[o][p]!==v&&(this.v.i[o][p]=v,this.pv.i[o][p]=v,g=!0),v=e.o[o][p],this.v.o[o][p]!==v&&(this.v.o[o][p]=v,this.pv.o[o][p]=v,g=!0),v=e.v[o][p],this.v.v[o][p]!==v&&(this.v.v[o][p]=v,this.pv.v[o][p]=v,g=!0)):(v=e.i[o][p]+(i.i[o][p]-e.i[o][p])*u,this.v.i[o][p]!==v&&(this.v.i[o][p]=v,this.pv.i[o][p]=v,g=!0),v=e.o[o][p]+(i.o[o][p]-e.o[o][p])*u,this.v.o[o][p]!==v&&(this.v.o[o][p]=v,this.pv.o[o][p]=v,g=!0),v=e.v[o][p]+(i.v[o][p]-e.v[o][p])*u,this.v.v[o][p]!==v&&(this.v.v[o][p]=v,this.pv.v[o][p]=v,g=!0));this.mdf=g,this.paths.length=0,this.paths[0]=this.v}this.lastFrame=t}function e(){return this.v}function i(){this.paths.length?(this.paths.length=1,this.paths[0]=this.v):this.paths=[this.v]}function s(t,s,r){this.comp=t.comp,this.k=!1,this.mdf=!1,this.closed=3===r?s.cl:s.closed,this.numNodes=3===r?s.pt.k.v.length:s.ks.k.v.length,this.v=3===r?s.pt.k:s.ks.k,this.getValue=e,this.pv=this.v,this.v.c=this.closed,this.paths=[this.v],this.reset=i}function r(e,s,r){this.comp=e.comp,this.offsetTime=e.data.st,this.getValue=t,this.keyframes=3===r?s.pt.k:s.ks.k,this.k=!0,this.closed=3===r?s.cl:s.closed;var a,o=this.keyframes[0].s[0].i.length,h=this.keyframes[0].s[0].i[0].length;for(this.numNodes=o,this.v={i:Array.apply(null,{length:o}),o:Array.apply(null,{length:o}),v:Array.apply(null,{length:o}),c:this.closed},this.pv={i:Array.apply(null,{length:o}),o:Array.apply(null,{length:o}),v:Array.apply(null,{length:o})},a=0;o>a;a+=1)this.v.i[a]=Array.apply(null,{length:h}),this.v.o[a]=Array.apply(null,{length:h}),this.v.v[a]=Array.apply(null,{length:h}),this.pv.i[a]=Array.apply(null,{length:h}),this.pv.o[a]=Array.apply(null,{length:h}),this.pv.v[a]=Array.apply(null,{length:h});this.paths=[],this.lastFrame=n,this.reset=i}function a(t,e,i,a){var n;if(3===i||4===i){var l=3===i?e.pt.k:e.ks.k;n=l.length?new r(t,e,i):new s(t,e,i)}else 5===i?n=new p(t,e):6===i?n=new o(t,e):7===i&&(n=new h(t,e));return n.k&&a.push(n),n}var n=-999999,o=function(){function t(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,r=this.s.v[1]/2;2!==this.d&&3!==this.d?(this.v.v[0]=[t,e-r],this.v.i[0]=[t-i*s,e-r],this.v.o[0]=[t+i*s,e-r],this.v.v[1]=[t+i,e],this.v.i[1]=[t+i,e-r*s],this.v.o[1]=[t+i,e+r*s],this.v.v[2]=[t,e+r],this.v.i[2]=[t+i*s,e+r],this.v.o[2]=[t-i*s,e+r],this.v.v[3]=[t-i,e],this.v.i[3]=[t-i,e+r*s],this.v.o[3]=[t-i,e-r*s]):(this.v.v[0]=[t,e-r],this.v.o[0]=[t-i*s,e-r],this.v.i[0]=[t+i*s,e-r],this.v.v[1]=[t-i,e],this.v.o[1]=[t-i,e+r*s],this.v.i[1]=[t-i,e-r*s],this.v.v[2]=[t,e+r],this.v.o[2]=[t+i*s,e+r],this.v.i[2]=[t-i*s,e+r],this.v.v[3]=[t+i,e],this.v.o[3]=[t+i,e-r*s],this.v.i[3]=[t+i,e+r*s]),this.paths.length=0,this.paths[0]=this.v}function e(t){var e,i=this.dynamicProperties.length;if(this.elem.globalData.frameId!==this.frameId){for(this.mdf=!1,this.frameId=this.elem.globalData.frameId,e=0;i>e;e+=1)this.dynamicProperties[e].getValue(t),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.mdf&&(this.convertEllToPath(),this.paths.length=0,this.paths[0]=this.v)}}var s=roundCorner;return function(s,r){this.v={v:Array.apply(null,{length:4}),i:Array.apply(null,{length:4}),o:Array.apply(null,{length:4}),c:!0},this.numNodes=4,this.d=r.d,this.dynamicProperties=[],this.paths=[],r.closed=!0,this.closed=!0,this.elem=s,this.comp=s.comp,this.frameId=-1,this.mdf=!1,this.getValue=e,this.convertEllToPath=t,this.reset=i,this.p=PropertyFactory.getProp(s,r.p,1,0,this.dynamicProperties),this.s=PropertyFactory.getProp(s,r.s,1,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertEllToPath()}}(),h=function(){function t(){var t=Math.floor(this.pt.v),e=2*Math.PI/t;this.v.v.length=t,this.v.i.length=t,this.v.o.length=t;var i,s=this.or.v,r=this.os.v,a=2*Math.PI*s/(4*t),n=-Math.PI/2,o=3===this.data.d?-1:1;for(n+=this.r.v,i=0;t>i;i+=1){var h=s*Math.cos(n),p=s*Math.sin(n),l=0===h&&0===p?0:p/Math.sqrt(h*h+p*p),m=0===h&&0===p?0:-h/Math.sqrt(h*h+p*p);h+=+this.p.v[0],p+=+this.p.v[1],this.v.v[i]=[h,p],this.v.i[i]=[h+l*a*r*o,p+m*a*r*o],this.v.o[i]=[h-l*a*r*o,p-m*a*r*o],n+=e*o}this.numNodes=t,this.paths.length=0,this.paths[0]=this.v}function e(){var t=2*Math.floor(this.pt.v),e=2*Math.PI/t;this.v.v.length=t,this.v.i.length=t,this.v.o.length=t;var i,s,r,a,n=!0,o=this.or.v,h=this.ir.v,p=this.os.v,l=this.is.v,m=2*Math.PI*o/(2*t),d=2*Math.PI*h/(2*t),f=-Math.PI/2;f+=this.r.v;var c=3===this.data.d?-1:1;for(i=0;t>i;i+=1){s=n?o:h,r=n?p:l,a=n?m:d;var u=s*Math.cos(f),y=s*Math.sin(f),v=0===u&&0===y?0:y/Math.sqrt(u*u+y*y),g=0===u&&0===y?0:-u/Math.sqrt(u*u+y*y);u+=+this.p.v[0],y+=+this.p.v[1],this.v.v[i]=[u,y],this.v.i[i]=[u+v*a*r*c,y+g*a*r*c],this.v.o[i]=[u-v*a*r*c,y-g*a*r*c],n=!n,f+=e*c}this.numNodes=t,this.paths.length=0,this.paths[0]=this.v}function s(){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem.globalData.frameId;var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t].mdf&&(this.mdf=!0);this.mdf&&this.convertToPath()}}return function(r,a){this.v={v:[],i:[],o:[],c:!0},this.elem=r,this.comp=r.comp,this.data=a,this.frameId=-1,this.d=a.d,this.dynamicProperties=[],this.mdf=!1,a.closed=!0,this.closed=!0,this.getValue=s,this.reset=i,1===a.sy?(this.ir=PropertyFactory.getProp(r,a.ir,0,0,this.dynamicProperties),this.is=PropertyFactory.getProp(r,a.is,0,.01,this.dynamicProperties),this.convertToPath=e):this.convertToPath=t,this.pt=PropertyFactory.getProp(r,a.pt,0,0,this.dynamicProperties),this.p=PropertyFactory.getProp(r,a.p,1,0,this.dynamicProperties),this.r=PropertyFactory.getProp(r,a.r,0,degToRads,this.dynamicProperties),this.or=PropertyFactory.getProp(r,a.or,0,0,this.dynamicProperties),this.os=PropertyFactory.getProp(r,a.os,0,.01,this.dynamicProperties),this.paths=[],this.dynamicProperties.length?this.k=!0:this.convertToPath()}}(),p=function(){function t(t){if(this.elem.globalData.frameId!==this.frameId){this.mdf=!1,this.frameId=this.elem.globalData.frameId;var e,i=this.dynamicProperties.length;for(e=0;i>e;e+=1)this.dynamicProperties[e].getValue(t),this.dynamicProperties[e].mdf&&(this.mdf=!0);this.mdf&&this.convertRectToPath()}}function e(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,s=this.s.v[1]/2,r=bm_min(i,s,this.r.v),a=r*(1-roundCorner);2===this.d||1===this.d?(this.v.v[0]=[t+i,e-s+r],this.v.o[0]=this.v.v[0],this.v.i[0]=[t+i,e-s+a],this.v.v[1]=[t+i,e+s-r],this.v.o[1]=[t+i,e+s-a],this.v.i[1]=this.v.v[1],this.v.v[2]=[t+i-r,e+s],this.v.o[2]=this.v.v[2],this.v.i[2]=[t+i-a,e+s],this.v.v[3]=[t-i+r,e+s],this.v.o[3]=[t-i+a,e+s],this.v.i[3]=this.v.v[3],this.v.v[4]=[t-i,e+s-r],this.v.o[4]=this.v.v[4],this.v.i[4]=[t-i,e+s-a],this.v.v[5]=[t-i,e-s+r],this.v.o[5]=[t-i,e-s+a],this.v.i[5]=this.v.v[5],this.v.v[6]=[t-i+r,e-s],this.v.o[6]=this.v.v[6],this.v.i[6]=[t-i+a,e-s],this.v.v[7]=[t+i-r,e-s],this.v.o[7]=[t+i-a,e-s],this.v.i[7]=this.v.v[7]):(this.v.v[0]=[t+i,e-s+r],this.v.o[0]=[t+i,e-s+a],this.v.i[0]=this.v.v[0],this.v.v[1]=[t+i-r,e-s],this.v.o[1]=this.v.v[1],this.v.i[1]=[t+i-a,e-s],this.v.v[2]=[t-i+r,e-s],this.v.o[2]=[t-i+a,e-s],this.v.i[2]=this.v.v[2],this.v.v[3]=[t-i,e-s+r],this.v.o[3]=this.v.v[3],this.v.i[3]=[t-i,e-s+a],this.v.v[4]=[t-i,e+s-r],this.v.o[4]=[t-i,e+s-a],this.v.i[4]=this.v.v[4],this.v.v[5]=[t-i+r,e+s],this.v.o[5]=this.v.v[5],this.v.i[5]=[t-i+a,e+s],this.v.v[6]=[t+i-r,e+s],this.v.o[6]=[t+i-a,e+s],this.v.i[6]=this.v.v[6],this.v.v[7]=[t+i,e+s-r],this.v.o[7]=this.v.v[7],this.v.i[7]=[t+i,e+s-a]),this.paths.length=0,this.paths[0]=this.v}return function(s,r){this.v={v:Array.apply(null,{length:8}),i:Array.apply(null,{length:8}),o:Array.apply(null,{length:8}),c:!0},this.paths=[],this.numNodes=8,this.elem=s,this.comp=s.comp,this.frameId=-1,this.d=r.d,this.dynamicProperties=[],this.mdf=!1,r.closed=!0,this.closed=!0,this.getValue=t,this.convertRectToPath=e,this.reset=i,this.p=PropertyFactory.getProp(s,r.p,1,0,this.dynamicProperties),this.s=PropertyFactory.getProp(s,r.s,1,0,this.dynamicProperties),this.r=PropertyFactory.getProp(s,r.r,0,0,this.dynamicProperties),this.dynamicProperties.length?this.k=!0:this.convertRectToPath()}}(),l={};return l.getShapeProp=a,l}(),ShapeModifiers=function(){function t(t,e){s[t]||(s[t]=e)}function e(t,e,i,r){return new s[t](e,i,r)}var i={},s={};return i.registerModifier=t,i.getModifier=e,i}();ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShape=function(t){this.closed||this.shapes.push({shape:t,last:[]})},ShapeModifier.prototype.init=function(t,e,i){this.elem=t,this.frameId=-1,this.shapes=[],this.dynamicProperties=[],this.mdf=!1,this.closed=!1,this.k=!1,this.isTrimming=!1,this.comp=t.comp,this.initModifierProperties(t,e),this.dynamicProperties.length?(this.k=!0,i.push(this)):this.getValue(!0)},extendPrototype(ShapeModifier,TrimModifier),TrimModifier.prototype.processKeys=function(t){if(this.elem.globalData.frameId!==this.frameId||t){this.mdf=t?!0:!1,this.frameId=this.elem.globalData.frameId;var e,i=this.dynamicProperties.length;for(e=0;i>e;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e].mdf&&(this.mdf=!0);if(this.mdf||t){var s=this.o.v%360/360;0>s&&(s+=1);var r=this.s.v+s,a=this.e.v+s;if(r>a){var n=r;r=a,a=n}this.sValue=r,this.eValue=a,this.oValue=s}}},TrimModifier.prototype.initModifierProperties=function(t,e){this.sValue=0,this.eValue=0,this.oValue=0,this.getValue=this.processKeys,this.s=PropertyFactory.getProp(t,e.s,0,.01,this.dynamicProperties),this.e=PropertyFactory.getProp(t,e.e,0,.01,this.dynamicProperties),this.o=PropertyFactory.getProp(t,e.o,0,0,this.dynamicProperties),this.dynamicProperties.length||this.getValue(!0)},TrimModifier.prototype.getSegmentsLength=function(t){var e,i=t.c,s=t.v,r=t.o,a=t.i,n=s.length,o=[],h=0;for(e=0;n-1>e;e+=1)o[e]=bez.getBezierLength(s[e],s[e+1],r[e],a[e+1]),h+=o[e].addedLength;return i&&(o[e]=bez.getBezierLength(s[e],s[0],r[e],a[0]),h+=o[e].addedLength),{lengths:o,totalLength:h}},TrimModifier.prototype.processShapes=function(){var t,e,i,s,r,a,n,o=this.shapes.length,h=this.sValue,p=this.eValue,l=0;if(p===h)for(e=0;o>e;e+=1)this.shapes[e].shape.paths=[],this.shapes[e].shape.mdf=!0;else{var m,d=[],f=[];for(e=0;o>e;e+=1)if(m=this.shapes[e],m.shape.mdf||this.mdf){for(t=m.shape.paths,m.shape.mdf=!0,s=t.length,r=[],n=0,i=0;s>i;i+=1)a=this.getSegmentsLength(t[i]),r.push(a),n+=a.totalLength;m.totalShapeLength=n,m.pathsData=r,l+=n}else m.shape.paths=m.last;for(e=0;o>e;e+=1)if(m=this.shapes[e],m.shape.mdf){d.length=0,1>=p?d.push({s:m.totalShapeLength*h,e:m.totalShapeLength*p}):h>=1?d.push({s:m.totalShapeLength*(h-1),e:m.totalShapeLength*(p-1)}):(d.push({s:m.totalShapeLength*h,e:m.totalShapeLength}),d.push({s:0,e:m.totalShapeLength*(p-1)}));var c,u=this.addShapes(m,d[0]);f.push(u),d.length>1&&(m.shape.closed?this.addShapes(m,d[1],u):(u.i[0]=[u.v[0][0],u.v[0][1]],c=u.v.length-1,u.o[c]=[u.v[c][0],u.v[c][1]],u=this.addShapes(m,d[1]),f.push(u))),u.i[0]=[u.v[0][0],u.v[0][1]],c=u.v.length-1,u.o[c]=[u.v[c][0],u.v[c][1]],m.last=f,m.shape.paths=f}}this.dynamicProperties.length||(this.mdf=!1)},TrimModifier.prototype.addSegment=function(t,e,i,s,r,a){r.o[a]=e,r.i[a+1]=i,r.v[a+1]=s,r.v[a]=t},TrimModifier.prototype.addShapes=function(t,e,i){var s,r,a,n,o,h,p,l=t.pathsData,m=t.shape.paths,d=m.length,f=0;for(i?o=i.v.length-1:(i={c:!1,v:[],i:[],o:[]},o=0),s=0;d>s;s+=1){for(h=l[s].lengths,a=m[s].c?h.length:h.length+1,r=1;a>r;r+=1)if(n=h[r-1],f+n.addedLength<e.s)f+=n.addedLength;else{if(f>e.e)break;e.s<=f&&e.e>=f+n.addedLength?this.addSegment(m[s].v[r-1],m[s].o[r-1],m[s].i[r],m[s].v[r],i,o):(p=bez.getNewSegment(m[s].v[r-1],m[s].v[r],m[s].o[r-1],m[s].i[r],(e.s-f)/n.addedLength,(e.e-f)/n.addedLength,h[r-1]),this.addSegment(p.pt1,p.pt3,p.pt4,p.pt2,i,o)),f+=n.addedLength,o+=1}if(m[s].c&&f<=e.e){var c=h[r-1].addedLength;e.s<=f&&e.e>=f+c?this.addSegment(m[s].v[r-1],m[s].o[r-1],m[s].i[0],m[s].v[0],i,o):(p=bez.getNewSegment(m[s].v[r-1],m[s].v[0],m[s].o[r-1],m[s].i[0],(e.s-f)/c,(e.e-f)/c,h[r-1]),this.addSegment(p.pt1,p.pt3,p.pt4,p.pt2,i,o))}}return i},ShapeModifiers.registerModifier("tm",TrimModifier),extendPrototype(ShapeModifier,RoundCornersModifier),RoundCornersModifier.prototype.processKeys=function(t){if(this.elem.globalData.frameId!==this.frameId||t){this.mdf=t?!0:!1,this.frameId=this.elem.globalData.frameId;var e,i=this.dynamicProperties.length;for(e=0;i>e;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e].mdf&&(this.mdf=!0)}},RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this.dynamicProperties),this.dynamicProperties.length||this.getValue(!0)},RoundCornersModifier.prototype.processPath=function(t,e){var i,s,r,a,n,o,h,p,l,m,d=t.v.length,f=[],c=[],u=[];for(i=0;d>i;i+=1)s=t.v[i],a=t.o[i],r=t.i[i],s[0]===a[0]&&s[1]===a[1]&&s[0]===r[0]&&s[1]===r[1]?0!==i&&i!==d-1||t.c?(n=0===i?t.v[d-1]:t.v[i-1],l=Math.sqrt(Math.pow(s[0]-n[0],2)+Math.pow(s[1]-n[1],2)),m=Math.min(l/2,e)/l,o=[s[0]+(n[0]-s[0])*m,s[1]-(s[1]-n[1])*m],p=o,h=[o[0]-(o[0]-s[0])*roundCorner,o[1]-(o[1]-s[1])*roundCorner],f.push(o),c.push(h),u.push(p),n=i===d-1?t.v[0]:t.v[i+1],l=Math.sqrt(Math.pow(s[0]-n[0],2)+Math.pow(s[1]-n[1],2)),m=Math.min(l/2,e)/l,o=[s[0]+(n[0]-s[0])*m,s[1]+(n[1]-s[1])*m],p=[o[0]-(o[0]-s[0])*roundCorner,o[1]-(o[1]-s[1])*roundCorner],h=o,f.push(o),c.push(h),u.push(p)):(f.push(s),c.push(a),u.push(r)):(f.push(t.v[i]),c.push(t.o[i]),u.push(t.i[i]));return{v:f,o:c,i:u,c:t.c}},RoundCornersModifier.prototype.processShapes=function(){var t,e,i,s,r=this.shapes.length,a=this.rd.v;if(0!==a){var n,o=[];for(e=0;r>e;e+=1)if(n=this.shapes[e],n.shape.mdf||this.mdf){for(n.shape.mdf=!0,t=n.shape.paths,s=t.length,i=0;s>i;i+=1)o.push(this.processPath(t[i],a));n.shape.paths=o,n.last=o}else n.shape.paths=n.last}this.dynamicProperties.length||(this.mdf=!1)},ShapeModifiers.registerModifier("rd",RoundCornersModifier),SVGRenderer.prototype.createItem=function(t,e,i,s){switch(t.ty){case 2:return this.createImage(t,e,i,s);case 0:return this.createComp(t,e,i,s);case 1:return this.createSolid(t,e,i,s);case 4:return this.createShape(t,e,i,s);case 5:return this.createText(t,e,i,s);case 99:return this.createPlaceHolder(t,e)}return this.createBase(t,e,i)},SVGRenderer.prototype.buildItems=function(t,e,i,s,r){var a,n=t.length;i||(i=this.elements),e||(e=this.animationItem.container),s||(s=this);var o;for(a=n-1;a>=0;a--)i[a]=this.createItem(t[a],e,s,r),0===t[a].ty&&(o=[],this.buildItems(t[a].layers,i[a].getDomElement(),o,i[a],i[a].placeholder),i[a].setElements(o)),t[a].td&&i[a+1].setMatte(i[a].layerId)},SVGRenderer.prototype.includeLayers=function(t,e,i){var s,r=t.length;i||(i=this.elements),e||(e=this.animationItem.container);var a,n,o,h=i.length;for(s=0;r>s;s+=1)for(a=0;h>a;){if(i[a].data.id==t[s].id){o=i[a],i[a]=this.createItem(t[s],e,this,o),0===t[s].ty&&(n=[],this.buildItems(t[s].layers,i[a].getDomElement(),n,i[a],i[s].placeholder),i[a].setElements(n));break}a+=1}for(s=0;r>s;s+=1)t[s].td&&i[s+1].setMatte(i[s].layerId)},SVGRenderer.prototype.createBase=function(t,e,i,s){return new SVGBaseElement(t,e,this.globalData,i,s)},SVGRenderer.prototype.createPlaceHolder=function(t,e){return new PlaceHolderElement(t,e,this.globalData)},SVGRenderer.prototype.createShape=function(t,e,i,s){return new IShapeElement(t,e,this.globalData,i,s)},SVGRenderer.prototype.createText=function(t,e,i,s){return new SVGTextElement(t,e,this.globalData,i,s)},SVGRenderer.prototype.createImage=function(t,e,i,s){return new IImageElement(t,e,this.globalData,i,s)},SVGRenderer.prototype.createComp=function(t,e,i,s){return new ICompElement(t,e,this.globalData,i,s)},SVGRenderer.prototype.createSolid=function(t,e,i,s){return new ISolidElement(t,e,this.globalData,i,s)},SVGRenderer.prototype.configAnimation=function(t){this.animationItem.container=document.createElementNS(svgNS,"svg"),this.animationItem.container.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.animationItem.container.setAttribute("width",t.w),this.animationItem.container.setAttribute("height",t.h),this.animationItem.container.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.animationItem.container.setAttribute("preserveAspectRatio","xMidYMid meet"),this.animationItem.container.style.width="100%",this.animationItem.container.style.height="100%",this.animationItem.container.style.transform="translate3d(0,0,0)",this.animationItem.container.style.transformOrigin=this.animationItem.container.style.mozTransformOrigin=this.animationItem.container.style.webkitTransformOrigin=this.animationItem.container.style["-webkit-transform"]="0px 0px 0px",this.animationItem.wrapper.appendChild(this.animationItem.container);var e=document.createElementNS(svgNS,"defs");this.globalData.defs=e,this.animationItem.container.appendChild(e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getPath=this.animationItem.getPath.bind(this.animationItem),this.globalData.elementLoaded=this.animationItem.elementLoaded.bind(this.animationItem),this.globalData.frameId=0,this.globalData.compSize={w:t.w,h:t.h},this.globalData.frameRate=t.fr;var i=document.createElementNS(svgNS,"clipPath"),s=document.createElementNS(svgNS,"rect");s.setAttribute("width",t.w),s.setAttribute("height",t.h),s.setAttribute("x",0),s.setAttribute("y",0);var r="animationMask_"+randomString(10);i.setAttribute("id",r),i.appendChild(s);var a=document.createElementNS(svgNS,"g");a.setAttribute("clip-path","url(#"+r+")"),this.animationItem.container.appendChild(a),e.appendChild(i),this.animationItem.container=a,this.layers=t.layers,this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e)},SVGRenderer.prototype.buildStage=function(t,e,i){var s,r,a=e.length;for(i||(i=this.elements),s=a-1;s>=0;s--)r=e[s],void 0!==r.parent&&this.buildItemParenting(r,i[s],e,r.parent,i,!0),0===r.ty&&this.buildStage(i[s].getComposingElement(),r.layers,i[s].getElements())},SVGRenderer.prototype.buildItemParenting=function(t,e,i,s,r,a){t.parents||(t.parents=[]),a&&e.resetHierarchy();for(var n=0,o=i.length;o>n;)i[n].ind==s&&(e.getHierarchy().push(r[n]),void 0!==i[n].parent&&this.buildItemParenting(t,e,i,i[n].parent,r,!1)),n+=1},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper.innerHTML="",this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers.length;for(t=0;e>t;t++)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0},SVGRenderer.prototype.updateContainerSize=function(){},SVGRenderer.prototype.renderFrame=function(t){if(this.renderedFrame!=t&&!this.destroyed){null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1;var e,i=this.layers.length;for(e=i-1;e>=0;e--)this.elements[e].prepareFrame(t-this.layers[e].st);for(e=i-1;e>=0;e--)this.elements[e].renderFrame()}},SVGRenderer.prototype.hide=function(){this.animationItem.container.style.display="none"},SVGRenderer.prototype.show=function(){this.animationItem.container.style.display="block"},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.prepareFrame=function(){var t,e=this.dynamicProperties.length;for(t=0;e>t;t+=1)this.dynamicProperties[t].getValue()},MaskElement.prototype.renderFrame=function(){var t,e=this.masksProperties.length;for(t=0;e>t;t++)if("n"!==this.masksProperties[t].mode&&this.masksProperties[t].cl!==!1&&((this.viewData[t].prop.mdf||this.firstFrame)&&this.drawPath(this.masksProperties[t],this.viewData[t].prop.v,this.viewData[t]),this.storedData[t].x&&(this.storedData[t].x.mdf||this.firstFrame))){var i=this.storedData[t].expan;this.storedData[t].x.v<0?("erode"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="erode",this.storedData[t].elem.setAttribute("filter","url(#"+this.storedData[t].filterId+")")),i.setAttribute("radius",-this.storedData[t].x.v)):("dilate"!==this.storedData[t].lastOperator&&(this.storedData[t].lastOperator="dilate",this.storedData[t].elem.setAttribute("filter",null)),this.storedData[t].elem.setAttribute("stroke-width",2*this.storedData[t].x.v))}this.firstFrame=!1},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,t+=" h-"+this.globalData.compSize.w,t+=" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,i){var s,r,a="";for(r=e.v.length,s=1;r>s;s+=1)1==s&&(a+=" M"+bm_rnd(e.v[0][0])+","+bm_rnd(e.v[0][1])),a+=" C"+bm_rnd(e.o[s-1][0])+","+bm_rnd(e.o[s-1][1])+" "+bm_rnd(e.i[s][0])+","+bm_rnd(e.i[s][1])+" "+bm_rnd(e.v[s][0])+","+bm_rnd(e.v[s][1]);t.cl&&(a+=" C"+bm_rnd(e.o[s-1][0])+","+bm_rnd(e.o[s-1][1])+" "+bm_rnd(e.i[0][0])+","+bm_rnd(e.i[0][1])+" "+bm_rnd(e.v[0][0])+","+bm_rnd(e.v[0][1])),i.lastPath!==a&&(t.inv?i.elem.setAttribute("d",this.solidPath+a):i.elem.setAttribute("d",a),i.lastPath=a)},MaskElement.prototype.getMask=function(t){for(var e=0,i=this.masksProperties.length;i>e;){if(this.masksProperties[e].nm===t)return{maskPath:this.viewData[e].prop.pv};e+=1}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.paths=null,this.masksProperties=null},BaseElement.prototype.checkMasks=function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;e>t;){if("n"!==this.data.masksProperties[t].mode&&this.data.masksProperties[t].cl!==!1)return!0;t+=1}return!1},BaseElement.prototype.prepareFrame=function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isVisible!==!0&&(this.isVisible=!0,this.firstFrame=!0,this.data.hasMask&&(this.maskManager.firstFrame=!0)):this.isVisible!==!1&&(this.isVisible=!1);var e,i=this.dynamicProperties.length;for(e=0;i>e;e+=1)this.dynamicProperties[e].getValue();return this.data.hasMask&&this.maskManager.prepareFrame(t),this.currentFrameNum=t,this.isVisible},BaseElement.prototype.init=function(){this.dynamicProperties=[],this.data.ef&&expressionsPlugin&&(this.effectsManager=expressionsPlugin.getEffectsManager(this.data,this,this.dynamicProperties),this.effect=this.effectsManager.bind(this.effectsManager)),this.hidden=!1,this.firstFrame=!0,this.isVisible=!1,this.currentFrameNum=-99999,this.lastNum=-99999,11===this.data.ty||(this.finalTransform={mProp:PropertyFactory.getProp(this,this.data.ks,2,null,this.dynamicProperties),matMdf:!1,opMdf:!1,mat:new Matrix,opacity:1},this.finalTransform.op=this.finalTransform.mProp.o,this.transform=this.finalTransform.mProp,this.createElements(),
this.data.hasMask&&this.addMasks(this.data))},BaseElement.prototype.getType=function(){return this.type},BaseElement.prototype.resetHierarchy=function(){this.hierarchy?this.hierarchy.length=0:this.hierarchy=[]},BaseElement.prototype.getHierarchy=function(){return this.hierarchy||(this.hierarchy=[]),this.hierarchy},BaseElement.prototype.getLayerSize=function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}},BaseElement.prototype.hide=function(){},BaseElement.prototype.mHelper=new Matrix,createElement(BaseElement,SVGBaseElement),SVGBaseElement.prototype.appendNodeToParent=function(t){if(this.placeholder){var e=this.placeholder.phElement;e.parentNode.insertBefore(t,e)}else this.parentContainer.appendChild(t)},SVGBaseElement.prototype.createElements=function(){if(this.data.td){if(3==this.data.td)this.layerElement=document.createElementNS(svgNS,"mask"),this.layerElement.setAttribute("id",this.layerId),this.layerElement.setAttribute("mask-type","luminance"),this.globalData.defs.appendChild(this.layerElement);else if(2==this.data.td){var t=document.createElementNS(svgNS,"mask");t.setAttribute("id",this.layerId),t.setAttribute("mask-type","alpha");var e=document.createElementNS(svgNS,"g");t.appendChild(e),this.layerElement=document.createElementNS(svgNS,"g");var i=document.createElementNS(svgNS,"filter"),s=randomString(10);i.setAttribute("id",s),i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%");var r=document.createElementNS(svgNS,"feComponentTransfer");r.setAttribute("in","SourceGraphic"),i.appendChild(r);var a=document.createElementNS(svgNS,"feFuncA");a.setAttribute("type","table"),a.setAttribute("tableValues","1.0 0.0"),r.appendChild(a),this.globalData.defs.appendChild(i);var n=document.createElementNS(svgNS,"rect");n.setAttribute("width","100%"),n.setAttribute("height","100%"),n.setAttribute("x","0"),n.setAttribute("y","0"),n.setAttribute("fill","#ffffff"),n.setAttribute("opacity","0"),e.setAttribute("filter","url(#"+s+")"),e.appendChild(n),e.appendChild(this.layerElement),this.globalData.defs.appendChild(t)}else{this.layerElement=document.createElementNS(svgNS,"g");var o=document.createElementNS(svgNS,"mask");o.setAttribute("id",this.layerId),o.setAttribute("mask-type","alpha"),o.appendChild(this.layerElement),this.globalData.defs.appendChild(o)}this.data.hasMask&&(this.maskedElement=this.layerElement)}else this.data.hasMask?(this.layerElement=document.createElementNS(svgNS,"g"),this.data.tt?(this.matteElement=document.createElementNS(svgNS,"g"),this.matteElement.appendChild(this.layerElement),this.appendNodeToParent(this.matteElement)):this.appendNodeToParent(this.layerElement),this.maskedElement=this.layerElement):this.data.tt?(this.matteElement=document.createElementNS(svgNS,"g"),this.matteElement.setAttribute("id",this.layerId),this.appendNodeToParent(this.matteElement),this.layerElement=this.matteElement):this.layerElement=this.parentContainer;!this.data.ln&&!this.data.cl||4!==this.data.ty&&0!==this.data.ty||(this.layerElement===this.parentContainer&&(this.layerElement=document.createElementNS(svgNS,"g"),this.appendNodeToParent(this.layerElement)),this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl)),0!==this.data.ty||!this.finalTransform.op.k&&1===this.finalTransform.op.p||this.layerElement!==this.parentContainer||(this.layerElement=document.createElementNS(svgNS,"g"),this.appendNodeToParent(this.layerElement)),this.layerElement!==this.parentContainer&&(this.placeholder=null)},SVGBaseElement.prototype.renderFrame=function(t){if(3===this.data.ty)return!1;if(this.currentFrameNum===this.lastNum||!this.isVisible)return this.isVisible;this.lastNum=this.currentFrameNum,this.data.hasMask&&this.maskManager.renderFrame(),this.finalTransform.opMdf=this.finalTransform.op.mdf,this.finalTransform.matMdf=this.finalTransform.mProp.mdf,this.finalTransform.opacity=this.finalTransform.op.v,this.firstFrame&&(this.finalTransform.opMdf=!0,this.finalTransform.matMdf=!0);var e,i=this.finalTransform.mat;if(this.hierarchy){var s,r=this.hierarchy.length;for(e=this.finalTransform.mProp.v.props,i.cloneFromProps(e),s=0;r>s;s+=1)this.finalTransform.matMdf=this.hierarchy[s].finalTransform.mProp.mdf?!0:this.finalTransform.matMdf,e=this.hierarchy[s].finalTransform.mProp.v.props,i.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}else this.isVisible&&(t?(e=this.finalTransform.mProp.v.props,i.cloneFromProps(e)):i.cloneFromProps(this.finalTransform.mProp.v.props));return t&&(e=t.mat.props,i.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]),this.finalTransform.opacity*=t.opacity,this.finalTransform.opMdf=t.opMdf?!0:this.finalTransform.opMdf,this.finalTransform.matMdf=t.matMdf?!0:this.finalTransform.matMdf),this.data.hasMask?(this.finalTransform.matMdf&&this.layerElement.setAttribute("transform",i.to2dCSS()),this.finalTransform.opMdf&&this.layerElement.setAttribute("opacity",this.finalTransform.opacity)):0===this.data.ty&&this.finalTransform.opMdf&&(this.finalTransform.op.k||1!==this.finalTransform.op.p)&&(this.layerElement.setAttribute("opacity",this.finalTransform.opacity),this.finalTransform.opacity=1),this.isVisible},SVGBaseElement.prototype.destroy=function(){this.layerElement=null,this.parentContainer=null,this.matteElement&&(this.matteElement=null),this.maskManager&&this.maskManager.destroy()},SVGBaseElement.prototype.getDomElement=function(){return this.layerElement},SVGBaseElement.prototype.addMasks=function(t){this.maskManager=new MaskElement(t,this,this.globalData)},SVGBaseElement.prototype.setMatte=function(t){this.matteElement&&this.matteElement.setAttribute("mask","url(#"+t+")")},SVGBaseElement.prototype.hide=function(){},ITextElement.prototype.init=function(){this._parent.init.call(this),this.lettersChangedFlag=!1;var t=this.data;this.renderedLetters=Array.apply(null,{length:t.t.d.l.length}),this.viewData={m:{a:PropertyFactory.getProp(this,t.t.m.a,1,0,this.dynamicProperties)}};var e=this.data.t;if(e.a.length){this.viewData.a=Array.apply(null,{length:e.a.length});var i,s,r,a=e.a.length;for(i=0;a>i;i+=1)r=e.a[i],s={a:{},s:{}},"r"in r.a&&(s.a.r=PropertyFactory.getProp(this,r.a.r,0,degToRads,this.dynamicProperties)),"rx"in r.a&&(s.a.rx=PropertyFactory.getProp(this,r.a.rx,0,degToRads,this.dynamicProperties)),"ry"in r.a&&(s.a.ry=PropertyFactory.getProp(this,r.a.ry,0,degToRads,this.dynamicProperties)),"sk"in r.a&&(s.a.sk=PropertyFactory.getProp(this,r.a.sk,0,degToRads,this.dynamicProperties)),"sa"in r.a&&(s.a.sa=PropertyFactory.getProp(this,r.a.sa,0,degToRads,this.dynamicProperties)),"s"in r.a&&(s.a.s=PropertyFactory.getProp(this,r.a.s,1,.01,this.dynamicProperties)),"a"in r.a&&(s.a.a=PropertyFactory.getProp(this,r.a.a,1,0,this.dynamicProperties)),"o"in r.a&&(s.a.o=PropertyFactory.getProp(this,r.a.o,0,.01,this.dynamicProperties)),"p"in r.a&&(s.a.p=PropertyFactory.getProp(this,r.a.p,1,0,this.dynamicProperties)),"sw"in r.a&&(s.a.sw=PropertyFactory.getProp(this,r.a.sw,0,0,this.dynamicProperties)),"sc"in r.a&&(s.a.sc=PropertyFactory.getProp(this,r.a.sc,1,0,this.dynamicProperties)),"fc"in r.a&&(s.a.fc=PropertyFactory.getProp(this,r.a.fc,1,0,this.dynamicProperties)),"fh"in r.a&&(s.a.fh=PropertyFactory.getProp(this,r.a.fh,0,0,this.dynamicProperties)),"fs"in r.a&&(s.a.fs=PropertyFactory.getProp(this,r.a.fs,0,.01,this.dynamicProperties)),"fb"in r.a&&(s.a.fb=PropertyFactory.getProp(this,r.a.fb,0,.01,this.dynamicProperties)),"t"in r.a&&(s.a.t=PropertyFactory.getProp(this,r.a.t,0,0,this.dynamicProperties)),s.s=PropertyFactory.getTextSelectorProp(this,r.s,this.dynamicProperties),s.s.t=r.s.t,this.viewData.a[i]=s}else this.viewData.a=[];e.p&&"m"in e.p?(this.viewData.p={f:PropertyFactory.getProp(this,e.p.f,0,0,this.dynamicProperties),l:PropertyFactory.getProp(this,e.p.l,0,0,this.dynamicProperties),r:e.p.r,m:this.maskManager.getMaskProperty(e.p.m)},this.maskPath=!0):this.maskPath=!1},ITextElement.prototype.createPathShape=function(t,e){var i,s,r,a,n=e.length,o="";for(i=0;n>i;i+=1){for(r=e[i].ks.k.i.length,a=e[i].ks.k,s=1;r>s;s+=1)1==s&&(o+=" M"+t.applyToPointStringified(a.v[0][0],a.v[0][1])),o+=" C"+t.applyToPointStringified(a.o[s-1][0],a.o[s-1][1])+" "+t.applyToPointStringified(a.i[s][0],a.i[s][1])+" "+t.applyToPointStringified(a.v[s][0],a.v[s][1]);o+=" C"+t.applyToPointStringified(a.o[s-1][0],a.o[s-1][1])+" "+t.applyToPointStringified(a.i[0][0],a.i[0][1])+" "+t.applyToPointStringified(a.v[0][0],a.v[0][1]),o+="z"}return o},ITextElement.prototype.getMeasures=function(){var t,e,i,s,r=this.mHelper,a=this.renderType,n=this.data,o=n.t.d,h=o.l;if(this.maskPath){var p=this.viewData.p.m;if(!this.viewData.p.n||this.viewData.p.mdf){var l=p.v;this.viewData.p.r&&(l=reversePath(l,p.closed));var m={tLength:0,segments:[]};s=l.v.length-1;var d,f=0;for(i=0;s>i;i+=1)d={s:l.v[i],e:l.v[i+1],to:[l.o[i][0]-l.v[i][0],l.o[i][1]-l.v[i][1]],ti:[l.i[i+1][0]-l.v[i+1][0],l.i[i+1][1]-l.v[i+1][1]]},bez.buildBezierData(d),m.tLength+=d.bezierData.segmentLength,m.segments.push(d),f+=d.bezierData.segmentLength;i=s,p.closed&&(d={s:l.v[i],e:l.v[0],to:[l.o[i][0]-l.v[i][0],l.o[i][1]-l.v[i][1]],ti:[l.i[0][0]-l.v[0][0],l.i[0][1]-l.v[0][1]]},bez.buildBezierData(d),m.tLength+=d.bezierData.segmentLength,m.segments.push(d),f+=d.bezierData.segmentLength),this.viewData.p.pi=m}var c,u,y,m=this.viewData.p.pi,v=this.viewData.p.f.v,g=0,b=1,P=0,S=!0,k=m.segments;if(0>v&&p.closed)for(m.tLength<Math.abs(v)&&(v=-Math.abs(v)%m.tLength),g=k.length-1,y=k[g].bezierData.points,b=y.length-1;0>v;)v+=y[b].partialLength,b-=1,0>b&&(g-=1,y=k[g].bezierData.points,b=y.length-1);y=k[g].bezierData.points,u=y[b-1],c=y[b];var E,M,F=c.partialLength}s=h.length,t=0,e=0;var w,A,I,T,D,C=1.2*n.t.d.s*.714,x=!0,_=this.viewData,N=Array.apply(null,{length:s});this.lettersChangedFlag=!1,T=_.a.length;var L,V,R,B,z,G,j,O,H,W,q,X,Y,Z,U,J,K=-1,Q=v,$=g,tt=b,et=-1,it=0;for(i=0;s>i;i+=1)if(r.reset(),G=1,h[i].n)t=0,e+=o.yOffset,e+=x?1:0,v=Q,x=!1,it=0,this.maskPath&&(g=$,b=tt,y=k[g].bezierData.points,u=y[b-1],c=y[b],F=c.partialLength,P=0),N[i]=this.emptyProp;else{if(this.maskPath){if(et!==h[i].line){switch(o.j){case 1:v+=f-o.lineWidths[h[i].line];break;case 2:v+=(f-o.lineWidths[h[i].line])/2}et=h[i].line}K!==h[i].ind&&(h[K]&&(v+=h[K].extra),v+=h[i].an/2,K=h[i].ind),v+=_.m.a.v[0]*h[i].an/200;var st=0;for(I=0;T>I;I+=1)w=_.a[I].a,"p"in w&&(A=_.a[I].s,V=A.getMult(h[i].anIndexes[I],n.t.a[I].s.totalChars),st+=V.length?w.p.v[0]*V[0]:w.p.v[0]*V);for(S=!0;S;)P+F>=v+st||!y?(E=(v+st-P)/c.partialLength,B=u.point[0]+(c.point[0]-u.point[0])*E,z=u.point[1]+(c.point[1]-u.point[1])*E,r.translate(0,-(_.m.a.v[1]*C/100)+e),S=!1):y&&(P+=c.partialLength,b+=1,b>=y.length&&(b=0,g+=1,k[g]?y=k[g].bezierData.points:p.closed?(b=0,g=0,y=k[g].bezierData.points):(P-=c.partialLength,y=null)),y&&(u=c,c=y[b],F=c.partialLength));R=h[i].an/2-h[i].add,r.translate(-R,0,0)}else R=h[i].an/2-h[i].add,r.translate(-R,0,0),r.translate(-_.m.a.v[0]*h[i].an/200,-_.m.a.v[1]*C/100,0);for(it+=h[i].l/2,I=0;T>I;I+=1)w=_.a[I].a,"t"in w&&(A=_.a[I].s,V=A.getMult(h[i].anIndexes[I],n.t.a[I].s.totalChars),this.maskPath?v+=V.length?w.t*V[0]:w.t*V:t+=V.length?w.t.v*V[0]:w.t.v*V);for(it+=h[i].l/2,o.strokeWidthAnim&&(O=n.t.d.sw||0),o.strokeColorAnim&&(j=n.t.d.sc?[n.t.d.sc[0],n.t.d.sc[1],n.t.d.sc[2]]:[0,0,0]),o.fillColorAnim&&(H=[n.t.d.fc[0],n.t.d.fc[1],n.t.d.fc[2]]),I=0;T>I;I+=1)w=_.a[I].a,"a"in w&&(A=_.a[I].s,V=A.getMult(h[i].anIndexes[I],n.t.a[I].s.totalChars),V.length?r.translate(-w.a.v[0]*V[0],-w.a.v[1]*V[1],w.a.v[2]*V[2]):r.translate(-w.a.v[0]*V,-w.a.v[1]*V,w.a.v[2]*V));for(I=0;T>I;I+=1)w=_.a[I].a,"s"in w&&(A=_.a[I].s,V=A.getMult(h[i].anIndexes[I],n.t.a[I].s.totalChars),V.length?r.scale(1+(w.s.v[0]-1)*V[0],1+(w.s.v[1]-1)*V[1],1):r.scale(1+(w.s.v[0]-1)*V,1+(w.s.v[1]-1)*V,1));for(I=0;T>I;I+=1){if(w=_.a[I].a,A=_.a[I].s,V=A.getMult(h[i].anIndexes[I],n.t.a[I].s.totalChars),"sk"in w&&(V.length?r.skewFromAxis(-w.sk.v*V[0],w.sa.v*V[1]):r.skewFromAxis(-w.sk.v*V,w.sa.v*V)),"r"in w&&r.rotateZ(V.length?-w.r.v*V[2]:-w.r.v*V),"ry"in w&&r.rotateY(V.length?w.ry.v*V[1]:w.ry.v*V),"rx"in w&&r.rotateX(V.length?w.rx.v*V[0]:w.rx.v*V),"o"in w&&(G+=V.length?(w.o.v*V[0]-G)*V[0]:(w.o.v*V-G)*V),o.strokeWidthAnim&&"sw"in w&&(O+=V.length?w.sw.v*V[0]:w.sw.v*V),o.strokeColorAnim&&"sc"in w)for(W=0;3>W;W+=1)j[W]=Math.round(V.length?255*(j[W]+(w.sc.v[W]-j[W])*V[0]):255*(j[W]+(w.sc.v[W]-j[W])*V));if(o.fillColorAnim){if("fc"in w)for(W=0;3>W;W+=1)H[W]=V.length?H[W]+(w.fc.v[W]-H[W])*V[0]:H[W]+(w.fc.v[W]-H[W])*V;"fh"in w&&(H=V.length?addHueToRGB(H,w.fh.v*V[0]):addHueToRGB(H,w.fh.v*V)),"fs"in w&&(H=V.length?addSaturationToRGB(H,w.fs.v*V[0]):addSaturationToRGB(H,w.fs.v*V)),"fb"in w&&(H=V.length?addBrightnessToRGB(H,w.fb.v*V[0]):addBrightnessToRGB(H,w.fb.v*V))}}for(I=0;T>I;I+=1)w=_.a[I].a,"p"in w&&(A=_.a[I].s,V=A.getMult(h[i].anIndexes[I],n.t.a[I].s.totalChars),this.maskPath?V.length?r.translate(0,w.p.v[1]*V[0],-w.p.v[2]*V[1]):r.translate(0,w.p.v[1]*V,-w.p.v[2]*V):V.length?r.translate(w.p.v[0]*V[0],w.p.v[1]*V[1],-w.p.v[2]*V[2]):r.translate(w.p.v[0]*V,w.p.v[1]*V,-w.p.v[2]*V));if(o.strokeWidthAnim&&(q=0>O?0:O),o.strokeColorAnim&&(X="rgb("+Math.round(255*j[0])+","+Math.round(255*j[1])+","+Math.round(255*j[2])+")"),o.fillColorAnim&&(Y="rgb("+Math.round(255*H[0])+","+Math.round(255*H[1])+","+Math.round(255*H[2])+")"),this.maskPath){if(n.t.p.p){M=(c.point[1]-u.point[1])/(c.point[0]-u.point[0]);var rt=180*Math.atan(M)/Math.PI;c.point[0]<u.point[0]&&(rt+=180),r.rotate(-rt*Math.PI/180)}r.translate(B,z,0),r.translate(_.m.a.v[0]*h[i].an/200,_.m.a.v[1]*C/100,0),v-=_.m.a.v[0]*h[i].an/200,h[i+1]&&K!==h[i+1].ind&&(v+=h[i].an/2,v+=o.tr/1e3*n.t.d.s)}else{switch(r.translate(t,e,0),o.ps&&r.translate(o.ps[0],o.ps[1]+o.ascent,0),o.j){case 1:r.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[i].line]),0,0);break;case 2:r.translate(o.justifyOffset+(o.boxWidth-o.lineWidths[h[i].line])/2,0,0)}r.translate(R,0,0),r.translate(_.m.a.v[0]*h[i].an/200,_.m.a.v[1]*C/100,0),t+=h[i].l+o.tr/1e3*n.t.d.s}"html"===a?Z=r.toCSS():"svg"===a?Z=r.to2dCSS():U=[r.props[0],r.props[1],r.props[2],r.props[3],r.props[4],r.props[5],r.props[6],r.props[7],r.props[8],r.props[9],r.props[10],r.props[11],r.props[12],r.props[13],r.props[14],r.props[15]],J=G,L=this.renderedLetters[i],!L||L.o===J&&L.sw===q&&L.sc===X&&L.fc===Y?"svg"!==a&&"html"!==a||L&&L.m===Z?"canvas"!==a||L&&L.props[0]===U[0]&&L.props[1]===U[1]&&L.props[4]===U[4]&&L.props[5]===U[5]&&L.props[12]===U[12]&&L.props[13]===U[13]?D=L:(this.lettersChangedFlag=!0,D=new LetterProps(J,q,X,Y,null,U)):(this.lettersChangedFlag=!0,D=new LetterProps(J,q,X,Y,Z)):(this.lettersChangedFlag=!0,D=new LetterProps(J,q,X,Y,Z,U)),this.renderedLetters[i]=D}},ITextElement.prototype.emptyProp=new LetterProps,createElement(SVGBaseElement,SVGTextElement),SVGTextElement.prototype.init=ITextElement.prototype.init,SVGTextElement.prototype.createPathShape=ITextElement.prototype.createPathShape,SVGTextElement.prototype.getMeasures=ITextElement.prototype.getMeasures,SVGTextElement.prototype.createElements=function(){this._parent.createElements.call(this);var t=this.data.t.d;this.innerElem=document.createElementNS(svgNS,"g"),t.fc?this.innerElem.setAttribute("fill","rgb("+Math.round(255*t.fc[0])+","+Math.round(255*t.fc[1])+","+Math.round(255*t.fc[2])+")"):this.innerElem.setAttribute("fill","rgba(0,0,0,0)"),t.sc&&(this.innerElem.setAttribute("stroke","rgb("+Math.round(255*t.sc[0])+","+Math.round(255*t.sc[1])+","+Math.round(255*t.sc[2])+")"),this.innerElem.setAttribute("stroke-width",t.sw)),this.innerElem.setAttribute("font-size",t.s);var e=this.globalData.fontManager.getFontByName(t.f);if(e.fClass)this.innerElem.setAttribute("class",e.fClass);else{this.innerElem.setAttribute("font-family",e.fFamily);var i=t.fWeight,s=t.fStyle;this.innerElem.setAttribute("font-style",s),this.innerElem.setAttribute("font-weight",i)}var r,a;this.layerElement===this.parentContainer?this.appendNodeToParent(this.innerElem):this.layerElement.appendChild(this.innerElem);var n=t.l;if(a=n.length){var o,h,p=this.mHelper,l="",m=this.data.singleShape;if(m)var d=0,f=0,c=t.lineWidths,u=t.boxWidth,y=!0;for(r=0;a>r;r+=1){if(this.globalData.fontManager.chars?m&&0!==r||(o=document.createElementNS(svgNS,"path")):o=document.createElementNS(svgNS,"text"),o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),m&&n[r].n&&(d=0,f+=t.yOffset,f+=y?1:0,y=!1),p.reset(),this.globalData.fontManager.chars&&p.scale(t.s/100,t.s/100),m){switch(t.ps&&p.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:p.translate(t.justifyOffset+(u-c[n[r].line]),0,0);break;case 2:p.translate(t.justifyOffset+(u-c[n[r].line])/2,0,0)}p.translate(d,f,0)}if(this.globalData.fontManager.chars){var v,g=this.globalData.fontManager.getCharData(t.t.charAt(r),e.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);v=g?g.data:null,v&&v.shapes&&(h=v.shapes[0].it,m||(l=""),l+=this.createPathShape(p,h),m||o.setAttribute("d",l)),m||this.innerElem.appendChild(o)}else o.textContent=n[r].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.innerElem.appendChild(o),m&&o.setAttribute("transform",p.to2dCSS());m&&(d+=n[r].l),this.textSpans.push(o)}this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.data.cl&&this.innerElem.setAttribute("class",this.data.cl),m&&this.globalData.fontManager.chars&&(o.setAttribute("d",l),this.innerElem.appendChild(o))}},SVGTextElement.prototype.hide=function(){this.hidden||(this.innerElem.style.display="none",this.hidden=!0)},SVGTextElement.prototype.renderFrame=function(t){var e=this._parent.renderFrame.call(this,t);if(e===!1)return void this.hide();if(this.hidden&&(this.hidden=!1,this.innerElem.style.display="block"),this.data.hasMask||(this.finalTransform.matMdf&&this.innerElem.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform.opMdf&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),!this.data.singleShape&&(this.getMeasures(),this.lettersChangedFlag)){var i,s,r=this.renderedLetters,a=this.data.t.d.l;s=a.length;var n;for(i=0;s>i;i+=1)a[i].n||(n=r[i],this.textSpans[i].setAttribute("transform",n.m),this.textSpans[i].setAttribute("opacity",n.o),n.sw&&this.textSpans[i].setAttribute("stroke-width",n.sw),n.sc&&this.textSpans[i].setAttribute("stroke",n.sc),n.fc&&this.textSpans[i].setAttribute("fill",n.fc));this.firstFrame&&(this.firstFrame=!1)}},SVGTextElement.prototype.destroy=function(){this._parent.destroy.call(),this.innerElem=null};var PlaceHolderElement=function(t,e,i){if(this.data=t,this.globalData=i,e){this.parentContainer=e;var s=document.createElementNS(svgNS,"g");s.setAttribute("id",this.data.id),e.appendChild(s),this.phElement=s}this.layerId="ly_"+randomString(10)};PlaceHolderElement.prototype.prepareFrame=function(){},PlaceHolderElement.prototype.renderFrame=function(){},PlaceHolderElement.prototype.draw=function(){},createElement(SVGBaseElement,ICompElement),ICompElement.prototype.getComposingElement=function(){return this.layerElement},ICompElement.prototype.hide=function(){if(!this.hidden){var t,e=this.elements.length;for(t=0;e>t;t+=1)this.elements[t].hide();this.hidden=!0}},ICompElement.prototype.prepareFrame=function(t){if(this._parent.prepareFrame.call(this,t),this.isVisible!==!1){var e=t;this.tm&&(e=this.tm.v,e===this.data.op&&(e=this.data.op-1)),this.renderedFrame=e;var i,s=this.elements.length;for(i=0;s>i;i+=1)this.elements[i].prepareFrame(e-this.layers[i].st)}},ICompElement.prototype.renderFrame=function(t){var e,i=this._parent.renderFrame.call(this,t),s=this.layers.length;if(i===!1)return void this.hide();for(this.hidden=!1,e=0;s>e;e+=1)this.data.hasMask?this.elements[e].renderFrame():this.elements[e].renderFrame(this.finalTransform);this.firstFrame&&(this.firstFrame=!1)},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroy=function(){this._parent.destroy.call();var t,e=this.layers.length;for(t=0;e>t;t+=1)this.elements[t].destroy()},createElement(SVGBaseElement,IImageElement),IImageElement.prototype.createElements=function(){var t=this,e=function(){t.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t.path+t.assetData.p),t.maskedElement=t.innerElem},i=new Image;i.addEventListener("load",e,!1),i.addEventListener("error",e,!1),i.src=this.path+this.assetData.p,this._parent.createElements.call(this),this.innerElem=document.createElementNS(svgNS,"image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.layerElement===this.parentContainer?this.appendNodeToParent(this.innerElem):this.layerElement.appendChild(this.innerElem),this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.data.cl&&this.innerElem.setAttribute("class",this.data.cl)},IImageElement.prototype.hide=function(){this.hidden||(this.innerElem.setAttribute("visibility","hidden"),this.hidden=!0)},IImageElement.prototype.renderFrame=function(t){var e=this._parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden&&(this.hidden=!1,this.innerElem.setAttribute("visibility","visible")),this.data.hasMask||((this.finalTransform.matMdf||this.firstFrame)&&this.innerElem.setAttribute("transform",this.finalTransform.mat.to2dCSS()),(this.finalTransform.opMdf||this.firstFrame)&&this.innerElem.setAttribute("opacity",this.finalTransform.opacity)),void(this.firstFrame&&(this.firstFrame=!1)))},IImageElement.prototype.destroy=function(){this._parent.destroy.call(),this.innerElem=null},createElement(SVGBaseElement,IShapeElement),IShapeElement.prototype.lcEnum={1:"butt",2:"round",3:"butt"},IShapeElement.prototype.ljEnum={1:"miter",2:"round",3:"butt"},IShapeElement.prototype.buildExpressionInterface=function(){},IShapeElement.prototype.transformHelper={opacity:1,mat:new Matrix,matMdf:!1,opMdf:!1},IShapeElement.prototype.createElements=function(){this._parent.createElements.call(this),this.searchShapes(this.shapesData,this.viewData,this.dynamicProperties),this.layerElement.appendChild(this.shapesContainer),styleUnselectableDiv(this.layerElement),styleUnselectableDiv(this.shapesContainer)},IShapeElement.prototype.searchShapes=function(t,e,i){var s,r,a,n=t.length-1,o=[],h=[];for(s=n;s>=0;s-=1)if("fl"==t[s].ty||"st"==t[s].ty){e[s]={};var p;if(e[s].c=PropertyFactory.getProp(this,t[s].c,1,255,i),e[s].o=PropertyFactory.getProp(this,t[s].o,0,.01,i),"st"==t[s].ty){if(p=document.createElementNS(svgNS,"g"),p.setAttribute("stroke-linecap",this.lcEnum[t[s].lc]||"round"),p.setAttribute("stroke-linejoin",this.ljEnum[t[s].lj]||"round"),p.setAttribute("fill-opacity","0"),1==t[s].lj&&p.setAttribute("stroke-miterlimit",t[s].ml),e[s].c.k||p.setAttribute("stroke","rgb("+e[s].c.v[0]+","+e[s].c.v[1]+","+e[s].c.v[2]+")"),e[s].o.k||p.setAttribute("stroke-opacity",e[s].o.v),e[s].w=PropertyFactory.getProp(this,t[s].w,0,null,i),e[s].w.k||p.setAttribute("stroke-width",e[s].w.v),t[s].d){var l=PropertyFactory.getDashProp(this,t[s].d,"svg",i);l.k||(p.setAttribute("stroke-dasharray",l.dasharray),p.setAttribute("stroke-dashoffset",l.dashoffset)),e[s].d=l}}else p=document.createElementNS(svgNS,"path"),e[s].c.k||p.setAttribute("fill","rgb("+e[s].c.v[0]+","+e[s].c.v[1]+","+e[s].c.v[2]+")"),e[s].o.k||p.setAttribute("fill-opacity",e[s].o.v);t[s].ln&&p.setAttribute("id",t[s].ln),t[s].cl&&p.setAttribute("class",t[s].cl),this.shapesContainer.appendChild(p),this.stylesList.push({pathElement:p,type:t[s].ty,d:"",ld:"",mdf:!1}),e[s].style=this.stylesList[this.stylesList.length-1],o.push(e[s].style)}else if("gr"==t[s].ty)e[s]={it:[]},this.searchShapes(t[s].it,e[s].it,i);else if("tr"==t[s].ty)e[s]={transform:{mat:new Matrix,opacity:1,matMdf:!1,opMdf:!1,op:PropertyFactory.getProp(this,t[s].o,0,.01,i),mProps:PropertyFactory.getProp(this,t[s],2,null,i)},elements:[]};else if("sh"==t[s].ty||"rc"==t[s].ty||"el"==t[s].ty||"sr"==t[s].ty){e[s]={elements:[],styles:[],lStr:""};var m=4;"rc"==t[s].ty?m=5:"el"==t[s].ty?m=6:"sr"==t[s].ty&&(m=7),e[s].sh=ShapePropertyFactory.getShapeProp(this,t[s],m,i),this.shapes.push(e[s].sh),this.addShapeToModifiers(e[s].sh),a=this.stylesList.length;var d,f=!1,c=!1;for(r=0;a>r;r+=1)this.stylesList[r].closed||("st"===this.stylesList[r].type?(f=!0,d=document.createElementNS(svgNS,"path"),this.stylesList[r].pathElement.appendChild(d),e[s].elements.push({ty:this.stylesList[r].type,el:d})):(c=!0,e[s].elements.push({ty:this.stylesList[r].type,st:this.stylesList[r]})));e[s].st=f,e[s].fl=c}else if("tm"==t[s].ty||"rd"==t[s].ty){var u=ShapeModifiers.getModifier(t[s].ty);u.init(this,t[s],i),this.shapeModifiers.push(u),h.push(u),e[s]=u}for(n=o.length,s=0;n>s;s+=1)o[s].closed=!0;for(n=h.length,s=0;n>s;s+=1)h[s].closed=!0},IShapeElement.prototype.addShapeToModifiers=function(t){var e,i=this.shapeModifiers.length;for(e=0;i>e;e+=1)this.shapeModifiers[e].addShape(t)},IShapeElement.prototype.renderModifiers=function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;e>t;t+=1)this.shapes[t].reset();for(e=this.shapeModifiers.length,t=e-1;t>=0;t-=1)this.shapeModifiers[t].processShapes()}},IShapeElement.prototype.renderFrame=function(t){var e=this._parent.renderFrame.call(this,t);return e===!1?void this.hide():(this.hidden=!1,this.finalTransform.matMdf&&!this.data.hasMask&&this.shapesContainer.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.transformHelper.opacity=this.finalTransform.opacity,this.transformHelper.matMdf=!1,this.transformHelper.opMdf=this.finalTransform.opMdf,this.renderModifiers(),void this.renderShape(this.transformHelper,null,null,!0))},IShapeElement.prototype.hide=function(){if(!this.hidden){var t,e=this.stylesList.length;for(t=e-1;t>=0;t-=1)"0"!==this.stylesList[t].ld&&(this.stylesList[t].ld="0",this.stylesList[t].pathElement.style.display="none",this.stylesList[t].pathElement.parentNode&&(this.stylesList[t].parent=this.stylesList[t].pathElement.parentNode));this.hidden=!0}},IShapeElement.prototype.renderShape=function(t,e,i,s){var r,a;if(!e)for(e=this.shapesData,a=this.stylesList.length,r=0;a>r;r+=1)this.stylesList[r].d="",this.stylesList[r].mdf=!1;i||(i=this.viewData),a=e.length-1;var n,o;for(n=t,r=a;r>=0;r-=1)if("tr"==e[r].ty){n=i[r].transform;var h=i[r].transform.mProps.v.props;if(n.matMdf=n.mProps.mdf,n.opMdf=n.op.mdf,o=n.mat,o.cloneFromProps(h),t){var p=t.mat.props;n.opacity=t.opacity,n.opacity*=i[r].transform.op.v,n.matMdf=t.matMdf?!0:n.matMdf,n.opMdf=t.opMdf?!0:n.opMdf,o.transform(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],p[9],p[10],p[11],p[12],p[13],p[14],p[15])}else n.opacity=n.op.o}else"sh"==e[r].ty||"el"==e[r].ty||"rc"==e[r].ty||"sr"==e[r].ty?this.renderPath(e[r],i[r],n):"fl"==e[r].ty?this.renderFill(e[r],i[r],n):"st"==e[r].ty?this.renderStroke(e[r],i[r],n):"gr"==e[r].ty?this.renderShape(n,e[r].it,i[r].it):"tm"==e[r].ty;if(s){for(a=this.stylesList.length,r=0;a>r;r+=1)"0"===this.stylesList[r].ld&&(this.stylesList[r].ld="1",this.stylesList[r].pathElement.style.display="block"),"fl"===this.stylesList[r].type&&(this.stylesList[r].mdf||this.firstFrame)&&this.stylesList[r].pathElement.setAttribute("d",this.stylesList[r].d);this.firstFrame&&(this.firstFrame=!1)}},IShapeElement.prototype.renderPath=function(t,e,i){var s,r,a,n,o="",h=i.matMdf||e.sh.mdf||this.firstFrame;if(h){var p=e.sh.paths;for(n=p.length,a=0;n>a;a+=1){var l=p[a];if(l&&l.v){for(s=l.v.length,r=1;s>r;r+=1)1==r&&(o+=" M"+i.mat.applyToPointStringified(l.v[0][0],l.v[0][1])),o+=" C"+i.mat.applyToPointStringified(l.o[r-1][0],l.o[r-1][1])+" "+i.mat.applyToPointStringified(l.i[r][0],l.i[r][1])+" "+i.mat.applyToPointStringified(l.v[r][0],l.v[r][1]);1==s&&(o+=" M"+i.mat.applyToPointStringified(l.v[0][0],l.v[0][1])),l.c&&(o+=" C"+i.mat.applyToPointStringified(l.o[r-1][0],l.o[r-1][1])+" "+i.mat.applyToPointStringified(l.i[0][0],l.i[0][1])+" "+i.mat.applyToPointStringified(l.v[0][0],l.v[0][1]),o+="z"),e.lStr=o}}}else o=e.lStr;for(s=e.elements.length,r=0;s>r;r+=1)"st"===e.elements[r].ty?(i.matMdf||e.sh.mdf||this.firstFrame)&&e.elements[r].el.setAttribute("d",o):(e.elements[r].st.mdf=h?!0:e.elements[r].st.mdf,e.elements[r].st.d+=o)},IShapeElement.prototype.renderFill=function(t,e,i){var s=e.style;(e.c.mdf||this.firstFrame)&&s.pathElement.setAttribute("fill","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||i.opMdf||this.firstFrame)&&s.pathElement.setAttribute("fill-opacity",e.o.v*i.opacity)},IShapeElement.prototype.renderStroke=function(t,e,i){var s=e.style,r=e.d;r&&r.k&&(r.mdf||this.firstFrame)&&(s.pathElement.setAttribute("stroke-dasharray",r.dasharray),s.pathElement.setAttribute("stroke-dashoffset",r.dashoffset)),(e.c.mdf||this.firstFrame)&&s.pathElement.setAttribute("stroke","rgb("+bm_floor(e.c.v[0])+","+bm_floor(e.c.v[1])+","+bm_floor(e.c.v[2])+")"),(e.o.mdf||i.opMdf||this.firstFrame)&&s.pathElement.setAttribute("stroke-opacity",e.o.v*i.opacity),(e.w.mdf||this.firstFrame)&&s.pathElement.setAttribute("stroke-width",e.w.v)},IShapeElement.prototype.destroy=function(){this._parent.destroy.call(),this.shapeData=null,this.viewData=null,this.parentContainer=null,this.placeholder=null},createElement(SVGBaseElement,ISolidElement),ISolidElement.prototype.createElements=function(){this._parent.createElements.call(this);var t=document.createElementNS(svgNS,"rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement===this.parentContainer?this.appendNodeToParent(t):this.layerElement.appendChild(t),this.innerElem=t,this.data.ln&&this.innerElem.setAttribute("id",this.data.ln),this.data.cl&&this.innerElem.setAttribute("class",this.data.cl)},ISolidElement.prototype.hide=IImageElement.prototype.hide,ISolidElement.prototype.renderFrame=IImageElement.prototype.renderFrame,ISolidElement.prototype.destroy=IImageElement.prototype.destroy;var animationManager=function(){function t(e){var i=0,s=e.target;for(s.removeEventListener("destroy",t);S>i;)g[i].animation===s&&(g.splice(i,1),i-=1,S-=1),i+=1}function e(e,i){if(!e)return null;for(var s=0;S>s;){if(g[s].elem==e&&null!==g[s].elem)return g[s].animation;s+=1}var r=new AnimationItem;return r.setData(e,i),r.addEventListener("destroy",t),g.push({elem:e,animation:r}),S+=1,r}function i(e){var i=new AnimationItem;return i.setParams(e),i.addEventListener("destroy",t),g.push({elem:null,animation:i}),S+=1,i}function s(t,e){var i;for(i=0;S>i;i+=1)g[i].animation.setSpeed(t,e)}function r(t,e){var i;for(i=0;S>i;i+=1)g[i].animation.setDirection(t,e)}function a(t){var e;for(e=0;S>e;e+=1)g[e].animation.play(t)}function n(t,e){P=!1,b=Date.now();var i;for(i=0;S>i;i+=1)g[i].animation.moveFrame(t,e)}function o(t){var e,i=t-b;for(e=0;S>e;e+=1)g[e].animation.advanceTime(i);b=t,requestAnimationFrame(o)}function h(t){b=t,requestAnimationFrame(o)}function p(t){var e;for(e=0;S>e;e+=1)g[e].animation.pause(t)}function l(t,e,i){var s;for(s=0;S>s;s+=1)g[s].animation.goToAndStop(t,e,i)}function m(t){var e;for(e=0;S>e;e+=1)g[e].animation.stop(t)}function d(t){var e;for(e=0;S>e;e+=1)g[e].animation.togglePause(t)}function f(t){var e;for(e=0;S>e;e+=1)g[e].animation.destroy(t)}function c(t,i,s){var r,a=document.getElementsByClassName("bodymovin"),n=a.length;for(r=0;n>r;r+=1)s&&a[r].setAttribute("data-bm-type",s),e(a[r],t);if(i&&0===n){s||(s="svg");var o=document.getElementsByTagName("body")[0];o.innerHTML="";var h=document.createElement("div");h.style.width="100%",h.style.height="100%",h.setAttribute("data-bm-type",s),o.appendChild(h),e(h,t)}}function u(){var t;for(t=0;S>t;t+=1)g[t].animation.resize()}function y(){requestAnimationFrame(h)}var v={},g=[],b=0,P=!0,S=0;return setTimeout(y,0),v.registerAnimation=e,v.loadAnimation=i,v.setSpeed=s,v.setDirection=r,v.play=a,v.moveFrame=n,v.pause=p,v.stop=m,v.togglePause=d,v.searchAnimations=c,v.resize=u,
v.start=y,v.goToAndStop=l,v.destroy=f,v}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.pendingElements=0,this.playCount=0,this.prerenderFramesFlag=!0,this.animationData={},this.layers=[],this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=randomString(10),this.scaleMode="fit",this.timeCompleted=0,this.segmentPos=0,this.segments=[],this.pendingSegment=!1};AnimationItem.prototype.setParams=function(t){var e=this;t.context&&(this.context=t.context),(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var i=t.animType?t.animType:t.renderer?t.renderer:"canvas";switch(i){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new SVGRenderer(this,t.rendererSettings);break;case"hybrid":case"html":default:this.renderer=new HybridRenderer(this,t.rendererSettings)}if(this.animType=i,""===t.loop||null===t.loop||(this.loop=t.loop===!1?!1:t.loop===!0?!0:parseInt(t.loop)),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.prerenderFramesFlag="prerender"in t?t.prerender:!0,this.autoloadSegments=t.hasOwnProperty("autoloadSegments")?t.autoloadSegments:!0,t.animationData)e.configAnimation(t.animationData);else if(t.path){"json"!=t.path.substr(-4)&&("/"!=t.path.substr(-1,1)&&(t.path+="/"),t.path+="data.json");var s=new XMLHttpRequest;this.path=-1!=t.path.lastIndexOf("\\")?t.path.substr(0,t.path.lastIndexOf("\\")+1):t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),s.open("GET",t.path,!0),s.send(),s.onreadystatechange=function(){if(4==s.readyState)if(200==s.status)e.configAnimation(JSON.parse(s.responseText));else try{var t=JSON.parse(s.responseText);e.configAnimation(t)}catch(i){}}}},AnimationItem.prototype.setData=function(t,e){var i={wrapper:t,animationData:e?"object"==typeof e?e:JSON.parse(e):null},s=t.attributes;i.path=s.getNamedItem("data-animation-path")?s.getNamedItem("data-animation-path").value:s.getNamedItem("data-bm-path")?s.getNamedItem("data-bm-path").value:s.getNamedItem("bm-path")?s.getNamedItem("bm-path").value:"",i.animType=s.getNamedItem("data-anim-type")?s.getNamedItem("data-anim-type").value:s.getNamedItem("data-bm-type")?s.getNamedItem("data-bm-type").value:s.getNamedItem("bm-type")?s.getNamedItem("bm-type").value:s.getNamedItem("data-bm-renderer")?s.getNamedItem("data-bm-renderer").value:s.getNamedItem("bm-renderer")?s.getNamedItem("bm-renderer").value:"canvas";var r=s.getNamedItem("data-anim-loop")?s.getNamedItem("data-anim-loop").value:s.getNamedItem("data-bm-loop")?s.getNamedItem("data-bm-loop").value:s.getNamedItem("bm-loop")?s.getNamedItem("bm-loop").value:"";""===r||(i.loop="false"===r?!1:"true"===r?!0:parseInt(r));var a=s.getNamedItem("data-anim-autoplay")?s.getNamedItem("data-anim-autoplay").value:s.getNamedItem("data-bm-autoplay")?s.getNamedItem("data-bm-autoplay").value:s.getNamedItem("bm-autoplay")?s.getNamedItem("bm-autoplay").value:!0;i.autoplay="false"!==a,i.name=s.getNamedItem("data-name")?s.getNamedItem("data-name").value:s.getNamedItem("data-bm-name")?s.getNamedItem("data-bm-name").value:s.getNamedItem("bm-name")?s.getNamedItem("bm-name").value:"";var n=s.getNamedItem("data-anim-prerender")?s.getNamedItem("data-anim-prerender").value:s.getNamedItem("data-bm-prerender")?s.getNamedItem("data-bm-prerender").value:s.getNamedItem("bm-prerender")?s.getNamedItem("bm-prerender").value:"";"false"===n&&(i.prerender=!1),this.setParams(i)},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip),this.animationData.tf=this.totalFrames);var e,i,s=this.animationData.layers,r=s.length,a=t.layers,n=a.length;for(i=0;n>i;i+=1)for(e=0;r>e;){if(s[e].id==a[i].id){s[e]=a[i];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(r=t.assets.length,e=0;r>e;e+=1)this.animationData.assets.push(t.assets[e]);dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.renderer.includeLayers(t.layers),this.renderer.buildStage(this.container,this.layers),expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer.renderFrame(null),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.animationData.tf);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var i=new XMLHttpRequest,s=this,r=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,i.open("GET",r,!0),i.send(),i.onreadystatechange=function(){if(4==i.readyState)if(200==i.status)s.includeLayers(JSON.parse(i.responseText));else try{var t=JSON.parse(i.responseText);s.includeLayers(t)}catch(e){}}},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.animationData.tf),this.loadNextSegment()},AnimationItem.prototype.configAnimation=function(t){this.animationData=t,this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.animationData.tf=this.totalFrames,this.renderer.configAnimation(t),t.assets||(t.assets=[]),t.comps&&(t.assets=t.assets.concat(t.comps),t.comps=null),this.layers=this.animationData.layers,this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.firstFrame=Math.round(this.animationData.ip),this.frameMult=this.animationData.fr/1e3,this.trigger("config_ready"),this.loadSegments(),this.updaFrameModifier(),this.renderer.globalData.fontManager?this.waitForFontsLoaded():(dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.checkLoaded())},AnimationItem.prototype.waitForFontsLoaded=function(){function t(){this.renderer.globalData.fontManager.loaded?(dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.renderer.buildItems(this.animationData.layers),this.checkLoaded()):setTimeout(t.bind(this),20)}return function(){t.bind(this)()}}(),AnimationItem.prototype.elementLoaded=function(){this.pendingElements--,this.checkLoaded()},AnimationItem.prototype.checkLoaded=function(){0===this.pendingElements&&(this.renderer.buildStage(this.container,this.layers),expressionsPlugin&&expressionsPlugin.initExpressions(this),this.trigger("DOMLoaded"),this.isLoaded=!0,this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=subframeEnabled?this.currentRawFrame:Math.floor(this.currentRawFrame),this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){this.isLoaded!==!1&&this.renderer.renderFrame(this.currentFrame+this.firstFrame)},AnimationItem.prototype.play=function(t){t&&this.name!=t||this.isPaused===!0&&(this.isPaused=!1)},AnimationItem.prototype.pause=function(t){t&&this.name!=t||this.isPaused===!1&&(this.isPaused=!0)},AnimationItem.prototype.togglePause=function(t){t&&this.name!=t||(this.isPaused===!0?(this.isPaused=!1,this.play()):(this.isPaused=!0,this.pause()))},AnimationItem.prototype.stop=function(t){t&&this.name!=t||(this.isPaused=!0,this.currentFrame=this.currentRawFrame=0,this.playCount=0,this.gotoFrame())},AnimationItem.prototype.goToAndStop=function(t,e,i){i&&this.name!=i||(this.setCurrentRawFrameValue(e?t:t*this.frameModifier),this.isPaused=!0)},AnimationItem.prototype.goToAndPlay=function(t,e,i){this.goToAndStop(t,e,i),this.play()},AnimationItem.prototype.advanceTime=function(t){return this.pendingSegment?(this.pendingSegment=!1,this.adjustSegment(this.segments.shift()),void(this.isPaused&&this.play())):void(this.isPaused!==!0&&this.isLoaded!==!1&&this.setCurrentRawFrameValue(this.currentRawFrame+t*this.frameModifier))},AnimationItem.prototype.updateAnimation=function(t){this.setCurrentRawFrameValue(this.totalFrames*t)},AnimationItem.prototype.moveFrame=function(t,e){e&&this.name!=e||this.setCurrentRawFrameValue(this.currentRawFrame+t)},AnimationItem.prototype.adjustSegment=function(t){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.01)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.firstFrame=t[0],this.setCurrentRawFrameValue(0)),this.trigger("segmentStart")},AnimationItem.prototype.playSegments=function(t,e){if("object"==typeof t[0]){var i,s=t.length;for(i=0;s>i;i+=1)this.segments.push(t[i])}else this.segments.push(t);e&&this.adjustSegment(this.segments.shift()),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip*this.frameRate,Math.floor(this.animationData.op-this.animationData.ip+this.animationData.ip*this.frameRate)]),t&&this.adjustSegment(this.segments.shift())},AnimationItem.prototype.checkSegments=function(){this.segments.length&&(this.pendingSegment=!0)},AnimationItem.prototype.remove=function(t){t&&this.name!=t||this.renderer.destroy()},AnimationItem.prototype.destroy=function(t){t&&this.name!=t||this.renderer&&this.renderer.destroyed||(this.renderer.destroy(),this.trigger("destroy"),this._cbs=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){if(this.currentRawFrame=t,this.currentRawFrame>=this.totalFrames){if(this.checkSegments(),this.loop===!1)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete");if(this.trigger("loopComplete"),this.playCount+=1,this.loop!==!0&&this.playCount==this.loop||this.pendingSegment)return this.currentRawFrame=this.totalFrames-.01,this.gotoFrame(),this.pause(),void this.trigger("complete");this.currentRawFrame=this.currentRawFrame%this.totalFrames}else if(this.currentRawFrame<0)return this.checkSegments(),this.playCount-=1,this.playCount<0&&(this.playCount=0),this.loop===!1||this.pendingSegment?(this.currentRawFrame=0,this.gotoFrame(),this.pause(),void this.trigger("complete")):(this.trigger("loopComplete"),this.currentRawFrame=(this.totalFrames+this.currentRawFrame)%this.totalFrames,void this.gotoFrame());this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=0>t?-1:1,this.updaFrameModifier()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetData=function(t){for(var e=0,i=this.assets.length;i>e;){if(t==this.assets[e].id)return this.assets[e];e+=1}},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getAssets=function(){return this.assets},AnimationItem.prototype.trigger=function(t){if(this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult));break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.addEventListener=_addEventListener,AnimationItem.prototype.removeEventListener=_removeEventListener,AnimationItem.prototype.triggerEvent=_triggerEvent;var bodymovinjs = {}; function play(animation){ animationManager.play(animation); } function pause(animation){ animationManager.pause(animation); } function togglePause(animation){ animationManager.togglePause(animation); } function setSpeed(value,animation){ animationManager.setSpeed(value, animation); } function setDirection(value,animation){ animationManager.setDirection(value, animation); } function stop(animation){ animationManager.stop(animation); } function moveFrame(value){ animationManager.moveFrame(value); } function searchAnimations(){ if(standalone === true){ animationManager.searchAnimations(animationData,standalone, renderer); }else{ animationManager.searchAnimations(); } } function registerAnimation(elem){ return animationManager.registerAnimation(elem); } function resize(){ animationManager.resize(); } function start(){ animationManager.start(); } function goToAndStop(val,isFrame, animation){ animationManager.goToAndStop(val,isFrame, animation); } function setSubframeRendering(flag){ subframeEnabled = flag; } function loadAnimation(params){ if(standalone === true){ params.animationData = JSON.parse(animationData); } return animationManager.loadAnimation(params); } function destroy(animation){ return animationManager.destroy(animation); } function setQuality(value){ if(typeof value === 'string'){ switch(value){ case 'high': defaultCurveSegments = 200; break; case 'medium': defaultCurveSegments = 50; break; case 'low': defaultCurveSegments = 10; break; } }else if(!isNaN(value) && value > 1){ defaultCurveSegments = value; } if(defaultCurveSegments >= 50){ roundValues(false); }else{ roundValues(true); } } function installPlugin(type,plugin){ if(type==='expressions'){ expressionsPlugin = plugin; } } function getFactory(name){ switch(name){ case "propertyFactory": return PropertyFactory;case "shapePropertyFactory": return ShapePropertyFactory; case "matrix": return Matrix; } } bodymovinjs.play = play; bodymovinjs.pause = pause; bodymovinjs.togglePause = togglePause; bodymovinjs.setSpeed = setSpeed; bodymovinjs.setDirection = setDirection; bodymovinjs.stop = stop; bodymovinjs.moveFrame = moveFrame; bodymovinjs.searchAnimations = searchAnimations; bodymovinjs.registerAnimation = registerAnimation; bodymovinjs.loadAnimation = loadAnimation; bodymovinjs.setSubframeRendering = setSubframeRendering; bodymovinjs.resize = resize; bodymovinjs.start = start; bodymovinjs.goToAndStop = goToAndStop; bodymovinjs.destroy = destroy; bodymovinjs.setQuality = setQuality; bodymovinjs.installPlugin = installPlugin; bodymovinjs.__getFactory = getFactory; bodymovinjs.version = '4.1.9'; function checkReady(){ if (document.readyState === "complete") { clearInterval(readyStateCheckInterval); searchAnimations(); } } function getQueryVariable(variable) { var vars = queryString.split('&'); for (var i = 0; i < vars.length; i++) { var pair = vars[i].split('='); if (decodeURIComponent(pair[0]) == variable) { return decodeURIComponent(pair[1]); } } } var standalone = '__[STANDALONE]__'; var animationData = '__[ANIMATIONDATA]__'; var renderer = ''; if(standalone) { var scripts = document.getElementsByTagName('script'); var index = scripts.length - 1; var myScript = scripts[index]; var queryString = myScript.src.replace(/^[^\?]+\??/,''); renderer = getQueryVariable('renderer'); } var readyStateCheckInterval = setInterval(checkReady, 100); return bodymovinjs; }));