@dotlottie/player-component
Version:
dotLottie animation player web component.
5 lines (4 loc) • 170 kB
JavaScript
import { a } from './chunk-HDDX7F4A.mjs';
import './chunk-ZWH2ESXT.mjs';
var fa=a((xe,We)=>{typeof navigator<"u"&&function(oe,Kt){typeof xe=="object"&&typeof We<"u"?We.exports=Kt():typeof define=="function"&&define.amd?define(Kt):(oe=typeof globalThis<"u"?globalThis:oe||self,oe.lottie=Kt());}(xe,function(){var oe="http://www.w3.org/2000/svg",Kt="",ns=!1,Xe=-999999,ai=function(t){ns=!!t;},ri=function(){return ns},ni=function(t){Kt=t;},ct=function(){return Kt};function Lt(t){return document.createElement(t)}function Y(t,e){var s,i=t.length,r;for(s=0;s<i;s+=1){r=t[s].prototype;for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e.prototype[a]=r[a]);}}function oi(t){function e(){}return e.prototype=t,e}var hi=function(){function t(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1;}return t.prototype={addAudio:function(e){this.audios.push(e);},pause:function(){var e,s=this.audios.length;for(e=0;e<s;e+=1)this.audios[e].pause();},resume:function(){var e,s=this.audios.length;for(e=0;e<s;e+=1)this.audios[e].resume();},setRate:function(e){var s,i=this.audios.length;for(s=0;s<i;s+=1)this.audios[s].setRate(e);},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0;},seek:function(){this.isPlaying=!1;},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e;},setVolume:function(e){this._volume=e,this._updateVolume();},mute:function(){this._isMuted=!0,this._updateVolume();},unmute:function(){this._isMuted=!1,this._updateVolume();},getVolume:function(){return this._volume},_updateVolume:function(){var e,s=this.audios.length;for(e=0;e<s;e+=1)this.audios[e].volume(this._volume*(this._isMuted?0:1));}},function(){return new t}}(),it=function(){function t(s,i){var r=0,a=[],h;switch(s){case"int16":case"uint8c":h=1;break;default:h=1.1;break}for(r=0;r<i;r+=1)a.push(h);return a}function e(s,i){return s==="float32"?new Float32Array(i):s==="int16"?new Int16Array(i):s==="uint8c"?new Uint8ClampedArray(i):t(s,i)}return typeof Uint8ClampedArray=="function"&&typeof Float32Array=="function"?e:t}();function tt(t){return Array.apply(null,{length:t})}var os=!0,hs=null,ls="",li=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),At=Math.pow,ps=Math.sqrt,Yt=Math.floor,pi=Math.min,fs=150,H=Math.PI/180,Vt=.5519;function Je(t,e,s,i){this.type=t,this.currentTime=e,this.totalTime=s,this.direction=i<0?-1:1;}function us(t,e){this.type=t,this.direction=e<0?-1:1;}function ms(t,e,s,i){this.type=t,this.currentLoop=s,this.totalLoops=e,this.direction=i<0?-1:1;}function ds(t,e,s){this.type=t,this.firstFrame=e,this.totalFrames=s;}function cs(t,e){this.type=t,this.target=e;}function fi(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e;}function ui(t){this.type="configError",this.nativeError=t;}var pt=function(){var t=0;return function(){return t+=1,ls+"__lottie_element_"+t}}();function Ye(t,e,s){var i,r,a,h,m,o,b,_;switch(h=Math.floor(t*6),m=t*6-h,o=s*(1-e),b=s*(1-m*e),_=s*(1-(1-m)*e),h%6){case 0:i=s,r=_,a=o;break;case 1:i=b,r=s,a=o;break;case 2:i=o,r=s,a=_;break;case 3:i=o,r=b,a=s;break;case 4:i=_,r=o,a=s;break;case 5:i=s,r=o,a=b;break}return [i,r,a]}function Ue(t,e,s){var i=Math.max(t,e,s),r=Math.min(t,e,s),a=i-r,h,m=i===0?0:a/i,o=i/255;switch(i){case r:h=0;break;case t:h=e-s+a*(e<s?6:0),h/=6*a;break;case e:h=s-t+a*2,h/=6*a;break;case s:h=t-e+a*4,h/=6*a;break}return [h,m,o]}function gs(t,e){var s=Ue(t[0]*255,t[1]*255,t[2]*255);return s[1]+=e,s[1]>1?s[1]=1:s[1]<=0&&(s[1]=0),Ye(s[0],s[1],s[2])}function ys(t,e){var s=Ue(t[0]*255,t[1]*255,t[2]*255);return s[2]+=e,s[2]>1?s[2]=1:s[2]<0&&(s[2]=0),Ye(s[0],s[1],s[2])}function vs(t,e){var s=Ue(t[0]*255,t[1]*255,t[2]*255);return s[0]+=e/360,s[0]>1?s[0]-=1:s[0]<0&&(s[0]+=1),Ye(s[0],s[1],s[2])}(function(){var t=[],e,s;for(e=0;e<256;e+=1)s=e.toString(16),t[e]=s.length===1?"0"+s:s;return function(i,r,a){return i<0&&(i=0),r<0&&(r=0),a<0&&(a=0),"#"+t[i]+t[r]+t[a]}})();var mi=function(t){os=!!t;},di=function(){return os},ci=function(t){hs=t;},De=function(){return hs},Se=function(t){fs=t;},Me=function(){return fs},gi=function(t){ls=t;};function q(t){return document.createElementNS(oe,t)}function Te(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Te=function(e){return typeof e}:Te=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(t)}var he=function(){var t=1,e=[],s,i,r={onmessage:function(){},postMessage:function(f){s({data:f});}},a={postMessage:function(f){r.onmessage({data:f});}};function h(f){if(window.Worker&&window.Blob&&ri()){var A=new Blob(["var _workerSelf = self; self.onmessage = ",f.toString()],{type:"text/javascript"}),x=URL.createObjectURL(A);return new Worker(x)}return s=f,r}function m(){i||(i=h(function(f){function A(){function k(E,F){var d,y,n=E.length,c,T,D,W;for(y=0;y<n;y+=1)if(d=E[y],"ks"in d&&!d.completed){if(d.completed=!0,d.hasMask){var z=d.masksProperties;for(T=z.length,c=0;c<T;c+=1)if(z[c].pt.k.i)u(z[c].pt.k);else for(W=z[c].pt.k.length,D=0;D<W;D+=1)z[c].pt.k[D].s&&u(z[c].pt.k[D].s[0]),z[c].pt.k[D].e&&u(z[c].pt.k[D].e[0]);}d.ty===0?(d.layers=p(d.refId,F),k(d.layers,F)):d.ty===4?l(d.shapes):d.ty===5&&V(d);}}function S(E,F){if(E){var d=0,y=E.length;for(d=0;d<y;d+=1)E[d].t===1&&(E[d].data.layers=p(E[d].data.refId,F),k(E[d].data.layers,F));}}function g(E,F){for(var d=0,y=F.length;d<y;){if(F[d].id===E)return F[d];d+=1;}return null}function p(E,F){var d=g(E,F);return d?d.layers.__used?JSON.parse(JSON.stringify(d.layers)):(d.layers.__used=!0,d.layers):null}function l(E){var F,d=E.length,y,n;for(F=d-1;F>=0;F-=1)if(E[F].ty==="sh")if(E[F].ks.k.i)u(E[F].ks.k);else for(n=E[F].ks.k.length,y=0;y<n;y+=1)E[F].ks.k[y].s&&u(E[F].ks.k[y].s[0]),E[F].ks.k[y].e&&u(E[F].ks.k[y].e[0]);else E[F].ty==="gr"&&l(E[F].it);}function u(E){var F,d=E.i.length;for(F=0;F<d;F+=1)E.i[F][0]+=E.v[F][0],E.i[F][1]+=E.v[F][1],E.o[F][0]+=E.v[F][0],E.o[F][1]+=E.v[F][1];}function v(E,F){var d=F?F.split("."):[100,100,100];return E[0]>d[0]?!0:d[0]>E[0]?!1:E[1]>d[1]?!0:d[1]>E[1]?!1:E[2]>d[2]?!0:d[2]>E[2]?!1:null}var M=function(){var E=[4,4,14];function F(y){var n=y.t.d;y.t.d={k:[{s:n,t:0}]};}function d(y){var n,c=y.length;for(n=0;n<c;n+=1)y[n].ty===5&&F(y[n]);}return function(y){if(v(E,y.v)&&(d(y.layers),y.assets)){var n,c=y.assets.length;for(n=0;n<c;n+=1)y.assets[n].layers&&d(y.assets[n].layers);}}}(),C=function(){var E=[4,7,99];return function(F){if(F.chars&&!v(E,F.v)){var d,y=F.chars.length;for(d=0;d<y;d+=1){var n=F.chars[d];n.data&&n.data.shapes&&(l(n.data.shapes),n.data.ip=0,n.data.op=99999,n.data.st=0,n.data.sr=1,n.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},F.chars[d].t||(n.data.shapes.push({ty:"no"}),n.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})));}}}}(),w=function(){var E=[5,7,15];function F(y){var n=y.t.p;typeof n.a=="number"&&(n.a={a:0,k:n.a}),typeof n.p=="number"&&(n.p={a:0,k:n.p}),typeof n.r=="number"&&(n.r={a:0,k:n.r});}function d(y){var n,c=y.length;for(n=0;n<c;n+=1)y[n].ty===5&&F(y[n]);}return function(y){if(v(E,y.v)&&(d(y.layers),y.assets)){var n,c=y.assets.length;for(n=0;n<c;n+=1)y.assets[n].layers&&d(y.assets[n].layers);}}}(),I=function(){var E=[4,1,9];function F(y){var n,c=y.length,T,D;for(n=0;n<c;n+=1)if(y[n].ty==="gr")F(y[n].it);else if(y[n].ty==="fl"||y[n].ty==="st")if(y[n].c.k&&y[n].c.k[0].i)for(D=y[n].c.k.length,T=0;T<D;T+=1)y[n].c.k[T].s&&(y[n].c.k[T].s[0]/=255,y[n].c.k[T].s[1]/=255,y[n].c.k[T].s[2]/=255,y[n].c.k[T].s[3]/=255),y[n].c.k[T].e&&(y[n].c.k[T].e[0]/=255,y[n].c.k[T].e[1]/=255,y[n].c.k[T].e[2]/=255,y[n].c.k[T].e[3]/=255);else y[n].c.k[0]/=255,y[n].c.k[1]/=255,y[n].c.k[2]/=255,y[n].c.k[3]/=255;}function d(y){var n,c=y.length;for(n=0;n<c;n+=1)y[n].ty===4&&F(y[n].shapes);}return function(y){if(v(E,y.v)&&(d(y.layers),y.assets)){var n,c=y.assets.length;for(n=0;n<c;n+=1)y.assets[n].layers&&d(y.assets[n].layers);}}}(),N=function(){var E=[4,4,18];function F(y){var n,c=y.length,T,D;for(n=c-1;n>=0;n-=1)if(y[n].ty==="sh")if(y[n].ks.k.i)y[n].ks.k.c=y[n].closed;else for(D=y[n].ks.k.length,T=0;T<D;T+=1)y[n].ks.k[T].s&&(y[n].ks.k[T].s[0].c=y[n].closed),y[n].ks.k[T].e&&(y[n].ks.k[T].e[0].c=y[n].closed);else y[n].ty==="gr"&&F(y[n].it);}function d(y){var n,c,T=y.length,D,W,z,J;for(c=0;c<T;c+=1){if(n=y[c],n.hasMask){var X=n.masksProperties;for(W=X.length,D=0;D<W;D+=1)if(X[D].pt.k.i)X[D].pt.k.c=X[D].cl;else for(J=X[D].pt.k.length,z=0;z<J;z+=1)X[D].pt.k[z].s&&(X[D].pt.k[z].s[0].c=X[D].cl),X[D].pt.k[z].e&&(X[D].pt.k[z].e[0].c=X[D].cl);}n.ty===4&&F(n.shapes);}}return function(y){if(v(E,y.v)&&(d(y.layers),y.assets)){var n,c=y.assets.length;for(n=0;n<c;n+=1)y.assets[n].layers&&d(y.assets[n].layers);}}}();function O(E){E.__complete||(I(E),M(E),C(E),w(E),N(E),k(E.layers,E.assets),S(E.chars,E.assets),E.__complete=!0);}function V(E){E.t.a.length===0&&"m"in E.t.p;}var j={};return j.completeData=O,j.checkColors=I,j.checkChars=C,j.checkPathProperties=w,j.checkShapes=N,j.completeLayers=k,j}if(a.dataManager||(a.dataManager=A()),a.assetLoader||(a.assetLoader=function(){function k(g){var p=g.getResponseHeader("content-type");return p&&g.responseType==="json"&&p.indexOf("json")!==-1||g.response&&Te(g.response)==="object"?g.response:g.response&&typeof g.response=="string"?JSON.parse(g.response):g.responseText?JSON.parse(g.responseText):null}function S(g,p,l,u){var v,M=new XMLHttpRequest;try{M.responseType="json";}catch{}M.onreadystatechange=function(){if(M.readyState===4)if(M.status===200)v=k(M),l(v);else try{v=k(M),l(v);}catch(C){u&&u(C);}};try{M.open(["G","E","T"].join(""),g,!0);}catch{M.open(["G","E","T"].join(""),p+"/"+g,!0);}M.send();}return {load:S}}()),f.data.type==="loadAnimation")a.assetLoader.load(f.data.path,f.data.fullPath,function(k){a.dataManager.completeData(k),a.postMessage({id:f.data.id,payload:k,status:"success"});},function(){a.postMessage({id:f.data.id,status:"error"});});else if(f.data.type==="complete"){var x=f.data.animation;a.dataManager.completeData(x),a.postMessage({id:f.data.id,payload:x,status:"success"});}else f.data.type==="loadData"&&a.assetLoader.load(f.data.path,f.data.fullPath,function(k){a.postMessage({id:f.data.id,payload:k,status:"success"});},function(){a.postMessage({id:f.data.id,status:"error"});});}),i.onmessage=function(f){var A=f.data,x=A.id,k=e[x];e[x]=null,A.status==="success"?k.onComplete(A.payload):k.onError&&k.onError();});}function o(f,A){t+=1;var x="processId_"+t;return e[x]={onComplete:f,onError:A},x}function b(f,A,x){m();var k=o(A,x);i.postMessage({type:"loadAnimation",path:f,fullPath:window.location.origin+window.location.pathname,id:k});}function _(f,A,x){m();var k=o(A,x);i.postMessage({type:"loadData",path:f,fullPath:window.location.origin+window.location.pathname,id:k});}function P(f,A,x){m();var k=o(A,x);i.postMessage({type:"complete",animation:f,id:k});}return {loadAnimation:b,loadData:_,completeAnimation:P}}(),yi=function(){var t=function(){var g=Lt("canvas");g.width=1,g.height=1;var p=g.getContext("2d");return p.fillStyle="rgba(0,0,0,0)",p.fillRect(0,0,1,1),g}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null);}function s(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null);}function i(g,p,l){var u="";if(g.e)u=g.p;else if(p){var v=g.p;v.indexOf("images/")!==-1&&(v=v.split("/")[1]),u=p+v;}else u=l,u+=g.u?g.u:"",u+=g.p;return u}function r(g){var p=0,l=setInterval(function(){var u=g.getBBox();(u.width||p>500)&&(this._imageLoaded(),clearInterval(l)),p+=1;}.bind(this),50);}function a(g){var p=i(g,this.assetsPath,this.path),l=q("image");li?this.testImageLoaded(l):l.addEventListener("load",this._imageLoaded,!1),l.addEventListener("error",function(){u.img=t,this._imageLoaded();}.bind(this),!1),l.setAttributeNS("http://www.w3.org/1999/xlink","href",p),this._elementHelper.append?this._elementHelper.append(l):this._elementHelper.appendChild(l);var u={img:l,assetData:g};return u}function h(g){var p=i(g,this.assetsPath,this.path),l=Lt("img");l.crossOrigin="anonymous",l.addEventListener("load",this._imageLoaded,!1),l.addEventListener("error",function(){u.img=t,this._imageLoaded();}.bind(this),!1),l.src=p;var u={img:l,assetData:g};return u}function m(g){var p={assetData:g},l=i(g,this.assetsPath,this.path);return he.loadData(l,function(u){p.img=u,this._footageLoaded();}.bind(this),function(){p.img={},this._footageLoaded();}.bind(this)),p}function o(g,p){this.imagesLoadedCb=p;var l,u=g.length;for(l=0;l<u;l+=1)g[l].layers||(!g[l].t||g[l].t==="seq"?(this.totalImages+=1,this.images.push(this._createImageData(g[l]))):g[l].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(g[l]))));}function b(g){this.path=g||"";}function _(g){this.assetsPath=g||"";}function P(g){for(var p=0,l=this.images.length;p<l;){if(this.images[p].assetData===g)return this.images[p].img;p+=1;}return null}function f(){this.imagesLoadedCb=null,this.images.length=0;}function A(){return this.totalImages===this.loadedAssets}function x(){return this.totalFootages===this.loadedFootagesCount}function k(g,p){g==="svg"?(this._elementHelper=p,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this);}function S(){this._imageLoaded=e.bind(this),this._footageLoaded=s.bind(this),this.testImageLoaded=r.bind(this),this.createFootageData=m.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[];}return S.prototype={loadAssets:o,setAssetsPath:_,setPath:b,loadedImages:A,loadedFootages:x,destroy:f,getAsset:P,createImgData:h,createImageData:a,imageLoaded:e,footageLoaded:s,setCacheType:k},S}();function bs(){}bs.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var s=this._cbs[t],i=0;i<s.length;i+=1)s[i](e);},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e);}.bind(this)},removeEventListener:function(t,e){if(!e)this._cbs[t]=null;else if(this._cbs[t]){for(var s=0,i=this._cbs[t].length;s<i;)this._cbs[t][s]===e&&(this._cbs[t].splice(s,1),s-=1,i-=1),s+=1;this._cbs[t].length||(this._cbs[t]=null);}}};var vi=function(){function t(e){for(var s=e.split(`\r
`),i={},r,a=0,h=0;h<s.length;h+=1)r=s[h].split(":"),r.length===2&&(i[r[0]]=r[1].trim(),a+=1);if(a===0)throw new Error;return i}return function(e){for(var s=[],i=0;i<e.length;i+=1){var r=e[i],a={time:r.tm,duration:r.dr};try{a.payload=JSON.parse(e[i].cm);}catch{try{a.payload=t(e[i].cm);}catch{a.payload={name:e[i].cm};}}s.push(a);}return s}}(),bi=function(){function t(e){this.compositions.push(e);}return function(){function e(s){for(var i=0,r=this.compositions.length;i<r;){if(this.compositions[i].data&&this.compositions[i].data.nm===s)return this.compositions[i].prepareFrame&&this.compositions[i].data.xt&&this.compositions[i].prepareFrame(this.currentFrame),this.compositions[i].compInterface;i+=1;}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),le={},_i=function(t,e){le[t]=e;};function ki(t){return le[t]}function Ai(){if(le.canvas)return "canvas";for(var t in le)if(le[t])return t;return ""}function pe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pe=function(e){return typeof e}:pe=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pe(t)}var B=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=pt(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=di(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=bi(),this.imagePreloader=new yi,this.audioController=hi(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new Je("drawnFrame",0,0,0),this.expressionsPlugin=De();};Y([bs],B),B.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);var s=ki(e);this.renderer=new s(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),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.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),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")),he.loadAnimation(t.path,this.configAnimation,this.onSetupError));},B.prototype.onSetupError=function(){this.trigger("data_failed");},B.prototype.setupAnimation=function(t){he.completeAnimation(t,this.configAnimation);},B.prototype.setData=function(t,e){e&&pe(e)!=="object"&&(e=JSON.parse(e));var s={wrapper:t,animationData:e},i=t.attributes;s.path=i.getNamedItem("data-animation-path")?i.getNamedItem("data-animation-path").value:i.getNamedItem("data-bm-path")?i.getNamedItem("data-bm-path").value:i.getNamedItem("bm-path")?i.getNamedItem("bm-path").value:"",s.animType=i.getNamedItem("data-anim-type")?i.getNamedItem("data-anim-type").value:i.getNamedItem("data-bm-type")?i.getNamedItem("data-bm-type").value:i.getNamedItem("bm-type")?i.getNamedItem("bm-type").value:i.getNamedItem("data-bm-renderer")?i.getNamedItem("data-bm-renderer").value:i.getNamedItem("bm-renderer")?i.getNamedItem("bm-renderer").value:Ai()||"canvas";var r=i.getNamedItem("data-anim-loop")?i.getNamedItem("data-anim-loop").value:i.getNamedItem("data-bm-loop")?i.getNamedItem("data-bm-loop").value:i.getNamedItem("bm-loop")?i.getNamedItem("bm-loop").value:"";r==="false"?s.loop=!1:r==="true"?s.loop=!0:r!==""&&(s.loop=parseInt(r,10));var a=i.getNamedItem("data-anim-autoplay")?i.getNamedItem("data-anim-autoplay").value:i.getNamedItem("data-bm-autoplay")?i.getNamedItem("data-bm-autoplay").value:i.getNamedItem("bm-autoplay")?i.getNamedItem("bm-autoplay").value:!0;s.autoplay=a!=="false",s.name=i.getNamedItem("data-name")?i.getNamedItem("data-name").value:i.getNamedItem("data-bm-name")?i.getNamedItem("data-bm-name").value:i.getNamedItem("bm-name")?i.getNamedItem("bm-name").value:"";var h=i.getNamedItem("data-anim-prerender")?i.getNamedItem("data-anim-prerender").value:i.getNamedItem("data-bm-prerender")?i.getNamedItem("data-bm-prerender").value:i.getNamedItem("bm-prerender")?i.getNamedItem("bm-prerender").value:"";h==="false"&&(s.prerender=!1),s.path?this.setParams(s):this.trigger("destroy");},B.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,s,i=e.length,r=t.layers,a,h=r.length;for(a=0;a<h;a+=1)for(s=0;s<i;){if(e[s].id===r[a].id){e[s]=r[a];break}s+=1;}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(i=t.assets.length,s=0;s<i;s+=1)this.animationData.assets.push(t.assets[s]);this.animationData.__complete=!1,he.completeAnimation(this.animationData,this.onSegmentComplete);},B.prototype.onSegmentComplete=function(t){this.animationData=t;var e=De();e&&e.initExpressions(this),this.loadNextSegment();},B.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||t.length===0||!this.autoloadSegments){this.trigger("data_ready"),this.timeCompleted=this.totalFrames;return}var e=t.shift();this.timeCompleted=e.time*this.frameRate;var s=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,he.loadData(s,this.includeLayers.bind(this),function(){this.trigger("data_failed");}.bind(this));},B.prototype.loadSegments=function(){var t=this.animationData.segments;t||(this.timeCompleted=this.totalFrames),this.loadNextSegment();},B.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded();},B.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this));},B.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=vi(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause();}catch(e){this.triggerConfigError(e);}},B.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20));},B.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!=="canvas")&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=De();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded");}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play();}},B.prototype.resize=function(t,e){var s=typeof t=="number"?t:void 0,i=typeof e=="number"?e:void 0;this.renderer.updateContainerSize(s,i);},B.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t;},B.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame");},B.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);}},B.prototype.play=function(t){t&&this.name!==t||this.isPaused===!0&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")));},B.prototype.pause=function(t){t&&this.name!==t||this.isPaused===!1&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause());},B.prototype.togglePause=function(t){t&&this.name!==t||(this.isPaused===!0?this.play():this.pause());},B.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0));},B.prototype.getMarkerData=function(t){for(var e,s=0;s<this.markers.length;s+=1)if(e=this.markers[s],e.payload&&e.payload.name===t)return e;return null},B.prototype.goToAndStop=function(t,e,s){if(!(s&&this.name!==s)){var i=Number(t);if(isNaN(i)){var r=this.getMarkerData(t);r&&this.goToAndStop(r.time,!0);}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause();}},B.prototype.goToAndPlay=function(t,e,s){if(!(s&&this.name!==s)){var i=Number(t);if(isNaN(i)){var r=this.getMarkerData(t);r&&(r.duration?this.playSegments([r.time,r.time+r.duration],!0):this.goToAndStop(r.time,!0));}else this.goToAndStop(i,e,s);this.play();}},B.prototype.advanceTime=function(t){if(!(this.isPaused===!0||this.isLoaded===!1)){var e=this.currentRawFrame+t*this.frameModifier,s=!1;e>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(s=!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):(s=!0,e=0)):this.setCurrentRawFrameValue(e),s&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"));}},B.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>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");},B.prototype.setSegment=function(t,e){var s=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?s=t:this.currentRawFrame+this.firstFrame>e&&(s=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,s!==-1&&this.goToAndStop(s,!0);},B.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),pe(t[0])==="object"){var s,i=t.length;for(s=0;s<i;s+=1)this.segments.push(t[s]);}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play();},B.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0);},B.prototype.checkSegments=function(t){return this.segments.length?(this.adjustSegment(this.segments.shift(),t),!0):!1},B.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null);},B.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame();},B.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier();},B.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier();},B.prototype.setLoop=function(t){this.loop=t;},B.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t);},B.prototype.getVolume=function(){return this.audioController.getVolume()},B.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute();},B.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute();},B.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection);},B.prototype.getPath=function(){return this.path},B.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var s=t.p;s.indexOf("images/")!==-1&&(s=s.split("/")[1]),e=this.assetsPath+s;}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},B.prototype.getAssetData=function(t){for(var e=0,s=this.assets.length;e<s;){if(t===this.assets[e].id)return this.assets[e];e+=1;}return null},B.prototype.hide=function(){this.renderer.hide();},B.prototype.show=function(){this.renderer.show();},B.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},B.prototype.updateDocumentData=function(t,e,s){try{var i=this.renderer.getElementByPath(t);i.updateDocumentData(e,s);}catch{}},B.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new Je(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(t,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(t,new ms(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new us(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new ds(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new cs(t,this));break;default:this.triggerEvent(t);}t==="enterFrame"&&this.onEnterFrame&&this.onEnterFrame.call(this,new Je(t,this.currentFrame,this.totalFrames,this.frameMult)),t==="loopComplete"&&this.onLoopComplete&&this.onLoopComplete.call(this,new ms(t,this.loop,this.playCount,this.frameMult)),t==="complete"&&this.onComplete&&this.onComplete.call(this,new us(t,this.frameMult)),t==="segmentStart"&&this.onSegmentStart&&this.onSegmentStart.call(this,new ds(t,this.firstFrame,this.totalFrames)),t==="destroy"&&this.onDestroy&&this.onDestroy.call(this,new cs(t,this));},B.prototype.triggerRenderFrameError=function(t){var e=new fi(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e);},B.prototype.triggerConfigError=function(t){var e=new ui(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e);};var et=function(){var t={},e=[],s=0,i=0,r=0,a=!0,h=!1;function m(d){for(var y=0,n=d.target;y<i;)e[y].animation===n&&(e.splice(y,1),y-=1,i-=1,n.isPaused||P()),y+=1;}function o(d,y){if(!d)return null;for(var n=0;n<i;){if(e[n].elem===d&&e[n].elem!==null)return e[n].animation;n+=1;}var c=new B;return f(c,d),c.setData(d,y),c}function b(){var d,y=e.length,n=[];for(d=0;d<y;d+=1)n.push(e[d].animation);return n}function _(){r+=1,N();}function P(){r-=1;}function f(d,y){d.addEventListener("destroy",m),d.addEventListener("_active",_),d.addEventListener("_idle",P),e.push({elem:y,animation:d}),i+=1;}function A(d){var y=new B;return f(y,null),y.setParams(d),y}function x(d,y){var n;for(n=0;n<i;n+=1)e[n].animation.setSpeed(d,y);}function k(d,y){var n;for(n=0;n<i;n+=1)e[n].animation.setDirection(d,y);}function S(d){var y;for(y=0;y<i;y+=1)e[y].animation.play(d);}function g(d){var y=d-s,n;for(n=0;n<i;n+=1)e[n].animation.advanceTime(y);s=d,r&&!h?window.requestAnimationFrame(g):a=!0;}function p(d){s=d,window.requestAnimationFrame(g);}function l(d){var y;for(y=0;y<i;y+=1)e[y].animation.pause(d);}function u(d,y,n){var c;for(c=0;c<i;c+=1)e[c].animation.goToAndStop(d,y,n);}function v(d){var y;for(y=0;y<i;y+=1)e[y].animation.stop(d);}function M(d){var y;for(y=0;y<i;y+=1)e[y].animation.togglePause(d);}function C(d){var y;for(y=i-1;y>=0;y-=1)e[y].animation.destroy(d);}function w(d,y,n){var c=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),T,D=c.length;for(T=0;T<D;T+=1)n&&c[T].setAttribute("data-bm-type",n),o(c[T],d);if(y&&D===0){n||(n="svg");var W=document.getElementsByTagName("body")[0];W.innerText="";var z=Lt("div");z.style.width="100%",z.style.height="100%",z.setAttribute("data-bm-type",n),W.appendChild(z),o(z,d);}}function I(){var d;for(d=0;d<i;d+=1)e[d].animation.resize();}function N(){!h&&r&&a&&(window.requestAnimationFrame(p),a=!1);}function O(){h=!0;}function V(){h=!1,N();}function j(d,y){var n;for(n=0;n<i;n+=1)e[n].animation.setVolume(d,y);}function E(d){var y;for(y=0;y<i;y+=1)e[y].animation.mute(d);}function F(d){var y;for(y=0;y<i;y+=1)e[y].animation.unmute(d);}return t.registerAnimation=o,t.loadAnimation=A,t.setSpeed=x,t.setDirection=k,t.play=S,t.pause=l,t.stop=v,t.togglePause=M,t.searchAnimations=w,t.resize=I,t.goToAndStop=u,t.destroy=C,t.freeze=O,t.unfreeze=V,t.setVolume=j,t.mute=E,t.unmute=F,t.getRegisteredAnimations=b,t}(),fe=function(){var t={};t.getBezierEasing=s;var e={};function s(p,l,u,v,M){var C=M||("bez_"+p+"_"+l+"_"+u+"_"+v).replace(/\./g,"p");if(e[C])return e[C];var w=new g([p,l,u,v]);return e[C]=w,w}var i=4,r=.001,a=1e-7,h=10,m=11,o=1/(m-1),b=typeof Float32Array=="function";function _(p,l){return 1-3*l+3*p}function P(p,l){return 3*l-6*p}function f(p){return 3*p}function A(p,l,u){return ((_(l,u)*p+P(l,u))*p+f(l))*p}function x(p,l,u){return 3*_(l,u)*p*p+2*P(l,u)*p+f(l)}function k(p,l,u,v,M){var C,w,I=0;do w=l+(u-l)/2,C=A(w,v,M)-p,C>0?u=w:l=w;while(Math.abs(C)>a&&++I<h);return w}function S(p,l,u,v){for(var M=0;M<i;++M){var C=x(l,u,v);if(C===0)return l;var w=A(l,u,v)-p;l-=w/C;}return l}function g(p){this._p=p,this._mSampleValues=b?new Float32Array(m):new Array(m),this._precomputed=!1,this.get=this.get.bind(this);}return g.prototype={get:function(p){var l=this._p[0],u=this._p[1],v=this._p[2],M=this._p[3];return this._precomputed||this._precompute(),l===u&&v===M?p:p===0?0:p===1?1:A(this._getTForX(p),u,M)},_precompute:function(){var p=this._p[0],l=this._p[1],u=this._p[2],v=this._p[3];this._precomputed=!0,(p!==l||u!==v)&&this._calcSampleValues();},_calcSampleValues:function(){for(var p=this._p[0],l=this._p[2],u=0;u<m;++u)this._mSampleValues[u]=A(u*o,p,l);},_getTForX:function(p){for(var l=this._p[0],u=this._p[2],v=this._mSampleValues,M=0,C=1,w=m-1;C!==w&&v[C]<=p;++C)M+=o;--C;var I=(p-v[C])/(v[C+1]-v[C]),N=M+I*o,O=x(N,l,u);return O>=r?S(p,N,l,u):O===0?N:k(p,M,M+o,l,u)}},t}(),_s=function(){function t(e){return e.concat(tt(e.length))}return {double:t}}(),Ce=function(){return function(t,e,s){var i=0,r=t,a=tt(r),h={newElement:m,release:o};function m(){var b;return i?(i-=1,b=a[i]):b=e(),b}function o(b){i===r&&(a=_s.double(a),r*=2),s&&s(b),a[i]=b,i+=1;}return h}}(),ks=function(){function t(){return {addedLength:0,percents:it("float32",Me()),lengths:it("float32",Me())}}return Ce(8,t)}(),As=function(){function t(){return {lengths:[],totalLength:0}}function e(s){var i,r=s.lengths.length;for(i=0;i<r;i+=1)ks.release(s.lengths[i]);s.lengths.length=0;}return Ce(8,t,e)}();function Pi(){var t=Math;function e(f,A,x,k,S,g){var p=f*k+A*S+x*g-S*k-g*f-x*A;return p>-.001&&p<.001}function s(f,A,x,k,S,g,p,l,u){if(x===0&&g===0&&u===0)return e(f,A,k,S,p,l);var v=t.sqrt(t.pow(k-f,2)+t.pow(S-A,2)+t.pow(g-x,2)),M=t.sqrt(t.pow(p-f,2)+t.pow(l-A,2)+t.pow(u-x,2)),C=t.sqrt(t.pow(p-k,2)+t.pow(l-S,2)+t.pow(u-g,2)),w;return v>M?v>C?w=v-M-C:w=C-M-v:C>M?w=C-M-v:w=M-v-C,w>-1e-4&&w<1e-4}var i=function(){return function(f,A,x,k){var S=Me(),g,p,l,u,v,M=0,C,w=[],I=[],N=ks.newElement();for(l=x.length,g=0;g<S;g+=1){for(v=g/(S-1),C=0,p=0;p<l;p+=1)u=At(1-v,3)*f[p]+3*At(1-v,2)*v*x[p]+3*(1-v)*At(v,2)*k[p]+At(v,3)*A[p],w[p]=u,I[p]!==null&&(C+=At(w[p]-I[p],2)),I[p]=w[p];C&&(C=ps(C),M+=C),N.percents[g]=v,N.lengths[g]=M;}return N.addedLength=M,N}}();function r(f){var A=As.newElement(),x=f.c,k=f.v,S=f.o,g=f.i,p,l=f._length,u=A.lengths,v=0;for(p=0;p<l-1;p+=1)u[p]=i(k[p],k[p+1],S[p],g[p+1]),v+=u[p].addedLength;return x&&l&&(u[p]=i(k[p],k[0],S[p],g[0]),v+=u[p].addedLength),A.totalLength=v,A}function a(f){this.segmentLength=0,this.points=new Array(f);}function h(f,A){this.partialLength=f,this.point=A;}var m=function(){var f={};return function(A,x,k,S){var g=(A[0]+"_"+A[1]+"_"+x[0]+"_"+x[1]+"_"+k[0]+"_"+k[1]+"_"+S[0]+"_"+S[1]).replace(/\./g,"p");if(!f[g]){var p=Me(),l,u,v,M,C,w=0,I,N,O=null;A.length===2&&(A[0]!==x[0]||A[1]!==x[1])&&e(A[0],A[1],x[0],x[1],A[0]+k[0],A[1]+k[1])&&e(A[0],A[1],x[0],x[1],x[0]+S[0],x[1]+S[1])&&(p=2);var V=new a(p);for(v=k.length,l=0;l<p;l+=1){for(N=tt(v),C=l/(p-1),I=0,u=0;u<v;u+=1)M=At(1-C,3)*A[u]+3*At(1-C,2)*C*(A[u]+k[u])+3*(1-C)*At(C,2)*(x[u]+S[u])+At(C,3)*x[u],N[u]=M,O!==null&&(I+=At(N[u]-O[u],2));I=ps(I),w+=I,V.points[l]=new h(I,N),O=N;}V.segmentLength=w,f[g]=V;}return f[g]}}();function o(f,A){var x=A.percents,k=A.lengths,S=x.length,g=Yt((S-1)*f),p=f*A.addedLength,l=0;if(g===S-1||g===0||p===k[g])return x[g];for(var u=k[g]>p?-1:1,v=!0;v;)if(k[g]<=p&&k[g+1]>p?(l=(p-k[g])/(k[g+1]-k[g]),v=!1):g+=u,g<0||g>=S-1){if(g===S-1)return x[g];v=!1;}return x[g]+(x[g+1]-x[g])*l}function b(f,A,x,k,S,g){var p=o(S,g),l=1-p,u=t.round((l*l*l*f[0]+(p*l*l+l*p*l+l*l*p)*x[0]+(p*p*l+l*p*p+p*l*p)*k[0]+p*p*p*A[0])*1e3)/1e3,v=t.round((l*l*l*f[1]+(p*l*l+l*p*l+l*l*p)*x[1]+(p*p*l+l*p*p+p*l*p)*k[1]+p*p*p*A[1])*1e3)/1e3;return [u,v]}var _=it("float32",8);function P(f,A,x,k,S,g,p){S<0?S=0:S>1&&(S=1);var l=o(S,p);g=g>1?1:g;var u=o(g,p),v,M=f.length,C=1-l,w=1-u,I=C*C*C,N=l*C*C*3,O=l*l*C*3,V=l*l*l,j=C*C*w,E=l*C*w+C*l*w+C*C*u,F=l*l*w+C*l*u+l*C*u,d=l*l*u,y=C*w*w,n=l*w*w+C*u*w+C*w*u,c=l*u*w+C*u*u+l*w*u,T=l*u*u,D=w*w*w,W=u*w*w+w*u*w+w*w*u,z=u*u*w+w*u*u+u*w*u,J=u*u*u;for(v=0;v<M;v+=1)_[v*4]=t.round((I*f[v]+N*x[v]+O*k[v]+V*A[v])*1e3)/1e3,_[v*4+1]=t.round((j*f[v]+E*x[v]+F*k[v]+d*A[v])*1e3)/1e3,_[v*4+2]=t.round((y*f[v]+n*x[v]+c*k[v]+T*A[v])*1e3)/1e3,_[v*4+3]=t.round((D*f[v]+W*x[v]+z*k[v]+J*A[v])*1e3)/1e3;return _}return {getSegmentsLength:r,getNewSegment:P,getPointInSegment:b,buildBezierData:m,pointOnLine2D:e,pointOnLine3D:s}}var Pt=Pi(),Ut=Xe,Ps=Math.abs;function xs(t,e){var s=this.offsetTime,i;this.propType==="multidimensional"&&(i=it("float32",this.pv.length));for(var r=e.lastIndex,a=r,h=this.keyframes.length-1,m=!0,o,b,_;m;){if(o=this.keyframes[a],b=this.keyframes[a+1],a===h-1&&t>=b.t-s){o.h&&(o=b),r=0;break}if(b.t-s>t){r=a;break}a<h-1?a+=1:(r=0,m=!1);}_=this.keyframesMetadata[a]||{};var P,f,A,x,k,S,g=b.t-s,p=o.t-s,l;if(o.to){_.bezierData||(_.bezierData=Pt.buildBezierData(o.s,b.s||o.e,o.to,o.ti));var u=_.bezierData;if(t>=g||t<p){var v=t>=g?u.points.length-1:0;for(f=u.points[v].point.length,P=0;P<f;P+=1)i[P]=u.points[v].point[P];}else {_.__fnct?S=_.__fnct:(S=fe.getBezierEasing(o.o.x,o.o.y,o.i.x,o.i.y,o.n).get,_.__fnct=S),A=S((t-p)/(g-p));var M=u.segmentLength*A,C,w=e.lastFrame<t&&e._lastKeyframeIndex===a?e._lastAddedLength:0;for(k=e.lastFrame<t&&e._lastKeyframeIndex===a?e._lastPoint:0,m=!0,x=u.points.length;m;){if(w+=u.points[k].partialLength,M===0||A===0||k===u.points.length-1){for(f=u.points[k].point.length,P=0;P<f;P+=1)i[P]=u.points[k].point[P];break}else if(M>=w&&M<w+u.points[k+1].partialLength){for(C=(M-w)/u.points[k+1].partialLength,f=u.points[k].point.length,P=0;P<f;P+=1)i[P]=u.points[k].point[P]+(u.points[k+1].point[P]-u.points[k].point[P])*C;break}k<x-1?k+=1:m=!1;}e._lastPoint=k,e._lastAddedLength=w-u.points[k].partialLength,e._lastKeyframeIndex=a;}}else {var I,N,O,V,j;if(h=o.s.length,l=b.s||o.e,this.sh&&o.h!==1)if(t>=g)i[0]=l[0],i[1]=l[1],i[2]=l[2];else if(t<=p)i[0]=o.s[0],i[1]=o.s[1],i[2]=o.s[2];else {var E=Ds(o.s),F=Ds(l),d=(t-p)/(g-p);Di(i,xi(E,F,d));}else for(a=0;a<h;a+=1)o.h!==1&&(t>=g?A=1:t<p?A=0:(o.o.x.constructor===Array?(_.__fnct||(_.__fnct=[]),_.__fnct[a]?S=_.__fnct[a]:(I=o.o.x[a]===void 0?o.o.x[0]:o.o.x[a],N=o.o.y[a]===void 0?o.o.y[0]:o.o.y[a],O=o.i.x[a]===void 0?o.i.x[0]:o.i.x[a],V=o.i.y[a]===void 0?o.i.y[0]:o.i.y[a],S=fe.getBezierEasing(I,N,O,V).get,_.__fnct[a]=S)):_.__fnct?S=_.__fnct:(I=o.o.x,N=o.o.y,O=o.i.x,V=o.i.y,S=fe.getBezierEasing(I,N,O,V).get,o.keyframeMetadata=S),A=S((t-p)/(g-p)))),l=b.s||o.e,j=o.h===1?o.s[a]:o.s[a]+(l[a]-o.s[a])*A,this.propType==="multidimensional"?i[a]=j:i=j;}return e.lastIndex=r,i}function xi(t,e,s){var i=[],r=t[0],a=t[1],h=t[2],m=t[3],o=e[0],b=e[1],_=e[2],P=e[3],f,A,x,k,S;return A=r*o+a*b+h*_+m*P,A<0&&(A=-A,o=-o,b=-b,_=-_,P=-P),1-A>1e-6?(f=Math.acos(A),x=Math.sin(f),k=Math.sin((1-s)*f)/x,S=Math.sin(s*f)/x):(k=1-s,S=s),i[0]=k*r+S*o,i[1]=k*a+S*b,i[2]=k*h+S*_,i[3]=k*m+S*P,i}function Di(t,e){var s=e[0],i=e[1],r=e[2],a=e[3],h=Math.atan2(2*i*a-2*s*r,1-2*i*i-2*r*r),m=Math.asin(2*s*i+2*r*a),o=Math.atan2(2*s*a-2*i*r,1-2*s*s-2*r*r);t[0]=h/H,t[1]=m/H,t[2]=o/H;}function Ds(t){var e=t[0]*H,s=t[1]*H,i=t[2]*H,r=Math.cos(e/2),a=Math.cos(s/2),h=Math.cos(i/2),m=Math.sin(e/2),o=Math.sin(s/2),b=Math.sin(i/2),_=r*a*h-m*o*b,P=m*o*h+r*a*b,f=m*a*h+r*o*b,A=r*o*h-m*a*b;return [P,f,A,_]}function Ss(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,s=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==Ut&&(this._caching.lastFrame>=s&&t>=s||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var i=this.interpolateValue(t,this._caching);this.pv=i;}return this._caching.lastFrame=t,this.pv}function we(t){var e;if(this.propType==="unidimensional")e=t*this.mult,Ps(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var s=0,i=this.v.length;s<i;)e=t[s]*this.mult,Ps(this.v[s]-e)>1e-5&&(this.v[s]=e,this._mdf=!0),s+=1;}function Ee(){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,s=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)s=this.effectsSequence[t](s);this.setVValue(s),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId;}}function Fe(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this);}function Si(t,e,s,i){this.propType="unidimensional",this.mult=s||1,this.data=e,this.v=s?e.k*s:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=Ee,this.setVValue=we,this.addEffect=Fe;}function Mi(t,e,s,i){this.propType="multidimensional",this.mult=s||1,this.data=e,this._mdf=!1,this.elem=t,this.container=i,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var r,a=e.k.length;for(this.v=it("float32",a),this.pv=it("float32",a),this.vel=it("float32",a),r=0;r<a;r+=1)this.v[r]=e.k[r]*this.mult,this.pv[r]=e.k[r];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=Ee,this.setVValue=we,this.addEffect=Fe;}function Ti(t,e,s,i){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:Ut,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=s||1,this.elem=t,this.container=i,this.comp=t.comp,this.v=Ut,this.pv=Ut,this._isFirstFrame=!0,this.getValue=Ee,this.setVValue=we,this.interpolateValue=xs,this.effectsSequence=[Ss.bind(this)],this.addEffect=Fe;}function Ci(t,e,s,i){this.propType="multidimensional";var r,a=e.k.length,h,m,o,b;for(r=0;r<a-1;r+=1)e.k[r].to&&e.k[r].s&&e.k[r+1]&&e.k[r+1].s&&(h=e.k[r].s,m=e.k[r+1].s,o=e.k[r].to,b=e.k[r].ti,(h.length===2&&!(h[0]===m[0]&&h[1]===m[1])&&Pt.pointOnLine2D(h[0],h[1],m[0],m[1],h[0]+o[0],h[1]+o[1])&&Pt.pointOnLine2D(h[0],h[1],m[0],m[1],m[0]+b[0],m[1]+b[1])||h.length===3&&!(h[0]===m[0]&&h[1]===m[1]&&h[2]===m[2])&&Pt.pointOnLine3D(h[0],h[1],h[2],m[0],m[1],m[2],h[0]+o[0],h[1]+o[1],h[2]+o[2])&&Pt.pointOnLine3D(h[0],h[1],h[2],m[0],m[1],m[2],m[0]+b[0],m[1]+b[1],m[2]+b[2]))&&(e.k[r].to=null,e.k[r].ti=null),h[0]===m[0]&&h[1]===m[1]&&o[0]===0&&o[1]===0&&b[0]===0&&b[1]===0&&(h.length===2||h[2]===m[2]&&o[2]===0&&b[2]===0)&&(e.k[r].to=null,e.k[r].ti=null));this.effectsSequence=[Ss.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=s||1,this.elem=t,this.container=i,this.comp=t.comp,this.getValue=Ee,this.setVValue=we,this.interpolateValue=xs,this.frameId=-1;var _=e.k[0].s.length;for(this.v=it("float32",_),this.pv=it("float32",_),r=0;r<_;r+=1)this.v[r]=Ut,this.pv[r]=Ut;this._caching={lastFrame:Ut,lastIndex:0,value:it("float32",_)},this.addEffect=Fe;}var L=function(){function t(s,i,r,a,h){i.sid&&(i=s.globalData.slotManager.getProp(i));var m;if(!i.k.length)m=new Si(s,i,a,h);else if(typeof i.k[0]=="number")m=new Mi(s,i,a,h);else switch(r){case 0:m=new Ti(s,i,a,h);break;case 1:m=new Ci(s,i,a,h);break}return m.effectsSequence.length&&h.addDynamicProperty(m),m}var e={getProp:t};return e}();function at(){}at.prototype={addDynamicProperty:function(t){this.dynamicProperties.indexOf(t)===-1&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0);},iterateDynamicProperties:function(){this._mdf=!1;var t,e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0);},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1;}};var Zt=function(){function t(){return it("float32",2)}return Ce(8,t)}();function Mt(){this.c=!1,this._length=0,this._maxLength=8,this.v=tt(this._maxLength),this.o=tt(this._maxLength),this.i=tt(this._maxLength);}Mt.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var s=0;s<e;)this.v[s]=Zt.newElement(),this.o[s]=Zt.newElement(),this.i[s]=Zt.newElement(),s+=1;},Mt.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t;},Mt.prototype.doubleArrayLength=function(){this.v=this.v.concat(tt(this._maxLength)),this.i=this.i.concat(tt(this._maxLength)),this.o=this.o.concat(tt(this._maxLength)),this._maxLength*=2;},Mt.prototype.setXYAt=function(t,e,s,i,r){var a;switch(this._length=Math.max(this._length,i+1),this._length>=this._maxLength&&this.doubleArrayLength(),s){case"v":a=this.v;break;case"i":a=this.i;break;case"o":a=this.o;break;default:a=[];break}(!a[i]||a[i]&&!r)&&(a[i]=Zt.newElement()),a[i][0]=t,a[i][1]=e;},Mt.prototype.setTripleAt=function(t,e,s,i,r,a,h,m){this.setXYAt(t,e,"v",h,m),this.setXYAt(s,i,"o",h,m),this.setXYAt(r,a,"i",h,m);},Mt.prototype.reverse=function(){var t=new Mt;t.setPathData(this.c,this._length);var e=this.v,s=this.o,i=this.i,r=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],i[0][0],i[0][1],s[0][0],s[0][1],0,!1),r=1);var a=this._length-1,h=this._length,m;for(m=r;m<h;m+=1)t.setTripleAt(e[a][0],e[a][1],i[a][0],i[a][1],s[a][0],s[a][1],m,!1),a-=1;return t},Mt.prototype.length=function(){return this._length};var nt=function(){function t(){return new Mt}function e(r){var a=r._length,h;for(h=0;h<a;h+=1)Zt.release(r.v[h]),Zt.release(r.i[h]),Zt.release(r.o[h]),r.v[h]=null,r.i[h]=null,r.o[h]=null;r._length=0,r.c=!1;}function s(r){var a=i.newElement(),h,m=r._length===void 0?r.v.length:r._length;for(a.setLength(m),a.c=r.c,h=0;h<m;h+=1)a.setTripleAt(r.v[h][0],r.v[h][1],r.o[h][0],r.o[h][1],r.i[h][0],r.i[h][1],h);return a}var i=Ce(4,t,e);return i.clone=s,i}();function Ze(){this._length=0,this._maxLength=4,this.shapes=tt(this._maxLength);}Ze.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(tt(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1;},Ze.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)nt.release(this.shapes[t]);this._length=0;};var te=function(){var t={newShapeCollection:r,release:a},e=0,s=4,i=tt(s);function r(){var h;return e?(e-=1,h=i[e]):h=new Ze,h}function a(h){var m,o=h._length;for(m=0;m<o;m+=1)nt.release(h.shapes[m]);h._length=0,e===s&&(i=_s.double(i),s*=2),i[e]=h,e+=1;}return t}(),Ie=function(){var t=-999999;function e(g,p,l){var u=l.lastIndex,v,M,C,w,I,N,O,V,j,E=this.keyframes;if(g<E[0].t-this.offsetTime)v=E[0].s[0],C=!0,u=0;else if(g>=E[E.length-1].t-this.offsetTime)v=E[E.length-1].s?E[E.length-1].s[0]:E[E.length-2].e[0],C=!0;else {for(var F=u,d=E.length-1,y=!0,n,c,T;y&&(n=E[F],c=E[F+1],!(c.t-this.offsetTime>g));)F<d-1?F+=1:y=!1;if(T=this.keyframesMetadata[F]||{},C=n.h===1,u=F,!C){if(g>=c.t-this.offsetTime)V=1;else if(g<n.t-this.offsetTime)V=0;else {var D;T.__fnct?D=T.__fnct:(D=fe.getBezierEasing(n.o.x,n.o.y,n.i.x,n.i.y).get,T.__fnct=D),V=D((g-(n.t-this.offsetTime))/(c.t-this.offsetTime-(n.t-this.offsetTime)));}M=c.s?c.s[0]:n.e[0];}v=n.s[0];}for(N=p._length,O=v.i[0].length,l.lastIndex=u,w=0;w<N;w+=1)for(I=0;I<O;I+=1)j=C?v.i[w][I]:v.i[w][I]+(M.i[w][I]-v.i[w][I])*V,p.i[w][I]=j,j=C?v.o[w][I]:v.o[w][I]+(M.o[w][I]-v.o[w][I])*V,p.o[w][I]=j,j=C?v.v[w][I]:v.v[w][I]+(M.v[w][I]-v.v[w][I])*V,p.v[w][I]=j;}function s(){var g=this.comp.renderedFrame-this.offsetTime,p=this.keyframes[0].t-this.offsetTime,l=this.keyframes[this.keyframes.length-1].t-this.offsetTime,u=this._caching.lastFrame;return u!==t&&(u<p&&g<p||u>l&&g>l)||(this._caching.lastIndex=u<g?this._caching.lastIndex:0,this.interpolateShape(g,this.pv,this._caching)),this._caching.lastFrame=g,this.pv}function i(){this.paths=this.localShapeCollection;}function r(g,p){if(g._length!==p._length||g.c!==p.c)return !1;var l,u=g._length;for(l=0;l<u;l+=1)if(g.v[l][0]!==p.v[l][0]||g.v[l][1]!==p.v[l][1]||g.o[l][0]!==p.o[l][0]||g.o[l][1]!==p.o[l][1]||g.i[l][0]!==p.i[l][0]||g.i[l][1]!==p.i[l][1])return !1;return !0}function a(g){r(this.v,g)||(this.v=nt.clone(g),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection);}function h(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var g;this.kf?g=this.pv:this.data.ks?g=this.data.ks.k:g=this.data.pt.k;var p,l=this.effectsSequence.length;for(p=0;p<l;p+=1)g=this.effectsSequence[p](g);th