import{n as defineComponent,t as createElementBlock,q as openBlock,ap as normalizeStyle,H as ref,aN as watchEffect,o as computed,a7 as watch,R as onMounted,$ as nextTick,p as createBlock,x as createCommentVNode,r as withCtx,B as createVNode,z as unref,a1 as __vitePreload}from"./C-p8iwFB.js";import{_ as __nuxt_component_0}from"./D5dI63nB.js";import{g as getDefaultExportFromCjs}from"./BosuxZz1.js";import{E as Emits}from"./0J232JST.js";var lottie$1={exports:{}},lottie=lottie$1.exports,hasRequiredLottie;function requireLottie(){return hasRequiredLottie||(hasRequiredLottie=1,function(module,exports){typeof navigator<"u"&&function(t,e){module.exports=e()}(lottie,function(){var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(e){_useWebWorker=!!e},getWebWorker=function(){return _useWebWorker},setLocationHref=function(e){locationHref=e},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var r,i=t.length,s;for(r=0;r1?r[1]=1:r[1]<=0&&(r[1]=0),HSVtoRGB(r[0],r[1],r[2])}function addBrightnessToRGB(t,e){var r=RGBtoHSV(t[0]*255,t[1]*255,t[2]*255);return r[2]+=e,r[2]>1?r[2]=1:r[2]<0&&(r[2]=0),HSVtoRGB(r[0],r[1],r[2])}function addHueToRGB(t,e){var r=RGBtoHSV(t[0]*255,t[1]*255,t[2]*255);return r[0]+=e/360,r[0]>1?r[0]-=1:r[0]<0&&(r[0]+=1),HSVtoRGB(r[0],r[1],r[2])}var rgbToHex=function(){var t=[],e,r;for(e=0;e<256;e+=1)r=e.toString(16),t[e]=r.length===1?"0"+r:r;return function(i,s,a){return i<0&&(i=0),s<0&&(s=0),a<0&&(a=0),"#"+t[i]+t[s]+t[a]}}(),setSubframeEnabled=function(e){subframeEnabled=!!e},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(e){expressionsPlugin=e},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(e){expressionsInterfaces=e},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(e){defaultCurveSegments=e},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(e){idPrefix$1=e};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$5=function(r){return typeof r}:_typeof$5=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$5(t)}var dataManager=function(){var t=1,e=[],r,i,s={onmessage:function(){},postMessage:function(P){r({data:P})}},a={postMessage:function(P){s.onmessage({data:P})}};function n(p){if(window.Worker&&window.Blob&&getWebWorker()){var P=new Blob(["var _workerSelf = self; self.onmessage = ",p.toString()],{type:"text/javascript"}),g=URL.createObjectURL(P);return new Worker(g)}return r=p,s}function h(){i||(i=n(function(P){function g(){function C(I,x){var T,y,_=I.length,F,k,R,z;for(y=0;y<_;y+=1)if(T=I[y],"ks"in T&&!T.completed){if(T.completed=!0,T.hasMask){var N=T.masksProperties;for(k=N.length,F=0;F=0;x-=1)if(I[x].ty==="sh")if(I[x].ks.k.i)E(I[x].ks.k);else for(_=I[x].ks.k.length,y=0;y<_;y+=1)I[x].ks.k[y].s&&E(I[x].ks.k[y].s[0]),I[x].ks.k[y].e&&E(I[x].ks.k[y].e[0]);else I[x].ty==="gr"&&d(I[x].it)}function E(I){var x,T=I.i.length;for(x=0;xT[0]?!0:T[0]>I[0]?!1:I[1]>T[1]?!0:T[1]>I[1]?!1:I[2]>T[2]?!0:T[2]>I[2]?!1:null}var A=function(){var I=[4,4,14];function x(y){var _=y.t.d;y.t.d={k:[{s:_,t:0}]}}function T(y){var _,F=y.length;for(_=0;_=0;_-=1)if(y[_].ty==="sh")if(y[_].ks.k.i)y[_].ks.k.c=y[_].closed;else for(R=y[_].ks.k.length,k=0;k500)&&(this._imageLoaded(),clearInterval(l)),u+=1}).bind(this),50)}function a(c){var u=i(c,this.assetsPath,this.path),l=createNS("image");isSafari?this.testImageLoaded(l):l.addEventListener("load",this._imageLoaded,!1),l.addEventListener("error",(function(){d.img=t,this._imageLoaded()}).bind(this),!1),l.setAttributeNS("http://www.w3.org/1999/xlink","href",u),this._elementHelper.append?this._elementHelper.append(l):this._elementHelper.appendChild(l);var d={img:l,assetData:c};return d}function n(c){var u=i(c,this.assetsPath,this.path),l=createTag("img");l.crossOrigin="anonymous",l.addEventListener("load",this._imageLoaded,!1),l.addEventListener("error",(function(){d.img=t,this._imageLoaded()}).bind(this),!1),l.src=u;var d={img:l,assetData:c};return d}function h(c){var u={assetData:c},l=i(c,this.assetsPath,this.path);return dataManager.loadData(l,(function(d){u.img=d,this._footageLoaded()}).bind(this),(function(){u.img={},this._footageLoaded()}).bind(this)),u}function o(c,u){this.imagesLoadedCb=u;var l,d=c.length;for(l=0;lthis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e=this.animationData.layers,r,i=e.length,s=t.layers,a,n=s.length;for(a=0;athis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),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.trigger("_play"),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.trigger("_pause"),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,r=0;r=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(r=!0,e=this.totalFrames-1):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):e<0?this.checkSegments(e%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0):(r=!0,e=0)):this.setCurrentRawFrameValue(e),r&&(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 r=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(r=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,r!==-1&&this.goToAndStop(r,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),_typeof$4(t[0])==="object"){var r,i=t.length;for(r=0;r=0;T-=1)e[T].animation.destroy(x)}function M(x,T,y){var _=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),F,k=_.length;for(F=0;F0?d=M:l=M;while(Math.abs(A)>a&&++w=s?C(l,L,d,E):V===0?L:m(l,A,A+o,d,E)}},t}(),pooling=function(){function t(e){return e.concat(createSizedArray(e.length))}return{double:t}}(),poolFactory=function(){return function(t,e,r){var i=0,s=t,a=createSizedArray(s),n={newElement:h,release:o};function h(){var f;return i?(i-=1,f=a[i]):f=e(),f}function o(f){i===s&&(a=pooling.double(a),s*=2),r&&r(f),a[i]=f,i+=1}return n}}(),bezierLengthPool=function(){function t(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}return poolFactory(8,t)}(),segmentsLengthPool=function(){function t(){return{lengths:[],totalLength:0}}function e(r){var i,s=r.lengths.length;for(i=0;i-.001&&u<.001}function r(p,P,g,m,C,c,u,l,d){if(g===0&&c===0&&d===0)return e(p,P,m,C,u,l);var E=t.sqrt(t.pow(m-p,2)+t.pow(C-P,2)+t.pow(c-g,2)),S=t.sqrt(t.pow(u-p,2)+t.pow(l-P,2)+t.pow(d-g,2)),A=t.sqrt(t.pow(u-m,2)+t.pow(l-C,2)+t.pow(d-c,2)),M;return E>S?E>A?M=E-S-A:M=A-S-E:A>S?M=A-S-E:M=S-E-A,M>-1e-4&&M<1e-4}var i=function(){return function(p,P,g,m){var C=getDefaultCurveSegments(),c,u,l,d,E,S=0,A,M=[],w=[],O=bezierLengthPool.newElement();for(l=g.length,c=0;cu?-1:1,E=!0;E;)if(m[c]<=u&&m[c+1]>u?(l=(u-m[c])/(m[c+1]-m[c]),E=!1):c+=d,c<0||c>=C-1){if(c===C-1)return g[c];E=!1}return g[c]+(g[c+1]-g[c])*l}function f(p,P,g,m,C,c){var u=o(C,c),l=1-u,d=t.round((l*l*l*p[0]+(u*l*l+l*u*l+l*l*u)*g[0]+(u*u*l+l*u*u+u*l*u)*m[0]+u*u*u*P[0])*1e3)/1e3,E=t.round((l*l*l*p[1]+(u*l*l+l*u*l+l*l*u)*g[1]+(u*u*l+l*u*u+u*l*u)*m[1]+u*u*u*P[1])*1e3)/1e3;return[d,E]}var v=createTypedArray("float32",8);function b(p,P,g,m,C,c,u){C<0?C=0:C>1&&(C=1);var l=o(C,u);c=c>1?1:c;var d=o(c,u),E,S=p.length,A=1-l,M=1-d,w=A*A*A,O=l*A*A*3,L=l*l*A*3,V=l*l*l,D=A*A*M,B=l*A*M+A*l*M+A*A*d,I=l*l*M+A*l*d+l*A*d,x=l*l*d,T=A*M*M,y=l*M*M+A*d*M+A*M*d,_=l*d*M+A*d*d+l*M*d,F=l*d*d,k=M*M*M,R=d*M*M+M*d*M+M*M*d,z=d*d*M+M*d*d+d*M*d,N=d*d*d;for(E=0;E=f.t-r){o.h&&(o=f),s=0;break}if(f.t-r>t){s=a;break}a=c||t=c?d.points.length-1:0;for(p=d.points[E].point.length,b=0;b=M&&S=c)i[0]=l[0],i[1]=l[1],i[2]=l[2];else if(t<=u)i[0]=o.s[0],i[1]=o.s[1],i[2]=o.s[2];else{var B=createQuaternion(o.s),I=createQuaternion(l),x=(t-u)/(c-u);quaternionToEuler(i,slerp(B,I,x))}else for(a=0;a=c?P=1:t1e-6?(p=Math.acos(P),g=Math.sin(p),m=Math.sin((1-r)*p)/g,C=Math.sin(r*p)/g):(m=1-r,C=r),i[0]=m*s+C*o,i[1]=m*a+C*f,i[2]=m*n+C*v,i[3]=m*h+C*b,i}function quaternionToEuler(t,e){var r=e[0],i=e[1],s=e[2],a=e[3],n=Math.atan2(2*i*a-2*r*s,1-2*i*i-2*s*s),h=Math.asin(2*r*i+2*s*a),o=Math.atan2(2*r*a-2*i*s,1-2*r*r-2*s*s);t[0]=n/degToRads,t[1]=h/degToRads,t[2]=o/degToRads}function createQuaternion(t){var e=t[0]*degToRads,r=t[1]*degToRads,i=t[2]*degToRads,s=Math.cos(e/2),a=Math.cos(r/2),n=Math.cos(i/2),h=Math.sin(e/2),o=Math.sin(r/2),f=Math.sin(i/2),v=s*a*n-h*o*f,b=h*o*n+s*a*f,p=h*a*n+s*o*f,P=s*o*n-h*a*f;return[b,p,P,v]}function getValueAtCurrentTime(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=r&&t>=r||this._caching.lastFrame=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i}return this._caching.lastFrame=t,this.pv}function setVValue(t){var e;if(this.propType==="unidimensional")e=t*this.mult,mathAbs(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var r=0,i=this.v.length;r1e-5&&(this.v[r]=e,this._mdf=!0),r+=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 t,e=this.effectsSequence.length,r=this.kf?this.pv:this.data.k;for(t=0;t=this._maxLength&&this.doubleArrayLength(),r){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[];break}(!a[i]||a[i]&&!s)&&(a[i]=pointPool.newElement()),a[i][0]=t,a[i][1]=e},ShapePath.prototype.setTripleAt=function(t,e,r,i,s,a,n,h){this.setXYAt(t,e,"v",n,h),this.setXYAt(r,i,"o",n,h),this.setXYAt(s,a,"i",n,h)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,r=this.o,i=this.i,s=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],r[0][0],r[0][1],0,!1),s=1);var a=this._length-1,n=this._length,h;for(h=s;h=B[B.length-1].t-this.offsetTime)E=B[B.length-1].s?B[B.length-1].s[0]:B[B.length-2].e[0],A=!0;else{for(var I=d,x=B.length-1,T=!0,y,_,F;T&&(y=B[I],_=B[I+1],!(_.t-this.offsetTime>c));)I=_.t-this.offsetTime)V=1;else if(cl&&c>l)||(this._caching.lastIndex=d0||y>-1e-6&&y<0?i(y*_)/_:y}function T(){var y=this.props,_=x(y[0]),F=x(y[1]),k=x(y[4]),R=x(y[5]),z=x(y[12]),N=x(y[13]);return"matrix("+_+","+F+","+k+","+R+","+z+","+N+")"}return function(){this.reset=s,this.rotate=a,this.rotateX=n,this.rotateY=h,this.rotateZ=o,this.skew=v,this.skewFromAxis=b,this.shear=f,this.scale=p,this.setTransform=P,this.translate=g,this.transform=m,this.multiply=C,this.applyToPoint=E,this.applyToX=S,this.applyToY=A,this.applyToZ=M,this.applyToPointArray=D,this.applyToTriplePoints=V,this.applyToPointStringified=B,this.toCSS=I,this.to2dCSS=T,this.clone=l,this.cloneFromProps=d,this.equals=u,this.inversePoints=L,this.inversePoint=O,this.getInverseMatrix=w,this._t=this.transform,this.isIdentity=c,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$3=function(r){return typeof r}:_typeof$3=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$3(t)}var lottie={};function setLocation(t){setLocationHref(t)}function searchAnimations(){animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return animationManager.loadAnimation(t)}function setQuality(t){if(typeof t=="string")switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10);break}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t)}function inBrowser(){return typeof navigator<"u"}function installPlugin(t,e){t==="expressions"&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,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.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";function checkReady(){document.readyState==="complete"&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),r=0;r=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n=[],h,o=a.length,f;for(h=0;hi+r)){var v,b;f.s*s<=i?v=0:v=(f.s*s-i)/r,f.e*s>=i+r?b=1:b=(f.e*s-i)/r,n.push([v,b])}return n.length||n.push([0,0]),n},TrimModifier.prototype.releasePathsData=function(t){var e,r=t.length;for(e=0;e1?e=1+i:this.s.v<0?e=0+i:e=this.s.v+i,this.e.v>1?r=1+i:this.e.v<0?r=0+i:r=this.e.v+i,e>r){var s=e;e=r,r=s}e=Math.round(e*1e4)*1e-4,r=Math.round(r*1e4)*1e-4,this.sValue=e,this.eValue=r}else e=this.sValue,r=this.eValue;var a,n,h=this.shapes.length,o,f,v,b,p,P=0;if(r===e)for(n=0;n=0;n-=1)if(m=this.shapes[n],m.shape._mdf){for(C=m.localShapeCollection,C.releaseShapes(),this.m===2&&h>1?(d=this.calculateShapeEdges(e,r,m.totalShapeLength,l,P),l+=m.totalShapeLength):d=[[c,u]],f=d.length,o=0;o=1?g.push({s:m.totalShapeLength*(c-1),e:m.totalShapeLength*(u-1)}):(g.push({s:m.totalShapeLength*c,e:m.totalShapeLength}),g.push({s:0,e:m.totalShapeLength*(u-1)}));var E=this.addShapes(m,g[0]);if(g[0].s!==g[0].e){if(g.length>1){var S=m.shape.paths.shapes[m.shape.paths._length-1];if(S.c){var A=E.pop();this.addPaths(E,C),E=this.addShapes(m,g[1],A)}else this.addPaths(E,C),E=this.addShapes(m,g[1])}this.addPaths(E,C)}}m.shape.paths=C}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;re.e){r.c=!1;break}else e.s<=f&&e.e>=f+v.addedLength?(this.addSegment(s[a].v[h-1],s[a].o[h-1],s[a].i[h],s[a].v[h],r,b,C),C=!1):(P=bez.getNewSegment(s[a].v[h-1],s[a].v[h],s[a].o[h-1],s[a].i[h],(e.s-f)/v.addedLength,(e.e-f)/v.addedLength,p[h-1]),this.addSegmentFromArray(P,r,b,C),C=!1,r.c=!1),f+=v.addedLength,b+=1;if(s[a].c&&p.length){if(v=p[h-1],f<=e.e){var c=p[h-1].addedLength;e.s<=f&&e.e>=f+c?(this.addSegment(s[a].v[h-1],s[a].o[h-1],s[a].i[0],s[a].v[0],r,b,C),C=!1):(P=bez.getNewSegment(s[a].v[h-1],s[a].v[0],s[a].o[h-1],s[a].i[0],(e.s-f)/c,(e.e-f)/c,p[h-1]),this.addSegmentFromArray(P,r,b,C),C=!1,r.c=!1)}else r.c=!1;f+=v.addedLength,b+=1}if(r._length&&(r.setXYAt(r.v[m][0],r.v[m][1],"i",m),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),f>e.e)break;a=this.p.keyframes[this.p.keyframes.length-1].t?(v=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/f,0),b=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/f,0)):(v=this.p.pv,b=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/f,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){v=[],b=[];var p=this.px,P=this.py;p._caching.lastFrame+p.offsetTime<=p.keyframes[0].t?(v[0]=p.getValueAtTime((p.keyframes[0].t+.01)/f,0),v[1]=P.getValueAtTime((P.keyframes[0].t+.01)/f,0),b[0]=p.getValueAtTime(p.keyframes[0].t/f,0),b[1]=P.getValueAtTime(P.keyframes[0].t/f,0)):p._caching.lastFrame+p.offsetTime>=p.keyframes[p.keyframes.length-1].t?(v[0]=p.getValueAtTime(p.keyframes[p.keyframes.length-1].t/f,0),v[1]=P.getValueAtTime(P.keyframes[P.keyframes.length-1].t/f,0),b[0]=p.getValueAtTime((p.keyframes[p.keyframes.length-1].t-.01)/f,0),b[1]=P.getValueAtTime((P.keyframes[P.keyframes.length-1].t-.01)/f,0)):(v=[p.pv,P.pv],b[0]=p.getValueAtTime((p._caching.lastFrame+p.offsetTime-.01)/f,p.offsetTime),b[1]=P.getValueAtTime((P._caching.lastFrame+P.offsetTime-.01)/f,P.offsetTime))}else b=t,v=b;this.v.rotate(-Math.atan2(v[1]-b[1],v[0]-b[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.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;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;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 s(){}function a(o){this._addDynamicProperty(o),this.elem.addDynamicProperty(o),this._isDirty=!0}function n(o,f,v){if(this.elem=o,this.frameId=-1,this.propType="transform",this.data=f,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(v||o),f.p&&f.p.s?(this.px=PropertyFactory.getProp(o,f.p.x,0,0,this),this.py=PropertyFactory.getProp(o,f.p.y,0,0,this),f.p.z&&(this.pz=PropertyFactory.getProp(o,f.p.z,0,0,this))):this.p=PropertyFactory.getProp(o,f.p||{k:[0,0,0]},1,0,this),f.rx){if(this.rx=PropertyFactory.getProp(o,f.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(o,f.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(o,f.rz,0,degToRads,this),f.or.k[0].ti){var b,p=f.or.k.length;for(b=0;b0;)r-=1,this._elements.unshift(e[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,r=t.length;for(e=0;e0?Math.floor(p):Math.ceil(p),m=this.pMatrix.props,C=this.rMatrix.props,c=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var u=0;if(p>0){for(;ug;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),u-=1;P&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-P,!0),u-=P)}i=this.data.m===1?0:this._currentCopies-1,s=this.data.m===1?1:-1,a=this._currentCopies;for(var l,d;a;){if(e=this.elemsData[i].it,r=e[e.length-1].transform.mProps.v.props,d=r.length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),u!==0){for((i!==0&&s===1||i!==this._currentCopies-1&&s===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],C[8],C[9],C[10],C[11],C[12],C[13],C[14],C[15]),this.matrix.transform(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],c[9],c[10],c[11],c[12],c[13],c[14],c[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]),l=0;l0&&i<1?[e]:[]:[e-i,e+i].filter(function(s){return s>0&&s<1})},PolynomialBezier.prototype.split=function(t){if(t<=0)return[singlePoint(this.points[0]),this];if(t>=1)return[this,singlePoint(this.points[this.points.length-1])];var e=lerpPoint(this.points[0],this.points[1],t),r=lerpPoint(this.points[1],this.points[2],t),i=lerpPoint(this.points[2],this.points[3],t),s=lerpPoint(e,r,t),a=lerpPoint(r,i,t),n=lerpPoint(s,a,t);return[new PolynomialBezier(this.points[0],e,s,n,!0),new PolynomialBezier(n,a,i,this.points[3],!0)]};function extrema(t,e){var r=t.points[0][e],i=t.points[t.points.length-1][e];if(r>i){var s=i;i=r,r=s}for(var a=quadRoots(3*t.a[e],2*t.b[e],t.c[e]),n=0;n0&&a[n]<1){var h=t.point(a[n])[e];hi&&(i=h)}return{min:r,max:i}}PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var t=this.bounds();return{left:t.x.min,right:t.x.max,top:t.y.min,bottom:t.y.max,width:t.x.max-t.x.min,height:t.y.max-t.y.min,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2}};function intersectData(t,e,r){var i=t.boundingBox();return{cx:i.cx,cy:i.cy,width:i.width,height:i.height,bez:t,t:(e+r)/2,t1:e,t2:r}}function splitData(t){var e=t.bez.split(.5);return[intersectData(e[0],t.t1,t.t),intersectData(e[1],t.t,t.t2)]}function boxIntersect(t,e){return Math.abs(t.cx-e.cx)*2=a||t.width<=i&&t.height<=i&&e.width<=i&&e.height<=i){s.push([t.t,e.t]);return}var n=splitData(t),h=splitData(e);intersectsImpl(n[0],h[0],r+1,i,s,a),intersectsImpl(n[0],h[1],r+1,i,s,a),intersectsImpl(n[1],h[0],r+1,i,s,a),intersectsImpl(n[1],h[1],r+1,i,s,a)}}PolynomialBezier.prototype.intersections=function(t,e,r){e===void 0&&(e=2),r===void 0&&(r=7);var i=[];return intersectsImpl(intersectData(this,0,1),intersectData(t,0,1),0,e,i,r),i},PolynomialBezier.shapeSegment=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[e],t.o[e],t.i[r],t.v[r],!0)},PolynomialBezier.shapeSegmentInverted=function(t,e){var r=(e+1)%t.length();return new PolynomialBezier(t.v[r],t.i[r],t.o[e],t.v[e],!0)};function crossProduct(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function lineIntersection(t,e,r,i){var s=[t[0],t[1],1],a=[e[0],e[1],1],n=[r[0],r[1],1],h=[i[0],i[1],1],o=crossProduct(crossProduct(s,a),crossProduct(n,h));return floatZero(o[2])?null:[o[0]/o[2],o[1]/o[2]]}function polarOffset(t,e,r){return[t[0]+Math.cos(e)*r,t[1]-Math.sin(e)*r]}function pointDistance(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function pointEqual(t,e){return floatEqual(t[0],e[0])&&floatEqual(t[1],e[1])}function ZigZagModifier(){}extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(t,e.s,0,null,this),this.frequency=PropertyFactory.getProp(t,e.r,0,null,this),this.pointsType=PropertyFactory.getProp(t,e.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function setPoint(t,e,r,i,s,a,n){var h=r-Math.PI/2,o=r+Math.PI/2,f=e[0]+Math.cos(r)*i*s,v=e[1]-Math.sin(r)*i*s;t.setTripleAt(f,v,f+Math.cos(h)*a,v-Math.sin(h)*a,f+Math.cos(o)*n,v-Math.sin(o)*n,t.length())}function getPerpendicularVector(t,e){var r=[e[0]-t[0],e[1]-t[1]],i=-Math.PI*.5,s=[Math.cos(i)*r[0]-Math.sin(i)*r[1],Math.sin(i)*r[0]+Math.cos(i)*r[1]];return s}function getProjectingAngle(t,e){var r=e===0?t.length()-1:e-1,i=(e+1)%t.length(),s=t.v[r],a=t.v[i],n=getPerpendicularVector(s,a);return Math.atan2(0,1)-Math.atan2(n[1],n[0])}function zigZagCorner(t,e,r,i,s,a,n){var h=getProjectingAngle(e,r),o=e.v[r%e._length],f=e.v[r===0?e._length-1:r-1],v=e.v[(r+1)%e._length],b=a===2?Math.sqrt(Math.pow(o[0]-f[0],2)+Math.pow(o[1]-f[1],2)):0,p=a===2?Math.sqrt(Math.pow(o[0]-v[0],2)+Math.pow(o[1]-v[1],2)):0;setPoint(t,e.v[r%e._length],h,n,i,p/((s+1)*2),b/((s+1)*2))}function zigZagSegment(t,e,r,i,s,a){for(var n=0;n1&&e.length>1&&(s=getIntersection(t[0],e[e.length-1]),s)?[[t[0].split(s[0])[0]],[e[e.length-1].split(s[1])[1]]]:[r,i]}function pruneIntersections(t){for(var e,r=1;r1&&(e=pruneSegmentIntersection(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}function offsetSegmentSplit(t,e){var r=t.inflectionPoints(),i,s,a,n;if(r.length===0)return[offsetSegment(t,e)];if(r.length===1||floatEqual(r[1],1))return a=t.split(r[0]),i=a[0],s=a[1],[offsetSegment(i,e),offsetSegment(s,e)];a=t.split(r[0]),i=a[0];var h=(r[1]-r[0])/(1-r[0]);return a=a[1].split(h),n=a[0],s=a[1],[offsetSegment(i,e),offsetSegment(n,e),offsetSegment(s,e)]}function OffsetPathModifier(){}extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this.miterLimit=PropertyFactory.getProp(t,e.ml,0,null,this),this.lineJoin=e.lj,this._isAnimated=this.amount.effectsSequence.length!==0},OffsetPathModifier.prototype.processPath=function(t,e,r,i){var s=shapePool.newElement();s.c=t.c;var a=t.length();t.c||(a-=1);var n,h,o,f=[];for(n=0;n=0;n-=1)o=PolynomialBezier.shapeSegmentInverted(t,n),f.push(offsetSegmentSplit(o,e));f=pruneIntersections(f);var v=null,b=null;for(n=0;n0&&(R=!1),R){var H=createTag("style");H.setAttribute("f-forigin",y[_].fOrigin),H.setAttribute("f-origin",y[_].origin),H.setAttribute("f-family",y[_].fFamily),H.type="text/css",H.innerText="@font-face {font-family: "+y[_].fFamily+"; font-style: normal; src: url('"+y[_].fPath+"');}",T.appendChild(H)}}else if(y[_].fOrigin==="g"||y[_].origin===1){for(z=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),N=0;N=55296&&y<=56319){var _=x.charCodeAt(1);_>=56320&&_<=57343&&(T=(y-55296)*1024+_-56320+65536)}return T}function S(x,T){var y=x.toString(16)+T.toString(16);return b.indexOf(y)!==-1}function A(x){return x===o}function M(x){return x===h}function w(x){var T=E(x);return T>=f&&T<=v}function O(x){return w(x.substr(0,2))&&w(x.substr(2,2))}function L(x){return r.indexOf(x)!==-1}function V(x,T){var y=E(x.substr(T,2));if(y!==i)return!1;var _=0;for(T+=2;_<5;){if(y=E(x.substr(T,2)),yn)return!1;_+=1,T+=2}return E(x.substr(T,2))===s}function D(){this.isLoaded=!0}var B=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)};B.isModifier=S,B.isZeroWidthJoiner=A,B.isFlagEmoji=O,B.isRegionalCode=w,B.isCombinedCharacter=L,B.isRegionalFlag=V,B.isVariationSelector=M,B.BLACK_FLAG_CODE_POINT=i;var I={addChars:c,addFonts:C,getCharData:u,getFontByName:d,measureText:l,checkLoadedFonts:g,setIsLoaded:D};return B.prototype=I,B}();function SlotManager(t){this.animationData=t}SlotManager.prototype.getProp=function(t){return this.animationData.slots&&this.animationData.slots[t.sid]?Object.assign(t,this.animationData.slots[t.sid].p):t};function slotFactory(t){return new SlotManager(t)}function RenderableElement(){}RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){this.renderableComponents.indexOf(e)===-1&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){this.renderableComponents.indexOf(e)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},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(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?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 e,r=this.renderableComponents.length;for(e=0;e.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._volumeMultiplier=t,this._previousVolume=t*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(){};function BaseRenderer(){}BaseRenderer.prototype.checkLayers=function(t){var e,r=this.layers.length,i;for(this.completeLayers=!0,e=r-1;e>=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;t0&&(this.maskElement.setAttribute("id",p),this.element.maskedElement.setAttribute(u,"url("+getLocationHref()+"#"+p+")"),i.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e=this.element.finalTransform.mat,r,i=this.masksProperties.length;for(r=0;r1&&(i+=" C"+e.o[s-1][0]+","+e.o[s-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),r.lastPath!==i){var n="";r.elem&&(e.c&&(n=t.inv?this.solidPath+i:i),r.elem.setAttribute("d",n)),r.lastPath=i}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var t={};t.createFilter=e,t.createAlphaToLuminanceFilter=r;function e(i,s){var a=createNS("filter");return a.setAttribute("id",i),s!==!0&&(a.setAttribute("filterUnits","objectBoundingBox"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%")),a}function r(){var i=createNS("feColorMatrix");return i.setAttribute("type","matrix"),i.setAttribute("color-interpolation-filters","sRGB"),i.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),i}return t}(),featureSupport=function(){var t={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<"u"};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),/firefox/i.test(navigator.userAgent)&&(t.svgLumaHidden=!1),t}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(t){var e,r="SourceGraphic",i=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),n=0;this.filters=[];var h;for(e=0;e=0&&(i=this.shapeModifiers[e].processShapes(this._isFirstFrame),!i);e-=1);}},searchProcessedElement:function(e){for(var r=this.processedElements,i=0,s=r.length;i.01)return!1;r+=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;t0;)c=p.transformers[w].mProps._mdf||c,M-=1,w-=1;if(c)for(M=E-p.styles[l].lvl,w=p.transformers.length-1;M>0;)A.multiply(p.transformers[w].mProps.v),M-=1,w-=1}else A=t;if(S=p.sh.paths,m=S._length,c){for(C="",g=0;g=1?D=.99:D<=-1&&(D=-.99);var B=L*D,I=Math.cos(V+p.a.v)*B+C[0],x=Math.sin(V+p.a.v)*B+C[1];g.setAttribute("fx",I),g.setAttribute("fy",x),m&&!p.g._collapsable&&(p.of.setAttribute("fx",I),p.of.setAttribute("fy",x))}}}function v(b,p,P){var g=p.style,m=p.d;m&&(m._mdf||P)&&m.dashStr&&(g.pElem.setAttribute("stroke-dasharray",m.dashStr),g.pElem.setAttribute("stroke-dashoffset",m.dashoffset[0])),p.c&&(p.c._mdf||P)&&g.pElem.setAttribute("stroke","rgb("+bmFloor(p.c.v[0])+","+bmFloor(p.c.v[1])+","+bmFloor(p.c.v[2])+")"),(p.o._mdf||P)&&g.pElem.setAttribute("stroke-opacity",p.o.v),(p.w._mdf||P)&&(g.pElem.setAttribute("stroke-width",p.w.v),g.msElem&&g.msElem.setAttribute("stroke-width",p.w.v))}return r}();function SVGShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,r),this.prevViewData=[]}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=this.shapes.length,r,i,s=this.stylesList.length,a,n=[],h=!1;for(i=0;i1&&h&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e=0;o-=1){if(C=this.searchProcessedElement(t[o]),C?e[o]=r[C-1]:t[o]._render=n,t[o].ty==="fl"||t[o].ty==="st"||t[o].ty==="gf"||t[o].ty==="gs"||t[o].ty==="no")C?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],s),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),p.push(e[o].style);else if(t[o].ty==="gr"){if(!C)e[o]=this.createGroupElement(t[o]);else for(b=e[o].it.length,v=0;v1,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,r=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var i,s=this.effectsSequence.length,a=t||this.data.d.k[this.keysIndex].s;for(i=0;ie);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e=[],r=0,i=t.length,s,a,n=!1,h=!1,o="";r=55296&&s<=56319?FontManager.isRegionalFlag(t,r)?o=t.substr(r,14):(a=t.charCodeAt(r+1),a>=56320&&a<=57343&&(FontManager.isModifier(s,a)?(o=t.substr(r,2),n=!0):FontManager.isFlagEmoji(t.substr(r,4))?o=t.substr(r,4):o=t.substr(r,2))):s>56319?(a=t.charCodeAt(r+1),FontManager.isVariationSelector(s)&&(n=!0)):FontManager.isZeroWidthJoiner(s)&&(n=!0,h=!0),n?(e[e.length-1]+=o,n=!1):e.push(o),r+=o.length;return e},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e=this.elem.globalData.fontManager,r=this.data,i=[],s,a,n,h=0,o,f=r.m.g,v=0,b=0,p=0,P=[],g=0,m=0,C,c,u=e.getFontByName(t.f),l,d=0,E=getFontProperties(u);t.fWeight=E.weight,t.fStyle=E.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),a=t.finalText.length,t.finalLineHeight=t.lh;var S=t.tr/1e3*t.finalSize,A;if(t.sz)for(var M=!0,w=t.sz[0],O=t.sz[1],L,V;M;){V=this.buildFinalText(t.t),L=0,g=0,a=V.length,S=t.tr/1e3*t.finalSize;var D=-1;for(s=0;sw&&V[s]!==" "?(D===-1?a+=1:s=D,L+=t.finalLineHeight||t.finalSize*1.2,V.splice(s,D===s?1:0,"\r"),D=-1,g=0):(g+=d,g+=S);L+=u.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&Om?g:m,g=-2*S,o="",n=!0,p+=1):o=I,e.chars?(l=e.getCharData(I,u.fStyle,e.getFontByName(t.f).fFamily),d=n?0:l.w*t.finalSize/100):d=e.measureText(o,t.f,t.finalSize),I===" "?B+=d+S:(g+=d+S+B,B=0),i.push({l:d,an:d,add:v,n,anIndexes:[],val:o,line:p,animatorJustifyOffset:0}),f==2){if(v+=d,o===""||o===" "||s===a-1){for((o===""||o===" ")&&(v-=d);b<=s;)i[b].an=v,i[b].ind=h,i[b].extra=d,b+=1;h+=1,v=0}}else if(f==3){if(v+=d,o===""||s===a-1){for(o===""&&(v-=d);b<=s;)i[b].an=v,i[b].ind=h,i[b].extra=d,b+=1;v=0,h+=1}}else i[h].ind=h,i[h].extra=0,h+=1;if(t.l=i,m=g>m?g:m,P.push(g),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=m,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=P;var x=r.a,T,y;c=x.length;var _,F,k=[];for(C=0;C0?h=this.ne.v/100:o=-this.ne.v/100,this.xe.v>0?f=1-this.xe.v/100:v=1+this.xe.v/100;var b=BezierFactory.getBezierEasing(h,o,f,v).get,p=0,P=this.finalS,g=this.finalE,m=this.data.sh;if(m===2)g===P?p=n>=g?1:0:p=t(0,e(.5/(g-P)+(n-P)/(g-P),1)),p=b(p);else if(m===3)g===P?p=n>=g?0:1:p=1-t(0,e(.5/(g-P)+(n-P)/(g-P),1)),p=b(p);else if(m===4)g===P?p=0:(p=t(0,e(.5/(g-P)+(n-P)/(g-P),1)),p<.5?p*=2:p=1-2*(p-.5)),p=b(p);else if(m===5){if(g===P)p=0;else{var C=g-P;n=e(t(0,n+.5-P),g-P);var c=-C/2+n,u=C/2;p=Math.sqrt(1-c*c/(u*u))}p=b(p)}else m===6?(g===P?p=0:(n=e(t(0,n+.5-P),g-P),p=(1+Math.cos(Math.PI+Math.PI*2*n/(g-P)))/2),p=b(p)):(n>=r(P)&&(n-P<0?p=t(0,e(e(g,1)-(P-n),1)):p=t(0,e(g-n,1))),p=b(p));if(this.sm.v!==100){var l=this.sm.v*.01;l===0&&(l=1e-8);var d=.5-l*.5;p1&&(p=1))}return p*this.a.v},getValue:function(n){this.iterateDynamicProperties(),this._mdf=n||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,n&&this.data.r===2&&(this.e.v=this._currentTextLength);var h=this.data.r===2?1:100/this.data.totalChars,o=this.o.v/h,f=this.s.v/h+o,v=this.e.v/h+o;if(f>v){var b=f;f=v,v=b}this.finalS=f,this.finalE=v}},extendPrototype([DynamicPropertyContainer],i);function s(a,n,h){return new i(a,n)}return{getTextSelectorProp:s}}();function TextAnimatorDataProperty(t,e,r){var i={propType:!1},s=PropertyFactory.getProp,a=e.a;this.a={r:a.r?s(t,a.r,0,degToRads,r):i,rx:a.rx?s(t,a.rx,0,degToRads,r):i,ry:a.ry?s(t,a.ry,0,degToRads,r):i,sk:a.sk?s(t,a.sk,0,degToRads,r):i,sa:a.sa?s(t,a.sa,0,degToRads,r):i,s:a.s?s(t,a.s,1,.01,r):i,a:a.a?s(t,a.a,1,0,r):i,o:a.o?s(t,a.o,0,.01,r):i,p:a.p?s(t,a.p,1,0,r):i,sw:a.sw?s(t,a.sw,0,0,r):i,sc:a.sc?s(t,a.sc,1,0,r):i,fc:a.fc?s(t,a.fc,1,0,r):i,fh:a.fh?s(t,a.fh,0,0,r):i,fs:a.fs?s(t,a.fs,0,.01,r):i,fb:a.fb?s(t,a.fb,0,.01,r):i,t:a.t?s(t,a.t,0,0,r):i},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,r),this.s.t=e.s.t}function TextAnimatorProperty(t,e,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}TextAnimatorProperty.prototype.searchProperties=function(){var t,e=this._textData.a.length,r,i=PropertyFactory.getProp;for(t=0;t=g+U||!E?(w=(g+U-C)/m.partialLength,N=d.point[0]+(m.point[0]-d.point[0])*w,H=d.point[1]+(m.point[1]-d.point[1])*w,a.translate(-r[0]*p[v].an*.005,-(r[1]*B)*.01),c=!1):E&&(C+=m.partialLength,u+=1,u>=E.length&&(u=0,l+=1,S[l]?E=S[l].points:L.v.c?(u=0,l=0,E=S[l].points):(C-=m.partialLength,E=null)),E&&(d=m,m=E[u],A=m.partialLength));z=p[v].an/2-p[v].add,a.translate(-z,0,0)}else z=p[v].an/2-p[v].add,a.translate(-z,0,0),a.translate(-r[0]*p[v].an*.005,-r[1]*B*.01,0);for(y=0;y<_;y+=1)x=i[y].a,x.t.propType&&(T=i[y].s,k=T.getMult(p[v].anIndexes[y],s.a[y].s.totalChars),(o!==0||t.j!==0)&&(this._hasMaskedPath?k.length?g+=x.t.v*k[0]:g+=x.t.v*k:k.length?o+=x.t.v*k[0]:o+=x.t.v*k));for(t.strokeWidthAnim&&(J=t.sw||0),t.strokeColorAnim&&(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]]),y=0;y<_;y+=1)x=i[y].a,x.a.propType&&(T=i[y].s,k=T.getMult(p[v].anIndexes[y],s.a[y].s.totalChars),k.length?a.translate(-x.a.v[0]*k[0],-x.a.v[1]*k[1],x.a.v[2]*k[2]):a.translate(-x.a.v[0]*k,-x.a.v[1]*k,x.a.v[2]*k));for(y=0;y<_;y+=1)x=i[y].a,x.s.propType&&(T=i[y].s,k=T.getMult(p[v].anIndexes[y],s.a[y].s.totalChars),k.length?a.scale(1+(x.s.v[0]-1)*k[0],1+(x.s.v[1]-1)*k[1],1):a.scale(1+(x.s.v[0]-1)*k,1+(x.s.v[1]-1)*k,1));for(y=0;y<_;y+=1){if(x=i[y].a,T=i[y].s,k=T.getMult(p[v].anIndexes[y],s.a[y].s.totalChars),x.sk.propType&&(k.length?a.skewFromAxis(-x.sk.v*k[0],x.sa.v*k[1]):a.skewFromAxis(-x.sk.v*k,x.sa.v*k)),x.r.propType&&(k.length?a.rotateZ(-x.r.v*k[2]):a.rotateZ(-x.r.v*k)),x.ry.propType&&(k.length?a.rotateY(x.ry.v*k[1]):a.rotateY(x.ry.v*k)),x.rx.propType&&(k.length?a.rotateX(x.rx.v*k[0]):a.rotateX(x.rx.v*k)),x.o.propType&&(k.length?X+=(x.o.v*k[0]-X)*k[0]:X+=(x.o.v*k-X)*k),t.strokeWidthAnim&&x.sw.propType&&(k.length?J+=x.sw.v*k[0]:J+=x.sw.v*k),t.strokeColorAnim&&x.sc.propType)for(G=0;G<3;G+=1)k.length?$[G]+=(x.sc.v[G]-$[G])*k[0]:$[G]+=(x.sc.v[G]-$[G])*k;if(t.fillColorAnim&&t.fc){if(x.fc.propType)for(G=0;G<3;G+=1)k.length?W[G]+=(x.fc.v[G]-W[G])*k[0]:W[G]+=(x.fc.v[G]-W[G])*k;x.fh.propType&&(k.length?W=addHueToRGB(W,x.fh.v*k[0]):W=addHueToRGB(W,x.fh.v*k)),x.fs.propType&&(k.length?W=addSaturationToRGB(W,x.fs.v*k[0]):W=addSaturationToRGB(W,x.fs.v*k)),x.fb.propType&&(k.length?W=addBrightnessToRGB(W,x.fb.v*k[0]):W=addBrightnessToRGB(W,x.fb.v*k))}}for(y=0;y<_;y+=1)x=i[y].a,x.p.propType&&(T=i[y].s,k=T.getMult(p[v].anIndexes[y],s.a[y].s.totalChars),this._hasMaskedPath?k.length?a.translate(0,x.p.v[1]*k[0],-x.p.v[2]*k[1]):a.translate(0,x.p.v[1]*k,-x.p.v[2]*k):k.length?a.translate(x.p.v[0]*k[0],x.p.v[1]*k[1],-x.p.v[2]*k[2]):a.translate(x.p.v[0]*k,x.p.v[1]*k,-x.p.v[2]*k));if(t.strokeWidthAnim&&(et=J<0?0:J),t.strokeColorAnim&&(at="rgb("+Math.round($[0]*255)+","+Math.round($[1]*255)+","+Math.round($[2]*255)+")"),t.fillColorAnim&&t.fc&&(rt="rgb("+Math.round(W[0]*255)+","+Math.round(W[1]*255)+","+Math.round(W[2]*255)+")"),this._hasMaskedPath){if(a.translate(0,-t.ls),a.translate(0,r[1]*B*.01+f,0),this._pathData.p.v){O=(m.point[1]-d.point[1])/(m.point[0]-d.point[0]);var lt=Math.atan(O)*180/Math.PI;m.point[0]t?this.textSpans[t].span:createNS(h?"g":"text"),l<=t){if(o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=o,h){var E=createNS("g");o.appendChild(E),this.textSpans[t].childSpan=E}this.textSpans[t].span=o,this.layerElement.appendChild(o)}o.style.display="inherit"}if(f.reset(),b&&(n[t].n&&(p=-m,P+=r.yOffset,P+=g?1:0,g=!1),this.applyTextPropertiesToMatrix(r,f,n[t].line,p,P),p+=n[t].l||0,p+=m),h){d=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily);var S;if(d.t===1)S=new SVGCompElement(d.data,this.globalData,this);else{var A=emptyShapeData;d.data&&d.data.shapes&&(A=this.buildShapeData(d.data,r.finalSize)),S=new SVGShapeElement(A,this.globalData,this)}if(this.textSpans[t].glyph){var M=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(M.layerElement),M.destroy()}this.textSpans[t].glyph=S,S._debug=!0,S.prepareFrame(0),S.renderFrame(),this.textSpans[t].childSpan.appendChild(S.layerElement),d.t===1&&this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else b&&o.setAttribute("transform","translate("+f.props[12]+","+f.props[13]+")"),o.textContent=n[t].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}b&&o&&o.setAttribute("d",v)}for(;t=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t=0;i-=1)e.finalTransform.multiply(e.transforms[i].transform.mProps.v);e._mdf=a},processSequences:function(e){var r,i=this.sequenceList.length;for(r=0;r=1){this.buffers=[];var e=this.globalData.canvasContext,r=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(r);var i=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(i),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 e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var r=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=r}},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(e){e.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 e=this.buffers[0],r=e.getContext("2d");this.clearCanvas(r),r.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 e=this.buffers[1],r=e.getContext("2d");this.clearCanvas(r),r.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform);var i=this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1);if(i.renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var s=assetLoader.getLumaCanvas(this.canvasContext.canvas),a=s.getContext("2d");a.drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(s,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,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(e){if(!(this.hidden||this.data.hd)&&!(this.data.td===1&&!e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var r=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(r),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(r),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;function CVShapeData(t,e,r,i){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var s=4;e.ty==="rc"?s=5:e.ty==="el"?s=6:e.ty==="sr"&&(s=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,s,t);var a,n=r.length,h;for(a=0;a=0;a-=1){if(b=this.searchProcessedElement(t[a]),b?e[a]=r[b-1]:t[a]._shouldRender=i,t[a].ty==="fl"||t[a].ty==="st"||t[a].ty==="gf"||t[a].ty==="gs")b?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],g),f.push(e[a].style);else if(t[a].ty==="gr"){if(!b)e[a]=this.createGroupElement(t[a]);else for(o=e[a].it.length,h=0;h=0;s-=1)e[s].ty==="tr"?(n=r[s].transform,this.renderShapeTransform(t,n)):e[s].ty==="sh"||e[s].ty==="el"||e[s].ty==="rc"||e[s].ty==="sr"?this.renderPath(e[s],r[s]):e[s].ty==="fl"?this.renderFill(e[s],r[s],n):e[s].ty==="st"?this.renderStroke(e[s],r[s],n):e[s].ty==="gf"||e[s].ty==="gs"?this.renderGradientFill(e[s],r[s],n):e[s].ty==="gr"?this.renderShape(n,e[s].it,r[s].it):e[s].ty;i&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var r=t.trNodes,i=e.paths,s,a,n,h=i._length;r.length=0;var o=t.transforms.finalTransform;for(n=0;n=1?v=.99:v<=-1&&(v=-.99);var b=o*v,p=Math.cos(f+e.a.v)*b+n[0],P=Math.sin(f+e.a.v)*b+n[1];s=a.createRadialGradient(p,P,0,n[0],n[1],o)}var g,m=t.g.p,C=e.g.c,c=1;for(g=0;ga&&o==="xMidYMid slice"||ss&&h==="meet"||as&&h==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(i/this.transformCanvas.h))/2*this.renderConfig.dpr:f==="xMax"&&(as&&h==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(i/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,v==="YMid"&&(a>s&&h==="meet"||as&&h==="meet"||a=0;t-=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if(!(this.renderedFrame===t&&this.renderConfig.clearCanvas===!0&&!e||this.destroyed||t===-1)){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 r,i=this.layers.length;for(this.completeLayers||this.checkLayers(t),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(t-this.layers[r].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=i-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!(e[t]||this.layers[t].ty===99)){var r=this.createItem(this.layers[t],this,this.globalData);e[t]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();t.checkParenting()}},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"};function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){this.stack=[],this.cArrPos=0,this.cTr=new Matrix;var t,e=15;for(t=0;t=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},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)};function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:e&&e.clearCanvas!==void 0?e.clearCanvas:!0,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||"",runExpressions:!e||e.runExpressions===void 0||e.runExpressions},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)};function HBaseElement(){}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),this.data.bm!==0&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var r=this.finalTransform.mat.toCSS();e.transform=r,e.webkitTransform=r}this.finalTransform._opMdf&&(e.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;function HSolidElement(t,e,r){this.initElement(t,e,r)}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)};function HShapeElement(t,e,r){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,r),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}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 r,i=t.length;for(r=0;r0&&o<1&&s[p].push(this.calculateF(o,t,e,r,i,p))):(f=n*n-4*h*a,f>=0&&(v=(-n+bmSqrt(f))/(2*a),v>0&&v<1&&s[p].push(this.calculateF(v,t,e,r,i,p)),b=(-n-bmSqrt(f))/(2*a),b>0&&b<1&&s[p].push(this.calculateF(b,t,e,r,i,p)))));this.shapeBoundingBox.left=bmMin.apply(null,s[0]),this.shapeBoundingBox.top=bmMin.apply(null,s[1]),this.shapeBoundingBox.right=bmMax.apply(null,s[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,s[1])},HShapeElement.prototype.calculateF=function(t,e,r,i,s,a){return bmPow(1-t,3)*e[a]+3*bmPow(1-t,2)*t*r[a]+3*(1-t)*bmPow(t,2)*i[a]+bmPow(t,3)*s[a]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var r,i=t.length;for(r=0;rr&&(r=s)}r*=t.mult}else r=t.v*t.mult;e.x-=r,e.xMax+=r,e.y-=r,e.yMax+=r},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.xMax=0;e-=1){var i=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-i.p.v[0],-i.p.v[1],i.p.v[2]),this.mat.rotateX(-i.or.v[0]).rotateY(-i.or.v[1]).rotateZ(i.or.v[2]),this.mat.rotateX(-i.rx.v).rotateY(-i.ry.v).rotateZ(i.rz.v),this.mat.scale(1/i.s.v[0],1/i.s.v[1],1/i.s.v[2]),this.mat.translate(i.a.v[0],i.a.v[1],i.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;this.p?s=[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:s=[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var a=Math.sqrt(Math.pow(s[0],2)+Math.pow(s[1],2)+Math.pow(s[2],2)),n=[s[0]/a,s[1]/a,s[2]/a],h=Math.sqrt(n[2]*n[2]+n[0]*n[0]),o=Math.atan2(n[1],h),f=Math.atan2(n[0],-n[2]);this.mat.rotateY(f).rotateX(-o)}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 v=!this._prevMat.equals(this.mat);if((v||this.pe._mdf)&&this.comp.threeDElements){r=this.comp.threeDElements.length;var b,p,P;for(e=0;e=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var r=createTag("div"),i,s;styleDiv(r);var a=createTag("div");if(styleDiv(a),e==="3d"){i=r.style,i.width=this.globalData.compSize.w+"px",i.height=this.globalData.compSize.h+"px";var n="50% 50%";i.webkitTransformOrigin=n,i.mozTransformOrigin=n,i.transformOrigin=n,s=a.style;var h="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";s.transform=h,s.webkitTransform=h}r.appendChild(a);var o={container:a,perspectiveElem:r,startPos:t,endPos:t,type:e};return this.threeDElements.push(o),o},HybridRendererBase.prototype.build3dContainers=function(){var t,e=this.layers.length,r,i="";for(t=0;t=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var r=0,i=this.threeDElements.length;rr?(s=t/this.globalData.compSize.w,a=t/this.globalData.compSize.w,n=0,h=(e-this.globalData.compSize.h*(t/this.globalData.compSize.w))/2):(s=e/this.globalData.compSize.h,a=e/this.globalData.compSize.h,n=(t-this.globalData.compSize.w*(e/this.globalData.compSize.h))/2,h=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+s+",0,0,0,0,"+a+",0,0,0,0,1,0,"+n+","+h+",0,1)",o.transform=o.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 t=this.globalData.compSize.w,e=this.globalData.compSize.h,r,i=this.threeDElements.length;for(r=0;r=f;)L/=2,V/=2,D>>>=1;return(L+D)/V};return w.int32=function(){return M.g(4)|0},w.quick=function(){return M.g(4)/4294967296},w.double=w,C(u(M.S),t),(d.pass||E||function(O,L,V,D){return D&&(D.S&&g(D,M),O.state=function(){return g(M,{})}),V?(e[n]=O,L):O})(w,A,"global"in d?d.global:this==e,d.state)}e["seed"+n]=p;function P(l){var d,E=l.length,S=this,A=0,M=S.i=S.j=0,w=S.S=[];for(E||(l=[E++]);Ar){var i=r;r=e,e=i}return Math.min(Math.max(t,e),r)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if(typeof t=="number"||t instanceof Number)return e=e||0,Math.abs(t-e);e||(e=helperLengthArray);var r,i=Math.min(t.length,e.length),s=0;for(r=0;r.5?f/(2-s-a):f/(s+a),s){case e:n=(r-i)/f+(r1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function hslToRgb(t){var e=t[0],r=t[1],i=t[2],s,a,n;if(r===0)s=i,n=i,a=i;else{var h=i<.5?i*(1+r):i+r-i*r,o=2*i-h;s=hue2rgb(o,h,e+1/3),a=hue2rgb(o,h,e),n=hue2rgb(o,h,e-1/3)}return[s,a,n,t[3]]}function linear(t,e,r,i,s){if((i===void 0||s===void 0)&&(i=e,s=r,e=0,r=1),r=r)return s;var n=r===e?0:(t-e)/(r-e);if(!i.length)return i+(s-i)*n;var h,o=i.length,f=createTypedArray("float32",o);for(h=0;h1){for(s=0;s1?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var h,o=s.length,f=createTypedArray("float32",o);for(h=0;hdata.k[e].t&&tdata.k[e+1].t-t?(i=e+2,s=data.k[e+1].t):(i=e+1,s=data.k[e].t);break}i===-1&&(i=e+1,s=data.k[e].t)}var a={};return a.index=i,a.time=s/elem.comp.globalData.frameRate,a}function key(t){var e,r,i;if(!data.k.length||typeof data.k[0]=="number")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(i=s.length,r=0;rC.length-1)&&(P=C.length-1),l=C[C.length-1-P].t,u=c-l);var d,E,S;if(p==="pingpong"){var A=Math.floor((m-l)/u);if(A%2!==0)return this.getValueAtTime((u-(m-l)%u+l)/this.comp.globalData.frameRate,0)}else if(p==="offset"){var M=this.getValueAtTime(l/this.comp.globalData.frameRate,0),w=this.getValueAtTime(c/this.comp.globalData.frameRate,0),O=this.getValueAtTime(((m-l)%u+l)/this.comp.globalData.frameRate,0),L=Math.floor((m-l)/u);if(this.pv.length){for(S=new Array(M.length),E=S.length,d=0;d=c)return this.pv;var u,l;g?(P?u=Math.abs(this.elem.comp.globalData.frameRate*P):u=Math.max(0,this.elem.data.op-c),l=c+u):((!P||P>C.length-1)&&(P=C.length-1),l=C[P].t,u=l-c);var d,E,S;if(p==="pingpong"){var A=Math.floor((c-m)/u);if(A%2===0)return this.getValueAtTime(((c-m)%u+c)/this.comp.globalData.frameRate,0)}else if(p==="offset"){var M=this.getValueAtTime(c/this.comp.globalData.frameRate,0),w=this.getValueAtTime(l/this.comp.globalData.frameRate,0),O=this.getValueAtTime((u-(c-m)%u+c)/this.comp.globalData.frameRate,0),L=Math.floor((c-m)/u)+1;if(this.pv.length){for(S=new Array(M.length),E=S.length,d=0;d1?(C-m)/(P-1):1,u=0,l=0,d;this.pv.length?d=createTypedArray("float32",this.pv.length):d=0;for(var E;uu){var A=l,M=m.c&&l===d-1?0:l+1,w=(u-E)/c[l].addedLength;S=bez.getPointInSegment(m.v[A],m.v[M],m.o[A],m.i[M],w,c[l]);break}else E+=c[l].addedLength;l+=1}return S||(S=m.c?[m.v[0][0],m.v[0][1]]:[m.v[m._length-1][0],m.v[m._length-1][1]]),S},vectorOnPath:function(P,g,m){P==1?P=this.v.c:P==0&&(P=.999);var C=this.pointOnPath(P,g),c=this.pointOnPath(P+.001,g),u=c[0]-C[0],l=c[1]-C[1],d=Math.sqrt(Math.pow(u,2)+Math.pow(l,2));if(d===0)return[0,0];var E=m==="tangent"?[u/d,l/d]:[-l/d,u/d];return E},tangentOnPath:function(P,g){return this.vectorOnPath(P,g,"tangent")},normalOnPath:function(P,g){return this.vectorOnPath(P,g,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([v],o),extendPrototype([v],f),f.prototype.getValueAtTime=h,f.prototype.initiateExpression=ExpressionManager.initiateExpression;var b=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(p,P,g,m,C){var c=b(p,P,g,m,C);return c.propertyIndex=P.ix,c.lock=!1,g===3?expressionHelpers.searchExpressions(p,P.pt,c):g===4&&expressionHelpers.searchExpressions(p,P.ks,c),c.k&&p.addDynamicProperty(c),c}}function initialize$1(){addPropertyDecorator()}function addDecorator(){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(e,r){var i=this.calculateExpression(r);if(e.t!==i){var s={};return this.copyData(s,e),s.t=i.toString(),s.__complete=!1,s}return e},TextProperty.prototype.searchProperty=function(){var e=this.searchKeyframes(),r=this.searchExpressions();return this.kf=e||r,this.kf},TextProperty.prototype.searchExpressions=t}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function t(e,r){var i=createNS("feMerge");i.setAttribute("result",e);var s,a;for(a=0;a=f?b=g<0?i:s:b=i+P*Math.pow((h-t)/g,1/r),v[p]=b,p+=1,a+=256/(n-1);return v.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,r=this.filterManager.effectElements;this.feFuncRComposed&&(t||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(e=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(e=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(e=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(e=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(e=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",e))}};function SVGDropShadowEffect(t,e,r,i,s){var a=e.container.globalData.renderConfig.filterSize,n=e.data.fs||a;t.setAttribute("x",n.x||a.x),t.setAttribute("y",n.y||a.y),t.setAttribute("width",n.width||a.width),t.setAttribute("height",n.height||a.height),this.filterManager=e;var h=createNS("feGaussianBlur");h.setAttribute("in","SourceAlpha"),h.setAttribute("result",i+"_drop_shadow_1"),h.setAttribute("stdDeviation","0"),this.feGaussianBlur=h,t.appendChild(h);var o=createNS("feOffset");o.setAttribute("dx","25"),o.setAttribute("dy","0"),o.setAttribute("in",i+"_drop_shadow_1"),o.setAttribute("result",i+"_drop_shadow_2"),this.feOffset=o,t.appendChild(o);var f=createNS("feFlood");f.setAttribute("flood-color","#00ff00"),f.setAttribute("flood-opacity","1"),f.setAttribute("result",i+"_drop_shadow_3"),this.feFlood=f,t.appendChild(f);var v=createNS("feComposite");v.setAttribute("in",i+"_drop_shadow_3"),v.setAttribute("in2",i+"_drop_shadow_2"),v.setAttribute("operator","in"),v.setAttribute("result",i+"_drop_shadow_4"),t.appendChild(v);var b=this.createMergeNode(i,[i+"_drop_shadow_4",s]);t.appendChild(b)}extendPrototype([SVGComposableEffect],SVGDropShadowEffect),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(e[0]*255),Math.round(e[1]*255),Math.round(e[2]*255)))}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 r=this.filterManager.effectElements[3].p.v,i=(this.filterManager.effectElements[2].p.v-90)*degToRads,s=r*Math.cos(i),a=r*Math.sin(i);this.feOffset.setAttribute("dx",s),this.feOffset.setAttribute("dy",a)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,r){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,r=_svgMatteSymbols.length;ee in t?__defProp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,__spreadValues=(t,e)=>{for(var r in e||(e={}))__hasOwnProp.call(e,r)&&__defNormalProp(t,r,e[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(e))__propIsEnum.call(e,r)&&__defNormalProp(t,r,e[r]);return t},__spreadProps=(t,e)=>__defProps(t,__getOwnPropDescs(e)),es6=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var i,s,a;if(Array.isArray(e)){if(i=e.length,i!=r.length)return!1;for(s=i;s--!==0;)if(!t(e[s],r[s]))return!1;return!0}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(s of e.entries())if(!r.has(s[0]))return!1;for(s of e.entries())if(!t(s[1],r.get(s[0])))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(s of e.entries())if(!r.has(s[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if(i=e.length,i!=r.length)return!1;for(s=i;s--!==0;)if(e[s]!==r[s])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(a=Object.keys(e),i=a.length,i!==Object.keys(r).length)return!1;for(s=i;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[s]))return!1;for(s=i;s--!==0;){var n=a[s];if(!t(e[n],r[n]))return!1}return!0}return e!==e&&r!==r};function klona(t){var e,r,i;if(Array.isArray(t)){for(r=Array(e=t.length);e--;)r[e]=(i=t[e])&&typeof i=="object"?klona(i):i;return r}if(Object.prototype.toString.call(t)==="[object Object]"){r={};for(e in t)e==="__proto__"?Object.defineProperty(r,e,{value:klona(t[e]),configurable:!0,enumerable:!0,writable:!0}):r[e]=(i=t[e])&&typeof i=="object"?klona(i):i;return r}return t}var _export_sfc=(t,e)=>{const r=t.__vccOpts||t;for(const[i,s]of e)r[i]=s;return r};const _sfc_main$1=defineComponent({props:{animationData:{type:Object,default:()=>({})},animationLink:{type:String,default:""},loop:{type:[Boolean,Number],default:!0},autoPlay:{type:Boolean,default:!0},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},speed:{type:Number,default:1},delay:{type:Number,default:0},direction:{type:String,default:"forward"},pauseOnHover:{type:Boolean,default:!1},playOnHover:{type:Boolean,default:!1},backgroundColor:{type:String,default:"transparent"},pauseAnimation:{type:Boolean,default:!1},noMargin:{type:Boolean,default:!1},scale:{type:Number,default:1},renderer:{type:String,default:"svg"},rendererSettings:{type:Object,default:()=>({})},assetsPath:{type:String,default:""}},emits:{onComplete:null,onLoopComplete:null,onEnterFrame:null,onSegmentStart:null,onAnimationLoaded:null},setup(t,{emit:e}){const r=ref();let i,s=null,a=1;watchEffect(async()=>{if(r.value){if(t.animationLink!="")try{i=await(await fetch(t.animationLink)).json()}catch(S){console.error(S);return}else if(es6(t.animationData,{})===!1)i=klona(t.animationData);else throw new Error("You must provide either animationLink or animationData");n()}});const n=()=>{if(!r.value||!i)return;s==null||s.destroy(),s=null;let S=t.autoPlay,A=t.loop;t.playOnHover&&(S=!1),typeof A=="number"&&A>0&&(A=A-1),t.delay>0&&(S=!1);const M={container:r.value,renderer:t.renderer,loop:A,autoplay:S,animationData:i,assetsPath:t.assetsPath};es6(t.rendererSettings,{})===!1&&(M.rendererSettings=t.rendererSettings),t.scale!==1&&(M.rendererSettings=__spreadProps(__spreadValues({},M.rendererSettings),{viewBoxOnly:!0})),s=Lottie.loadAnimation(M),setTimeout(()=>{S=t.autoPlay,t.playOnHover?s==null||s.pause():S?s==null||s.play():s==null||s.pause(),e("onAnimationLoaded")},t.delay),s.setSpeed(t.speed),t.direction==="reverse"&&s.setDirection(-1),t.direction==="normal"&&s.setDirection(1),(t.pauseAnimation||t.playOnHover)&&s.pause(),s.addEventListener("loopComplete",()=>{t.direction==="alternate"&&(s==null||s.stop(),a=a===-1?1:-1,s==null||s.setDirection(a),s==null||s.play()),e("onLoopComplete")}),s.addEventListener("complete",()=>{e("onComplete")}),s.addEventListener("enterFrame",()=>{e("onEnterFrame")}),s.addEventListener("segmentStart",()=>{e("onSegmentStart")})},h=computed(()=>{let S=t.width,A=t.height;return typeof t.width=="number"&&(S=`${t.width}px`),typeof t.height=="number"&&(A=`${t.height}px`),{"--lottie-animation-container-width":S,"--lottie-animation-container-height":A,"--lottie-animation-container-background-color":t.backgroundColor,"--lottie-animation-margin":t.noMargin?"0":"0 auto","--lottie-animation-scale":t.scale!=1?t.scale:""}}),o=()=>{s&&t.pauseOnHover&&s.pause(),s&&t.playOnHover&&s.play()},f=()=>{s&&t.pauseOnHover&&s.play(),s&&t.playOnHover&&s.pause()};return watch(()=>t.pauseAnimation,()=>{if((t.pauseOnHover||t.playOnHover)&&t.pauseAnimation){console.error("If you are using pauseAnimation prop for Vue3-Lottie, please remove the props pauseOnHover and playOnHover");return}s&&(t.pauseAnimation?s.pause():s.play())}),{lottieAnimationContainer:r,hoverEnded:f,hoverStarted:o,getCurrentStyle:h,play:()=>{s&&s.play()},pause:()=>{s&&s.pause()},stop:()=>{s&&s.stop()},destroy:()=>{s&&s.destroy()},setSpeed:(S=1)=>{if(S<=0)throw new Error("Speed must be greater than 0");s&&s.setSpeed(S)},setDirection:S=>{s&&(S==="forward"?s.setDirection(1):S==="reverse"&&s.setDirection(-1))},goToAndStop:(S,A=!0)=>{s&&s.goToAndStop(S,A)},goToAndPlay:(S,A=!0)=>{s&&s.goToAndPlay(S,A)},playSegments:(S,A=!1)=>{s&&s.playSegments(S,A)},setSubFrame:(S=!0)=>{s&&s.setSubframe(S)},getDuration:(S=!0)=>{if(s)return s.getDuration(S)},updateDocumentData:(S,A=0)=>{s&&s.renderer.elements[A].updateDocumentData(S)}}}});function _sfc_render(t,e,r,i,s,a){return openBlock(),createElementBlock("div",{ref:"lottieAnimationContainer",class:"lottie-animation-container",style:normalizeStyle(t.getCurrentStyle),onMouseenter:e[0]||(e[0]=(...n)=>t.hoverStarted&&t.hoverStarted(...n)),onMouseleave:e[1]||(e[1]=(...n)=>t.hoverEnded&&t.hoverEnded(...n))},null,36)}var Vue3Lottie=_export_sfc(_sfc_main$1,[["render",_sfc_render]]);const _sfc_main=defineComponent({__name:"AtomLottie",props:{name:{},loop:{type:Boolean},autoplay:{type:Boolean}},setup(t,{emit:e}){const r=t,i=e,s=ref(null),a=ref();return onMounted(async()=>{const n=Object.assign({"/assets/animations/animation-chain-1.json":()=>__vitePreload(()=>import("./nol5tiFp.js"),[],import.meta.url),"/assets/animations/animation-chain-2.json":()=>__vitePreload(()=>import("./gmsHvXJH.js"),[],import.meta.url),"/assets/animations/animation-chain-3.json":()=>__vitePreload(()=>import("./BrJmlQXl.js"),[],import.meta.url),"/assets/animations/animation-christmas-background.json":()=>__vitePreload(()=>import("./DTncpopP.js"),[],import.meta.url),"/assets/animations/animation-courier-cry.json":()=>__vitePreload(()=>import("./D75JANTj.js"),[],import.meta.url),"/assets/animations/animation-courier-laugh.json":()=>__vitePreload(()=>import("./CRtx2L8J.js"),[],import.meta.url),"/assets/animations/animation-courier-sad.json":()=>__vitePreload(()=>import("./B9HxGxdd.js"),[],import.meta.url),"/assets/animations/animation-courier-search.json":()=>__vitePreload(()=>import("./3D-0f_EC.js"),[],import.meta.url),"/assets/animations/animation-courier-smile.json":()=>__vitePreload(()=>import("./CXPcxkGl.js"),[],import.meta.url),"/assets/animations/animation-email-sent.json":()=>__vitePreload(()=>import("./DK6ltvEe.js"),[],import.meta.url),"/assets/animations/animation-fisherman.json":()=>__vitePreload(()=>import("./r8tYgX8Q.js"),[],import.meta.url),"/assets/animations/animation-hourglass.json":()=>__vitePreload(()=>import("./yjzOUKun.js"),[],import.meta.url),"/assets/animations/animation-logo-easter-packeta.json":()=>__vitePreload(()=>import("./Be3Lt6mz.js"),[],import.meta.url),"/assets/animations/animation-logo-easter-zasilkovna.json":()=>__vitePreload(()=>import("./DOGycng0.js"),[],import.meta.url),"/assets/animations/animation-logo-packeta-christmas.json":()=>__vitePreload(()=>import("./Dopl-eQW.js"),[],import.meta.url),"/assets/animations/animation-logo-packeta-moje-srdcovka.json":()=>__vitePreload(()=>import("./B24NDVgT.js"),[],import.meta.url),"/assets/animations/animation-logo-zasilkovna-christmas.json":()=>__vitePreload(()=>import("./EvPIKaj4.js"),[],import.meta.url),"/assets/animations/animation-logo-zasilkovna-moje-srdcovka.json":()=>__vitePreload(()=>import("./DbE0BNFQ.js"),[],import.meta.url),"/assets/animations/animation-package-delivered.json":()=>__vitePreload(()=>import("./MAW_mEzh.js"),[],import.meta.url),"/assets/animations/animation-package-onroad.json":()=>__vitePreload(()=>import("./BzMRy0yy.js"),[],import.meta.url),"/assets/animations/animation-package-part-back.json":()=>__vitePreload(()=>import("./C8VPcuhP.js"),[],import.meta.url),"/assets/animations/animation-package-part-front.json":()=>__vitePreload(()=>import("./Cl7nYM6w.js"),[],import.meta.url),"/assets/animations/animation-package-star.json":()=>__vitePreload(()=>import("./DnkzFOT9.js"),[],import.meta.url),"/assets/animations/animation-package-undelivered.json":()=>__vitePreload(()=>import("./gZXBf_3f.js"),[],import.meta.url),"/assets/animations/animation-package-unpack.json":()=>__vitePreload(()=>import("./B4ULL6wx.js"),[],import.meta.url),"/assets/animations/animation-package-waiting.json":()=>__vitePreload(()=>import("./B0kj9j7u.js"),[],import.meta.url),"/assets/animations/animation-package-warning.json":()=>__vitePreload(()=>import("./DG_KPHJi.js"),[],import.meta.url),"/assets/animations/animation-packages-global.json":()=>__vitePreload(()=>import("./BVzD1ve6.js"),[],import.meta.url),"/assets/animations/animation-packman.json":()=>__vitePreload(()=>import("./z7W2atU0.js"),[],import.meta.url),"/assets/animations/animation-rocket-packeta.json":()=>__vitePreload(()=>import("./BNi5jODj.js"),[],import.meta.url),"/assets/animations/animation-rocket-zasilkovna.json":()=>__vitePreload(()=>import("./C6-Nsd4J.js"),[],import.meta.url),"/assets/animations/animation-social-connection.json":()=>__vitePreload(()=>import("./6x4fSGK_.js"),[],import.meta.url),"/assets/animations/animation-truck-packeta.json":()=>__vitePreload(()=>import("./C7oPMXS6.js"),[],import.meta.url),"/assets/animations/animation-truck-zasilkovna.json":()=>__vitePreload(()=>import("./CUIW40ke.js"),[],import.meta.url)}),h=`/assets/animations/${r.name}`;if(h in n){const o=await n[h]();a.value=o.default,await nextTick(()=>{s.value&&s.value.goToAndPlay(150,!0),i(Emits.COMPLETE,s.value)})}else console.error(`Animation file ${h} not found`)}),(n,h)=>{const o=__nuxt_component_0;return openBlock(),createElementBlock("div",null,[a.value?(openBlock(),createBlock(o,{key:0},{default:withCtx(()=>[createVNode(unref(Vue3Lottie),{ref_key:"anim",ref:s,"animation-data":a.value,"auto-play":n.autoplay,loop:n.loop,speed:1,height:"100%",width:"100%"},null,8,["animation-data","auto-play","loop"])]),_:1})):createCommentVNode("",!0)])}}});export{_sfc_main as _}; //# sourceMappingURL=DSL6gSzo.js.map