"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,i=-999999,s=function(){return t};function a(t){return document.createElement(t)}function r(t,e){var i,s,a=t.length;for(i=0;i1?i[1]=1:i[1]<=0&&(i[1]=0),L(i[0],i[1],i[2])}function z(t,e){var i=V(255*t[0],255*t[1],255*t[2]);return i[2]+=e,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),L(i[0],i[1],i[2])}function O(t,e){var i=V(255*t[0],255*t[1],255*t[2]);return i[0]+=e/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),L(i[0],i[1],i[2])}!function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1===e.length?"0"+e:e}();var N=function(){return d},B=function(){return m},q=function(t){k=t},j=function(){return k};function W(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function X(t){return X="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},X(t)}var H=function(){var t,i,s=1,a=[],r={onmessage:function(){},postMessage:function(e){t({data:e})}},n={postMessage:function(t){r.onmessage({data:t})}};function o(i){if(window.Worker&&window.Blob&&e){var s=new Blob(["var _workerSelf = self; self.onmessage = ",i.toString()],{type:"text/javascript"}),a=URL.createObjectURL(s);return new Worker(a)}return t=i,r}function h(){i||(i=o((function(t){if(n.dataManager||(n.dataManager=function(){function t(a,r){var n,o,h,l,p,d,m=a.length;for(o=0;o=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)s(t[e].ks.k);else for(r=t[e].ks.k.length,a=0;ai[0]||!(i[0]>t[0])&&(t[1]>i[1]||!(i[1]>t[1])&&(t[2]>i[2]||!(i[2]>t[2])&&null))}var r,n=function(){var t=[4,4,14];function e(t){var e,i,s,a=t.length;for(e=0;e=0;i-=1)if("sh"===t[i].ty)if(t[i].ks.k.i)t[i].ks.k.c=t[i].closed;else for(a=t[i].ks.k.length,s=0;s500)&&(this._imageLoaded(),clearInterval(i)),e+=1}.bind(this),50)}function n(t){var e={assetData:t},i=s(t,this.assetsPath,this.path);return H.loadData(i,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=i.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 i;this.imagesLoadedCb=e;var s=t.length;for(i=0;ithis.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,i,s=this.animationData.layers,a=s.length,r=t.layers,n=r.length;for(i=0;ithis.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,i=0;i=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(i=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(i=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),i&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},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 i=-1;this.isPaused&&(this.currentRawFrame+this.firstFramee&&(i=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==i&&this.goToAndStop(i,!0)},Q.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===Z(t[0])){var i,s=t.length;for(i=0;i=0;i-=1)e[i].animation.destroy(t)},t.freeze=function(){o=!0},t.unfreeze=function(){o=!1,u()},t.setVolume=function(t,i){var a;for(a=0;a=.001?function(t,e,i,s){for(var a=0;a<4;++a){var r=h(e,i,s);if(0===r)return e;e-=(o(e,i,s)-t)/r}return e}(t,l,e,s):0===p?l:function(t,e,i,s,a){var r,n,h=0;do{(r=o(n=e+(i-e)/2,s,a)-t)>0?i=n:e=n}while(Math.abs(r)>1e-7&&++h<10);return n}(t,r,r+i,e,s)}},t}(),et={double:function(t){return t.concat(l(t.length))}},it=function(t,e,i){var s=0,a=t,r=l(a);return{newElement:function(){return s?r[s-=1]:e()},release:function(t){s===a&&(r=et.double(r),a*=2),i&&i(t),r[s]=t,s+=1}}},st=it(8,(function(){return{addedLength:0,percents:h("float32",j()),lengths:h("float32",j())}})),at=it(8,(function(){return{lengths:[],totalLength:0}}),(function(t){var e,i=t.lengths.length;for(e=0;e-.001&&n<.001}var i=function(t,e,i,s){var a,r,n,o,h,l,p=j(),f=0,d=[],m=[],c=st.newElement();for(n=i.length,a=0;an?-1:1,l=!0;l;)if(s[r]<=n&&s[r+1]>n?(o=(n-s[r])/(s[r+1]-s[r]),l=!1):r+=h,r<0||r>=a-1){if(r===a-1)return i[r];l=!1}return i[r]+(i[r+1]-i[r])*o}var p=h("float32",8);return{getSegmentsLength:function(t){var e,s=at.newElement(),a=t.c,r=t.v,n=t.o,o=t.i,h=t._length,l=s.lengths,p=0;for(e=0;e1&&(r=1);var l,f=o(r,h),d=o(n=n>1?1:n,h),m=e.length,c=1-f,u=1-d,g=c*c*c,y=f*c*c*3,v=f*f*c*3,b=f*f*f,_=c*c*u,k=f*c*u+c*f*u+c*c*d,P=f*f*u+c*f*d+f*c*d,A=f*f*d,S=c*u*u,x=f*u*u+c*d*u+c*u*d,w=f*d*u+c*d*d+f*u*d,D=f*d*d,C=u*u*u,M=d*u*u+u*d*u+u*u*d,T=d*d*u+u*d*d+d*u*d,F=d*d*d;for(l=0;lm?d>c?d-m-c:c-m-d:c>m?c-m-d:m-d-c)>-1e-4&&f<1e-4}}}(),nt=i,ot=Math.abs;function ht(t,e){var i,s=this.offsetTime;"multidimensional"===this.propType&&(i=h("float32",this.pv.length));for(var a,r,n,o,l,p,f,d,m,c=e.lastIndex,u=c,g=this.keyframes.length-1,y=!0;y;){if(a=this.keyframes[u],r=this.keyframes[u+1],u===g-1&&t>=r.t-s){a.h&&(a=r),c=0;break}if(r.t-s>t){c=u;break}u=M||t=M?F.points.length-1:0;for(l=F.points[E].point.length,o=0;o=V&&L=M)i[0]=v[0],i[1]=v[1],i[2]=v[2];else if(t<=T)i[0]=a.s[0],i[1]=a.s[1],i[2]=a.s[2];else{var q=lt(a.s),j=lt(v);b=i,_=function(t,e,i){var s,a,r,n,o,h=[],l=t[0],p=t[1],f=t[2],d=t[3],m=e[0],c=e[1],u=e[2],g=e[3];return(a=l*m+p*c+f*u+d*g)<0&&(a=-a,m=-m,c=-c,u=-u,g=-g),1-a>1e-6?(s=Math.acos(a),r=Math.sin(s),n=Math.sin((1-i)*s)/r,o=Math.sin(i*s)/r):(n=1-i,o=i),h[0]=n*l+o*m,h[1]=n*p+o*c,h[2]=n*f+o*u,h[3]=n*d+o*g,h}(q,j,(t-T)/(M-T)),k=_[0],A=_[1],S=_[2],x=_[3],w=Math.atan2(2*A*x-2*k*S,1-2*A*A-2*S*S),D=Math.asin(2*k*A+2*S*x),C=Math.atan2(2*k*x-2*A*S,1-2*k*k-2*S*S),b[0]=w/P,b[1]=D/P,b[2]=C/P}else for(u=0;u=M?p=1:t=i&&t>=i||this._caching.lastFrame=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var s=this.interpolateValue(t,this._caching);this.pv=s}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 i=0,s=this.v.length;i1e-5&&(this.v[i]=e,this._mdf=!0),i+=1}function dt(){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,i=this.kf?this.pv:this.data.k;for(t=0;t=this._maxLength&&this.doubleArrayLength(),i){case"v":r=this.v;break;case"i":r=this.i;break;case"o":r=this.o;break;default:r=[]}(!r[s]||r[s]&&!a)&&(r[s]=_t.newElement()),r[s][0]=t,r[s][1]=e},kt.prototype.setTripleAt=function(t,e,i,s,a,r,n,o){this.setXYAt(t,e,"v",n,o),this.setXYAt(i,s,"o",n,o),this.setXYAt(a,r,"i",n,o)},kt.prototype.reverse=function(){var t=new kt;t.setPathData(this.c,this._length);var e=this.v,i=this.o,s=this.i,a=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],s[0][0],s[0][1],i[0][0],i[0][1],0,!1),a=1);var r,n=this._length-1,o=this._length;for(r=a;r=m[m.length-1].t-this.offsetTime)s=m[m.length-1].s?m[m.length-1].s[0]:m[m.length-2].e[0],r=!0;else{for(var c,u,g,y=d,v=m.length-1,b=!0;b&&(c=m[y],!((u=m[y+1]).t-this.offsetTime>t));)y=u.t-this.offsetTime)p=1;else if(ts&&e>s)||(this._caching.lastIndex=a0||t>-1e-6&&t<0?s(1e4*t)/1e4:t}function L(){var t=this.props;return"matrix("+I(t[0])+","+I(t[1])+","+I(t[4])+","+I(t[5])+","+I(t[12])+","+I(t[13])+")"}return function(){this.reset=a,this.rotate=r,this.rotateX=n,this.rotateY=o,this.rotateZ=l,this.skew=f,this.skewFromAxis=d,this.shear=p,this.scale=m,this.setTransform=c,this.translate=u,this.transform=g,this.multiply=y,this.applyToPoint=P,this.applyToX=A,this.applyToY=S,this.applyToZ=x,this.applyToPointArray=T,this.applyToTriplePoints=M,this.applyToPointStringified=F,this.toCSS=E,this.to2dCSS=L,this.clone=_,this.cloneFromProps=k,this.equals=b,this.inversePoints=C,this.inversePoint=D,this.getInverseMatrix=w,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 It={};function Lt(){$.searchAnimations()}It.play=$.play,It.pause=$.pause,It.setLocationHref=function(e){t=e},It.togglePause=$.togglePause,It.setSpeed=$.setSpeed,It.setDirection=$.setDirection,It.stop=$.stop,It.searchAnimations=Lt,It.registerAnimation=$.registerAnimation,It.loadAnimation=function(t){return $.loadAnimation(t)},It.setSubframeRendering=function(t){!function(t){f=!!t}(t)},It.resize=$.resize,It.goToAndStop=$.goToAndStop,It.destroy=$.destroy,It.setQuality=function(t){if("string"==typeof t)switch(t){case"high":q(200);break;default:case"medium":q(50);break;case"low":q(10)}else!isNaN(t)&&t>1&&q(t);j()>=50?S(!1):S(!0)},It.inBrowser=function(){return"undefined"!=typeof navigator},It.installPlugin=function(t,e){"expressions"===t&&(d=e)},It.freeze=$.freeze,It.unfreeze=$.unfreeze,It.setVolume=$.setVolume,It.mute=$.mute,It.unmute=$.unmute,It.getRegisteredAnimations=$.getRegisteredAnimations,It.useWebWorker=function(t){e=!!t},It.setIDPrefix=function(t){c=t},It.__getFactory=function(t){switch(t){case"propertyFactory":return vt;case"shapePropertyFactory":return Tt;case"matrix":return Ft;default:return null}},It.version="5.12.2";var Vt="",Rt=document.getElementsByTagName("script"),zt=Rt[Rt.length-1]||{src:""};Vt=zt.src?zt.src.replace(/^[^\?]+\??/,""):"",function(t){for(var e=Vt.split("&"),i=0;i=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;ns+i))p=o.s*a<=s?0:(o.s*a-s)/i,f=o.e*a>=s+i?1:(o.e*a-s)/i,h.push([p,f])}return h.length||h.push([0,0]),h},qt.prototype.releasePathsData=function(t){var e,i=t.length;for(e=0;e1?1+r:this.s.v<0?0+r:this.s.v+r)>(i=this.e.v>1?1+r:this.e.v<0?0+r:this.e.v+r)){var n=e;e=i,i=n}e=1e-4*Math.round(1e4*e),i=1e-4*Math.round(1e4*i),this.sValue=e,this.eValue=i}else e=this.sValue,i=this.eValue;var o,h,l,p,f,d=this.shapes.length,m=0;if(i===e)for(a=0;a=0;a-=1)if((c=this.shapes[a]).shape._mdf){for((u=c.localShapeCollection).releaseShapes(),2===this.m&&d>1?(y=this.calculateShapeEdges(e,i,c.totalShapeLength,_,m),_+=c.totalShapeLength):y=[[v,b]],h=y.length,o=0;o=1?g.push({s:c.totalShapeLength*(v-1),e:c.totalShapeLength*(b-1)}):(g.push({s:c.totalShapeLength*v,e:c.totalShapeLength}),g.push({s:0,e:c.totalShapeLength*(b-1)}));var k=this.addShapes(c,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(c.shape.paths.shapes[c.shape.paths._length-1].c){var P=k.pop();this.addPaths(k,u),k=this.addShapes(c,g[1],P)}else this.addPaths(k,u),k=this.addShapes(c,g[1]);this.addPaths(k,u)}}c.shape.paths=u}}},qt.prototype.addPaths=function(t,e){var i,s=t.length;for(i=0;ie.e){i.c=!1;break}e.s<=c&&e.e>=c+n.addedLength?(this.addSegment(d[s].v[a-1],d[s].o[a-1],d[s].i[a],d[s].v[a],i,o,g),g=!1):(l=rt.getNewSegment(d[s].v[a-1],d[s].v[a],d[s].o[a-1],d[s].i[a],(e.s-c)/n.addedLength,(e.e-c)/n.addedLength,h[a-1]),this.addSegmentFromArray(l,i,o,g),g=!1,i.c=!1),c+=n.addedLength,o+=1}if(d[s].c&&h.length){if(n=h[a-1],c<=e.e){var y=h[a-1].addedLength;e.s<=c&&e.e>=c+y?(this.addSegment(d[s].v[a-1],d[s].o[a-1],d[s].i[0],d[s].v[0],i,o,g),g=!1):(l=rt.getNewSegment(d[s].v[a-1],d[s].v[0],d[s].o[a-1],d[s].i[0],(e.s-c)/y,(e.e-c)/y,h[a-1]),this.addSegmentFromArray(l,i,o,g),g=!1,i.c=!1)}else i.c=!1;c+=n.addedLength,o+=1}if(i._length&&(i.setXYAt(i.v[p][0],i.v[p][1],"i",p),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),c>e.e)break;s=this.p.keyframes[this.p.keyframes.length-1].t?(s=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/i,0),a=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/i,0)):(s=this.p.pv,a=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/i,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){s=[],a=[];var r=this.px,n=this.py;r._caching.lastFrame+r.offsetTime<=r.keyframes[0].t?(s[0]=r.getValueAtTime((r.keyframes[0].t+.01)/i,0),s[1]=n.getValueAtTime((n.keyframes[0].t+.01)/i,0),a[0]=r.getValueAtTime(r.keyframes[0].t/i,0),a[1]=n.getValueAtTime(n.keyframes[0].t/i,0)):r._caching.lastFrame+r.offsetTime>=r.keyframes[r.keyframes.length-1].t?(s[0]=r.getValueAtTime(r.keyframes[r.keyframes.length-1].t/i,0),s[1]=n.getValueAtTime(n.keyframes[n.keyframes.length-1].t/i,0),a[0]=r.getValueAtTime((r.keyframes[r.keyframes.length-1].t-.01)/i,0),a[1]=n.getValueAtTime((n.keyframes[n.keyframes.length-1].t-.01)/i,0)):(s=[r.pv,n.pv],a[0]=r.getValueAtTime((r._caching.lastFrame+r.offsetTime-.01)/i,r.offsetTime),a[1]=n.getValueAtTime((n._caching.lastFrame+n.offsetTime-.01)/i,n.offsetTime))}else s=a=t;this.v.rotate(-Math.atan2(s[1]-a[1],s[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,i,s){return new e(t,i,s)}}}();function Xt(){}function Ht(){}function Yt(t,e){return 1e5*Math.abs(t-e)<=Math.min(Math.abs(t),Math.abs(e))}function Gt(t){return Math.abs(t)<=1e-5}function Kt(t,e,i){return t*(1-i)+e*i}function Jt(t,e,i){return[Kt(t[0],e[0],i),Kt(t[1],e[1],i)]}function Ut(t,e,i,s){return[3*e-t-3*i+s,3*t-6*e+3*i,-3*t+3*e,t]}function Zt(t){return new Qt(t,t,t,t,!1)}function Qt(t,e,i,s,a){a&&oe(t,e)&&(e=Jt(t,s,1/3)),a&&oe(i,s)&&(i=Jt(t,s,2/3));var r=Ut(t[0],e[0],i[0],s[0]),n=Ut(t[1],e[1],i[1],s[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,i,s]}function $t(t,e){var i=t.points[0][e],s=t.points[t.points.length-1][e];if(i>s){var a=s;s=i,i=a}for(var r=function(t,e,i){if(0===t)return[];var s=e*e-4*t*i;if(s<0)return[];var a=-e/(2*t);if(0===s)return[a];var r=Math.sqrt(s)/(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];os&&(s=o)}return{min:i,max:s}}function te(t,e,i){var s=t.boundingBox();return{cx:s.cx,cy:s.cy,width:s.width,height:s.height,bez:t,t:(e+i)/2,t1:e,t2:i}}function ee(t){var e=t.bez.split(.5);return[te(e[0],t.t1,t.t),te(e[1],t.t,t.t2)]}function ie(t,e,i,s,a,r){var n,o;if(n=t,o=e,2*Math.abs(n.cx-o.cx)=r||t.width<=s&&t.height<=s&&e.width<=s&&e.height<=s)a.push([t.t,e.t]);else{var h=ee(t),l=ee(e);ie(h[0],l[0],i+1,s,a,r),ie(h[0],l[1],i+1,s,a,r),ie(h[1],l[0],i+1,s,a,r),ie(h[1],l[1],i+1,s,a,r)}}function se(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 ae(t,e,i,s){var a=[t[0],t[1],1],r=[e[0],e[1],1],n=[i[0],i[1],1],o=[s[0],s[1],1],h=se(se(a,r),se(n,o));return Gt(h[2])?null:[h[0]/h[2],h[1]/h[2]]}function re(t,e,i){return[t[0]+Math.cos(e)*i,t[1]-Math.sin(e)*i]}function ne(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function oe(t,e){return Yt(t[0],e[0])&&Yt(t[1],e[1])}function he(){}function le(t,e,i,s,a,r,n){var o=i-Math.PI/2,h=i+Math.PI/2,l=e[0]+Math.cos(i)*s*a,p=e[1]-Math.sin(i)*s*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 pe(t,e){var i,s,a,r,n=0===e?t.length()-1:e-1,o=(e+1)%t.length(),h=t.v[n],l=t.v[o],p=(i=h,a=[(s=l)[0]-i[0],s[1]-i[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 fe(t,e,i,s,a,r,n){var o=pe(e,i),h=e.v[i%e._length],l=e.v[0===i?e._length-1:i-1],p=e.v[(i+1)%e._length],f=2===r?Math.sqrt(Math.pow(h[0]-l[0],2)+Math.pow(h[1]-l[1],2)):0,d=2===r?Math.sqrt(Math.pow(h[0]-p[0],2)+Math.pow(h[1]-p[1],2)):0;le(t,e.v[i%e._length],o,n,s,d/(2*(a+1)),f/(2*(a+1)))}function de(t,e,i,s,a,r){for(var n=0;n1&&e.length>1&&(a=ge(t[0],e[e.length-1]))?[[t[0].split(a[0])[0]],[e[e.length-1].split(a[1])[1]]]:[i,s]}function ve(t,e){var i,s,a,r,n=t.inflectionPoints();if(0===n.length)return[ce(t,e)];if(1===n.length||Yt(n[1],1))return i=(a=t.split(n[0]))[0],s=a[1],[ce(i,e),ce(s,e)];i=(a=t.split(n[0]))[0];var o=(n[1]-n[0])/(1-n[0]);return r=(a=a[1].split(o))[0],s=a[1],[ce(i,e),ce(r,e),ce(s,e)]}function be(){}function _e(t){for(var e=t.fStyle?t.fStyle.split(" "):[],i="normal",s="normal",a=e.length,r=0;r0;)i-=1,this._elements.unshift(e[i]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},Xt.prototype.resetElements=function(t){var e,i=t.length;for(e=0;e0?Math.floor(d):Math.ceil(d),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(d>0){for(;_c;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),_-=1;m&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-m,!0),_-=m)}for(s=1===this.data.m?0:this._currentCopies-1,a=1===this.data.m?1:-1,r=this._currentCopies;r;){if(b=(i=(e=this.elemsData[s].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)*(s/(this._currentCopies-1)),0!==_){for((0!==s&&1===a||s!==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&&s<1?[e]:[]:[e-s,e+s].filter((function(t){return t>0&&t<1}))},Qt.prototype.split=function(t){if(t<=0)return[Zt(this.points[0]),this];if(t>=1)return[this,Zt(this.points[this.points.length-1])];var e=Jt(this.points[0],this.points[1],t),i=Jt(this.points[1],this.points[2],t),s=Jt(this.points[2],this.points[3],t),a=Jt(e,i,t),r=Jt(i,s,t),n=Jt(a,r,t);return[new Qt(this.points[0],e,a,n,!0),new Qt(n,r,s,this.points[3],!0)]},Qt.prototype.bounds=function(){return{x:$t(this,0),y:$t(this,1)}},Qt.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}},Qt.prototype.intersections=function(t,e,i){void 0===e&&(e=2),void 0===i&&(i=7);var s=[];return ie(te(this,0,1),te(t,0,1),0,e,s,i),s},Qt.shapeSegment=function(t,e){var i=(e+1)%t.length();return new Qt(t.v[e],t.o[e],t.i[i],t.v[i],!0)},Qt.shapeSegmentInverted=function(t,e){var i=(e+1)%t.length();return new Qt(t.v[i],t.i[i],t.o[e],t.v[e],!0)},r([Bt],he),he.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},he.prototype.processPath=function(t,e,i,s){var a=t._length,r=At.newElement();if(r.c=t.c,t.c||(a-=1),0===a)return r;var n=-1,o=Qt.shapeSegment(t,0);fe(r,t,0,e,i,s,n);for(var h=0;h=0;r-=1)o=Qt.shapeSegmentInverted(t,r),l.push(ve(o,e));l=function(t){for(var e,i=1;i1&&(e=ye(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&&i<=56319){var s=t.charCodeAt(1);s>=56320&&s<=57343&&(e=1024*(i-55296)+s-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 i=t.toString(16)+e.toString(16);return-1!==s.indexOf(i)},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 s=o(t.substr(e,2));if(s!==i)return!1;var a=0;for(e+=2;a<5;){if((s=o(t.substr(e,2)))<917601||s>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=i;var p={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var i,s,a=t.length,r=this.chars.length;for(e=0;e0&&(f=!1),f){var d=a("style");d.setAttribute("f-forigin",s[i].fOrigin),d.setAttribute("f-origin",s[i].origin),d.setAttribute("f-family",s[i].fFamily),d.type="text/css",d.innerText="@font-face {font-family: "+s[i].fFamily+"; font-style: normal; src: url('"+s[i].fPath+"');}",e.appendChild(d)}}else if("g"===s[i].fOrigin||1===s[i].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))},Ne.prototype.show=function(){},Ne.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},Ne.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},Ne.prototype.resume=function(){this._canPlay=!0},Ne.prototype.setRate=function(t){this.audio.rate(t)},Ne.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},Ne.prototype.getBaseElement=function(){return null},Ne.prototype.destroy=function(){},Ne.prototype.sourceRectAtTime=function(){},Ne.prototype.initExpressions=function(){},Be.prototype.checkLayers=function(t){var e,i,s=this.layers.length;for(this.completeLayers=!0,e=s-1;e>=0;e-=1)this.elements[e]||(i=this.layers[e]).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;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 Ne(t,this.globalData,this)},Be.prototype.createFootage=function(t){return new Oe(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("+s()+"#"+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?Wt.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,i=0,s=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;i1&&(r+=" 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]),i.lastPath!==r){var n="";i.elem&&(e.c&&(n=t.inv?this.solidPath+r:r),i.elem.setAttribute("d",n)),i.lastPath=r}},We.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var Xe=function(){var t={};return t.createFilter=function(t,e){var i=W("filter");i.setAttribute("id",t),!0!==e&&(i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%"));return i},t.createAlphaToLuminanceFilter=function(){var t=W("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}(),Ye={},Ge="filter_result_";function Ke(t){var e,i,a="SourceGraphic",r=t.data.ef?t.data.ef.length:0,n=I(),o=Xe.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,i=0,s=e.length;i.01)return!1;i+=1}return!0},li.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=s.transformers[c].mProps._mdf||h,m-=1,c-=1;if(h)for(m=g-s.styles[p].lvl,c=s.transformers.length-1;m>0;)d.multiply(s.transformers[c].mProps.v),m-=1,c-=1}else d=t;if(n=(f=s.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],k=Math.sin(y+e.a.v)*b+p[1];h.setAttribute("fx",_),h.setAttribute("fy",k),l&&!e.g._collapsable&&(e.of.setAttribute("fx",_),e.of.setAttribute("fy",k))}}function h(t,e,i){var s=e.style,a=e.d;a&&(a._mdf||i)&&a.dashStr&&(s.pElem.setAttribute("stroke-dasharray",a.dashStr),s.pElem.setAttribute("stroke-dashoffset",a.dashoffset[0])),e.c&&(e.c._mdf||i)&&s.pElem.setAttribute("stroke","rgb("+v(e.c.v[0])+","+v(e.c.v[1])+","+v(e.c.v[2])+")"),(e.o._mdf||i)&&s.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||i)&&(s.pElem.setAttribute("stroke-width",e.w.v),s.msElem&&s.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 i;case"no":return s;default:return null}}}}();function gi(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,i),this.prevViewData=[]}function yi(t,e,i,s,a,r){this.o=t,this.sw=e,this.sc=i,this.fc=s,this.m=a,this.p=r,this._mdf={o:!0,sw:!!e,sc:!!i,fc:!!s,m:!0,p:!0}}function vi(t,e){this._frameId=i,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([Re,je,Je,ti,Ue,ze,Ze],gi),gi.prototype.initSecondaryElement=function(){},gi.prototype.identityMatrix=new Ft,gi.prototype.buildExpressionInterface=function(){},gi.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},gi.prototype.filterUniqueShapes=function(){var t,e,i,s,a=this.shapes.length,r=this.stylesList.length,n=[],o=!1;for(i=0;i1&&o&&this.setShapesAsAnimated(n)}},gi.prototype.setShapesAsAnimated=function(t){var e,i=t.length;for(e=0;e=0;o-=1){if((d=this.searchProcessedElement(t[o]))?e[o]=i[d-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)d?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],a),t[o]._render&&e[o].style.pElem.parentNode!==s&&s.appendChild(e[o].style.pElem),u.push(e[o].style);else if("gr"===t[o].ty){if(d)for(l=e[o].it.length,h=0;h1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},vi.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},vi.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,i=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var s;this.lock=!0,this._mdf=!1;var a=this.effectsSequence.length,r=t||this.data.d.k[this.keysIndex].s;for(s=0;se);)i+=1;return this.keysIndex!==i&&(this.keysIndex=i),this.data.d.k[this.keysIndex].s},vi.prototype.buildFinalText=function(t){for(var e,i,s=[],a=0,r=t.length,n=!1,o=!1,h="";a=55296&&e<=56319?ke.isRegionalFlag(t,a)?h=t.substr(a,14):(i=t.charCodeAt(a+1))>=56320&&i<=57343&&(ke.isModifier(e,i)?(h=t.substr(a,2),n=!0):h=ke.isFlagEmoji(t.substr(a,4))?t.substr(a,4):t.substr(a,2)):e>56319?(i=t.charCodeAt(a+1),ke.isVariationSelector(e)&&(n=!0)):ke.isZeroWidthJoiner(e)&&(n=!0,o=!0),n?(s[s.length-1]+=h,n=!1):s.push(h),a+=h.length;return s},vi.prototype.completeTextData=function(t){t.__complete=!0;var e,i,s,a,r,n,o,h=this.elem.globalData.fontManager,l=this.data,p=[],f=0,d=l.m.g,m=0,c=0,u=0,g=[],y=0,v=0,b=h.getFontByName(t.f),_=0,k=_e(b);t.fWeight=k.weight,t.fStyle=k.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),i=t.finalText.length,t.finalLineHeight=t.lh;var P,A=t.tr/1e3*t.finalSize;if(t.sz)for(var S,x,w=!0,D=t.sz[0],C=t.sz[1];w;){S=0,y=0,i=(x=this.buildFinalText(t.t)).length,A=t.tr/1e3*t.finalSize;var M=-1;for(e=0;eD&&" "!==x[e]?(-1===M?i+=1:e=M,S+=t.finalLineHeight||1.2*t.finalSize,x.splice(e,M===e?1:0,"\r"),M=-1,y=0):(y+=_,y+=A);S+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&Cv?y:v,y=-2*A,a="",s=!0,u+=1):a=T,h.chars?(o=h.getCharData(T,b.fStyle,h.getFontByName(t.f).fFamily),_=s?0:o.w*t.finalSize/100):_=h.measureText(a,t.f,t.finalSize)," "===T?F+=_+A:(y+=_+A+F,F=0),p.push({l:_,an:_,add:m,n:s,anIndexes:[],val:a,line:u,animatorJustifyOffset:0}),2==d){if(m+=_,""===a||" "===a||e===i-1){for(""!==a&&" "!==a||(m-=_);c<=e;)p[c].an=m,p[c].ind=f,p[c].extra=_,c+=1;f+=1,m=0}}else if(3==d){if(m+=_,""===a||e===i-1){for(""===a&&(m-=_);c<=e;)p[c].an=m,p[c].ind=f,p[c].extra=_,c+=1;m=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,I,L,V,R=l.a;n=R.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,d=this.data.sh;if(2===d)l=h(l=f===p?s>=f?1:0:t(0,e(.5/(f-p)+(s-p)/(f-p),1)));else if(3===d)l=h(l=f===p?s>=f?0:1:1-t(0,e(.5/(f-p)+(s-p)/(f-p),1)));else if(4===d)f===p?l=0:(l=t(0,e(.5/(f-p)+(s-p)/(f-p),1)))<.5?l*=2:l=1-2*(l-.5),l=h(l);else if(5===d){if(f===p)l=0;else{var m=f-p,c=-m/2+(s=e(t(0,s+.5-p),f-p)),u=m/2;l=Math.sqrt(1-c*c/(u*u))}l=h(l)}else 6===d?(f===p?l=0:(s=e(t(0,s+.5-p),f-p),l=(1+Math.cos(Math.PI+2*Math.PI*s/(f-p)))/2),l=h(l)):(s>=i(p)&&(l=t(0,e(s-p<0?e(f,1)-(p-s):f-s,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,i=this.o.v/e,s=this.s.v/e+i,a=this.e.v/e+i;if(s>a){var r=s;s=a,a=r}this.finalS=s,this.finalE=a}},r([bt],s),{getTextSelectorProp:function(t,e,i){return new s(t,e,i)}}}();function _i(t,e,i){var s={propType:!1},a=vt.getProp,r=e.a;this.a={r:r.r?a(t,r.r,0,P,i):s,rx:r.rx?a(t,r.rx,0,P,i):s,ry:r.ry?a(t,r.ry,0,P,i):s,sk:r.sk?a(t,r.sk,0,P,i):s,sa:r.sa?a(t,r.sa,0,P,i):s,s:r.s?a(t,r.s,1,.01,i):s,a:r.a?a(t,r.a,1,0,i):s,o:r.o?a(t,r.o,0,.01,i):s,p:r.p?a(t,r.p,1,0,i):s,sw:r.sw?a(t,r.sw,0,0,i):s,sc:r.sc?a(t,r.sc,1,0,i):s,fc:r.fc?a(t,r.fc,1,0,i):s,fh:r.fh?a(t,r.fh,0,0,i):s,fs:r.fs?a(t,r.fs,0,.01,i):s,fb:r.fb?a(t,r.fb,0,.01,i):s,t:r.t?a(t,r.t,0,0,i):s},this.s=bi.getTextSelectorProp(t,e.s,i),this.s.t=e.s.t}function ki(t,e,i){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=i,this._animatorsData=l(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(i)}function Pi(){}ki.prototype.searchProperties=function(){var t,e,i=this._textData.a.length,s=vt.getProp;for(t=0;t=o+ft||!c?(v=(o+ft-l)/h.partialLength,q=m.point[0]+(h.point[0]-m.point[0])*v,j=m.point[1]+(h.point[1]-m.point[1])*v,S.translate(-k[0]*D[a].an*.005,-k[1]*V*.01),p=!1):c&&(l+=h.partialLength,(f+=1)>=c.length&&(f=0,u[d+=1]?c=u[d].points:_.v.c?(f=0,c=u[d=0].points):(l-=h.partialLength,c=null)),c&&(m=h,g=(h=c[f]).partialLength));B=D[a].an/2-D[a].add,S.translate(-B,0,0)}else B=D[a].an/2-D[a].add,S.translate(-B,0,0),S.translate(-k[0]*D[a].an*.005,-k[1]*V*.01,0);for(F=0;Ft?this.textSpans[t].span:W(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=W("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&&(d=-u,m+=i.yOffset,m+=c?1:0,c=!1),this.applyTextPropertiesToMatrix(i,p,o[t].line,d,m),d+=o[t].l||0,d+=u),h){var b;if(1===(g=this.globalData.fontManager.getCharData(i.finalText[t],s.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily)).t)b=new Ti(g.data,this.globalData,this);else{var _=Si;g.data&&g.data.shapes&&(_=this.buildShapeData(g.data,i.finalSize)),b=new gi(_,this.globalData,this)}if(this.textSpans[t].glyph){var k=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(k.layerElement),k.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("+i.finalSize/100+","+i.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 P=this.textContainer,A="start";switch(i.j){case 1:A="end";break;case 2:A="middle";break;default:A="start"}P.setAttribute("text-anchor",A),P.setAttribute("letter-spacing",u);var S=this.buildTextContents(i.finalText);for(e=S.length,m=i.ps?i.ps[1]+i.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;i-=1)(this.completeLayers||this.elements[i])&&(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf&&(this._mdf=!0))}},Mi.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t