e;e+=1)"sans-serif"!==i[e]&&"monospace"!==i[e]&&s.push(i[e]);return s.join(",")}function e(e,i){var n=createTag("span");n.setAttribute("aria-hidden",!0),n.style.fontFamily=i;var s=createTag("span");s.innerText="giItT1WQy@!-/#",n.style.position="absolute",n.style.left="-10000px",n.style.top="-10000px",n.style.fontSize="300px",n.style.fontVariant="normal",n.style.fontStyle="normal",n.style.fontWeight="normal",n.style.letterSpacing="0",n.appendChild(s),document.body.appendChild(n);var r=s.offsetWidth;return s.style.fontFamily=t(e)+", "+i,{node:s,w:r,parent:n}}function i(){var t,e,i,n=this.fonts.length,s=n;for(t=0;n>t;t+=1)this.fonts[t].loaded?s-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,e.offsetWidth!==i?(s-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,e.offsetWidth!==i&&(s-=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!==s&&Date.now()-this.initTimes;s+=1){var l,h,c=!0;if(r[s].loaded=!1,r[s].monoCase=e(r[s].fFamily,"monospace"),r[s].sansCase=e(r[s].fFamily,"sans-serif"),r[s].fPath){if("p"===r[s].fOrigin||3===r[s].origin){if(l=document.querySelectorAll('style[f-forigin="p"][f-family="'+r[s].fFamily+'"], style[f-origin="3"][f-family="'+r[s].fFamily+'"]'),l.length>0&&(c=!1),c){var u=createTag("style");u.setAttribute("f-forigin",r[s].fOrigin),u.setAttribute("f-origin",r[s].origin),u.setAttribute("f-family",r[s].fFamily),u.type="text/css",u.innerText="@font-face {font-family: "+r[s].fFamily+"; font-style: normal; src: url('"+r[s].fPath+"');}",i.appendChild(u)}}else if("g"===r[s].fOrigin||1===r[s].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),h=0;he;e+=1){for(i=0,n=!1;r>i;)this.chars[i].style===t[e].style&&this.chars[i].fFamily===t[e].fFamily&&this.chars[i].ch===t[e].ch&&(n=!0),i+=1;n||(this.chars.push(t[e]),r+=1)}}}function o(t,e,i){for(var n=0,s=this.chars.length;s>n;){if(this.chars[n].ch===t&&this.chars[n].style===e&&this.chars[n].fFamily===i)return this.chars[n];n+=1}return("string"==typeof t&&13!==t.charCodeAt(0)||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",t,e,i)),f}function a(t,e,i){var n=this.getFontByName(e),s=t.charCodeAt(0);if(!n.cache[s+1]){var r=n.helper;if(" "===t){r.textContent="|"+t+"|";var o=r.getComputedTextLength();r.textContent="||";var a=r.getComputedTextLength();n.cache[s+1]=(o-a)/100}else r.textContent=t,n.cache[s+1]=r.getComputedTextLength()/100}return n.cache[s+1]*i}function l(t){for(var e=0,i=this.fonts.length;i>e;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]}function h(t,e){var i=t.toString(16)+e.toString(16);return-1!==g.indexOf(i)}function c(t,e){return e?t===v[0]&&e===v[1]:t===v[1]}function u(t){return-1!==m.indexOf(t)}function d(){this.isLoaded=!0}var p=5e3,f={w:0,size:0,shapes:[]},m=[];m=m.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var g=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"],v=[65039,8205],y=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};y.isModifier=h,y.isZeroWidthJoiner=c,y.isCombinedCharacter=u;var b={addChars:r,addFonts:s,getCharData:o,getFontByName:l,measureText:a,checkLoadedFonts:i,setIsLoaded:d};return y.prototype=b,y}(),PropertyFactory=function(){function t(t,s){var r,o=this.offsetTime;"multidimensional"===this.propType&&(r=createTypedArray("float32",this.pv.length));for(var a,l,h=s.lastIndex,c=h,u=this.keyframes.length-1,d=!0;d;){if(a=this.keyframes[c],l=this.keyframes[c+1],c===u-1&&t>=l.t-o){a.h&&(a=l),h=0;break}if(l.t-o>t){h=c;break}u-1>c?c+=1:(h=0,d=!1)}var p,f,m,g,v,y,b,x=l.t-o,S=a.t-o;if(a.to){a.bezierData||(a.bezierData=bez.buildBezierData(a.s,l.s||a.e,a.to,a.ti));var C=a.bezierData;if(t>=x||S>t){var k=t>=x?C.points.length-1:0;for(f=C.points[k].point.length,p=0;f>p;p+=1)r[p]=C.points[k].point[p]}else{a.__fnct?y=a.__fnct:(y=BezierFactory.getBezierEasing(a.o.x,a.o.y,a.i.x,a.i.y,a.n).get,a.__fnct=y),m=y((t-S)/(x-S));var w,E=C.segmentLength*m,T=s.lastFramep;p+=1)r[p]=C.points[v].point[p];break}if(E>=T&&Ep;p+=1)r[p]=C.points[v].point[p]+(C.points[v+1].point[p]-C.points[v].point[p])*w;break}g-1>v?v+=1:d=!1}s._lastPoint=v,s._lastAddedLength=T-C.points[v].partialLength,s._lastKeyframeIndex=c}}else{var A,M,L,P,I;if(u=a.s.length,b=l.s||a.e,this.sh&&1!==a.h)if(t>=x)r[0]=b[0],r[1]=b[1],r[2]=b[2];else if(S>=t)r[0]=a.s[0],r[1]=a.s[1],r[2]=a.s[2];else{var _=n(a.s),D=n(b),F=(t-S)/(x-S);i(r,e(_,D,F))}else for(c=0;u>c;c+=1)1!==a.h&&(t>=x?m=1:S>t?m=0:(a.o.x.constructor===Array?(a.__fnct||(a.__fnct=[]),a.__fnct[c]?y=a.__fnct[c]:(A="undefined"==typeof a.o.x[c]?a.o.x[0]:a.o.x[c],M="undefined"==typeof a.o.y[c]?a.o.y[0]:a.o.y[c],L="undefined"==typeof a.i.x[c]?a.i.x[0]:a.i.x[c],P="undefined"==typeof a.i.y[c]?a.i.y[0]:a.i.y[c],y=BezierFactory.getBezierEasing(A,M,L,P).get,a.__fnct[c]=y)):a.__fnct?y=a.__fnct:(A=a.o.x,M=a.o.y,L=a.i.x,P=a.i.y,y=BezierFactory.getBezierEasing(A,M,L,P).get,a.__fnct=y),m=y((t-S)/(x-S)))),b=l.s||a.e,I=1===a.h?a.s[c]:a.s[c]+(b[c]-a.s[c])*m,"multidimensional"===this.propType?r[c]=I:r=I}return s.lastIndex=h,r}function e(t,e,i){var n,s,r,o,a,l=[],h=t[0],c=t[1],u=t[2],d=t[3],p=e[0],f=e[1],m=e[2],g=e[3];return s=h*p+c*f+u*m+d*g,0>s&&(s=-s,p=-p,f=-f,m=-m,g=-g),1-s>1e-6?(n=Math.acos(s),r=Math.sin(n),o=Math.sin((1-i)*n)/r,a=Math.sin(i*n)/r):(o=1-i,a=i),l[0]=o*h+a*p,l[1]=o*c+a*f,l[2]=o*u+a*m,l[3]=o*d+a*g,l}function i(t,e){var i=e[0],n=e[1],s=e[2],r=e[3],o=Math.atan2(2*n*r-2*i*s,1-2*n*n-2*s*s),a=Math.asin(2*i*n+2*s*r),l=Math.atan2(2*i*r-2*n*s,1-2*i*i-2*s*s);t[0]=o/degToRads,t[1]=a/degToRads,t[2]=l/degToRads}function n(t){var e=t[0]*degToRads,i=t[1]*degToRads,n=t[2]*degToRads,s=Math.cos(e/2),r=Math.cos(i/2),o=Math.cos(n/2),a=Math.sin(e/2),l=Math.sin(i/2),h=Math.sin(n/2),c=s*r*o-a*l*h,u=a*l*o+s*r*h,d=a*r*o+s*l*h,p=s*l*o-a*r*h;return[u,d,p,c]}function s(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==p&&(this._caching.lastFrame>=i&&t>=i||this._caching.lastFramet))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var n=this.interpolateValue(t,this._caching);this.pv=n}return this._caching.lastFrame=t,this.pv}function r(t){var e;if("unidimensional"===this.propType)e=t*this.mult,f(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var i=0,n=this.v.length;n>i;)e=t[i]*this.mult,f(this.v[i]-e)>1e-5&&(this.v[i]=e,this._mdf=!0),i+=1}function o(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length){if(this.lock)return void this.setVValue(this.pv);this.lock=!0,this._mdf=this._isFirstFrame;var t,e=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(t=0;e>t;t+=1)i=this.effectsSequence[t](i);this.setVValue(i),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function a(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function l(t,e,i,n){this.propType="unidimensional",this.mult=i||1,this.data=e,this.v=i?e.k*i:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=n,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=o,this.setVValue=r,this.addEffect=a}function h(t,e,i,n){this.propType="multidimensional",this.mult=i||1,this.data=e,this._mdf=!1,this.elem=t,this.container=n,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var s,l=e.k.length;for(this.v=createTypedArray("float32",l),this.pv=createTypedArray("float32",l),this.vel=createTypedArray("float32",l),s=0;l>s;s+=1)this.v[s]=e.k[s]*this.mult,this.pv[s]=e.k[s];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=o,this.setVValue=r,this.addEffect=a}function c(e,i,n,l){this.propType="unidimensional",this.keyframes=i.k,this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:p,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=i,this.mult=n||1,this.elem=e,this.container=l,this.comp=e.comp,this.v=p,this.pv=p,this._isFirstFrame=!0,this.getValue=o,this.setVValue=r,this.interpolateValue=t,this.effectsSequence=[s.bind(this)],this.addEffect=a}function u(e,i,n,l){this.propType="multidimensional";var h,c,u,d,f,m=i.k.length;for(h=0;m-1>h;h+=1)i.k[h].to&&i.k[h].s&&i.k[h+1]&&i.k[h+1].s&&(c=i.k[h].s,u=i.k[h+1].s,d=i.k[h].to,f=i.k[h].ti,(2===c.length&&(c[0]!==u[0]||c[1]!==u[1])&&bez.pointOnLine2D(c[0],c[1],u[0],u[1],c[0]+d[0],c[1]+d[1])&&bez.pointOnLine2D(c[0],c[1],u[0],u[1],u[0]+f[0],u[1]+f[1])||3===c.length&&(c[0]!==u[0]||c[1]!==u[1]||c[2]!==u[2])&&bez.pointOnLine3D(c[0],c[1],c[2],u[0],u[1],u[2],c[0]+d[0],c[1]+d[1],c[2]+d[2])&&bez.pointOnLine3D(c[0],c[1],c[2],u[0],u[1],u[2],u[0]+f[0],u[1]+f[1],u[2]+f[2]))&&(i.k[h].to=null,i.k[h].ti=null),c[0]===u[0]&&c[1]===u[1]&&0===d[0]&&0===d[1]&&0===f[0]&&0===f[1]&&(2===c.length||c[2]===u[2]&&0===d[2]&&0===f[2])&&(i.k[h].to=null,i.k[h].ti=null));this.effectsSequence=[s.bind(this)],this.data=i,this.keyframes=i.k,this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=n||1,this.elem=e,this.container=l,this.comp=e.comp,this.getValue=o,this.setVValue=r,this.interpolateValue=t,this.frameId=-1;var g=i.k[0].s.length;for(this.v=createTypedArray("float32",g),this.pv=createTypedArray("float32",g),h=0;g>h;h+=1)this.v[h]=p,this.pv[h]=p;this._caching={lastFrame:p,lastIndex:0,value:createTypedArray("float32",g)},this.addEffect=a}function d(t,e,i,n,s){var r;if(e.k.length)if("number"==typeof e.k[0])r=new h(t,e,n,s);else switch(i){case 0:r=new c(t,e,n,s);break;case 1:r=new u(t,e,n,s)}else r=new l(t,e,n,s);return r.effectsSequence.length&&s.addDynamicProperty(r),r}var p=initialDefaultFrame,f=Math.abs,m={getProp:d};return m}(),TransformPropertyFactory=function(){function t(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,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.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),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 e(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||t){var e;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&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.autoOriented){var i,n;if(e=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(i=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/e,0),n=this.p.getValueAtTime(this.p.keyframes[0].t/e,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/e,0),n=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/e,0)):(i=this.p.pv,n=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/e,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],n=[];var s=this.px,r=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(i[0]=s.getValueAtTime((s.keyframes[0].t+.01)/e,0),i[1]=r.getValueAtTime((r.keyframes[0].t+.01)/e,0),n[0]=s.getValueAtTime(s.keyframes[0].t/e,0),n[1]=r.getValueAtTime(r.keyframes[0].t/e,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(i[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/e,0),i[1]=r.getValueAtTime(r.keyframes[r.keyframes.length-1].t/e,0),n[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/e,0),n[1]=r.getValueAtTime((r.keyframes[r.keyframes.length-1].t-.01)/e,0)):(i=[s.pv,r.pv],n[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/e,s.offsetTime),n[1]=r.getValueAtTime((r._caching.lastFrame+r.offsetTime-.01)/e,r.offsetTime))}else n=a,i=n;this.v.rotate(-Math.atan2(i[1]-n[1],i[0]-n[0]))}this.data.p&&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 i(){if(!this.a.k&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.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.appliedTransformations=4)}}function n(){}function s(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0}function r(t,e,i){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(i||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var n,s=e.or.k.length;for(n=0;s>n;n+=1)e.or.k[n].to=null,e.or.k[n].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}function o(t,e,i){return new r(t,e,i)}var a=[0,0];return r.prototype={applyToMatrix:t,getValue:e,precalculateMatrix:i,autoOrient:n},extendPrototype([DynamicPropertyContainer],r),r.prototype.addDynamicProperty=s,r.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:o}}();ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var i=0;e>i;)this.v[i]=pointPool.newElement(),this.o[i]=pointPool.newElement(),this.i[i]=pointPool.newElement(),i+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength=this._maxLength&&this.doubleArrayLength(),i){case"v":r=this.v;break;case"i":r=this.i;break;case"o":r=this.o;break;default:r=[]}(!r[n]||r[n]&&!s)&&(r[n]=pointPool.newElement()),r[n][0]=t,r[n][1]=e},ShapePath.prototype.setTripleAt=function(t,e,i,n,s,r,o,a){this.setXYAt(t,e,"v",o,a),this.setXYAt(i,n,"o",o,a),this.setXYAt(s,r,"i",o,a)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,i=this.o,n=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],n[0][0],n[0][1],i[0][0],i[0][1],0,!1),s=1);var r,o=this._length-1,a=this._length;for(r=s;a>r;r+=1)t.setTripleAt(e[o][0],e[o][1],n[o][0],n[o][1],i[o][0],i[o][1],r,!1),o-=1;return t};var ShapePropertyFactory=function(){function t(t,e,i){var n,s,r,o,a,l,h,c,u,d=i.lastIndex,p=this.keyframes;if(t=p[p.length-1].t-this.offsetTime)n=p[p.length-1].s?p[p.length-1].s[0]:p[p.length-2].e[0],r=!0;else{for(var f,m,g=d,v=p.length-1,y=!0;y&&(f=p[g],m=p[g+1],!(m.t-this.offsetTime>t));)v-1>g?g+=1:y=!1;if(r=1===f.h,d=g,!r){if(t>=m.t-this.offsetTime)c=1;else if(to;o+=1)for(a=0;h>a;a+=1)u=r?n.i[o][a]:n.i[o][a]+(s.i[o][a]-n.i[o][a])*c,e.i[o][a]=u,u=r?n.o[o][a]:n.o[o][a]+(s.o[o][a]-n.o[o][a])*c,e.o[o][a]=u,u=r?n.v[o][a]:n.v[o][a]+(s.v[o][a]-n.v[o][a])*c,e.v[o][a]=u}function e(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime,n=this._caching.lastFrame;return n!==d&&(e>n&&e>t||n>i&&t>i)||(this._caching.lastIndex=t>n?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}function i(){this.paths=this.localShapeCollection}function n(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var i,n=t._length;for(i=0;n>i;i+=1)if(t.v[i][0]!==e.v[i][0]||t.v[i][1]!==e.v[i][1]||t.o[i][0]!==e.o[i][0]||t.o[i][1]!==e.o[i][1]||t.i[i][0]!==e.i[i][0]||t.i[i][1]!==e.i[i][1])return!1;return!0}function s(t){n(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function r(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length)return void(this._mdf=!1);if(this.lock)return void this.setVValue(this.pv);this.lock=!0,this._mdf=!1;var t;t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var e,i=this.effectsSequence.length;for(e=0;i>e;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function o(t,e,n){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var s=3===n?e.pt.k:e.ks.k;this.v=shapePool.clone(s),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=i,this.effectsSequence=[]}function a(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function l(t,n,s){this.propType="shape",this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=3===s?n.pt.k:n.ks.k,this.k=!0,this.kf=!0;var r=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,r),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=d,this.reset=i,this._caching={lastFrame:d,lastIndex:0},this.effectsSequence=[e.bind(this)]}function h(t,e,i){var n;if(3===i||4===i){var s=3===i?e.pt:e.ks,r=s.k;n=r.length?new l(t,e,i):new o(t,e,i)}else 5===i?n=new m(t,e):6===i?n=new p(t,e):7===i&&(n=new f(t,e));return n.k&&t.addDynamicProperty(n),n}function c(){return o}function u(){return l}var d=-999999;o.prototype.interpolateShape=t,o.prototype.getValue=r,o.prototype.setVValue=s,o.prototype.addEffect=a,l.prototype.getValue=r,l.prototype.interpolateShape=t,l.prototype.setVValue=s,l.prototype.addEffect=a;var p=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}var e=roundCorner;return t.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],i=this.p.v[1],n=this.s.v[0]/2,s=this.s.v[1]/2,r=3!==this.d,o=this.v;o.v[0][0]=t,o.v[0][1]=i-s,o.v[1][0]=r?t+n:t-n,o.v[1][1]=i,o.v[2][0]=t,o.v[2][1]=i+s,o.v[3][0]=r?t-n:t+n,o.v[3][1]=i,o.i[0][0]=r?t-n*e:t+n*e,o.i[0][1]=i-s,o.i[1][0]=r?t+n:t-n,o.i[1][1]=i-s*e,o.i[2][0]=r?t+n*e:t-n*e,o.i[2][1]=i+s,o.i[3][0]=r?t-n:t+n,o.i[3][1]=i+s*e,o.o[0][0]=r?t+n*e:t-n*e,o.o[0][1]=i-s,o.o[1][0]=r?t+n:t-n,o.o[1][1]=i+s*e,o.o[2][0]=r?t-n*e:t+n*e,o.o[2][1]=i+s,o.o[3][0]=r?t-n:t+n,o.o[3][1]=i-s*e}},extendPrototype([DynamicPropertyContainer],t),t}(),f=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:i,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,i,n,s=2*Math.floor(this.pt.v),r=2*Math.PI/s,o=!0,a=this.or.v,l=this.ir.v,h=this.os.v,c=this.is.v,u=2*Math.PI*a/(2*s),d=2*Math.PI*l/(2*s),p=-Math.PI/2;p+=this.r.v;var f=3===this.data.d?-1:1;for(this.v._length=0,t=0;s>t;t+=1){e=o?a:l,i=o?h:c,n=o?u:d;var m=e*Math.cos(p),g=e*Math.sin(p),v=0===m&&0===g?0:g/Math.sqrt(m*m+g*g),y=0===m&&0===g?0:-m/Math.sqrt(m*m+g*g);m+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(m,g,m-v*n*i*f,g-y*n*i*f,m+v*n*i*f,g+y*n*i*f,t,!0),o=!o,p+=r*f}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),i=2*Math.PI/e,n=this.or.v,s=this.os.v,r=2*Math.PI*n/(4*e),o=.5*-Math.PI,a=3===this.data.d?-1:1;for(o+=this.r.v,this.v._length=0,t=0;e>t;t+=1){var l=n*Math.cos(o),h=n*Math.sin(o),c=0===l&&0===h?0:h/Math.sqrt(l*l+h*h),u=0===l&&0===h?0:-l/Math.sqrt(l*l+h*h);l+=+this.p.v[0],h+=+this.p.v[1],this.v.setTripleAt(l,h,l-c*r*s*a,h-u*r*s*a,l+c*r*s*a,h+u*r*s*a,t,!0),o+=i*a}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),m=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,n=this.s.v[1]/2,s=bmMin(i,n,this.r.v),r=s*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+i,e-n+s,t+i,e-n+s,t+i,e-n+r,0,!0),this.v.setTripleAt(t+i,e+n-s,t+i,e+n-r,t+i,e+n-s,1,!0),0!==s?(this.v.setTripleAt(t+i-s,e+n,t+i-s,e+n,t+i-r,e+n,2,!0),this.v.setTripleAt(t-i+s,e+n,t-i+r,e+n,t-i+s,e+n,3,!0),this.v.setTripleAt(t-i,e+n-s,t-i,e+n-s,t-i,e+n-r,4,!0),this.v.setTripleAt(t-i,e-n+s,t-i,e-n+r,t-i,e-n+s,5,!0),this.v.setTripleAt(t-i+s,e-n,t-i+s,e-n,t-i+r,e-n,6,!0),this.v.setTripleAt(t+i-s,e-n,t+i-r,e-n,t+i-s,e-n,7,!0)):(this.v.setTripleAt(t-i,e+n,t-i+r,e+n,t-i,e+n,2),this.v.setTripleAt(t-i,e-n,t-i,e-n+r,t-i,e-n,3))):(this.v.setTripleAt(t+i,e-n+s,t+i,e-n+r,t+i,e-n+s,0,!0),0!==s?(this.v.setTripleAt(t+i-s,e-n,t+i-s,e-n,t+i-r,e-n,1,!0),this.v.setTripleAt(t-i+s,e-n,t-i+r,e-n,t-i+s,e-n,2,!0),this.v.setTripleAt(t-i,e-n+s,t-i,e-n+s,t-i,e-n+r,3,!0),this.v.setTripleAt(t-i,e+n-s,t-i,e+n-r,t-i,e+n-s,4,!0),this.v.setTripleAt(t-i+s,e+n,t-i+s,e+n,t-i+r,e+n,5,!0),this.v.setTripleAt(t+i-s,e+n,t+i-r,e+n,t+i-s,e+n,6,!0),this.v.setTripleAt(t+i,e+n-s,t+i,e+n-s,t+i,e+n-r,7,!0)):(this.v.setTripleAt(t-i,e-n,t-i+r,e-n,t-i,e-n,1,!0),this.v.setTripleAt(t-i,e+n,t-i,e+n-r,t-i,e+n,2,!0),this.v.setTripleAt(t+i,e+n,t+i-r,e+n,t+i,e+n,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:i},extendPrototype([DynamicPropertyContainer],t),t}(),g={};return g.getShapeProp=h,g.getConstructorFunction=c,g.getKeyframedConstructorFunction=u,g}(),ShapeModifiers=function(){function t(t,e){n[t]||(n[t]=e)}function e(t,e,i){return new n[t](e,i)}var i={},n={};return i.registerModifier=t,i.getModifier=e,i}();ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=PropertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,i,n,s){var r=[];1>=e?r.push({s:t,e:e}):t>=1?r.push({s:t-1,e:e-1}):(r.push({s:t,e:1}),r.push({s:0,e:e-1}));var o,a,l=[],h=r.length;for(o=0;h>o;o+=1)if(a=r[o],!(a.e*sn+i)){var c,u;c=a.s*s<=n?0:(a.s*s-n)/i,u=a.e*s>=n+i?1:(a.e*s-n)/i,l.push([c,u])}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(t){var e,i=t.length;for(e=0;i>e;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,i;if(this._mdf||t){var n=this.o.v%360/360;if(0>n&&(n+=1),e=this.s.v>1?1+n:this.s.v<0?0+n:this.s.v+n,i=this.e.v>1?1+n:this.e.v<0?0+n:this.e.v+n,e>i){var s=e;e=i,i=s}e=1e-4*Math.round(1e4*e),i=1e-4*Math.round(1e4*i),this.sValue=e,this.eValue=i}else e=this.sValue,i=this.eValue;var r,o,a,l,h,c,u,d=this.shapes.length,p=0;if(i===e)for(o=0;d>o;o+=1)this.shapes[o].localShapeCollection.releaseShapes(),this.shapes[o].shape._mdf=!0,this.shapes[o].shape.paths=this.shapes[o].localShapeCollection,this._mdf&&(this.shapes[o].pathsData.length=0);else if(1===i&&0===e||0===i&&1===e){if(this._mdf)for(o=0;d>o;o+=1)this.shapes[o].pathsData.length=0,this.shapes[o].shape._mdf=!0}else{var f,m,g=[];for(o=0;d>o;o+=1)if(f=this.shapes[o],f.shape._mdf||this._mdf||t||2===this.m){if(r=f.shape.paths,l=r._length,u=0,!f.shape._mdf&&f.pathsData.length)u=f.totalShapeLength;else{for(h=this.releasePathsData(f.pathsData),a=0;l>a;a+=1)c=bez.getSegmentsLength(r.shapes[a]),h.push(c),u+=c.totalLength;f.totalShapeLength=u,f.pathsData=h}p+=u,f.shape._mdf=!0}else f.shape.paths=f.localShapeCollection;var v,y=e,b=i,x=0;for(o=d-1;o>=0;o-=1)if(f=this.shapes[o],f.shape._mdf){for(m=f.localShapeCollection,m.releaseShapes(),2===this.m&&d>1?(v=this.calculateShapeEdges(e,i,f.totalShapeLength,x,p),x+=f.totalShapeLength):v=[[y,b]],l=v.length,a=0;l>a;a+=1){y=v[a][0],b=v[a][1],g.length=0,1>=b?g.push({s:f.totalShapeLength*y,e:f.totalShapeLength*b}):y>=1?g.push({s:f.totalShapeLength*(y-1),e:f.totalShapeLength*(b-1)}):(g.push({s:f.totalShapeLength*y,e:f.totalShapeLength}),g.push({s:0,e:f.totalShapeLength*(b-1)}));var S=this.addShapes(f,g[0]);if(g[0].s!==g[0].e){if(g.length>1){var C=f.shape.paths.shapes[f.shape.paths._length-1];if(C.c){var k=S.pop();this.addPaths(S,m),S=this.addShapes(f,g[1],k)}else this.addPaths(S,m),S=this.addShapes(f,g[1])}this.addPaths(S,m)}}f.shape.paths=m}}},TrimModifier.prototype.addPaths=function(t,e){var i,n=t.length;for(i=0;n>i;i+=1)e.addShape(t[i])},TrimModifier.prototype.addSegment=function(t,e,i,n,s,r,o){s.setXYAt(e[0],e[1],"o",r),s.setXYAt(i[0],i[1],"i",r+1),o&&s.setXYAt(t[0],t[1],"v",r),s.setXYAt(n[0],n[1],"v",r+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,i,n){e.setXYAt(t[1],t[5],"o",i),e.setXYAt(t[2],t[6],"i",i+1),n&&e.setXYAt(t[0],t[4],"v",i),e.setXYAt(t[3],t[7],"v",i+1)},TrimModifier.prototype.addShapes=function(t,e,i){var n,s,r,o,a,l,h,c,u=t.pathsData,d=t.shape.paths.shapes,p=t.shape.paths._length,f=0,m=[],g=!0;for(i?(a=i._length,c=i._length):(i=shapePool.newElement(),a=0,c=0),m.push(i),n=0;p>n;n+=1){for(l=u[n].lengths,i.c=d[n].c,r=d[n].c?l.length:l.length+1,s=1;r>s;s+=1)if(o=l[s-1],f+o.addedLengthe.e){i.c=!1;break}e.s<=f&&e.e>=f+o.addedLength?(this.addSegment(d[n].v[s-1],d[n].o[s-1],d[n].i[s],d[n].v[s],i,a,g),g=!1):(h=bez.getNewSegment(d[n].v[s-1],d[n].v[s],d[n].o[s-1],d[n].i[s],(e.s-f)/o.addedLength,(e.e-f)/o.addedLength,l[s-1]),this.addSegmentFromArray(h,i,a,g),g=!1,i.c=!1),f+=o.addedLength,a+=1}if(d[n].c&&l.length){if(o=l[s-1],f<=e.e){var v=l[s-1].addedLength;e.s<=f&&e.e>=f+v?(this.addSegment(d[n].v[s-1],d[n].o[s-1],d[n].i[0],d[n].v[0],i,a,g),g=!1):(h=bez.getNewSegment(d[n].v[s-1],d[n].v[0],d[n].o[s-1],d[n].i[0],(e.s-f)/v,(e.e-f)/v,l[s-1]),this.addSegmentFromArray(h,i,a,g),g=!1,i.c=!1)}else i.c=!1;f+=o.addedLength,a+=1}if(i._length&&(i.setXYAt(i.v[c][0],i.v[c][1],"i",c),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),f>e.e)break;p-1>n&&(i=shapePool.newElement(),g=!0,m.push(i),a=0)}return m},ShapeModifiers.registerModifier("tm",TrimModifier),extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var i=shapePool.newElement();i.c=t.c;var n,s,r,o,a,l,h,c,u,d,p,f,m,g=t._length,v=0;for(n=0;g>n;n+=1)s=t.v[n],o=t.o[n],r=t.i[n],s[0]===o[0]&&s[1]===o[1]&&s[0]===r[0]&&s[1]===r[1]?0!==n&&n!==g-1||t.c?(a=0===n?t.v[g-1]:t.v[n-1],l=Math.sqrt(Math.pow(s[0]-a[0],2)+Math.pow(s[1]-a[1],2)),h=l?Math.min(l/2,e)/l:0,f=s[0]+(a[0]-s[0])*h,c=f,m=s[1]-(s[1]-a[1])*h,u=m,d=c-(c-s[0])*roundCorner,p=u-(u-s[1])*roundCorner,i.setTripleAt(c,u,d,p,f,m,v),v+=1,a=n===g-1?t.v[0]:t.v[n+1],l=Math.sqrt(Math.pow(s[0]-a[0],2)+Math.pow(s[1]-a[1],2)),h=l?Math.min(l/2,e)/l:0,d=s[0]+(a[0]-s[0])*h,c=d,p=s[1]+(a[1]-s[1])*h,u=p,f=c-(c-s[0])*roundCorner,m=u-(u-s[1])*roundCorner,i.setTripleAt(c,u,d,p,f,m,v),v+=1):(i.setTripleAt(s[0],s[1],o[0],o[1],r[0],r[1],v),v+=1):(i.setTripleAt(t.v[n][0],t.v[n][1],t.o[n][0],t.o[n][1],t.i[n][0],t.i[n][1],v),v+=1);return i},RoundCornersModifier.prototype.processShapes=function(t){var e,i,n,s,r=this.shapes.length,o=this.rd.v;if(0!==o){var a,l;for(i=0;r>i;i+=1){if(a=this.shapes[i],l=a.localShapeCollection,a.shape._mdf||this._mdf||t)for(l.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,n=0;s>n;n+=1)l.addShape(this.processPath(e[n],o));a.shape.paths=a.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("rd",RoundCornersModifier),extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var i=e/100,n=[0,0],s=t._length,r=0;for(r=0;s>r;r+=1)n[0]+=t.v[r][0],n[1]+=t.v[r][1];n[0]/=s,n[1]/=s;var o=shapePool.newElement();o.c=t.c;var a,l,h,c,u,d;for(r=0;s>r;r+=1)a=t.v[r][0]+(n[0]-t.v[r][0])*i,l=t.v[r][1]+(n[1]-t.v[r][1])*i,h=t.o[r][0]+(n[0]-t.o[r][0])*-i,c=t.o[r][1]+(n[1]-t.o[r][1])*-i,u=t.i[r][0]+(n[0]-t.i[r][0])*-i,d=t.i[r][1]+(n[1]-t.i[r][1])*-i,o.setTripleAt(a,l,h,c,u,d,r);return o},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,i,n,s,r=this.shapes.length,o=this.amount.v;if(0!==o){var a,l;for(i=0;r>i;i+=1){if(a=this.shapes[i],l=a.localShapeCollection,a.shape._mdf||this._mdf||t)for(l.releaseShapes(),a.shape._mdf=!0,e=a.shape.paths.shapes,s=a.shape.paths._length,n=0;s>n;n+=1)l.addShape(this.processPath(e[n],o));a.shape.paths=a.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)},ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,i,n,s,r){var o=r?-1:1,a=n.s.v[0]+(1-n.s.v[0])*(1-s),l=n.s.v[1]+(1-n.s.v[1])*(1-s);t.translate(n.p.v[0]*o*s,n.p.v[1]*o*s,n.p.v[2]),e.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),e.rotate(-n.r.v*o*s),e.translate(n.a.v[0],n.a.v[1],n.a.v[2]),i.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),i.scale(r?1/a:a,r?1/l:l),i.translate(n.a.v[0],n.a.v[1],n.a.v[2])},RepeaterModifier.prototype.init=function(t,e,i,n){for(this.elem=t,this.arr=e,this.pos=i,this.elemsData=n,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[i]);i>0;)i-=1,this._elements.unshift(e[i]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,i=t.length;for(e=0;i>e;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));
return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var i,n=t.length;for(i=0;n>i;i+=1)t[i]._render=e,"gr"===t[i].ty&&this.changeGroupRender(t[i].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,i,n,s,r,o=!1;if(this._mdf||t){var a=Math.ceil(this.c.v);if(this._groups.lengthr,this._groups[n]._render=h,this.changeGroupRender(this._groups[n].it,h),!h){var c=this.elemsData[n].it,u=c[c.length-1];0!==u.transform.op.v?(u.transform.op._mdf=!0,u.transform.op.v=0):u.transform.op._mdf=!1}r+=1}this._currentCopies=a;var d=this.o.v,p=d%1,f=d>0?Math.floor(d):Math.ceil(d),m=this.pMatrix.props,g=this.rMatrix.props,v=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var y=0;if(d>0){for(;f>y;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),y+=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,p,!1),y+=p)}else if(0>d){for(;y>f;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),y-=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-p,!0),y-=p)}n=1===this.data.m?0:this._currentCopies-1,s=1===this.data.m?1:-1,r=this._currentCopies;for(var b,x;r;){if(e=this.elemsData[n].it,i=e[e.length-1].transform.mProps.v.props,x=i.length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(n/(this._currentCopies-1)),0!==y){for((0!==n&&1===s||n!==this._currentCopies-1&&-1===s)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],v[10],v[11],v[12],v[13],v[14],v[15]),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),b=0;x>b;b+=1)i[b]=this.matrix.props[b];this.matrix.reset()}else for(this.matrix.reset(),b=0;x>b;b+=1)i[b]=this.matrix.props[b];y+=1,r-=1,n+=s}}else for(r=this._currentCopies,n=0,s=1;r;)e=this.elemsData[n].it,i=e[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,r-=1,n+=s;return o},RepeaterModifier.prototype.addShape=function(){},ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;te;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),GradientProperty.prototype.comparePoints=function(t,e){for(var i,n=0,s=this.o.length/2;s>n;){if(i=Math.abs(t[4*n]-t[4*e+2*n]),i>.01)return!1;n+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!==this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;e>t;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,i,n,s=4*this.data.p;for(e=0;s>e;e+=1)i=e%4===0?100:255,n=Math.round(this.prop.v[e]*i),this.c[e]!==n&&(this.c[e]=n,this._cmdf=!t);if(this.o.length)for(s=this.prop.v.length,e=4*this.data.p;s>e;e+=1)i=e%2===0?100:1,n=e%2===0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==n&&(this.o[e-4*this.data.p]=n,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty);var buildShapeString=function(t,e,i,n){if(0===e)return"";var s,r=t.o,o=t.i,a=t.v,l=" M"+n.applyToPointStringified(a[0][0],a[0][1]);for(s=1;e>s;s+=1)l+=" C"+n.applyToPointStringified(r[s-1][0],r[s-1][1])+" "+n.applyToPointStringified(o[s][0],o[s][1])+" "+n.applyToPointStringified(a[s][0],a[s][1]);return i&&e&&(l+=" C"+n.applyToPointStringified(r[s-1][0],r[s-1][1])+" "+n.applyToPointStringified(o[0][0],o[0][1])+" "+n.applyToPointStringified(a[0][0],a[0][1]),l+="z"),l},audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;e>t;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;e>t;t+=1)this.audios[t].resume()},setRate:function(t){var e,i=this.audios.length;for(e=0;i>e;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):Howl?new Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;e>t;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),ImagePreloader=function(){function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function e(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(t,e,i){var n="";if(t.e)n=t.p;else if(e){var s=t.p;-1!==s.indexOf("images/")&&(s=s.split("/")[1]),n=e+s}else n=i,n+=t.u?t.u:"",n+=t.p;return n}function n(t){var e=0,i=setInterval(function(){var n=t.getBBox();(n.width||e>500)&&(this._imageLoaded(),clearInterval(i)),e+=1}.bind(this),50)}function s(t){var e=i(t,this.assetsPath,this.path),n=createNS("image");isSafari?this.testImageLoaded(n):n.addEventListener("load",this._imageLoaded,!1),n.addEventListener("error",function(){s.img=g,this._imageLoaded()}.bind(this),!1),n.setAttributeNS("http://www.w3.org/1999/xlink","href",e),this._elementHelper.append?this._elementHelper.append(n):this._elementHelper.appendChild(n);var s={img:n,assetData:t};return s}function r(t){var e=i(t,this.assetsPath,this.path),n=createTag("img");n.crossOrigin="anonymous",n.addEventListener("load",this._imageLoaded,!1),n.addEventListener("error",function(){s.img=g,this._imageLoaded()}.bind(this),!1),n.src=e;var s={img:n,assetData:t};return s}function o(t){var e={assetData:t},n=i(t,this.assetsPath,this.path);return assetLoader.load(n,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function a(t,e){this.imagesLoadedCb=e;var i,n=t.length;for(i=0;n>i;i+=1)t[i].layers||(t[i].t&&"seq"!==t[i].t?3===t[i].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[i]))):(this.totalImages+=1,this.images.push(this._createImageData(t[i]))))}function l(t){this.path=t||""}function h(t){this.assetsPath=t||""}function c(t){for(var e=0,i=this.images.length;i>e;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null}function u(){this.imagesLoadedCb=null,this.images.length=0}function d(){return this.totalImages===this.loadedAssets}function p(){return this.totalFootages===this.loadedFootagesCount}function f(t,e){"svg"===t?(this._elementHelper=e,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function m(){this._imageLoaded=t.bind(this),this._footageLoaded=e.bind(this),this.testImageLoaded=n.bind(this),this.createFootageData=o.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}var g=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();return m.prototype={loadAssets:a,setAssetsPath:h,setPath:l,loadedImages:d,loadedFootages:p,destroy:u,getAsset:c,createImgData:r,createImageData:s,imageLoaded:t,footageLoaded:e,setCacheType:f},m}(),featureSupport=function(){var t={maskType:!0};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),t}(),filtersFactory=function(){function t(t,e){var i=createNS("filter");return i.setAttribute("id",t),e!==!0&&(i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%")),i}function e(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),t}var i={};return i.createFilter=t,i.createAlphaToLuminanceFilter=e,i}(),assetLoader=function(){function t(t){return t.response&&"object"==typeof t.response?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}function e(e,i,n){var s,r=new XMLHttpRequest;try{r.responseType="json"}catch(o){}r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status)s=t(r),i(s);else try{s=t(r),i(s)}catch(e){n&&n(e)}},r.open("GET",e,!0),r.send()}return{load:e}}();TextAnimatorProperty.prototype.searchProperties=function(){var t,e,i=this._textData.a.length,n=PropertyFactory.getProp;for(t=0;i>t;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:n(this._elem,this._textData.p.a,0,0,this),f:n(this._elem,this._textData.p.f,0,0,this),l:n(this._elem,this._textData.p.l,0,0,this),r:n(this._elem,this._textData.p.r,0,0,this),p:n(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=n(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var i,n,s,r,o,a,l,h,c,u,d,p,f,m,g,v,y,b,x,S=this._moreOptions.alignment.v,C=this._animatorsData,k=this._textData,w=this.mHelper,E=this._renderType,T=this.renderedLetters.length,A=t.l;if(this._hasMaskedPath){if(x=this._pathData.m,!this._pathData.n||this._pathData._mdf){var M=x.v;this._pathData.r.v&&(M=M.reverse()),o={tLength:0,segments:[]},r=M._length-1;var L;for(v=0,s=0;r>s;s+=1)L=bez.buildBezierData(M.v[s],M.v[s+1],[M.o[s][0]-M.v[s][0],M.o[s][1]-M.v[s][1]],[M.i[s+1][0]-M.v[s+1][0],M.i[s+1][1]-M.v[s+1][1]]),o.tLength+=L.segmentLength,o.segments.push(L),v+=L.segmentLength;s=r,x.v.c&&(L=bez.buildBezierData(M.v[s],M.v[0],[M.o[s][0]-M.v[s][0],M.o[s][1]-M.v[s][1]],[M.i[0][0]-M.v[0][0],M.i[0][1]-M.v[0][1]]),o.tLength+=L.segmentLength,o.segments.push(L),v+=L.segmentLength),this._pathData.pi=o}if(o=this._pathData.pi,a=this._pathData.f.v,d=0,u=1,h=0,c=!0,m=o.segments,0>a&&x.v.c)for(o.tLengtha;)a+=f[u].partialLength,u-=1,0>u&&(d-=1,f=m[d].points,u=f.length-1);f=m[d].points,p=f[u-1],l=f[u],g=l.partialLength}r=A.length,i=0,n=0;var P,I,_,D,F,O=1.2*t.finalSize*.714,B=!0;D=C.length;var q,N,R,j,H,z,V,W,G,Y,X,U,K,Z=-1,$=a,J=d,Q=u,tt=-1,et="",it=this.defaultPropsArray;if(2===t.j||1===t.j){var nt=0,st=0,rt=2===t.j?-.5:-1,ot=0,at=!0;for(s=0;r>s;s+=1)if(A[s].n){for(nt&&(nt+=st);s>ot;)A[ot].animatorJustifyOffset=nt,ot+=1;nt=0,at=!0}else{for(_=0;D>_;_+=1)P=C[_].a,P.t.propType&&(at&&2===t.j&&(st+=P.t.v*rt),I=C[_].s,q=I.getMult(A[s].anIndexes[_],k.a[_].s.totalChars),nt+=q.length?P.t.v*q[0]*rt:P.t.v*q*rt);at=!1}for(nt&&(nt+=st);s>ot;)A[ot].animatorJustifyOffset=nt,ot+=1}for(s=0;r>s;s+=1){if(w.reset(),H=1,A[s].n)i=0,n+=t.yOffset,n+=B?1:0,a=$,B=!1,this._hasMaskedPath&&(d=J,u=Q,f=m[d].points,p=f[u-1],l=f[u],g=l.partialLength,h=0),et="",U="",Y="",K="",it=this.defaultPropsArray;else{if(this._hasMaskedPath){if(tt!==A[s].line){switch(t.j){case 1:a+=v-t.lineWidths[A[s].line];break;case 2:a+=(v-t.lineWidths[A[s].line])/2}tt=A[s].line}Z!==A[s].ind&&(A[Z]&&(a+=A[Z].extra),a+=A[s].an/2,Z=A[s].ind),a+=S[0]*A[s].an*.005;var lt=0;for(_=0;D>_;_+=1)P=C[_].a,P.p.propType&&(I=C[_].s,q=I.getMult(A[s].anIndexes[_],k.a[_].s.totalChars),lt+=q.length?P.p.v[0]*q[0]:P.p.v[0]*q),P.a.propType&&(I=C[_].s,q=I.getMult(A[s].anIndexes[_],k.a[_].s.totalChars),lt+=q.length?P.a.v[0]*q[0]:P.a.v[0]*q);for(c=!0,this._pathData.a.v&&(a=.5*A[0].an+(v-this._pathData.f.v-.5*A[0].an-.5*A[A.length-1].an)*Z/(r-1),a+=this._pathData.f.v);c;)h+g>=a+lt||!f?(y=(a+lt-h)/l.partialLength,R=p.point[0]+(l.point[0]-p.point[0])*y,j=p.point[1]+(l.point[1]-p.point[1])*y,w.translate(-S[0]*A[s].an*.005,.01*-(S[1]*O)),c=!1):f&&(h+=l.partialLength,u+=1,u>=f.length&&(u=0,d+=1,m[d]?f=m[d].points:x.v.c?(u=0,d=0,f=m[d].points):(h-=l.partialLength,f=null)),f&&(p=l,l=f[u],g=l.partialLength));N=A[s].an/2-A[s].add,w.translate(-N,0,0)}else N=A[s].an/2-A[s].add,w.translate(-N,0,0),w.translate(-S[0]*A[s].an*.005,-S[1]*O*.01,0);for(_=0;D>_;_+=1)P=C[_].a,P.t.propType&&(I=C[_].s,q=I.getMult(A[s].anIndexes[_],k.a[_].s.totalChars),(0!==i||0!==t.j)&&(this._hasMaskedPath?a+=q.length?P.t.v*q[0]:P.t.v*q:i+=q.length?P.t.v*q[0]:P.t.v*q));for(t.strokeWidthAnim&&(V=t.sw||0),t.strokeColorAnim&&(z=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(W=[t.fc[0],t.fc[1],t.fc[2]]),_=0;D>_;_+=1)P=C[_].a,P.a.propType&&(I=C[_].s,q=I.getMult(A[s].anIndexes[_],k.a[_].s.totalChars),q.length?w.translate(-P.a.v[0]*q[0],-P.a.v[1]*q[1],P.a.v[2]*q[2]):w.translate(-P.a.v[0]*q,-P.a.v[1]*q,P.a.v[2]*q));for(_=0;D>_;_+=1)P=C[_].a,P.s.propType&&(I=C[_].s,q=I.getMult(A[s].anIndexes[_],k.a[_].s.totalChars),q.length?w.scale(1+(P.s.v[0]-1)*q[0],1+(P.s.v[1]-1)*q[1],1):w.scale(1+(P.s.v[0]-1)*q,1+(P.s.v[1]-1)*q,1));for(_=0;D>_;_+=1){if(P=C[_].a,I=C[_].s,q=I.getMult(A[s].anIndexes[_],k.a[_].s.totalChars),P.sk.propType&&(q.length?w.skewFromAxis(-P.sk.v*q[0],P.sa.v*q[1]):w.skewFromAxis(-P.sk.v*q,P.sa.v*q)),P.r.propType&&(q.length?w.rotateZ(-P.r.v*q[2]):w.rotateZ(-P.r.v*q)),P.ry.propType&&(q.length?w.rotateY(P.ry.v*q[1]):w.rotateY(P.ry.v*q)),P.rx.propType&&(q.length?w.rotateX(P.rx.v*q[0]):w.rotateX(P.rx.v*q)),P.o.propType&&(H+=q.length?(P.o.v*q[0]-H)*q[0]:(P.o.v*q-H)*q),t.strokeWidthAnim&&P.sw.propType&&(V+=q.length?P.sw.v*q[0]:P.sw.v*q),t.strokeColorAnim&&P.sc.propType)for(G=0;3>G;G+=1)q.length?z[G]+=(P.sc.v[G]-z[G])*q[0]:z[G]+=(P.sc.v[G]-z[G])*q;if(t.fillColorAnim&&t.fc){if(P.fc.propType)for(G=0;3>G;G+=1)q.length?W[G]+=(P.fc.v[G]-W[G])*q[0]:W[G]+=(P.fc.v[G]-W[G])*q;P.fh.propType&&(W=q.length?addHueToRGB(W,P.fh.v*q[0]):addHueToRGB(W,P.fh.v*q)),P.fs.propType&&(W=q.length?addSaturationToRGB(W,P.fs.v*q[0]):addSaturationToRGB(W,P.fs.v*q)),P.fb.propType&&(W=q.length?addBrightnessToRGB(W,P.fb.v*q[0]):addBrightnessToRGB(W,P.fb.v*q))}}for(_=0;D>_;_+=1)P=C[_].a,P.p.propType&&(I=C[_].s,q=I.getMult(A[s].anIndexes[_],k.a[_].s.totalChars),this._hasMaskedPath?q.length?w.translate(0,P.p.v[1]*q[0],-P.p.v[2]*q[1]):w.translate(0,P.p.v[1]*q,-P.p.v[2]*q):q.length?w.translate(P.p.v[0]*q[0],P.p.v[1]*q[1],-P.p.v[2]*q[2]):w.translate(P.p.v[0]*q,P.p.v[1]*q,-P.p.v[2]*q));if(t.strokeWidthAnim&&(Y=0>V?0:V),t.strokeColorAnim&&(X="rgb("+Math.round(255*z[0])+","+Math.round(255*z[1])+","+Math.round(255*z[2])+")"),t.fillColorAnim&&t.fc&&(U="rgb("+Math.round(255*W[0])+","+Math.round(255*W[1])+","+Math.round(255*W[2])+")"),this._hasMaskedPath){if(w.translate(0,-t.ls),w.translate(0,S[1]*O*.01+n,0),this._pathData.p.v){b=(l.point[1]-p.point[1])/(l.point[0]-p.point[0]);var ht=180*Math.atan(b)/Math.PI;l.point[0]=T?(F=new LetterProps(K,Y,X,U,et,it),this.renderedLetters.push(F),T+=1,this.lettersChangedFlag=!0):(F=this.renderedLetters[s],this.lettersChangedFlag=F.update(K,Y,X,U,et,it)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),LetterProps.prototype.update=function(t,e,i,n,s,r){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var o=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,o=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,o=!0),this.sc!==i&&(this.sc=i,this._mdf.sc=!0,o=!0),this.fc!==n&&(this.fc=n,this._mdf.fc=!0,o=!0),this.m!==s&&(this.m=s,this._mdf.m=!0,o=!0),!r.length||this.p[0]===r[0]&&this.p[1]===r[1]&&this.p[4]===r[4]&&this.p[5]===r[5]&&this.p[12]===r[12]&&this.p[13]===r[13]||(this.p=r,this._mdf.p=!0,o=!0),o},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,i=this.keysIndex;if(this.lock)return void this.setCurrentData(this.currentData);this.lock=!0,this._mdf=!1;var n,s=this.effectsSequence.length,r=t||this.data.d.k[this.keysIndex].s;for(n=0;s>n;n+=1)r=i!==this.keysIndex?this.effectsSequence[n](r,r.t):this.effectsSequence[n](this.currentData,r.t);e!==r&&this.setCurrentData(r),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,i=0,n=t.length;n-1>=i&&!(i===n-1||t[i+1].t>e);)i+=1;return this.keysIndex!==i&&(this.keysIndex=i),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,i,n=[],s=0,r=t.length,o=!1;r>s;)e=t.charCodeAt(s),FontManager.isCombinedCharacter(e)?n[n.length-1]+=t.charAt(s):e>=55296&&56319>=e?(i=t.charCodeAt(s+1),i>=56320&&57343>=i?(o||FontManager.isModifier(e,i)?(n[n.length-1]+=t.substr(s,2),o=!1):n.push(t.substr(s,2)),s+=1):n.push(t.charAt(s))):e>56319?(i=t.charCodeAt(s+1),FontManager.isZeroWidthJoiner(e,i)?(o=!0,n[n.length-1]+=t.substr(s,2),s+=1):n.push(t.charAt(s))):FontManager.isZeroWidthJoiner(e)?(n[n.length-1]+=t.charAt(s),o=!0):n.push(t.charAt(s)),s+=1;return n},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,i,n,s,r,o,a,l=this.elem.globalData.fontManager,h=this.data,c=[],u=0,d=h.m.g,p=0,f=0,m=0,g=[],v=0,y=0,b=l.getFontByName(t.f),x=0,S=getFontProperties(b);t.fWeight=S.weight,t.fStyle=S.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),i=t.finalText.length,t.finalLineHeight=t.lh;var C,k=t.tr/1e3*t.finalSize;if(t.sz)for(var w,E,T=!0,A=t.sz[0],M=t.sz[1];T;){E=this.buildFinalText(t.t),w=0,v=0,i=E.length,k=t.tr/1e3*t.finalSize;var L=-1;for(e=0;i>e;e+=1)C=E[e].charCodeAt(0),n=!1," "===E[e]?L=e:(13===C||3===C)&&(v=0,n=!0,w+=t.finalLineHeight||1.2*t.finalSize),l.chars?(a=l.getCharData(E[e],b.fStyle,b.fFamily),x=n?0:a.w*t.finalSize/100):x=l.measureText(E[e],t.f,t.finalSize),v+x>A&&" "!==E[e]?(-1===L?i+=1:e=L,w+=t.finalLineHeight||1.2*t.finalSize,E.splice(e,L===e?1:0,"\r"),L=-1,v=0):(v+=x,v+=k);w+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&w>M?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=E,i=t.finalText.length,T=!1)}v=-k,x=0;var P,I=0;for(e=0;i>e;e+=1)if(n=!1,P=t.finalText[e],C=P.charCodeAt(0),13===C||3===C?(I=0,g.push(v),y=v>y?v:y,v=-2*k,s="",n=!0,m+=1):s=P,l.chars?(a=l.getCharData(P,b.fStyle,l.getFontByName(t.f).fFamily),x=n?0:a.w*t.finalSize/100):x=l.measureText(s,t.f,t.finalSize)," "===P?I+=x+k:(v+=x+k+I,I=0),c.push({l:x,an:x,add:p,n:n,anIndexes:[],val:s,line:m,animatorJustifyOffset:0}),2==d){if(p+=x,""===s||" "===s||e===i-1){for((""===s||" "===s)&&(p-=x);e>=f;)c[f].an=p,c[f].ind=u,c[f].extra=x,f+=1;u+=1,p=0}}else if(3==d){if(p+=x,""===s||e===i-1){for(""===s&&(p-=x);e>=f;)c[f].an=p,c[f].ind=u,c[f].extra=x,f+=1;p=0,u+=1}}else c[u].ind=u,c[u].extra=0,u+=1;if(t.l=c,y=v>y?v:y,g.push(v),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=y,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var _,D,F=h.a;o=F.length;var O,B,q=[];for(r=0;o>r;r+=1){for(_=F[r],_.a.sc&&(t.strokeColorAnim=!0),_.a.sw&&(t.strokeWidthAnim=!0),(_.a.fc||_.a.fh||_.a.fs||_.a.fb)&&(t.fillColorAnim=!0),B=0,O=_.s.b,e=0;i>e;e+=1)D=c[e],D.anIndexes[r]=B,(1==O&&""!==D.val||2==O&&""!==D.val&&" "!==D.val||3==O&&(D.n||" "==D.val||e==i-1)||4==O&&(D.n||e==i-1))&&(1===_.s.rn&&q.push(B),B+=1);h.a[r].s.totalChars=B;var N,R=-1;if(1===_.s.rn)for(e=0;i>e;e+=1)D=c[e],R!=D.anIndexes[r]&&(R=D.anIndexes[r],N=q.splice(Math.floor(Math.random()*q.length),1)[0]),D.anIndexes[r]=N}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var i=this.copyData({},this.data.d.k[e].s);i=this.copyData(i,t),this.data.d.k[e].s=i,this.recalculate(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){function t(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),"e"in e?this.e=PropertyFactory.getProp(t,e.e,0,0,this):this.e={v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}function e(e,i,n){return new t(e,i,n)}var i=Math.max,n=Math.min,s=Math.floor;return t.prototype={getMult:function(t){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var e=0,r=0,o=1,a=1;this.ne.v>0?e=this.ne.v/100:r=-this.ne.v/100,this.xe.v>0?o=1-this.xe.v/100:a=1+this.xe.v/100;var l=BezierFactory.getBezierEasing(e,r,o,a).get,h=0,c=this.finalS,u=this.finalE,d=this.data.sh;if(2===d)h=u===c?t>=u?1:0:i(0,n(.5/(u-c)+(t-c)/(u-c),1)),h=l(h);else if(3===d)h=u===c?t>=u?0:1:1-i(0,n(.5/(u-c)+(t-c)/(u-c),1)),h=l(h);else if(4===d)u===c?h=0:(h=i(0,n(.5/(u-c)+(t-c)/(u-c),1)),.5>h?h*=2:h=1-2*(h-.5)),h=l(h);else if(5===d){if(u===c)h=0;else{var p=u-c;t=n(i(0,t+.5-c),u-c);var f=-p/2+t,m=p/2;h=Math.sqrt(1-f*f/(m*m))}h=l(h)}else 6===d?(u===c?h=0:(t=n(i(0,t+.5-c),u-c),h=(1+Math.cos(Math.PI+2*Math.PI*t/(u-c)))/2),h=l(h)):(t>=s(c)&&(h=0>t-c?i(0,n(n(u,1)-(c-t),1)):i(0,n(u-t,1))),h=l(h));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var v=.5-.5*g;v>h?h=0:(h=(h-v)/g,h>1&&(h=1))}return h*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,i=this.o.v/e,n=this.s.v/e+i,s=this.e.v/e+i;if(n>s){var r=n;n=s,s=r}this.finalS=n,this.finalE=s}},extendPrototype([DynamicPropertyContainer],t),{getTextSelectorProp:e}}(),poolFactory=function(){return function(t,e,i){function n(){var t;return r?(r-=1,t=a[r]):t=e(),t}function s(t){r===o&&(a=pooling["double"](a),o*=2),i&&i(t),a[r]=t,r+=1}var r=0,o=t,a=createSizedArray(o),l={newElement:n,release:s};return l}}(),pooling=function(){function t(t){return t.concat(createSizedArray(t.length))}return{"double":t}}(),pointPool=function(){function t(){return createTypedArray("float32",2)}return poolFactory(8,t)}(),shapePool=function(){function t(){return new ShapePath}function e(t){var e,i=t._length;for(e=0;i>e;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}function i(t){var e,i=n.newElement(),s=void 0===t._length?t.v.length:t._length;for(i.setLength(s),i.c=t.c,e=0;s>e;e+=1)i.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return i}var n=poolFactory(4,t,e);return n.clone=i,n}(),shapeCollectionPool=function(){function t(){var t;return n?(n-=1,t=r[n]):t=new ShapeCollection,t}function e(t){var e,i=t._length;for(e=0;i>e;e+=1)shapePool.release(t.shapes[e]);t._length=0,n===s&&(r=pooling["double"](r),s*=2),r[n]=t,n+=1}var i={newShapeCollection:t,release:e},n=0,s=4,r=createSizedArray(s);return i}(),segmentsLengthPool=function(){function t(){return{lengths:[],totalLength:0}}function e(t){var e,i=t.lengths.length;for(e=0;i>e;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0}return poolFactory(8,t,e)}(),bezierLengthPool=function(){function t(){return{addedLength:0,percents:createTypedArray("float32",defaultCurveSegments),lengths:createTypedArray("float32",defaultCurveSegments)}}return poolFactory(8,t)}(),markerParser=function(){function t(t){for(var e,i=t.split("\r\n"),n={},s=0,r=0;r=0;e-=1)this.elements[e]||(i=this.layers[e],i.ip-i.st<=t-this.layers[e].st&&i.op-i.st>t-this.layers[e].st&&this.buildItem(e)),this.completeLayers=this.elements[e]?this.completeLayers:!1;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t);default:return this.createNull(t)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;e>t;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){this.completeLayers=!1;var e,i,n=t.length,s=this.layers.length;for(e=0;n>e;e+=1)for(i=0;s>i;){if(this.layers[i].id===t[e].id){this.layers[i]=t[e];break}i+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,i){for(var n=this.elements,s=this.layers,r=0,o=s.length;o>r;)s[r].ind==e&&(n[r]&&n[r]!==!0?(i.push(n[r]),n[r].setAsParent(),void 0!==s[r].parent?this.buildElementParenting(t,s[r].parent,i):t.setHierarchy(i)):(this.buildItem(r),this.addPendingElement(t))),r+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,i=t.length;for(e=0;i>e;e+=1)if(t[e].xt){var n=this.createComp(t[e]);n.initExpressions(),this.globalData.projectInterface.registerComposition(n)}},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}},extendPrototype([BaseRenderer],SVGRenderer),SVGRenderer.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRenderer.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRenderer.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRenderer.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},SVGRenderer.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRenderer.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),
this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,0,0)"),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var i=createNS("clipPath"),n=createNS("rect");n.setAttribute("width",t.w),n.setAttribute("height",t.h),n.setAttribute("x",0),n.setAttribute("y",0);var s=createElementID();i.setAttribute("id",s),i.appendChild(n),this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+s+")"),e.appendChild(i),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRenderer.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;e>t;t+=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRenderer.prototype.updateContainerSize=function(){},SVGRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var i=this.createItem(this.layers[t]);e[t]=i,expressionsPlugin&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(i),i.initExpressions()),this.appendElementInPos(i,t),this.layers[t].tt&&(this.elements[t-1]&&this.elements[t-1]!==!0?i.setMatte(e[t-1].layerId):(this.buildItem(t-1),this.addPendingElement(i)))}},SVGRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,i=this.elements.length;i>e;){if(this.elements[e]===t){t.setMatte(this.elements[e-1].layerId);break}e+=1}}},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,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var e,i=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=i-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;i>e;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRenderer.prototype.appendElementInPos=function(t,e){var i=t.getBaseElement();if(i){for(var n,s=0;e>s;)this.elements[s]&&this.elements[s]!==!0&&this.elements[s].getBaseElement()&&(n=this.elements[s].getBaseElement()),s+=1;n?this.layerElement.insertBefore(i,n):this.layerElement.appendChild(i)}},SVGRenderer.prototype.hide=function(){this.layerElement.style.display="none"},SVGRenderer.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseRenderer],CanvasRenderer),CanvasRenderer.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRenderer.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRenderer.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},CanvasRenderer.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRenderer.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRenderer.prototype.ctxTransform=function(t){if(1!==t[0]||0!==t[1]||0!==t[4]||1!==t[5]||0!==t[12]||0!==t[13]){if(!this.renderConfig.clearCanvas)return void this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13]);this.transformMat.cloneFromProps(t);var e=this.contextData.cTr.props;this.transformMat.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.contextData.cTr.cloneFromProps(this.transformMat.props);var i=this.contextData.cTr.props;this.canvasContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13])}},CanvasRenderer.prototype.ctxOpacity=function(t){return this.renderConfig.clearCanvas?(this.contextData.cO*=0>t?0:t,void(this.globalData.currentGlobalAlpha!==this.contextData.cO&&(this.canvasContext.globalAlpha=this.contextData.cO,this.globalData.currentGlobalAlpha=this.contextData.cO))):(this.canvasContext.globalAlpha*=0>t?0:t,void(this.globalData.currentGlobalAlpha=this.contextData.cO))},CanvasRenderer.prototype.reset=function(){return this.renderConfig.clearCanvas?void this.contextData.reset():void this.canvasContext.restore()},CanvasRenderer.prototype.save=function(t){if(!this.renderConfig.clearCanvas)return void this.canvasContext.save();t&&this.canvasContext.save();var e=this.contextData.cTr.props;this.contextData._length<=this.contextData.cArrPos&&this.contextData.duplicate();var i,n=this.contextData.saved[this.contextData.cArrPos];for(i=0;16>i;i+=1)n[i]=e[i];this.contextData.savedOp[this.contextData.cArrPos]=this.contextData.cO,this.contextData.cArrPos+=1},CanvasRenderer.prototype.restore=function(t){if(!this.renderConfig.clearCanvas)return void this.canvasContext.restore();t&&(this.canvasContext.restore(),this.globalData.blendMode="source-over"),this.contextData.cArrPos-=1;var e,i=this.contextData.saved[this.contextData.cArrPos],n=this.contextData.cTr.props;for(e=0;16>e;e+=1)n[e]=i[e];this.canvasContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13]),i=this.contextData.savedOp[this.contextData.cArrPos],this.contextData.cO=i,this.globalData.currentGlobalAlpha!==i&&(this.canvasContext.globalAlpha=i,this.globalData.currentGlobalAlpha=i)},CanvasRenderer.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var i="0px 0px 0px";e.transformOrigin=i,e.mozTransformOrigin=i,e.webkitTransformOrigin=i,e["-webkit-transform"]=i,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRenderer.prototype.updateContainerSize=function(){this.reset();var t,e;this.animationItem.wrapper&&this.animationItem.container?(t=this.animationItem.wrapper.offsetWidth,e=this.animationItem.wrapper.offsetHeight,this.animationItem.container.setAttribute("width",t*this.renderConfig.dpr),this.animationItem.container.setAttribute("height",e*this.renderConfig.dpr)):(t=this.canvasContext.canvas.width*this.renderConfig.dpr,e=this.canvasContext.canvas.height*this.renderConfig.dpr);var i,n;if(-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var s=this.renderConfig.preserveAspectRatio.split(" "),r=s[1]||"meet",o=s[0]||"xMidYMid",a=o.substr(0,4),l=o.substr(4);i=t/e,n=this.transformCanvas.w/this.transformCanvas.h,n>i&&"meet"===r||i>n&&"slice"===r?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=t/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=e/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr)),"xMid"===a&&(i>n&&"meet"===r||n>i&&"slice"===r)?this.transformCanvas.tx=(t-this.transformCanvas.w*(e/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===a&&(i>n&&"meet"===r||n>i&&"slice"===r)?this.transformCanvas.tx=(t-this.transformCanvas.w*(e/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,"YMid"===l&&(n>i&&"meet"===r||i>n&&"slice"===r)?this.transformCanvas.ty=(e-this.transformCanvas.h*(t/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===l&&(n>i&&"meet"===r||i>n&&"slice"===r)?this.transformCanvas.ty=(e-this.transformCanvas.h*(t/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=t/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=e/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRenderer.prototype.destroy=function(){this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText="");var t,e=this.layers?this.layers.length:0;for(t=e-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRenderer.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||this.renderConfig.clearCanvas!==!0||e)&&!this.destroyed&&-1!==t){this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i,n=this.layers.length;for(this.completeLayers||this.checkLayers(t),i=0;n>i;i+=1)(this.completeLayers||this.elements[i])&&this.elements[i].prepareFrame(t-this.layers[i].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),i=n-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&this.elements[i].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRenderer.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var i=this.createItem(this.layers[t],this,this.globalData);e[t]=i,i.initExpressions()}},CanvasRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();t.checkParenting()}},CanvasRenderer.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRenderer.prototype.show=function(){this.animationItem.container.style.display="block"},extendPrototype([BaseRenderer],HybridRenderer),HybridRenderer.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRenderer.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();t.checkParenting()}},HybridRenderer.prototype.appendElementInPos=function(t,e){var i=t.getBaseElement();if(i){var n=this.layers[e];if(n.ddd&&this.supports3d)this.addTo3dContainer(i,e);else if(this.threeDElements)this.addTo3dContainer(i,e);else{for(var s,r,o,a=0;e>a;)this.elements[a]&&this.elements[a]!==!0&&this.elements[a].getBaseElement&&(r=this.elements[a],o=this.layers[a].ddd?this.getThreeDContainerByPos(a):r.getBaseElement(),s=o||s),a+=1;s?n.ddd&&this.supports3d||this.layerElement.insertBefore(i,s):n.ddd&&this.supports3d||this.layerElement.appendChild(i)}}},HybridRenderer.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRenderer.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextLottieElement(t,this.globalData,this)},HybridRenderer.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRenderer.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)},HybridRenderer.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRenderer.prototype.createNull=SVGRenderer.prototype.createNull,HybridRenderer.prototype.getThreeDContainerByPos=function(t){for(var e=0,i=this.threeDElements.length;i>e;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRenderer.prototype.createThreeDContainer=function(t,e){var i,n,s=createTag("div");styleDiv(s);var r=createTag("div");if(styleDiv(r),"3d"===e){i=s.style,i.width=this.globalData.compSize.w+"px",i.height=this.globalData.compSize.h+"px";var o="50% 50%";i.webkitTransformOrigin=o,i.mozTransformOrigin=o,i.transformOrigin=o,n=r.style;var a="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";n.transform=a,n.webkitTransform=a}s.appendChild(r);var l={container:r,perspectiveElem:s,startPos:t,endPos:t,type:e};return this.threeDElements.push(l),l},HybridRenderer.prototype.build3dContainers=function(){var t,e,i=this.layers.length,n="";for(t=0;i>t;t+=1)this.layers[t].ddd&&3!==this.layers[t].ty?("3d"!==n&&(n="3d",e=this.createThreeDContainer(t,"3d")),e.endPos=Math.max(e.endPos,t)):("2d"!==n&&(n="2d",e=this.createThreeDContainer(t,"2d")),e.endPos=Math.max(e.endPos,t));for(i=this.threeDElements.length,t=i-1;t>=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRenderer.prototype.addTo3dContainer=function(t,e){for(var i=0,n=this.threeDElements.length;n>i;){if(e<=this.threeDElements[i].endPos){for(var s,r=this.threeDElements[i].startPos;e>r;)this.elements[r]&&this.elements[r].getBaseElement&&(s=this.elements[r].getBaseElement()),r+=1;s?this.threeDElements[i].container.insertBefore(t,s):this.threeDElements[i].container.appendChild(t);break}i+=1}},HybridRenderer.prototype.configAnimation=function(t){var e=createTag("div"),i=this.animationItem.wrapper,n=e.style;n.width=t.w+"px",n.height=t.h+"px",this.resizerElem=e,styleDiv(e),n.transformStyle="flat",n.mozTransformStyle="flat",n.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),i.appendChild(e),n.overflow="hidden";var s=createNS("svg");s.setAttribute("width","1"),s.setAttribute("height","1"),styleDiv(s),this.resizerElem.appendChild(s);var r=createNS("defs");s.appendChild(r),this.data=t,this.setupGlobalData(t,s),this.globalData.defs=r,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRenderer.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var t,e=this.layers?this.layers.length:0;for(t=0;e>t;t+=1)this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRenderer.prototype.updateContainerSize=function(){var t,e,i,n,s=this.animationItem.wrapper.offsetWidth,r=this.animationItem.wrapper.offsetHeight,o=s/r,a=this.globalData.compSize.w/this.globalData.compSize.h;a>o?(t=s/this.globalData.compSize.w,e=s/this.globalData.compSize.w,i=0,n=(r-this.globalData.compSize.h*(s/this.globalData.compSize.w))/2):(t=r/this.globalData.compSize.h,e=r/this.globalData.compSize.h,i=(s-this.globalData.compSize.w*(r/this.globalData.compSize.h))/2,n=0);var l=this.resizerElem.style;l.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+i+","+n+",0,1)",l.transform=l.webkitTransform},HybridRenderer.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRenderer.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRenderer.prototype.show=function(){this.resizerElem.style.display="block"},HybridRenderer.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,i=this.globalData.compSize.h,n=this.threeDElements.length;for(t=0;n>t;t+=1){var s=this.threeDElements[t].perspectiveElem.style;s.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(i,2))+"px",s.perspective=s.webkitPerspective}}},HybridRenderer.prototype.searchExtraCompositions=function(t){var e,i=t.length,n=createTag("div");for(e=0;i>e;e+=1)if(t[e].xt){var s=this.createComp(t[e],n,this.globalData.comp,null);s.initExpressions(),this.globalData.projectInterface.registerComposition(s)}},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,i=this.element.finalTransform.mat,n=this.masksProperties.length;for(e=0;n>e;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",i.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var s=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+locationHref+"#"+this.storedData[e].filterId+")")),s.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},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 n,s,r=" M"+e.v[0][0]+","+e.v[0][1];for(s=e._length,n=1;s>n;n+=1)r+=" C"+e.o[n-1][0]+","+e.o[n-1][1]+" "+e.i[n][0]+","+e.i[n][1]+" "+e.v[n][0]+","+e.v[n][1];if(e.c&&s>1&&(r+=" C"+e.o[n-1][0]+","+e.o[n-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),i.lastPath!==r){var o="";i.elem&&(e.c&&(o=t.inv?this.solidPath+r:r),i.elem.setAttribute("d",o)),i.lastPath=r}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var i,n=this.dynamicProperties.length;for(i=0;n>i;i+=1)(e||this._isParent&&"transform"===this.dynamicProperties[i].propType)&&(this.dynamicProperties[i].getValue(),this.dynamicProperties[i]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}},TransformElement.prototype={initTransform:function(){this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_opMdf:!1,mat:new Matrix},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),11!==this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,i=0,n=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;n>i;){if(this.hierarchy[i].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}i+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),i=0;n>i;i+=1)t=this.hierarchy[i].finalTransform.mProp.v.props,e.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var i=!0,n=this.comp;i;)n.finalTransform?(n.data.hasMask&&e.splice(0,0,n.finalTransform),n=n.comp):i=!1;var s,r,o=e.length;for(s=0;o>s;s+=1)r=e[s].mat.applyToPointArray(0,0,0),t=[t[0]-r[0],t[1]-r[1],0];return t},mHelper:new Matrix},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;e>t;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},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}}},function(){var t={initElement:function(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initTransform(t,e,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var t=this.baseElement||this.layerElement;t.style.display="none",this.hidden=!0}},show:function(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var t=this.baseElement||this.layerElement;t.style.display="block"}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}};extendPrototype([RenderableElement,createProxyFunction(t)],RenderableDOMElement)}(),SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,i){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=i,this.stops=[],this.setGradientData(i.pElem,e),this.setGradientOpacity(e,i),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var i=createElementID(),n=createNS(1===e.t?"linearGradient":"radialGradient");n.setAttribute("id",i),n.setAttribute("spreadMethod","pad"),n.setAttribute("gradientUnits","userSpaceOnUse");var s,r,o,a=[];for(o=4*e.g.p,r=0;o>r;r+=4)s=createNS("stop"),n.appendChild(s),a.push(s);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+locationHref+"#"+i+")"),this.gf=n,this.cst=a},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var i,n,s,r=createNS("mask"),o=createNS("path");r.appendChild(o);var a=createElementID(),l=createElementID();r.setAttribute("id",l);var h=createNS(1===t.t?"linearGradient":"radialGradient");h.setAttribute("id",a),h.setAttribute("spreadMethod","pad"),h.setAttribute("gradientUnits","userSpaceOnUse"),s=t.g.k.k[0].s?t.g.k.k[0].s.length:t.g.k.k.length;var c=this.stops;for(n=4*t.g.p;s>n;n+=2)i=createNS("stop"),i.setAttribute("stop-color","rgb(255,255,255)"),h.appendChild(i),c.push(i);o.setAttribute("gf"===t.ty?"fill":"stroke","url("+locationHref+"#"+a+")"),"gs"===t.ty&&(o.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),o.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),1===t.lj&&o.setAttribute("stroke-miterlimit",t.ml)),this.of=h,this.ms=r,this.ost=c,this.maskId=l,e.msElem=o}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var SVGElementsRenderer=function(){function t(t){switch(t.ty){case"fl":return n;case"gf":return r;case"gs":return s;case"st":return o;case"sh":case"el":case"rc":case"sr":return i;case"tr":return e;default:return null}}function e(t,e,i){(i||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(i||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function i(t,e,i){var n,s,r,o,h,c,u,d,p,f,m,g=e.styles.length,v=e.lvl;for(c=0;g>c;c+=1){if(o=e.sh._mdf||i,e.styles[c].lvl0;)o=e.transformers[m].mProps._mdf||o,f-=1,m-=1;if(o)for(f=v-e.styles[c].lvl,m=e.transformers.length-1;f>0;)p=e.transformers[m].mProps.v.props,d.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]),f-=1,m-=1}else d=a;if(u=e.sh.paths,s=u._length,o){for(r="",n=0;s>n;n+=1)h=u.shapes[n],h&&h._length&&(r+=buildShapeString(h,h._length,h.c,d));e.caches[c]=r}else r=e.caches[c];e.styles[c].d+=t.hd===!0?"":r,e.styles[c]._mdf=o||e.styles[c]._mdf}}function n(t,e,i){var n=e.style;(e.c._mdf||i)&&n.pElem.setAttribute("fill","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||i)&&n.pElem.setAttribute("fill-opacity",e.o.v)}function s(t,e,i){r(t,e,i),o(t,e,i)}function r(t,e,i){var n=e.gf,s=e.g._hasOpacity,r=e.s.v,o=e.e.v;if(e.o._mdf||i){var a="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(a,e.o.v)}if(e.s._mdf||i){var l=1===t.t?"x1":"cx",h="x1"===l?"y1":"cy";n.setAttribute(l,r[0]),n.setAttribute(h,r[1]),s&&!e.g._collapsable&&(e.of.setAttribute(l,r[0]),e.of.setAttribute(h,r[1]))}var c,u,d,p;if(e.g._cmdf||i){c=e.cst;var f=e.g.c;for(d=c.length,u=0;d>u;u+=1)p=c[u],p.setAttribute("offset",f[4*u]+"%"),p.setAttribute("stop-color","rgb("+f[4*u+1]+","+f[4*u+2]+","+f[4*u+3]+")")}if(s&&(e.g._omdf||i)){var m=e.g.o;for(c=e.g._collapsable?e.cst:e.ost,d=c.length,u=0;d>u;u+=1)p=c[u],e.g._collapsable||p.setAttribute("offset",m[2*u]+"%"),p.setAttribute("stop-opacity",m[2*u+1])}if(1===t.t)(e.e._mdf||i)&&(n.setAttribute("x2",o[0]),n.setAttribute("y2",o[1]),s&&!e.g._collapsable&&(e.of.setAttribute("x2",o[0]),e.of.setAttribute("y2",o[1])));else{var g;if((e.s._mdf||e.e._mdf||i)&&(g=Math.sqrt(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)),n.setAttribute("r",g),s&&!e.g._collapsable&&e.of.setAttribute("r",g)),e.e._mdf||e.h._mdf||e.a._mdf||i){g||(g=Math.sqrt(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)));var v=Math.atan2(o[1]-r[1],o[0]-r[0]),y=e.h.v;y>=1?y=.99:-1>=y&&(y=-.99);var b=g*y,x=Math.cos(v+e.a.v)*b+r[0],S=Math.sin(v+e.a.v)*b+r[1];n.setAttribute("fx",x),n.setAttribute("fy",S),s&&!e.g._collapsable&&(e.of.setAttribute("fx",x),e.of.setAttribute("fy",S))}}}function o(t,e,i){var n=e.style,s=e.d;s&&(s._mdf||i)&&s.dashStr&&(n.pElem.setAttribute("stroke-dasharray",s.dashStr),n.pElem.setAttribute("stroke-dashoffset",s.dashoffset[0])),e.c&&(e.c._mdf||i)&&n.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||i)&&n.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||i)&&(n.pElem.setAttribute("stroke-width",e.w.v),n.msElem&&n.msElem.setAttribute("stroke-width",e.w.v))}var a=new Matrix,l=new Matrix,h={createRenderFunction:t};return h}();ShapeTransformManager.prototype={addTransformSequence:function(t){var e,i=t.length,n="_";for(e=0;i>e;e+=1)n+=t[e].transform.key+"_";var s=this.sequences[n];return s||(s={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[n]=s,this.sequenceList.push(s)),s},processSequence:function(t,e){for(var i=0,n=t.transforms.length,s=e;n>i&&!e;){if(t.transforms[i].transform.mProps._mdf){s=!0;break}i+=1}if(s){var r;for(t.finalTransform.reset(),i=n-1;i>=0;i-=1)r=t.transforms[i].transform.mProps.v.props,t.finalTransform.transform(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],r[10],r[11],r[12],r[13],r[14],r[15])}t._mdf=s},processSequences:function(t){var e,i=this.sequenceList.length;for(e=0;i>e;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}},CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,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},initExpressions:function(){this.layerInterface=LayerExpressionInterface(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var t=EffectsExpressionInterface.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(t),0===this.data.ty||this.data.xt?this.compInterface=CompExpressionInterface(this):4===this.data.ty?(this.layerInterface.shapeInterface=ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=TextExpressionInterface(this),this.layerInterface.text=this.layerInterface.textInterface)},setBlendMode:function(){var t=getBlendMode(this.data.bm),e=this.baseElement||this.layerElement;e.style["mix-blend-mode"]=t},initBaseData:function(t,e,i){this.globalData=e,this.comp=i,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},
NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t,e,i,n=null;if(this.data.td){if(3==this.data.td||1==this.data.td){var s=createNS("mask");s.setAttribute("id",this.layerId),s.setAttribute("mask-type",3==this.data.td?"luminance":"alpha"),s.appendChild(this.layerElement),n=s,this.globalData.defs.appendChild(s),featureSupport.maskType||1!=this.data.td||(s.setAttribute("mask-type","luminance"),t=createElementID(),e=filtersFactory.createFilter(t),this.globalData.defs.appendChild(e),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),i=createNS("g"),i.appendChild(this.layerElement),n=i,s.appendChild(i),i.setAttribute("filter","url("+locationHref+"#"+t+")"))}else if(2==this.data.td){var r=createNS("mask");r.setAttribute("id",this.layerId),r.setAttribute("mask-type","alpha");var o=createNS("g");r.appendChild(o),t=createElementID(),e=filtersFactory.createFilter(t);var a=createNS("feComponentTransfer");a.setAttribute("in","SourceGraphic"),e.appendChild(a);var l=createNS("feFuncA");l.setAttribute("type","table"),l.setAttribute("tableValues","1.0 0.0"),a.appendChild(l),this.globalData.defs.appendChild(e);var h=createNS("rect");h.setAttribute("width",this.comp.data.w),h.setAttribute("height",this.comp.data.h),h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("fill","#ffffff"),h.setAttribute("opacity","0"),o.setAttribute("filter","url("+locationHref+"#"+t+")"),o.appendChild(h),o.appendChild(this.layerElement),n=o,featureSupport.maskType||(r.setAttribute("mask-type","luminance"),e.appendChild(filtersFactory.createAlphaToLuminanceFilter()),i=createNS("g"),o.appendChild(h),i.appendChild(this.layerElement),n=i,o.appendChild(i)),this.globalData.defs.appendChild(r)}}else this.data.tt?(this.matteElement.appendChild(this.layerElement),n=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(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.data.hd){var c=createNS("clipPath"),u=createNS("path");u.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var d=createElementID();if(c.setAttribute("id",d),c.appendChild(u),this.globalData.defs.appendChild(c),this.checkMasks()){var p=createNS("g");p.setAttribute("clip-path","url("+locationHref+"#"+d+")"),p.appendChild(this.layerElement),this.transformedElement=p,n?n.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+locationHref+"#"+d+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._matMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.mat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.mProp.o.v)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this)},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+locationHref+"#"+t+")")}},IShapeElement.prototype={addShapeToModifiers:function(t){var e,i=this.shapeModifiers.length;for(e=0;i>e;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=0,i=this.shapeModifiers.length;i>e;)if(this.shapeModifiers[e].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;e>t;t+=1)this.shapes[t].sh.reset();e=this.shapeModifiers.length;var i;for(t=e-1;t>=0&&!(i=this.shapeModifiers[t].processShapes(this._isFirstFrame));t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,i=0,n=e.length;n>i;){if(e[i].elem===t)return e[i].pos;i+=1}return 0},addProcessedElement:function(t,e){for(var i=this.processedElements,n=i.length;n;)if(n-=1,i[n].elem===t)return void(i[n].pos=e);i.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}},ITextElement.prototype.initElement=function(t,e,i){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,i),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)},ITextElement.prototype.createPathShape=function(t,e){var i,n,s=e.length,r="";for(i=0;s>i;i+=1)n=e[i].ks.k,r+=buildShapeString(n,n.i.length,!0,t);return r},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,i,n,s){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[i]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[i])/2,0,0)}e.translate(n,s,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initTransform(t,e,i),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!e.progressiveLoad)&&this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var i,n=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),i=n-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;e>t;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;e>t;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this.audio.volume(t)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){this.layerInterface=FootageInterface(this)},FootageElement.prototype.getFootageData=function(){return this.footageData},extendPrototype([SVGRenderer,ICompElement,SVGBaseElement],SVGCompElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,i=t.length,n=[],s="";i>e;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(n.push(s),s=""):s+=t[e],e+=1;return n.push(s),n},SVGTextLottieElement.prototype.buildNewText=function(){var t,e,i=this.textProperty.currentData;this.renderedLetters=createSizedArray(i?i.l.length:0),i.fc?this.layerElement.setAttribute("fill",this.buildColor(i.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),i.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(i.sc)),this.layerElement.setAttribute("stroke-width",i.sw)),this.layerElement.setAttribute("font-size",i.finalSize);var n=this.globalData.fontManager.getFontByName(i.f);if(n.fClass)this.layerElement.setAttribute("class",n.fClass);else{this.layerElement.setAttribute("font-family",n.fFamily);var s=i.fWeight,r=i.fStyle;this.layerElement.setAttribute("font-style",r),this.layerElement.setAttribute("font-weight",s)}this.layerElement.setAttribute("aria-label",i.t);var o=i.l||[],a=!!this.globalData.fontManager.chars;e=o.length;var l,h,c=this.mHelper,u="",d=this.data.singleShape,p=0,f=0,m=!0,g=.001*i.tr*i.finalSize;if(!d||a||i.sz){var v,y,b=this.textSpans.length;for(t=0;e>t;t+=1)a&&d&&0!==t||(l=b>t?this.textSpans[t]:createNS(a?"path":"text"),t>=b&&(l.setAttribute("stroke-linecap","butt"),l.setAttribute("stroke-linejoin","round"),l.setAttribute("stroke-miterlimit","4"),this.textSpans[t]=l,this.layerElement.appendChild(l)),l.style.display="inherit"),c.reset(),c.scale(i.finalSize/100,i.finalSize/100),d&&(o[t].n&&(p=-g,f+=i.yOffset,f+=m?1:0,m=!1),this.applyTextPropertiesToMatrix(i,c,o[t].line,p,f),p+=o[t].l||0,p+=g),a?(y=this.globalData.fontManager.getCharData(i.finalText[t],n.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily),v=y&&y.data||{},h=v.shapes?v.shapes[0].it:[],d?u+=this.createPathShape(c,h):l.setAttribute("d",this.createPathShape(c,h))):(d&&l.setAttribute("transform","translate("+c.props[12]+","+c.props[13]+")"),l.textContent=o[t].val,l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"));d&&l&&l.setAttribute("d",u)}else{var x=this.textContainer,S="start";switch(i.j){case 1:S="end";break;case 2:S="middle";break;default:S="start"}x.setAttribute("text-anchor",S),x.setAttribute("letter-spacing",g);var C=this.buildTextContents(i.finalText);for(e=C.length,f=i.ps?i.ps[1]+i.ascent:0,t=0;e>t;t+=1)l=this.textSpans[t]||createNS("tspan"),l.textContent=C[t],l.setAttribute("x",0),l.setAttribute("y",f),l.style.display="inherit",x.appendChild(l),this.textSpans[t]=l,f+=i.finalLineHeight;this.layerElement.appendChild(x)}for(;tt;t+=1)n[t].n||(s=i[t],r=this.textSpans[t],s._mdf.m&&r.setAttribute("transform",s.m),s._mdf.o&&r.setAttribute("opacity",s.o),s._mdf.sw&&r.setAttribute("stroke-width",s.sw),s._mdf.sc&&r.setAttribute("stroke",s.sc),s._mdf.fc&&r.setAttribute("fill",s.fc))}},extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,i,n,s=this.shapes.length,r=this.stylesList.length,o=[],a=!1;for(i=0;r>i;i+=1){for(n=this.stylesList[i],a=!1,o.length=0,t=0;s>t;t+=1)e=this.shapes[t],-1!==e.styles.indexOf(n)&&(o.push(e),a=e._isAnimated||a);o.length>1&&a&&this.setShapesAsAnimated(o)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,i=t.length;for(e=0;i>e;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var i,n=new SVGStyleData(t,e),s=n.pElem;if("st"===t.ty)i=new SVGStrokeStyleData(this,t,n);else if("fl"===t.ty)i=new SVGFillStyleData(this,t,n);else if("gf"===t.ty||"gs"===t.ty){var r="gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData;i=new r(this,t,n),this.globalData.defs.appendChild(i.gf),i.maskId&&(this.globalData.defs.appendChild(i.ms),this.globalData.defs.appendChild(i.of),s.setAttribute("mask","url("+locationHref+"#"+i.maskId+")"))}return("st"===t.ty||"gs"===t.ty)&&(s.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),s.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),s.setAttribute("fill-opacity","0"),1===t.lj&&s.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&s.setAttribute("fill-rule","evenodd"),t.ln&&s.setAttribute("id",t.ln),t.cl&&s.setAttribute("class",t.cl),t.bm&&(s.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(n),this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var i=TransformPropertyFactory.getTransformProperty(this,t,this),n=new SVGTransformData(i,i.o,e);return this.addToAnimatedContents(t,n),n},SVGShapeElement.prototype.createShapeElement=function(t,e,i){var n=4;"rc"===t.ty?n=5:"el"===t.ty?n=6:"sr"===t.ty&&(n=7);var s=ShapePropertyFactory.getShapeProp(this,t,n,this),r=new SVGShapeData(e,i,s);return this.shapes.push(r),this.addShapeToModifiers(r),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var i=0,n=this.animatedContents.length;n>i;){if(this.animatedContents[i].element===e)return;i+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,i=t.styles,n=this.stylesList.length;for(e=0;n>e;e+=1)this.stylesList[e].closed||i.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var t,e=this.itemsData.length;for(t=0;e>t;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;e>t;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()},SVGShapeElement.prototype.searchShapes=function(t,e,i,n,s,r,o){var a,l,h,c,u,d,p=[].concat(r),f=t.length-1,m=[],g=[];for(a=f;a>=0;a-=1){if(d=this.searchProcessedElement(t[a]),d?e[a]=i[d-1]:t[a]._render=o,"fl"===t[a].ty||"st"===t[a].ty||"gf"===t[a].ty||"gs"===t[a].ty)d?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],s),t[a]._render&&n.appendChild(e[a].style.pElem),m.push(e[a].style);else if("gr"===t[a].ty){if(d)for(h=e[a].it.length,l=0;h>l;l+=1)e[a].prevViewData[l]=e[a].it[l];else e[a]=this.createGroupElement(t[a]);this.searchShapes(t[a].it,e[a].it,e[a].prevViewData,e[a].gr,s+1,p,o),t[a]._render&&n.appendChild(e[a].gr)}else"tr"===t[a].ty?(d||(e[a]=this.createTransformElement(t[a],n)),c=e[a].transform,p.push(c)):"sh"===t[a].ty||"rc"===t[a].ty||"el"===t[a].ty||"sr"===t[a].ty?(d||(e[a]=this.createShapeElement(t[a],p,s)),this.setElementStyles(e[a])):"tm"===t[a].ty||"rd"===t[a].ty||"ms"===t[a].ty||"pb"===t[a].ty?(d?(u=e[a],u.closed=!1):(u=ShapeModifiers.getModifier(t[a].ty),u.init(this,t[a]),e[a]=u,this.shapeModifiers.push(u)),g.push(u)):"rp"===t[a].ty&&(d?(u=e[a],u.closed=!0):(u=ShapeModifiers.getModifier(t[a].ty),e[a]=u,u.init(this,t,a,e),this.shapeModifiers.push(u),o=!1),g.push(u));this.addProcessedElement(t[a],a+1)}for(f=m.length,a=0;f>a;a+=1)m[a].closed=!0;for(f=g.length,a=0;f>a;a+=1)g[a].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){this.renderModifiers();var t,e=this.stylesList.length;for(t=0;e>t;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;e>t;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,i=this.animatedContents.length;for(t=0;i>t;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&e.data!==!0&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v/100;this.matrixFilter.setAttribute("values",i[0]-e[0]+" 0 0 0 "+e[0]+" "+(i[1]-e[1])+" 0 0 0 "+e[1]+" "+(i[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 "+n+" 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,i=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3,i=this.filterManager.effectElements[0].p.v*e,n=this.filterManager.effectElements[1].p.v,s=3==n?0:i,r=2==n?0:i;this.feGaussianBlur.setAttribute("stdDeviation",s+" "+r);var o=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",o)}},SVGStrokeEffect.prototype.initialize=function(){var t,e,i,n,s=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(n=this.elem.maskManager.masksProperties.length,i=0):(i=this.filterManager.effectElements[0].p.v-1,n=i+1),e=createNS("g"),e.setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1),i;n>i;i+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:i});if(3===this.filterManager.effectElements[10].p.v){var r=createNS("mask"),o=createElementID();r.setAttribute("id",o),r.setAttribute("mask-type","alpha"),r.appendChild(e),this.elem.globalData.defs.appendChild(r);var a=createNS("g");for(a.setAttribute("mask","url("+locationHref+"#"+o+")");s[0];)a.appendChild(s[0]);this.elem.layerElement.appendChild(a),this.masker=r,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(s=this.elem.layerElement.children||this.elem.layerElement.childNodes;s.length;)this.elem.layerElement.removeChild(s[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){this.initialized||this.initialize();var e,i,n,s=this.paths.length;for(e=0;s>e;e+=1)if(-1!==this.paths[e].m&&(i=this.elem.maskManager.viewData[this.paths[e].m],n=this.paths[e].p,(t||this.filterManager._mdf||i.prop._mdf)&&n.setAttribute("d",i.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||i.prop._mdf)){var r;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var o=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),a=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),l=n.getTotalLength();r="0 0 0 "+l*o+" ";var h,c=l*(a-o),u=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,d=Math.floor(c/u);for(h=0;d>h;h+=1)r+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";r+="0 "+10*l+" 0 0"}else r="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;n.setAttribute("stroke-dasharray",r)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var p=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*p[0])+","+bmFloor(255*p[1])+","+bmFloor(255*p[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v,s=n[0]+" "+i[0]+" "+e[0],r=n[1]+" "+i[1]+" "+e[1],o=n[2]+" "+i[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",s),this.feFuncG.setAttribute("tableValues",r),this.feFuncB.setAttribute("tableValues",o)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var i=createNS(t);return i.setAttribute("type","table"),e.appendChild(i),i},SVGProLevelsFilter.prototype.getTableValue=function(t,e,i,n,s){for(var r,o,a=0,l=256,h=Math.min(t,e),c=Math.max(t,e),u=Array.call(null,{length:l}),d=0,p=s-n,f=e-t;256>=a;)r=a/256,o=h>=r?0>f?s:n:r>=c?0>f?n:s:n+p*Math.pow((r-t)/f,1/i),u[d]=o,d+=1,a+=256/(l-1);return u.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,i=this.filterManager.effectElements;this.feFuncRComposed&&(t||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf)&&(e=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf)&&(e=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf)&&(e=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf)&&(e=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf)&&(e=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var i=this.filterManager.effectElements[3].p.v,n=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=i*Math.cos(n),r=i*Math.sin(n);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",r)}}};var _svgMatteSymbols=[];SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,i=_svgMatteSymbols.length;i>e;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var i=t.layerElement.parentNode;if(i){for(var n=i.children,s=0,r=n.length;r>s&&n[s]!==t.layerElement;)s+=1;var o;r-2>=s&&(o=n[s+1]);var a=createNS("use");a.setAttribute("href","#"+e),o?i.insertBefore(a,o):i.appendChild(a)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var i=createElementID(),n=createNS("mask");n.setAttribute("id",e.layerId),n.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var s=t.globalData.defs;s.appendChild(n);var r=createNS("symbol");r.setAttribute("id",i),this.replaceInParent(e,i),r.appendChild(e.layerElement),s.appendChild(r);var o=createNS("use");o.setAttribute("href","#"+i),n.appendChild(o),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,i=0,n=e.length;n>i;)e[i]&&e[i].data.ind===t&&this.setElementAsMask(this.elem,e[i]),i+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGEffects.prototype.renderFrame=function(t){var e,i=this.filters.length;for(e=0;i>e;e+=1)this.filters[e].renderFrame(t)},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=this.savedOp;this.savedOp=createTypedArray("float32",t),this.savedOp.set(e);var i=0;for(i=this._length;t>i;i+=1)this.saved[i]=createTypedArray("float32",16);this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.cO=1},CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){this.canvasContext=this.globalData.canvasContext,this.renderableEffectsManager=new CVEffects(this)},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},renderFrame:function(){if(!this.hidden&&!this.data.hd){this.renderTransform(),this.renderRenderable(),this.setBlendMode();var t=0===this.data.ty;this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.mat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v),this.renderInnerContent(),this.globalData.renderer.restore(t),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,i,n=t.getContext("2d"),s=this.img.width,r=this.img.height,o=s/r,a=this.assetData.w/this.assetData.h,l=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;o>a&&"xMidYMid slice"===l||a>o&&"xMidYMid slice"!==l?(i=r,e=i*a):(e=s,i=e/a),n.drawImage(this.img,(s-e)/2,(r-i)/2,e,i,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([CanvasRenderer,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.beginPath(),t.moveTo(0,0),t.lineTo(this.data.w,0),t.lineTo(this.data.w,this.data.h),t.lineTo(0,this.data.h),t.lineTo(0,0),t.clip();var e,i=this.layers.length;for(e=i-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var t,e=this.layers.length;for(t=e-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();
this.layers=null,this.elements=null},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t,e,i,n,s=this.element.finalTransform.mat,r=this.element.canvasContext,o=this.masksProperties.length;for(r.beginPath(),t=0;o>t;t+=1)if("n"!==this.masksProperties[t].mode){this.masksProperties[t].inv&&(r.moveTo(0,0),r.lineTo(this.element.globalData.compSize.w,0),r.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),r.lineTo(0,this.element.globalData.compSize.h),r.lineTo(0,0)),n=this.viewData[t].v,e=s.applyToPointArray(n.v[0][0],n.v[0][1],0),r.moveTo(e[0],e[1]);var a,l=n._length;for(a=1;l>a;a+=1)i=s.applyToTriplePoints(n.o[a-1],n.i[a],n.v[a]),r.bezierCurveTo(i[0],i[1],i[2],i[3],i[4],i[5]);i=s.applyToTriplePoints(n.o[a-1],n.i[0],n.v[0]),r.bezierCurveTo(i[0],i[1],i[2],i[3],i[4],i[5])}this.element.globalData.renderer.save(!0),r.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var i={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:t.hd===!0},n={};if("fl"===t.ty||"st"===t.ty?(n.c=PropertyFactory.getProp(this,t.c,1,255,this),n.c.k||(i.co="rgb("+bmFloor(n.c.v[0])+","+bmFloor(n.c.v[1])+","+bmFloor(n.c.v[2])+")")):("gf"===t.ty||"gs"===t.ty)&&(n.s=PropertyFactory.getProp(this,t.s,1,null,this),n.e=PropertyFactory.getProp(this,t.e,1,null,this),n.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),n.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),n.g=new GradientProperty(this,t.g,this)),n.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(i.lc=lineCapEnum[t.lc||2],i.lj=lineJoinEnum[t.lj||2],1==t.lj&&(i.ml=t.ml),n.w=PropertyFactory.getProp(this,t.w,0,null,this),n.w.k||(i.wi=n.w.v),t.d){var s=new DashProperty(this,t.d,"canvas",this);n.d=s,n.d.k||(i.da=n.d.dashArray,i["do"]=n.d.dashoffset[0])}}else i.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(i),n.style=i,n},CVShapeElement.prototype.createGroupElement=function(){var t={it:[],prevViewData:[]};return t},CVShapeElement.prototype.createTransformElement=function(t){var e={transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}};return e},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var t,e=this.itemsData.length;for(t=0;e>t;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;e>t;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,i=this.stylesList.length;for(e=0;i>e;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;e>t;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,i=t.length;for(e=0;i>e;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,i,n,s){var r,o,a,l,h,c,u=t.length-1,d=[],p=[],f=[].concat(s);for(r=u;r>=0;r-=1){if(l=this.searchProcessedElement(t[r]),l?e[r]=i[l-1]:t[r]._shouldRender=n,"fl"===t[r].ty||"st"===t[r].ty||"gf"===t[r].ty||"gs"===t[r].ty)l?e[r].style.closed=!1:e[r]=this.createStyleElement(t[r],f),d.push(e[r].style);else if("gr"===t[r].ty){if(l)for(a=e[r].it.length,o=0;a>o;o+=1)e[r].prevViewData[o]=e[r].it[o];else e[r]=this.createGroupElement(t[r]);this.searchShapes(t[r].it,e[r].it,e[r].prevViewData,n,f)}else"tr"===t[r].ty?(l||(c=this.createTransformElement(t[r]),e[r]=c),f.push(e[r]),this.addTransformToStyleList(e[r])):"sh"===t[r].ty||"rc"===t[r].ty||"el"===t[r].ty||"sr"===t[r].ty?l||(e[r]=this.createShapeElement(t[r])):"tm"===t[r].ty||"rd"===t[r].ty||"pb"===t[r].ty?(l?(h=e[r],h.closed=!1):(h=ShapeModifiers.getModifier(t[r].ty),h.init(this,t[r]),e[r]=h,this.shapeModifiers.push(h)),p.push(h)):"rp"===t[r].ty&&(l?(h=e[r],h.closed=!0):(h=ShapeModifiers.getModifier(t[r].ty),e[r]=h,h.init(this,t,r,e),this.shapeModifiers.push(h),n=!1),p.push(h));this.addProcessedElement(t[r],r+1)}for(this.removeTransformFromStyleList(),this.closeStyles(d),u=p.length,r=0;u>r;r+=1)p[r].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e,i,n,s,r,o,a,l,h=this.stylesList.length,c=this.globalData.renderer,u=this.globalData.canvasContext;for(t=0;h>t;t+=1)if(l=this.stylesList[t],a=l.type,("st"!==a&&"gs"!==a||0!==l.wi)&&l.data._shouldRender&&0!==l.coOp&&0!==this.globalData.currentGlobalAlpha){for(c.save(),r=l.elements,"st"===a||"gs"===a?(u.strokeStyle="st"===a?l.co:l.grd,u.lineWidth=l.wi,u.lineCap=l.lc,u.lineJoin=l.lj,u.miterLimit=l.ml||0):u.fillStyle="fl"===a?l.co:l.grd,c.ctxOpacity(l.coOp),"st"!==a&&"gs"!==a&&u.beginPath(),c.ctxTransform(l.preTransforms.finalTransform.props),i=r.length,e=0;i>e;e+=1){for(("st"===a||"gs"===a)&&(u.beginPath(),l.da&&(u.setLineDash(l.da),u.lineDashOffset=l["do"])),o=r[e].trNodes,s=o.length,n=0;s>n;n+=1)"m"===o[n].t?u.moveTo(o[n].p[0],o[n].p[1]):"c"===o[n].t?u.bezierCurveTo(o[n].pts[0],o[n].pts[1],o[n].pts[2],o[n].pts[3],o[n].pts[4],o[n].pts[5]):u.closePath();("st"===a||"gs"===a)&&(u.stroke(),l.da&&u.setLineDash(this.dashResetter))}"st"!==a&&"gs"!==a&&u.fill(l.r),c.restore()}},CVShapeElement.prototype.renderShape=function(t,e,i,n){var s,r,o=e.length-1;for(r=t,s=o;s>=0;s-=1)"tr"===e[s].ty?(r=i[s].transform,this.renderShapeTransform(t,r)):"sh"===e[s].ty||"el"===e[s].ty||"rc"===e[s].ty||"sr"===e[s].ty?this.renderPath(e[s],i[s]):"fl"===e[s].ty?this.renderFill(e[s],i[s],r):"st"===e[s].ty?this.renderStroke(e[s],i[s],r):"gf"===e[s].ty||"gs"===e[s].ty?this.renderGradientFill(e[s],i[s],r):"gr"===e[s].ty?this.renderShape(r,e[s].it,i[s].it):"tm"===e[s].ty;n&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var i,n,s,r=t.trNodes,o=e.paths,a=o._length;r.length=0;var l=t.transforms.finalTransform;for(s=0;a>s;s+=1){var h=o.shapes[s];if(h&&h.v){for(n=h._length,i=1;n>i;i+=1)1===i&&r.push({t:"m",p:l.applyToPointArray(h.v[0][0],h.v[0][1],0)}),r.push({t:"c",pts:l.applyToTriplePoints(h.o[i-1],h.i[i],h.v[i])});1===n&&r.push({t:"m",p:l.applyToPointArray(h.v[0][0],h.v[0][1],0)}),h.c&&n&&(r.push({t:"c",pts:l.applyToTriplePoints(h.o[i-1],h.i[0],h.v[0])}),r.push({t:"z"}))}}t.trNodes=r}},CVShapeElement.prototype.renderPath=function(t,e){if(t.hd!==!0&&t._shouldRender){var i,n=e.styledShapes.length;for(i=0;n>i;i+=1)this.renderStyledShape(e.styledShapes[i],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,i){var n=e.style;(e.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||i._opMdf||this._isFirstFrame)&&(n.coOp=e.o.v*i.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,i){var n,s=e.style;if(!s.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var r=this.globalData.canvasContext,o=e.s.v,a=e.e.v;if(1===t.t)n=r.createLinearGradient(o[0],o[1],a[0],a[1]);else{var l=Math.sqrt(Math.pow(o[0]-a[0],2)+Math.pow(o[1]-a[1],2)),h=Math.atan2(a[1]-o[1],a[0]-o[0]),c=e.h.v;c>=1?c=.99:-1>=c&&(c=-.99);var u=l*c,d=Math.cos(h+e.a.v)*u+o[0],p=Math.sin(h+e.a.v)*u+o[1];n=r.createRadialGradient(d,p,0,o[0],o[1],l)}var f,m=t.g.p,g=e.g.c,v=1;for(f=0;m>f;f+=1)e.g._hasOpacity&&e.g._collapsable&&(v=e.g.o[2*f+1]),n.addColorStop(g[4*f]/100,"rgba("+g[4*f+1]+","+g[4*f+2]+","+g[4*f+3]+","+v+")");s.grd=n}s.coOp=e.o.v*i.opacity},CVShapeElement.prototype.renderStroke=function(t,e,i){var n=e.style,s=e.d;s&&(s._mdf||this._isFirstFrame)&&(n.da=s.dashArray,n["do"]=s.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||i._opMdf||this._isFirstFrame)&&(n.coOp=e.o.v*i.opacity),(e.w._mdf||this._isFirstFrame)&&(n.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.fillStyle=this.data.sc,t.fillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var i=!1;t.sc&&(i=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var n,s,r=this.globalData.fontManager.getFontByName(t.f),o=t.l,a=this.mHelper;this.stroke=i,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,s=t.finalText.length;var l,h,c,u,d,p,f,m,g,v,y=this.data.singleShape,b=.001*t.tr*t.finalSize,x=0,S=0,C=!0,k=0;for(n=0;s>n;n+=1){for(l=this.globalData.fontManager.getCharData(t.finalText[n],r.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily),h=l&&l.data||{},a.reset(),y&&o[n].n&&(x=-b,S+=t.yOffset,S+=C?1:0,C=!1),d=h.shapes?h.shapes[0].it:[],f=d.length,a.scale(t.finalSize/100,t.finalSize/100),y&&this.applyTextPropertiesToMatrix(t,a,o[n].line,x,S),g=createSizedArray(f),p=0;f>p;p+=1){for(u=d[p].ks.k.i.length,m=d[p].ks.k,v=[],c=1;u>c;c+=1)1===c&&v.push(a.applyToX(m.v[0][0],m.v[0][1],0),a.applyToY(m.v[0][0],m.v[0][1],0)),v.push(a.applyToX(m.o[c-1][0],m.o[c-1][1],0),a.applyToY(m.o[c-1][0],m.o[c-1][1],0),a.applyToX(m.i[c][0],m.i[c][1],0),a.applyToY(m.i[c][0],m.i[c][1],0),a.applyToX(m.v[c][0],m.v[c][1],0),a.applyToY(m.v[c][0],m.v[c][1],0));v.push(a.applyToX(m.o[c-1][0],m.o[c-1][1],0),a.applyToY(m.o[c-1][0],m.o[c-1][1],0),a.applyToX(m.i[0][0],m.i[0][1],0),a.applyToY(m.i[0][0],m.i[0][1],0),a.applyToX(m.v[0][0],m.v[0][1],0),a.applyToY(m.v[0][0],m.v[0][1],0)),g[p]=v}y&&(x+=o[n].l,x+=b),this.textSpans[k]?this.textSpans[k].elem=g:this.textSpans[k]={elem:g},k+=1}},CVTextElement.prototype.renderInnerContent=function(){var t=this.canvasContext;t.font=this.values.fValue,t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4,this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var e,i,n,s,r,o,a=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;i=l.length;var h,c,u,d=null,p=null,f=null;for(e=0;i>e;e+=1)if(!l[e].n){if(h=a[e],h&&(this.globalData.renderer.save(),this.globalData.renderer.ctxTransform(h.p),this.globalData.renderer.ctxOpacity(h.o)),this.fill){for(h&&h.fc?d!==h.fc&&(d=h.fc,t.fillStyle=h.fc):d!==this.values.fill&&(d=this.values.fill,t.fillStyle=this.values.fill),c=this.textSpans[e].elem,s=c.length,this.globalData.canvasContext.beginPath(),n=0;s>n;n+=1)for(u=c[n],o=u.length,this.globalData.canvasContext.moveTo(u[0],u[1]),r=2;o>r;r+=6)this.globalData.canvasContext.bezierCurveTo(u[r],u[r+1],u[r+2],u[r+3],u[r+4],u[r+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.fill()}if(this.stroke){for(h&&h.sw?f!==h.sw&&(f=h.sw,t.lineWidth=h.sw):f!==this.values.sWidth&&(f=this.values.sWidth,t.lineWidth=this.values.sWidth),h&&h.sc?p!==h.sc&&(p=h.sc,t.strokeStyle=h.sc):p!==this.values.stroke&&(p=this.values.stroke,t.strokeStyle=this.values.stroke),c=this.textSpans[e].elem,s=c.length,this.globalData.canvasContext.beginPath(),n=0;s>n;n+=1)for(u=c[n],o=u.length,this.globalData.canvasContext.moveTo(u[0],u[1]),r=2;o>r;r+=6)this.globalData.canvasContext.bezierCurveTo(u[r],u[r+1],u[r+2],u[r+3],u[r+4],u[r+5]);this.globalData.canvasContext.closePath(),this.globalData.canvasContext.stroke()}h&&this.globalData.renderer.restore()}},CVEffects.prototype.renderFrame=function(){},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=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.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=HybridRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?(t=createNS("rect"),t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):(t=createTag("div"),t.style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([HybridRenderer,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(t,e){for(var i,n=0;e>n;)this.elements[n]&&this.elements[n].getBaseElement&&(i=this.elements[n].getBaseElement()),n+=1;i?this.layerElement.insertBefore(t,i):this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var i,n=t.length;for(i=0;n>i;i+=1)e=t[i].mProps.v.applyToPointArray(e[0],e[1],0);return e},HShapeElement.prototype.calculateShapeBoundingBox=function(t,e){var i,n,s,r,o,a=t.sh.v,l=t.transformers,h=a._length;if(!(1>=h)){for(i=0;h-1>i;i+=1)n=this.getTransformedPoint(l,a.v[i]),s=this.getTransformedPoint(l,a.o[i]),r=this.getTransformedPoint(l,a.i[i+1]),o=this.getTransformedPoint(l,a.v[i+1]),this.checkBounds(n,s,r,o,e);a.c&&(n=this.getTransformedPoint(l,a.v[i]),s=this.getTransformedPoint(l,a.o[i]),r=this.getTransformedPoint(l,a.i[0]),o=this.getTransformedPoint(l,a.v[0]),this.checkBounds(n,s,r,o,e))}},HShapeElement.prototype.checkBounds=function(t,e,i,n,s){this.getBoundsOfCurve(t,e,i,n);var r=this.shapeBoundingBox;s.x=bmMin(r.left,s.x),s.xMax=bmMax(r.right,s.xMax),s.y=bmMin(r.top,s.y),s.yMax=bmMax(r.bottom,s.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(t,e,i,n){for(var s,r,o,a,l,h,c,u=[[t[0],n[0]],[t[1],n[1]]],d=0;2>d;++d)r=6*t[d]-12*e[d]+6*i[d],s=-3*t[d]+9*e[d]-9*i[d]+3*n[d],o=3*e[d]-3*t[d],r|=0,s|=0,o|=0,0===s&&0===r||(0===s?(a=-o/r,a>0&&1>a&&u[d].push(this.calculateF(a,t,e,i,n,d))):(l=r*r-4*o*s,l>=0&&(h=(-r+bmSqrt(l))/(2*s),h>0&&1>h&&u[d].push(this.calculateF(h,t,e,i,n,d)),c=(-r-bmSqrt(l))/(2*s),c>0&&1>c&&u[d].push(this.calculateF(c,t,e,i,n,d)))));this.shapeBoundingBox.left=bmMin.apply(null,u[0]),this.shapeBoundingBox.top=bmMin.apply(null,u[1]),this.shapeBoundingBox.right=bmMax.apply(null,u[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,u[1])},HShapeElement.prototype.calculateF=function(t,e,i,n,s,r){return bmPow(1-t,3)*e[r]+3*bmPow(1-t,2)*t*i[r]+3*(1-t)*bmPow(t,2)*n[r]+bmPow(t,3)*s[r]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var i,n=t.length;for(i=0;n>i;i+=1)t[i]&&t[i].sh?this.calculateShapeBoundingBox(t[i],e):t[i]&&t[i].it&&this.calculateBoundingBox(t[i].it,e)},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMaxo;o+=1){if(this.globalData.fontManager.chars?(this.textPaths[m]?h=this.textPaths[m]:(h=createNS("path"),h.setAttribute("stroke-linecap",lineCapEnum[1]),h.setAttribute("stroke-linejoin",lineJoinEnum[2]),h.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[m]?(c=this.textSpans[m],u=c.children[0]):(c=createTag("div"),c.style.lineHeight=0,u=createNS("svg"),u.appendChild(h),styleDiv(c)))):this.isMasked?h=this.textPaths[m]?this.textPaths[m]:createNS("text"):this.textSpans[m]?(c=this.textSpans[m],h=this.textPaths[m]):(c=createTag("span"),styleDiv(c),h=createTag("span"),styleDiv(h),c.appendChild(h)),this.globalData.fontManager.chars){var g,v=this.globalData.fontManager.getCharData(t.finalText[o],n.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(g=v?v.data:null,p.reset(),g&&g.shapes&&(d=g.shapes[0].it,p.scale(t.finalSize/100,t.finalSize/100),f=this.createPathShape(p,d),h.setAttribute("d",f)),this.isMasked)this.innerElem.appendChild(h);else{if(this.innerElem.appendChild(c),g&&g.shapes){document.body.appendChild(u);var y=u.getBBox();u.setAttribute("width",y.width+2),u.setAttribute("height",y.height+2),u.setAttribute("viewBox",y.x-1+" "+(y.y-1)+" "+(y.width+2)+" "+(y.height+2));var b=u.style,x="translate("+(y.x-1)+"px,"+(y.y-1)+"px)";b.transform=x,b.webkitTransform=x,l[o].yOffset=y.y-1}else u.setAttribute("width",1),u.setAttribute("height",1);c.appendChild(u)}}else if(h.textContent=l[o].val,h.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(h);else{this.innerElem.appendChild(c);var S=h.style,C="translate3d(0,"+-t.finalSize/1.2+"px,0)";S.transform=C,S.webkitTransform=C}this.isMasked?this.textSpans[m]=h:this.textSpans[m]=c,this.textSpans[m].style.display="block",this.textPaths[m]=h,m+=1}for(;mi;i+=1)o[i].n?s+=1:(l=this.textSpans[i],h=this.textPaths[i],a=r[s],s+=1,a._mdf.m&&(this.isMasked?l.setAttribute("transform",a.m):(l.style.webkitTransform=a.m,l.style.transform=a.m)),l.style.opacity=a.o,a.sw&&a._mdf.sw&&h.setAttribute("stroke-width",a.sw),a.sc&&a._mdf.sc&&h.setAttribute("stroke",a.sc),a.fc&&a._mdf.fc&&(h.setAttribute("fill",a.fc),h.style.color=a.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var c=this.innerElem.getBBox();this.currentBBox.w!==c.width&&(this.currentBBox.w=c.width,this.svgElement.setAttribute("width",c.width)),this.currentBBox.h!==c.height&&(this.currentBBox.h=c.height,this.svgElement.setAttribute("height",c.height));var u=1;if(this.currentBBox.w!==c.width+2*u||this.currentBBox.h!==c.height+2*u||this.currentBBox.x!==c.x-u||this.currentBBox.y!==c.y-u){this.currentBBox.w=c.width+2*u,this.currentBBox.h=c.height+2*u,this.currentBBox.x=c.x-u,this.currentBBox.y=c.y-u,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var d="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=d,t.webkitTransform=d}}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e,i,n,s=this.comp.threeDElements.length;for(t=0;s>t;t+=1)if(e=this.comp.threeDElements[t],"3d"===e.type){i=e.perspectiveElem.style,n=e.container.style;var r=this.pe.v+"px",o="0px 0px 0px",a="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";i.perspective=r,i.webkitPerspective=r,n.transformOrigin=o,n.mozTransformOrigin=o,n.webkitTransformOrigin=o,i.transform=a,i.webkitTransform=a}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t,e,i=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;e>t;t+=1)i=this.hierarchy[t].finalTransform.mProp._mdf||i;if(i||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(e=this.hierarchy.length-1,t=e;t>=0;t-=1){var n=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-n.p.v[0],-n.p.v[1],n.p.v[2]),this.mat.rotateX(-n.or.v[0]).rotateY(-n.or.v[1]).rotateZ(n.or.v[2]),this.mat.rotateX(-n.rx.v).rotateY(-n.ry.v).rotateZ(n.rz.v),this.mat.scale(1/n.s.v[0],1/n.s.v[1],1/n.s.v[2]),this.mat.translate(n.a.v[0],n.a.v[1],n.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var s;s=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var r=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),o=[s[0]/r,s[1]/r,s[2]/r],a=Math.sqrt(o[2]*o[2]+o[0]*o[0]),l=Math.atan2(o[1],a),h=Math.atan2(o[0],-o[2]);this.mat.rotateY(h).rotateX(-l)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var c=!this._prevMat.equals(this.mat);if((c||this.pe._mdf)&&this.comp.threeDElements){e=this.comp.threeDElements.length;var u,d,p;for(t=0;e>t;t+=1)if(u=this.comp.threeDElements[t],"3d"===u.type){if(c){var f=this.mat.toCSS();p=u.container.style,p.transform=f,p.webkitTransform=f}this.pe._mdf&&(d=u.perspectiveElem.style,d.perspective=this.pe.v+"px",d.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},HEffects.prototype.renderFrame=function(){};var animationManager=function(){function t(t){for(var e=0,i=t.target;M>e;)T[e].animation===i&&(T.splice(e,1),e-=1,M-=1,i.isPaused||s()),e+=1}function e(t,e){if(!t)return null;for(var i=0;M>i;){if(T[i].elem===t&&null!==T[i].elem)return T[i].animation;i+=1}var n=new AnimationItem;return r(n,t),n.setData(t,e),n}function i(){var t,e=T.length,i=[];for(t=0;e>t;t+=1)i.push(T[t].animation);return i}function n(){L+=1,b()}function s(){L-=1}function r(e,i){e.addEventListener("destroy",t),e.addEventListener("_active",n),e.addEventListener("_idle",s),T.push({elem:i,animation:e}),M+=1}function o(t){var e=new AnimationItem;return r(e,null),e.setParams(t),e}function a(t,e){var i;for(i=0;M>i;i+=1)T[i].animation.setSpeed(t,e)}function l(t,e){var i;for(i=0;M>i;i+=1)T[i].animation.setDirection(t,e)}function h(t){var e;for(e=0;M>e;e+=1)T[e].animation.play(t)}function c(t){var e,i=t-A;for(e=0;M>e;e+=1)T[e].animation.advanceTime(i);A=t,L&&!I?window.requestAnimationFrame(c):P=!0}function u(t){A=t,window.requestAnimationFrame(c)}function d(t){var e;for(e=0;M>e;e+=1)T[e].animation.pause(t)}function p(t,e,i){var n;for(n=0;M>n;n+=1)T[n].animation.goToAndStop(t,e,i)}function f(t){var e;for(e=0;M>e;e+=1)T[e].animation.stop(t)}function m(t){var e;for(e=0;M>e;e+=1)T[e].animation.togglePause(t)}function g(t){var e;for(e=M-1;e>=0;e-=1)T[e].animation.destroy(t)}function v(t,i,n){var s,r=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),o=r.length;for(s=0;o>s;s+=1)n&&r[s].setAttribute("data-bm-type",n),e(r[s],t);if(i&&0===o){n||(n="svg");var a=document.getElementsByTagName("body")[0];a.innerText="";var l=createTag("div");l.style.width="100%",l.style.height="100%",l.setAttribute("data-bm-type",n),a.appendChild(l),e(l,t)}}function y(){var t;for(t=0;M>t;t+=1)T[t].animation.resize()}function b(){!I&&L&&P&&(window.requestAnimationFrame(u),P=!1)}function x(){I=!0}function S(){I=!1,b()}function C(t,e){var i;for(i=0;M>i;i+=1)T[i].animation.setVolume(t,e)}function k(t){var e;for(e=0;M>e;e+=1)T[e].animation.mute(t)}function w(t){var e;for(e=0;M>e;e+=1)T[e].animation.unmute(t)}var E={},T=[],A=0,M=0,L=0,P=!0,I=!1;return E.registerAnimation=e,E.loadAnimation=o,E.setSpeed=a,E.setDirection=l,E.play=h,E.pause=d,E.stop=f,E.togglePause=m,E.searchAnimations=v,E.resize=y,E.goToAndStop=p,E.destroy=g,E.freeze=x,E.unfreeze=S,E.setVolume=C,E.mute=k,E.unmute=w,E.getRegisteredAnimations=i,E}(),AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=subframeEnabled,
this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[]};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";switch(t.animType?e=t.animType:t.renderer&&(e=t.renderer),e){case"canvas":this.renderer=new CanvasRenderer(this,t.rendererSettings);break;case"svg":this.renderer=new SVGRenderer(this,t.rendererSettings);break;default:this.renderer=new HybridRenderer(this,t.rendererSettings)}this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||t.loop===!0?this.loop=!0:t.loop===!1?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(t,"autoloadSegments")?t.autoloadSegments:!0,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.configAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=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")),assetLoader.load(t.path,this.configAnimation.bind(this),function(){this.trigger("data_failed")}.bind(this)))},AnimationItem.prototype.setData=function(t,e){e&&"object"!=typeof e&&(e=JSON.parse(e));var i={wrapper:t,animationData:e},n=t.attributes;i.path=n.getNamedItem("data-animation-path")?n.getNamedItem("data-animation-path").value:n.getNamedItem("data-bm-path")?n.getNamedItem("data-bm-path").value:n.getNamedItem("bm-path")?n.getNamedItem("bm-path").value:"",i.animType=n.getNamedItem("data-anim-type")?n.getNamedItem("data-anim-type").value:n.getNamedItem("data-bm-type")?n.getNamedItem("data-bm-type").value:n.getNamedItem("bm-type")?n.getNamedItem("bm-type").value:n.getNamedItem("data-bm-renderer")?n.getNamedItem("data-bm-renderer").value:n.getNamedItem("bm-renderer")?n.getNamedItem("bm-renderer").value:"canvas";var s=n.getNamedItem("data-anim-loop")?n.getNamedItem("data-anim-loop").value:n.getNamedItem("data-bm-loop")?n.getNamedItem("data-bm-loop").value:n.getNamedItem("bm-loop")?n.getNamedItem("bm-loop").value:"";"false"===s?i.loop=!1:"true"===s?i.loop=!0:""!==s&&(i.loop=parseInt(s,10));var r=n.getNamedItem("data-anim-autoplay")?n.getNamedItem("data-anim-autoplay").value:n.getNamedItem("data-bm-autoplay")?n.getNamedItem("data-bm-autoplay").value:n.getNamedItem("bm-autoplay")?n.getNamedItem("bm-autoplay").value:!0;i.autoplay="false"!==r,i.name=n.getNamedItem("data-name")?n.getNamedItem("data-name").value:n.getNamedItem("data-bm-name")?n.getNamedItem("data-bm-name").value:n.getNamedItem("bm-name")?n.getNamedItem("bm-name").value:"";var o=n.getNamedItem("data-anim-prerender")?n.getNamedItem("data-anim-prerender").value:n.getNamedItem("data-bm-prerender")?n.getNamedItem("data-bm-prerender").value:n.getNamedItem("bm-prerender")?n.getNamedItem("bm-prerender").value:"";"false"===o&&(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));var e,i,n=this.animationData.layers,s=n.length,r=t.layers,o=r.length;for(i=0;o>i;i+=1)for(e=0;s>e;){if(n[e].id===r[i].id){n[e]=r[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(s=t.assets.length,e=0;s>e;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),this.renderer.includeLayers(t.layers),expressionsPlugin&&expressionsPlugin.initExpressions(this),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.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var i=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,assetLoader.load(i,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()&&(this.isLoaded=!0,dataManager.completeData(this.animationData,this.renderer.globalData.fontManager),expressionsPlugin&&expressionsPlugin.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play())},AnimationItem.prototype.resize=function(){this.renderer.updateContainerSize()},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame()},AnimationItem.prototype.renderFrame=function(){if(this.isLoaded!==!1&&this.renderer)try{this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||this.isPaused===!0&&(this.isPaused=!1,this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||this.isPaused===!1&&(this.isPaused=!0,this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(this.isPaused===!0?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,i=0;i=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(i=!0,e=this.totalFrames-1):0>e?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&this.loop!==!0?(i=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),i&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var i=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(i=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==i&&this.goToAndStop(i,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"==typeof t[0]){var i,n=t.length;for(i=0;n>i;i+=1)this.segments.push(t[i])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return this.segments.length?(this.adjustSegment(this.segments.shift(),t),!0):!1},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.renderer=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,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.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var i=t.p;-1!==i.indexOf("images/")&&(i=i.split("/")[1]),e=this.assetsPath+i}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},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}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));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.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var Expressions=function(){function t(t){function e(){r+=1}function i(){r-=1,0===r&&s()}function n(t){-1===o.indexOf(t)&&o.push(t)}function s(){var t,e=o.length;for(t=0;e>t;t+=1)o[t].release();o.length=0}var r=0,o=[];t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=e,t.renderer.globalData.popExpression=i,t.renderer.globalData.registerExpressionProperty=n}var e={};return e.initExpressions=t,e}();expressionsPlugin=Expressions;var ExpressionManager=function(){function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||"boolean"===t||"string"===t||e instanceof Number}function $bm_neg(t){var e=typeof t;if("number"===e||"boolean"===e||t instanceof Number)return-t;if($bm_isInstanceOfArray(t)){var i,n=t.length,s=[];for(i=0;n>i;i+=1)s[i]=-t[i];return s}return t.propType?t.v:-t}function sum(t,e){var i=typeof t,n=typeof e;if("string"===i||"string"===n)return t+e;if(isNumerable(i,t)&&isNumerable(n,e))return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e))return t=t.slice(0),t[0]+=e,t;if(isNumerable(i,t)&&$bm_isInstanceOfArray(e))return e=e.slice(0),e[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,r=t.length,o=e.length,a=[];r>s||o>s;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?a[s]=t[s]+e[s]:a[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return a}return 0}function sub(t,e){var i=typeof t,n=typeof e;if(isNumerable(i,t)&&isNumerable(n,e))return"string"===i&&(t=parseInt(t,10)),"string"===n&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e))return t=t.slice(0),t[0]-=e,t;if(isNumerable(i,t)&&$bm_isInstanceOfArray(e))return e=e.slice(0),e[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var s=0,r=t.length,o=e.length,a=[];r>s||o>s;)("number"==typeof t[s]||t[s]instanceof Number)&&("number"==typeof e[s]||e[s]instanceof Number)?a[s]=t[s]-e[s]:a[s]=void 0===e[s]?t[s]:t[s]||e[s],s+=1;return a}return 0}function mul(t,e){var i,n=typeof t,s=typeof e;if(isNumerable(n,t)&&isNumerable(s,e))return t*e;var r,o;if($bm_isInstanceOfArray(t)&&isNumerable(s,e)){for(o=t.length,i=createTypedArray("float32",o),r=0;o>r;r+=1)i[r]=t[r]*e;return i}if(isNumerable(n,t)&&$bm_isInstanceOfArray(e)){for(o=e.length,i=createTypedArray("float32",o),r=0;o>r;r+=1)i[r]=t*e[r];return i}return 0}function div(t,e){var i,n=typeof t,s=typeof e;if(isNumerable(n,t)&&isNumerable(s,e))return t/e;var r,o;if($bm_isInstanceOfArray(t)&&isNumerable(s,e)){for(o=t.length,i=createTypedArray("float32",o),r=0;o>r;r+=1)i[r]=t[r]/e;return i}if(isNumerable(n,t)&&$bm_isInstanceOfArray(e)){for(o=e.length,i=createTypedArray("float32",o),r=0;o>r;r+=1)i[r]=t/e[r];return i}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}function clamp(t,e,i){if(e>i){var n=i;i=e,e=n}return Math.min(Math.max(t,e),i)}function radiansToDegrees(t){return t/degToRads}function degreesToRadians(t){return t*degToRads}function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);e||(e=helperLengthArray);var i,n=Math.min(t.length,e.length),s=0;for(i=0;n>i;i+=1)s+=Math.pow(e[i]-t[i],2);return Math.sqrt(s)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,i,n=t[0],s=t[1],r=t[2],o=Math.max(n,s,r),a=Math.min(n,s,r),l=(o+a)/2;if(o===a)e=0,i=0;else{var h=o-a;switch(i=l>.5?h/(2-o-a):h/(o+a),o){case n:e=(s-r)/h+(r>s?6:0);break;case s:e=(r-n)/h+2;break;case r:e=(n-s)/h+4}e/=6}return[e,i,l,t[3]]}function hue2rgb(t,e,i){return 0>i&&(i+=1),i>1&&(i-=1),1/6>i?t+6*(e-t)*i:.5>i?e:2/3>i?t+(e-t)*(2/3-i)*6:t}function hslToRgb(t){var e,i,n,s=t[0],r=t[1],o=t[2];if(0===r)e=o,n=o,i=o;else{var a=.5>o?o*(1+r):o+r-o*r,l=2*o-a;e=hue2rgb(l,a,s+1/3),i=hue2rgb(l,a,s),n=hue2rgb(l,a,s-1/3)}return[e,i,n,t[3]]}function linear(t,e,i,n,s){if((void 0===n||void 0===s)&&(n=e,s=i,e=0,i=1),e>i){var r=i;i=e,e=r}if(e>=t)return n;if(t>=i)return s;var o=i===e?0:(t-e)/(i-e);if(!n.length)return n+(s-n)*o;var a,l=n.length,h=createTypedArray("float32",l);for(a=0;l>a;a+=1)h[a]=n[a]+(s[a]-n[a])*o;return h}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var i,n=e.length;t||(t=createTypedArray("float32",n));var s=createTypedArray("float32",n),r=BMMath.random();for(i=0;n>i;i+=1)s[i]=t[i]+r*(e[i]-t[i]);return s}void 0===t&&(t=0);var o=BMMath.random();return t+o*(e-t)}function createPath(t,e,i,n){var s,r=t.length,o=shapePool.newElement();o.setPathData(!!n,r);var a,l,h=[0,0];for(s=0;r>s;s+=1)a=e&&e[s]?e[s]:h,l=i&&i[s]?i[s]:h,o.setTripleAt(t[s][0],t[s][1],l[0]+t[s][0],l[1]+t[s][1],a[0]+t[s][0],a[1]+t[s][1],s,!0);return o}function initiateExpression(elem,data,property){function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}function lookAt(t,e){var i=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],n=Math.atan2(i[0],Math.sqrt(i[1]*i[1]+i[2]*i[2]))/degToRads,s=-Math.atan2(i[1],i[2])/degToRads;return[s,n,0]}function easeOut(t,e,i,n,s){return applyEase(easeOutBez,t,e,i,n,s)}function easeIn(t,e,i,n,s){return applyEase(easeInBez,t,e,i,n,s)}function ease(t,e,i,n,s){return applyEase(easeInOutBez,t,e,i,n,s)}function applyEase(t,e,i,n,s,r){void 0===s?(s=i,r=n):e=(e-i)/(n-i),e>1?e=1:0>e&&(e=0);var o=t(e);if($bm_isInstanceOfArray(s)){var a,l=s.length,h=createTypedArray("float32",l);for(a=0;l>a;a+=1)h[a]=(r[a]-s[a])*o+s[a];return h}return(r-s)*o+s}function nearestKey(t){var e,i,n,s=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(i=-1,t*=elem.comp.globalData.frameRate,te;e+=1){if(t===data.k[e].t){i=e+1,n=data.k[e].t;break}if(t>data.k[e].t&&tdata.k[e+1].t-t?(i=e+2,n=data.k[e+1].t):(i=e+1,n=data.k[e].t);break}}-1===i&&(i=e+1,n=data.k[e].t)}else i=0,n=0;var r={};return r.index=i,r.time=n/elem.comp.globalData.frameRate,r}function key(t){var e,i,n;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var s=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(n=s.length,i=0;n>i;i+=1)e[i]=s[i],e.value[i]=s[i];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}function executeExpression(t){return value=t,_needsRandom&&seedRandom(randSeed),this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),hasParent=!(!elem.hierarchy||!elem.hierarchy.length),hasParent&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,"shape"===scoped_bm_rt.propType&&(scoped_bm_rt=scoped_bm_rt.v),scoped_bm_rt)}var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||this.data.hd!==!0,wiggle=function(t,e){var i,n,s=this.pv.length?this.pv.length:1,r=createTypedArray("float32",s);t=5;var o=Math.floor(time*t);for(i=0,n=0;o>i;){for(n=0;s>n;n+=1)r[n]+=-e+2*e*BMMath.random();i+=1}var a=time*t,l=a-Math.floor(a),h=createTypedArray("float32",s);if(s>1){for(n=0;s>n;n+=1)h[n]=this.pv[n]+r[n]+(-e+2*e*BMMath.random())*l;return h}return this.pv+r[0]+(-e+2*e*BMMath.random())*l}.bind(this);thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue,index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;return executeExpression}var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get,add=sum,$bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod,radians_to_degrees=radiansToDegrees,degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];return ob.initiateExpression=initiateExpression,ob}(),expressionHelpers=function(){function t(t,e,i){e.x&&(i.k=!0,i.x=!0,i.initiateExpression=ExpressionManager.initiateExpression,i.effectsSequence.push(i.initiateExpression(t,e,i).bind(i)))}function e(t){return t*=this.elem.globalData.frameRate,t-=this.offsetTime,t!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame=n)return this.pv;var o,a;i?(o=e?Math.abs(r-this.elem.comp.globalData.frameRate*e):Math.max(0,r-this.elem.data.ip),a=r-o):((!e||e>s.length-1)&&(e=s.length-1),a=s[s.length-1-e].t,o=r-a);var l,h,c;if("pingpong"===t){var u=Math.floor((n-a)/o);if(u%2!==0)return this.getValueAtTime((o-(n-a)%o+a)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var d=this.getValueAtTime(a/this.comp.globalData.frameRate,0),p=this.getValueAtTime(r/this.comp.globalData.frameRate,0),f=this.getValueAtTime(((n-a)%o+a)/this.comp.globalData.frameRate,0),m=Math.floor((n-a)/o);if(this.pv.length){for(c=new Array(d.length),h=c.length,l=0;h>l;l+=1)c[l]=(p[l]-d[l])*m+f[l];return c}return(p-d)*m+f}if("continue"===t){var g=this.getValueAtTime(r/this.comp.globalData.frameRate,0),v=this.getValueAtTime((r-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(c=new Array(g.length),h=c.length,l=0;h>l;l+=1)c[l]=g[l]+(g[l]-v[l])*((n-r)/this.comp.globalData.frameRate)/5e-4;return c}return g+(g-v)*((n-r)/.001)}}return this.getValueAtTime(((n-a)%o+a)/this.comp.globalData.frameRate,0)}function e(t,e,i){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var n=this.comp.renderedFrame,s=this.keyframes,r=s[0].t;if(n>=r)return this.pv;var o,a;i?(o=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-r),a=r+o):((!e||e>s.length-1)&&(e=s.length-1),a=s[e].t,o=a-r);var l,h,c;if("pingpong"===t){var u=Math.floor((r-n)/o);if(u%2===0)return this.getValueAtTime(((r-n)%o+r)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var d=this.getValueAtTime(r/this.comp.globalData.frameRate,0),p=this.getValueAtTime(a/this.comp.globalData.frameRate,0),f=this.getValueAtTime((o-(r-n)%o+r)/this.comp.globalData.frameRate,0),m=Math.floor((r-n)/o)+1;if(this.pv.length){for(c=new Array(d.length),h=c.length,l=0;h>l;l+=1)c[l]=f[l]-(p[l]-d[l])*m;return c}return f-(p-d)*m}if("continue"===t){var g=this.getValueAtTime(r/this.comp.globalData.frameRate,0),v=this.getValueAtTime((r+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(c=new Array(g.length),h=c.length,l=0;h>l;l+=1)c[l]=g[l]+(g[l]-v[l])*(r-n)/.001;return c}return g+(g-v)*(r-n)/.001}}return this.getValueAtTime((o-((r-n)%o+r))/this.comp.globalData.frameRate,0)}function i(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),e=Math.floor(e||5),1>=e)return this.pv;var i,n=this.comp.renderedFrame/this.comp.globalData.frameRate,s=n-t,r=n+t,o=e>1?(r-s)/(e-1):1,a=0,l=0;i=this.pv.length?createTypedArray("float32",this.pv.length):0;for(var h;e>a;){if(h=this.getValueAtTime(s+a*o),this.pv.length)for(l=0;ln;n+=1)"i"===t||"o"===t?a[n]=[r[n][0]-o[n][0],r[n][1]-o[n][1]]:a[n]=[r[n][0],r[n][1]];return a},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(i));for(var n,s=this._segmentsLength,r=s.lengths,o=s.totalLength*t,a=0,l=r.length,h=0;l>a;){if(h+r[a].addedLength>o){var c=a,u=i.c&&a===l-1?0:a+1,d=(o-h)/r[a].addedLength;n=bez.getPointInSegment(i.v[c],i.v[u],i.o[c],i.i[u],d,r[a]);break}h+=r[a].addedLength,a+=1}return n||(n=i.c?[i.v[0][0],i.v[0][1]]:[i.v[i._length-1][0],i.v[i._length-1][1]]),n},vectorOnPath:function(t,e,i){1==t?t=this.v.c:0==t&&(t=.999);var n=this.pointOnPath(t,e),s=this.pointOnPath(t+.001,e),r=s[0]-n[0],o=s[1]-n[1],a=Math.sqrt(Math.pow(r,2)+Math.pow(o,2));if(0===a)return[0,0];var l="tangent"===i?[r/a,o/a]:[-o/a,r/a];return l},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([o],h),extendPrototype([o],c),c.prototype.getValueAtTime=r,c.prototype.initiateExpression=ExpressionManager.initiateExpression;var u=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,i,n,s){var r=u(t,e,i,n,s);return r.propertyIndex=e.ix,r.lock=!1,3===i?expressionHelpers.searchExpressions(t,e.pt,r):4===i&&expressionHelpers.searchExpressions(t,e.ks,r),r.k&&t.addDynamicProperty(r),r}}(),function(){function t(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}TextProperty.prototype.getExpressionValue=function(t,e){var i=this.calculateExpression(e);if(t.t!==i){var n={};return this.copyData(n,t),n.t=i.toString(),n.__complete=!1,n}return t},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=t}();var ShapePathInterface=function(){return function(t,e,i){function n(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?n.path:null}var s=e.sh,r=propertyGroupFactory(n,i);return s.setGroupProperty(PropertyInterface("Path",r)),Object.defineProperties(n,{path:{get:function(){return s.k&&s.getValue(),s}},shape:{get:function(){return s.k&&s.getValue(),s}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:i}}),n}}(),propertyGroupFactory=function(){return function(t,e){return function(i){return i=void 0===i?1:i,0>=i?t:e(i-1)}}}(),PropertyInterface=function(){return function(t,e){function i(t){return t=void 0===t?1:t,0>=t?n:e(t-1)}var n={_name:t};return i}}(),ShapeExpressionInterface=function(){function t(t,e,l){var f,m=[],g=t?t.length:0;for(f=0;g>f;f+=1)"gr"===t[f].ty?m.push(i(t[f],e[f],l)):"fl"===t[f].ty?m.push(n(t[f],e[f],l)):"st"===t[f].ty?m.push(o(t[f],e[f],l)):"tm"===t[f].ty?m.push(a(t[f],e[f],l)):"tr"===t[f].ty||("el"===t[f].ty?m.push(h(t[f],e[f],l)):"sr"===t[f].ty?m.push(c(t[f],e[f],l)):"sh"===t[f].ty?m.push(ShapePathInterface(t[f],e[f],l)):"rc"===t[f].ty?m.push(u(t[f],e[f],l)):"rd"===t[f].ty?m.push(d(t[f],e[f],l)):"rp"===t[f].ty?m.push(p(t[f],e[f],l)):"gf"===t[f].ty?m.push(s(t[f],e[f],l)):m.push(r(t[f],e[f],l)));return m}function e(e,i,n){var s,r=function(t){for(var e=0,i=s.length;i>e;){if(s[e]._name===t||s[e].mn===t||s[e].propertyIndex===t||s[e].ix===t||s[e].ind===t)return s[e];e+=1}return"number"==typeof t?s[t-1]:null};r.propertyGroup=propertyGroupFactory(r,n),s=t(e.it,i.it,r.propertyGroup),r.numProperties=s.length;var o=l(e.it[e.it.length-1],i.it[i.it.length-1],r.propertyGroup);return r.transform=o,r.propertyIndex=e.cix,r._name=e.nm,r}function i(t,i,n){var s=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return s.content;default:return s.transform}};s.propertyGroup=propertyGroupFactory(s,n);var r=e(t,i,s.propertyGroup),o=l(t.it[t.it.length-1],i.it[i.it.length-1],s.propertyGroup);return s.content=r,s.transform=o,Object.defineProperty(s,"_name",{get:function(){return t.nm}}),s.numProperties=t.np,s.propertyIndex=t.ix,s.nm=t.nm,s.mn=t.mn,s}function n(t,e,i){function n(t){return"Color"===t||"color"===t?n.color:"Opacity"===t||"opacity"===t?n.opacity:null}return Object.defineProperties(n,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",i)),e.o.setGroupProperty(PropertyInterface("Opacity",i)),n}function s(t,e,i){function n(t){return"Start Point"===t||"start point"===t?n.startPoint:"End Point"===t||"end point"===t?n.endPoint:"Opacity"===t||"opacity"===t?n.opacity:null}return Object.defineProperties(n,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",i)),e.e.setGroupProperty(PropertyInterface("End Point",i)),e.o.setGroupProperty(PropertyInterface("Opacity",i)),n}function r(){function t(){return null}return t}function o(t,e,i){function n(i){Object.defineProperty(h,t.d[i].nm,{get:ExpressionPropertyInterface(e.d.dataProps[i].p)})}function s(t){return"Color"===t||"color"===t?s.color:"Opacity"===t||"opacity"===t?s.opacity:"Stroke Width"===t||"stroke width"===t?s.strokeWidth:null}var r,o=propertyGroupFactory(s,i),a=propertyGroupFactory(h,o),l=t.d?t.d.length:0,h={};for(r=0;l>r;r+=1)n(r),e.d.dataProps[r].p.setGroupProperty(a);return Object.defineProperties(s,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return h}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",o)),e.o.setGroupProperty(PropertyInterface("Opacity",o)),e.w.setGroupProperty(PropertyInterface("Stroke Width",o)),s}function a(t,e,i){function n(e){return e===t.e.ix||"End"===e||"end"===e?n.end:e===t.s.ix?n.start:e===t.o.ix?n.offset:null}var s=propertyGroupFactory(n,i);return n.propertyIndex=t.ix,e.s.setGroupProperty(PropertyInterface("Start",s)),e.e.setGroupProperty(PropertyInterface("End",s)),e.o.setGroupProperty(PropertyInterface("Offset",s)),n.propertyIndex=t.ix,n.propertyGroup=i,Object.defineProperties(n,{start:{get:ExpressionPropertyInterface(e.s)},end:{get:ExpressionPropertyInterface(e.e)},offset:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm}}),n.mn=t.mn,n}function l(t,e,i){function n(e){return t.a.ix===e||"Anchor Point"===e?n.anchorPoint:t.o.ix===e||"Opacity"===e?n.opacity:t.p.ix===e||"Position"===e?n.position:t.r.ix===e||"Rotation"===e||"ADBE Vector Rotation"===e?n.rotation:t.s.ix===e||"Scale"===e?n.scale:t.sk&&t.sk.ix===e||"Skew"===e?n.skew:t.sa&&t.sa.ix===e||"Skew Axis"===e?n.skewAxis:null}var s=propertyGroupFactory(n,i);return e.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",s)),e.transform.mProps.p.setGroupProperty(PropertyInterface("Position",s)),e.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",s)),e.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",s)),e.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",s)),e.transform.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",s)),e.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",s))),e.transform.op.setGroupProperty(PropertyInterface("Opacity",s)),Object.defineProperties(n,{opacity:{get:ExpressionPropertyInterface(e.transform.mProps.o)},position:{get:ExpressionPropertyInterface(e.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(e.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(e.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(e.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(e.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(e.transform.mProps.sa)},_name:{value:t.nm}}),n.ty="tr",n.mn=t.mn,n.propertyGroup=i,n}function h(t,e,i){function n(e){return t.p.ix===e?n.position:t.s.ix===e?n.size:null}var s=propertyGroupFactory(n,i);n.propertyIndex=t.ix;var r="tm"===e.sh.ty?e.sh.prop:e.sh;return r.s.setGroupProperty(PropertyInterface("Size",s)),r.p.setGroupProperty(PropertyInterface("Position",s)),Object.defineProperties(n,{size:{get:ExpressionPropertyInterface(r.s)},position:{get:ExpressionPropertyInterface(r.p)},_name:{value:t.nm}}),n.mn=t.mn,n}function c(t,e,i){function n(e){return t.p.ix===e?n.position:t.r.ix===e?n.rotation:t.pt.ix===e?n.points:t.or.ix===e||"ADBE Vector Star Outer Radius"===e?n.outerRadius:t.os.ix===e?n.outerRoundness:!t.ir||t.ir.ix!==e&&"ADBE Vector Star Inner Radius"!==e?t.is&&t.is.ix===e?n.innerRoundness:null:n.innerRadius}var s=propertyGroupFactory(n,i),r="tm"===e.sh.ty?e.sh.prop:e.sh;return n.propertyIndex=t.ix,r.or.setGroupProperty(PropertyInterface("Outer Radius",s)),r.os.setGroupProperty(PropertyInterface("Outer Roundness",s)),r.pt.setGroupProperty(PropertyInterface("Points",s)),r.p.setGroupProperty(PropertyInterface("Position",s)),r.r.setGroupProperty(PropertyInterface("Rotation",s)),t.ir&&(r.ir.setGroupProperty(PropertyInterface("Inner Radius",s)),r.is.setGroupProperty(PropertyInterface("Inner Roundness",s))),Object.defineProperties(n,{position:{get:ExpressionPropertyInterface(r.p)},rotation:{get:ExpressionPropertyInterface(r.r)},points:{get:ExpressionPropertyInterface(r.pt)},outerRadius:{get:ExpressionPropertyInterface(r.or)},outerRoundness:{get:ExpressionPropertyInterface(r.os)},innerRadius:{get:ExpressionPropertyInterface(r.ir)},innerRoundness:{get:ExpressionPropertyInterface(r.is)},_name:{value:t.nm}}),n.mn=t.mn,n}function u(t,e,i){function n(e){return t.p.ix===e?n.position:t.r.ix===e?n.roundness:t.s.ix===e||"Size"===e||"ADBE Vector Rect Size"===e?n.size:null}var s=propertyGroupFactory(n,i),r="tm"===e.sh.ty?e.sh.prop:e.sh;return n.propertyIndex=t.ix,r.p.setGroupProperty(PropertyInterface("Position",s)),r.s.setGroupProperty(PropertyInterface("Size",s)),r.r.setGroupProperty(PropertyInterface("Rotation",s)),Object.defineProperties(n,{position:{get:ExpressionPropertyInterface(r.p)},roundness:{get:ExpressionPropertyInterface(r.r)},size:{get:ExpressionPropertyInterface(r.s)},_name:{value:t.nm}}),n.mn=t.mn,n}function d(t,e,i){function n(e){return t.r.ix===e||"Round Corners 1"===e?n.radius:null}var s=propertyGroupFactory(n,i),r=e;return n.propertyIndex=t.ix,r.rd.setGroupProperty(PropertyInterface("Radius",s)),Object.defineProperties(n,{radius:{get:ExpressionPropertyInterface(r.rd)},_name:{value:t.nm}}),n.mn=t.mn,n}function p(t,e,i){function n(e){return t.c.ix===e||"Copies"===e?n.copies:t.o.ix===e||"Offset"===e?n.offset:null}var s=propertyGroupFactory(n,i),r=e;return n.propertyIndex=t.ix,r.c.setGroupProperty(PropertyInterface("Copies",s)),r.o.setGroupProperty(PropertyInterface("Offset",s)),Object.defineProperties(n,{copies:{get:ExpressionPropertyInterface(r.c)},offset:{get:ExpressionPropertyInterface(r.o)},_name:{value:t.nm}}),n.mn=t.mn,n}return function(e,i,n){function s(t){if("number"==typeof t)return t=void 0===t?1:t,0===t?n:o[t-1];for(var e=0,i=o.length;i>e;){if(o[e]._name===t)return o[e];e+=1}return null}function r(){return n}var o;return s.propertyGroup=propertyGroupFactory(s,r),o=t(e,i,s.propertyGroup),s.numProperties=o.length,s._name="Contents",s}}(),TextExpressionInterface=function(){return function(t){function e(t){switch(t){case"ADBE Text Document":return e.sourceText;default:return null}}var i,n;return Object.defineProperty(e,"sourceText",{get:function(){t.textProperty.getValue();var e=t.textProperty.currentData.t;return e!==i&&(t.textProperty.currentData.t=i,n=new String(e),n.value=e||new String(e)),n}}),e}}(),LayerExpressionInterface=function(){function t(t){var e=new Matrix;if(void 0!==t){var i=this._elem.finalTransform.mProp.getValueAtTime(t);i.clone(e)}else{var n=this._elem.finalTransform.mProp;n.applyToMatrix(e)}return e}function e(t,e){var i=this.getMatrix(e);return i.props[12]=0,i.props[13]=0,i.props[14]=0,this.applyPoint(i,t)}function i(t,e){var i=this.getMatrix(e);return this.applyPoint(i,t)}function n(t,e){var i=this.getMatrix(e);return i.props[12]=0,i.props[13]=0,i.props[14]=0,this.invertPoint(i,t)}function s(t,e){var i=this.getMatrix(e);return this.invertPoint(i,t)}function r(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var i,n=this._elem.hierarchy.length;for(i=0;n>i;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function o(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var i,n=this._elem.hierarchy.length;for(i=0;n>i;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function a(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var i,n=this._elem.hierarchy.length;for(i=0;n>i;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function l(){return[1,1,1,1]}return function(h){function c(t){d.mask=new MaskManagerInterface(t,h)}function u(t){d.effect=t}function d(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return d.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return p;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return d.effect;case"ADBE Text Properties":return d.textInterface;default:return null}}var p;d.getMatrix=t,d.invertPoint=o,d.applyPoint=r,d.toWorld=i,d.toWorldVec=e,d.fromWorld=s,d.fromWorldVec=n,d.toComp=i,d.fromComp=a,d.sampleImage=l,d.sourceRectAtTime=h.sourceRectAtTime.bind(h),d._elem=h,p=TransformExpressionInterface(h.finalTransform.mProp);var f=getDescriptor(p,"anchorPoint");return Object.defineProperties(d,{hasParent:{get:function(){return h.hierarchy.length}},parent:{get:function(){return h.hierarchy[0].layerInterface}},rotation:getDescriptor(p,"rotation"),scale:getDescriptor(p,"scale"),position:getDescriptor(p,"position"),opacity:getDescriptor(p,"opacity"),anchorPoint:f,anchor_point:f,transform:{get:function(){return p}},active:{get:function(){return h.isInRange}}}),d.startTime=h.data.st,d.index=h.data.ind,d.source=h.data.refId,d.height=0===h.data.ty?h.data.h:100,d.width=0===h.data.ty?h.data.w:100,d.inPoint=h.data.ip/h.comp.globalData.frameRate,d.outPoint=h.data.op/h.comp.globalData.frameRate,d._name=h.data.nm,d.registerMaskInterface=c,d.registerEffectsInterface=u,d}}(),FootageInterface=function(){var t=function(t){function e(){return n="",s=t.getFootageData(),i}function i(t){if(s[t])return n=t,s=s[t],"object"==typeof s?i:s;var e=t.indexOf(n);if(-1!==e){var r=parseInt(t.substr(e+n.length),10);return s=s[r],"object"==typeof s?i:s}return""}var n="",s=t.getFootageData();return e},e=function(e){function i(t){return"Outline"===t?i.outlineInterface():null}return i._name="Outline",i.outlineInterface=t(e),i};return function(t){function i(t){return"Data"===t?i.dataInterface:null}return i._name="Data",i.dataInterface=e(t),i}}(),CompExpressionInterface=function(){return function(t){function e(e){for(var i=0,n=t.layers.length;n>i;){if(t.layers[i].nm===e||t.layers[i].ind===e)return t.elements[i].layerInterface;i+=1}return null}return Object.defineProperty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.data.h||t.globalData.compSize.h,e.width=t.data.w||t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e.displayStartTime=0,e.numLayers=t.layers.length,e}}(),TransformExpressionInterface=function(){return function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)});var i,n,s,r;return t.p?r=ExpressionPropertyInterface(t.p):(i=ExpressionPropertyInterface(t.px),n=ExpressionPropertyInterface(t.py),t.pz&&(s=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?r():[i(),n(),s?s():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e}}(),ProjectInterface=function(){function t(t){this.compositions.push(t)}return function(){function e(t){for(var e=0,i=this.compositions.length;i>e;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),EffectsExpressionInterface=function(){function t(t,i){if(t.effectsManager){var n,s=[],r=t.data.ef,o=t.effectsManager.effectElements.length;for(n=0;o>n;n+=1)s.push(e(r[n],t.effectsManager.effectElements[n],i,t));var a=t.data.ef||[],l=function(t){for(n=0,o=a.length;o>n;){if(t===a[n].nm||t===a[n].mn||t===a[n].ix)return s[n];n+=1}return null};return Object.defineProperty(l,"numProperties",{get:function(){return a.length}}),l}return null}function e(t,n,s,r){function o(e){for(var i=t.ef,n=0,s=i.length;s>n;){if(e===i[n].nm||e===i[n].mn||e===i[n].ix)return 5===i[n].ty?h[n]:h[n]();n+=1}throw new Error}var a,l=propertyGroupFactory(o,s),h=[],c=t.ef.length;for(a=0;c>a;a+=1)5===t.ef[a].ty?h.push(e(t.ef[a],n.effectElements[a],n.effectElements[a].propertyGroup,r)):h.push(i(n.effectElements[a],t.ef[a].ty,r,l));return"ADBE Color Control"===t.mn&&Object.defineProperty(o,"color",{get:function(){return h[0]()}}),Object.defineProperties(o,{numProperties:{get:function(){return t.np}},_name:{value:t.nm},propertyGroup:{value:l}}),o.enabled=0!==t.en,o.active=o.enabled,o}function i(t,e,i,n){function s(){return 10===e?i.comp.compInterface(t.p.v):r()}var r=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",n)),s}var n={createEffectsInterface:t};return n}(),MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}});var e=function(e){var i,n=createSizedArray(e.viewData.length),s=e.viewData.length;for(i=0;s>i;i+=1)n[i]=new t(e.viewData[i],e.masksProperties[i]);var r=function(t){for(i=0;s>i;){if(e.masksProperties[i].nm===t)return n[i];i+=1}return null};return r};return e}(),ExpressionPropertyInterface=function(){function t(t,e,i){Object.defineProperty(t,"velocity",{get:function(){return e.getVelocityAtTime(e.comp.currentFrame)}}),t.numKeys=e.keyframes?e.keyframes.length:0,t.key=function(n){if(!t.numKeys)return 0;var s="";s="s"in e.keyframes[n-1]?e.keyframes[n-1].s:"e"in e.keyframes[n-2]?e.keyframes[n-2].e:e.keyframes[n-2].s;var r="unidimensional"===i?new Number(s):Object.assign({},s);return r.time=e.keyframes[n-1].t/e.elem.comp.globalData.frameRate,r.value="unidimensional"===i?s[0]:s,r},t.valueAtTime=e.getValueAtTime,t.speedAtTime=e.getSpeedAtTime,t.velocityAtTime=e.getVelocityAtTime,t.propertyGroup=e.propertyGroup}function e(e){e&&"pv"in e||(e=s);var i=1/e.mult,n=e.pv*i,r=new Number(n);return r.value=n,t(r,e,"unidimensional"),function(){return e.k&&e.getValue(),n=e.v*i,r.value!==n&&(r=new Number(n),r.value=n,t(r,e,"unidimensional")),r}}function i(e){e&&"pv"in e||(e=r);var i=1/e.mult,n=e.data&&e.data.l||e.pv.length,s=createTypedArray("float32",n),o=createTypedArray("float32",n);return s.value=o,t(s,e,"multidimensional"),function(){e.k&&e.getValue();for(var t=0;n>t;t+=1)o[t]=e.v[t]*i,s[t]=o[t];return s}}function n(){return s}var s={pv:0,v:0,mult:1},r={pv:[0,0,0],v:[0,0,0],mult:1};return function(t){return t?"unidimensional"===t.propType?e(t):i(t):n}}(),TextExpressionSelectorPropFactory=function(){function t(t,e){return this.textIndex=t+1,this.textTotal=e,this.v=this.getValue()*this.mult,this.v}return function(e,i){this.pv=1,this.comp=e.comp,this.elem=e,this.mult=.01,this.propType="textSelector",this.textTotal=i.totalChars,this.selectorValue=100,this.lastValue=[1,1,1],this.k=!0,this.x=!0,this.getValue=ExpressionManager.initiateExpression.bind(this)(e,i,this),this.getMult=t,this.getVelocityAtTime=expressionHelpers.getVelocityAtTime,this.kf?this.getValueAtTime=expressionHelpers.getValueAtTime.bind(this):this.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(this),this.setGroupProperty=expressionHelpers.setGroupProperty}}(),propertyGetTextProp=TextSelectorProp.getTextSelectorProp;TextSelectorProp.getTextSelectorProp=function(t,e,i){return 1===e.t?new TextExpressionSelectorPropFactory(t,e,i):propertyGetTextProp(t,e,i)},extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var i,n,s=this.data.ef.length,r=this.data.ef;for(i=0;s>i;i+=1){switch(n=null,r[i].ty){case 0:n=new SliderEffect(r[i],e,this);break;case 1:n=new AngleEffect(r[i],e,this);break;case 2:n=new ColorEffect(r[i],e,this);break;case 3:n=new PointEffect(r[i],e,this);break;case 4:case 7:n=new CheckboxEffect(r[i],e,this);break;case 10:n=new LayerIndexEffect(r[i],e,this);break;case 11:n=new MaskIndexEffect(r[i],e,this);break;case 5:n=new EffectsManager(r[i],e,this);break;default:n=new NoValueEffect(r[i],e,this)}n&&this.effectElements.push(n)}};var lottie={};lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocationHref,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.setIDPrefix=setIDPrefix,lottie.__getFactory=getFactory,lottie.version="5.7.14";var standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="",queryString;if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src.replace(/^[^\?]+\??/,""),renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);return lottie}),function(t,e,i,n){"use strict";e("patterns/button/micro-animations",["utils/helper","LottiePlayer"],function(t,e){return{defaults:function(){return{cursorAnimationContainer:".js-cursor-animation-container"}},ready:function(i,n){return this.settings=t.extend(this.defaults(),n),this.element=i,this.settings.src?(this.animationInstance=e.loadAnimation({container:this.element,renderer:"svg",loop:!1,autoplay:!1,path:this.settings.src}),this.animationInstance.setSpeed(1.5),this.animationInstance.setDirection(1),this.totalFrames=-1,void(this.cursorAnimationWrapper=t.getParentsUntil(this.element,this.settings.cursorAnimationContainer)[0])):void console.warn("No path/source for animation")},events:function(t){this.animationInstance.addEventListener("DOMLoaded",function(){this.totalFrames=this.animationInstance.totalFrames,this.animationInstance.goToAndStop(this.totalFrames-1,!0)}.bind(this)),this.animationInstance.addEventListener("complete",function(){this.hoverHandler()}.bind(this)),this.hoverHandler()},hoverHandler:function(){this.cursorAnimationWrapper.addEventListener("mouseenter",function(){this.animationInstance.goToAndPlay(0)}.bind(this),{once:!0})}}})}(this,this.define,this.require),function(t,e,i,n){"use strict";e("patterns/context-menu/context-menu",["utils/helper","vendor/polyfills/element-closest"],function(t){return{defaults:function(){return{openClass:"open",contextToggleSelector:".context-menu__toggle",contextClassOpen:".context-menu__toggle.open",contextMenuSelector:".context-menu__menu"}},ready:function(e,i){this.settings=t.extend(this.defaults(),i),this.element=e,this.contextToggle=this.element.querySelectorAll(this.settings.contextToggleSelector)},events:function(t){if(this.contextToggle)for(var e=0;e=l.getTime()?document.getElementById(this.settings.connectedTimepicker).closest(".auto-init").classList.remove("error"):document.getElementById(this.settings.connectedTimepicker).closest(".auto-init").classList.add("error"),o.getTime()<=h.getTime()?document.getElementById(this.settings.connectedTimepicker).closest(".auto-init").classList.remove("error"):document.getElementById(this.settings.connectedTimepicker).closest(".auto-init").classList.add("error")}this.datepickerClear&&this.clearDatepicker(t,i,n)}.bind(this),onReady:function(t,i,n){i&&this.element.classList.contains("js-trigger-event")&&e.trigger("currentDate",[i],this),r.querySelector(".flatpickr-input.input").addEventListener("keydown",function(t){(8===t.keyCode||46===t.keyCode)&&(n.clear(),n.close())}.bind(this)),this.datepickerClear&&this.clearDatepicker([],"",n)}.bind(this)}),this.defaultDate&&this.element.classList.add("input-filled"),this.datepickerInput=r.querySelector(".flatpickr-input.input"),(!this.datepicker.value||this.datepicker.required)&&this.datepickerInput.classList.add("date-icon"),"mobile"===a&&this.datepickerInput.addEventListener("click",function(){this.datepickerInput.blur()}.bind(this))},events:function(t){this.datepickerInput.addEventListener("keydown",function(e){8===e.keyCode||46===e.keyCode?(e.preventDefault(),t.classList.remove("input-filled"),this.datepicker.value="",e.target.value="",this.datepickerClear.classList.add("disabled"),this.datepickerInput.classList.add("date-icon"),e.target.blur()):e.target.blur()}.bind(this))},clearDatepicker:function(t,e,i){(t.length>0||i.selectedDates.length>0)&&(this.datepickerClear.classList.remove("disabled"),this.datepickerInput&&!this.datepicker.required&&this.datepickerInput.classList.remove("date-icon")),this.datepickerClear.addEventListener("click",function(t){t.preventDefault(),this.element.classList.contains("input-filled")&&this.element.classList.remove("input-filled"),this.datepickerInput.value&&(this.datepickerInput.value=""),t.target.classList.add("disabled"),this.datepickerInput.classList.add("date-icon"),i.clear(),i.close()}.bind(this))}}})}(this,this.define),function(t,e,i,n){"use strict";e("patterns/forms/file-upload",["utils/helper","utils/event","patterns/forms/form","patterns/forms/form-base"],function(t,e,i,n){return{defaults:function(){return{filledClass:"input-filled",errorClass:"error"}},ready:function(e,i){this.settings=t.extend(this.defaults(),i),this.element=e,this.uploadWrapper=this.element.querySelector(".js-upload-wrapper"),this.uploadInput=this.element.querySelector('input[type="file"]'),this.uploadConfirmInput=this.element.querySelector('input[type="text"]'),this.uploadButton=this.element.querySelector(".js-upload-button"),this.removeFileButtonClass="js-remove-file",this.uploadFileOverview=this.element.querySelector(".upload__file-overview"),this.uploadFileMessageContainer=this.element.querySelector(".upload__message .alert"),
this.uploadFileErrorContainer=this.element.querySelector(".upload__file-errors"),this.uploadFileErrorClose=this.element.querySelector(".alert__icon-close"),this.allowedFileFormat=this.uploadInput.getAttribute("accept"),this.fileMaxSize=this.uploadInput.getAttribute("data-max-size"),this.isMultiple=this.uploadInput.hasAttribute("multiple"),this.form=t.getParentsUntil(this.element,"form")[0],this.uploadedFiles={},this.fileID=0},events:function(){e.on("submitFiles",function(t,e){e===this.element&&this.submitFiles()}.bind(this)),this.uploadWrapper.addEventListener("dragenter",function(t){t.preventDefault(),this.uploadWrapper.classList.add("highlight")}.bind(this)),this.uploadWrapper.addEventListener("dragover",function(t){t.preventDefault(),this.uploadWrapper.classList.add("highlight")}.bind(this)),this.uploadWrapper.addEventListener("dragleave",function(t){t.preventDefault(),this.uploadWrapper.classList.remove("highlight")}.bind(this)),this.uploadWrapper.addEventListener("drop",function(t){t.preventDefault(),this.uploadWrapper.classList.remove("highlight"),this.dropUpload(t)}.bind(this)),this.uploadWrapper.addEventListener("change",function(t){t.preventDefault(),this.buttonUpload(t)}.bind(this)),this.uploadFileOverview.addEventListener("click",function(t){t.target.classList.contains(this.removeFileButtonClass)&&this.removeFile(t.target)}.bind(this)),this.uploadFileErrorClose.addEventListener("click",function(){this.clearUploadErrors()}.bind(this))},buttonUpload:function(){var t=this.uploadInput.files;this.addFiles(t)},dropUpload:function(t){var e=t.dataTransfer.files;this.addFiles(e)},addFiles:function(t){this.clearUploadErrors();for(var e=0;e'+t+'
'+n+"";return s},formatFileSize:function(t,e){if(0===t)return"0 Bytes";var i=1024,n=0>=e?0:e||2,s=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],r=Math.floor(Math.log(t)/Math.log(i));return parseFloat((t/Math.pow(i,r)).toFixed(n))+" "+s[r]},removeFile:function(t){var e,i=t.parentElement.parentElement,n=i.getAttribute("data-file-id"),s=i.getAttribute("data-file-uuid");s?e=this.removeServerFile(s).deleted:(delete this.uploadedFiles[n],e=!0),e&&(this.uploadFileOverview.removeChild(i),this.clearUploadErrors()),this.uploadConfirmInput.value=this.intVal(this.uploadConfirmInput.value)-1,0===Object.keys(this.uploadedFiles).length&&"0"===this.uploadConfirmInput.value&&(this.uploadConfirmInput.value="")},checkFileSize:function(t){var e=t.size;if(null===this.fileMaxSize)return!0;for(var i in this.uploadedFiles)e+=this.uploadedFiles[i].size;return t.size>this.fileMaxSize?(this.showFileError(t,"size"),!1):e>this.fileMaxSize?(this.showFileError(t,"sizeAll"),!1):!0},checkFileFormat:function(t){var e=t.name.split(".").pop().toLowerCase(),i=!1;if(null===this.allowedFileFormat)i=!0;else{var n=this.allowedFileFormat.replace(/[,.]/g,"").split(" ");n.forEach(function(t){t===e&&(i=!0)}),i||this.showFileError(t,"format")}return i},showFileError:function(t,e){t=t?t:"",e=e?e:"",this.uploadFileErrorContainer.innerHTML+=this.getfileErrorTemplate(t,e)},getfileErrorTemplate:function(t,e){function i(e){return''+e+'
'+t.name+' ('+s+")"}var n,s=t?this.formatFileSize(t.size):"";switch(this.uploadFileMessageContainer.classList.remove("alert--hidden"),e){case"format":n=i(this.settings.errors.fileFormat);break;case"size":n=i(this.settings.errors.fileSize);break;case"sizeAll":n=''+this.settings.errors.fileSize+"
";break;case"multiple":n=''+this.settings.errors.multipleFiles+"
";break;case"upload":n=i(this.settings.errors.serverUpload);break;default:n=''+this.settings.errors.serverUpload+"
"}return n},clearUploadErrors:function(){this.uploadFileErrorContainer.innerHTML="",this.uploadFileMessageContainer.classList.add("alert--hidden"),this.element.classList.remove("error"),null!==this.element.querySelector(".error-text")&&this.element.removeChild(this.element.querySelector(".error-text"))},submitFiles:function(){if(this.element.classList.contains("is-uploading"))return!1;if(Object.keys(this.uploadedFiles).length>0){this.element.classList.add("is-uploading"),this.element.classList.remove("error"),e.trigger("enableButtonSpinner",[this.form,!0],this);var t=new FormData,i=this.form.querySelector('input[name="uuid"]').value;t.append("formId",i),t.append("name",this.uploadInput.getAttribute("name"));for(var n in this.uploadedFiles)t.append("files[]",this.uploadedFiles[n]);this.uploadFiles(t)}},uploadFiles:function(t){var e=JSON.parse(this.form.getAttribute("data-options")).uploadEndpoint,i=new XMLHttpRequest;i.open("POST",e,!1),i.addEventListener("readystatechange",function(){if(4==i.readyState&&200==i.status){var t=JSON.parse(i.responseText);this.checkUploadedFiles(t)}else console.log(i.readyState)}.bind(this)),i.send(t)},checkUploadedFiles:function(t){var i=t.failed,n=t.successful;0===i.length?(this.clearUploadErrors(),this.element.classList.add("uploaded")):(this.element.classList.add(this.settings.errorClass),this.processFailedFiles(i)),n.length>0?(this.uploadConfirmInput.value=n.length,this.processSuccessfulFiles(n)):this.uploadConfirmInput.value="",this.element.classList.remove("is-uploading"),e.trigger("disableButtonSpinner")},processSuccessfulFiles:function(t){var e=Object.keys(this.uploadedFiles);t.forEach(function(t){e.forEach(function(e){if(this.uploadedFiles[e].name===t.name){var i=this.element.querySelector('[data-file-id="'+e+'"]');delete this.uploadedFiles[e],i.setAttribute("data-file-uuid",t.uuid)}}.bind(this))}.bind(this))},processFailedFiles:function(t){var e=Object.keys(this.uploadedFiles);t.forEach(function(t){e.forEach(function(e){if(this.uploadedFiles[e].name===t.name){this.showFileError(this.uploadedFiles[e],t.error),delete this.uploadedFiles[e];var i=this.element.querySelector('[data-file-id="'+e+'"]');i.parentNode.removeChild(i)}}.bind(this))}.bind(this))},removeServerFile:function(t){var e,i=JSON.parse(this.form.getAttribute("data-options")).deleteEndpoint,n=this.form.querySelector('input[name="uuid"]').value,s=new FormData;s.append("fileId",t),s.append("formId",n),s.append("name",this.uploadInput.getAttribute("name"));var r=new XMLHttpRequest;return r.open("POST",i,!1),r.addEventListener("readystatechange",function(){4==r.readyState&&200==r.status?e=JSON.parse(r.responseText):console.log(r.readyState)}.bind(this)),r.send(s),e},intVal:function(t){return""!==t?parseInt(t):0}}})}(this,this.define,this.require),function(t,e,i,n){"use strict";e("patterns/forms/form-contact",["utils/helper","patterns/forms/form-base","vendor/polyfills/smoothscroll","vendor/polyfills/array.includes"],function(t,e){return{defaults:function(){return{radioContact:"radioContactForm",radioContactCustomer:"contactCustomer"}},ready:function(i,n){this.settings=t.extend(this.defaults(),n),this.element=i,this.radioContact=document.getElementsByName(this.settings.radioContact),this.contactSelectFirstForm=this.element.querySelector(".js-select-contact-first"),this.contactSelectFirst=this.element.querySelector(".js-select-contact-first select"),this.contactSelectSecondForm=this.element.querySelector(".js-select-contact-second"),this.contactSelectSecondFormItem=this.element.querySelector(".js-select-contact-second .form-item"),this.contactSelectSecond=this.element.querySelector(".js-select-contact-second select"),this.contactSelectSecondLabel=this.element.querySelector(".js-select-contact-second label"),this.contactRadioCustomerWrapper=this.element.querySelector(".js-radio-customer"),this.contactCustomerNumberWrapper=this.element.querySelector(".js-contact-customer-number"),e.toggleFormRows([],[this.contactSelectSecondForm]),this.contactSelectFirst&&this.contactSelectSecond&&this.createNewSelect(),e.checkRadioValue.call(this,this.radioContact,this.toggleCustomerNumber)},events:function(){this.contactSelectFirst&&this.contactSelectFirst.addEventListener("change",function(t){this.createNewSelect()}.bind(this)),e.createRadioEventListener.call(this,this.radioContact,this.toggleCustomerNumber)},createNewSelect:function(){var t=this.contactSelectFirst.options[this.contactSelectFirst.selectedIndex].dataset.selectOptions;if(this.contactSelectSecond.innerText=null,t!==n){for(var i=JSON.parse(t),s=!1,r=0;r .input-checkbox input")}},ready:function(e,i){this.settings=t.extend(this.defaults(),i),this.element=e;for(var n=document.querySelectorAll(".form-directory ul li .input-checkbox input"),s=0;s1&&(this.backReferenceMasterElements=Array.from(new Set(this.backReferenceMasterElements.concat(l)))),this.callAction.call(this,r,o[a][0],s),o[a][1])for(var h=Array.from(o[a][1]),c=0;c0||t.hasAttribute("ischecked"),s&&t.hasAttribute("haschanged")?r=!0:s&&t===e?(t.setAttribute("haschanged","yes"),r=!0):s=!1;break;case"checkbox":s=t.checked,s&&(r=!0);break;case"option":s=t.selected,s&&(r=!0);break;default:s=t.checked||t.selected}return i=s&&t===e&&i!==!1?!0:i!==!1&&s||i!==!1&&r?i||n:!1},callAction:function(t,e,i){var s=t.get(e);s.forEach(function(t){switch(i===!1&&(t=this.actionOppTypes[t]),t){case"hide":if(i===!1&&this.activateContainers.includes(e))break;(i||i===n)&&this.activateContainers.includes(e)&&(this.activateContainers=this.activateContainers.filter(function(t){return t!==e})),this.deactivateContainers.push(e);break;case"show":if(i===!1&&this.deactivateContainers.includes(e))break;(i||i===n)&&this.deactivateContainers.includes(e)&&(this.deactivateContainers=this.deactivateContainers.filter(function(t){return t!==e})),this.activateContainers.push(e);break;case"disable":if(i===!1&&this.enableContainers.includes(e))break;(i||i===n)&&this.enableContainers.includes(e)&&(this.enableContainers=this.enableContainers.filter(function(t){return t!==e})),this.disableContainers.push(e);break;case"enable":if(i===!1&&this.disableContainers.includes(e))break;(i||i===n)&&this.disableContainers.includes(e)&&(this.disableContainers=this.disableContainers.filter(function(t){return t!==e})),this.enableContainers.push(e);break;case"trigger":this.actionTrigger.call(this,e);break;case"none":break;default:this.deactivateContainers.push(e)}}.bind(this))},actionTrigger:function(t){var i=t.querySelectorAll("input[data-trigger]");i.forEach(function(t){var i=JSON.parse(t.dataset.trigger.replace(/'/g,'"'));for(var n in i)if("copyfrom"===n&&""===t.value){t.value=this.element.querySelector("#"+i[n]).value;var s;"function"==typeof e?s=new e("blur"):(s=document.createEvent("Event"),s.initEvent("blur",!0,!0)),t.dispatchEvent(s)}}.bind(this))},enableDisableCondContainers:function(){i.enableDisableElements(this.enableContainers,this.disableContainers),this.settings.enableSubmitButtonOnComplete&&e.trigger("formInteractive-send-enableDisabledContainers",[this.element,this.enableContainers,this.disableContainers],this)},enableDisableHiddenInput:function(t,e){t&&t.length&&t.forEach(function(t){for(var e=t.querySelectorAll("input[type=hidden]"),i=0;i0){for(var n=0;n0)for(t;t0?this.element.classList.add(this.settings.filledClass):this.element.classList.remove(this.settings.filledClass)},checkValidity:function(e){var n=i.checkErrorPreValidationApi(e.srcElement,this.settings.errors),s=this.element.classList.contains("error--custom");if("passed"===n&&e.target.checkValidity()&&e.target.validity.valid&&!s)this.element.classList.contains("js-pin-input")||this.element.parentNode.classList.contains("js-energymanagement-dates")||(this.element.classList.remove(this.settings.errorClass),t.trigger("inputValid",[this.element],this));else{var r="notFound";r="passed"===n||"errorWithNoMessage"===n?i.checkError(e.target,this.settings.errors):n;var o="notFound"===r?this.settings.fallbackError:r;i.addError(this.element,o,this.settings.errorClass,this.settings.filledClass),t.trigger("inputError",[this.element],this)}t.trigger("checkFormValidity")},limitNumberLength:function(){if(this.itemInput.max){var t=this.itemInput.max.length,e=this.itemInput.value.length;e>=t&&(this.itemInput.value=this.itemInput.value.substring(0,t))}},clearErrorMsg:function(){var t=this.element,e=this.element.querySelector(".error-text");t.classList.contains("error")&&t.classList.remove("error"),e&&e.parentNode.removeChild(e)},pwShow:function(){this.pwInputItemSelector.type="text"},pwHide:function(){this.pwInputItemSelector.type="password"},pwToggle:function(){"password"===this.pwInputItemSelector.type?this.pwShow():this.pwHide()},pwShowButtonToggle:function(){var t=this.pwShowButton.querySelector(".icon");t.classList.contains("icon-visibility")?(t.classList.remove("icon-visibility"),t.classList.add("icon-visibility-off")):(t.classList.remove("icon-visibility-off"),t.classList.add("icon-visibility"))},checkIfActionCode:function(t){var i=e.getParentsUntil(t,".js-payment-code",".form-row");return i.length>0?!0:!1},checkWarning:function(t){if(this.settings.warnings){var e=this.settings.warnings.reduction&&Number(t.target.dataset.reduction),n=this.settings.warnings.raise&&Number(t.target.dataset.raise),s=Number(t.target.min),r=Number(t.target.max),o=Number(t.target.value);e&&o>=s&&e>o?i.addWarning(this.element,this.settings.warnings.reduction,this.settings.warningClass,this.settings.filledClass):n&&o>n&&r>=o?i.addWarning(this.element,this.settings.warnings.raise,this.settings.warningClass,this.settings.filledClass):i.removeWarning(this.element)}}}})}(this,this.define,this.require),function(t,e,i,n){"use strict";e("patterns/forms/input-autocomplete",["utils/event","utils/helper","Awesomplete","patterns/forms/form-base"],function(t,e,i,n){return{defaults:function(){return{autocompleteEndpoint:null,autocompleteList:null,autocompleteMinChar:2,autocompleteListMatch:!1}},ready:function(t,i){this.settings=e.extend(this.defaults(),i),this.element=t,this.input=this.element.querySelector("input"),this.autocomplete=null,this.autocompleteEndpoint=this.settings.autocompleteEndpoint,this.autocompleteList=this.settings.autocompleteList,this.matched=!1,this.autocompleteEndpoint?this.getData():this.renderAutocomplete(this.autocompleteList)},events:function(){this.settings.autocompleteListMatch&&(this.submitBtn=document.querySelector(".js-submit"),this.submitBtn.addEventListener("click",function(t){for(var e=0;e0)&&(this.timepickerClear.classList.remove("disabled"),this.timepickerInput&&this.timepickerInput.classList.remove("time-icon")),this.timepickerClear.addEventListener("click",function(e){e.preventDefault(),this.element.classList.contains("input-filled")&&this.element.classList.remove("input-filled"),this.timepickerInput.value&&(this.timepickerInput.value=""),t.isOpen===!1&&(e.target.classList.add("disabled"),this.timepickerInput.classList.add("time-icon")),t.clear(),t.close()}.bind(this))}}})}(this,this.define),function(t,e,i,n){"use strict";e("patterns/handling-notifications/handling-notifications",["utils/event","utils/helper"],function(t,e){return{defaults:function(){return{close:".js-close-btn",hidden:"inactive"}},ready:function(t,i){this.settings=e.extend(this.defaults(),i),this.element=t,this.closeSelector=this.element.querySelectorAll(this.settings.close);for(var n=0;n=5&&(r.value=i,s.classList.add("input-filled")),0===n.length&&(o.value=n),n.length>=1&&(o.value=n),a.disabled=!1,a.classList.remove("disabled")},toggleTabContent:function(t,i){e.trigger("tabNavigationToggled");var n=t.dataset.target,s=this.element.querySelector(n);if(i=i?i:!1,s){this.copyUC34Inputs&&this.copyUC34Zip(s);for(var r=0;r0&&(this.checkIbanCountry(),this.formatIban(this.ibanInput))},events:function(t){this.ibanInput.addEventListener("keydown",function(t){t.target.value.length>=2&&this.checkIbanCountry()}.bind(this)),this.ibanInput.addEventListener("input",function(t){this.formatIban(t.target)}.bind(this)),navigator.userAgent.match(/Android/i)&&this.ibanInput.addEventListener("focusout",function(t){t.target.value=t.target.value.replace(/ /g,"").replace(/(.{4})/g,"$1 ").trim().toUpperCase()}.bind(this)),this.ibanInput.addEventListener("paste",function(t){var e=function(){this.checkIbanCountry(),this.ibanInput.selectionStart=this.ibanInput.selectionEnd=this.ibanInput.value.length}.bind(this);setTimeout(e,500)}.bind(this))},checkIbanCountry:function(){0===this.ibanInput.value.toLowerCase().indexOf("de")||""===this.ibanInput.value?(e.toggleFormRows([],[this.wrapperBic]),this.ibanInput.setAttribute("pattern",this.settings.ibanDePattern),this.ibanInput.setAttribute("maxlength",this.settings.ibanDeMaxlength)):(e.toggleFormRows([this.wrapperBic],[]),this.ibanInput.setAttribute("pattern",this.settings.ibanIntPattern),this.ibanInput.setAttribute("maxlength",this.settings.ibanIntMaxlength))},formatIban:function(t){var e=t.selectionEnd,i=t.value.length;!navigator.userAgent.match(/Android/i)&&i>1&&(t.value=t.value.replace(/ /g,"").replace(/(.{4})/g,"$1 ").trim().toUpperCase(),t.selectionEnd=e+=" "===t.value.charAt(e-1)&&" "===t.value.charAt(i-1)&&i!==t.value.length?1:0)}}})}(this,this.define,this.require),function(t,e,i,n){"use strict";e("patterns/votingbox/votingbox",["utils/event","utils/helper"],function(t,e){return{defaults:function(){return{voteTextClass:".js-vote-msg",votesYesClass:".js-count-text-yes",votesNoClass:".js-count-text-no",voteBtnClass:".js-vote-ajax",votingBtnsContainerClass:".voting-box__btn"}},ready:function(t,i){this.settings=e.extend(this.defaults(),i),this.element=t,this.voteButtons=this.element.querySelectorAll(this.settings.voteBtnClass),this.voteBtnsContainer=this.element.querySelector(this.settings.votingBtnsContainerClass),this.voteText=this.element.querySelector(this.settings.voteTextClass),this.votesYes=this.element.querySelector(this.settings.votesYesClass),this.votesNo=this.element.querySelector(this.settings.votesNoClass),this.publisher=null===this.votesNo,this.publisher&&this.toggleYesVotes()},events:function(){this.voteButtons.forEach(function(t){t.addEventListener("click",function(t){t.preventDefault(),this.sendVote(t.target)}.bind(this))}.bind(this))},sendVote:function(t){var e=t.getAttribute("href");new Promise(function(t,i){var n=new XMLHttpRequest;n.open("GET",e,!0),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.addEventListener("load",function(){t(JSON.parse(this.responseText))}),n.addEventListener("error",function(){i()}),n.send()}.bind(this)).then(this.updateVotes.bind(this))},updateVotes:function(e){this.voteText.innerHTML=e.message,this.votesYes.innerHTML=e.yes,t.trigger("UpdateIntroLikes",[e.yes],this),this.publisher?this.toggleYesVotes():this.votesNo.innerHTML=e.no,this.voteBtnsContainer.remove()},toggleYesVotes:function(){"0"===this.votesYes.innerHTML?(this.votesYes.previousElementSibling.style.display="none",this.votesYes.style.display="none"):(this.votesYes.previousElementSibling.style.display="block",this.votesYes.style.display="block")}}})}(this,this.define,this.require);