UNPKG

@lottiefiles/dotlottie-web

Version:
6 lines 434 kB
var t0=Object.defineProperty;var n0=(h,n,a)=>n in h?t0(h,n,{enumerable:true,configurable:true,writable:true,value:a}):h[n]=a;var m=(h,n,a)=>n0(h,typeof n!="symbol"?n+"":n,a);var n2=class{requestAnimationFrame(n){return requestAnimationFrame(n)}cancelAnimationFrame(n){cancelAnimationFrame(n);}},r2=class{constructor(){m(this,"_lastHandleId",0);m(this,"_lastImmediate",null);}requestAnimationFrame(n){return this._lastHandleId>=Number.MAX_SAFE_INTEGER&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{n(Date.now());}),this._lastHandleId}cancelAnimationFrame(n){this._lastImmediate&&clearImmediate(this._lastImmediate);}},R1=class{constructor(){m(this,"_strategy");this._strategy=typeof requestAnimationFrame=="function"?new n2:new r2;}requestAnimationFrame(n){return this._strategy.requestAnimationFrame(n)}cancelAnimationFrame(n){this._strategy.cancelAnimationFrame(n);}};var P=typeof window<"u"&&typeof window.document<"u";var O1=new Uint8Array([80,75,3,4]),Q2=["v","ip","op","layers","fr","w","h"],i2="0.48.0",a2="@lottiefiles/dotlottie-web",q2=.75,Y2=4;var r0=(()=>{var h=typeof document<"u"?document.currentScript?.src:void 0;return function(n={}){var a,s=n,v,C,H=new Promise((e,t)=>{v=e,C=t;}),z=Object.assign({},s),_1="./this.program",k="",h2;typeof document<"u"&&document.currentScript&&(k=document.currentScript.src),h&&(k=h),k.startsWith("blob:")?k="":k=k.substr(0,k.replace(/[?#].*/,"").lastIndexOf("/")+1),h2=async e=>{if(e=await fetch(e,{credentials:"same-origin"}),e.ok)return e.arrayBuffer();throw Error(e.status+" : "+e.url)};var r3=s.print||console.log.bind(console),Z=s.printErr||console.error.bind(console);Object.assign(s,z),z=null,s.thisProgram&&(_1=s.thisProgram);var g1=s.wasmBinary,y1,b1=false,D1,K,I,e1,r1,Y,L,p2,f2;function v2(){var e=y1.buffer;s.HEAP8=K=new Int8Array(e),s.HEAP16=e1=new Int16Array(e),s.HEAPU8=I=new Uint8Array(e),s.HEAPU16=r1=new Uint16Array(e),s.HEAP32=Y=new Int32Array(e),s.HEAPU32=L=new Uint32Array(e),s.HEAPF32=p2=new Float32Array(e),s.HEAPF64=f2=new Float64Array(e);}var m2=[],_2=[],g2=[];function i3(){var e=s.preRun.shift();m2.unshift(e);}var X=0,i1=null;function w1(e){throw s.onAbort?.(e),e="Aborted("+e+")",Z(e),b1=true,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),C(e),e}var y2=e=>e.startsWith("data:application/octet-stream;base64,"),W1;async function a3(e){if(!g1)try{var t=await h2(e);return new Uint8Array(t)}catch{}if(e==W1&&g1)e=new Uint8Array(g1);else throw "both async and sync fetching of the wasm failed";return e}async function o3(e,t){try{var r=await a3(e);return await WebAssembly.instantiate(r,t)}catch(i){Z(`failed to asynchronously prepare wasm: ${i}`),w1(i);}}async function s3(e){var t=W1;if(!g1&&typeof WebAssembly.instantiateStreaming=="function"&&!y2(t)&&typeof fetch=="function")try{var r=fetch(t,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(r,e)}catch(i){Z(`wasm streaming compile failed: ${i}`),Z("falling back to ArrayBuffer instantiation");}return o3(t,e)}class b2{constructor(t){m(this,"name","ExitStatus");this.message=`Program terminated with exit(${t})`,this.status=t;}}var U1=e=>{for(;0<e.length;)e.shift()(s);},z1=s.noExitRuntime||true,w2=typeof TextDecoder<"u"?new TextDecoder:void 0,a1=(e,t=0,r=NaN)=>{var i=t+r;for(r=t;e[r]&&!(r>=i);)++r;if(16<r-t&&e.buffer&&w2)return w2.decode(e.subarray(t,r));for(i="";t<r;){var o=e[t++];if(o&128){var d=e[t++]&63;if((o&224)==192)i+=String.fromCharCode((o&31)<<6|d);else {var l=e[t++]&63;o=(o&240)==224?(o&15)<<12|d<<6|l:(o&7)<<18|d<<12|l<<6|e[t++]&63,65536>o?i+=String.fromCharCode(o):(o-=65536,i+=String.fromCharCode(55296|o>>10,56320|o&1023));}}else i+=String.fromCharCode(o);}return i},o1=0;class L2{constructor(t){this.Pa=t-24;}}var d3=()=>{var e=[],t=o1;if(!t)return f1(0),0;var r=new L2(t);L[r.Pa+16>>2]=t;var i=L[r.Pa+4>>2];if(!i)return f1(0),t;for(var o of e){if(o===0||o===i)break;if(B2(o,i,r.Pa+16))return f1(o),t}return f1(i),t},s1=(e,t,r)=>{var i=I;if(0<r){r=t+r-1;for(var o=0;o<e.length;++o){var d=e.charCodeAt(o);if(55296<=d&&57343>=d){var l=e.charCodeAt(++o);d=65536+((d&1023)<<10)|l&1023;}if(127>=d){if(t>=r)break;i[t++]=d;}else {if(2047>=d){if(t+1>=r)break;i[t++]=192|d>>6;}else {if(65535>=d){if(t+2>=r)break;i[t++]=224|d>>12;}else {if(t+3>=r)break;i[t++]=240|d>>18,i[t++]=128|d>>12&63;}i[t++]=128|d>>6&63;}i[t++]=128|d&63;}}i[t]=0;}},L1={},$1=e=>{for(;e.length;){var t=e.pop();e.pop()(t);}};function d1(e){return this.fromWireType(L[e>>2])}var t1={},J={},C1={},u1,q=(e,t,r)=>{function i(u){if(u=r(u),u.length!==e.length)throw new u1("Mismatched type converter count");for(var c=0;c<e.length;++c)$(e[c],u[c]);}e.forEach(u=>C1[u]=t);var o=Array(t.length),d=[],l=0;t.forEach((u,c)=>{J.hasOwnProperty(u)?o[c]=J[u]:(d.push(u),t1.hasOwnProperty(u)||(t1[u]=[]),t1[u].push(()=>{o[c]=J[u],++l,l===d.length&&i(o);}));}),d.length===0&&i(o);},C2,T=e=>{for(var t="";I[e];)t+=C2[I[e++]];return t},g;function l3(e,t,r={}){var i=t.name;if(!e)throw new g(`type "${i}" must have a positive integer typeid pointer`);if(J.hasOwnProperty(e)){if(r.vb)return;throw new g(`Cannot register type '${i}' twice`)}J[e]=t,delete C1[e],t1.hasOwnProperty(e)&&(t=t1[e],delete t1[e],t.forEach(o=>o()));}function $(e,t,r={}){return l3(e,t,r)}var j1=e=>{throw new g(e.Oa.Ra.Qa.name+" instance already deleted")},B1=false,M2=()=>{},E2=(e,t,r)=>t===r?e:r.Ua===void 0?null:(e=E2(e,t,r.Ua),e===null?null:r.ob(e)),P2={},c3={},h3=(e,t)=>{if(t===void 0)throw new g("ptr should not be undefined");for(;e.Ua;)t=e.eb(t),e=e.Ua;return c3[t]},M1=(e,t)=>{if(!t.Ra||!t.Pa)throw new u1("makeClassHandle requires ptr and ptrType");if(!!t.Va!=!!t.Ta)throw new u1("Both smartPtrType and smartPtr must be specified");return t.count={value:1},l1(Object.create(e,{Oa:{value:t,writable:true}}))},l1=e=>typeof FinalizationRegistry>"u"?(l1=t=>t,e):(B1=new FinalizationRegistry(t=>{t=t.Oa,--t.count.value,t.count.value===0&&(t.Ta?t.Va.Ya(t.Ta):t.Ra.Qa.Ya(t.Pa));}),l1=t=>{var r=t.Oa;return r.Ta&&B1.register(t,{Oa:r},t),t},M2=t=>{B1.unregister(t);},l1(e));function E1(){}var c1=(e,t)=>Object.defineProperty(t,"name",{value:e}),I2=(e,t,r)=>{if(e[t].Sa===void 0){var i=e[t];e[t]=function(...o){if(!e[t].Sa.hasOwnProperty(o.length))throw new g(`Function '${r}' called with an invalid number of arguments (${o.length}) - expects one of (${e[t].Sa})!`);return e[t].Sa[o.length].apply(this,o)},e[t].Sa=[],e[t].Sa[i.ab]=i;}},H1=(e,t,r)=>{if(s.hasOwnProperty(e)){if(r===void 0||s[e].Sa!==void 0&&s[e].Sa[r]!==void 0)throw new g(`Cannot register public name '${e}' twice`);if(I2(s,e,e),s[e].Sa.hasOwnProperty(r))throw new g(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`);s[e].Sa[r]=t;}else s[e]=t,s[e].ab=r;},f3=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return 48<=t&&57>=t?`_${e}`:e};function v3(e,t,r,i,o,d,l,u){this.name=e,this.constructor=t,this.$a=r,this.Ya=i,this.Ua=o,this.qb=d,this.eb=l,this.ob=u,this.xb=[];}var V1=(e,t,r)=>{for(;t!==r;){if(!t.eb)throw new g(`Expected null or instance of ${r.name}, got an instance of ${t.name}`);e=t.eb(e),t=t.Ua;}return e};function m3(e,t){if(t===null){if(this.hb)throw new g(`null is not a valid ${this.name}`);return 0}if(!t.Oa)throw new g(`Cannot pass "${X1(t)}" as a ${this.name}`);if(!t.Oa.Pa)throw new g(`Cannot pass deleted object as a pointer of type ${this.name}`);return V1(t.Oa.Pa,t.Oa.Ra.Qa,this.Qa)}function _3(e,t){if(t===null){if(this.hb)throw new g(`null is not a valid ${this.name}`);if(this.gb){var r=this.ib();return e!==null&&e.push(this.Ya,r),r}return 0}if(!t||!t.Oa)throw new g(`Cannot pass "${X1(t)}" as a ${this.name}`);if(!t.Oa.Pa)throw new g(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.fb&&t.Oa.Ra.fb)throw new g(`Cannot convert argument of type ${t.Oa.Va?t.Oa.Va.name:t.Oa.Ra.name} to parameter type ${this.name}`);if(r=V1(t.Oa.Pa,t.Oa.Ra.Qa,this.Qa),this.gb){if(t.Oa.Ta===void 0)throw new g("Passing raw pointer to smart pointer is illegal");switch(this.Cb){case 0:if(t.Oa.Va===this)r=t.Oa.Ta;else throw new g(`Cannot convert argument of type ${t.Oa.Va?t.Oa.Va.name:t.Oa.Ra.name} to parameter type ${this.name}`);break;case 1:r=t.Oa.Ta;break;case 2:if(t.Oa.Va===this)r=t.Oa.Ta;else {var i=t.clone();r=this.yb(r,S1(()=>i.delete())),e!==null&&e.push(this.Ya,r);}break;default:throw new g("Unsupporting sharing policy")}}return r}function g3(e,t){if(t===null){if(this.hb)throw new g(`null is not a valid ${this.name}`);return 0}if(!t.Oa)throw new g(`Cannot pass "${X1(t)}" as a ${this.name}`);if(!t.Oa.Pa)throw new g(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.Oa.Ra.fb)throw new g(`Cannot convert argument of type ${t.Oa.Ra.name} to parameter type ${this.name}`);return V1(t.Oa.Pa,t.Oa.Ra.Qa,this.Qa)}function h1(e,t,r,i,o,d,l,u,c,p,f){this.name=e,this.Qa=t,this.hb=r,this.fb=i,this.gb=o,this.wb=d,this.Cb=l,this.mb=u,this.ib=c,this.yb=p,this.Ya=f,o||t.Ua!==void 0?this.toWireType=_3:(this.toWireType=i?m3:g3,this.Xa=null);}var S2=(e,t,r)=>{if(!s.hasOwnProperty(e))throw new u1("Replacing nonexistent public symbol");s[e].Sa!==void 0&&r!==void 0?s[e].Sa[r]=t:(s[e]=t,s[e].ab=r);},S,y3=(e,t,r=[])=>(e.includes("j")?(e=e.replace(/p/g,"i"),t=(0, s["dynCall_"+e])(t,...r)):t=S.get(t)(...r),t),b3=(e,t)=>(...r)=>y3(e,t,r),O=(e,t)=>{e=T(e);var r=e.includes("j")?b3(e,t):S.get(t);if(typeof r!="function")throw new g(`unknown function pointer with signature ${e}: ${t}`);return r},T2,F2=e=>{e=$2(e);var t=T(e);return N(e),t},P1=(e,t)=>{function r(d){o[d]||J[d]||(C1[d]?C1[d].forEach(r):(i.push(d),o[d]=true));}var i=[],o={};throw t.forEach(r),new T2(`${e}: `+i.map(F2).join([", "]))},N1=(e,t)=>{for(var r=[],i=0;i<e;i++)r.push(L[t+4*i>>2]);return r};function w3(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].Xa===void 0)return true;return false}function Q1(e,t,r,i,o){var d=t.length;if(2>d)throw new g("argTypes array size mismatch! Must at least get return value and 'this' types!");var l=t[1]!==null&&r!==null,u=w3(t),c=t[0].name!=="void",p=d-2,f=Array(p),_=[],w=[];return c1(e,function(...W){if(w.length=0,_.length=l?2:1,_[0]=o,l){var M=t[1].toWireType(w,this);_[1]=M;}for(var E=0;E<p;++E)f[E]=t[E+2].toWireType(w,W[E]),_.push(f[E]);if(W=i(..._),u)$1(w);else for(E=l?1:2;E<t.length;E++){var j=E===1?M:f[E-2];t[E].Xa!==null&&t[E].Xa(j);}return M=c?t[0].fromWireType(W):void 0,M})}var x2=e=>{e=e.trim();let t=e.indexOf("(");return t!==-1?e.substr(0,t):e},q1=[],V=[],Y1=e=>{9<e&&--V[e+1]===0&&(V[e]=void 0,q1.push(e));},I1=e=>{if(!e)throw new g("Cannot use deleted val. handle = "+e);return V[e]},S1=e=>{switch(e){case void 0:return 2;case null:return 4;case true:return 6;case false:return 8;default:let t=q1.pop()||V.length;return V[t]=e,V[t+1]=1,t}},R2={name:"emscripten::val",fromWireType:e=>{var t=I1(e);return Y1(e),t},toWireType:(e,t)=>S1(t),Wa:8,readValueFromPointer:d1,Xa:null},L3=(e,t,r)=>{switch(t){case 1:return r?function(i){return this.fromWireType(K[i])}:function(i){return this.fromWireType(I[i])};case 2:return r?function(i){return this.fromWireType(e1[i>>1])}:function(i){return this.fromWireType(r1[i>>1])};case 4:return r?function(i){return this.fromWireType(Y[i>>2])}:function(i){return this.fromWireType(L[i>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},T1=(e,t)=>{var r=J[e];if(r===void 0)throw e=`${t} has unknown type ${F2(e)}`,new g(e);return r},X1=e=>{if(e===null)return "null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},C3=(e,t)=>{switch(t){case 4:return function(r){return this.fromWireType(p2[r>>2])};case 8:return function(r){return this.fromWireType(f2[r>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},M3=(e,t,r)=>{switch(t){case 1:return r?i=>K[i]:i=>I[i];case 2:return r?i=>e1[i>>1]:i=>r1[i>>1];case 4:return r?i=>Y[i>>2]:i=>L[i>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},E3=Object.assign({optional:true},R2),O2=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,P3=(e,t)=>{for(var r=e>>1,i=r+t/2;!(r>=i)&&r1[r];)++r;if(r<<=1,32<r-e&&O2)return O2.decode(I.subarray(e,r));for(r="",i=0;!(i>=t/2);++i){var o=e1[e+2*i>>1];if(o==0)break;r+=String.fromCharCode(o);}return r},I3=(e,t,r)=>{if(r??(r=2147483647),2>r)return 0;r-=2;var i=t;r=r<2*e.length?r/2:e.length;for(var o=0;o<r;++o)e1[t>>1]=e.charCodeAt(o),t+=2;return e1[t>>1]=0,t-i},S3=e=>2*e.length,T3=(e,t)=>{for(var r=0,i="";!(r>=t/4);){var o=Y[e+4*r>>2];if(o==0)break;++r,65536<=o?(o-=65536,i+=String.fromCharCode(55296|o>>10,56320|o&1023)):i+=String.fromCharCode(o);}return i},F3=(e,t,r)=>{if(r??(r=2147483647),4>r)return 0;var i=t;r=i+r-4;for(var o=0;o<e.length;++o){var d=e.charCodeAt(o);if(55296<=d&&57343>=d){var l=e.charCodeAt(++o);d=65536+((d&1023)<<10)|l&1023;}if(Y[t>>2]=d,t+=4,t+4>r)break}return Y[t>>2]=0,t-i},x3=e=>{for(var t=0,r=0;r<e.length;++r){var i=e.charCodeAt(r);55296<=i&&57343>=i&&++r,t+=4;}return t},J1=0,k2=(e,t,r)=>{var i=[];return e=e.toWireType(i,r),i.length&&(L[t>>2]=S1(i)),e},G1=[],R3=e=>{var t=G1.length;return G1.push(e),t},O3=(e,t)=>{for(var r=Array(e),i=0;i<e;++i)r[i]=T1(L[t+4*i>>2],"parameter "+i);return r},k3=Reflect.construct,p1={},A2=e=>{if(!(e instanceof b2||e=="unwind"))throw e},D2=e=>{throw D1=e,z1||0<J1||(s.onExit?.(e),b1=true),new b2(e)},A3=e=>{if(!b1)try{if(e(),!(z1||0<J1))try{D1=e=D1,D2(e);}catch(t){A2(t);}}catch(t){A2(t);}},Z1={},W2=()=>{if(!K1){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:_1||"./this.program"},t;for(t in Z1)Z1[t]===void 0?delete e[t]:e[t]=Z1[t];var r=[];for(t in e)r.push(`${t}=${e[t]}`);K1=r;}return K1},K1,D3=[null,[],[]],W3=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return e=>crypto.getRandomValues(e);w1("initRandomDevice");},U2=e=>(U2=W3())(e);u1=s.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError";}};for(var z2=Array(256),F1=0;256>F1;++F1)z2[F1]=String.fromCharCode(F1);C2=z2,g=s.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError";}},Object.assign(E1.prototype,{isAliasOf:function(e){if(!(this instanceof E1&&e instanceof E1))return false;var t=this.Oa.Ra.Qa,r=this.Oa.Pa;e.Oa=e.Oa;var i=e.Oa.Ra.Qa;for(e=e.Oa.Pa;t.Ua;)r=t.eb(r),t=t.Ua;for(;i.Ua;)e=i.eb(e),i=i.Ua;return t===i&&r===e},clone:function(){if(this.Oa.Pa||j1(this),this.Oa.cb)return this.Oa.count.value+=1,this;var e=l1,t=Object,r=t.create,i=Object.getPrototypeOf(this),o=this.Oa;return e=e(r.call(t,i,{Oa:{value:{count:o.count,bb:o.bb,cb:o.cb,Pa:o.Pa,Ra:o.Ra,Ta:o.Ta,Va:o.Va}}})),e.Oa.count.value+=1,e.Oa.bb=false,e},delete(){if(this.Oa.Pa||j1(this),this.Oa.bb&&!this.Oa.cb)throw new g("Object already scheduled for deletion");M2(this);var e=this.Oa;--e.count.value,e.count.value===0&&(e.Ta?e.Va.Ya(e.Ta):e.Ra.Qa.Ya(e.Pa)),this.Oa.cb||(this.Oa.Ta=void 0,this.Oa.Pa=void 0);},isDeleted:function(){return !this.Oa.Pa},deleteLater:function(){if(this.Oa.Pa||j1(this),this.Oa.bb&&!this.Oa.cb)throw new g("Object already scheduled for deletion");return this.Oa.bb=true,this}}),Object.assign(h1.prototype,{rb(e){return this.mb&&(e=this.mb(e)),e},kb(e){this.Ya?.(e);},Wa:8,readValueFromPointer:d1,fromWireType:function(e){function t(){return this.gb?M1(this.Qa.$a,{Ra:this.wb,Pa:r,Va:this,Ta:e}):M1(this.Qa.$a,{Ra:this,Pa:e})}var r=this.rb(e);if(!r)return this.kb(e),null;var i=h3(this.Qa,r);if(i!==void 0)return i.Oa.count.value===0?(i.Oa.Pa=r,i.Oa.Ta=e,i.clone()):(i=i.clone(),this.kb(e),i);if(i=this.Qa.qb(r),i=P2[i],!i)return t.call(this);i=this.fb?i.nb:i.pointerType;var o=E2(r,this.Qa,i.Qa);return o===null?t.call(this):this.gb?M1(i.Qa.$a,{Ra:i,Pa:o,Va:this,Ta:e}):M1(i.Qa.$a,{Ra:i,Pa:o})}}),T2=s.UnboundTypeError=((e,t)=>{var r=c1(t,function(i){this.name=t,this.message=i,i=Error(i).stack,i!==void 0&&(this.stack=this.toString()+` `+i.replace(/^Error(:[^\n]*)?\n/,""));});return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r})(Error,"UnboundTypeError"),V.push(0,1,void 0,1,null,1,true,1,false,1),s.count_emval_handles=()=>V.length/2-5-q1.length;var U3={d:(e,t,r,i)=>w1(`Assertion failed: ${e?a1(I,e):""}, at: `+[t?t?a1(I,t):"":"unknown filename",r,i?i?a1(I,i):"":"unknown function"]),c:()=>d3(),n:(e,t,r)=>{var i=new L2(e);throw L[i.Pa+16>>2]=0,L[i.Pa+4>>2]=t,L[i.Pa+8>>2]=r,o1=e,o1},e:e=>{throw o1||(o1=e),o1},T:()=>{},Q:()=>{},R:()=>{},V:function(){},S:()=>{},X:()=>w1(""),w:e=>{var t=L1[e];delete L1[e];var r=t.ib,i=t.Ya,o=t.lb,d=o.map(l=>l.ub).concat(o.map(l=>l.Ab));q([e],d,l=>{var u={};return o.forEach((c,p)=>{var f=l[p],_=c.sb,w=c.tb,W=l[p+o.length],M=c.zb,E=c.Bb;u[c.pb]={read:j=>f.fromWireType(_(w,j)),write:(j,v1)=>{var U=[];M(E,j,W.toWireType(U,v1)),$1(U);}};}),[{name:t.name,fromWireType:c=>{var p={},f;for(f in u)p[f]=u[f].read(c);return i(c),p},toWireType:(c,p)=>{for(var f in u)if(!(f in p))throw new TypeError(`Missing field: "${f}"`);var _=r();for(f in u)u[f].write(_,p[f]);return c!==null&&c.push(i,_),_},Wa:8,readValueFromPointer:d1,Xa:i}]});},H:()=>{},fa:(e,t,r,i)=>{t=T(t),$(e,{name:t,fromWireType:function(o){return !!o},toWireType:function(o,d){return d?r:i},Wa:8,readValueFromPointer:function(o){return this.fromWireType(I[o])},Xa:null});},u:(e,t,r,i,o,d,l,u,c,p,f,_,w)=>{f=T(f),d=O(o,d),u&&(u=O(l,u)),p&&(p=O(c,p)),w=O(_,w);var W=f3(f);H1(W,function(){P1(`Cannot construct ${f} due to unbound types`,[i]);}),q([e,t,r],i?[i]:[],M=>{if(M=M[0],i)var E=M.Qa,j=E.$a;else j=E1.prototype;M=c1(f,function(...t2){if(Object.getPrototypeOf(this)!==v1)throw new g("Use 'new' to construct "+f);if(U.Za===void 0)throw new g(f+" has no accessible constructor");var N2=U.Za[t2.length];if(N2===void 0)throw new g(`Tried to invoke ctor of ${f} with invalid number of parameters (${t2.length}) - expected (${Object.keys(U.Za).toString()}) parameters instead!`);return N2.apply(this,t2)});var v1=Object.create(j,{constructor:{value:M}});M.prototype=v1;var U=new v3(f,M,v1,w,E,d,u,p);if(U.Ua){var m1;(m1=U.Ua).jb??(m1.jb=[]),U.Ua.jb.push(U);}return E=new h1(f,U,true,false,false),m1=new h1(f+"*",U,false,false,false),j=new h1(f+" const*",U,false,true,false),P2[e]={pointerType:m1,nb:j},S2(W,M),[E,m1,j]});},t:(e,t,r,i,o,d)=>{var l=N1(t,r);o=O(i,o),q([],[e],u=>{u=u[0];var c=`constructor ${u.name}`;if(u.Qa.Za===void 0&&(u.Qa.Za=[]),u.Qa.Za[t-1]!==void 0)throw new g(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${u.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return u.Qa.Za[t-1]=()=>{P1(`Cannot construct ${u.name} due to unbound types`,l);},q([],l,p=>(p.splice(1,0,null),u.Qa.Za[t-1]=Q1(c,p,null,o,d),[])),[]});},h:(e,t,r,i,o,d,l,u)=>{var c=N1(r,i);t=T(t),t=x2(t),d=O(o,d),q([],[e],p=>{function f(){P1(`Cannot call ${_} due to unbound types`,c);}p=p[0];var _=`${p.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),u&&p.Qa.xb.push(t);var w=p.Qa.$a,W=w[t];return W===void 0||W.Sa===void 0&&W.className!==p.name&&W.ab===r-2?(f.ab=r-2,f.className=p.name,w[t]=f):(I2(w,t,_),w[t].Sa[r-2]=f),q([],c,M=>(M=Q1(_,M,p,d,l),w[t].Sa===void 0?(M.ab=r-2,w[t]=M):w[t].Sa[r-2]=M,[])),[]});},da:e=>$(e,R2),y:(e,t,r,i)=>{function o(){}t=T(t),o.values={},$(e,{name:t,constructor:o,fromWireType:function(d){return this.constructor.values[d]},toWireType:(d,l)=>l.value,Wa:8,readValueFromPointer:L3(t,r,i),Xa:null}),H1(t,o);},l:(e,t,r)=>{var i=T1(e,"enum");t=T(t),e=i.constructor,i=Object.create(i.constructor.prototype,{value:{value:r},constructor:{value:c1(`${i.name}_${t}`,function(){})}}),e.values[r]=i,e[t]=i;},E:(e,t,r)=>{t=T(t),$(e,{name:t,fromWireType:i=>i,toWireType:(i,o)=>o,Wa:8,readValueFromPointer:C3(t,r),Xa:null});},v:(e,t,r,i,o,d)=>{var l=N1(t,r);e=T(e),e=x2(e),o=O(i,o),H1(e,function(){P1(`Cannot call ${e} due to unbound types`,l);},t-1),q([],l,u=>(S2(e,Q1(e,[u[0],null].concat(u.slice(1)),null,o,d),t-1),[]));},p:(e,t,r,i,o)=>{if(t=T(t),o===-1&&(o=4294967295),o=u=>u,i===0){var d=32-8*r;o=u=>u<<d>>>d;}var l=t.includes("unsigned")?function(u,c){return c>>>0}:function(u,c){return c};$(e,{name:t,fromWireType:o,toWireType:l,Wa:8,readValueFromPointer:M3(t,r,i!==0),Xa:null});},k:(e,t,r)=>{function i(d){return new o(K.buffer,L[d+4>>2],L[d>>2])}var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];r=T(r),$(e,{name:r,fromWireType:i,Wa:8,readValueFromPointer:i},{vb:true});},x:e=>{$(e,E3);},la:(e,t,r,i,o,d,l,u,c,p,f,_)=>{r=T(r),d=O(o,d),u=O(l,u),p=O(c,p),_=O(f,_),q([e],[t],w=>(w=w[0],[new h1(r,w.Qa,false,false,true,w,i,d,u,p,_)]));},ea:(e,t)=>{t=T(t),$(e,{name:t,fromWireType:function(r){for(var i=L[r>>2],o=r+4,d,l=o,u=0;u<=i;++u){var c=o+u;(u==i||I[c]==0)&&(l=l?a1(I,l,c-l):"",d===void 0?d=l:(d+="\0",d+=l),l=c+1);}return N(r),d},toWireType:function(r,i){i instanceof ArrayBuffer&&(i=new Uint8Array(i));var o,d=typeof i=="string";if(!(d||i instanceof Uint8Array||i instanceof Uint8ClampedArray||i instanceof Int8Array))throw new g("Cannot pass non-string to std::string");if(d)for(var l=o=0;l<i.length;++l){var u=i.charCodeAt(l);127>=u?o++:2047>=u?o+=2:55296<=u&&57343>=u?(o+=4,++l):o+=3;}else o=i.length;if(l=e2(4+o+1),u=l+4,L[l>>2]=o,d)s1(i,u,o+1);else if(d)for(d=0;d<o;++d){var c=i.charCodeAt(d);if(255<c)throw N(u),new g("String has UTF-16 code units that do not fit in 8 bits");I[u+d]=c;}else for(d=0;d<o;++d)I[u+d]=i[d];return r!==null&&r.push(N,l),l},Wa:8,readValueFromPointer:d1,Xa(r){N(r);}});},A:(e,t,r)=>{if(r=T(r),t===2)var i=P3,o=I3,d=S3,l=u=>r1[u>>1];else t===4&&(i=T3,o=F3,d=x3,l=u=>L[u>>2]);$(e,{name:r,fromWireType:u=>{for(var c=L[u>>2],p,f=u+4,_=0;_<=c;++_){var w=u+4+_*t;(_==c||l(w)==0)&&(f=i(f,w-f),p===void 0?p=f:(p+="\0",p+=f),f=w+t);}return N(u),p},toWireType:(u,c)=>{if(typeof c!="string")throw new g(`Cannot pass non-string to C++ string type ${r}`);var p=d(c),f=e2(4+p+t);return L[f>>2]=p/t,o(c,f+4,p+t),u!==null&&u.push(N,f),f},Wa:8,readValueFromPointer:d1,Xa(u){N(u);}});},s:(e,t,r,i,o,d)=>{L1[e]={name:T(t),ib:O(r,i),Ya:O(o,d),lb:[]};},m:(e,t,r,i,o,d,l,u,c,p)=>{L1[e].lb.push({pb:T(t),ub:r,sb:O(i,o),tb:d,Ab:l,zb:O(u,c),Bb:p});},ga:(e,t)=>{t=T(t),$(e,{Db:true,name:t,Wa:0,fromWireType:()=>{},toWireType:()=>{}});},O:()=>{z1=false,J1=0;},I:()=>{throw 1/0},F:(e,t,r)=>(e=I1(e),t=T1(t,"emval::as"),k2(t,r,e)),ja:(e,t,r,i)=>(e=G1[e],t=I1(t),e(null,t,r,i)),M:Y1,ia:(e,t,r)=>{var i=O3(e,t),o=i.shift();e--;var d=Array(e);return t=`methodCaller<(${i.map(l=>l.name).join(", ")}) => ${o.name}>`,R3(c1(t,(l,u,c,p)=>{for(var f=0,_=0;_<e;++_)d[_]=i[_].readValueFromPointer(p+f),f+=i[_].Wa;return l=r===1?k3(u,d):u.apply(l,d),k2(o,c,l)}))},ka:e=>{9<e&&(V[e+1]+=1);},ha:e=>{var t=I1(e);$1(t),Y1(e);},r:(e,t)=>(e=T1(e,"_emval_take_value"),e=e.readValueFromPointer(t),S1(e)),K:(e,t)=>{if(p1[e]&&(clearTimeout(p1[e].id),delete p1[e]),!t)return 0;var r=setTimeout(()=>{delete p1[e],A3(()=>j2(e,performance.now()));},t);return p1[e]={id:r,Eb:t},0},L:(e,t,r,i)=>{var o=new Date().getFullYear(),d=new Date(o,0,1).getTimezoneOffset();o=new Date(o,6,1).getTimezoneOffset(),L[e>>2]=60*Math.max(d,o),Y[t>>2]=+(d!=o),t=l=>{var u=Math.abs(l);return `UTC${0<=l?"-":"+"}${String(Math.floor(u/60)).padStart(2,"0")}${String(u%60).padStart(2,"0")}`},e=t(d),t=t(o),o<d?(s1(e,r,17),s1(t,i,17)):(s1(e,i,17),s1(t,r,17));},ca:()=>performance.now(),N:e=>{var t=I.length;if(e>>>=0,2147483648<e)return false;for(var r=1;4>=r;r*=2){var i=t*(1+.2/r);i=Math.min(i,e+100663296);e:{i=(Math.min(2147483648,65536*Math.ceil(Math.max(e,i)/65536))-y1.buffer.byteLength+65535)/65536|0;try{y1.grow(i),v2();var o=1;break e}catch{}o=void 0;}if(o)return true}return false},Z:(e,t)=>{var r=0;return W2().forEach((i,o)=>{var d=t+r;for(o=L[e+4*o>>2]=d,d=0;d<i.length;++d)K[o++]=i.charCodeAt(d);K[o]=0,r+=i.length+1;}),0},_:(e,t)=>{var r=W2();L[e>>2]=r.length;var i=0;return r.forEach(o=>i+=o.length+1),L[t>>2]=i,0},W:()=>52,U:()=>52,B:(e,t,r,i)=>{for(var o=0,d=0;d<r;d++){var l=L[t>>2],u=L[t+4>>2];t+=8;for(var c=0;c<u;c++){var p=e,f=I[l+c],_=D3[p];f===0||f===10?((p===1?r3:Z)(a1(_)),_.length=0):_.push(f);}o+=u;}return L[i>>2]=o,0},$:Z3,aa:G3,J:K3,j:H3,i:X3,g:Y3,ba:$3,z:J3,C:q3,D:N3,a:z3,b:j3,f:B3,o:Q3,q:V3,G:e0,Y:D2,P:(e,t)=>(U2(I.subarray(e,e+t)),0)},y;(async function(){function e(i){return y=i.exports,y1=y.ma,v2(),S=y.ra,_2.unshift(y.na),X--,s.monitorRunDependencies?.(X),X==0&&i1&&(i=i1,i1=null,i()),y}X++,s.monitorRunDependencies?.(X);var t={a:U3};if(s.instantiateWasm)try{return s.instantiateWasm(t,e)}catch(i){Z(`Module.instantiateWasm callback failed with error: ${i}`),C(i);}W1??(W1=y2("DotLottiePlayer.wasm")?"DotLottiePlayer.wasm":s.locateFile?s.locateFile("DotLottiePlayer.wasm",k):k+"DotLottiePlayer.wasm");try{var r=await s3(t);return e(r.instance),r}catch(i){C(i);}})();var e2=e=>(e2=y.oa)(e),$2=e=>($2=y.pa)(e),N=e=>(N=y.qa)(e),j2=(e,t)=>(j2=y.sa)(e,t),F=(e,t)=>(F=y.ta)(e,t),f1=e=>(f1=y.ua)(e),x=e=>(x=y.va)(e),R=()=>(R=y.wa)(),B2=(e,t,r)=>(B2=y.xa)(e,t,r);s.dynCall_iijj=(e,t,r,i,o,d)=>(s.dynCall_iijj=y.ya)(e,t,r,i,o,d),s.dynCall_vijj=(e,t,r,i,o,d)=>(s.dynCall_vijj=y.za)(e,t,r,i,o,d),s.dynCall_jiii=(e,t,r,i)=>(s.dynCall_jiii=y.Aa)(e,t,r,i);var H2=s.dynCall_vijjjj=(e,t,r,i,o,d,l,u,c,p)=>(H2=s.dynCall_vijjjj=y.Ba)(e,t,r,i,o,d,l,u,c,p);s.dynCall_jii=(e,t,r)=>(s.dynCall_jii=y.Ca)(e,t,r),s.dynCall_vjii=(e,t,r,i,o)=>(s.dynCall_vjii=y.Da)(e,t,r,i,o),s.dynCall_vjfii=(e,t,r,i,o,d)=>(s.dynCall_vjfii=y.Ea)(e,t,r,i,o,d),s.dynCall_vjiii=(e,t,r,i,o,d)=>(s.dynCall_vjiii=y.Fa)(e,t,r,i,o,d),s.dynCall_vj=(e,t,r)=>(s.dynCall_vj=y.Ga)(e,t,r),s.dynCall_vjiiiii=(e,t,r,i,o,d,l,u)=>(s.dynCall_vjiiiii=y.Ha)(e,t,r,i,o,d,l,u),s.dynCall_vjiffii=(e,t,r,i,o,d,l,u)=>(s.dynCall_vjiffii=y.Ia)(e,t,r,i,o,d,l,u),s.dynCall_vjiiii=(e,t,r,i,o,d,l)=>(s.dynCall_vjiiii=y.Ja)(e,t,r,i,o,d,l),s.dynCall_viijii=(e,t,r,i,o,d,l)=>(s.dynCall_viijii=y.Ka)(e,t,r,i,o,d,l),s.dynCall_iiiiij=(e,t,r,i,o,d,l)=>(s.dynCall_iiiiij=y.La)(e,t,r,i,o,d,l),s.dynCall_iiiiijj=(e,t,r,i,o,d,l,u,c)=>(s.dynCall_iiiiijj=y.Ma)(e,t,r,i,o,d,l,u,c),s.dynCall_iiiiiijj=(e,t,r,i,o,d,l,u,c,p)=>(s.dynCall_iiiiiijj=y.Na)(e,t,r,i,o,d,l,u,c,p);function z3(e,t){var r=R();try{S.get(e)(t);}catch(i){if(x(r),i!==i+0)throw i;F(1,0);}}function $3(e,t,r,i,o){var d=R();try{return S.get(e)(t,r,i,o)}catch(l){if(x(d),l!==l+0)throw l;F(1,0);}}function j3(e,t,r){var i=R();try{S.get(e)(t,r);}catch(o){if(x(i),o!==o+0)throw o;F(1,0);}}function B3(e,t,r,i){var o=R();try{S.get(e)(t,r,i);}catch(d){if(x(o),d!==d+0)throw d;F(1,0);}}function H3(e,t){var r=R();try{return S.get(e)(t)}catch(i){if(x(r),i!==i+0)throw i;F(1,0);}}function V3(e,t,r,i,o,d){var l=R();try{S.get(e)(t,r,i,o,d);}catch(u){if(x(l),u!==u+0)throw u;F(1,0);}}function N3(e){var t=R();try{S.get(e)();}catch(r){if(x(t),r!==r+0)throw r;F(1,0);}}function Q3(e,t,r,i,o){var d=R();try{S.get(e)(t,r,i,o);}catch(l){if(x(d),l!==l+0)throw l;F(1,0);}}function q3(e,t,r,i,o,d,l,u){var c=R();try{return S.get(e)(t,r,i,o,d,l,u)}catch(p){if(x(c),p!==p+0)throw p;F(1,0);}}function Y3(e,t,r,i){var o=R();try{return S.get(e)(t,r,i)}catch(d){if(x(o),d!==d+0)throw d;F(1,0);}}function X3(e,t,r){var i=R();try{return S.get(e)(t,r)}catch(o){if(x(i),o!==o+0)throw o;F(1,0);}}function J3(e,t,r,i,o,d){var l=R();try{return S.get(e)(t,r,i,o,d)}catch(u){if(x(l),u!==u+0)throw u;F(1,0);}}function G3(e,t,r,i){var o=R();try{return S.get(e)(t,r,i)}catch(d){if(x(o),d!==d+0)throw d;F(1,0);}}function Z3(e,t){var r=R();try{return S.get(e)(t)}catch(i){if(x(r),i!==i+0)throw i;F(1,0);}}function K3(e,t,r){var i=R();try{return S.get(e)(t,r)}catch(o){if(x(i),o!==o+0)throw o;F(1,0);}}function e0(e,t,r,i,o,d,l,u,c,p){var f=R();try{H2(e,t,r,i,o,d,l,u,c,p);}catch(_){if(x(f),_!==_+0)throw _;F(1,0);}}var x1;i1=function e(){x1||V2(),x1||(i1=e);};function V2(){function e(){if(!x1&&(x1=true,s.calledRun=true,!b1)){if(U1(_2),v(s),s.onRuntimeInitialized?.(),s.postRun)for(typeof s.postRun=="function"&&(s.postRun=[s.postRun]);s.postRun.length;){var t=s.postRun.shift();g2.unshift(t);}U1(g2);}}if(!(0<X)){if(s.preRun)for(typeof s.preRun=="function"&&(s.preRun=[s.preRun]);s.preRun.length;)i3();U1(m2),0<X||(s.setStatus?(s.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>s.setStatus(""),1),e();},1)):e());}}if(s.preInit)for(typeof s.preInit=="function"&&(s.preInit=[s.preInit]);0<s.preInit.length;)s.preInit.pop()();return V2(),a=H,a}})(),X2=r0;var G=class{constructor(){throw new Error("RendererLoader is a static class and cannot be instantiated.")}static async _tryLoad(n){return await X2({locateFile:()=>n})}static async _loadWithBackup(){return this._ModulePromise||(this._ModulePromise=this._tryLoad(this._wasmURL).catch(async n=>{let a=`https://unpkg.com/${a2}@${i2}/dist/dotlottie-player.wasm`;console.warn(`Primary WASM load failed from ${this._wasmURL}. Error: ${n.message}`),console.warn(`Attempting to load WASM from backup URL: ${a}`);try{return await this._tryLoad(a)}catch(s){throw console.error(`Primary WASM URL failed: ${n.message}`),console.error(`Backup WASM URL failed: ${s.message}`),new Error("WASM loading failed from all sources.")}})),this._ModulePromise}static async load(){return this._loadWithBackup()}static setWasmUrl(n){n!==this._wasmURL&&(this._wasmURL=n,this._ModulePromise=null);}};m(G,"_ModulePromise",null),m(G,"_wasmURL",`https://cdn.jsdelivr.net/npm/${a2}@${i2}/dist/dotlottie-player.wasm`);var n1=class{constructor(){m(this,"_eventListeners",new Map);}addEventListener(n,a){let s=this._eventListeners.get(n);s||(s=new Set,this._eventListeners.set(n,s)),s.add(a);}removeEventListener(n,a){let s=this._eventListeners.get(n);s&&(a?(s.delete(a),s.size===0&&this._eventListeners.delete(n)):this._eventListeners.delete(n));}dispatch(n){this._eventListeners.get(n.type)?.forEach(s=>s(n));}removeAllEventListeners(){this._eventListeners.clear();}};var A=class{static _initializeObserver(){if(this._observer)return;let n=a=>{a.forEach(s=>{let v=this._observedCanvases.get(s.target);v&&(s.isIntersecting?v.unfreeze():v.freeze());});};this._observer=new IntersectionObserver(n,{threshold:0});}static observe(n,a){this._initializeObserver(),!this._observedCanvases.has(n)&&(this._observedCanvases.set(n,a),this._observer?.observe(n));}static unobserve(n){this._observer?.unobserve(n),this._observedCanvases.delete(n),this._observedCanvases.size===0&&(this._observer?.disconnect(),this._observer=null);}};m(A,"_observer",null),m(A,"_observedCanvases",new Map);var D=class{static _initializeObserver(){if(this._observer)return;let n=a=>{a.forEach(s=>{let v=this._observedCanvases.get(s.target);if(!v)return;let[C,H]=v;clearTimeout(H);let z=setTimeout(()=>{C.resize();},100);this._observedCanvases.set(s.target,[C,z]);});};this._observer=new ResizeObserver(n);}static observe(n,a){this._initializeObserver(),!this._observedCanvases.has(n)&&(this._observedCanvases.set(n,[a,0]),this._observer?.observe(n));}static unobserve(n){let a=this._observedCanvases.get(n);if(a){let s=a[1];s&&clearTimeout(s);}this._observer?.unobserve(n),this._observedCanvases.delete(n),!this._observedCanvases.size&&this._observer&&(this._observer.disconnect(),this._observer=null);}};m(D,"_observer",null),m(D,"_observedCanvases",new Map);function i0(h){return /^#([\da-f]{6}|[\da-f]{8})$/iu.test(h)}function G2(h){if(!i0(h))return 0;let n=h.replace("#","");return n=n.length===6?`${n}ff`:n,parseInt(n,16)}function o2(h){if(h.byteLength<4)return false;let n=new Uint8Array(h.slice(0,O1.byteLength));for(let a=0;a<O1.length;a+=1)if(O1[a]!==n[a])return false;return true}function J2(h){return Q2.every(n=>Object.prototype.hasOwnProperty.call(h,n))}function s2(h){if(typeof h=="string")try{return J2(JSON.parse(h))}catch{return false}else return J2(h)}function Q(){return 1+((P?window.devicePixelRatio:1)-1)*q2}function k1(h){let n=h.getBoundingClientRect();return n.top>=0&&n.left>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&n.right<=(window.innerWidth||document.documentElement.clientWidth)}var d2=(h,n)=>h==="reverse"?n.Mode.Reverse:h==="bounce"?n.Mode.Bounce:h==="reverse-bounce"?n.Mode.ReverseBounce:n.Mode.Forward,a0=(h,n)=>h==="contain"?n.Fit.Contain:h==="cover"?n.Fit.Cover:h==="fill"?n.Fit.Fill:h==="fit-height"?n.Fit.FitHeight:h==="fit-width"?n.Fit.FitWidth:n.Fit.None,o0=(h,n)=>{let a=new n.VectorFloat;return a.push_back(h[0]),a.push_back(h[1]),a},u2=(h,n)=>{let a=new n.VectorFloat;return h.length!==2||(a.push_back(h[0]),a.push_back(h[1])),a},l2=(h,n)=>h?{align:o0(h.align??[.5,.5],n),fit:a0(h.fit??"contain",n)}:n.createDefaultLayout(),b=class b{constructor(n){m(this,"_canvas");m(this,"_context",null);m(this,"_eventManager");m(this,"_animationFrameId",null);m(this,"_frameManager");m(this,"_dotLottieCore",null);m(this,"_renderConfig",{});m(this,"_isFrozen",false);m(this,"_backgroundColor",null);m(this,"_pointerUpMethod");m(this,"_pointerDownMethod");m(this,"_pointerMoveMethod");m(this,"_pointerEnterMethod");m(this,"_pointerExitMethod");this._canvas=n.canvas,this._eventManager=new n1,this._frameManager=new R1,this._renderConfig={...n.renderConfig,devicePixelRatio:n.renderConfig?.devicePixelRatio||Q(),freezeOnOffscreen:n.renderConfig?.freezeOnOffscreen??true},G.load().then(a=>{b._wasmModule=a,this._dotLottieCore=new a.DotLottiePlayer({animationId:n.animationId??"",themeId:n.themeId??"",stateMachineId:"",autoplay:n.autoplay??false,backgroundColor:0,loopAnimation:n.loop??false,mode:d2(n.mode??"forward",a),segment:u2(n.segment??[],a),speed:n.speed??1,useFrameInterpolation:n.useFrameInterpolation??true,marker:n.marker??"",layout:l2(n.layout,a)}),this._eventManager.dispatch({type:"ready"}),n.data?this._loadFromData(n.data):n.src&&this._loadFromSrc(n.src),n.backgroundColor&&this.setBackgroundColor(n.backgroundColor);}).catch(a=>{this._eventManager.dispatch({type:"loadError",error:new Error(`Failed to load wasm module: ${a}`)});}),this._pointerUpMethod=this._onPointerUp.bind(this),this._pointerDownMethod=this._onPointerDown.bind(this),this._pointerMoveMethod=this._onPointerMove.bind(this),this._pointerEnterMethod=this._onPointerEnter.bind(this),this._pointerExitMethod=this._onPointerLeave.bind(this);}_dispatchError(n){console.error(n),this._eventManager.dispatch({type:"loadError",error:new Error(n)});}async _fetchData(n){let a=await fetch(n);if(!a.ok)throw new Error(`Failed to fetch animation data from URL: ${n}. ${a.status}: ${a.statusText}`);let s=await a.arrayBuffer();return o2(s)?s:new TextDecoder().decode(s)}_loadFromData(n){if(this._dotLottieCore===null)return;let a=this._canvas.width,s=this._canvas.height,v=false;if(typeof n=="string"){if(!s2(n)){this._dispatchError("Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.");return}v=this._dotLottieCore.loadAnimationData(n,a,s);}else if(n instanceof ArrayBuffer){if(!o2(n)){this._dispatchError("Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.");return}v=this._dotLottieCore.loadDotLottieData(n,a,s);}else if(typeof n=="object"){if(!s2(n)){this._dispatchError("Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.");return}v=this._dotLottieCore.loadAnimationData(JSON.stringify(n),a,s);}else {this._dispatchError(`Unsupported data type for animation data. Expected: - string (Lottie JSON), - ArrayBuffer (dotLottie), - object (Lottie JSON). Received: ${typeof n}`);return}v?(this._eventManager.dispatch({type:"load"}),P&&this.resize(),this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame}),this._render(),this._dotLottieCore.config().autoplay&&(this._dotLottieCore.play(),this._dotLottieCore.isPlaying()?(this._eventManager.dispatch({type:"play"}),this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this))):console.error("something went wrong, the animation was suppose to autoplay")),P&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.freezeOnOffscreen&&A.observe(this._canvas,this),this._renderConfig.autoResize&&D.observe(this._canvas,this))):this._dispatchError("Failed to load animation data");}_loadFromSrc(n){this._fetchData(n).then(a=>this._loadFromData(a)).catch(a=>this._dispatchError(`Failed to load animation data from URL: ${n}. ${a}`));}get buffer(){return this._dotLottieCore?this._dotLottieCore.buffer():null}get activeAnimationId(){return this._dotLottieCore?.activeAnimationId()}get activeThemeId(){return this._dotLottieCore?.activeThemeId()}get layout(){let n=this._dotLottieCore?.config().layout;if(n)return {align:[n.align.get(0),n.align.get(1)],fit:(()=>{switch(n.fit){case b._wasmModule?.Fit.Contain:return "contain";case b._wasmModule?.Fit.Cover:return "cover";case b._wasmModule?.Fit.Fill:return "fill";case b._wasmModule?.Fit.FitHeight:return "fit-height";case b._wasmModule?.Fit.FitWidth:return "fit-width";case b._wasmModule?.Fit.None:return "none";default:return "contain"}})()}}get marker(){return this._dotLottieCore?.config().marker}get manifest(){try{let n=this._dotLottieCore?.manifestString();if(this._dotLottieCore===null||!n)return null;let a=JSON.parse(n);return Object.keys(a).length===0?null:a}catch{return null}}get renderConfig(){return this._renderConfig}get segment(){let n=this._dotLottieCore?.config().segment;if(n&&n.size()===2)return [n.get(0),n.get(1)]}get loop(){return this._dotLottieCore?.config().loopAnimation??false}get mode(){let n=this._dotLottieCore?.config().mode;return n===b._wasmModule?.Mode.Reverse?"reverse":n===b._wasmModule?.Mode.Bounce?"bounce":n===b._wasmModule?.Mode.ReverseBounce?"reverse-bounce":"forward"}get isFrozen(){return this._isFrozen}get backgroundColor(){return this._backgroundColor??""}get autoplay(){return this._dotLottieCore?.config().autoplay??false}get useFrameInterpolation(){return this._dotLottieCore?.config().useFrameInterpolation??false}get speed(){return this._dotLottieCore?.config().speed??0}get isReady(){return this._dotLottieCore!==null}get isLoaded(){return this._dotLottieCore?.isLoaded()??false}get isPlaying(){return this._dotLottieCore?.isPlaying()??false}get isPaused(){return this._dotLottieCore?.isPaused()??false}get isStopped(){return this._dotLottieCore?.isStopped()??false}get currentFrame(){return this._dotLottieCore?Math.round(this._dotLottieCore.currentFrame()*100)/100:0}get loopCount(){return this._dotLottieCore?.loopCount()??0}get totalFrames(){return this._dotLottieCore?.totalFrames()??0}get duration(){return this._dotLottieCore?.duration()??0}get segmentDuration(){return this._dotLottieCore?.segmentDuration()??0}get canvas(){return this._canvas}load(n){this._dotLottieCore===null||b._wasmModule===null||(this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null),this._isFrozen=false,this._dotLottieCore.setConfig({animationId:n.animationId??"",themeId:n.themeId??"",stateMachineId:"",autoplay:n.autoplay??false,backgroundColor:0,loopAnimation:n.loop??false,mode:d2(n.mode??"forward",b._wasmModule),segment:u2(n.segment??[],b._wasmModule),speed:n.speed??1,useFrameInterpolation:n.useFrameInterpolation??true,marker:n.marker??"",layout:l2(n.layout,b._wasmModule)}),n.data?this._loadFromData(n.data):n.src&&this._loadFromSrc(n.src),this.setBackgroundColor(n.backgroundColor??""));}_render(){if(this._dotLottieCore===null)return false;if(!this._context&&"getContext"in this._canvas&&typeof this._canvas.getContext=="function"&&(this._context=this._canvas.getContext("2d")),this._dotLottieCore.render()){if(this._context){let a=this._dotLottieCore.buffer(),s=this._canvas.width*this._canvas.height*Y2;if(a.byteLength!==s)return console.warn(`Buffer size mismatch: got ${a.byteLength}, expected ${s}`),false;let v=null,C=new Uint8ClampedArray(a,0,a.byteLength);typeof ImageData>"u"?(v=this._context.createImageData(this._canvas.width,this._canvas.height),v.data.set(C)):v=new ImageData(C,this._canvas.width,this._canvas.height),this._context.putImageData(v,0,0);}return this._eventManager.dispatch({type:"render",currentFrame:this.currentFrame}),true}return false}_draw(){if(!(this._dotLottieCore===null||!this._dotLottieCore.isPlaying()))try{if(this._dotLottieCore.isTweening())this._dotLottieCore.tweenUpdate()&&this._render();else {let n=Math.round(this._dotLottieCore.requestFrame()*1e3)/1e3;if(this._dotLottieCore.setFrame(n)&&(this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame}),this._render()&&this._dotLottieCore.isComplete()))if(this._dotLottieCore.config().loopAnimation)this._eventManager.dispatch({type:"loop",loopCount:this._dotLottieCore.loopCount()});else {this._eventManager.dispatch({type:"complete"});return}}this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this));}catch(n){console.error("Error in animation frame:",n),this._eventManager.dispatch({type:"renderError",error:n}),n instanceof WebAssembly.RuntimeError&&this.destroy();}}play(){if(this._dotLottieCore===null)return;this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null),(this._dotLottieCore.play()||this._dotLottieCore.isPlaying())&&(this._isFrozen=false,this._eventManager.dispatch({type:"play"}),this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this))),P&&this._canvas instanceof HTMLCanvasElement&&this._renderConfig.freezeOnOffscreen&&!k1(this._canvas)&&this.freeze();}pause(){if(this._dotLottieCore===null)return;(this._dotLottieCore.pause()||this._dotLottieCore.isPaused())&&this._eventManager.dispatch({type:"pause"});}stop(){if(this._dotLottieCore===null)return;this._dotLottieCore.stop()&&(this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame}),this._render(),this._eventManager.dispatch({type:"stop"}));}setFrame(n){if(this._dotLottieCore===null||n<0||n>this._dotLottieCore.totalFrames())return;this._dotLottieCore.seek(n)&&(this._eventManager.dispatch({type:"frame",currentFrame:this.currentFrame}),this._render());}setSpeed(n){this._dotLottieCore!==null&&this._dotLottieCore.setConfig({...this._dotLottieCore.config(),speed:n});}setBackgroundColor(n){this._dotLottieCore!==null&&(P&&this._canvas instanceof HTMLCanvasElement?this._canvas.style.backgroundColor=n:this._dotLottieCore.setConfig({...this._dotLottieCore.config(),backgroundColor:G2(n)}),this._backgroundColor=n);}setLoop(n){this._dotLottieCore!==null&&this._dotLottieCore.setConfig({...this._dotLottieCore.config(),loopAnimation:n});}setUseFrameInterpolation(n){this._dotLottieCore!==null&&this._dotLottieCore.setConfig({...this._dotLottieCore.config(),useFrameInterpolation:n});}addEventListener(n,a){this._eventManager.addEventListener(n,a);}removeEventListener(n,a){this._eventManager.removeEventListener(n,a);}destroy(){this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null),P&&this._canvas instanceof HTMLCanvasElement&&(A.unobserve(this._canvas),D.unobserve(this._canvas)),this._dotLottieCore?.delete(),this._dotLottieCore=null,this._context=null,this._eventManager.dispatch({type:"destroy"}),this._eventManager.removeAllEventListeners(),this._cleanupStateMachineListeners();}freeze(){this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null,this._isFrozen=true,this._eventManager.dispatch({type:"freeze"}));}unfreeze(){this._animationFrameId===null&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this)),this._isFrozen=false,this._eventManager.dispatch({type:"unfreeze"}));}resize(){if(!this._dotLottieCore||!this.isLoaded)return;if(P&&this._canvas instanceof HTMLCanvasElement){let a=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,{height:s,width:v}=this._canvas.getBoundingClientRect();s!==0&&v!==0&&(this._canvas.width=v*a,this._canvas.height=s*a);}this._dotLottieCore.resize(this._canvas.width,this._canvas.height)&&this._render();}setSegment(n,a){this._dotLottieCore===null||b._wasmModule===null||this._dotLottieCore.setConfig({...this._dotLottieCore.config(),segment:u2([n,a],b._wasmModule)});}setMode(n){this._dotLottieCore===null||b._wasmModule===null||this._dotLottieCore.setConfig({...this._dotLottieCore.config(),mode:d2(n,b._wasmModule)});}setRenderConfig(n){let{devicePixelRatio:a,freezeOnOffscreen:s,...v}=n;this._renderConfig={...this._renderConfig,...v,devicePixelRatio:a||Q(),freezeOnOffscreen:s??true},P&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.autoResize?D.observe(this._canvas,this):D.unobserve(this._canvas),this._renderConfig.freezeOnOffscreen?A.observe(this._canvas,this):(A.unobserve(this._canvas),this._isFrozen&&this.unfreeze()));}loadAnimation(n){if(this._dotLottieCore===null||this._dotLottieCore.activeAnimationId()===n)return;this._dotLottieCore.loadAnimation(n,this._canvas.width,this._canvas.height)?(this._eventManager.dispatch({type:"load"}),this.resize()):this._eventManager.dispatch({type:"loadError",error:new Error(`Failed to animation :${n}`)});}setMarker(n){this._dotLottieCore!==null&&this._dotLottieCore.setConfig({...this._dotLottieCore.config(),marker:n});}markers(){let n=this._dotLottieCore?.markers();if(n){let a=[];for(let s=0;s<n.size();s+=1){let v=n.get(s);a.push({name:v.name,time:v.time,duration:v.duration});}return a}return []}setTheme(n){if(this._dotLottieCore===null)return false;let a=this._dotLottieCore.setTheme(n);return this._render(),a}resetTheme(){return this._dotLottieCore===null?false:this._dotLottieCore.resetTheme()}setThemeData(n){if(this._dotLottieCore===null)return false;let a=this._dotLottieCore.setThemeData(n);return this._render(),a}setSlots(n){this._dotLottieCore!==null&&this._dotLottieCore.setSlots(n);}setLayout(n){this._dotLottieCore===null||b._wasmModule===null||this._dotLottieCore.setConfig({...this._dotLottieCore.config(),layout:l2(n,b._wasmModule)});}setViewport(n,a,s,v){return this._dotLottieCore===null?false:this._dotLottieCore.setViewport(n,a,s,v)}static setWasmUrl(n){G.setWasmUrl(n);}loadStateMachine(n){return this._dotLottieCore?.stateMachineLoad(n)??false}startStateMachine(){if(b._wasmModule===null||this._dotLottieCore===null)return false;let n=b._wasmModule.createDefaultOpenURL(),a=this._dotLottieCore.stateMachineStart(n);return a&&this._setupStateMachineListeners(),a}stopStateMachine(){let n=this._dotLottieCore?.stateMachineStop()??false;return n&&this._cleanupStateMachineListeners(),n}_getPointerPosition(n){let a=this._canvas.getBoundingClientRect(),s=this._canvas.width/a.width,v=this._canvas.height/a.height,C=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,H=(n.clientX-a.left)*s/C,z=(n.clientY-a.top)*v/C;return {x:H,y:z}}_onPointerUp(n){let{x:a,y:s}=this._getPointerPosition(n);this.postPointerUpEvent(a,s);}_onPointerDown(n){let{x:a,y:s}=this._getPointerPosition(n);this.postPointerDownEvent(a,s);}_onPointerMove(n){let{x:a,y:s}=this._getPointerPosition(n);this.postPointerMoveEvent(a,s);}_onPointerEnter(n){let{x:a,y:s}=this._getPointerPosition(n);this.postPointerEnterEvent(a,s);}_onPointerLeave(n){let{x:a,y:s}=this._getPointerPosition(n);this.postPointerExitEvent(a,s);}postPointerUpEvent(n,a){return this._dotLottieCore?.stateMachinePostPointerUpEvent(n,a)}postPointerDownEvent(n,a){return this._dotLottieCore?.stateMachinePostPointerDownEvent(n,a)}postPointerMoveEvent(n,a){return this._dotLottieCore?.stateMachinePostPointerMoveEvent(n,a)}postPointerEnterEvent(n,a){return this._dotLottieCore?.stateMachinePostPointerEnterEvent(n,a)}postPointerExitEvent(n,a){return this._dotLottieCore?.stateMachinePostPointerExitEvent(n,a)}getStateMachineListeners(){if(!this._dotLottieCore)return [];let n=this._dotLottieCore.stateMachineFrameworkSetup(),a=[];for(let s=0;s<n.size();s+=1)a.push(n.get(s));return a}_setupStateMachineListeners(){if(P&&this._canvas instanceof HTMLCanvasElement&&this._dotLottieCore!==null&&this.isLoaded){let n=this.getStateMachineListeners();n.includes("PointerUp")&&this._canvas.addEventListener("pointerup",this._pointerUpMethod),n.includes("PointerDown")&&this._canvas.addEventListener("pointerdown",this._pointerDownMethod),n.includes("PointerMove")&&this._canvas.addEventListener("pointermove",this._pointerMoveMethod),n.includes("PointerEnter")&&this._canvas.addEventListener("pointerenter",this._pointerEnterMethod),n.includes("PointerExit")&&this._canvas.addEventListener("pointerleave",this._pointerExitMethod);}}_cleanupStateMachineListeners(){P&&this._canvas instanceof HTMLCanvasElement&&(this._canvas.removeEventListener("pointerup",this._pointerUpMethod),this._canvas.removeEventListener("pointerdown",this._pointerDownMethod),this._canvas.removeEventListener("pointermove",this._pointerMoveMethod),this._canvas.removeEventListener("pointerenter",this._pointerEnterMethod),this._canvas.removeEventListener("pointerleave",this._pointerExitMethod));}loadStateMachineData(n){return this._dotLottieCore?.stateMachineLoadData(n)??false}animationSize(){let n=this._dotLottieCore?.animationSize().get(0)??0,a=this._dotLottieCore?.animationSize().get(1)??0;return {width:n,height:a}}setStateMachineBooleanContext(n,a){return this._dotLottieCore?.stateMachineSetBooleanInput(n,a)??false}setStateMachineNumericContext(n,a){return this._dotLottieCore?.stateMachineSetNumericInput(n,a)??false}setStateMachineStringContext(n,a){return this._dotLottieCore?.stateMachineSetStringInput(n,a)??false}getLayerBoundingBox(n){let a=this._dotLottieCore?.getLayerBounds(n);if(!a||a.size()!==8)return;let s=[];for(let v=0;v<8;v+=1)s.push(a.get(v));return s}tween(n,a){if(!b._wasmModule)return false;let s=[0,0,1,1],v=new b._wasmModule.VectorFloat;for(let C of s)v.push_back(C);return this._dotLottieCore?.tween(n,a,v)??false}tweenToMarker(n,a){if(!b._wasmModule)return false;let s=[0,0,1,1],v=new b._wasmModule.VectorFloat;for(let C of s)v.push_back(C);return this._dotLottieCore?.tweenToMarker(n,a,v)??false}static transformThemeToLottieSlots(n,a){return b._wasmModule?.transformThemeToLottieSlots(n,a)??""}};m(b,"_wasmModule",nul