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