UNPKG

@lottiefiles/dotlottie-wc

Version:

Web component wrapper around the dotlottie-web library

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