import{c as commonjsGlobal,d as defineComponent,v as ref,y as computed,K as watch,o as onMounted,a1 as openBlock,a2 as createElementBlock,a3 as normalizeStyle,n as nextTick,a4 as headTopData,a5 as evaluatingData,q as browser,b as createVNode,a6 as backImg,a7 as styles,s as state,a8 as smoothAnimationState,a9 as lxMode,aa as glMode,ab as pcMode}from"./instrument-78478f22.js";var lottieExports={},lottie={get exports(){return lottieExports},set exports(t){lottieExports=t}};(function(module,exports){typeof navigator<"u"&&function(t,e){module.exports=e()}(commonjsGlobal,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){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(b){r({data:b})}},a={postMessage:function(b){s.onmessage({data:b})}};function n(f){if(window.Worker&&window.Blob&&getWebWorker()){var b=new Blob(["var _workerSelf = self; self.onmessage = ",f.toString()],{type:"text/javascript"}),y=URL.createObjectURL(b);return new Worker(y)}return r=f,s}function l(){i||(i=n(function(b){function y(){function T(L,C){var M,g,S=L.length,F,w,B,G;for(g=0;g=0;C-=1)if(L[C].ty==="sh")if(L[C].ks.k.i)E(L[C].ks.k);else for(S=L[C].ks.k.length,g=0;gM[0]?!0:M[0]>L[0]?!1:L[1]>M[1]?!0:M[1]>L[1]?!1:L[2]>M[2]?!0:M[2]>L[2]?!1:null}var A=function(){var L=[4,4,14];function C(g){var S=g.t.d;g.t.d={k:[{s:S,t:0}]}}function M(g){var S,F=g.length;for(S=0;S=0;S-=1)if(g[S].ty==="sh")if(g[S].ks.k.i)g[S].ks.k.c=g[S].closed;else for(B=g[S].ks.k.length,w=0;w500)&&(this._imageLoaded(),clearInterval(p)),u+=1}.bind(this),50)}function a(c){var u=i(c,this.assetsPath,this.path),p=createNS("image");isSafari?this.testImageLoaded(p):p.addEventListener("load",this._imageLoaded,!1),p.addEventListener("error",function(){v.img=t,this._imageLoaded()}.bind(this),!1),p.setAttributeNS("http://www.w3.org/1999/xlink","href",u),this._elementHelper.append?this._elementHelper.append(p):this._elementHelper.appendChild(p);var v={img:p,assetData:c};return v}function n(c){var u=i(c,this.assetsPath,this.path),p=createTag("img");p.crossOrigin="anonymous",p.addEventListener("load",this._imageLoaded,!1),p.addEventListener("error",function(){v.img=t,this._imageLoaded()}.bind(this),!1),p.src=u;var v={img:p,assetData:c};return v}function l(c){var u={assetData:c},p=i(c,this.assetsPath,this.path);return dataManager.loadData(p,function(v){u.img=v,this._footageLoaded()}.bind(this),function(){u.img={},this._footageLoaded()}.bind(this)),u}function o(c,u){this.imagesLoadedCb=u;var p,v=c.length;for(p=0;pthis.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;M-=1)e[M].animation.destroy(C)}function x(C,M,g){var S=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),F,w=S.length;for(F=0;F0?v=x:p=x;while(Math.abs(A)>a&&++I=s?T(p,V,v,E):k===0?V:d(p,A,A+o,v,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:l,release:o};function l(){var h;return i?(i-=1,h=a[i]):h=e(),h}function o(h){i===s&&(a=pooling.double(a),s*=2),r&&r(h),a[i]=h,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(f,b,y,d,T,c,u,p,v){if(y===0&&c===0&&v===0)return e(f,b,d,T,u,p);var E=t.sqrt(t.pow(d-f,2)+t.pow(T-b,2)+t.pow(c-y,2)),_=t.sqrt(t.pow(u-f,2)+t.pow(p-b,2)+t.pow(v-y,2)),A=t.sqrt(t.pow(u-d,2)+t.pow(p-T,2)+t.pow(v-c,2)),x;return E>_?E>A?x=E-_-A:x=A-_-E:A>_?x=A-_-E:x=_-E-A,x>-1e-4&&x<1e-4}var i=function(){return function(f,b,y,d){var T=getDefaultCurveSegments(),c,u,p,v,E,_=0,A,x=[],I=[],D=bezierLengthPool.newElement();for(p=y.length,c=0;cu?-1:1,E=!0;E;)if(d[c]<=u&&d[c+1]>u?(p=(u-d[c])/(d[c+1]-d[c]),E=!1):c+=v,c<0||c>=T-1){if(c===T-1)return y[c];E=!1}return y[c]+(y[c+1]-y[c])*p}function h(f,b,y,d,T,c){var u=o(T,c),p=1-u,v=t.round((p*p*p*f[0]+(u*p*p+p*u*p+p*p*u)*y[0]+(u*u*p+p*u*u+u*p*u)*d[0]+u*u*u*b[0])*1e3)/1e3,E=t.round((p*p*p*f[1]+(u*p*p+p*u*p+p*p*u)*y[1]+(u*u*p+p*u*u+u*p*u)*d[1]+u*u*u*b[1])*1e3)/1e3;return[v,E]}var m=createTypedArray("float32",8);function P(f,b,y,d,T,c,u){T<0?T=0:T>1&&(T=1);var p=o(T,u);c=c>1?1:c;var v=o(c,u),E,_=f.length,A=1-p,x=1-v,I=A*A*A,D=p*A*A*3,V=p*p*A*3,k=p*p*p,R=A*A*x,O=p*A*x+A*p*x+A*A*v,L=p*p*x+A*p*v+p*A*v,C=p*p*v,M=A*x*x,g=p*x*x+A*v*x+A*x*v,S=p*v*x+A*v*v+p*x*v,F=p*v*v,w=x*x*x,B=v*x*x+x*v*x+x*x*v,G=v*v*x+x*v*v+v*x*v,z=v*v*v;for(E=0;E<_;E+=1)m[E*4]=t.round((I*f[E]+D*y[E]+V*d[E]+k*b[E])*1e3)/1e3,m[E*4+1]=t.round((R*f[E]+O*y[E]+L*d[E]+C*b[E])*1e3)/1e3,m[E*4+2]=t.round((M*f[E]+g*y[E]+S*d[E]+F*b[E])*1e3)/1e3,m[E*4+3]=t.round((w*f[E]+B*y[E]+G*d[E]+z*b[E])*1e3)/1e3;return m}return{getSegmentsLength:s,getNewSegment:P,getPointInSegment:h,buildBezierData:l,pointOnLine2D:e,pointOnLine3D:r}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(t,e){var r=this.offsetTime,i;this.propType==="multidimensional"&&(i=createTypedArray("float32",this.pv.length));for(var s=e.lastIndex,a=s,n=this.keyframes.length-1,l=!0,o,h,m;l;){if(o=this.keyframes[a],h=this.keyframes[a+1],a===n-1&&t>=h.t-r){o.h&&(o=h),s=0;break}if(h.t-r>t){s=a;break}a=c||t=c?v.points.length-1:0;for(f=v.points[E].point.length,P=0;P=x&&_=c)i[0]=p[0],i[1]=p[1],i[2]=p[2];else if(t<=u)i[0]=o.s[0],i[1]=o.s[1],i[2]=o.s[2];else{var O=createQuaternion(o.s),L=createQuaternion(p),C=(t-u)/(c-u);quaternionToEuler(i,slerp(O,L,C))}else for(a=0;a=c?b=1:t1e-6?(f=Math.acos(b),y=Math.sin(f),d=Math.sin((1-r)*f)/y,T=Math.sin(r*f)/y):(d=1-r,T=r),i[0]=d*s+T*o,i[1]=d*a+T*h,i[2]=d*n+T*m,i[3]=d*l+T*P,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),l=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]=l/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),l=Math.sin(e/2),o=Math.sin(r/2),h=Math.sin(i/2),m=s*a*n-l*o*h,P=l*o*n+s*a*h,f=l*a*n+s*o*h,b=s*o*n-l*a*h;return[P,f,b,m]}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,l){this.setXYAt(t,e,"v",n,l),this.setXYAt(r,i,"o",n,l),this.setXYAt(s,a,"i",n,l)},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,l;for(l=s;l=O[O.length-1].t-this.offsetTime)E=O[O.length-1].s?O[O.length-1].s[0]:O[O.length-2].e[0],A=!0;else{for(var L=v,C=O.length-1,M=!0,g,S,F;M&&(g=O[L],S=O[L+1],!(S.t-this.offsetTime>c));)L=S.t-this.offsetTime)k=1;else if(cp&&c>p)||(this._caching.lastIndex=v0||g>-1e-6&&g<0?i(g*S)/S:g}function M(){var g=this.props,S=C(g[0]),F=C(g[1]),w=C(g[4]),B=C(g[5]),G=C(g[12]),z=C(g[13]);return"matrix("+S+","+F+","+w+","+B+","+G+","+z+")"}return function(){this.reset=s,this.rotate=a,this.rotateX=n,this.rotateY=l,this.rotateZ=o,this.skew=m,this.skewFromAxis=P,this.shear=h,this.scale=f,this.setTransform=b,this.translate=y,this.transform=d,this.multiply=T,this.applyToPoint=E,this.applyToX=_,this.applyToY=A,this.applyToZ=x,this.applyToPointArray=R,this.applyToTriplePoints=k,this.applyToPointStringified=O,this.toCSS=L,this.to2dCSS=M,this.clone=p,this.cloneFromProps=v,this.equals=u,this.inversePoints=V,this.inversePoint=D,this.getInverseMatrix=I,this._t=this.transform,this.isIdentity=c,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){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=[],l,o=a.length,h;for(l=0;li+r)){var m,P;h.s*s<=i?m=0:m=(h.s*s-i)/r,h.e*s>=i+r?P=1:P=(h.e*s-i)/r,n.push([m,P])}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,l=this.shapes.length,o,h,m,P,f,b=0;if(r===e)for(n=0;n=0;n-=1)if(d=this.shapes[n],d.shape._mdf){for(T=d.localShapeCollection,T.releaseShapes(),this.m===2&&l>1?(v=this.calculateShapeEdges(e,r,d.totalShapeLength,p,b),p+=d.totalShapeLength):v=[[c,u]],h=v.length,o=0;o=1?y.push({s:d.totalShapeLength*(c-1),e:d.totalShapeLength*(u-1)}):(y.push({s:d.totalShapeLength*c,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(u-1)}));var E=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(y.length>1){var _=d.shape.paths.shapes[d.shape.paths._length-1];if(_.c){var A=E.pop();this.addPaths(E,T),E=this.addShapes(d,y[1],A)}else this.addPaths(E,T),E=this.addShapes(d,y[1])}this.addPaths(E,T)}}d.shape.paths=T}}},TrimModifier.prototype.addPaths=function(t,e){var r,i=t.length;for(r=0;re.e){r.c=!1;break}else e.s<=h&&e.e>=h+m.addedLength?(this.addSegment(s[a].v[l-1],s[a].o[l-1],s[a].i[l],s[a].v[l],r,P,T),T=!1):(b=bez.getNewSegment(s[a].v[l-1],s[a].v[l],s[a].o[l-1],s[a].i[l],(e.s-h)/m.addedLength,(e.e-h)/m.addedLength,f[l-1]),this.addSegmentFromArray(b,r,P,T),T=!1,r.c=!1),h+=m.addedLength,P+=1;if(s[a].c&&f.length){if(m=f[l-1],h<=e.e){var c=f[l-1].addedLength;e.s<=h&&e.e>=h+c?(this.addSegment(s[a].v[l-1],s[a].o[l-1],s[a].i[0],s[a].v[0],r,P,T),T=!1):(b=bez.getNewSegment(s[a].v[l-1],s[a].v[0],s[a].o[l-1],s[a].i[0],(e.s-h)/c,(e.e-h)/c,f[l-1]),this.addSegmentFromArray(b,r,P,T),T=!1,r.c=!1)}else r.c=!1;h+=m.addedLength,P+=1}if(r._length&&(r.setXYAt(r.v[d][0],r.v[d][1],"i",d),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),h>e.e)break;a=this.p.keyframes[this.p.keyframes.length-1].t?(m=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/h,0),P=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/h,0)):(m=this.p.pv,P=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/h,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){m=[],P=[];var f=this.px,b=this.py;f._caching.lastFrame+f.offsetTime<=f.keyframes[0].t?(m[0]=f.getValueAtTime((f.keyframes[0].t+.01)/h,0),m[1]=b.getValueAtTime((b.keyframes[0].t+.01)/h,0),P[0]=f.getValueAtTime(f.keyframes[0].t/h,0),P[1]=b.getValueAtTime(b.keyframes[0].t/h,0)):f._caching.lastFrame+f.offsetTime>=f.keyframes[f.keyframes.length-1].t?(m[0]=f.getValueAtTime(f.keyframes[f.keyframes.length-1].t/h,0),m[1]=b.getValueAtTime(b.keyframes[b.keyframes.length-1].t/h,0),P[0]=f.getValueAtTime((f.keyframes[f.keyframes.length-1].t-.01)/h,0),P[1]=b.getValueAtTime((b.keyframes[b.keyframes.length-1].t-.01)/h,0)):(m=[f.pv,b.pv],P[0]=f.getValueAtTime((f._caching.lastFrame+f.offsetTime-.01)/h,f.offsetTime),P[1]=b.getValueAtTime((b._caching.lastFrame+b.offsetTime-.01)/h,b.offsetTime))}else P=t,m=P;this.v.rotate(-Math.atan2(m[1]-P[1],m[0]-P[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,h,m){if(this.elem=o,this.frameId=-1,this.propType="transform",this.data=h,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(m||o),h.p&&h.p.s?(this.px=PropertyFactory.getProp(o,h.p.x,0,0,this),this.py=PropertyFactory.getProp(o,h.p.y,0,0,this),h.p.z&&(this.pz=PropertyFactory.getProp(o,h.p.z,0,0,this))):this.p=PropertyFactory.getProp(o,h.p||{k:[0,0,0]},1,0,this),h.rx){if(this.rx=PropertyFactory.getProp(o,h.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(o,h.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(o,h.rz,0,degToRads,this),h.or.k[0].ti){var P,f=h.or.k.length;for(P=0;P0;)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(f):Math.ceil(f),d=this.pMatrix.props,T=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(f>0){for(;uy;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),u-=1;b&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-b,!0),u-=b)}i=this.data.m===1?0:this._currentCopies-1,s=this.data.m===1?1:-1,a=this._currentCopies;for(var p,v;a;){if(e=this.elemsData[i].it,r=e[e.length-1].transform.mProps.v.props,v=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(T[0],T[1],T[2],T[3],T[4],T[5],T[6],T[7],T[8],T[9],T[10],T[11],T[12],T[13],T[14],T[15]),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(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],d[9],d[10],d[11],d[12],d[13],d[14],d[15]),p=0;p0&&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 l=t.point(a[n])[e];li&&(i=l)}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),l=splitData(e);intersectsImpl(n[0],l[0],r+1,i,s,a),intersectsImpl(n[0],l[1],r+1,i,s,a),intersectsImpl(n[1],l[0],r+1,i,s,a),intersectsImpl(n[1],l[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],l=[i[0],i[1],1],o=crossProduct(crossProduct(s,a),crossProduct(n,l));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 l=r-Math.PI/2,o=r+Math.PI/2,h=e[0]+Math.cos(r)*i*s,m=e[1]-Math.sin(r)*i*s;t.setTripleAt(h,m,h+Math.cos(l)*a,m-Math.sin(l)*a,h+Math.cos(o)*n,m-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 l=getProjectingAngle(e,r),o=e.v[r%e._length],h=e.v[r===0?e._length-1:r-1],m=e.v[(r+1)%e._length],P=a===2?Math.sqrt(Math.pow(o[0]-h[0],2)+Math.pow(o[1]-h[1],2)):0,f=a===2?Math.sqrt(Math.pow(o[0]-m[0],2)+Math.pow(o[1]-m[1],2)):0;setPoint(t,e.v[r%e._length],l,n,i,f/((s+1)*2),P/((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 l=(r[1]-r[0])/(1-r[0]);return a=a[1].split(l),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,l,o,h=[];for(n=0;n=0;n-=1)o=PolynomialBezier.shapeSegmentInverted(t,n),h.push(offsetSegmentSplit(o,e));h=pruneIntersections(h);var m=null,P=null;for(n=0;n0&&(B=!1),B){var N=createTag("style");N.setAttribute("f-forigin",g[S].fOrigin),N.setAttribute("f-origin",g[S].origin),N.setAttribute("f-family",g[S].fFamily),N.type="text/css",N.innerText="@font-face {font-family: "+g[S].fFamily+"; font-style: normal; src: url('"+g[S].fPath+"');}",M.appendChild(N)}}else if(g[S].fOrigin==="g"||g[S].origin===1){for(G=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),z=0;z=55296&&g<=56319){var S=C.charCodeAt(1);S>=56320&&S<=57343&&(M=(g-55296)*1024+S-56320+65536)}return M}function _(C,M){var g=C.toString(16)+M.toString(16);return P.indexOf(g)!==-1}function A(C){return C===o}function x(C){return C===l}function I(C){var M=E(C);return M>=h&&M<=m}function D(C){return I(C.substr(0,2))&&I(C.substr(2,2))}function V(C){return r.indexOf(C)!==-1}function k(C,M){var g=E(C.substr(M,2));if(g!==i)return!1;var S=0;for(M+=2;S<5;){if(g=E(C.substr(M,2)),gn)return!1;S+=1,M+=2}return E(C.substr(M,2))===s}function R(){this.isLoaded=!0}var O=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)};O.isModifier=_,O.isZeroWidthJoiner=A,O.isFlagEmoji=D,O.isRegionalCode=I,O.isCombinedCharacter=V,O.isRegionalFlag=k,O.isVariationSelector=x,O.BLACK_FLAG_CODE_POINT=i;var L={addChars:c,addFonts:T,getCharData:u,getFontByName:v,measureText:p,checkLoadedFonts:y,setIsLoaded:R};return O.prototype=L,O}();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",f),this.element.maskedElement.setAttribute(u,"url("+getLocationHref()+"#"+f+")"),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 l;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=f.transformers[I].mProps._mdf||c,x-=1,I-=1;if(c)for(x=E-f.styles[p].lvl,I=f.transformers.length-1;x>0;)A.multiply(f.transformers[I].mProps.v),x-=1,I-=1}else A=t;if(_=f.sh.paths,d=_._length,c){for(T="",y=0;y=1?R=.99:R<=-1&&(R=-.99);var O=V*R,L=Math.cos(k+f.a.v)*O+T[0],C=Math.sin(k+f.a.v)*O+T[1];y.setAttribute("fx",L),y.setAttribute("fy",C),d&&!f.g._collapsable&&(f.of.setAttribute("fx",L),f.of.setAttribute("fy",C))}}}function m(P,f,b){var y=f.style,d=f.d;d&&(d._mdf||b)&&d.dashStr&&(y.pElem.setAttribute("stroke-dasharray",d.dashStr),y.pElem.setAttribute("stroke-dashoffset",d.dashoffset[0])),f.c&&(f.c._mdf||b)&&y.pElem.setAttribute("stroke","rgb("+bmFloor(f.c.v[0])+","+bmFloor(f.c.v[1])+","+bmFloor(f.c.v[2])+")"),(f.o._mdf||b)&&y.pElem.setAttribute("stroke-opacity",f.o.v),(f.w._mdf||b)&&(y.pElem.setAttribute("stroke-width",f.w.v),y.msElem&&y.msElem.setAttribute("stroke-width",f.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=[],l=!1;for(i=0;i1&&l&&this.setShapesAsAnimated(n)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,r=t.length;for(e=0;e=0;o-=1){if(T=this.searchProcessedElement(t[o]),T?e[o]=r[T-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")T?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),f.push(e[o].style);else if(t[o].ty==="gr"){if(!T)e[o]=this.createGroupElement(t[o]);else for(P=e[o].it.length,m=0;m1,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,l=!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,l=!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,l=0,o,h=r.m.g,m=0,P=0,f=0,b=[],y=0,d=0,T,c,u=e.getFontByName(t.f),p,v=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 _=t.tr/1e3*t.finalSize,A;if(t.sz)for(var x=!0,I=t.sz[0],D=t.sz[1],V,k;x;){k=this.buildFinalText(t.t),V=0,y=0,a=k.length,_=t.tr/1e3*t.finalSize;var R=-1;for(s=0;sI&&k[s]!==" "?(R===-1?a+=1:s=R,V+=t.finalLineHeight||t.finalSize*1.2,k.splice(s,R===s?1:0,"\r"),R=-1,y=0):(y+=v,y+=_);V+=u.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&Dd?y:d,y=-2*_,o="",n=!0,f+=1):o=L,e.chars?(p=e.getCharData(L,u.fStyle,e.getFontByName(t.f).fFamily),v=n?0:p.w*t.finalSize/100):v=e.measureText(o,t.f,t.finalSize),L===" "?O+=v+_:(y+=v+_+O,O=0),i.push({l:v,an:v,add:m,n,anIndexes:[],val:o,line:f,animatorJustifyOffset:0}),h==2){if(m+=v,o===""||o===" "||s===a-1){for((o===""||o===" ")&&(m-=v);P<=s;)i[P].an=m,i[P].ind=l,i[P].extra=v,P+=1;l+=1,m=0}}else if(h==3){if(m+=v,o===""||s===a-1){for(o===""&&(m-=v);P<=s;)i[P].an=m,i[P].ind=l,i[P].extra=v,P+=1;m=0,l+=1}}else i[l].ind=l,i[l].extra=0,l+=1;if(t.l=i,d=y>d?y:d,b.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=d,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=b;var C=r.a,M,g;c=C.length;var S,F,w=[];for(T=0;T0?l=this.ne.v/100:o=-this.ne.v/100,this.xe.v>0?h=1-this.xe.v/100:m=1+this.xe.v/100;var P=BezierFactory.getBezierEasing(l,o,h,m).get,f=0,b=this.finalS,y=this.finalE,d=this.data.sh;if(d===2)y===b?f=n>=y?1:0:f=t(0,e(.5/(y-b)+(n-b)/(y-b),1)),f=P(f);else if(d===3)y===b?f=n>=y?0:1:f=1-t(0,e(.5/(y-b)+(n-b)/(y-b),1)),f=P(f);else if(d===4)y===b?f=0:(f=t(0,e(.5/(y-b)+(n-b)/(y-b),1)),f<.5?f*=2:f=1-2*(f-.5)),f=P(f);else if(d===5){if(y===b)f=0;else{var T=y-b;n=e(t(0,n+.5-b),y-b);var c=-T/2+n,u=T/2;f=Math.sqrt(1-c*c/(u*u))}f=P(f)}else d===6?(y===b?f=0:(n=e(t(0,n+.5-b),y-b),f=(1+Math.cos(Math.PI+Math.PI*2*n/(y-b)))/2),f=P(f)):(n>=r(b)&&(n-b<0?f=t(0,e(e(y,1)-(b-n),1)):f=t(0,e(y-n,1))),f=P(f));if(this.sm.v!==100){var p=this.sm.v*.01;p===0&&(p=1e-8);var v=.5-p*.5;f1&&(f=1))}return f*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 l=this.data.r===2?1:100/this.data.totalChars,o=this.o.v/l,h=this.s.v/l+o,m=this.e.v/l+o;if(h>m){var P=h;h=m,m=P}this.finalS=h,this.finalE=m}},extendPrototype([DynamicPropertyContainer],i);function s(a,n,l){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=y+J||!E?(I=(y+J-T)/d.partialLength,z=v.point[0]+(d.point[0]-v.point[0])*I,N=v.point[1]+(d.point[1]-v.point[1])*I,a.translate(-r[0]*f[m].an*.005,-(r[1]*O)*.01),c=!1):E&&(T+=d.partialLength,u+=1,u>=E.length&&(u=0,p+=1,_[p]?E=_[p].points:V.v.c?(u=0,p=0,E=_[p].points):(T-=d.partialLength,E=null)),E&&(v=d,d=E[u],A=d.partialLength));G=f[m].an/2-f[m].add,a.translate(-G,0,0)}else G=f[m].an/2-f[m].add,a.translate(-G,0,0),a.translate(-r[0]*f[m].an*.005,-r[1]*O*.01,0);for(g=0;gt?this.textSpans[t].span:createNS(l?"g":"text"),p<=t){if(o.setAttribute("stroke-linecap","butt"),o.setAttribute("stroke-linejoin","round"),o.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=o,l){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(h.reset(),P&&(n[t].n&&(f=-d,b+=r.yOffset,b+=y?1:0,y=!1),this.applyTextPropertiesToMatrix(r,h,n[t].line,f,b),f+=n[t].l||0,f+=d),l){v=this.globalData.fontManager.getCharData(r.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily);var _;if(v.t===1)_=new SVGCompElement(v.data,this.globalData,this);else{var A=emptyShapeData;v.data&&v.data.shapes&&(A=this.buildShapeData(v.data,r.finalSize)),_=new SVGShapeElement(A,this.globalData,this)}if(this.textSpans[t].glyph){var x=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(x.layerElement),x.destroy()}this.textSpans[t].glyph=_,_._debug=!0,_.prepareFrame(0),_.renderFrame(),this.textSpans[t].childSpan.appendChild(_.layerElement),v.t===1&&this.textSpans[t].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else P&&o.setAttribute("transform","translate("+h.props[12]+","+h.props[13]+")"),o.textContent=n[t].val,o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}P&&o&&o.setAttribute("d",m)}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,l;for(a=0;a=0;a-=1){if(P=this.searchProcessedElement(t[a]),P?e[a]=r[P-1]:t[a]._shouldRender=i,t[a].ty==="fl"||t[a].ty==="st"||t[a].ty==="gf"||t[a].ty==="gs")P?e[a].style.closed=!1:e[a]=this.createStyleElement(t[a],y),h.push(e[a].style);else if(t[a].ty==="gr"){if(!P)e[a]=this.createGroupElement(t[a]);else for(o=e[a].it.length,l=0;l=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,l=i._length;r.length=0;var o=t.transforms.finalTransform;for(n=0;n=1?m=.99:m<=-1&&(m=-.99);var P=o*m,f=Math.cos(h+e.a.v)*P+n[0],b=Math.sin(h+e.a.v)*P+n[1];s=a.createRadialGradient(f,b,0,n[0],n[1],o)}var y,d=t.g.p,T=e.g.c,c=1;for(y=0;ya&&o==="xMidYMid slice"||ss&&l==="meet"||as&&l==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(i/this.transformCanvas.h))/2*this.renderConfig.dpr:h==="xMax"&&(as&&l==="slice")?this.transformCanvas.tx=(r-this.transformCanvas.w*(i/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,m==="YMid"&&(a>s&&l==="meet"||as&&l==="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[f].push(this.calculateF(o,t,e,r,i,f))):(h=n*n-4*l*a,h>=0&&(m=(-n+bmSqrt(h))/(2*a),m>0&&m<1&&s[f].push(this.calculateF(m,t,e,r,i,f)),P=(-n-bmSqrt(h))/(2*a),P>0&&P<1&&s[f].push(this.calculateF(P,t,e,r,i,f)))));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],l=Math.sqrt(n[2]*n[2]+n[0]*n[0]),o=Math.atan2(n[1],l),h=Math.atan2(n[0],-n[2]);this.mat.rotateY(h).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 m=!this._prevMat.equals(this.mat);if((m||this.pe._mdf)&&this.comp.threeDElements){r=this.comp.threeDElements.length;var P,f,b;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 l="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";s.transform=l,s.webkitTransform=l}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,l=(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,l=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+s+",0,0,0,0,"+a+",0,0,0,0,1,0,"+n+","+l+",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=h;)V/=2,k/=2,R>>>=1;return(V+R)/k};return I.int32=function(){return x.g(4)|0},I.quick=function(){return x.g(4)/4294967296},I.double=I,T(u(x.S),t),(v.pass||E||function(D,V,k,R){return R&&(R.S&&y(R,x),D.state=function(){return y(x,{})}),k?(e[n]=D,V):D})(I,A,"global"in v?v.global:this==e,v.state)}e["seed"+n]=f;function b(p){var v,E=p.length,_=this,A=0,x=_.i=_.j=0,I=_.S=[];for(E||(p=[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?h/(2-s-a):h/(s+a),s){case e:n=(r-i)/h+(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 l=i<.5?i*(1+r):i+r-i*r,o=2*i-l;s=hue2rgb(o,l,e+1/3),a=hue2rgb(o,l,e),n=hue2rgb(o,l,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 l,o=i.length,h=createTypedArray("float32",o);for(l=0;l1){for(s=0;s1?e=1:e<0&&(e=0);var n=t(e);if($bm_isInstanceOfArray(s)){var l,o=s.length,h=createTypedArray("float32",o);for(l=0;ldata.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;rT.length-1)&&(b=T.length-1),p=T[T.length-1-b].t,u=c-p);var v,E,_;if(f==="pingpong"){var A=Math.floor((d-p)/u);if(A%2!==0)return this.getValueAtTime((u-(d-p)%u+p)/this.comp.globalData.frameRate,0)}else if(f==="offset"){var x=this.getValueAtTime(p/this.comp.globalData.frameRate,0),I=this.getValueAtTime(c/this.comp.globalData.frameRate,0),D=this.getValueAtTime(((d-p)%u+p)/this.comp.globalData.frameRate,0),V=Math.floor((d-p)/u);if(this.pv.length){for(_=new Array(x.length),E=_.length,v=0;v=c)return this.pv;var u,p;y?(b?u=Math.abs(this.elem.comp.globalData.frameRate*b):u=Math.max(0,this.elem.data.op-c),p=c+u):((!b||b>T.length-1)&&(b=T.length-1),p=T[b].t,u=p-c);var v,E,_;if(f==="pingpong"){var A=Math.floor((c-d)/u);if(A%2===0)return this.getValueAtTime(((c-d)%u+c)/this.comp.globalData.frameRate,0)}else if(f==="offset"){var x=this.getValueAtTime(c/this.comp.globalData.frameRate,0),I=this.getValueAtTime(p/this.comp.globalData.frameRate,0),D=this.getValueAtTime((u-(c-d)%u+c)/this.comp.globalData.frameRate,0),V=Math.floor((c-d)/u)+1;if(this.pv.length){for(_=new Array(x.length),E=_.length,v=0;v1?(T-d)/(b-1):1,u=0,p=0,v;this.pv.length?v=createTypedArray("float32",this.pv.length):v=0;for(var E;uu){var A=p,x=d.c&&p===v-1?0:p+1,I=(u-E)/c[p].addedLength;_=bez.getPointInSegment(d.v[A],d.v[x],d.o[A],d.i[x],I,c[p]);break}else E+=c[p].addedLength;p+=1}return _||(_=d.c?[d.v[0][0],d.v[0][1]]:[d.v[d._length-1][0],d.v[d._length-1][1]]),_},vectorOnPath:function(b,y,d){b==1?b=this.v.c:b==0&&(b=.999);var T=this.pointOnPath(b,y),c=this.pointOnPath(b+.001,y),u=c[0]-T[0],p=c[1]-T[1],v=Math.sqrt(Math.pow(u,2)+Math.pow(p,2));if(v===0)return[0,0];var E=d==="tangent"?[u/v,p/v]:[-p/v,u/v];return E},tangentOnPath:function(b,y){return this.vectorOnPath(b,y,"tangent")},normalOnPath:function(b,y){return this.vectorOnPath(b,y,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([m],o),extendPrototype([m],h),h.prototype.getValueAtTime=l,h.prototype.initiateExpression=ExpressionManager.initiateExpression;var P=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(f,b,y,d,T){var c=P(f,b,y,d,T);return c.propertyIndex=b.ix,c.lock=!1,y===3?expressionHelpers.searchExpressions(f,b.pt,c):y===4&&expressionHelpers.searchExpressions(f,b.ks,c),c.k&&f.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=h?P=y<0?i:s:P=i+b*Math.pow((l-t)/y,1/r),m[f]=P,f+=1,a+=256/(n-1);return m.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 l=createNS("feGaussianBlur");l.setAttribute("in","SourceAlpha"),l.setAttribute("result",i+"_drop_shadow_1"),l.setAttribute("stdDeviation","0"),this.feGaussianBlur=l,t.appendChild(l);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 h=createNS("feFlood");h.setAttribute("flood-color","#00ff00"),h.setAttribute("flood-opacity","1"),h.setAttribute("result",i+"_drop_shadow_3"),this.feFlood=h,t.appendChild(h);var m=createNS("feComposite");m.setAttribute("in",i+"_drop_shadow_3"),m.setAttribute("in2",i+"_drop_shadow_2"),m.setAttribute("operator","in"),m.setAttribute("result",i+"_drop_shadow_4"),t.appendChild(m);var P=this.createMergeNode(i,[i+"_drop_shadow_4",s]);t.appendChild(P)}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;e-1&&t%1==0&&t-1&&t%1==0&&t<=MAX_SAFE_INTEGER}function isArrayLike(t){return t!=null&&isLength(t.length)&&!isFunction(t)}var objectProto$a=Object.prototype;function isPrototype(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||objectProto$a;return t===r}function baseTimes(t,e){for(var r=-1,i=Array(t);++r-1}function listCacheSet(t,e){var r=this.__data__,i=assocIndexOf(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}function ListCache(t){var e=-1,r=t==null?0:t.length;for(this.clear();++el))return!1;var h=a.get(t),m=a.get(e);if(h&&m)return h==e&&m==t;var P=-1,f=!0,b=r&COMPARE_UNORDERED_FLAG$1?new SetCache:void 0;for(a.set(t,e),a.set(e,t);++P{const r=t.__vccOpts||t;for(const[i,s]of e)r[i]=s;return r};const _sfc_main=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},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}){let r=ref(null);const i=ref("");let s=1;const a=x=>document.querySelector(`[data-id="${x}"]`)!==null,n=async x=>{let I=t.autoPlay;t.playOnHover&&(I=!1);let D={};if(isEqual(t.animationData,{})===!1&&(D=cloneDeep(t.animationData)),t.animationLink!="")try{D=await(await fetch(t.animationLink)).json()}catch(R){console.error(R);return}let V=t.loop;typeof V=="number"&&V>0&&(V=V-1),t.delay>0&&(I=!1);const k={container:x,renderer:t.renderer,loop:V,autoplay:I,animationData:D,assetsPath:t.assetsPath};isEqual(t.rendererSettings,{})===!1&&(k.rendererSettings=t.rendererSettings),r=Lottie.loadAnimation(k),setTimeout(()=>{I=t.autoPlay,t.playOnHover?r.pause():I?r.play():r.pause(),e("onAnimationLoaded")},t.delay),r.setSpeed(t.speed),t.direction==="reverse"&&r.setDirection(-1),t.direction==="normal"&&r.setDirection(1),(t.pauseAnimation||t.playOnHover)&&r.pause(),r.addEventListener("loopComplete",()=>{t.direction==="alternate"&&(r.stop(),s=s*-1,r.setDirection(s),r.play()),e("onLoopComplete")}),r.addEventListener("complete",()=>{e("onComplete")}),r.addEventListener("enterFrame",()=>{e("onEnterFrame")}),r.addEventListener("segmentStart",()=>{e("onSegmentStart")})},l=computed(()=>{let x=t.width,I=t.height;return typeof t.width=="number"&&(x=`${t.width}px`),typeof t.height=="number"&&(I=`${t.height}px`),{"--lottie-animation-container-width":x,"--lottie-animation-container-height":I,"--lottie-animation-container-background-color":t.backgroundColor}}),o=()=>{r&&t.pauseOnHover&&r.pause(),r&&t.playOnHover&&r.play()},h=()=>{r&&t.pauseOnHover&&r.play(),r&&t.playOnHover&&r.pause()};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}r&&(t.pauseAnimation?r.pause():r.play())});const m=()=>{r&&r.play()},P=()=>{r&&r.pause()},f=()=>{r&&r.stop()},b=()=>{r&&r.destroy()},y=(x=1)=>{if(x<=0)throw new Error("Speed must be greater than 0");r&&r.setSpeed(x)},d=x=>{r&&(x==="forward"?r.setDirection(1):x==="reverse"&&r.setDirection(-1))},T=(x,I=!0)=>{r&&r.goToAndStop(x,I)},c=(x,I=!0)=>{r&&r.goToAndPlay(x,I)},u=(x,I=!1)=>{r&&r.playSegments(x,I)},p=(x=!0)=>{r&&r.setSubframe(x)},v=(x=!0)=>{if(r)return r.getDuration(x)},E=(x,I=0)=>{r&&r.renderer.elements[I].updateDocumentData(x)},_=x=>{for(var I="",D="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",V=D.length,k=0;k{if(t.pauseOnHover&&t.playOnHover)throw new Error("You cannot set pauseOnHover and playOnHover for Vue3-Lottie at the same time.");if(t.animationLink===""&&isEqual(t.animationData,{}))throw new Error("You must provide either animationLink or animationData");const I=setInterval(()=>{if(a(x)){clearInterval(I);const D=document.querySelector(`[data-id="${x}" ]`);D&&n(D)}},0)};return onMounted(async()=>{i.value=_(20),A(i.value)}),{elementid:i,hoverEnded:h,hoverStarted:o,getCurrentStyle:l,play:m,pause:P,stop:f,destroy:b,setSpeed:y,setDirection:d,goToAndStop:T,goToAndPlay:c,playSegments:u,setSubFrame:p,getDuration:v,updateDocumentData:E}}}),_hoisted_1=["data-id"];function _sfc_render(t,e,r,i,s,a){return openBlock(),createElementBlock("div",{"data-id":t.elementid,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,44,_hoisted_1)}var Vue3Lottie=_export_sfc(_sfc_main,[["render",_sfc_render]]);const modeView=defineComponent({name:"modeView",setup(){var a;const t=ref(),e=ref(),r=ref();watch(()=>headTopData.modeType,(n,l)=>{l&&nextTick(()=>{var o,h,m,P,f,b;n==="show"?((o=t.value)==null||o.pause(),(h=e.value)==null||h.pause(),(m=r.value)==null||m.pause()):n==="init"&&((P=t.value)==null||P.play(),(f=e.value)==null||f.play(),(b=r.value)==null||b.play())})}),watch(()=>evaluatingData.socketErrorStatus,()=>{evaluatingData.socketErrorStatus===2&&setTimeout(()=>{evaluatingData.socketErrorPop=!1},1e3)});const i=browser(),s=((a=navigator==null?void 0:navigator.userAgent)==null?void 0:a.includes("UAWEIVRD-W09"))||(i==null?void 0:i.iPad)||i.isTablet;return()=>createVNode("div",{class:[styles.modeView,s&&styles.isiPad,headTopData.modeType!=="init"&&styles.hidden]},[createVNode("img",{src:backImg,class:styles.back,onClick:()=>{state.isSingleLine&&(smoothAnimationState.isShow.value=state.melodyLine),headTopData.oldModeType!=="practise"&&(evaluatingData.needCheckErjiStatus=!1,headTopData.handleChangeModeType(headTopData.oldModeType)),headTopData.modeType="show"}},null),createVNode("div",{class:[styles.modeBox,(!state.isPercussion&&!state.enableEvaluation||state.isPercussion&&state.enableEvaluation||state.isPercussion&&!state.enableEvaluation)&&styles.twoModeBox]},[createVNode(Vue3Lottie,{ref:t,class:styles.modeImg,animationData:lxMode,autoPlay:!1,loop:!0,onClick:()=>{state.isSingleLine&&(smoothAnimationState.isShow.value=state.melodyLine),headTopData.handleChangeModeType("practise")}},null),!state.isPercussion&&createVNode(Vue3Lottie,{ref:e,class:styles.modeImg,animationData:glMode,autoPlay:!1,loop:!0,onClick:()=>headTopData.handleChangeModeType("follow")},null),state.enableEvaluation&&createVNode(Vue3Lottie,{ref:r,class:styles.modeImg,animationData:pcMode,autoPlay:!1,loop:!0,onClick:()=>{evaluatingData.needCheckErjiStatus=!0,headTopData.handleChangeModeType("evaluating")}},null)])])}});export{modeView as default};