(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[296],{1248:function(module,exports,__webpack_require__){"undefined"!=typeof navigator&&function(u,S){module.exports=S()}(0,function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(u){_useWebWorker=!!u},getWebWorker=function(){return _useWebWorker},setLocationHref=function(u){locationHref=u},getLocationHref=function(){return locationHref};function createTag(u){return document.createElement(u)}function extendPrototype(u,S){var E,P,F=u.length;for(E=0;E1?E[1]=1:E[1]<=0&&(E[1]=0),HSVtoRGB(E[0],E[1],E[2])}function addBrightnessToRGB(u,S){var E=RGBtoHSV(255*u[0],255*u[1],255*u[2]);return E[2]+=S,E[2]>1?E[2]=1:E[2]<0&&(E[2]=0),HSVtoRGB(E[0],E[1],E[2])}function addHueToRGB(u,S){var E=RGBtoHSV(255*u[0],255*u[1],255*u[2]);return E[0]+=S/360,E[0]>1?E[0]-=1:E[0]<0&&(E[0]+=1),HSVtoRGB(E[0],E[1],E[2])}var rgbToHex=function(){var u,S,E=[];for(u=0;u<256;u+=1)S=u.toString(16),E[u]=1===S.length?"0"+S:S;return function(u,S,P){return u<0&&(u=0),S<0&&(S=0),P<0&&(P=0),"#"+E[u]+E[S]+E[P]}}(),setSubframeEnabled=function(u){subframeEnabled=!!u},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(u){expressionsPlugin=u},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(u){expressionsInterfaces=u},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(u){defaultCurveSegments=u},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(u){idPrefix$1=u},getIdPrefix=function(){return idPrefix$1};function createNS(u){return document.createElementNS(svgNS,u)}function _typeof$5(u){return(_typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(u)}var dataManager=function(){var u,S,E=1,P=[],F={onmessage:function(){},postMessage:function(S){u({data:S})}},T={postMessage:function(u){F.onmessage({data:u})}};function createWorker(S){if(window.Worker&&window.Blob&&getWebWorker()){var E=new Blob(["var _workerSelf = self; self.onmessage = ",S.toString()],{type:"text/javascript"}),P=URL.createObjectURL(E);return new Worker(P)}return u=S,F}function setupWorker(){S||((S=createWorker(function(u){function dataFunctionManager(){function completeLayers(u,S){var E,P,F,T,D,M,I=u.length;for(P=0;P=0;S-=1)if("sh"===u[S].ty){if(u[S].ks.k.i)convertPathsToAbsoluteValues(u[S].ks.k);else for(E=0,P=u[S].ks.k.length;EE[0]||!(E[0]>u[0])&&(u[1]>E[1]||!(E[1]>u[1])&&(u[2]>E[2]||!(E[2]>u[2])&&null))}var u=function(){var u=[4,4,14];function updateTextLayer(u){var S=u.t.d;u.t.d={k:[{s:S,t:0}]}}function iterateLayers(u){var S,E=u.length;for(S=0;S=0;S-=1)if("sh"===u[S].ty){if(u[S].ks.k.i)u[S].ks.k.c=u[S].closed;else for(E=0,P=u[S].ks.k.length;E500)&&(this._imageLoaded(),clearInterval(E)),S+=1}).bind(this),50)}function createImageData(S){var E=getAssetsPath(S,this.assetsPath,this.path),P=createNS("image");isSafari?this.testImageLoaded(P):P.addEventListener("load",this._imageLoaded,!1),P.addEventListener("error",(function(){F.img=u,this._imageLoaded()}).bind(this),!1),P.setAttributeNS("http://www.w3.org/1999/xlink","href",E),this._elementHelper.append?this._elementHelper.append(P):this._elementHelper.appendChild(P);var F={img:P,assetData:S};return F}function createImgData(S){var E=getAssetsPath(S,this.assetsPath,this.path),P=createTag("img");P.crossOrigin="anonymous",P.addEventListener("load",this._imageLoaded,!1),P.addEventListener("error",(function(){F.img=u,this._imageLoaded()}).bind(this),!1),P.src=E;var F={img:P,assetData:S};return F}function createFootageData(u){var S={assetData:u},E=getAssetsPath(u,this.assetsPath,this.path);return dataManager.loadData(E,(function(u){S.img=u,this._footageLoaded()}).bind(this),(function(){S.img={},this._footageLoaded()}).bind(this)),S}function loadAssets(u,S){this.imagesLoadedCb=S;var E,P=u.length;for(E=0;Ethis.animationData.op&&(this.animationData.op=u.op,this.totalFrames=Math.floor(u.op-this.animationData.ip));var S,E,P=this.animationData.layers,F=P.length,T=u.layers,D=T.length;for(E=0;Ethis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(u){this.triggerRenderFrameError(u)}},AnimationItem.prototype.play=function(u){(!u||this.name===u)&&!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(u){u&&this.name!==u||!1!==this.isPaused||(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(u){u&&this.name!==u||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(u){u&&this.name!==u||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(u){for(var S,E=0;E=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?S>=this.totalFrames?(this.playCount+=1,this.checkSegments(S%this.totalFrames)||(this.setCurrentRawFrameValue(S%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(S):this.checkSegments(S>this.totalFrames?S%this.totalFrames:0)||(E=!0,S=this.totalFrames-1):S<0?this.checkSegments(S%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&!0!==this.loop)?(this.setCurrentRawFrameValue(this.totalFrames+S%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(E=!0,S=0)):this.setCurrentRawFrameValue(S),E&&(this.setCurrentRawFrameValue(S),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(u,S){this.playCount=0,u[1]0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=u[0]-u[1],this.timeCompleted=this.totalFrames,this.firstFrame=u[1],this.setCurrentRawFrameValue(this.totalFrames-.001-S)):u[1]>u[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=u[1]-u[0],this.timeCompleted=this.totalFrames,this.firstFrame=u[0],this.setCurrentRawFrameValue(.001+S)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(u,S){var E=-1;this.isPaused&&(this.currentRawFrame+this.firstFrameS&&(E=S-u)),this.firstFrame=u,this.totalFrames=S-u,this.timeCompleted=this.totalFrames,-1!==E&&this.goToAndStop(E,!0)},AnimationItem.prototype.playSegments=function(u,S){if(S&&(this.segments.length=0),"object"===_typeof$4(u[0])){var E,P=u.length;for(E=0;E=0;E-=1)S[E].animation.destroy(u)}function searchAnimations(u,S,E){var P,F=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),T=F.length;for(P=0;P0?E=I:S=I;while(Math.abs(M)>F&&++V=P?newtonRaphsonIterate(u,L,S,E):0===R?L:binarySubdivide(u,T,T+M,S,E)}},u}(),pooling=function(){return{double:function(u){return u.concat(createSizedArray(u.length))}}}(),poolFactory=function(){return function(u,S,E){var P=0,F=u,T=createSizedArray(F);return{newElement:function(){var u;return P?(P-=1,u=T[P]):u=S(),u},release:function(u){P===F&&(T=pooling.double(T),F*=2),E&&E(u),T[P]=u,P+=1}}}}(),bezierLengthPool=function(){return poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}})}(),segmentsLengthPool=function(){return poolFactory(8,function(){return{lengths:[],totalLength:0}},function(u){var S,E=u.lengths.length;for(S=0;S-.001&&D<.001}function pointOnLine3D(S,E,P,F,T,D,M,I,V){if(0===P&&0===D&&0===V)return pointOnLine2D(S,E,F,T,M,I);var L,R=u.sqrt(u.pow(F-S,2)+u.pow(T-E,2)+u.pow(D-P,2)),G=u.sqrt(u.pow(M-S,2)+u.pow(I-E,2)+u.pow(V-P,2)),O=u.sqrt(u.pow(M-F,2)+u.pow(I-T,2)+u.pow(V-D,2));return(L=R>G?R>O?R-G-O:O-G-R:O>G?O-G-R:G-R-O)>-.0001&&L<1e-4}var S=function(){return function(u,S,E,P){var F,T,D,M,I,V,L=getDefaultCurveSegments(),R=0,G=[],O=[],N=bezierLengthPool.newElement();for(F=0,D=E.length;FD?-1:1,V=!0;V;)if(P[T]<=D&&P[T+1]>D?(M=(D-P[T])/(P[T+1]-P[T]),V=!1):T+=I,T<0||T>=F-1){if(T===F-1)return E[T];V=!1}return E[T]+(E[T+1]-E[T])*M}function getPointInSegment(S,E,P,F,T,D){var M=getDistancePerc(T,D),I=1-M;return[u.round((I*I*I*S[0]+(M*I*I+I*M*I+I*I*M)*P[0]+(M*M*I+I*M*M+M*I*M)*F[0]+M*M*M*E[0])*1e3)/1e3,u.round((I*I*I*S[1]+(M*I*I+I*M*I+I*I*M)*P[1]+(M*M*I+I*M*M+M*I*M)*F[1]+M*M*M*E[1])*1e3)/1e3]}var P=createTypedArray("float32",8);return{getSegmentsLength:getSegmentsLength,getNewSegment:function(S,E,F,T,D,M,I){D<0?D=0:D>1&&(D=1);var V,L=getDistancePerc(D,I),R=getDistancePerc(M=M>1?1:M,I),G=S.length,O=1-L,N=1-R,H=O*O*O,W=L*O*O*3,$=L*L*O*3,Y=L*L*L,X=O*O*N,Z=L*O*N+O*L*N+O*O*R,J=L*L*N+O*L*R+L*O*R,K=L*L*R,U=O*N*N,Q=L*N*N+O*R*N+O*N*R,tt=L*R*N+O*R*R+L*N*R,te=L*R*R,tr=N*N*N,ts=R*N*N+N*R*N+N*N*R,ta=R*R*N+N*R*R+R*N*R,tn=R*R*R;for(V=0;V=Y.t-M){$.h&&($=Y),I=0;break}if(Y.t-M>u){I=V;break}V=G||u=G?N.points.length-1:0;for(Z=0,J=N.points[H].point.length;Z=ta&&ts=G?(W[0]=te[0],W[1]=te[1],W[2]=te[2]):u<=O?(W[0]=$.s[0],W[1]=$.s[1],W[2]=$.s[2]):quaternionToEuler(W,slerp(createQuaternion($.s),createQuaternion(te),(u-O)/(G-O)));else for(V=0;V=G?K=1:u1e-6?(T=Math.sin(P=Math.acos(F)),D=Math.sin((1-E)*P)/T,M=Math.sin(E*P)/T):(D=1-E,M=E),I[0]=D*V+M*O,I[1]=D*L+M*N,I[2]=D*R+M*H,I[3]=D*G+M*W,I}function quaternionToEuler(u,S){var E=S[0],P=S[1],F=S[2],T=S[3],D=Math.atan2(2*P*T-2*E*F,1-2*P*P-2*F*F),M=Math.asin(2*E*P+2*F*T),I=Math.atan2(2*E*T-2*P*F,1-2*E*E-2*F*F);u[0]=D/degToRads,u[1]=M/degToRads,u[2]=I/degToRads}function createQuaternion(u){var S=u[0]*degToRads,E=u[1]*degToRads,P=u[2]*degToRads,F=Math.cos(S/2),T=Math.cos(E/2),D=Math.cos(P/2),M=Math.sin(S/2),I=Math.sin(E/2),V=Math.sin(P/2),L=F*T*D-M*I*V;return[M*I*D+F*T*V,M*T*D+F*I*V,F*I*D-M*T*V,L]}function getValueAtCurrentTime(){var u=this.comp.renderedFrame-this.offsetTime,S=this.keyframes[0].t-this.offsetTime,E=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(u===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=E&&u>=E||this._caching.lastFrame=u&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var P=this.interpolateValue(u,this._caching);this.pv=P}return this._caching.lastFrame=u,this.pv}function setVValue(u){var S;if("unidimensional"===this.propType)S=u*this.mult,mathAbs(this.v-S)>1e-5&&(this.v=S,this._mdf=!0);else for(var E=0,P=this.v.length;E1e-5&&(this.v[E]=S,this._mdf=!0),E+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var u,S=this.effectsSequence.length,E=this.kf?this.pv:this.data.k;for(u=0;u=this._maxLength&&this.doubleArrayLength(),E){case"v":T=this.v;break;case"i":T=this.i;break;case"o":T=this.o;break;default:T=[]}T[P]&&(!T[P]||F)||(T[P]=pointPool.newElement()),T[P][0]=u,T[P][1]=S},ShapePath.prototype.setTripleAt=function(u,S,E,P,F,T,D,M){this.setXYAt(u,S,"v",D,M),this.setXYAt(E,P,"o",D,M),this.setXYAt(F,T,"i",D,M)},ShapePath.prototype.reverse=function(){var u,S=new ShapePath;S.setPathData(this.c,this._length);var E=this.v,P=this.o,F=this.i,T=0;this.c&&(S.setTripleAt(E[0][0],E[0][1],F[0][0],F[0][1],P[0][0],P[0][1],0,!1),T=1);var D=this._length-1,M=this._length;for(u=T;u=F[F.length-1].t-this.offsetTime)T=F[F.length-1].s?F[F.length-1].s[0]:F[F.length-2].e[0],M=!0;else{for(var T,D,M,I,V,L,R,G,O,N,H,W,$,Y=P,X=F.length-1,Z=!0;Z&&(N=F[Y],!((H=F[Y+1]).t-this.offsetTime>u));)Y=H.t-this.offsetTime?G=1:uP&&S>P)||(this._caching.lastIndex=F0||u>-.000001&&u<0?P(u*S)/S:u}function to2dCSS(){var u=this.props;return"matrix("+roundMatrixProperty(u[0])+","+roundMatrixProperty(u[1])+","+roundMatrixProperty(u[4])+","+roundMatrixProperty(u[5])+","+roundMatrixProperty(u[12])+","+roundMatrixProperty(u[13])+")"}return function(){this.reset=reset,this.rotate=rotate,this.rotateX=rotateX,this.rotateY=rotateY,this.rotateZ=rotateZ,this.skew=skew,this.skewFromAxis=skewFromAxis,this.shear=shear,this.scale=scale,this.setTransform=setTransform,this.translate=translate,this.transform=transform,this.multiply=multiply,this.applyToPoint=applyToPoint,this.applyToX=applyToX,this.applyToY=applyToY,this.applyToZ=applyToZ,this.applyToPointArray=applyToPointArray,this.applyToTriplePoints=applyToTriplePoints,this.applyToPointStringified=applyToPointStringified,this.toCSS=toCSS,this.to2dCSS=to2dCSS,this.clone=clone,this.cloneFromProps=cloneFromProps,this.equals=equals,this.inversePoints=inversePoints,this.inversePoint=inversePoint,this.getInverseMatrix=getInverseMatrix,this._t=this.transform,this.isIdentity=isIdentity,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(u){return(_typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(u)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(u){setLocationHref(u)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(u){setSubframeEnabled(u)}function setPrefix(u){setIdPrefix(u)}function loadAnimation(u){return!0===standalone&&(u.animationData=JSON.parse(animationData)),animationManager.loadAnimation(u)}function setQuality(u){if("string"==typeof u)switch(u){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(u)&&u>1&&setDefaultCurveSegments(u);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(u,S){"expressions"===u&&setExpressionsPlugin(S)}function getFactory(u){switch(u){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(u){for(var S=queryString.split("&"),E=0;E=1?M.push({s:u-1,e:S-1}):(M.push({s:u,e:1}),M.push({s:0,e:S-1}));var I=[],V=M.length;for(T=0;TP+E||I.push([D.s*F<=P?0:(D.s*F-P)/E,D.e*F>=P+E?1:(D.e*F-P)/E]);return I.length||I.push([0,0]),I},TrimModifier.prototype.releasePathsData=function(u){var S,E=u.length;for(S=0;S1?1+S:this.s.v<0?0+S:this.s.v+S)>(D=this.e.v>1?1+S:this.e.v<0?0+S:this.e.v+S)){var E=T;T=D,D=E}T=1e-4*Math.round(1e4*T),D=1e-4*Math.round(1e4*D),this.sValue=T,this.eValue=D}else T=this.sValue,D=this.eValue;var P=this.shapes.length,F=0;if(D===T)for(I=0;I=0;I-=1)if((N=this.shapes[I]).shape._mdf){for((H=N.localShapeCollection).releaseShapes(),2===this.m&&P>1?(W=this.calculateShapeEdges(T,D,N.totalShapeLength,Z,F),Z+=N.totalShapeLength):W=[[Y,X]],L=W.length,V=0;V=1?$.push({s:N.totalShapeLength*(Y-1),e:N.totalShapeLength*(X-1)}):($.push({s:N.totalShapeLength*Y,e:N.totalShapeLength}),$.push({s:0,e:N.totalShapeLength*(X-1)}));var J=this.addShapes(N,$[0]);if($[0].s!==$[0].e){if($.length>1){if(N.shape.paths.shapes[N.shape.paths._length-1].c){var K=J.pop();this.addPaths(J,H),J=this.addShapes(N,$[1],K)}else this.addPaths(J,H),J=this.addShapes(N,$[1])}this.addPaths(J,H)}}N.shape.paths=H}}},TrimModifier.prototype.addPaths=function(u,S){var E,P=u.length;for(E=0;ES.e){E.c=!1;break}else S.s<=N&&S.e>=N+D.addedLength?(this.addSegment(G[P].v[F-1],G[P].o[F-1],G[P].i[F],G[P].v[F],E,M,W),W=!1):(V=bez.getNewSegment(G[P].v[F-1],G[P].v[F],G[P].o[F-1],G[P].i[F],(S.s-N)/D.addedLength,(S.e-N)/D.addedLength,I[F-1]),this.addSegmentFromArray(V,E,M,W),W=!1,E.c=!1),N+=D.addedLength,M+=1;if(G[P].c&&I.length){if(D=I[F-1],N<=S.e){var $=I[F-1].addedLength;S.s<=N&&S.e>=N+$?(this.addSegment(G[P].v[F-1],G[P].o[F-1],G[P].i[0],G[P].v[0],E,M,W),W=!1):(V=bez.getNewSegment(G[P].v[F-1],G[P].v[0],G[P].o[F-1],G[P].i[0],(S.s-N)/$,(S.e-N)/$,I[F-1]),this.addSegmentFromArray(V,E,M,W),W=!1,E.c=!1)}else E.c=!1;N+=D.addedLength,M+=1}if(E._length&&(E.setXYAt(E.v[L][0],E.v[L][1],"i",L),E.setXYAt(E.v[E._length-1][0],E.v[E._length-1][1],"o",E._length-1)),N>S.e)break;P=this.p.keyframes[this.p.keyframes.length-1].t?(P=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/E,0),F=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/E,0)):(P=this.p.pv,F=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){P=[],F=[];var P,F,T=this.px,D=this.py;T._caching.lastFrame+T.offsetTime<=T.keyframes[0].t?(P[0]=T.getValueAtTime((T.keyframes[0].t+.01)/E,0),P[1]=D.getValueAtTime((D.keyframes[0].t+.01)/E,0),F[0]=T.getValueAtTime(T.keyframes[0].t/E,0),F[1]=D.getValueAtTime(D.keyframes[0].t/E,0)):T._caching.lastFrame+T.offsetTime>=T.keyframes[T.keyframes.length-1].t?(P[0]=T.getValueAtTime(T.keyframes[T.keyframes.length-1].t/E,0),P[1]=D.getValueAtTime(D.keyframes[D.keyframes.length-1].t/E,0),F[0]=T.getValueAtTime((T.keyframes[T.keyframes.length-1].t-.01)/E,0),F[1]=D.getValueAtTime((D.keyframes[D.keyframes.length-1].t-.01)/E,0)):(P=[T.pv,D.pv],F[0]=T.getValueAtTime((T._caching.lastFrame+T.offsetTime-.01)/E,T.offsetTime),F[1]=D.getValueAtTime((D._caching.lastFrame+D.offsetTime-.01)/E,D.offsetTime))}else P=F=u;this.v.rotate(-Math.atan2(P[1]-F[1],P[0]-F[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 precalculateMatrix(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(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 autoOrient(){}function addDynamicProperty(u){this._addDynamicProperty(u),this.elem.addDynamicProperty(u),this._isDirty=!0}function TransformProperty(u,S,E){if(this.elem=u,this.frameId=-1,this.propType="transform",this.data=S,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(E||u),S.p&&S.p.s?(this.px=PropertyFactory.getProp(u,S.p.x,0,0,this),this.py=PropertyFactory.getProp(u,S.p.y,0,0,this),S.p.z&&(this.pz=PropertyFactory.getProp(u,S.p.z,0,0,this))):this.p=PropertyFactory.getProp(u,S.p||{k:[0,0,0]},1,0,this),S.rx){if(this.rx=PropertyFactory.getProp(u,S.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(u,S.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(u,S.rz,0,degToRads,this),S.or.k[0].ti){var P,F=S.or.k.length;for(P=0;P=Math.abs(u)}function lerp(u,S,E){return u*(1-E)+S*E}function lerpPoint(u,S,E){return[lerp(u[0],S[0],E),lerp(u[1],S[1],E)]}function quadRoots(u,S,E){if(0===u)return[];var P=S*S-4*u*E;if(P<0)return[];var F=-S/(2*u);if(0===P)return[F];var T=Math.sqrt(P)/(2*u);return[F-T,F+T]}function polynomialCoefficients(u,S,E,P){return[-u+3*S-3*E+P,3*u-6*S+3*E,-3*u+3*S,u]}function singlePoint(u){return new PolynomialBezier(u,u,u,u,!1)}function PolynomialBezier(u,S,E,P,F){F&&pointEqual(u,S)&&(S=lerpPoint(u,P,1/3)),F&&pointEqual(E,P)&&(E=lerpPoint(u,P,2/3));var T=polynomialCoefficients(u[0],S[0],E[0],P[0]),D=polynomialCoefficients(u[1],S[1],E[1],P[1]);this.a=[T[0],D[0]],this.b=[T[1],D[1]],this.c=[T[2],D[2]],this.d=[T[3],D[3]],this.points=[u,S,E,P]}function extrema(u,S){var E=u.points[0][S],P=u.points[u.points.length-1][S];if(E>P){var F=P;P=E,E=F}for(var T=quadRoots(3*u.a[S],2*u.b[S],u.c[S]),D=0;D0&&T[D]<1){var M=u.point(T[D])[S];MP&&(P=M)}return{min:E,max:P}}function intersectData(u,S,E){var P=u.boundingBox();return{cx:P.cx,cy:P.cy,width:P.width,height:P.height,bez:u,t:(S+E)/2,t1:S,t2:E}}function splitData(u){var S=u.bez.split(.5);return[intersectData(S[0],u.t1,u.t),intersectData(S[1],u.t,u.t2)]}function boxIntersect(u,S){return 2*Math.abs(u.cx-S.cx)=T||u.width<=P&&u.height<=P&&S.width<=P&&S.height<=P){F.push([u.t,S.t]);return}var D=splitData(u),M=splitData(S);intersectsImpl(D[0],M[0],E+1,P,F,T),intersectsImpl(D[0],M[1],E+1,P,F,T),intersectsImpl(D[1],M[0],E+1,P,F,T),intersectsImpl(D[1],M[1],E+1,P,F,T)}}function crossProduct(u,S){return[u[1]*S[2]-u[2]*S[1],u[2]*S[0]-u[0]*S[2],u[0]*S[1]-u[1]*S[0]]}function lineIntersection(u,S,E,P){var F=[u[0],u[1],1],T=[S[0],S[1],1],D=[E[0],E[1],1],M=[P[0],P[1],1],I=crossProduct(crossProduct(F,T),crossProduct(D,M));return floatZero(I[2])?null:[I[0]/I[2],I[1]/I[2]]}function polarOffset(u,S,E){return[u[0]+Math.cos(S)*E,u[1]-Math.sin(S)*E]}function pointDistance(u,S){return Math.hypot(u[0]-S[0],u[1]-S[1])}function pointEqual(u,S){return floatEqual(u[0],S[0])&&floatEqual(u[1],S[1])}function ZigZagModifier(){}function setPoint(u,S,E,P,F,T,D){var M=E-Math.PI/2,I=E+Math.PI/2,V=S[0]+Math.cos(E)*P*F,L=S[1]-Math.sin(E)*P*F;u.setTripleAt(V,L,V+Math.cos(M)*T,L-Math.sin(M)*T,V+Math.cos(I)*D,L-Math.sin(I)*D,u.length())}function getPerpendicularVector(u,S){var E=[S[0]-u[0],S[1]-u[1]],P=-(.5*Math.PI);return[Math.cos(P)*E[0]-Math.sin(P)*E[1],Math.sin(P)*E[0]+Math.cos(P)*E[1]]}function getProjectingAngle(u,S){var E=0===S?u.length()-1:S-1,P=(S+1)%u.length(),F=getPerpendicularVector(u.v[E],u.v[P]);return Math.atan2(0,1)-Math.atan2(F[1],F[0])}function zigZagCorner(u,S,E,P,F,T,D){var M=getProjectingAngle(S,E),I=S.v[E%S._length],V=S.v[0===E?S._length-1:E-1],L=S.v[(E+1)%S._length],R=2===T?Math.sqrt(Math.pow(I[0]-V[0],2)+Math.pow(I[1]-V[1],2)):0,G=2===T?Math.sqrt(Math.pow(I[0]-L[0],2)+Math.pow(I[1]-L[1],2)):0;setPoint(u,S.v[E%S._length],M,D,P,G/((F+1)*2),R/((F+1)*2),T)}function zigZagSegment(u,S,E,P,F,T){for(var D=0;D1&&S.length>1&&(F=getIntersection(u[0],S[S.length-1])))?[[u[0].split(F[0])[0]],[S[S.length-1].split(F[1])[1]]]:[E,P]}function pruneIntersections(u){for(var S,E=1;E1&&(S=pruneSegmentIntersection(u[u.length-1],u[0]),u[u.length-1]=S[0],u[0]=S[1]),u}function offsetSegmentSplit(u,S){var E,P,F,T,D=u.inflectionPoints();if(0===D.length)return[offsetSegment(u,S)];if(1===D.length||floatEqual(D[1],1))return E=(F=u.split(D[0]))[0],P=F[1],[offsetSegment(E,S),offsetSegment(P,S)];E=(F=u.split(D[0]))[0];var M=(D[1]-D[0])/(1-D[0]);return T=(F=F[1].split(M))[0],P=F[1],[offsetSegment(E,S),offsetSegment(T,S),offsetSegment(P,S)]}function OffsetPathModifier(){}function getFontProperties(u){for(var S=u.fStyle?u.fStyle.split(" "):[],E="normal",P="normal",F=S.length,T=0;T0;)E-=1,this._elements.unshift(S[E]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(u){var S,E=u.length;for(S=0;S0?Math.floor(N):Math.ceil(N),$=this.pMatrix.props,Y=this.rMatrix.props,X=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var Z=0;if(N>0){for(;ZW;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),Z-=1;H&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-H,!0),Z-=H)}for(F=1===this.data.m?0:this._currentCopies-1,T=1===this.data.m?1:-1,D=this._currentCopies;D;){if(V=(P=(E=this.elemsData[F].it)[E.length-1].transform.mProps.v.props).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)*(F/(this._currentCopies-1)),0!==Z){for((0!==F&&1===T||F!==this._currentCopies-1&&-1===T)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5],Y[6],Y[7],Y[8],Y[9],Y[10],Y[11],Y[12],Y[13],Y[14],Y[15]),this.matrix.transform(X[0],X[1],X[2],X[3],X[4],X[5],X[6],X[7],X[8],X[9],X[10],X[11],X[12],X[13],X[14],X[15]),this.matrix.transform($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15]),I=0;I0&&P<1?[S]:[]:[S-P,S+P].filter(function(u){return u>0&&u<1})},PolynomialBezier.prototype.split=function(u){if(u<=0)return[singlePoint(this.points[0]),this];if(u>=1)return[this,singlePoint(this.points[this.points.length-1])];var S=lerpPoint(this.points[0],this.points[1],u),E=lerpPoint(this.points[1],this.points[2],u),P=lerpPoint(this.points[2],this.points[3],u),F=lerpPoint(S,E,u),T=lerpPoint(E,P,u),D=lerpPoint(F,T,u);return[new PolynomialBezier(this.points[0],S,F,D,!0),new PolynomialBezier(D,T,P,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var u=this.bounds();return{left:u.x.min,right:u.x.max,top:u.y.min,bottom:u.y.max,width:u.x.max-u.x.min,height:u.y.max-u.y.min,cx:(u.x.max+u.x.min)/2,cy:(u.y.max+u.y.min)/2}},PolynomialBezier.prototype.intersections=function(u,S,E){void 0===S&&(S=2),void 0===E&&(E=7);var P=[];return intersectsImpl(intersectData(this,0,1),intersectData(u,0,1),0,S,P,E),P},PolynomialBezier.shapeSegment=function(u,S){var E=(S+1)%u.length();return new PolynomialBezier(u.v[S],u.o[S],u.i[E],u.v[E],!0)},PolynomialBezier.shapeSegmentInverted=function(u,S){var E=(S+1)%u.length();return new PolynomialBezier(u.v[E],u.i[E],u.o[S],u.v[S],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(u,S){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(u,S.s,0,null,this),this.frequency=PropertyFactory.getProp(u,S.r,0,null,this),this.pointsType=PropertyFactory.getProp(u,S.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(u,S,E,P){var F=u._length,T=shapePool.newElement();if(T.c=u.c,u.c||(F-=1),0===F)return T;var D=-1,M=PolynomialBezier.shapeSegment(u,0);zigZagCorner(T,u,0,S,E,P,D);for(var I=0;I=0;F-=1)D=PolynomialBezier.shapeSegmentInverted(u,F),V.push(offsetSegmentSplit(D,S));V=pruneIntersections(V);var L=null,R=null;for(F=0;F0&&(I=!1),I){var V=createTag("style");V.setAttribute("f-forigin",E[T].fOrigin),V.setAttribute("f-origin",E[T].origin),V.setAttribute("f-family",E[T].fFamily),V.type="text/css",V.innerText="@font-face {font-family: "+E[T].fFamily+"; font-style: normal; src: url('"+E[T].fPath+"');}",S.appendChild(V)}}else if("g"===E[T].fOrigin||1===E[T].origin){for(M=0,D=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');M=55296&&E<=56319){var P=u.charCodeAt(1);P>=56320&&P<=57343&&(S=(E-55296)*1024+P-56320+65536)}return S}function isModifier(u,S){var E=u.toString(16)+S.toString(16);return -1!==R.indexOf(E)}function isZeroWidthJoiner(u){return u===I}function isVariationSelector(u){return u===M}function isRegionalCode(u){var S=getCodePoint(u);return S>=V&&S<=L}function isFlagEmoji(u){return isRegionalCode(u.substr(0,2))&&isRegionalCode(u.substr(2,2))}function isCombinedCharacter(u){return -1!==E.indexOf(u)}function isRegionalFlag(u,S){var E=getCodePoint(u.substr(S,2));if(E!==P)return!1;var M=0;for(S+=2;M<5;){if((E=getCodePoint(u.substr(S,2)))D)return!1;M+=1,S+=2}return getCodePoint(u.substr(S,2))===F}function setIsLoaded(){this.isLoaded=!0}var Font=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)};Font.isModifier=isModifier,Font.isZeroWidthJoiner=isZeroWidthJoiner,Font.isFlagEmoji=isFlagEmoji,Font.isRegionalCode=isRegionalCode,Font.isCombinedCharacter=isCombinedCharacter,Font.isRegionalFlag=isRegionalFlag,Font.isVariationSelector=isVariationSelector,Font.BLACK_FLAG_CODE_POINT=P;var G={addChars:addChars,addFonts:addFonts,getCharData:getCharData,getFontByName:getFontByName,measureText:measureText,checkLoadedFonts:checkLoadedFonts,setIsLoaded:setIsLoaded};return Font.prototype=G,Font}();function SlotManager(u){this.animationData=u}function slotFactory(u){return new SlotManager(u)}function RenderableElement(){}SlotManager.prototype.getProp=function(u){return this.animationData.slots&&this.animationData.slots[u.sid]?Object.assign(u,this.animationData.slots[u.sid].p):u},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(u){-1===this.renderableComponents.indexOf(u)&&this.renderableComponents.push(u)},removeRenderableComponent:function(u){-1!==this.renderableComponents.indexOf(u)&&this.renderableComponents.splice(this.renderableComponents.indexOf(u),1)},prepareRenderableFrame:function(u){this.checkLayerLimits(u)},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(u){this.data.ip-this.data.st<=u&&this.data.op-this.data.st>u?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var u,S=this.renderableComponents.length;for(u=0;u.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(u){this.audio.rate(u)},AudioElement.prototype.volume=function(u){this._volumeMultiplier=u,this._previousVolume=u*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(u){var S,E,P=this.layers.length;for(this.completeLayers=!0,S=P-1;S>=0;S-=1)!this.elements[S]&&(E=this.layers[S]).ip-E.st<=u-this.layers[S].st&&E.op-E.st>u-this.layers[S].st&&this.buildItem(S),this.completeLayers=!!this.elements[S]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(u){switch(u.ty){case 2:return this.createImage(u);case 0:return this.createComp(u);case 1:return this.createSolid(u);case 3:default:return this.createNull(u);case 4:return this.createShape(u);case 5:return this.createText(u);case 6:return this.createAudio(u);case 13:return this.createCamera(u);case 15:return this.createFootage(u)}},BaseRenderer.prototype.createCamera=function(){throw Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(u){return new AudioElement(u,this.globalData,this)},BaseRenderer.prototype.createFootage=function(u){return new FootageElement(u,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var u,S=this.layers.length;for(u=0;u0&&(this.maskElement.setAttribute("id",I),this.element.maskedElement.setAttribute(L,"url("+getLocationHref()+"#"+I+")"),P.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var u=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:u,localMat:u,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),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 u,S=this.finalTransform.mat,E=0,P=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;E1&&(T+=" C"+S.o[P-1][0]+","+S.o[P-1][1]+" "+S.i[0][0]+","+S.i[0][1]+" "+S.v[0][0]+","+S.v[0][1]),E.lastPath!==T){var D="";E.elem&&(S.c&&(D=u.inv?this.solidPath+T:T),E.elem.setAttribute("d",D)),E.lastPath=T}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var u={};function createFilter(u,S){var E=createNS("filter");return E.setAttribute("id",u),!0!==S&&(E.setAttribute("filterUnits","objectBoundingBox"),E.setAttribute("x","0%"),E.setAttribute("y","0%"),E.setAttribute("width","100%"),E.setAttribute("height","100%")),E}function createAlphaToLuminanceFilter(){var u=createNS("feColorMatrix");return u.setAttribute("type","matrix"),u.setAttribute("color-interpolation-filters","sRGB"),u.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),u}return u.createFilter=createFilter,u.createAlphaToLuminanceFilter=createAlphaToLuminanceFilter,u}(),featureSupport=function(){var u={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"undefined"!=typeof OffscreenCanvas};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))&&(u.maskType=!1),/firefox/i.test(navigator.userAgent)&&(u.svgLumaHidden=!1),u}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(u){var S,E,P="SourceGraphic",F=u.data.ef?u.data.ef.length:0,T=createElementID(),D=filtersFactory.createFilter(T,!0),M=0;for(S=0,this.filters=[];S=0&&!this.shapeModifiers[u].processShapes(this._isFirstFrame);u-=1);}},searchProcessedElement:function(u){for(var S=this.processedElements,E=0,P=S.length;E.01)return!1;E+=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 u=0,S=this.data.k.k.length;u0;)I=P.transformers[N].mProps._mdf||I,O-=1,N-=1;if(I)for(O=W-P.styles[L].lvl,N=P.transformers.length-1;O>0;)G.multiply(P.transformers[N].mProps.v),O-=1,N-=1}else G=u;if(D=(R=P.sh.paths)._length,I){for(T=0,M="";T=1?Y=.99:Y<=-1&&(Y=-.99);var X=M*Y,Z=Math.cos($+S.a.v)*X+L[0],J=Math.sin($+S.a.v)*X+L[1];I.setAttribute("fx",Z),I.setAttribute("fy",J),V&&!S.g._collapsable&&(S.of.setAttribute("fx",Z),S.of.setAttribute("fy",J))}}function renderStroke(u,S,E){var P=S.style,F=S.d;F&&(F._mdf||E)&&F.dashStr&&(P.pElem.setAttribute("stroke-dasharray",F.dashStr),P.pElem.setAttribute("stroke-dashoffset",F.dashoffset[0])),S.c&&(S.c._mdf||E)&&P.pElem.setAttribute("stroke","rgb("+bmFloor(S.c.v[0])+","+bmFloor(S.c.v[1])+","+bmFloor(S.c.v[2])+")"),(S.o._mdf||E)&&P.pElem.setAttribute("stroke-opacity",S.o.v),(S.w._mdf||E)&&(P.pElem.setAttribute("stroke-width",S.w.v),P.msElem&&P.msElem.setAttribute("stroke-width",S.w.v))}return{createRenderFunction:function(u){switch(u.ty){case"fl":return renderFill;case"gf":return renderGradient;case"gs":return renderGradientStroke;case"st":return renderStroke;case"sh":case"el":case"rc":case"sr":return renderPath;case"tr":return renderContentTransform;case"no":return renderNoop;default:return null}}}}();function SVGShapeElement(u,S,E){this.shapes=[],this.shapesData=u.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(u,S,E),this.prevViewData=[]}function LetterProps(u,S,E,P,F,T){this.o=u,this.sw=S,this.sc=E,this.fc=P,this.m=F,this.p=T,this._mdf={o:!0,sw:!!S,sc:!!E,fc:!!P,m:!0,p:!0}}function TextProperty(u,S){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,S.d&&S.d.sid&&(S.d=u.globalData.slotManager.getProp(S.d)),this.data=S,this.elem=u,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}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 u,S,E,P,F=this.shapes.length,T=this.stylesList.length,D=[],M=!1;for(E=0;E1&&M&&this.setShapesAsAnimated(D)}},SVGShapeElement.prototype.setShapesAsAnimated=function(u){var S,E=u.length;for(S=0;S=0;M-=1){if((G=this.searchProcessedElement(u[M]))?S[M]=E[G-1]:u[M]._render=D,"fl"===u[M].ty||"st"===u[M].ty||"gf"===u[M].ty||"gs"===u[M].ty||"no"===u[M].ty)G?S[M].style.closed=!1:S[M]=this.createStyleElement(u[M],F),u[M]._render&&S[M].style.pElem.parentNode!==P&&P.appendChild(S[M].style.pElem),H.push(S[M].style);else if("gr"===u[M].ty){if(G)for(I=0,V=S[M].it.length;I1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(u){this.effectsSequence.push(u),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(u){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||u){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var S,E=this.currentData,P=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var F=this.effectsSequence.length,T=u||this.data.d.k[this.keysIndex].s;for(S=0;SS);)E+=1;return this.keysIndex!==E&&(this.keysIndex=E),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(u){for(var S,E,P=[],F=0,T=u.length,D=!1,M=!1,I="";F=55296&&S<=56319?FontManager.isRegionalFlag(u,F)?I=u.substr(F,14):(E=u.charCodeAt(F+1))>=56320&&E<=57343&&(FontManager.isModifier(S,E)?(I=u.substr(F,2),D=!0):I=FontManager.isFlagEmoji(u.substr(F,4))?u.substr(F,4):u.substr(F,2)):S>56319?(E=u.charCodeAt(F+1),FontManager.isVariationSelector(S)&&(D=!0)):FontManager.isZeroWidthJoiner(S)&&(D=!0,M=!0),D?(P[P.length-1]+=I,D=!1):P.push(I),F+=I.length;return P},TextProperty.prototype.completeTextData=function(u){u.__complete=!0;var S=this.elem.globalData.fontManager,E=this.data,P=[],F=0,T=E.m.g,D=0,M=0,I=0,V=[],L=0,R=0,G=S.getFontByName(u.f),O=0,N=getFontProperties(G);u.fWeight=N.weight,u.fStyle=N.style,u.finalSize=u.s,u.finalText=this.buildFinalText(u.t),$=u.finalText.length,u.finalLineHeight=u.lh;var H=u.tr/1e3*u.finalSize;if(u.sz)for(var W,$,Y,X,Z,J,K,U,Q,tt,te=!0,tr=u.sz[0],ts=u.sz[1];te;){tt=this.buildFinalText(u.t),Q=0,L=0,$=tt.length,H=u.tr/1e3*u.finalSize;var ta=-1;for(W=0;W<$;W+=1)U=tt[W].charCodeAt(0),Y=!1," "===tt[W]?ta=W:(13===U||3===U)&&(L=0,Y=!0,Q+=u.finalLineHeight||1.2*u.finalSize),S.chars?(K=S.getCharData(tt[W],G.fStyle,G.fFamily),O=Y?0:K.w*u.finalSize/100):O=S.measureText(tt[W],u.f,u.finalSize),L+O>tr&&" "!==tt[W]?(-1===ta?$+=1:W=ta,Q+=u.finalLineHeight||1.2*u.finalSize,tt.splice(W,ta===W?1:0,"\r"),ta=-1,L=0):L+=O+H;Q+=G.ascent*u.finalSize/100,this.canResize&&u.finalSize>this.minimumFontSize&&tsR?L:R,L=-2*H,X="",Y=!0,I+=1):X=tp,S.chars?(K=S.getCharData(tp,G.fStyle,S.getFontByName(u.f).fFamily),O=Y?0:K.w*u.finalSize/100):O=S.measureText(X,u.f,u.finalSize)," "===tp?tn+=O+H:(L+=O+H+tn,tn=0),P.push({l:O,an:O,add:D,n:Y,anIndexes:[],val:X,line:I,animatorJustifyOffset:0}),2==T){if(D+=O,""===X||" "===X||W===$-1){for((""===X||" "===X)&&(D-=O);M<=W;)P[M].an=D,P[M].ind=F,P[M].extra=O,M+=1;F+=1,D=0}}else if(3==T){if(D+=O,""===X||W===$-1){for(""===X&&(D-=O);M<=W;)P[M].an=D,P[M].ind=F,P[M].extra=O,M+=1;D=0,F+=1}}else P[F].ind=F,P[F].extra=0,F+=1;if(u.l=P,R=L>R?L:R,V.push(L),u.sz)u.boxWidth=u.sz[0],u.justifyOffset=0;else switch(u.boxWidth=R,u.j){case 1:u.justifyOffset=-u.boxWidth;break;case 2:u.justifyOffset=-u.boxWidth/2;break;default:u.justifyOffset=0}u.lineWidths=V;var th=E.a;J=th.length;var tl=[];for(Z=0;Z0?F=this.ne.v/100:T=-this.ne.v/100,this.xe.v>0?D=1-this.xe.v/100:M=1+this.xe.v/100;var I=BezierFactory.getBezierEasing(F,T,D,M).get,V=0,L=this.finalS,R=this.finalE,G=this.data.sh;if(2===G)V=I(V=R===L?P>=R?1:0:u(0,S(.5/(R-L)+(P-L)/(R-L),1)));else if(3===G)V=I(V=R===L?P>=R?0:1:1-u(0,S(.5/(R-L)+(P-L)/(R-L),1)));else if(4===G)R===L?V=0:(V=u(0,S(.5/(R-L)+(P-L)/(R-L),1)))<.5?V*=2:V=1-2*(V-.5),V=I(V);else if(5===G){if(R===L)V=0;else{var O=R-L,N=-O/2+(P=S(u(0,P+.5-L),R-L)),H=O/2;V=Math.sqrt(1-N*N/(H*H))}V=I(V)}else 6===G?V=I(V=R===L?0:(1+Math.cos(Math.PI+2*Math.PI*(P=S(u(0,P+.5-L),R-L))/(R-L)))/2):(P>=E(L)&&(V=P-L<0?u(0,S(S(R,1)-(L-P),1)):u(0,S(R-P,1))),V=I(V));if(100!==this.sm.v){var W=.01*this.sm.v;0===W&&(W=1e-8);var $=.5-.5*W;V<$?V=0:(V=(V-$)/W)>1&&(V=1)}return V*this.a.v},getValue:function(u){this.iterateDynamicProperties(),this._mdf=u||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,u&&2===this.data.r&&(this.e.v=this._currentTextLength);var S=2===this.data.r?1:100/this.data.totalChars,E=this.o.v/S,P=this.s.v/S+E,F=this.e.v/S+E;if(P>F){var T=P;P=F,F=T}this.finalS=P,this.finalE=F}},extendPrototype([DynamicPropertyContainer],TextSelectorPropFactory),{getTextSelectorProp:function(u,S,E){return new TextSelectorPropFactory(u,S,E)}}}();function TextAnimatorDataProperty(u,S,E){var P={propType:!1},F=PropertyFactory.getProp,T=S.a;this.a={r:T.r?F(u,T.r,0,degToRads,E):P,rx:T.rx?F(u,T.rx,0,degToRads,E):P,ry:T.ry?F(u,T.ry,0,degToRads,E):P,sk:T.sk?F(u,T.sk,0,degToRads,E):P,sa:T.sa?F(u,T.sa,0,degToRads,E):P,s:T.s?F(u,T.s,1,.01,E):P,a:T.a?F(u,T.a,1,0,E):P,o:T.o?F(u,T.o,0,.01,E):P,p:T.p?F(u,T.p,1,0,E):P,sw:T.sw?F(u,T.sw,0,0,E):P,sc:T.sc?F(u,T.sc,1,0,E):P,fc:T.fc?F(u,T.fc,1,0,E):P,fh:T.fh?F(u,T.fh,0,0,E):P,fs:T.fs?F(u,T.fs,0,.01,E):P,fb:T.fb?F(u,T.fb,0,.01,E):P,t:T.t?F(u,T.t,0,0,E):P},this.s=TextSelectorProp.getTextSelectorProp(u,S.s,E),this.s.t=S.s.t}function TextAnimatorProperty(u,S,E){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=u,this._renderType=S,this._elem=E,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(E)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var u,S,E=this._textData.a.length,P=PropertyFactory.getProp;for(u=0;u=tl+tN||!tg?(tE=(tl+tN-tf)/tp.partialLength,V=td.point[0]+(tp.point[0]-td.point[0])*tE,L=td.point[1]+(tp.point[1]-td.point[1])*tE,U.translate(-Z[0]*te[ta].an*.005,-(.01*(Z[1]*tA))),tc=!1):tg&&(tf+=tp.partialLength,(tm+=1)>=tg.length&&(tm=0,tv[tu+=1]?tg=tv[tu].points:tP.v.c?(tm=0,tg=tv[tu=0].points):(tf-=tp.partialLength,tg=null)),tg&&(td=tp,tb=(tp=tg[tm]).partialLength));I=te[ta].an/2-te[ta].add,U.translate(-I,0,0)}else I=te[ta].an/2-te[ta].add,U.translate(-I,0,0),U.translate(-Z[0]*te[ta].an*.005,-Z[1]*tA*.01,0);for(F=0;FH?this.textSpans[H].span:createNS(T?"g":"text"),O<=H){if($.setAttribute("stroke-linecap","butt"),$.setAttribute("stroke-linejoin","round"),$.setAttribute("stroke-miterlimit","4"),this.textSpans[H].span=$,T){var N=createNS("g");$.appendChild(N),this.textSpans[H].childSpan=N}this.textSpans[H].span=$,this.layerElement.appendChild($)}$.style.display="inherit"}if(D.reset(),I&&(F[H].n&&(V=-G,L+=u.yOffset+(R?1:0),R=!1),this.applyTextPropertiesToMatrix(u,D,F[H].line,V,L),V+=(F[H].l||0)+G),T){if(1===(Y=this.globalData.fontManager.getCharData(u.finalText[H],S.fStyle,this.globalData.fontManager.getFontByName(u.f).fFamily)).t)X=new SVGCompElement(Y.data,this.globalData,this);else{var H,W,$,Y,X,Z=emptyShapeData;Y.data&&Y.data.shapes&&(Z=this.buildShapeData(Y.data,u.finalSize)),X=new SVGShapeElement(Z,this.globalData,this)}if(this.textSpans[H].glyph){var J=this.textSpans[H].glyph;this.textSpans[H].childSpan.removeChild(J.layerElement),J.destroy()}this.textSpans[H].glyph=X,X._debug=!0,X.prepareFrame(0),X.renderFrame(),this.textSpans[H].childSpan.appendChild(X.layerElement),1===Y.t&&this.textSpans[H].childSpan.setAttribute("transform","scale("+u.finalSize/100+","+u.finalSize/100+")")}else I&&$.setAttribute("transform","translate("+D.props[12]+","+D.props[13]+")"),$.textContent=F[H].val,$.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}I&&$&&$.setAttribute("d",M)}else{var K=this.textContainer,U="start";switch(u.j){case 1:U="end";break;case 2:U="middle";break;default:U="start"}K.setAttribute("text-anchor",U),K.setAttribute("letter-spacing",G);var Q=this.buildTextContents(u.finalText);for(H=0,W=Q.length,L=u.ps?u.ps[1]+u.ascent:0;H=0;S-=1)(this.completeLayers||this.elements[S])&&this.elements[S].prepareFrame(u-this.layers[S].st);if(this.globalData._mdf)for(S=0;S=0;S-=1)(this.completeLayers||this.elements[S])&&(this.elements[S].prepareFrame(this.renderedFrame-this.layers[S].st),this.elements[S]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var u,S=this.layers.length;for(u=0;u=0;E-=1)u.finalTransform.multiply(u.transforms[E].transform.mProps.v);u._mdf=F},processSequences:function(u){var S,E=this.sequenceList.length;for(S=0;S=1){this.buffers=[];var u=this.globalData.canvasContext,S=assetLoader.createCanvas(u.canvas.width,u.canvas.height);this.buffers.push(S);var E=assetLoader.createCanvas(u.canvas.width,u.canvas.height);this.buffers.push(E),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var u=this.globalData;if(u.blendMode!==this.data.bm){u.blendMode=this.data.bm;var S=getBlendMode(this.data.bm);u.canvasContext.globalCompositeOperation=S}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},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)},clearCanvas:function(u){u.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var u=this.buffers[0].getContext("2d");this.clearCanvas(u),u.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var u=this.buffers[1],S=u.getContext("2d");if(this.clearCanvas(S),S.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var E=assetLoader.getLumaCanvas(this.canvasContext.canvas);E.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(E,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(u,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(u){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||u)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var S=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(S),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(S),this.exitLayer(),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,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,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(u,S){var E={data:u,type:u.ty,preTransforms:this.transformsManager.addTransformSequence(S),transforms:[],elements:[],closed:!0===u.hd},P={};if("fl"===u.ty||"st"===u.ty?(P.c=PropertyFactory.getProp(this,u.c,1,255,this),P.c.k||(E.co="rgb("+bmFloor(P.c.v[0])+","+bmFloor(P.c.v[1])+","+bmFloor(P.c.v[2])+")")):("gf"===u.ty||"gs"===u.ty)&&(P.s=PropertyFactory.getProp(this,u.s,1,null,this),P.e=PropertyFactory.getProp(this,u.e,1,null,this),P.h=PropertyFactory.getProp(this,u.h||{k:0},0,.01,this),P.a=PropertyFactory.getProp(this,u.a||{k:0},0,degToRads,this),P.g=new GradientProperty(this,u.g,this)),P.o=PropertyFactory.getProp(this,u.o,0,.01,this),"st"===u.ty||"gs"===u.ty){if(E.lc=lineCapEnum[u.lc||2],E.lj=lineJoinEnum[u.lj||2],1==u.lj&&(E.ml=u.ml),P.w=PropertyFactory.getProp(this,u.w,0,null,this),P.w.k||(E.wi=P.w.v),u.d){var F=new DashProperty(this,u.d,"canvas",this);P.d=F,P.d.k||(E.da=P.d.dashArray,E.do=P.d.dashoffset[0])}}else E.r=2===u.r?"evenodd":"nonzero";return this.stylesList.push(E),P.style=E,P},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(u){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,u.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,u,this)}}},CVShapeElement.prototype.createShapeElement=function(u){var S=new CVShapeData(this,u,this.stylesList,this.transformsManager);return this.shapes.push(S),this.addShapeToModifiers(S),S},CVShapeElement.prototype.reloadShapes=function(){this._isFirstFrame=!0;var u,S=this.itemsData.length;for(u=0;u=0;T-=1){if((I=this.searchProcessedElement(u[T]))?S[T]=E[I-1]:u[T]._shouldRender=P,"fl"===u[T].ty||"st"===u[T].ty||"gf"===u[T].ty||"gs"===u[T].ty)I?S[T].style.closed=!1:S[T]=this.createStyleElement(u[T],N),G.push(S[T].style);else if("gr"===u[T].ty){if(I)for(D=0,M=S[T].it.length;D=0;F-=1)"tr"===S[F].ty?(T=E[F].transform,this.renderShapeTransform(u,T)):"sh"===S[F].ty||"el"===S[F].ty||"rc"===S[F].ty||"sr"===S[F].ty?this.renderPath(S[F],E[F]):"fl"===S[F].ty?this.renderFill(S[F],E[F],T):"st"===S[F].ty?this.renderStroke(S[F],E[F],T):"gf"===S[F].ty||"gs"===S[F].ty?this.renderGradientFill(S[F],E[F],T):"gr"===S[F].ty?this.renderShape(T,S[F].it,E[F].it):S[F].ty;P&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(u,S){if(this._isFirstFrame||S._mdf||u.transforms._mdf){var E,P,F,T=u.trNodes,D=S.paths,M=D._length;T.length=0;var I=u.transforms.finalTransform;for(F=0;F=1?R=.99:R<=-1&&(R=-.99);var G=V*R,O=Math.cos(L+S.a.v)*G+M[0],N=Math.sin(L+S.a.v)*G+M[1];F=D.createRadialGradient(O,N,0,M[0],M[1],V)}var H=u.g.p,W=S.g.c,$=1;for(T=0;TM&&"xMidYMid slice"===I||DF&&"meet"===M||TF&&"slice"===M)?this.transformCanvas.tx=(E-this.transformCanvas.w*(P/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===V&&(TF&&"slice"===M)?this.transformCanvas.tx=(E-this.transformCanvas.w*(P/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,"YMid"===L&&(T>F&&"meet"===M||TF&&"meet"===M||T=0;u-=1)this.elements[u]&&this.elements[u].destroy&&this.elements[u].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(u,S){if((this.renderedFrame!==u||!0!==this.renderConfig.clearCanvas||S)&&!this.destroyed&&-1!==u){this.renderedFrame=u,this.globalData.frameNum=u-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||S,this.globalData.projectInterface.currentFrame=u;var E,P=this.layers.length;for(this.completeLayers||this.checkLayers(u),E=P-1;E>=0;E-=1)(this.completeLayers||this.elements[E])&&this.elements[E].prepareFrame(u-this.layers[E].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),E=P-1;E>=0;E-=1)(this.completeLayers||this.elements[E])&&this.elements[E].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(u){var S=this.elements;if(!S[u]&&99!==this.layers[u].ty){var E=this.createItem(this.layers[u],this,this.globalData);S[u]=E,E.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var u=2*this._length,S=0;for(S=this._length;S=0;u-=1)(this.completeLayers||this.elements[u])&&this.elements[u].renderFrame()},CVCompElement.prototype.destroy=function(){var u;for(u=this.layers.length-1;u>=0;u-=1)this.elements[u]&&this.elements[u].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(u){return new CVCompElement(u,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(u){return new CVCompElement(u,this.globalData,this)},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 u=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var S=this.finalTransform.mat.toCSS();u.transform=S,u.webkitTransform=S}this.finalTransform._opMdf&&(u.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=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var u;this.data.hasMask?((u=createNS("rect")).setAttribute("width",this.data.sw),u.setAttribute("height",this.data.sh),u.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((u=createTag("div")).style.width=this.data.sw+"px",u.style.height=this.data.sh+"px",u.style.backgroundColor=this.data.sc),this.layerElement.appendChild(u)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var u;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),u=this.svgElement;else{u=createNS("svg");var S=this.comp.data?this.comp.data:this.globalData.compSize;u.setAttribute("width",S.w),u.setAttribute("height",S.h),u.appendChild(this.shapesContainer),this.layerElement.appendChild(u)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=u},HShapeElement.prototype.getTransformedPoint=function(u,S){var E,P=u.length;for(E=0;E0&&M<1&&R[G].push(this.calculateF(M,u,S,E,P,G)):(I=T*T-4*D*F)>=0&&((V=(-T+bmSqrt(I))/(2*F))>0&&V<1&&R[G].push(this.calculateF(V,u,S,E,P,G)),(L=(-T-bmSqrt(I))/(2*F))>0&&L<1&&R[G].push(this.calculateF(L,u,S,E,P,G))));this.shapeBoundingBox.left=bmMin.apply(null,R[0]),this.shapeBoundingBox.top=bmMin.apply(null,R[1]),this.shapeBoundingBox.right=bmMax.apply(null,R[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,R[1])},HShapeElement.prototype.calculateF=function(u,S,E,P,F,T){return bmPow(1-u,3)*S[T]+3*bmPow(1-u,2)*u*E[T]+3*(1-u)*bmPow(u,2)*P[T]+bmPow(u,3)*F[T]},HShapeElement.prototype.calculateBoundingBox=function(u,S){var E,P=u.length;for(E=0;EE&&(E=F)}E*=u.mult}else E=u.v*u.mult;S.x-=E,S.xMax+=E,S.y-=E,S.yMax+=E},HShapeElement.prototype.currentBoxContains=function(u){return this.currentBBox.x<=u.x&&this.currentBBox.y<=u.y&&this.currentBBox.width+this.currentBBox.x>=u.x+u.width&&this.currentBBox.height+this.currentBBox.y>=u.y+u.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var u=this.tempBoundingBox,S=999999;if(u.x=S,u.xMax=-S,u.y=S,u.yMax=-S,this.calculateBoundingBox(this.itemsData,u),u.width=u.xMax=0;E-=1){var S=this.hierarchy[E].finalTransform.mProp;this.mat.translate(-S.p.v[0],-S.p.v[1],S.p.v[2]),this.mat.rotateX(-S.or.v[0]).rotateY(-S.or.v[1]).rotateZ(S.or.v[2]),this.mat.rotateX(-S.rx.v).rotateY(-S.ry.v).rotateZ(S.rz.v),this.mat.scale(1/S.s.v[0],1/S.s.v[1],1/S.s.v[2]),this.mat.translate(S.a.v[0],S.a.v[1],S.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 E,P,F,T=Math.sqrt(Math.pow((F=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]])[0],2)+Math.pow(F[1],2)+Math.pow(F[2],2)),D=[F[0]/T,F[1]/T,F[2]/T],M=Math.sqrt(D[2]*D[2]+D[0]*D[0]),I=Math.atan2(D[1],M),V=Math.atan2(D[0],-D[2]);this.mat.rotateY(V).rotateX(-I)}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 L=!this._prevMat.equals(this.mat);if((L||this.pe._mdf)&&this.comp.threeDElements){for(E=0,P=this.comp.threeDElements.length;E=u)return this.threeDElements[S].perspectiveElem;S+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(u,S){var E,P,F=createTag("div");styleDiv(F);var T=createTag("div");if(styleDiv(T),"3d"===S){(E=F.style).width=this.globalData.compSize.w+"px",E.height=this.globalData.compSize.h+"px";var D="50% 50%";E.webkitTransformOrigin=D,E.mozTransformOrigin=D,E.transformOrigin=D;var M="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(P=T.style).transform=M,P.webkitTransform=M}F.appendChild(T);var I={container:T,perspectiveElem:F,startPos:u,endPos:u,type:S};return this.threeDElements.push(I),I},HybridRendererBase.prototype.build3dContainers=function(){var u,S,E=this.layers.length,P="";for(u=0;u=0;u-=1)this.resizerElem.appendChild(this.threeDElements[u].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(u,S){for(var E=0,P=this.threeDElements.length;ED?(u=F/this.globalData.compSize.w,S=F/this.globalData.compSize.w,E=0,P=(T-this.globalData.compSize.h*(F/this.globalData.compSize.w))/2):(u=T/this.globalData.compSize.h,S=T/this.globalData.compSize.h,E=(F-this.globalData.compSize.w*(T/this.globalData.compSize.h))/2,P=0);var M=this.resizerElem.style;M.webkitTransform="matrix3d("+u+",0,0,0,0,"+S+",0,0,0,0,1,0,"+E+","+P+",0,1)",M.transform=M.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var u,S=this.globalData.compSize.w,E=this.globalData.compSize.h,P=this.threeDElements.length;for(u=0;u=L;)u/=2,S/=2,E>>>=1;return(u+E)/S};return prng.int32=function(){return 0|O.g(4)},prng.quick=function(){return O.g(4)/4294967296},prng.double=prng,mixkey(tostring(O.S),u),(P.pass||D||function(u,E,P,F){return(F&&(F.S&©(F,O),u.state=function(){return copy(O,{})}),P)?(S[M]=u,E):u})(prng,G,"global"in P?P.global:this==S,P.state)}function ARC4(u){var S,E=u.length,P=this,T=0,D=P.i=P.j=0,M=P.S=[];for(E||(u=[E++]);TE){var P=E;E=S,S=P}return Math.min(Math.max(u,S),E)}function radiansToDegrees(u){return u/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(u){return u*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(u,S){if("number"==typeof u||u instanceof Number)return S=S||0,Math.abs(u-S);S||(S=helperLengthArray);var E,P=Math.min(u.length,S.length),F=0;for(E=0;E.5?V/(2-D-M):V/(D+M),D){case P:S=(F-T)/V+(F1&&(E-=1),E<1/6)?u+(S-u)*6*E:E<.5?S:E<2/3?u+(S-u)*(2/3-E)*6:u}function hslToRgb(u){var S,E,P,F=u[0],T=u[1],D=u[2];if(0===T)S=D,P=D,E=D;else{var M=D<.5?D*(1+T):D+T-D*T,I=2*D-M;S=hue2rgb(I,M,F+1/3),E=hue2rgb(I,M,F),P=hue2rgb(I,M,F-1/3)}return[S,E,P,u[3]]}function linear(u,S,E,P,F){if((void 0===P||void 0===F)&&(P=S,F=E,S=0,E=1),E=E)return F;var M=E===S?0:(u-S)/(E-S);if(!P.length)return P+(F-P)*M;var I=P.length,V=createTypedArray("float32",I);for(T=0;T1){for(P=0;P1?S=1:S<0&&(S=0);var D=u(S);if($bm_isInstanceOfArray(F)){var M,I=F.length,V=createTypedArray("float32",I);for(M=0;Mdata.k[S].t&&udata.k[S+1].t-u?(E=S+2,P=data.k[S+1].t):(E=S+1,P=data.k[S].t);break}}-1===E&&(E=S+1,P=data.k[S].t)}}else E=0,P=0;var T={};return T.index=E,T.time=P/elem.comp.globalData.frameRate,T}function key(u){if(!data.k.length||"number"==typeof data.k[0])throw Error("The property has no keyframe at index "+u);u-=1,S={time:data.k[u].t/elem.comp.globalData.frameRate,value:[]};var S,E,P,F=Object.prototype.hasOwnProperty.call(data.k[u],"s")?data.k[u].s:data.k[u-1].e;for(E=0,P=F.length;EV.length-1)&&(S=V.length-1),P=L-(F=V[V.length-1-S].t)),"pingpong"===u){if(Math.floor((I-F)/P)%2!=0)return this.getValueAtTime((P-(I-F)%P+F)/this.comp.globalData.frameRate,0)}else if("offset"===u){var R=this.getValueAtTime(F/this.comp.globalData.frameRate,0),G=this.getValueAtTime(L/this.comp.globalData.frameRate,0),O=this.getValueAtTime(((I-F)%P+F)/this.comp.globalData.frameRate,0),N=Math.floor((I-F)/P);if(this.pv.length){for(T=0,D=(M=Array(R.length)).length;T=L)return this.pv;if(E?(P=S?Math.abs(this.elem.comp.globalData.frameRate*S):Math.max(0,this.elem.data.op-L),F=L+P):((!S||S>V.length-1)&&(S=V.length-1),P=(F=V[S].t)-L),"pingpong"===u){if(Math.floor((L-I)/P)%2==0)return this.getValueAtTime(((L-I)%P+L)/this.comp.globalData.frameRate,0)}else if("offset"===u){var R=this.getValueAtTime(L/this.comp.globalData.frameRate,0),G=this.getValueAtTime(F/this.comp.globalData.frameRate,0),O=this.getValueAtTime((P-(L-I)%P+L)/this.comp.globalData.frameRate,0),N=Math.floor((L-I)/P)+1;if(this.pv.length){for(T=0,D=(M=Array(R.length)).length;T1?(D-T)/(S-1):1,I=0,V=0;for(E=this.pv.length?createTypedArray("float32",this.pv.length):0;ID){var L=M,R=P.c&&M===I-1?0:M+1,G=(D-V)/T[M].addedLength;E=bez.getPointInSegment(P.v[L],P.v[R],P.o[L],P.i[R],G,T[M]);break}V+=T[M].addedLength,M+=1}return E||(E=P.c?[P.v[0][0],P.v[0][1]]:[P.v[P._length-1][0],P.v[P._length-1][1]]),E},vectorOnPath:function(u,S,E){1==u?u=this.v.c:0==u&&(u=.999);var P=this.pointOnPath(u,S),F=this.pointOnPath(u+.001,S),T=F[0]-P[0],D=F[1]-P[1],M=Math.sqrt(Math.pow(T,2)+Math.pow(D,2));return 0===M?[0,0]:"tangent"===E?[T/M,D/M]:[-D/M,T/M]},tangentOnPath:function(u,S){return this.vectorOnPath(u,S,"tangent")},normalOnPath:function(u,S){return this.vectorOnPath(u,S,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([ShapeExpressions],E),extendPrototype([ShapeExpressions],P),P.prototype.getValueAtTime=getShapeValueAtTime,P.prototype.initiateExpression=ExpressionManager.initiateExpression;var F=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(u,S,E,P,T){var D=F(u,S,E,P,T);return D.propertyIndex=S.ix,D.lock=!1,3===E?expressionHelpers.searchExpressions(u,S.pt,D):4===E&&expressionHelpers.searchExpressions(u,S.ks,D),D.k&&u.addDynamicProperty(D),D}}function initialize$1(){addPropertyDecorator()}function addDecorator(){function searchExpressions(){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(u,S){var E=this.calculateExpression(S);if(u.t!==E){var P={};return this.copyData(P,u),P.t=E.toString(),P.__complete=!1,P}return u},TextProperty.prototype.searchProperty=function(){var u=this.searchKeyframes(),S=this.searchExpressions();return this.kf=u||S,this.kf},TextProperty.prototype.searchExpressions=searchExpressions}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function(u,S){var E,P,F=createNS("feMerge");for(F.setAttribute("result",u),P=0;P=L?N<0?P:F:P+O*Math.pow((T-u)/N,1/E),R[G]=D,G+=1,M+=256/(I-1);return R.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(u){if(u||this.filterManager._mdf){var S,E=this.filterManager.effectElements;this.feFuncRComposed&&(u||E[3].p._mdf||E[4].p._mdf||E[5].p._mdf||E[6].p._mdf||E[7].p._mdf)&&(S=this.getTableValue(E[3].p.v,E[4].p.v,E[5].p.v,E[6].p.v,E[7].p.v),this.feFuncRComposed.setAttribute("tableValues",S),this.feFuncGComposed.setAttribute("tableValues",S),this.feFuncBComposed.setAttribute("tableValues",S)),this.feFuncR&&(u||E[10].p._mdf||E[11].p._mdf||E[12].p._mdf||E[13].p._mdf||E[14].p._mdf)&&(S=this.getTableValue(E[10].p.v,E[11].p.v,E[12].p.v,E[13].p.v,E[14].p.v),this.feFuncR.setAttribute("tableValues",S)),this.feFuncG&&(u||E[17].p._mdf||E[18].p._mdf||E[19].p._mdf||E[20].p._mdf||E[21].p._mdf)&&(S=this.getTableValue(E[17].p.v,E[18].p.v,E[19].p.v,E[20].p.v,E[21].p.v),this.feFuncG.setAttribute("tableValues",S)),this.feFuncB&&(u||E[24].p._mdf||E[25].p._mdf||E[26].p._mdf||E[27].p._mdf||E[28].p._mdf)&&(S=this.getTableValue(E[24].p.v,E[25].p.v,E[26].p.v,E[27].p.v,E[28].p.v),this.feFuncB.setAttribute("tableValues",S)),this.feFuncA&&(u||E[31].p._mdf||E[32].p._mdf||E[33].p._mdf||E[34].p._mdf||E[35].p._mdf)&&(S=this.getTableValue(E[31].p.v,E[32].p.v,E[33].p.v,E[34].p.v,E[35].p.v),this.feFuncA.setAttribute("tableValues",S))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(u){if(u||this.filterManager._mdf){if((u||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),u||this.filterManager.effectElements[0].p._mdf){var S=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*S[0]),Math.round(255*S[1]),Math.round(255*S[2])))}if((u||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),u||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var E=this.filterManager.effectElements[3].p.v,P=(this.filterManager.effectElements[2].p.v-90)*degToRads,F=E*Math.cos(P),T=E*Math.sin(P);this.feOffset.setAttribute("dx",F),this.feOffset.setAttribute("dy",T)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(u,S,E){this.initialized=!1,this.filterManager=S,this.filterElem=u,this.elem=E,E.matteElement=createNS("g"),E.matteElement.appendChild(E.layerElement),E.matteElement.appendChild(E.transformedElement),E.baseElement=E.matteElement}function SVGGaussianBlurEffect(u,S,E,P){u.setAttribute("x","-100%"),u.setAttribute("y","-100%"),u.setAttribute("width","300%"),u.setAttribute("height","300%"),this.filterManager=S;var F=createNS("feGaussianBlur");F.setAttribute("result",P),u.appendChild(F),this.feGaussianBlur=F}function TransformEffect(){}function SVGTransformEffect(u,S){this.init(S)}function CVTransformEffect(u){this.init(u)}return SVGMatte3Effect.prototype.findSymbol=function(u){for(var S=0,E=_svgMatteSymbols.length;S