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