"undefined"!=typeof document&&"undefined"!=typeof navigator&&function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lottie=e()}(this,(function(){"use strict";var t="",e=!1,s=-999999,i=function(){return t};function a(t){return document.createElement(t)}function r(t,e){var s,i,a=t.length;for(s=0;s1?s[1]=1:s[1]<=0&&(s[1]=0),I(s[0],s[1],s[2])}function z(t,e){var s=R(255*t[0],255*t[1],255*t[2]);return s[2]+=e,s[2]>1?s[2]=1:s[2]<0&&(s[2]=0),I(s[0],s[1],s[2])}function O(t,e){var s=R(255*t[0],255*t[1],255*t[2]);return s[0]+=e/360,s[0]>1?s[0]-=1:s[0]<0&&(s[0]+=1),I(s[0],s[1],s[2])}!function(){var t,e,s=[];for(t=0;t<256;t+=1)e=t.toString(16),s[t]=1===e.length?"0"+e:e}();var N=function(){return c},q=function(){return d},B=function(t){C=t},W=function(){return C};function j(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Y(t){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y(t)}var J=function(){var t,s,i=1,a=[],r={onmessage:function(){},postMessage:function(e){t({data:e})}},n={postMessage:function(t){r.onmessage({data:t})}};function o(s){if(window.Worker&&window.Blob&&e){var i=new Blob(["var _workerSelf = self; self.onmessage = ",s.toString()],{type:"text/javascript"}),a=URL.createObjectURL(i);return new Worker(a)}return t=s,r}function h(){s||(s=o((function(t){if(n.dataManager||(n.dataManager=function(){function t(a,r){var n,o,h,l,p,c,d=a.length;for(o=0;o=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)i(t[e].ks.k);else for(r=t[e].ks.k.length,a=0;as[0]||!(s[0]>t[0])&&(t[1]>s[1]||!(s[1]>t[1])&&(t[2]>s[2]||!(s[2]>t[2])&&null))}var r,n=function(){var t=[4,4,14];function e(t){var e,s,i,a=t.length;for(e=0;e=0;s-=1)if("sh"===t[s].ty)if(t[s].ks.k.i)t[s].ks.k.c=t[s].closed;else for(a=t[s].ks.k.length,i=0;i500)&&(this._imageLoaded(),clearInterval(s)),e+=1}.bind(this),50)}function n(t){var e={assetData:t},s=i(t,this.assetsPath,this.path);return J.loadData(s,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function o(){this._imageLoaded=e.bind(this),this._footageLoaded=s.bind(this),this.testImageLoaded=r.bind(this),this.createFootageData=n.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return o.prototype={loadAssets:function(t,e){var s;this.imagesLoadedCb=e;var i=t.length;for(s=0;sthis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,s,i=this.animationData.layers,a=i.length,r=t.layers,n=r.length;for(s=0;sthis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},Q.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},Q.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},Q.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},Q.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},Q.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},Q.prototype.getMarkerData=function(t){for(var e,s=0;s=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(s=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(s=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),s&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},Q.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")},Q.prototype.setSegment=function(t,e){var s=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(s=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==s&&this.goToAndStop(s,!0)},Q.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===Z(t[0])){var s,i=t.length;for(s=0;s=0;s-=1)e[s].animation.destroy(t)},t.freeze=function(){o=!0},t.unfreeze=function(){o=!1,u()},t.setVolume=function(t,s){var a;for(a=0;a=.001?function(t,e,s,i){for(var a=0;a<4;++a){var r=l(e,s,i);if(0===r)return e;e-=(h(e,s,i)-t)/r}return e}(t,f,e,a):0===c?f:function(t,e,s,i,a){var r,n,o=0;do{(r=h(n=e+(s-e)/2,i,a)-t)>0?s=n:e=n}while(Math.abs(r)>1e-7&&++o<10);return n}(t,n,n+i,e,a)}},t}(),et={double:function(t){return t.concat(l(t.length))}},st=function(t,e,s){var i=0,a=t,r=l(a);return{newElement:function(){return i?r[i-=1]:e()},release:function(t){i===a&&(r=et.double(r),a*=2),s&&s(t),r[i]=t,i+=1}}},it=st(8,(function(){return{addedLength:0,percents:h("float32",W()),lengths:h("float32",W())}})),at=st(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,s=t.lengths.length;for(e=0;e-.001&&n<.001}var s=function(t,e,s,i){var a,r,n,o,h,l,p=W(),f=0,c=[],d=[],m=it.newElement();for(n=s.length,a=0;an?-1:1,l=!0;l;)if(i[r]<=n&&i[r+1]>n?(o=(n-i[r])/(i[r+1]-i[r]),l=!1):r+=h,r<0||r>=a-1){if(r===a-1)return s[r];l=!1}return s[r]+(s[r+1]-s[r])*o}var p=h("float32",8);return{getSegmentsLength:function(t){var e,i=at.newElement(),a=t.c,r=t.v,n=t.o,o=t.i,h=t._length,l=i.lengths,p=0;for(e=0;e1&&(r=1);var l,f=o(r,h),c=o(n=n>1?1:n,h),d=e.length,m=1-f,u=1-c,g=m*m*m,y=f*m*m*3,v=f*f*m*3,b=f*f*f,_=m*m*u,C=f*m*u+m*f*u+m*m*c,x=f*f*u+m*f*c+f*m*c,k=f*f*c,S=m*u*u,P=f*u*u+m*c*u+m*u*c,D=f*c*u+m*c*c+f*u*c,w=f*c*c,A=u*u*u,M=c*u*u+u*c*u+u*u*c,T=c*c*u+u*c*c+c*u*c,F=c*c*c;for(l=0;ld?c>m?c-d-m:m-d-c:m>d?m-d-c:d-c-m)>-1e-4&&f<1e-4}}}(),nt=s,ot=Math.abs;function ht(t,e){var s,i=this.offsetTime;"multidimensional"===this.propType&&(s=h("float32",this.pv.length));for(var a,r,n,o,l,p,f,c,d,m=e.lastIndex,u=m,g=this.keyframes.length-1,y=!0;y;){if(a=this.keyframes[u],r=this.keyframes[u+1],u===g-1&&t>=r.t-i){a.h&&(a=r),m=0;break}if(r.t-i>t){m=u;break}u=M||t=M?F.points.length-1:0;for(l=F.points[E].point.length,o=0;o=R&&I=M)s[0]=v[0],s[1]=v[1],s[2]=v[2];else if(t<=T)s[0]=a.s[0],s[1]=a.s[1],s[2]=a.s[2];else{var B=lt(a.s),W=lt(v);b=s,_=function(t,e,s){var i,a,r,n,o,h=[],l=t[0],p=t[1],f=t[2],c=t[3],d=e[0],m=e[1],u=e[2],g=e[3];return(a=l*d+p*m+f*u+c*g)<0&&(a=-a,d=-d,m=-m,u=-u,g=-g),1-a>1e-6?(i=Math.acos(a),r=Math.sin(i),n=Math.sin((1-s)*i)/r,o=Math.sin(s*i)/r):(n=1-s,o=s),h[0]=n*l+o*d,h[1]=n*p+o*m,h[2]=n*f+o*u,h[3]=n*c+o*g,h}(B,W,(t-T)/(M-T)),C=_[0],k=_[1],S=_[2],P=_[3],D=Math.atan2(2*k*P-2*C*S,1-2*k*k-2*S*S),w=Math.asin(2*C*k+2*S*P),A=Math.atan2(2*C*P-2*k*S,1-2*C*C-2*S*S),b[0]=D/x,b[1]=w/x,b[2]=A/x}else for(u=0;u=M?p=1:t=s&&t>=s||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 ft(t){var e;if("unidimensional"===this.propType)e=t*this.mult,ot(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var s=0,i=this.v.length;s1e-5&&(this.v[s]=e,this._mdf=!0),s+=1}function ct(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,s=this.kf?this.pv:this.data.k;for(t=0;t=this._maxLength&&this.doubleArrayLength(),s){case"v":r=this.v;break;case"i":r=this.i;break;case"o":r=this.o;break;default:r=[]}(!r[i]||r[i]&&!a)&&(r[i]=_t.newElement()),r[i][0]=t,r[i][1]=e},Ct.prototype.setTripleAt=function(t,e,s,i,a,r,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(s,i,"o",n,o),this.setXYAt(a,r,"i",n,o)},Ct.prototype.reverse=function(){var t=new Ct;t.setPathData(this.c,this._length);var e=this.v,s=this.o,i=this.i,a=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],s[0][0],s[0][1],0,!1),a=1);var r,n=this._length-1,o=this._length;for(r=a;r=d[d.length-1].t-this.offsetTime)i=d[d.length-1].s?d[d.length-1].s[0]:d[d.length-2].e[0],r=!0;else{for(var m,u,g,y=c,v=d.length-1,b=!0;b&&(m=d[y],!((u=d[y+1]).t-this.offsetTime>t));)y=u.t-this.offsetTime)p=1;else if(ti&&e>i)||(this._caching.lastIndex=a0||t>-1e-6&&t<0?i(1e4*t)/1e4:t}function I(){var t=this.props;return"matrix("+L(t[0])+","+L(t[1])+","+L(t[4])+","+L(t[5])+","+L(t[12])+","+L(t[13])+")"}return function(){this.reset=a,this.rotate=r,this.rotateX=n,this.rotateY=o,this.rotateZ=l,this.skew=f,this.skewFromAxis=c,this.shear=p,this.scale=d,this.setTransform=m,this.translate=u,this.transform=g,this.multiply=y,this.applyToPoint=x,this.applyToX=k,this.applyToY=S,this.applyToZ=P,this.applyToPointArray=T,this.applyToTriplePoints=M,this.applyToPointStringified=F,this.toCSS=E,this.to2dCSS=I,this.clone=_,this.cloneFromProps=C,this.equals=b,this.inversePoints=A,this.inversePoint=w,this.getInverseMatrix=D,this._t=this.transform,this.isIdentity=v,this._identity=!0,this._identityCalculated=!1,this.props=h("float32",16),this.reset()}}();function Et(t){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Et(t)}var Lt={},It="__[STANDALONE]__";function Rt(){$.searchAnimations()}Lt.play=$.play,Lt.pause=$.pause,Lt.setLocationHref=function(e){t=e},Lt.togglePause=$.togglePause,Lt.setSpeed=$.setSpeed,Lt.setDirection=$.setDirection,Lt.stop=$.stop,Lt.searchAnimations=Rt,Lt.registerAnimation=$.registerAnimation,Lt.loadAnimation=function(t){return $.loadAnimation(t)},Lt.setSubframeRendering=function(t){!function(t){f=!!t}(t)},Lt.resize=$.resize,Lt.goToAndStop=$.goToAndStop,Lt.destroy=$.destroy,Lt.setQuality=function(t){if("string"==typeof t)switch(t){case"high":B(200);break;default:case"medium":B(50);break;case"low":B(10)}else!isNaN(t)&&t>1&&B(t);W()>=50?S(!1):S(!0)},Lt.inBrowser=function(){return"undefined"!=typeof navigator},Lt.installPlugin=function(t,e){"expressions"===t&&(c=e)},Lt.freeze=$.freeze,Lt.unfreeze=$.unfreeze,Lt.setVolume=$.setVolume,Lt.mute=$.mute,Lt.unmute=$.unmute,Lt.getRegisteredAnimations=$.getRegisteredAnimations,Lt.useWebWorker=function(t){e=!!t},Lt.setIDPrefix=function(t){m=t},Lt.__getFactory=function(t){switch(t){case"propertyFactory":return vt;case"shapePropertyFactory":return Tt;case"matrix":return Ft;default:return null}},Lt.version="5.13.0";var Vt="";if(It){var zt=document.getElementsByTagName("script"),Ot=zt[zt.length-1]||{src:""};Vt=Ot.src?Ot.src.replace(/^[^\?]+\??/,""):"",function(t){for(var e=Vt.split("&"),s=0;s=1?r.push({s:t-1,e:e-1}):(r.push({s:t,e:1}),r.push({s:0,e:e-1}));var n,o,h=[],l=r.length;for(n=0;ni+s))p=o.s*a<=i?0:(o.s*a-i)/s,f=o.e*a>=i+s?1:(o.e*a-i)/s,h.push([p,f])}return h.length||h.push([0,0]),h},Wt.prototype.releasePathsData=function(t){var e,s=t.length;for(e=0;e1?1+r:this.s.v<0?0+r:this.s.v+r)>(s=this.e.v>1?1+r:this.e.v<0?0+r:this.e.v+r)){var n=e;e=s,s=n}e=1e-4*Math.round(1e4*e),s=1e-4*Math.round(1e4*s),this.sValue=e,this.eValue=s}else e=this.sValue,s=this.eValue;var o,h,l,p,f,c=this.shapes.length,d=0;if(s===e)for(a=0;a=0;a-=1)if((m=this.shapes[a]).shape._mdf){for((u=m.localShapeCollection).releaseShapes(),2===this.m&&c>1?(y=this.calculateShapeEdges(e,s,m.totalShapeLength,_,d),_+=m.totalShapeLength):y=[[v,b]],h=y.length,o=0;o=1?g.push({s:m.totalShapeLength*(v-1),e:m.totalShapeLength*(b-1)}):(g.push({s:m.totalShapeLength*v,e:m.totalShapeLength}),g.push({s:0,e:m.totalShapeLength*(b-1)}));var C=this.addShapes(m,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(m.shape.paths.shapes[m.shape.paths._length-1].c){var x=C.pop();this.addPaths(C,u),C=this.addShapes(m,g[1],x)}else this.addPaths(C,u),C=this.addShapes(m,g[1]);this.addPaths(C,u)}}m.shape.paths=u}}},Wt.prototype.addPaths=function(t,e){var s,i=t.length;for(s=0;se.e){s.c=!1;break}e.s<=m&&e.e>=m+n.addedLength?(this.addSegment(c[i].v[a-1],c[i].o[a-1],c[i].i[a],c[i].v[a],s,o,g),g=!1):(l=rt.getNewSegment(c[i].v[a-1],c[i].v[a],c[i].o[a-1],c[i].i[a],(e.s-m)/n.addedLength,(e.e-m)/n.addedLength,h[a-1]),this.addSegmentFromArray(l,s,o,g),g=!1,s.c=!1),m+=n.addedLength,o+=1}if(c[i].c&&h.length){if(n=h[a-1],m<=e.e){var y=h[a-1].addedLength;e.s<=m&&e.e>=m+y?(this.addSegment(c[i].v[a-1],c[i].o[a-1],c[i].i[0],c[i].v[0],s,o,g),g=!1):(l=rt.getNewSegment(c[i].v[a-1],c[i].v[0],c[i].o[a-1],c[i].i[0],(e.s-m)/y,(e.e-m)/y,h[a-1]),this.addSegmentFromArray(l,s,o,g),g=!1,s.c=!1)}else s.c=!1;m+=n.addedLength,o+=1}if(s._length&&(s.setXYAt(s.v[p][0],s.v[p][1],"i",p),s.setXYAt(s.v[s._length-1][0],s.v[s._length-1][1],"o",s._length-1)),m>e.e)break;i=this.p.keyframes[this.p.keyframes.length-1].t?(i=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/s,0),a=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/s,0)):(i=this.p.pv,a=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/s,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){i=[],a=[];var r=this.px,n=this.py;r._caching.lastFrame+r.offsetTime<=r.keyframes[0].t?(i[0]=r.getValueAtTime((r.keyframes[0].t+.01)/s,0),i[1]=n.getValueAtTime((n.keyframes[0].t+.01)/s,0),a[0]=r.getValueAtTime(r.keyframes[0].t/s,0),a[1]=n.getValueAtTime(n.keyframes[0].t/s,0)):r._caching.lastFrame+r.offsetTime>=r.keyframes[r.keyframes.length-1].t?(i[0]=r.getValueAtTime(r.keyframes[r.keyframes.length-1].t/s,0),i[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/s,0),a[0]=r.getValueAtTime((r.keyframes[r.keyframes.length-1].t-.01)/s,0),a[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/s,0)):(i=[r.pv,n.pv],a[0]=r.getValueAtTime((r._caching.lastFrame+r.offsetTime-.01)/s,r.offsetTime),a[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/s,n.offsetTime))}else i=a=t;this.v.rotate(-Math.atan2(i[1]-a[1],i[0]-a[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}},precalculateMatrix:function(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},r([bt],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=bt.prototype.addDynamicProperty,{getTransformProperty:function(t,s,i){return new e(t,s,i)}}}();function Jt(){}function Ht(){}function Gt(t,e){return 1e5*Math.abs(t-e)<=Math.min(Math.abs(t),Math.abs(e))}function Xt(t){return Math.abs(t)<=1e-5}function Kt(t,e,s){return t*(1-s)+e*s}function Ut(t,e,s){return[Kt(t[0],e[0],s),Kt(t[1],e[1],s)]}function Zt(t,e,s,i){return[3*e-t-3*s+i,3*t-6*e+3*s,-3*t+3*e,t]}function Qt(t){return new $t(t,t,t,t,!1)}function $t(t,e,s,i,a){a&&he(t,e)&&(e=Ut(t,i,1/3)),a&&he(s,i)&&(s=Ut(t,i,2/3));var r=Zt(t[0],e[0],s[0],i[0]),n=Zt(t[1],e[1],s[1],i[1]);this.a=[r[0],n[0]],this.b=[r[1],n[1]],this.c=[r[2],n[2]],this.d=[r[3],n[3]],this.points=[t,e,s,i]}function te(t,e){var s=t.points[0][e],i=t.points[t.points.length-1][e];if(s>i){var a=i;i=s,s=a}for(var r=function(t,e,s){if(0===t)return[];var i=e*e-4*t*s;if(i<0)return[];var a=-e/(2*t);if(0===i)return[a];var r=Math.sqrt(i)/(2*t);return[a-r,a+r]}(3*t.a[e],2*t.b[e],t.c[e]),n=0;n0&&r[n]<1){var o=t.point(r[n])[e];oi&&(i=o)}return{min:s,max:i}}function ee(t,e,s){var i=t.boundingBox();return{cx:i.cx,cy:i.cy,width:i.width,height:i.height,bez:t,t:(e+s)/2,t1:e,t2:s}}function se(t){var e=t.bez.split(.5);return[ee(e[0],t.t1,t.t),ee(e[1],t.t,t.t2)]}function ie(t,e,s,i,a,r){var n,o;if(n=t,o=e,2*Math.abs(n.cx-o.cx)=r||t.width<=i&&t.height<=i&&e.width<=i&&e.height<=i)a.push([t.t,e.t]);else{var h=se(t),l=se(e);ie(h[0],l[0],s+1,i,a,r),ie(h[0],l[1],s+1,i,a,r),ie(h[1],l[0],s+1,i,a,r),ie(h[1],l[1],s+1,i,a,r)}}function ae(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 re(t,e,s,i){var a=[t[0],t[1],1],r=[e[0],e[1],1],n=[s[0],s[1],1],o=[i[0],i[1],1],h=ae(ae(a,r),ae(n,o));return Xt(h[2])?null:[h[0]/h[2],h[1]/h[2]]}function ne(t,e,s){return[t[0]+Math.cos(e)*s,t[1]-Math.sin(e)*s]}function oe(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function he(t,e){return Gt(t[0],e[0])&&Gt(t[1],e[1])}function le(){}function pe(t,e,s,i,a,r,n){var o=s-Math.PI/2,h=s+Math.PI/2,l=e[0]+Math.cos(s)*i*a,p=e[1]-Math.sin(s)*i*a;t.setTripleAt(l,p,l+Math.cos(o)*r,p-Math.sin(o)*r,l+Math.cos(h)*n,p-Math.sin(h)*n,t.length())}function fe(t,e){var s,i,a,r,n=0===e?t.length()-1:e-1,o=(e+1)%t.length(),h=t.v[n],l=t.v[o],p=(s=h,a=[(i=l)[0]-s[0],i[1]-s[1]],r=.5*-Math.PI,[Math.cos(r)*a[0]-Math.sin(r)*a[1],Math.sin(r)*a[0]+Math.cos(r)*a[1]]);return Math.atan2(0,1)-Math.atan2(p[1],p[0])}function ce(t,e,s,i,a,r,n){var o=fe(e,s),h=e.v[s%e._length],l=e.v[0===s?e._length-1:s-1],p=e.v[(s+1)%e._length],f=2===r?Math.sqrt(Math.pow(h[0]-l[0],2)+Math.pow(h[1]-l[1],2)):0,c=2===r?Math.sqrt(Math.pow(h[0]-p[0],2)+Math.pow(h[1]-p[1],2)):0;pe(t,e.v[s%e._length],o,n,i,c/(2*(a+1)),f/(2*(a+1)))}function de(t,e,s,i,a,r){for(var n=0;n1&&e.length>1&&(a=ye(t[0],e[e.length-1]))?[[t[0].split(a[0])[0]],[e[e.length-1].split(a[1])[1]]]:[s,i]}function be(t,e){var s,i,a,r,n=t.inflectionPoints();if(0===n.length)return[ue(t,e)];if(1===n.length||Gt(n[1],1))return s=(a=t.split(n[0]))[0],i=a[1],[ue(s,e),ue(i,e)];s=(a=t.split(n[0]))[0];var o=(n[1]-n[0])/(1-n[0]);return r=(a=a[1].split(o))[0],i=a[1],[ue(s,e),ue(r,e),ue(i,e)]}function _e(){}function Ce(t){for(var e=t.fStyle?t.fStyle.split(" "):[],s="normal",i="normal",a=e.length,r=0;r0;)s-=1,this._elements.unshift(e[s]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},Jt.prototype.resetElements=function(t){var e,s=t.length;for(e=0;e0?Math.floor(c):Math.ceil(c),u=this.pMatrix.props,g=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,_=0;if(c>0){for(;_m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),_-=1;d&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-d,!0),_-=d)}for(i=1===this.data.m?0:this._currentCopies-1,a=1===this.data.m?1:-1,r=this._currentCopies;r;){if(b=(s=(e=this.elemsData[i].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(i/(this._currentCopies-1)),0!==_){for((0!==i&&1===a||i!==this._currentCopies-1&&-1===a)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],u[8],u[9],u[10],u[11],u[12],u[13],u[14],u[15]),v=0;v0&&i<1?[e]:[]:[e-i,e+i].filter((function(t){return t>0&&t<1}))},$t.prototype.split=function(t){if(t<=0)return[Qt(this.points[0]),this];if(t>=1)return[this,Qt(this.points[this.points.length-1])];var e=Ut(this.points[0],this.points[1],t),s=Ut(this.points[1],this.points[2],t),i=Ut(this.points[2],this.points[3],t),a=Ut(e,s,t),r=Ut(s,i,t),n=Ut(a,r,t);return[new $t(this.points[0],e,a,n,!0),new $t(n,r,i,this.points[3],!0)]},$t.prototype.bounds=function(){return{x:te(this,0),y:te(this,1)}},$t.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}},$t.prototype.intersections=function(t,e,s){void 0===e&&(e=2),void 0===s&&(s=7);var i=[];return ie(ee(this,0,1),ee(t,0,1),0,e,i,s),i},$t.shapeSegment=function(t,e){var s=(e+1)%t.length();return new $t(t.v[e],t.o[e],t.i[s],t.v[s],!0)},$t.shapeSegmentInverted=function(t,e){var s=(e+1)%t.length();return new $t(t.v[s],t.i[s],t.o[e],t.v[e],!0)},r([Bt],le),le.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=vt.getProp(t,e.s,0,null,this),this.frequency=vt.getProp(t,e.r,0,null,this),this.pointsType=vt.getProp(t,e.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},le.prototype.processPath=function(t,e,s,i){var a=t._length,r=kt.newElement();if(r.c=t.c,t.c||(a-=1),0===a)return r;var n=-1,o=$t.shapeSegment(t,0);ce(r,t,0,e,s,i,n);for(var h=0;h=0;r-=1)o=$t.shapeSegmentInverted(t,r),l.push(be(o,e));l=function(t){for(var e,s=1;s1&&(e=ve(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}(l);var p=null,f=null;for(r=0;r=55296&&s<=56319){var i=t.charCodeAt(1);i>=56320&&i<=57343&&(e=1024*(s-55296)+i-56320+65536)}return e}function h(t){var e=o(t);return e>=127462&&e<=127487}var l=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)};l.isModifier=function(t,e){var s=t.toString(16)+e.toString(16);return-1!==i.indexOf(s)},l.isZeroWidthJoiner=function(t){return 8205===t},l.isFlagEmoji=function(t){return h(t.substr(0,2))&&h(t.substr(2,2))},l.isRegionalCode=h,l.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},l.isRegionalFlag=function(t,e){var i=o(t.substr(e,2));if(i!==s)return!1;var a=0;for(e+=2;a<5;){if((i=o(t.substr(e,2)))<917601||i>917626)return!1;a+=1,e+=2}return 917631===o(t.substr(e,2))},l.isVariationSelector=function(t){return 65039===t},l.BLACK_FLAG_CODE_POINT=s;var p={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var s,i,a=t.length,r=this.chars.length;for(e=0;e0&&(f=!1),f){var c=a("style");c.setAttribute("f-forigin",i[s].fOrigin),c.setAttribute("f-origin",i[s].origin),c.setAttribute("f-family",i[s].fFamily),c.type="text/css",c.innerText="@font-face {font-family: "+i[s].fFamily+"; font-style: normal; src: url('"+i[s].fPath+"');}",e.appendChild(c)}}else if("g"===i[s].fOrigin||1===i[s].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),p=0;pt?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},qe.prototype.show=function(){},qe.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},qe.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},qe.prototype.resume=function(){this._canPlay=!0},qe.prototype.setRate=function(t){this.audio.rate(t)},qe.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},qe.prototype.getBaseElement=function(){return null},qe.prototype.destroy=function(){},qe.prototype.sourceRectAtTime=function(){},qe.prototype.initExpressions=function(){},Be.prototype.checkLayers=function(t){var e,s,i=this.layers.length;for(this.completeLayers=!0,e=i-1;e>=0;e-=1)this.elements[e]||(s=this.layers[e]).ip-s.st<=t-this.layers[e].st&&s.op-s.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},Be.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:default: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)}},Be.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},Be.prototype.createAudio=function(t){return new qe(t,this.globalData,this)},Be.prototype.createFootage=function(t){return new Ne(t,this.globalData,this)},Be.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t0&&(this.maskElement.setAttribute("id",v),this.element.maskedElement.setAttribute(_,"url("+i()+"#"+v+")"),n.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}je.prototype={initTransform:function(){var t=new Ft;this.finalTransform={mProp:this.data.ks?Yt.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:t,localMat:t,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,s=0,i=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;s1&&(r+=" C"+e.o[i-1][0]+","+e.o[i-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),s.lastPath!==r){var n="";s.elem&&(e.c&&(n=t.inv?this.solidPath+r:r),s.elem.setAttribute("d",n)),s.lastPath=r}},Ye.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var Je=function(){var t={};return t.createFilter=function(t,e){var s=j("filter");s.setAttribute("id",t),!0!==e&&(s.setAttribute("filterUnits","objectBoundingBox"),s.setAttribute("x","0%"),s.setAttribute("y","0%"),s.setAttribute("width","100%"),s.setAttribute("height","100%"));return s},t.createAlphaToLuminanceFilter=function(){var t=j("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),t},t}(),He=function(){var t={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"undefined"!=typeof OffscreenCanvas};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),/firefox/i.test(navigator.userAgent)&&(t.svgLumaHidden=!1),t}(),Ge={},Xe="filter_result_";function Ke(t){var e,s,a="SourceGraphic",r=t.data.ef?t.data.ef.length:0,n=L(),o=Je.createFilter(n,!0),h=0;for(this.filters=[],e=0;e=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,s=0,i=e.length;s.01)return!1;s+=1}return!0},ps.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;)h=i.transformers[m].mProps._mdf||h,d-=1,m-=1;if(h)for(d=g-i.styles[p].lvl,m=i.transformers.length-1;d>0;)c.multiply(i.transformers[m].mProps.v),d-=1,m-=1}else c=t;if(n=(f=i.sh.paths)._length,h){for(o="",r=0;r=1?v=.99:v<=-1&&(v=-.99);var b=o*v,_=Math.cos(y+e.a.v)*b+p[0],C=Math.sin(y+e.a.v)*b+p[1];h.setAttribute("fx",_),h.setAttribute("fy",C),l&&!e.g._collapsable&&(e.of.setAttribute("fx",_),e.of.setAttribute("fy",C))}}function h(t,e,s){var i=e.style,a=e.d;a&&(a._mdf||s)&&a.dashStr&&(i.pElem.setAttribute("stroke-dasharray",a.dashStr),i.pElem.setAttribute("stroke-dashoffset",a.dashoffset[0])),e.c&&(e.c._mdf||s)&&i.pElem.setAttribute("stroke","rgb("+v(e.c.v[0])+","+v(e.c.v[1])+","+v(e.c.v[2])+")"),(e.o._mdf||s)&&i.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||s)&&(i.pElem.setAttribute("stroke-width",e.w.v),i.msElem&&i.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return r;case"gf":return o;case"gs":return n;case"st":return h;case"sh":case"el":case"rc":case"sr":return a;case"tr":return s;case"no":return i;default:return null}}}}();function ys(t,e,s){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,s),this.prevViewData=[]}function vs(t,e,s,i,a,r){this.o=t,this.sw=e,this.sc=s,this.fc=i,this.m=a,this.p=r,this._mdf={o:!0,sw:!!e,sc:!!s,fc:!!i,m:!0,p:!0}}function bs(t,e){this._frameId=s,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,e.d&&e.d.sid&&(e.d=t.globalData.slotManager.getProp(e.d)),this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}r([ze,je,Ue,es,Ze,Oe,Qe],ys),ys.prototype.initSecondaryElement=function(){},ys.prototype.identityMatrix=new Ft,ys.prototype.buildExpressionInterface=function(){},ys.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},ys.prototype.filterUniqueShapes=function(){var t,e,s,i,a=this.shapes.length,r=this.stylesList.length,n=[],o=!1;for(s=0;s1&&o&&this.setShapesAsAnimated(n)}},ys.prototype.setShapesAsAnimated=function(t){var e,s=t.length;for(e=0;e=0;o-=1){if((c=this.searchProcessedElement(t[o]))?e[o]=s[c-1]:t[o]._render=n,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)c?e[o].style.closed=t[o].hd:e[o]=this.createStyleElement(t[o],a),t[o]._render&&e[o].style.pElem.parentNode!==i&&i.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(c)for(l=e[o].it.length,h=0;h1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},bs.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},bs.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,s=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var i;this.lock=!0,this._mdf=!1;var a=this.effectsSequence.length,r=t||this.data.d.k[this.keysIndex].s;for(i=0;ie);)s+=1;return this.keysIndex!==s&&(this.keysIndex=s),this.data.d.k[this.keysIndex].s},bs.prototype.buildFinalText=function(t){for(var e,s,i=[],a=0,r=t.length,n=!1,o=!1,h="";a=55296&&e<=56319?xe.isRegionalFlag(t,a)?h=t.substr(a,14):(s=t.charCodeAt(a+1))>=56320&&s<=57343&&(xe.isModifier(e,s)?(h=t.substr(a,2),n=!0):h=xe.isFlagEmoji(t.substr(a,4))?t.substr(a,4):t.substr(a,2)):e>56319?(s=t.charCodeAt(a+1),xe.isVariationSelector(e)&&(n=!0)):xe.isZeroWidthJoiner(e)&&(n=!0,o=!0),n?(i[i.length-1]+=h,n=!1):i.push(h),a+=h.length;return i},bs.prototype.completeTextData=function(t){t.__complete=!0;var e,s,i,a,r,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,c=l.m.g,d=0,m=0,u=0,g=[],y=0,v=0,b=h.getFontByName(t.f),_=0,C=Ce(b);t.fWeight=C.weight,t.fStyle=C.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),s=t.finalText.length,t.finalLineHeight=t.lh;var x,k=t.tr/1e3*t.finalSize;if(t.sz)for(var S,P,D=!0,w=t.sz[0],A=t.sz[1];D;){S=0,y=0,s=(P=this.buildFinalText(t.t)).length,k=t.tr/1e3*t.finalSize;var M=-1;for(e=0;ew&&" "!==P[e]?(-1===M?s+=1:e=M,S+=t.finalLineHeight||1.2*t.finalSize,P.splice(e,M===e?1:0,"\r"),M=-1,y=0):(y+=_,y+=k);S+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&Av?y:v,y=-2*k,a="",i=!0,u+=1):a=T,h.chars?(o=h.getCharData(T,b.fStyle,h.getFontByName(t.f).fFamily),_=i?0:o.w*t.finalSize/100):_=h.measureText(a,t.f,t.finalSize)," "===T?F+=_+k:(y+=_+k+F,F=0),p.push({l:_,an:_,add:d,n:i,anIndexes:[],val:a,line:u,animatorJustifyOffset:0}),2==c){if(d+=_,""===a||" "===a||e===s-1){for(""!==a&&" "!==a||(d-=_);m<=e;)p[m].an=d,p[m].ind=f,p[m].extra=_,m+=1;f+=1,d=0}}else if(3==c){if(d+=_,""===a||e===s-1){for(""===a&&(d-=_);m<=e;)p[m].an=d,p[m].ind=f,p[m].extra=_,m+=1;d=0,f+=1}}else p[f].ind=f,p[f].extra=0,f+=1;if(t.l=p,v=y>v?y:v,g.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var E,L,I,R,V=l.a;n=V.length;var z=[];for(r=0;r0?a=this.ne.v/100:r=-this.ne.v/100,this.xe.v>0?n=1-this.xe.v/100:o=1+this.xe.v/100;var h=tt.getBezierEasing(a,r,n,o).get,l=0,p=this.finalS,f=this.finalE,c=this.data.sh;if(2===c)l=h(l=f===p?i>=f?1:0:t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(3===c)l=h(l=f===p?i>=f?0:1:1-t(0,e(.5/(f-p)+(i-p)/(f-p),1)));else if(4===c)f===p?l=0:(l=t(0,e(.5/(f-p)+(i-p)/(f-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===c){if(f===p)l=0;else{var d=f-p,m=-d/2+(i=e(t(0,i+.5-p),f-p)),u=d/2;l=Math.sqrt(1-m*m/(u*u))}l=h(l)}else 6===c?(f===p?l=0:(i=e(t(0,i+.5-p),f-p),l=(1+Math.cos(Math.PI+2*Math.PI*i/(f-p)))/2),l=h(l)):(i>=s(p)&&(l=t(0,e(i-p<0?e(f,1)-(p-i):f-i,1))),l=h(l));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var y=.5-.5*g;l1&&(l=1)}return l*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,s=this.o.v/e,i=this.s.v/e+s,a=this.e.v/e+s;if(i>a){var r=i;i=a,a=r}this.finalS=i,this.finalE=a}},r([bt],i),{getTextSelectorProp:function(t,e,s){return new i(t,e,s)}}}();function Cs(t,e,s){var i={propType:!1},a=vt.getProp,r=e.a;this.a={r:r.r?a(t,r.r,0,x,s):i,rx:r.rx?a(t,r.rx,0,x,s):i,ry:r.ry?a(t,r.ry,0,x,s):i,sk:r.sk?a(t,r.sk,0,x,s):i,sa:r.sa?a(t,r.sa,0,x,s):i,s:r.s?a(t,r.s,1,.01,s):i,a:r.a?a(t,r.a,1,0,s):i,o:r.o?a(t,r.o,0,.01,s):i,p:r.p?a(t,r.p,1,0,s):i,sw:r.sw?a(t,r.sw,0,0,s):i,sc:r.sc?a(t,r.sc,1,0,s):i,fc:r.fc?a(t,r.fc,1,0,s):i,fh:r.fh?a(t,r.fh,0,0,s):i,fs:r.fs?a(t,r.fs,0,.01,s):i,fb:r.fb?a(t,r.fb,0,.01,s):i,t:r.t?a(t,r.t,0,0,s):i},this.s=_s.getTextSelectorProp(t,e.s,s),this.s.t=e.s.t}function xs(t,e,s){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=s,this._animatorsData=l(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(s)}function ks(){}xs.prototype.searchProperties=function(){var t,e,s=this._textData.a.length,i=vt.getProp;for(t=0;t=o+ft||!m?(v=(o+ft-l)/h.partialLength,B=d.point[0]+(h.point[0]-d.point[0])*v,W=d.point[1]+(h.point[1]-d.point[1])*v,S.translate(-C[0]*w[a].an*.005,-C[1]*R*.01),p=!1):m&&(l+=h.partialLength,(f+=1)>=m.length&&(f=0,u[c+=1]?m=u[c].points:_.v.c?(f=0,m=u[c=0].points):(l-=h.partialLength,m=null)),m&&(d=h,g=(h=m[f]).partialLength));q=w[a].an/2-w[a].add,S.translate(-q,0,0)}else q=w[a].an/2-w[a].add,S.translate(-q,0,0),S.translate(-C[0]*w[a].an*.005,-C[1]*R*.01,0);for(F=0;Ft?this.textSpans[t].span:j(h?"g":"text"),y<=t){if(n.setAttribute("stroke-linecap","butt"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=n,h){var v=j("g");n.appendChild(v),this.textSpans[t].childSpan=v}this.textSpans[t].span=n,this.layerElement.appendChild(n)}n.style.display="inherit"}if(p.reset(),f&&(o[t].n&&(c=-u,d+=s.yOffset,d+=m?1:0,m=!1),this.applyTextPropertiesToMatrix(s,p,o[t].line,c,d),c+=o[t].l||0,c+=u),h){var b;if(1===(g=this.globalData.fontManager.getCharData(s.finalText[t],i.fStyle,this.globalData.fontManager.getFontByName(s.f).fFamily)).t)b=new Ts(g.data,this.globalData,this);else{var _=Ss;g.data&&g.data.shapes&&(_=this.buildShapeData(g.data,s.finalSize)),b=new ys(_,this.globalData,this)}if(this.textSpans[t].glyph){var C=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(C.layerElement),C.destroy()}this.textSpans[t].glyph=b,b._debug=!0,b.prepareFrame(0),b.renderFrame(),this.textSpans[t].childSpan.appendChild(b.layerElement),1===g.t&&this.textSpans[t].childSpan.setAttribute("transform","scale("+s.finalSize/100+","+s.finalSize/100+")")}else f&&n.setAttribute("transform","translate("+p.props[12]+","+p.props[13]+")"),n.textContent=o[t].val,n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}f&&n&&n.setAttribute("d","")}else{var x=this.textContainer,k="start";switch(s.j){case 1:k="end";break;case 2:k="middle";break;default:k="start"}x.setAttribute("text-anchor",k),x.setAttribute("letter-spacing",u);var S=this.buildTextContents(s.finalText);for(e=S.length,d=s.ps?s.ps[1]+s.ascent:0,t=0;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;s-=1)(this.completeLayers||this.elements[s])&&(this.elements[s].prepareFrame(this.renderedFrame-this.layers[s].st),this.elements[s]._mdf&&(this._mdf=!0))}},Ms.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t=0;s-=1)t.finalTransform.multiply(t.transforms[s].transform.mProps.v);t._mdf=a},processSequences:function(t){var e,s=this.sequenceList.length;for(e=0;e=1){this.buffers=[];var t=this.globalData.canvasContext,e=Rs.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(e);var s=Rs.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(s),this.data.tt>=3&&!document._isProxy&&Rs.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new zs(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=De(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new Os(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(We)},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(t){t.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 t=this.buffers[0].getContext("2d");this.clearCanvas(t),t.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 t=this.buffers[1],e=t.getContext("2d");if(this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var s=Rs.getLumaCanvas(this.canvasContext.canvas);s.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(s,0,0)}this.canvasContext.globalCompositeOperation=Bs[this.data.tt],this.canvasContext.drawImage(t,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(t){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||t)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var e=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(e),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(e),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 Ft},Ns.prototype.hide=Ns.prototype.hideElement,Ns.prototype.show=Ns.prototype.showElement,Ws.prototype.setAsAnimated=as.prototype.setAsAnimated,r([ze,je,Ns,es,Ze,Oe,Se],js),js.prototype.initElement=Qe.prototype.initElement,js.prototype.transformHelper={opacity:1,_opMdf:!1},js.prototype.dashResetter=[],js.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},js.prototype.createStyleElement=function(t,e){var s={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},i={};if("fl"===t.ty||"st"===t.ty?(i.c=vt.getProp(this,t.c,1,255,this),i.c.k||(s.co="rgb("+v(i.c.v[0])+","+v(i.c.v[1])+","+v(i.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(i.s=vt.getProp(this,t.s,1,null,this),i.e=vt.getProp(this,t.e,1,null,this),i.h=vt.getProp(this,t.h||{k:0},0,.01,this),i.a=vt.getProp(this,t.a||{k:0},0,x,this),i.g=new ps(this,t.g,this)),i.o=vt.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(s.lc=ss[t.lc||2],s.lj=is[t.lj||2],1==t.lj&&(s.ml=t.ml),i.w=vt.getProp(this,t.w,0,null,this),i.w.k||(s.wi=i.w.v),t.d){var a=new ns(this,t.d,"canvas",this);i.d=a,i.d.k||(s.da=i.d.dashArray,s.do=i.d.dashoffset[0])}}else s.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(s),i.style=s,i},js.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},js.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:vt.getProp(this,t.o,0,.01,this),mProps:Yt.getTransformProperty(this,t,this)}}},js.prototype.createShapeElement=function(t){var e=new Ws(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},js.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t=0;r-=1){if((h=this.searchProcessedElement(t[r]))?e[r]=s[h-1]:t[r]._shouldRender=i,"fl"===t[r].ty||"st"===t[r].ty||"gf"===t[r].ty||"gs"===t[r].ty)h?e[r].style.closed=!1:e[r]=this.createStyleElement(t[r],m),c.push(e[r].style);else if("gr"===t[r].ty){if(h)for(o=e[r].it.length,n=0;n=0;a-=1)"tr"===e[a].ty?(r=s[a].transform,this.renderShapeTransform(t,r)):"sh"===e[a].ty||"el"===e[a].ty||"rc"===e[a].ty||"sr"===e[a].ty?this.renderPath(e[a],s[a]):"fl"===e[a].ty?this.renderFill(e[a],s[a],r):"st"===e[a].ty?this.renderStroke(e[a],s[a],r):"gf"===e[a].ty||"gs"===e[a].ty?this.renderGradientFill(e[a],s[a],r):"gr"===e[a].ty?this.renderShape(r,e[a].it,s[a].it):e[a].ty;i&&this.drawLayer()},js.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var s,i,a,r=t.trNodes,n=e.paths,o=n._length;r.length=0;var h=t.transforms.finalTransform;for(a=0;a=1?f=.99:f<=-1&&(f=-.99);var c=l*f,d=Math.cos(p+e.a.v)*c+o[0],m=Math.sin(p+e.a.v)*c+o[1];i=n.createRadialGradient(d,m,0,o[0],o[1],l)}var u=t.g.p,g=e.g.c,y=1;for(r=0;rh&&"xMidYMid slice"===l||oa&&"meet"===o||ra&&"slice"===o)?(s-this.transformCanvas.w*(i/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===l&&(ra&&"slice"===o)?(s-this.transformCanvas.w*(i/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===p&&(r>a&&"meet"===o||ra&&"meet"===o||r=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},Gs.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var s;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),s=i-1;s>=0;s-=1)(this.completeLayers||this.elements[s])&&this.elements[s].prepareFrame(t-this.layers[s].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),s=i-1;s>=0;s-=1)(this.completeLayers||this.elements[s])&&this.elements[s].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},Gs.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var s=this.createItem(this.layers[t],this,this.globalData);e[t]=s,s.initExpressions()}},Gs.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){this.pendingElements.pop().checkParenting()}},Gs.prototype.hide=function(){this.animationItem.container.style.display="none"},Gs.prototype.show=function(){this.animationItem.container.style.display="block"},Ks.prototype.duplicate=function(){var t=2*this._length,e=0;for(e=this._length;e=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},Us.prototype.destroy=function(){var t;for(t=this.layers.length-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},Us.prototype.createComp=function(t){return new Us(t,this.globalData,this)},r([Gs],Zs),Zs.prototype.createComp=function(t){return new Us(t,this.globalData,this)},qs=Zs,U["canvas"]=qs,qt.registerModifier("tm",Wt),qt.registerModifier("pb",jt),qt.registerModifier("rp",Jt),qt.registerModifier("rd",Ht),qt.registerModifier("zz",le),qt.registerModifier("op",_e),Lt}));