var Sr=Object.defineProperty,wr=Object.defineProperties,Ir=Object.getOwnPropertyDescriptors,Xi=Object.getOwnPropertySymbols,xr=Object.prototype.hasOwnProperty,Mr=Object.prototype.propertyIsEnumerable,yi=(t,e,i)=>e in t?Sr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,je=(t,e)=>{for(var i in e||(e={}))xr.call(e,i)&&yi(t,i,e[i]);if(Xi)for(var i of Xi(e))Mr.call(e,i)&&yi(t,i,e[i]);return t},Cr=(t,e)=>wr(t,Ir(e)),wt=(t,e,i)=>yi(t,typeof e!="symbol"?e+"":e,i);function Fr(t){return document.createElement(t)}function rt(t,e){var i,s=t.length,r;for(i=0;i{Ts=!!t},Nr=()=>Ts,xs=t=>{As=t},Ue=()=>As,qr=t=>{Ss=t},Br=()=>Ss,Be=t=>{Is=t},We=()=>Is,Gr=t=>{ws=t};function Ms(){}Ms.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var i=this._cbs[t],s=0;s{Cs=t},Tt=()=>Cs,ti=function(){var t=1,e=[],i,s,r={onmessage:function(){},postMessage:function(u){i({data:u})}},a={postMessage:function(u){r.onmessage({data:u})}};function n(u){return i=u,r}function f(){s||(s=n(function(u){function y(){function d(x,F){var D,M,_=x.length,A,C,z,ot;for(M=0;M<_;M+=1)if(D=x[M],"ks"in D&&!D.completed){if(D.completed=!0,D.hasMask){var tt=D.masksProperties;for(C=tt.length,A=0;A=0;F-=1)if(x[F].ty==="sh")if(x[F].ks.k.i)m(x[F].ks.k);else for(_=x[F].ks.k.length,M=0;M<_;M+=1)x[F].ks.k[M].s&&m(x[F].ks.k[M].s[0]),x[F].ks.k[M].e&&m(x[F].ks.k[M].e[0]);else x[F].ty==="gr"&&p(x[F].it)}function m(x){var F,D=x.i.length;for(F=0;FD[0]?!0:D[0]>x[0]?!1:x[1]>D[1]?!0:D[1]>x[1]?!1:x[2]>D[2]?!0:D[2]>x[2]?!1:null}var T=function(){var x=[4,4,14];function F(M){var _=M.t.d;M.t.d={k:[{s:_,t:0}]}}function D(M){var _,A=M.length;for(_=0;_=0;_-=1)if(M[_].ty==="sh")if(M[_].ks.k.i)M[_].ks.k.c=M[_].closed;else for(z=M[_].ks.k.length,C=0;C{Ie[t]=e};function Yr(t){return Ie[t]}function Xr(){if(Ie.canvas)return"canvas";for(const t in Ie)if(Ie[t])return t;return""}const K=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=vt(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=Nr(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=Hr(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new vi("drawnFrame",0,0,0),this.expressionsPlugin=Ue()};rt([Ms],K);K.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);const i=Yr(e);this.renderer=new i(this,t.rendererSettings),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,t.loop===""||t.loop===null||t.loop===void 0||t.loop===!0?this.loop=!0:t.loop===!1?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay="autoplay"in t?t.autoplay:!0,this.name=t.name?t.name:"",this.autoloadSegments=Object.prototype.hasOwnProperty.call(t,"autoloadSegments")?t.autoloadSegments:!0,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.animationData?this.setupAnimation(t.animationData):t.path&&(t.path.lastIndexOf("\\")!==-1?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),ti.loadAnimation(t.path,this.configAnimation,this.onSetupError))};K.prototype.onSetupError=function(){this.trigger("data_failed")};K.prototype.setupAnimation=function(t){ti.completeAnimation(t,this.configAnimation)};K.prototype.setData=function(t,e){e&&typeof e!="object"&&(e=JSON.parse(e));var i={wrapper:t,animationData:e},s=t.attributes;i.path=s.getNamedItem("data-animation-path")?s.getNamedItem("data-animation-path").value:s.getNamedItem("data-bm-path")?s.getNamedItem("data-bm-path").value:s.getNamedItem("bm-path")?s.getNamedItem("bm-path").value:"",i.animType=s.getNamedItem("data-anim-type")?s.getNamedItem("data-anim-type").value:s.getNamedItem("data-bm-type")?s.getNamedItem("data-bm-type").value:s.getNamedItem("bm-type")?s.getNamedItem("bm-type").value:s.getNamedItem("data-bm-renderer")?s.getNamedItem("data-bm-renderer").value:s.getNamedItem("bm-renderer")?s.getNamedItem("bm-renderer").value:Xr()||"canvas";var r=s.getNamedItem("data-anim-loop")?s.getNamedItem("data-anim-loop").value:s.getNamedItem("data-bm-loop")?s.getNamedItem("data-bm-loop").value:s.getNamedItem("bm-loop")?s.getNamedItem("bm-loop").value:"";r==="false"?i.loop=!1:r==="true"?i.loop=!0:r!==""&&(i.loop=parseInt(r,10));var a=s.getNamedItem("data-anim-autoplay")?s.getNamedItem("data-anim-autoplay").value:s.getNamedItem("data-bm-autoplay")?s.getNamedItem("data-bm-autoplay").value:s.getNamedItem("bm-autoplay")?s.getNamedItem("bm-autoplay").value:!0;i.autoplay=a!=="false",i.name=s.getNamedItem("data-name")?s.getNamedItem("data-name").value:s.getNamedItem("data-bm-name")?s.getNamedItem("data-bm-name").value:s.getNamedItem("bm-name")?s.getNamedItem("bm-name").value:"";var n=s.getNamedItem("data-anim-prerender")?s.getNamedItem("data-anim-prerender").value:s.getNamedItem("data-bm-prerender")?s.getNamedItem("data-bm-prerender").value:s.getNamedItem("bm-prerender")?s.getNamedItem("bm-prerender").value:"";n==="false"&&(i.prerender=!1),i.path?this.setParams(i):this.trigger("destroy")};K.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e=this.animationData.layers,i,s=e.length,r=t.layers,a,n=r.length;for(a=0;athis.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")};K.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)}};K.prototype.play=function(t){t&&this.name!==t||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this._idle&&(this._idle=!1,this.trigger("_active")))};K.prototype.pause=function(t){t&&this.name!==t||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"))};K.prototype.togglePause=function(t){t&&this.name!==t||(this.isPaused===!0?this.play():this.pause())};K.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))};K.prototype.getMarkerData=function(t){for(var e,i=0;i=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(i=!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):(i=!0,e=0)):this.setCurrentRawFrameValue(e),i&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}};K.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")};K.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,i!==-1&&this.goToAndStop(i,!0)};K.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),typeof t[0]=="object"){var i,s=t.length;for(i=0;i=0;x-=1)e[x].animation.destroy(O)}function S(O,x,F){var D=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),M,_=D.length;for(M=0;M<_;M+=1)F&&D[M].setAttribute("data-bm-type",F),o(D[M],O);if(x&&_===0){F||(F="svg");var A=document.getElementsByTagName("body")[0];A.innerText="";var C=Fr("div");C.style.width="100%",C.style.height="100%",C.setAttribute("data-bm-type",F),A.appendChild(C),o(C,O)}}function R(){var O;for(O=0;O0?m=S:p=S;while(Math.abs(w)>a&&++R=r?P(h,G,p,m):H===0?G:d(h,T,T+o,p,m)}},t}(),Fs=function(){function t(e){return e.concat(dt(e.length))}return{double:t}}(),ei=function(){return function(t,e,i){var s=0,r=t,a=dt(r),n={newElement:f,release:o};function f(){var c;return s?(s-=1,c=a[s]):c=e(),c}function o(c){s===r&&(a=Fs.double(a),r*=2),i&&i(c),a[s]=c,s+=1}return n}}(),Ds=function(){function t(){return{addedLength:0,percents:at("float32",We()),lengths:at("float32",We())}}return ei(8,t)}(),Ls=function(){function t(){return{lengths:[],totalLength:0}}function e(i){var s,r=i.lengths.length;for(s=0;s-.001&&h<.001}function i(u,y,g,d,P,l,h,p,m){if(g===0&&l===0&&m===0)return e(u,y,d,P,h,p);var b=t.sqrt(t.pow(d-u,2)+t.pow(P-y,2)+t.pow(l-g,2)),T=t.sqrt(t.pow(h-u,2)+t.pow(p-y,2)+t.pow(m-g,2)),w=t.sqrt(t.pow(h-d,2)+t.pow(p-P,2)+t.pow(m-l,2)),S;return b>T?b>w?S=b-T-w:S=w-T-b:w>T?S=w-T-b:S=T-b-w,S>-1e-4&&S<1e-4}var s=function(){return function(u,y,g,d){var P=We(),l,h,p,m,b,T=0,w,S=[],R=[],G=Ds.newElement();for(p=g.length,l=0;lh?-1:1,b=!0;b;)if(d[l]<=h&&d[l+1]>h?(p=(h-d[l])/(d[l+1]-d[l]),b=!1):l+=m,l<0||l>=P-1){if(l===P-1)return g[l];b=!1}return g[l]+(g[l+1]-g[l])*p}function c(u,y,g,d,P,l){var h=o(P,l),p=1-h,m=t.round((p*p*p*u[0]+(h*p*p+p*h*p+p*p*h)*g[0]+(h*h*p+p*h*h+h*p*h)*d[0]+h*h*h*y[0])*1e3)/1e3,b=t.round((p*p*p*u[1]+(h*p*p+p*h*p+p*p*h)*g[1]+(h*h*p+p*h*h+h*p*h)*d[1]+h*h*h*y[1])*1e3)/1e3;return[m,b]}var v=at("float32",8);function k(u,y,g,d,P,l,h){P<0?P=0:P>1&&(P=1);var p=o(P,h);l=l>1?1:l;var m=o(l,h),b,T=u.length,w=1-p,S=1-m,R=w*w*w,G=p*w*w*3,H=p*p*w*3,Z=p*p*p,O=w*w*S,x=p*w*S+w*p*S+w*w*m,F=p*p*S+w*p*m+p*w*m,D=p*p*m,M=w*S*S,_=p*S*S+w*m*S+w*S*m,A=p*m*S+w*m*m+p*S*m,C=p*m*m,z=S*S*S,ot=m*S*S+S*m*S+S*S*m,tt=m*m*S+S*m*m+m*S*m,ft=m*m*m;for(b=0;b=c.t-i){o.h&&(o=c),r=0;break}if(c.t-i>t){r=a;break}a=l||t=l?m.points.length-1:0;for(u=m.points[b].point.length,k=0;k=S&&T=l)s[0]=p[0],s[1]=p[1],s[2]=p[2];else if(t<=h)s[0]=o.s[0],s[1]=o.s[1],s[2]=o.s[2];else{var x=es(o.s),F=es(p),D=(t-h)/(l-h);Kr(s,Jr(x,F,D))}else for(a=0;a=l?y=1:t1e-6?(u=Math.acos(y),g=Math.sin(u),d=Math.sin((1-i)*u)/g,P=Math.sin(i*u)/g):(d=1-i,P=i),s[0]=d*r+P*o,s[1]=d*a+P*c,s[2]=d*n+P*v,s[3]=d*f+P*k,s}function Kr(t,e){var i=e[0],s=e[1],r=e[2],a=e[3],n=Math.atan2(2*s*a-2*i*r,1-2*s*s-2*r*r),f=Math.asin(2*i*s+2*r*a),o=Math.atan2(2*i*a-2*s*r,1-2*i*i-2*r*r);t[0]=n/pt,t[1]=f/pt,t[2]=o/pt}function es(t){var e=t[0]*pt,i=t[1]*pt,s=t[2]*pt,r=Math.cos(e/2),a=Math.cos(i/2),n=Math.cos(s/2),f=Math.sin(e/2),o=Math.sin(i/2),c=Math.sin(s/2),v=r*a*n-f*o*c,k=f*o*n+r*a*c,u=f*a*n+r*o*c,y=r*o*n-f*a*c;return[k,u,y,v]}function Vs(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==oe&&(this._caching.lastFrame>=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 ii(t){var e;if(this.propType==="unidimensional")e=t*this.mult,ts(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 si(){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,i=this.kf?this.pv:this.data.k;for(t=0;t=this._maxLength&&this.doubleArrayLength(),i){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[];break}(!a[s]||a[s]&&!r)&&(a[s]=he.newElement()),a[s][0]=t,a[s][1]=e};Bt.prototype.setTripleAt=function(t,e,i,s,r,a,n,f){this.setXYAt(t,e,"v",n,f),this.setXYAt(i,s,"o",n,f),this.setXYAt(r,a,"i",n,f)};Bt.prototype.reverse=function(){var t=new Bt;t.setPathData(this.c,this._length);var e=this.v,i=this.o,s=this.i,r=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),r=1);var a=this._length-1,n=this._length,f;for(f=r;f=x[x.length-1].t-this.offsetTime)b=x[x.length-1].s?x[x.length-1].s[0]:x[x.length-2].e[0],w=!0;else{for(var F=m,D=x.length-1,M=!0,_,A,C;M&&(_=x[F],A=x[F+1],!(A.t-this.offsetTime>l));)F=A.t-this.offsetTime)Z=1;else if(l<_.t-this.offsetTime)Z=0;else{var z;C.__fnct?z=C.__fnct:(z=ne.getBezierEasing(_.o.x,_.o.y,_.i.x,_.i.y).get,C.__fnct=z),Z=z((l-(_.t-this.offsetTime))/(A.t-this.offsetTime-(_.t-this.offsetTime)))}T=A.s?A.s[0]:_.e[0]}b=_.s[0]}for(G=h._length,H=b.i[0].length,p.lastIndex=m,S=0;Sp&&l>p)||(this._caching.lastIndex=m0||_>-1e-6&&_<0?s(_*A)/A:_}function M(){var _=this.props,A=D(_[0]),C=D(_[1]),z=D(_[4]),ot=D(_[5]),tt=D(_[12]),ft=D(_[13]);return"matrix("+A+","+C+","+z+","+ot+","+tt+","+ft+")"}return function(){this.reset=r,this.rotate=a,this.rotateX=n,this.rotateY=f,this.rotateZ=o,this.skew=v,this.skewFromAxis=k,this.shear=c,this.scale=u,this.setTransform=y,this.translate=g,this.transform=d,this.multiply=P,this.applyToPoint=b,this.applyToX=T,this.applyToY=w,this.applyToZ=S,this.applyToPointArray=O,this.applyToTriplePoints=Z,this.applyToPointStringified=x,this.toCSS=F,this.to2dCSS=M,this.clone=p,this.cloneFromProps=m,this.equals=h,this.inversePoints=H,this.inversePoint=G,this.getInverseMatrix=R,this._t=this.transform,this.isIdentity=l,this._identity=!0,this._identityCalculated=!1,this.props=at("float32",16),this.reset()}}(),lt={};function ia(t){jr(t)}function sa(){Pt.searchAnimations()}function ra(t){zr(t)}function aa(t){Gr(t)}function na(t){return Pt.loadAnimation(t)}function oa(t){if(typeof t=="string")switch(t){case"high":Be(200);break;default:case"medium":Be(50);break;case"low":Be(10);break}else!isNaN(t)&&t>1&&Be(t)}function ha(){return typeof navigator<"u"}function la(t,e){t==="expressions"&&xs(e)}function pa(t){switch(t){case"propertyFactory":return B;case"shapePropertyFactory":return Zt;case"matrix":return ct;default:return null}}lt.play=Pt.play;lt.pause=Pt.pause;lt.setLocationHref=ia;lt.togglePause=Pt.togglePause;lt.setSpeed=Pt.setSpeed;lt.setDirection=Pt.setDirection;lt.stop=Pt.stop;lt.searchAnimations=sa;lt.registerAnimation=Pt.registerAnimation;lt.loadAnimation=na;lt.setSubframeRendering=ra;lt.resize=Pt.resize;lt.goToAndStop=Pt.goToAndStop;lt.destroy=Pt.destroy;lt.setQuality=oa;lt.inBrowser=ha;lt.installPlugin=la;lt.freeze=Pt.freeze;lt.unfreeze=Pt.unfreeze;lt.getRegisteredAnimations=Pt.getRegisteredAnimations;lt.setIDPrefix=aa;lt.__getFactory=pa;lt.version="[[BM_VERSION]]";const Jt=function(){var t={},e={};t.registerModifier=i,t.getModifier=s;function i(r,a){e[r]||(e[r]=a)}function s(r,a,n){return new e[r](a,n)}return t}();function It(){}It.prototype.initModifierProperties=function(){};It.prototype.addShapeToModifier=function(){};It.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:ge.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}};It.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=Ye,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)};It.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())};rt([kt],It);function Ct(){}rt([It],Ct);Ct.prototype.initModifierProperties=function(t,e){this.s=B.getProp(t,e.s,0,.01,this),this.e=B.getProp(t,e.e,0,.01,this),this.o=B.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length};Ct.prototype.addShapeToModifier=function(t){t.pathsData=[]};Ct.prototype.calculateShapeEdges=function(t,e,i,s,r){var a=[];e<=1?a.push({s:t,e}):t>=1?a.push({s:t-1,e:e-1}):(a.push({s:t,e:1}),a.push({s:0,e:e-1}));var n=[],f,o=a.length,c;for(f=0;fs+i)){var v,k;c.s*r<=s?v=0:v=(c.s*r-s)/i,c.e*r>=s+i?k=1:k=(c.e*r-s)/i,n.push([v,k])}return n.length||n.push([0,0]),n};Ct.prototype.releasePathsData=function(t){var e,i=t.length;for(e=0;e1?e=1+s:this.s.v<0?e=0+s:e=this.s.v+s,this.e.v>1?i=1+s:this.e.v<0?i=0+s:i=this.e.v+s,e>i){var r=e;e=i,i=r}e=Math.round(e*1e4)*1e-4,i=Math.round(i*1e4)*1e-4,this.sValue=e,this.eValue=i}else e=this.sValue,i=this.eValue;var a,n,f=this.shapes.length,o,c,v,k,u,y=0;if(i===e)for(n=0;n=0;n-=1)if(d=this.shapes[n],d.shape._mdf){for(P=d.localShapeCollection,P.releaseShapes(),this.m===2&&f>1?(m=this.calculateShapeEdges(e,i,d.totalShapeLength,p,y),p+=d.totalShapeLength):m=[[l,h]],c=m.length,o=0;o=1?g.push({s:d.totalShapeLength*(l-1),e:d.totalShapeLength*(h-1)}):(g.push({s:d.totalShapeLength*l,e:d.totalShapeLength}),g.push({s:0,e:d.totalShapeLength*(h-1)}));var b=this.addShapes(d,g[0]);if(g[0].s!==g[0].e){if(g.length>1){var T=d.shape.paths.shapes[d.shape.paths._length-1];if(T.c){var w=b.pop();this.addPaths(b,P),b=this.addShapes(d,g[1],w)}else this.addPaths(b,P),b=this.addShapes(d,g[1])}this.addPaths(b,P)}}d.shape.paths=P}}};Ct.prototype.addPaths=function(t,e){var i,s=t.length;for(i=0;ie.e){i.c=!1;break}else e.s<=c&&e.e>=c+v.addedLength?(this.addSegment(r[a].v[f-1],r[a].o[f-1],r[a].i[f],r[a].v[f],i,k,P),P=!1):(y=Vt.getNewSegment(r[a].v[f-1],r[a].v[f],r[a].o[f-1],r[a].i[f],(e.s-c)/v.addedLength,(e.e-c)/v.addedLength,u[f-1]),this.addSegmentFromArray(y,i,k,P),P=!1,i.c=!1),c+=v.addedLength,k+=1;if(r[a].c&&u.length){if(v=u[f-1],c<=e.e){var l=u[f-1].addedLength;e.s<=c&&e.e>=c+l?(this.addSegment(r[a].v[f-1],r[a].o[f-1],r[a].i[0],r[a].v[0],i,k,P),P=!1):(y=Vt.getNewSegment(r[a].v[f-1],r[a].v[0],r[a].o[f-1],r[a].i[0],(e.s-c)/l,(e.e-c)/l,u[f-1]),this.addSegmentFromArray(y,i,k,P),P=!1,i.c=!1)}else i.c=!1;c+=v.addedLength,k+=1}if(i._length&&(i.setXYAt(i.v[d][0],i.v[d][1],"i",d),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),c>e.e)break;a=this.p.keyframes[this.p.keyframes.length-1].t?(v=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/c,0),k=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/c,0)):(v=this.p.pv,k=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/c,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){v=[],k=[];var u=this.px,y=this.py;u._caching.lastFrame+u.offsetTime<=u.keyframes[0].t?(v[0]=u.getValueAtTime((u.keyframes[0].t+.01)/c,0),v[1]=y.getValueAtTime((y.keyframes[0].t+.01)/c,0),k[0]=u.getValueAtTime(u.keyframes[0].t/c,0),k[1]=y.getValueAtTime(y.keyframes[0].t/c,0)):u._caching.lastFrame+u.offsetTime>=u.keyframes[u.keyframes.length-1].t?(v[0]=u.getValueAtTime(u.keyframes[u.keyframes.length-1].t/c,0),v[1]=y.getValueAtTime(y.keyframes[y.keyframes.length-1].t/c,0),k[0]=u.getValueAtTime((u.keyframes[u.keyframes.length-1].t-.01)/c,0),k[1]=y.getValueAtTime((y.keyframes[y.keyframes.length-1].t-.01)/c,0)):(v=[u.pv,y.pv],k[0]=u.getValueAtTime((u._caching.lastFrame+u.offsetTime-.01)/c,u.offsetTime),k[1]=y.getValueAtTime((y._caching.lastFrame+y.offsetTime-.01)/c,y.offsetTime))}else k=t,v=k;this.v.rotate(-Math.atan2(v[1]-k[1],v[0]-k[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 s(){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 r(){}function a(o){this._addDynamicProperty(o),this.elem.addDynamicProperty(o),this._isDirty=!0}function n(o,c,v){if(this.elem=o,this.frameId=-1,this.propType="transform",this.data=c,this.v=new ct,this.pre=new ct,this.appliedTransformations=0,this.initDynamicPropertyContainer(v||o),c.p&&c.p.s?(this.px=B.getProp(o,c.p.x,0,0,this),this.py=B.getProp(o,c.p.y,0,0,this),c.p.z&&(this.pz=B.getProp(o,c.p.z,0,0,this))):this.p=B.getProp(o,c.p||{k:[0,0,0]},1,0,this),c.rx){if(this.rx=B.getProp(o,c.rx,0,pt,this),this.ry=B.getProp(o,c.ry,0,pt,this),this.rz=B.getProp(o,c.rz,0,pt,this),c.or.k[0].ti){var k,u=c.or.k.length;for(k=0;k0;)i-=1,this._elements.unshift(e[i]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)};Rt.prototype.resetElements=function(t){var e,i=t.length;for(e=0;e0?Math.floor(u):Math.ceil(u),d=this.pMatrix.props,P=this.rMatrix.props,l=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var h=0;if(u>0){for(;hg;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),h-=1;y&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-y,!0),h-=y)}s=this.data.m===1?0:this._currentCopies-1,r=this.data.m===1?1:-1,a=this._currentCopies;for(var p,m;a;){if(e=this.elemsData[s].it,i=e[e.length-1].transform.mProps.v.props,m=i.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)*(s/(this._currentCopies-1)),h!==0){for((s!==0&&r===1||s!==this._currentCopies-1&&r===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(P[0],P[1],P[2],P[3],P[4],P[5],P[6],P[7],P[8],P[9],P[10],P[11],P[12],P[13],P[14],P[15]),this.matrix.transform(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],l[9],l[10],l[11],l[12],l[13],l[14],l[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&&s<1?[e]:[]:[e-s,e+s].filter(function(r){return r>0&&r<1})};ut.prototype.split=function(t){if(t<=0)return[rs(this.points[0]),this];if(t>=1)return[this,rs(this.points[this.points.length-1])];var e=Yt(this.points[0],this.points[1],t),i=Yt(this.points[1],this.points[2],t),s=Yt(this.points[2],this.points[3],t),r=Yt(e,i,t),a=Yt(i,s,t),n=Yt(r,a,t);return[new ut(this.points[0],e,r,n,!0),new ut(n,a,s,this.points[3],!0)]};function as(t,e){var i=t.points[0][e],s=t.points[t.points.length-1][e];if(i>s){var r=s;s=i,i=r}for(var a=fa(3*t.a[e],2*t.b[e],t.c[e]),n=0;n0&&a[n]<1){var f=t.point(a[n])[e];fs&&(s=f)}return{min:i,max:s}}ut.prototype.bounds=function(){return{x:as(this,0),y:as(this,1)}};ut.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 Ze(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 ns(t){var e=t.bez.split(.5);return[Ze(e[0],t.t1,t.t),Ze(e[1],t.t,t.t2)]}function ua(t,e){return Math.abs(t.cx-e.cx)*2=a||t.width<=s&&t.height<=s&&e.width<=s&&e.height<=s){r.push([t.t,e.t]);return}var n=ns(t),f=ns(e);Ae(n[0],f[0],i+1,s,r,a),Ae(n[0],f[1],i+1,s,r,a),Ae(n[1],f[0],i+1,s,r,a),Ae(n[1],f[1],i+1,s,r,a)}}ut.prototype.intersections=function(t,e,i){e===void 0&&(e=2),i===void 0&&(i=7);var s=[];return Ae(Ze(this,0,1),Ze(t,0,1),0,e,s,i),s};ut.shapeSegment=function(t,e){var i=(e+1)%t.length();return new ut(t.v[e],t.o[e],t.i[i],t.v[i],!0)};ut.shapeSegmentInverted=function(t,e){var i=(e+1)%t.length();return new ut(t.v[i],t.i[i],t.o[e],t.v[e],!0)};function fi(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 Je(t,e,i,s){var r=[t[0],t[1],1],a=[e[0],e[1],1],n=[i[0],i[1],1],f=[s[0],s[1],1],o=fi(fi(r,a),fi(n,f));return bi(o[2])?null:[o[0]/o[2],o[1]/o[2]]}function ye(t,e,i){return[t[0]+Math.cos(e)*i,t[1]-Math.sin(e)*i]}function ui(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function ve(t,e){return Xe(t[0],e[0])&&Xe(t[1],e[1])}function De(){}rt([It],De);De.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=B.getProp(t,e.s,0,null,this),this.frequency=B.getProp(t,e.r,0,null,this),this.pointsType=B.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 Rs(t,e,i,s,r,a,n){var f=i-Math.PI/2,o=i+Math.PI/2,c=e[0]+Math.cos(i)*s*r,v=e[1]-Math.sin(i)*s*r;t.setTripleAt(c,v,c+Math.cos(f)*a,v-Math.sin(f)*a,c+Math.cos(o)*n,v-Math.sin(o)*n,t.length())}function ca(t,e){var i=[e[0]-t[0],e[1]-t[1]],s=-Math.PI*.5,r=[Math.cos(s)*i[0]-Math.sin(s)*i[1],Math.sin(s)*i[0]+Math.cos(s)*i[1]];return r}function ma(t,e){var i=e===0?t.length()-1:e-1,s=(e+1)%t.length(),r=t.v[i],a=t.v[s],n=ca(r,a);return Math.atan2(0,1)-Math.atan2(n[1],n[0])}function os(t,e,i,s,r,a,n){var f=ma(e,i),o=e.v[i%e._length],c=e.v[i===0?e._length-1:i-1],v=e.v[(i+1)%e._length],k=a===2?Math.sqrt(Math.pow(o[0]-c[0],2)+Math.pow(o[1]-c[1],2)):0,u=a===2?Math.sqrt(Math.pow(o[0]-v[0],2)+Math.pow(o[1]-v[1],2)):0;Rs(t,e.v[i%e._length],f,n,s,u/((r+1)*2),k/((r+1)*2))}function da(t,e,i,s,r,a){for(var n=0;n1&&e.length>1&&(r=ls(t[0],e[e.length-1]),r)?[[t[0].split(r[0])[0]],[e[e.length-1].split(r[1])[1]]]:[i,s]}function ga(t){for(var e,i=1;i1&&(e=ps(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}function fs(t,e){var i=t.inflectionPoints(),s,r,a,n;if(i.length===0)return[de(t,e)];if(i.length===1||Xe(i[1],1))return a=t.split(i[0]),s=a[0],r=a[1],[de(s,e),de(r,e)];a=t.split(i[0]),s=a[0];var f=(i[1]-i[0])/(1-i[0]);return a=a[1].split(f),n=a[0],r=a[1],[de(s,e),de(n,e),de(r,e)]}function Le(){}rt([It],Le);Le.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=B.getProp(t,e.a,0,null,this),this.miterLimit=B.getProp(t,e.ml,0,null,this),this.lineJoin=e.lj,this._isAnimated=this.amount.effectsSequence.length!==0};Le.prototype.processPath=function(t,e,i,s){var r=yt.newElement();r.c=t.c;var a=t.length();t.c||(a-=1);var n,f,o,c=[];for(n=0;n=0;n-=1)o=ut.shapeSegmentInverted(t,n),c.push(fs(o,e));c=ga(c);var v=null,k=null;for(n=0;n=0;e-=1)this.elements[e]||(s=this.layers[e],s.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:!1;this.checkPendingElements()};St.prototype.createItem=function(t){switch(t.ty){case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:return this.createNull(t);case 4:return this.createShape(t);default:return this.createNull(t)}};St.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t0&&(this.maskElement.setAttribute("id",u),this.element.maskedElement.setAttribute(h,"url("+Tt()+"#"+u+")"),s.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}le.prototype.getMaskProperty=function(t){return this.viewData[t].prop};le.prototype.renderFrame=function(t){var e=this.element.finalTransform.mat,i,s=this.masksProperties.length;for(i=0;i1&&(s+=" C"+e.o[r-1][0]+","+e.o[r-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),i.lastPath!==s){var n="";i.elem&&(e.c&&(n=t.inv?this.solidPath+s:s),i.elem.setAttribute("d",n)),i.lastPath=s}};le.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};const Se=function(){var t={};t.createFilter=e,t.createAlphaToLuminanceFilter=i;function e(s,r){var a=q("filter");return a.setAttribute("id",s),r!==!0&&(a.setAttribute("filterUnits","objectBoundingBox"),a.setAttribute("x","0%"),a.setAttribute("y","0%"),a.setAttribute("width","100%"),a.setAttribute("height","100%")),a}function i(){var s=q("feColorMatrix");return s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),s}return t}(),us=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}();var $e={},cs="filter_result_";function Ei(t){var e,i="SourceGraphic",s=t.data.ef?t.data.ef.length:0,r=vt(),a=Se.createFilter(r,!0),n=0;this.filters=[];var f;for(e=0;et?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 t,e=this.renderableComponents.length;for(t=0;t=0&&(i=this.shapeModifiers[t].processShapes(this._isFirstFrame),!i);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,i=0,s=e.length;i.01)return!1;i+=1}return!0};Ne.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;)l=u.transformers[R].mProps._mdf||l,S-=1,R-=1;if(l)for(S=b-u.styles[p].lvl,R=u.transformers.length-1;S>0;)w.multiply(u.transformers[R].mProps.v),S-=1,R-=1}else w=t;if(T=u.sh.paths,d=T._length,l){for(P="",g=0;g=1?O=.99:O<=-1&&(O=-.99);var x=H*O,F=Math.cos(Z+u.a.v)*x+P[0],D=Math.sin(Z+u.a.v)*x+P[1];g.setAttribute("fx",F),g.setAttribute("fy",D),d&&!u.g._collapsable&&(u.of.setAttribute("fx",F),u.of.setAttribute("fy",D))}}}function v(k,u,y){var g=u.style,d=u.d;d&&(d._mdf||y)&&d.dashStr&&(g.pElem.setAttribute("stroke-dasharray",d.dashStr),g.pElem.setAttribute("stroke-dashoffset",d.dashoffset[0])),u.c&&(u.c._mdf||y)&&g.pElem.setAttribute("stroke","rgb("+Ot(u.c.v[0])+","+Ot(u.c.v[1])+","+Ot(u.c.v[2])+")"),(u.o._mdf||y)&&g.pElem.setAttribute("stroke-opacity",u.o.v),(u.w._mdf||y)&&(g.pElem.setAttribute("stroke-width",u.w.v),g.msElem&&g.msElem.setAttribute("stroke-width",u.w.v))}return i}();function gt(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=[]}rt([Oe,Ve,ai,Bs,Re,ze,ni],gt);gt.prototype.initSecondaryElement=function(){};gt.prototype.identityMatrix=new ct;gt.prototype.buildExpressionInterface=function(){};gt.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()};gt.prototype.filterUniqueShapes=function(){var t,e=this.shapes.length,i,s,r=this.stylesList.length,a,n=[],f=!1;for(s=0;s1&&f&&this.setShapesAsAnimated(n)}};gt.prototype.setShapesAsAnimated=function(t){var e,i=t.length;for(e=0;e=0;o-=1){if(P=this.searchProcessedElement(t[o]),P?e[o]=i[P-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")P?e[o].style.closed=t[o].hd:e[o]=this.createStyleElement(t[o],r),t[o]._render&&e[o].style.pElem.parentNode!==s&&s.appendChild(e[o].style.pElem),u.push(e[o].style);else if(t[o].ty==="gr"){if(!P)e[o]=this.createGroupElement(t[o]);else for(k=e[o].it.length,v=0;v=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))}};jt.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;te.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e)}function qa(t){const e=t.match(Fa);if(e){const o=ae(e.slice(1));return c=>{var v;const{comp:k}=c;return(v=k(o[0]).layer(o[1]).effect(o[2]))==null?void 0:v("Color")}}const i=t.match(Da);if(i){const o=ae(i.slice(1));return c=>{var v;const{comp:k,$bm_div:u,$bm_mul:y,value:g}=c;return y(u(g,+o[0]),(v=k(o[1]).layer(o[2]).effect(o[3]))==null?void 0:v(o[4]))}}const s=t.match(Ca);if(s){const o=ae(s.slice(1));return c=>{const{thisComp:v}=c;return v.layer(o[0]).effect(o[1])("Menu")==+o[2]?+o[3]:+o[4]}}const r=t.match(La);if(r){const o=ae(r.slice(1));return c=>{const{thisComp:v,$bm_mul:k}=c;return k(v.layer(o[0]).effect(+o[1])(o[2]),+o[3])}}const a=t.match(Oa);if(a){const o=ae(a.slice(1));return c=>{const{thisComp:v}=c,k=v.layer(o[0]).effect("Scale")("Slider");return[k,k]}}const n=t.match(Va);if(n){const o=ae(n.slice(1));return c=>{const{thisComp:v}=c;return v.layer(o[0]).effect("Axis")("Point")}}if(t.match(Ra))return o=>{const{effect:c}=o;return c("Axis")("Point")};const f=t.match(za);if(f){const o=ae(f.slice(1));return c=>{const{thisComp:v}=c;return v.layer(o[0]).effect(o[1])("Color")}}return t.match(Na)?o=>0:null}const Si=function(){var t={},e=qt,i=null,s=null,r=null,a=null,n=null,f={};function o(){f={}}function c(E){return E.constructor===Array||E.constructor===Float32Array}function v(E,I){return E==="number"||I instanceof Number||E==="boolean"||E==="string"}function k(E){var I=typeof E;if(I==="number"||E instanceof Number||I==="boolean")return-E;if(c(E)){var V,j=E.length,L=[];for(V=0;VV){var j=V;V=I,I=j}return e.min(e.max(E,I),V)}function H(E){return E/pt}var Z=H;function O(E){return E*pt}var x=H,F=[0,0,0,0,0,0];function D(E,I){if(typeof E=="number"||E instanceof Number)return I=I||0,e.abs(E-I);I||(I=F);var V,j=e.min(E.length,I.length),L=0;for(V=0;V.5?$/(2-L-Y):$/(L+Y),L){case I:J=(V-j)/$+(V1&&(V-=1),V<1/6?E+(I-E)*6*V:V<1/2?I:V<2/3?E+(I-E)*(2/3-V)*6:E}function C(E){var I=E[0],V=E[1],j=E[2],L,Y,J;if(V===0)L=j,J=j,Y=j;else{var U=j<.5?j*(1+V):j+V-j*V,ht=2*j-U;L=A(ht,U,I+1/3),Y=A(ht,U,I),J=A(ht,U,I-1/3)}return[L,Y,J,E[3]]}function z(E,I,V,j,L){if((j===void 0||L===void 0)&&(j=I,L=V,I=0,V=1),V=V)return L;var J=V===I?0:(E-I)/(V-I);if(!j.length)return j+(L-j)*J;var U,ht=j.length,$=at("float32",ht);for(U=0;U1){for(it=0;it1?N=1:N<0&&(N=0);var qe=W(N);if(c(st)){var Dt,Pe=st.length,Ee=at("float32",Pe);for(Dt=0;DtI.k[N].t&&WI.k[N+1].t-W?(it=N+2,st=I.k[N+1].t):(it=N+1,st=I.k[N].t);break}it===-1&&(it=N+1,st=I.k[N].t)}var xt={};return xt.index=it,xt.time=st/E.comp.globalData.frameRate,xt}function yr(W){var N,nt,it;if(!I.k.length||typeof I.k[0]=="number")throw new Error("The property has no keyframe at index "+W);W-=1,N={time:I.k[W].t/E.comp.globalData.frameRate,value:[]};var st=Object.prototype.hasOwnProperty.call(I.k[W],"s")?I.k[W].s:I.k[W-1].e;for(it=st.length,nt=0;ntP.length-1)&&(y=P.length-1),p=P[P.length-1-y].t,h=l-p);var m,b,T;if(u==="pingpong"){var w=Math.floor((d-p)/h);if(w%2!==0)return this.getValueAtTime((h-(d-p)%h+p)/this.comp.globalData.frameRate,0)}else if(u==="offset"){var S=this.getValueAtTime(p/this.comp.globalData.frameRate,0),R=this.getValueAtTime(l/this.comp.globalData.frameRate,0),G=this.getValueAtTime(((d-p)%h+p)/this.comp.globalData.frameRate,0),H=Math.floor((d-p)/h);if(this.pv.length){for(T=new Array(S.length),b=T.length,m=0;m=l)return this.pv;var h,p;g?(y?h=Math.abs(this.elem.comp.globalData.frameRate*y):h=Math.max(0,this.elem.data.op-l),p=l+h):((!y||y>P.length-1)&&(y=P.length-1),p=P[y].t,h=p-l);var m,b,T;if(u==="pingpong"){var w=Math.floor((l-d)/h);if(w%2===0)return this.getValueAtTime(((l-d)%h+l)/this.comp.globalData.frameRate,0)}else if(u==="offset"){var S=this.getValueAtTime(l/this.comp.globalData.frameRate,0),R=this.getValueAtTime(p/this.comp.globalData.frameRate,0),G=this.getValueAtTime((h-(l-d)%h+l)/this.comp.globalData.frameRate,0),H=Math.floor((l-d)/h)+1;if(this.pv.length){for(T=new Array(S.length),b=T.length,m=0;m1?(P-d)/(y-1):1,h=0,p=0,m;this.pv.length?m=at("float32",this.pv.length):m=0;for(var b;hl){var T=h,w=g.c&&h===p-1?0:h+1,S=(l-m)/P[h].addedLength;b=Vt.getPointInSegment(g.v[T],g.v[w],g.o[T],g.i[w],S,P[h]);break}else m+=P[h].addedLength;h+=1}return b||(b=g.c?[g.v[0][0],g.v[0][1]]:[g.v[g._length-1][0],g.v[g._length-1][1]]),b},vectorOnPath:function(u,y,g){u==1?u=this.v.c:u==0&&(u=.999);var d=this.pointOnPath(u,y),P=this.pointOnPath(u+.001,y),l=P[0]-d[0],h=P[1]-d[1],p=Math.sqrt(Math.pow(l,2)+Math.pow(h,2));if(p===0)return[0,0];var m=g==="tangent"?[l/p,h/p]:[-h/p,l/p];return m},tangentOnPath:function(u,y){return this.vectorOnPath(u,y,"tangent")},normalOnPath:function(u,y){return this.vectorOnPath(u,y,"normal")},setGroupProperty:Mt.setGroupProperty,getValueAtTime:Mt.getStaticValueAtTime},rt([v],o),rt([v],c),c.prototype.getValueAtTime=f,c.prototype.initiateExpression=Si.initiateExpression;var k=Zt.getShapeProp;Zt.getShapeProp=function(u,y,g,d,P){var l=k(u,y,g,d,P);return l.propertyIndex=y.ix,l.lock=!1,g===3?Mt.searchExpressions(u,y.pt,l):g===4&&Mt.searchExpressions(u,y.ks,l),l.k&&u.addDynamicProperty(l),l}}function Qa(){Ka()}function wi(){}wi.prototype={createMergeNode:(t,e)=>{var i=q("feMerge");i.setAttribute("result",t);var s,r;for(r=0;r=c?k=g<0?s:r:k=s+y*Math.pow((f-t)/g,1/i),v[u]=k,u+=1,a+=256/(n-1);return v.join(" ")};hi.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,i=this.filterManager.effectElements;this.feFuncRComposed&&(t||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf)&&(e=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf)&&(e=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf)&&(e=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf)&&(e=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf)&&(e=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[35].p.v),this.feFuncA.setAttribute("tableValues",e))}};function Mi(t,e,i,s,r){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 f=q("feGaussianBlur");f.setAttribute("in","SourceAlpha"),f.setAttribute("result",s+"_drop_shadow_1"),f.setAttribute("stdDeviation","0"),this.feGaussianBlur=f,t.appendChild(f);var o=q("feOffset");o.setAttribute("dx","25"),o.setAttribute("dy","0"),o.setAttribute("in",s+"_drop_shadow_1"),o.setAttribute("result",s+"_drop_shadow_2"),this.feOffset=o,t.appendChild(o);var c=q("feFlood");c.setAttribute("flood-color","#00ff00"),c.setAttribute("flood-opacity","1"),c.setAttribute("result",s+"_drop_shadow_3"),this.feFlood=c,t.appendChild(c);var v=q("feComposite");v.setAttribute("in",s+"_drop_shadow_3"),v.setAttribute("in2",s+"_drop_shadow_2"),v.setAttribute("operator","in"),v.setAttribute("result",s+"_drop_shadow_4"),t.appendChild(v);var k=this.createMergeNode(s,[s+"_drop_shadow_4",r]);t.appendChild(k)}rt([wi],Mi);Mi.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",Rr(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 i=this.filterManager.effectElements[3].p.v,s=(this.filterManager.effectElements[2].p.v-90)*pt,r=i*Math.cos(s),a=i*Math.sin(s);this.feOffset.setAttribute("dx",r),this.feOffset.setAttribute("dy",a)}}};var He=[];function ke(t,e,i){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=i,i.matteElement=q("g"),i.matteElement.appendChild(i.layerElement),i.matteElement.appendChild(i.transformedElement),i.baseElement=i.matteElement}ke.prototype.findSymbol=function(t){for(var e=0,i=He.length;e>16&255,g:e>>8&255,b:e&255}}function on(t){const{r:e,g:i,b:s}=nn(t);return[be(e),be(i),be(s)]}function hn(t){const e={r:di(t[0]),g:di(t[1]),b:di(t[2])};return an(e)}function vs(t,{lottieInstance:e}={}){const i=[];return!t||!t.layers||t.layers.forEach((s,r)=>{!s.nm||!s.ef||s.ef.forEach((a,n)=>{var f,o,c;const v=(c=(o=(f=a?.ef)==null?void 0:f[0])==null?void 0:o.v)==null?void 0:c.k;if(v===void 0)return;let k;e?k=`renderer.elements.${r}.effectsManager.effectElements.${n}.effectElements.0.p.v`:k=`layers.${r}.ef.${n}.ef.0.v.k`;let u;if(a.mn==="ADBE Color Control"?u="color":a.mn==="ADBE Slider Control"?u="slider":a.mn==="ADBE Point Control"?u="point":a.mn==="ADBE Checkbox Control"?u="checkbox":a.mn.startsWith("Pseudo/")&&(u="feature"),!u)return;const y=a.nm.toLowerCase();i.push({name:y,path:k,value:v,type:u})})}),i}function Qe(t,e){for(const i of e)At(t,i.path,i.value)}function we(t,e,i){for(const s of e)s.type==="color"?typeof i=="object"&&"r"in i&&"g"in i&&"b"in i?At(t,s.path,[be(i.r),be(i.g),be(i.b)]):Array.isArray(i)?At(t,s.path,i):typeof i=="string"&&At(t,s.path,on(sn(i))):s.type==="point"?typeof i=="object"&&"x"in i&&"y"in i?(At(t,s.path+".0",i.x),At(t,s.path+".1",i.y)):Array.isArray(i)&&(At(t,s.path+".0",i[0]),At(t,s.path+".1",i[1])):At(t,s.path,i)}const ln={loop:!1,autoplay:!1,rendererSettings:{preserveAspectRatio:"xMidYMid meet",progressiveLoad:!0,hideOnTransparent:!0}},pn=["default"];function fn(){return new Proxy(this,{set:(t,e,i,s)=>(typeof e=="string"&&(i?we(this.lottieInstance,this.lottieProperties.filter(r=>r.type==="color"&&r.name===e),i):Qe(this.lottieInstance,this.lottieProperties.filter(r=>r.type==="color"&&r.name===e)),t.refresh()),!0),get:(t,e,i)=>{for(const s of t.lottieProperties)if(s.type=="color"&&typeof e=="string"&&e==s.name){const r=ir(this.lottieInstance,s.path);if(r)return hn(r)}},deleteProperty:(t,e)=>(typeof e=="string"&&(Qe(this.lottieInstance,this.lottieProperties.filter(i=>i.type==="color"&&i.name===e)),t.refresh()),!0),ownKeys:t=>t.lottieProperties.filter(e=>e.type=="color").map(e=>e.name),has:(t,e)=>{for(const i of t.lottieProperties)if(i.type=="color"&&typeof e=="string"&&e==i.name)return!0;return!1},getOwnPropertyDescriptor:t=>({enumerable:!0,configurable:!0})})}class un{constructor(e,i,s,r={autoInit:!0}){if(wt(this,"_container"),wt(this,"_iconData"),wt(this,"_initialProperties"),wt(this,"_lottieInstance"),wt(this,"_ready",!1),wt(this,"_colorsProxy"),wt(this,"_direction",1),wt(this,"_speed",1),wt(this,"_lottieProperties"),wt(this,"_eventHandlers",{}),wt(this,"_state"),wt(this,"_availableStates"),this._container=e,this._iconData=i,this._initialProperties=s||{},this._availableStates=(i.markers||[]).map(a=>{const n=a.cm.split(":"),f={time:a.tm,duration:a.dr,name:"",default:!1,params:[]};for(;pn.includes(n[0]);){switch(n[0]){case"default":f.default=!0;break;default:throw new Error(`Unsupported state flag: ${n[0]}`)}n.shift()}return f.name=n[0],f.params=n.slice(1,n.length),f.name===this._initialProperties.state?this._state=f:f.default&&ys(this._initialProperties.state)&&(this._state=f),f}).filter(a=>a.duration>0),this._availableStates.length&&(this._initialProperties.stroke&&![1,2,3,"light","regular","bold"].includes(this._initialProperties.stroke)&&delete this._initialProperties.stroke,this._initialProperties.state&&!this._state&&(this._state=this._availableStates.filter(a=>a.default)[0])),!this._availableStates.length){this._iconData=gs(this._iconData);const a=vs(this._iconData,{lottieInstance:!1});if(a&&this._initialProperties.state){const n=`state-${this._initialProperties.state.toLowerCase()}`;we(this._iconData,a.filter(f=>f.name.startsWith("state-")),0),we(this._iconData,a.filter(f=>f.name===n),1)}if(a&&this._initialProperties.stroke){const n=a.filter(f=>f.name==="stroke")[0];if(n){const f=n.value/50,o=this._initialProperties.stroke*f;At(this._iconData,n.path,o)}}if(a&&this._initialProperties.scale){const n=a.filter(f=>f.name==="scale")[0];if(n){const f=n.value/50,o=this._initialProperties.scale*f;At(this._iconData,n.path,o)}}if(a&&this._initialProperties.axisX&&this._initialProperties.axisY){const n=a.filter(f=>f.name==="axis")[0];if(n){const f=(n.value[0]+n.value[1])/2/50;At(this._iconData,n.path+".0",this._initialProperties.axisX*f),At(this._iconData,n.path+".1",this._initialProperties.axisY*f)}}}r.autoInit&&this.init()}init(){if(this._lottieInstance)throw new Error("Already connected player!");const e={},i={};if(this._state&&(i.initialSegment=[this._state.time,this._state.time+this._state.duration+1]),this._availableStates.length){const s=this._availableStates[0],r=this._availableStates[this._availableStates.length-1];e.ip=s.time,e.op=r.time+r.duration+1}this._lottieInstance=tn.loadAnimation(Cr(je(je({},ln),i),{container:this._container,animationData:Object.assign(gs(this._iconData),e)})),this._initialProperties.colors&&(this.colors=this._initialProperties.colors),this._initialProperties.stroke&&(this.stroke=this._initialProperties.stroke),this._lottieInstance.addEventListener("complete",()=>{this.triggerEvent("complete")}),this._lottieInstance.addEventListener("loopComplete",()=>{this.triggerEvent("complete")}),this._lottieInstance.addEventListener("enterFrame",()=>{this.triggerEvent("frame")}),this._lottieInstance.isLoaded?(this._ready=!0,this.triggerEvent("ready")):this._lottieInstance.addEventListener("config_ready",()=>{this._ready=!0,this.triggerEvent("ready")})}destroy(){if(!this._lottieInstance)throw new Error("Not connected player!");this._ready=!1,this._lottieInstance.destroy(),this._lottieInstance=void 0,this._colorsProxy=void 0,this._lottieProperties=void 0}addEventListener(e,i){return this._eventHandlers[e]||(this._eventHandlers[e]=[]),this._eventHandlers[e].push(i),()=>{this.removeEventListener(e,i)}}removeEventListener(e,i){if(!i)this._eventHandlers[e]=null;else if(this._eventHandlers[e]){let s=0,r=this._eventHandlers[e].length;for(;si.type==="color").length&&(e.colors=je({},this.colors)),this.lottieProperties.filter(i=>i.name==="stroke"||i.name==="stroke-layers").length&&(e.stroke=this.stroke),this._availableStates.length&&(e.state=this.state),e}set colors(e){if(Qe(this._lottieInstance,this.lottieProperties.filter(i=>i.type==="color")),e)for(const[i,s]of Object.entries(e))we(this._lottieInstance,this.lottieProperties.filter(r=>r.type==="color"&&r.name===i),s);this.refresh()}get colors(){return this._colorsProxy||(this._colorsProxy=fn.call(this)),this._colorsProxy}set stroke(e){Qe(this._lottieInstance,this.lottieProperties.filter(s=>s.name==="stroke"||s.name==="stroke-layers"));const i=ds(e);i&&we(this._lottieInstance,this.lottieProperties.filter(s=>s.name==="stroke"||s.name==="stroke-layers"),i),this.refresh()}get stroke(){const e=this.lottieProperties.filter(i=>i.name==="stroke"||i.name==="stroke-layers")[0];if(e){let i=+ir(this._lottieInstance,e.path);return ds(i)||null}return null}set state(e){if(!this._lottieInstance)throw new Error("Player not initialized");if(e===this.state)return;const i=this.playing;this._state=void 0,ys(e)?this._state=this._availableStates.filter(s=>s.default)[0]:e&&(this._state=this._availableStates.filter(s=>s.name===e)[0],this._state||(this._state=this._availableStates.filter(s=>s.default)[0])),this.switchSegment(this._state?[this._state.time,this._state.time+this._state.duration+1]:void 0),i&&(this.pause(),this.play())}get state(){return this._state?this._state.name:""}set speed(e){var i;this._speed=e,(i=this._lottieInstance)==null||i.setSpeed(e)}get speed(){return this._speed}set direction(e){if(!this._lottieInstance)throw new Error("Player not initialized");this._direction=e,this._lottieInstance.setDirection(e)}get direction(){return this._direction}set loop(e){if(!this._lottieInstance)throw new Error("Player not initialized");this._lottieInstance.loop=e}get loop(){if(!this._lottieInstance)throw new Error("Player not initialized");return!!this._lottieInstance.loop}set frame(e){this.seek(Math.max(0,Math.min(this.frameCount,e)))}get frame(){if(!this._lottieInstance)throw new Error("Player not initialized");return this._lottieInstance.currentFrame}get availableStates(){return this._availableStates}get playing(){if(!this._lottieInstance)throw new Error("Player not initialized");return!this._lottieInstance.isPaused}get ready(){return this._ready}get frameCount(){if(!this._lottieInstance)throw new Error("Player not initialized");return this._lottieInstance.getDuration(!0)-1}get segment(){if(!this._lottieInstance)throw new Error("Player not initialized");return[this._lottieInstance.firstFrame,this._lottieInstance.firstFrame+this._lottieInstance.totalFrames]}get duration(){if(!this._lottieInstance)throw new Error("Player not initialized");return this._lottieInstance.getDuration(!1)}get lottieInstance(){return this._lottieInstance}get lottieProperties(){return this._lottieProperties||(this._lottieProperties=vs(this._iconData,{lottieInstance:!0}),!this._availableStates.length&&this._lottieProperties&&(this._lottieProperties=this._lottieProperties.filter(e=>e.name!=="scale"&&e.name!=="axis"&&e.name!=="stroke"&&!e.name.startsWith("state-")))),this._lottieProperties||[]}}var cn=Object.defineProperty,mn=(t,e,i)=>e in t?cn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,Q=(t,e,i)=>mn(t,typeof e!="symbol"?e+"":e,i),bs=(t,e,i)=>new Promise((s,r)=>{var a=o=>{try{f(i.next(o))}catch(c){r(c)}},n=o=>{try{f(i.throw(o))}catch(c){r(c)}},f=o=>o.done?s(o.value):Promise.resolve(o.value).then(a,n);f((i=i.apply(t,e)).next())});const dn={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function gn(t){return t.startsWith("#")?t.length===4?`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`:t:dn[t.toLowerCase()]||"#000000"}function _s(t){return!t||typeof t!="string"?void 0:t.split(",").filter(e=>e).map(e=>e.split(":")).filter(e=>e.length==2).reduce((e,i)=>{const s=i[0];return e[s.toLowerCase()]=gn(i[1]),e},{})}function ks(t){if(t==="light"||t===1||t==="1")return 1;if(t==="regular"||t===2||t==="2")return 2;if(t==="bold"||t===3||t==="3")return 3}function yn(t){if(typeof t=="string")return t}const Ps=["click","mouseenter","mouseleave"],vn="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Es=` :host { position: relative; display: inline-block; width: 32px; height: 32px; transform: translate3d(0px, 0px, 0px); } :host(.current-color) svg path[fill] { fill: currentColor; } :host(.current-color) svg path[stroke] { stroke: currentColor; } svg { position: absolute; pointer-events: none; display: block; transform: unset!important; } ::slotted(*) { position: absolute; left: 0; top: 0; width: 100%; height: 100%; } .body.ready ::slotted(*) { display: none; } `;let Ge=null;const bn=["colors","src","state","trigger","loading","target","stroke","speed"],sr=class _i extends HTMLElement{constructor(){super(...arguments),Q(this,"_root"),Q(this,"_isConnected",!1),Q(this,"_ready",!1),Q(this,"_assignedIconData"),Q(this,"_loadedIconData"),Q(this,"_triggerInstance"),Q(this,"_playerInstance"),Q(this,"delayedLoading",null)}static get version(){return"__BUILD_VERSION__"}static get observedAttributes(){return bn}static defineTrigger(e,i){_i._definedTriggers.set(e,i)}attributeChangedCallback(e,i,s){this[`${e}Changed`].call(this)}connectedCallback(){if(this._root||this.createElements(),this.loading==="lazy"){let e;this.delayedLoading=s=>{e.unobserve(this),e=void 0,this.delayedLoading=null,s||this.createPlayer()};const i=(s,r)=>{s.forEach(a=>{a.isIntersecting&&e&&this.delayedLoading&&this.delayedLoading()})};e=new IntersectionObserver(i),e.observe(this)}else if(this.loading==="interaction"){let e;this.delayedLoading=r=>{for(const a of Ps)(i||this).removeEventListener(a,s);this.delayedLoading=null,r||this.createPlayer().then(()=>{e&&(i||this).dispatchEvent(new Event(e))})};const i=this.target?this.closest(this.target):null;let s=r=>{const a=r?.type;e?e=a:(e=a,this.delayedLoading&&this.delayedLoading())};s=s.bind(this);for(const r of Ps)(i||this).addEventListener(r,s)}else if(this.loading==="delay"){this.delayedLoading=i=>{this.delayedLoading=null,i||this.createPlayer()};const e=this.hasAttribute("loading-delay")?+this.getAttribute("loading-delay"):0;setTimeout(()=>{this.delayedLoading&&this.delayedLoading()},e)}else this.createPlayer();this._isConnected=!0}disconnectedCallback(){this.delayedLoading&&this.delayedLoading(!0),this.destroyPlayer(),this._isConnected=!1}createElements(){if(this._root=this.attachShadow({mode:"open"}),vn)Ge||(Ge=new CSSStyleSheet,Ge.replaceSync(Es)),this._root.adoptedStyleSheets=[Ge];else{const s=document.createElement("style");s.innerHTML=Es,this._root.appendChild(s)}const e=document.createElement("div");e.classList.add("body"),this._root.appendChild(e);const i=document.createElement("slot");e.appendChild(i)}playerFactory(e,i,s){return new un(e,i,s,{autoInit:!1})}createPlayer(){return bs(this,null,function*(){if(this.delayedLoading)return;const e=yield this.loadIconData();if(!e)return;this._playerInstance=this.playerFactory(this.animationContainer,e,{state:yn(this.state),stroke:ks(this.stroke),colors:_s(this.colors),scale:parseFloat(""+this.getAttribute("scale")||""),axisX:parseFloat(""+this.getAttribute("axis-x")||""),axisY:parseFloat(""+this.getAttribute("axis-y")||"")});const i=Object.entries(this._playerInstance.colors||{});if(i.length){let s="";for(const[a,n]of i)s+=` :host(:not(.current-color)) svg path[fill].${a} { fill: var(--lord-icon-${a}, var(--lord-icon-${a}-base, #000)); } :host(:not(.current-color)) svg path[stroke].${a} { stroke: var(--lord-icon-${a}, var(--lord-icon-${a}-base, #000)); } `;const r=document.createElement("style");r.innerHTML=s,this.animationContainer.appendChild(r)}this._playerInstance.init(),this._playerInstance.addEventListener("ready",()=>{this._triggerInstance&&this._triggerInstance.onReady&&this._triggerInstance.onReady()}),this._playerInstance.addEventListener("refresh",()=>{this.refresh(),this._triggerInstance&&this._triggerInstance.onRefresh&&this._triggerInstance.onRefresh()}),this._playerInstance.addEventListener("complete",()=>{this._triggerInstance&&this._triggerInstance.onComplete&&this._triggerInstance.onComplete()}),this._playerInstance.addEventListener("frame",()=>{this._triggerInstance&&this._triggerInstance.onFrame&&this._triggerInstance.onFrame()}),this.refresh(),this.triggerChanged(),yield new Promise((s,r)=>{this._playerInstance.ready?s():this._playerInstance.addEventListener("ready",s)}),this.animationContainer.classList.add("ready"),this._ready=!0,this.dispatchEvent(new CustomEvent("ready"))})}destroyPlayer(){this._ready=!1,this._loadedIconData=void 0,this._triggerInstance&&(this._triggerInstance.onDisconnected&&this._triggerInstance.onDisconnected(),this._triggerInstance=void 0),this._playerInstance&&(this._playerInstance.destroy(),this._playerInstance=void 0,this.animationContainer.classList.remove("ready"))}loadIconData(){return bs(this,null,function*(){let e=this.icon;if(!e&&this.src){const i=yield fetch(this.src);this._loadedIconData=e=yield i.json()}return e})}refresh(){this.movePaletteToCssVariables()}movePaletteToCssVariables(){for(const[e,i]of Object.entries(this._playerInstance.colors||{}))i?this.animationContainer.style.setProperty(`--lord-icon-${e}-base`,i):this.animationContainer.style.removeProperty(`--lord-icon-${e}-base`)}targetChanged(){this.triggerChanged()}loadingChanged(){}triggerChanged(){var e;if(this._triggerInstance&&(this._triggerInstance.onDisconnected&&this._triggerInstance.onDisconnected(),this._triggerInstance=void 0,(e=this._playerInstance)==null||e.pause()),!this.trigger||!this._playerInstance)return;const i=_i._definedTriggers.get(this.trigger);if(!i)throw new Error(`Can't use unregistered trigger: '${this.trigger}'!`);const s=this.target?this.closest(this.target):null;this._triggerInstance=new i(this._playerInstance,this,s||this),this._triggerInstance.onConnected&&this._triggerInstance.onConnected(),this._playerInstance.ready&&this._triggerInstance.onReady&&this._triggerInstance.onReady()}colorsChanged(){this._playerInstance&&(this._playerInstance.colors=_s(this.colors)||null)}strokeChanged(){this._playerInstance&&(this._playerInstance.stroke=ks(this.stroke)||null)}speedChanged(){if(!this._playerInstance)return;const e=this.getAttribute("speed");if(e){const i=parseFloat(e);isNaN(i)?this._playerInstance.speed=1:this._playerInstance.speed=i}else this._playerInstance.speed=1}stateChanged(){var e,i;this._playerInstance&&(this._playerInstance.state=this.state,(i=(e=this._triggerInstance)==null?void 0:e.onState)==null||i.call(e))}iconChanged(){this._isConnected&&(this.destroyPlayer(),this.createPlayer())}srcChanged(){this._isConnected&&(this.destroyPlayer(),this.createPlayer())}set icon(e){e!==this._assignedIconData&&(this._assignedIconData=e,this._loadedIconData=void 0,this.iconChanged())}get icon(){return this._assignedIconData||this._loadedIconData}set src(e){e?this.setAttribute("src",e):this.removeAttribute("src")}get src(){return this.getAttribute("src")}set state(e){e?this.setAttribute("state",e):this.removeAttribute("state")}get state(){return this.getAttribute("state")}set colors(e){e?this.setAttribute("colors",e):this.removeAttribute("colors")}get colors(){return this.getAttribute("colors")}set trigger(e){e?this.setAttribute("trigger",e):this.removeAttribute("trigger")}get trigger(){return this.getAttribute("trigger")}set loading(e){e?this.setAttribute("loading",e):this.removeAttribute("loading")}get loading(){if(this.getAttribute("loading")){const e=this.getAttribute("loading").toLowerCase();if(e==="lazy")return"lazy";if(e==="interaction")return"interaction";if(e==="delay")return"delay"}return null}set target(e){e?this.setAttribute("target",e):this.removeAttribute("target")}get target(){return this.getAttribute("target")}set stroke(e){e?this.setAttribute("stroke",e):this.removeAttribute("stroke")}get stroke(){return this.hasAttribute("stroke")?this.getAttribute("stroke"):null}set speed(e){e?this.setAttribute("speed",String(e)):this.removeAttribute("speed")}get speed(){const e=this.getAttribute("speed");if(e){const i=parseFloat(e);if(!isNaN(i))return i}return 1}get ready(){return this._ready}get readyPromise(){return this._ready?Promise.resolve():new Promise(e=>{this.addEventListener("ready",()=>{e()},{once:!0})})}get playerInstance(){return this._playerInstance}get triggerInstance(){return this._triggerInstance}get animationContainer(){return this._root.lastElementChild}};Q(sr,"_definedTriggers",new Map);let Nt=sr;class _n{constructor(e,i,s){Q(this,"segments"),Q(this,"queue",[]),Q(this,"connected",!1),Q(this,"targetState"),Q(this,"delayTimer",null),Q(this,"intersectionObserver"),this.player=e,this.element=i,this.targetElement=s,this.onClick=this.onClick.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.handleState(),this.replay()}onConnected(){this.connected=!0,this.targetElement.addEventListener("click",this.onClick),this.targetElement.addEventListener("mouseenter",this.onMouseEnter),this.targetState&&(this.loading?this.play(!0):this.initIntersectionObserver())}onDisconnected(){this.connected=!1,this.targetElement.removeEventListener("click",this.onClick),this.targetElement.removeEventListener("mouseenter",this.onMouseEnter),this.cleanup()}onMouseEnter(){this.queue.push(0),this.queue.push(1),this.handleQueue()}onComplete(){this.targetState?this.resetState():this.handleQueue()}onState(){this.handleState()}onClick(){this.clickToReplay&&this.replay()}play(e){this.player.playing||this.delayTimer||(e&&this.delay>0?this.scheduleDelayedPlay():this.player.playFromStart())}replay(){this.player.playing||!this.player.state||!this.intro||(this.targetState=this.player.state,this.player.state=this.intro,this.connected&&this.play())}scheduleDelayedPlay(){this.resetDelayTimer(),this.delayTimer=setTimeout(()=>{this.player.playFromStart(),this.delayTimer=null},this.delay)}handleQueue(){var e;if(this.player.playing||!this.queue.length)return;const i=this.queue.shift();if(this.segments){const s=(e=this.segments)==null?void 0:e[i];this.player.direction=1,this.player.switchSegment(s)}else this.player.direction=i===0?1:-1;this.player.play()}handleState(){this.segments=void 0;const e=this.player.availableStates.find(a=>a.name===this.player.state);if(!e)return;let i=0;if(e.params.length){const a=parseFloat(e.params[0]);!isNaN(a)&&a>0&&a<=1&&(i=a)}if(!i)return;const s=[e.time,e.time+Math.floor((e.duration+1)*i)],r=[s[1],e.time+e.duration+1];this.segments=[s,r]}initIntersectionObserver(){if(this.intersectionObserver)return;const e=i=>{i.forEach(s=>{s.isIntersecting&&(this.play(!0),this.resetIntersectionObserver())})};this.intersectionObserver=new IntersectionObserver(e,{threshold:.5}),this.intersectionObserver.observe(this.element)}resetIntersectionObserver(){this.intersectionObserver&&(this.intersectionObserver.unobserve(this.element),this.intersectionObserver=void 0)}resetDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}resetState(){return this.targetState?(this.player.state=this.targetState,this.targetState=void 0,!0):!1}resetPlayer(){this.player.direction=1,this.segments&&(this.player.switchSegment([this.segments[0][0],this.segments[1][1]]),this.segments=void 0,this.queue=[])}cleanup(){this.resetPlayer(),this.resetIntersectionObserver(),this.resetDelayTimer(),this.resetState()}get intro(){if(!this.element.hasAttribute("intro"))return null;const e=this.element.getAttribute("intro");let i=this.player.availableStates.find(s=>s.name===e);return i||(i=this.player.availableStates.find(s=>s.name.startsWith("in-"))),i?.name||null}get delay(){const e=this.element.hasAttribute("delay")?+(this.element.getAttribute("delay")||0):0;return Math.max(e,0)}get loading(){return this.element.hasAttribute("loading")}get clickToReplay(){return this.element.hasAttribute("click-to-replay")}}class kn{constructor(e,i,s){Q(this,"connected",!1),Q(this,"targetState"),Q(this,"delayTimer",null),Q(this,"intersectionObserver"),this.player=e,this.element=i,this.targetElement=s,this.onClick=this.onClick.bind(this),this.replay()}onConnected(){this.connected=!0,this.targetElement.addEventListener("click",this.onClick),this.targetState&&(this.loading?this.play(!0):this.initIntersectionObserver())}onDisconnected(){this.connected=!1,this.targetElement.removeEventListener("click",this.onClick),this.cleanup()}onComplete(){this.resetState()}onClick(){this.player.playing||this.player.playFromStart()}play(e){this.player.playing||this.delayTimer||(e&&this.delay>0?this.scheduleDelayedPlay():this.player.playFromStart())}replay(){this.player.playing||!this.player.state||!this.intro||(this.targetState=this.player.state,this.player.state=this.intro,this.connected&&this.play())}scheduleDelayedPlay(){this.resetDelayTimer(),this.delayTimer=setTimeout(()=>{this.player.playFromStart(),this.delayTimer=null},this.delay)}initIntersectionObserver(){if(this.intersectionObserver)return;const e=i=>{i.forEach(s=>{s.isIntersecting&&(this.play(!0),this.resetIntersectionObserver())})};this.intersectionObserver=new IntersectionObserver(e,{threshold:.5}),this.intersectionObserver.observe(this.element)}resetIntersectionObserver(){this.intersectionObserver&&(this.intersectionObserver.unobserve(this.element),this.intersectionObserver=void 0)}resetDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}resetState(){this.targetState&&(this.player.state=this.targetState,this.targetState=void 0)}cleanup(){this.resetIntersectionObserver(),this.resetDelayTimer(),this.resetState()}get intro(){if(!this.element.hasAttribute("intro"))return null;const e=this.element.getAttribute("intro");let i=this.player.availableStates.find(s=>s.name===e);return i||(i=this.player.availableStates.find(s=>s.name.startsWith("in-"))),i?.name||null}get delay(){const e=this.element.hasAttribute("delay")?+(this.element.getAttribute("delay")||0):0;return Math.max(e,0)}get loading(){return this.element.hasAttribute("loading")}}class Pn{constructor(e,i,s){Q(this,"connected",!1),Q(this,"targetState"),Q(this,"delayTimer",null),Q(this,"intersectionObserver"),this.player=e,this.element=i,this.targetElement=s,this.onHover=this.onHover.bind(this),this.onClick=this.onClick.bind(this),this.replay()}onConnected(){this.connected=!0,this.targetElement.addEventListener("click",this.onClick),this.targetElement.addEventListener("mouseenter",this.onHover),this.targetState&&(this.loading?this.play(!0):this.initIntersectionObserver())}onDisconnected(){this.connected=!1,this.targetElement.removeEventListener("click",this.onClick),this.targetElement.removeEventListener("mouseenter",this.onHover),this.cleanup()}onComplete(){this.resetState()}onHover(){this.targetState||this.play()}onClick(){this.clickToReplay&&this.replay()}play(e){this.player.playing||this.delayTimer||(e&&this.delay>0?this.scheduleDelayedPlay():this.player.playFromStart())}replay(){this.player.playing||!this.player.state||!this.intro||(this.targetState=this.player.state,this.player.state=this.intro,this.connected&&this.play())}scheduleDelayedPlay(){this.resetDelayTimer(),this.delayTimer=setTimeout(()=>{this.player.playFromStart(),this.delayTimer=null},this.delay)}initIntersectionObserver(){if(this.intersectionObserver)return;const e=i=>{i.forEach(s=>{s.isIntersecting&&(this.play(!0),this.resetIntersectionObserver())})};this.intersectionObserver=new IntersectionObserver(e,{threshold:.5}),this.intersectionObserver.observe(this.element)}resetIntersectionObserver(){this.intersectionObserver&&(this.intersectionObserver.unobserve(this.element),this.intersectionObserver=void 0)}resetDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}resetState(){this.targetState&&(this.player.state=this.targetState,this.targetState=void 0)}cleanup(){this.resetIntersectionObserver(),this.resetDelayTimer(),this.resetState()}get intro(){if(!this.element.hasAttribute("intro"))return null;const e=this.element.getAttribute("intro");let i=this.player.availableStates.find(s=>s.name===e);return i||(i=this.player.availableStates.find(s=>s.name.startsWith("in-"))),i?.name||null}get delay(){const e=this.element.hasAttribute("delay")?+(this.element.getAttribute("delay")||0):0;return Math.max(e,0)}get loading(){return this.element.hasAttribute("loading")}get clickToReplay(){return this.element.hasAttribute("click-to-replay")}}class En{constructor(e,i,s){Q(this,"connected",!1),Q(this,"delayTimer",null),Q(this,"intersectionObserver"),this.player=e,this.element=i,this.targetElement=s,this.onClick=this.onClick.bind(this)}onConnected(){this.connected=!0,this.targetElement.addEventListener("click",this.onClick),this.loading?this.play(!0):this.initIntersectionObserver()}onDisconnected(){this.connected=!1,this.targetElement.removeEventListener("click",this.onClick),this.cleanup()}onClick(){this.clickToReplay&&this.play()}play(e){this.player.playing||this.delayTimer||(e&&this.delay>0?this.scheduleDelayedPlay():this.player.playFromStart())}scheduleDelayedPlay(){this.resetDelayTimer(),this.delayTimer=setTimeout(()=>{this.player.playFromStart(),this.delayTimer=null},this.delay)}initIntersectionObserver(){if(this.intersectionObserver)return;const e=i=>{i.forEach(s=>{s.isIntersecting&&(this.play(!0),this.resetIntersectionObserver())})};this.intersectionObserver=new IntersectionObserver(e,{threshold:.5}),this.intersectionObserver.observe(this.element)}resetIntersectionObserver(){this.intersectionObserver&&(this.intersectionObserver.unobserve(this.element),this.intersectionObserver=void 0)}resetDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}cleanup(){this.resetIntersectionObserver(),this.resetDelayTimer()}get delay(){const e=this.element.hasAttribute("delay")?+(this.element.getAttribute("delay")||0):0;return Math.max(e,0)}get loading(){return this.element.hasAttribute("loading")}get clickToReplay(){return this.element.hasAttribute("click-to-replay")}}class Tn{constructor(e,i,s){Q(this,"delayTimer",null),this.player=e,this.element=i,this.targetElement=s}onReady(){this.play()}onComplete(){this.play()}onDisconnected(){this.resetDelayTimer()}play(){this.player.playing||this.delayTimer||(this.delay>0?this.scheduleDelayedPlay():this.player.playFromStart())}scheduleDelayedPlay(){this.resetDelayTimer(),this.delayTimer=setTimeout(()=>{this.player.playFromStart(),this.delayTimer=null},this.delay)}resetDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}get delay(){const e=this.element.hasAttribute("delay")?+(this.element.getAttribute("delay")||0):0;return Math.max(e,0)}}class An{constructor(e,i,s){Q(this,"delayTimer",null),Q(this,"mouseIn",!1),this.player=e,this.element=i,this.targetElement=s,this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this)}onConnected(){this.targetElement.addEventListener("mouseenter",this.onMouseEnter),this.targetElement.addEventListener("mouseleave",this.onMouseLeave)}onDisconnected(){this.targetElement.removeEventListener("mouseenter",this.onMouseEnter),this.targetElement.removeEventListener("mouseleave",this.onMouseLeave),this.resetDelayTimer()}onMouseEnter(){this.mouseIn=!0,this.play()}onMouseLeave(){this.mouseIn=!1,this.resetDelayTimer()}onComplete(){this.play()}play(){this.player.playing||this.delayTimer||this.mouseIn&&(this.delay>0?this.scheduleDelayedPlay():this.player.playFromStart())}scheduleDelayedPlay(){this.resetDelayTimer(),this.delayTimer=setTimeout(()=>{this.player.playFromStart(),this.delayTimer=null},this.delay)}resetDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}get delay(){const e=this.element.hasAttribute("delay")?+(this.element.getAttribute("delay")||0):0;return Math.max(e,0)}}const Sn={attributes:!0,childList:!1,subtree:!1,attributeOldValue:!0};class wn{constructor(e,i,s){Q(this,"segments"),Q(this,"queue",[]),Q(this,"mouseIn",!1),Q(this,"connected",!1),Q(this,"targetState"),Q(this,"delayTimer",null),Q(this,"mutationTimer",null),Q(this,"intersectionObserver"),Q(this,"observer"),this.player=e,this.element=i,this.targetElement=s,this.onClick=this.onClick.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.handleState(),this.replay()}onConnected(){this.connected=!0,this.targetElement.addEventListener("click",this.onClick),this.targetElement.addEventListener("mouseenter",this.onMouseEnter),this.targetElement.addEventListener("mouseleave",this.onMouseLeave),this.mode[0]==="class"&&this.initMutationObserver(),this.targetState&&(this.loading?this.play(!0):this.initIntersectionObserver())}onDisconnected(){this.connected=!1,this.targetElement.removeEventListener("click",this.onClick),this.targetElement.removeEventListener("mouseenter",this.onMouseEnter),this.targetElement.removeEventListener("mouseleave",this.onMouseLeave),this.cleanup()}onMouseEnter(){this.mode[0]==="hover"&&(this.mouseIn=!0,this.triggerEnter())}onMouseLeave(){this.mode[0]==="hover"&&(this.mouseIn=!1,this.triggerLeave())}onComplete(){this.targetState?(this.resetState(),this.mouseIn&&(this.queue.push(0),this.handleQueue())):this.handleQueue()}onState(){this.handleState()}onClick(){this.clickToReplay&&this.replay()}play(e){this.player.playing||this.delayTimer||(e&&this.delay>0?this.scheduleDelayedPlay():this.player.playFromStart())}replay(){this.player.playing||!this.player.state||!this.intro||(this.targetState=this.player.state,this.player.state=this.intro,this.connected&&this.play())}triggerEnter(){this.queue.push(0),this.handleQueue()}triggerLeave(){this.queue.push(1),this.handleQueue()}scheduleDelayedPlay(){this.resetDelayTimer(),this.delayTimer=setTimeout(()=>{this.player.playFromStart(),this.delayTimer=null},this.delay)}handleQueue(){var e;if(this.player.playing)return;if(this.queue.length>=2){const s=Math.floor(this.queue.length/2)*2;for(let r=0;rn.name===this.player.state);if(!e)return;let i=0;if(e.params.length){const n=parseFloat(e.params[0]);!isNaN(n)&&n>0&&n<=1&&(i=n)}if(!i)return;const s=[e.time,e.time+Math.floor((e.duration+1)*i)],r=[s[1],e.time+e.duration+1];this.segments=[s,r];const a=this.mode;a[0]==="class"&&this.targetElement.classList.contains(a[1])&&(this.player.switchSegment(s),this.player.frame=s[0])}initIntersectionObserver(){if(this.intersectionObserver)return;const e=i=>{i.forEach(s=>{s.isIntersecting&&(this.play(!0),this.resetIntersectionObserver())})};this.intersectionObserver=new IntersectionObserver(e,{threshold:.5}),this.intersectionObserver.observe(this.element)}resetIntersectionObserver(){this.intersectionObserver&&(this.intersectionObserver.unobserve(this.element),this.intersectionObserver=void 0)}initMutationObserver(){this.observer||(this.observer=new MutationObserver(e=>{const i=this.mode;if(i[0]!=="class")return;const s=i[1]||"";for(const r of e)if(r.type==="attributes"&&["class"].includes(r.attributeName)){const a=(r.oldValue||"").split(" ").includes(s),n=(this.targetElement.getAttribute("class")||"").split(" ").includes(s);a!==n&&(clearTimeout(this.mutationTimer),this.mutationTimer=setTimeout(()=>{n?this.triggerEnter():this.triggerLeave()},10))}})),this.observer.observe(this.targetElement,Sn)}resetMutationObserver(){clearTimeout(this.mutationTimer),this.mutationTimer=null,this.observer&&(this.observer.disconnect(),this.observer=void 0)}resetDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}resetState(){return this.targetState?(this.player.state=this.targetState,this.targetState=void 0,!0):!1}resetPlayer(){this.player.direction=1,this.segments&&(this.player.switchSegment([this.segments[0][0],this.segments[1][1]]),this.segments=void 0,this.queue=[])}cleanup(){this.resetPlayer(),this.resetIntersectionObserver(),this.resetMutationObserver(),this.resetDelayTimer(),this.resetState()}get intro(){if(!this.element.hasAttribute("intro"))return null;const e=this.element.getAttribute("intro");let i=this.player.availableStates.find(s=>s.name===e);return i||(i=this.player.availableStates.find(s=>s.name.startsWith("in-"))),i?.name||null}get delay(){const e=this.element.hasAttribute("delay")?+(this.element.getAttribute("delay")||0):0;return Math.max(e,0)}get loading(){return this.element.hasAttribute("loading")}get clickToReplay(){return this.element.hasAttribute("click-to-replay")}get mode(){if(this.element.hasAttribute("mode")){const e=this.element.getAttribute("mode"),i=e?.split(":")||[];if(i.length>0&&["hover","class","manual"].includes(i[0]))return i[0]==="class"?[i[0],i[1]||"active"]:[i[0]]}return["hover"]}}const gi=/^\d*(\.\d+)?$/,In={attributes:!0,childList:!1,subtree:!1};class xn{constructor(e,i,s){Q(this,"sequenceIndex",0),Q(this,"frameState",null),Q(this,"frameDelayFirst",null),Q(this,"frameDelayLast",null),Q(this,"timer"),Q(this,"observer"),this.player=e,this.element=i,this.targetElement=s,this.observer=new MutationObserver(r=>{for(const a of r)a.type==="attributes"&&["sequence","speed"].includes(a.attributeName)&&(this.reset(),this.step())})}onReady(){this.step()}onComplete(){this.timer=setTimeout(()=>{this.timer=null,this.frameDelayLast=null,this.step()},this.frameDelayLast||0)}onConnected(){this.observer.observe(this.element,In),this.player.speed=this.speed}onDisconnected(){this.observer.disconnect(),this.timer&&(clearTimeout(this.timer),this.timer=null),this.player.speed=1}reset(){this.player.pause(),this.player.speed=this.speed,this.sequenceIndex=0,this.frameState=this.frameDelayFirst=this.frameDelayLast=null,this.timer&&(clearTimeout(this.timer),this.timer=null)}takeStep(){const e=this.sequence.split(","),i=e[this.sequenceIndex];this.sequenceIndex++,this.sequenceIndex>=e.length&&(this.sequenceIndex=0);const[s,...r]=i.split(":");return{action:s,params:r}}handleStep(e,i){if(e==="play")this.frameState!==null&&(this.player.state=this.frameState,this.frameState=null),i.includes("reverse")?(this.player.seekToEnd(),this.player.direction=-1):(this.player.seekToStart(),this.player.direction=1),this.timer=setTimeout(()=>{this.timer=null,this.frameDelayFirst=null,this.player.play()},this.frameDelayFirst||0);else if(e==="frame"){this.frameState!==null&&(this.player.state=this.frameState,this.frameState=null);let s=0,r=0;i.length>=1&&i[0].match(gi)&&(s=+i[0]),i.length>=2&&i[1].match(gi)?r=Math.max(0,s,+i[1]):r=s;const a=[s,r],n=this.player.availableStates.find(f=>f.name===this.player.state);n&&(a[0]+=n.time,a[1]+=n.time),s===r?(this.player.frame=s,this.timer=setTimeout(()=>{this.timer=null,this.frameDelayFirst=null,this.step()},this.frameDelayFirst||0)):this.timer=setTimeout(()=>{this.timer=null,this.frameDelayFirst=null,this.player.switchSegment(a),this.player.play()},this.frameDelayFirst||0)}else if(e==="state")this.frameState=i[0]||null,this.step();else if(e==="delay"){let s=null;for(const r of i)r&&r.match(gi)&&(s=+r);s&&s>0&&(i.includes("first")&&i.includes("last")?(this.frameDelayFirst=s,this.frameDelayLast=s):i.includes("first")?this.frameDelayFirst=s:i.includes("last")?this.frameDelayLast=s:this.frameDelayFirst=s),this.step()}else if(e!=="idle")throw new Error(`Invalid sequence action: ${e}`)}step(){const{action:e,params:i}=this.takeStep();e&&this.handleStep(e,i)}get sequence(){return this.element.getAttribute("sequence")||""}get speed(){return this.element.hasAttribute("speed")?+(this.element.getAttribute("speed")||1):1}}function Mn(){Nt.defineTrigger("in",En),Nt.defineTrigger("click",kn),Nt.defineTrigger("hover",Pn),Nt.defineTrigger("loop",Tn),Nt.defineTrigger("loop-on-hover",An),Nt.defineTrigger("morph",wn),Nt.defineTrigger("boomerang",_n),Nt.defineTrigger("sequence",xn),(!customElements.get||!customElements.get("lord-icon"))&&customElements.define("lord-icon",Nt)}Mn();