@cesdk/cesdk-js 1.3.0 → 1.4.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ /*! For license information please see cesdk-engine.umd.js.LICENSE.txt */
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CreativeEngine=t():e.CreativeEngine=t()}(self,(function(){return(()=>{var e,t={6212:function(e){e.exports=function(){"use strict";for(var e=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),e<t?t:e>r?r:e},t={},r=0,n=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];r<n.length;r+=1){var o=n[r];t["[object "+o+"]"]=o.toLowerCase()}var i=function(e){return t[Object.prototype.toString.call(e)]||"object"},a=Math.PI,s={clip_rgb:function(t){t._clipped=!1,t._unclipped=t.slice(0);for(var r=0;r<=3;r++)r<3?((t[r]<0||t[r]>255)&&(t._clipped=!0),t[r]=e(t[r],0,255)):3===r&&(t[r]=e(t[r],0,1));return t},limit:e,type:i,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==i(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==i(e[t])?e[t].toLowerCase():null},PI:a,TWOPI:2*a,PITHIRD:a/3,DEG2RAD:a/180,RAD2DEG:180/a},c={format:{},autodetect:[]},u=s.last,l=s.clip_rgb,f=s.type,d=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=this;if("object"===f(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var n=u(e),o=!1;if(!n){o=!0,c.sorted||(c.autodetect=c.autodetect.sort((function(e,t){return t.p-e.p})),c.sorted=!0);for(var i=0,a=c.autodetect;i<a.length;i+=1){var s=a[i];if(n=s.test.apply(s,e))break}}if(!c.format[n])throw new Error("unknown format: "+e);var d=c.format[n].apply(null,o?e:e.slice(0,-1));r._rgb=l(d),3===r._rgb.length&&r._rgb.push(1)};d.prototype.toString=function(){return"function"==f(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var p=d,g=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(g.Color,[null].concat(e)))};g.Color=p,g.version="2.1.2";var h=g,m=s.unpack,v=Math.max,b=s.unpack,y=s.unpack,E=s.type;p.prototype.cmyk=function(){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=m(e,"rgb"),n=r[0],o=r[1],i=r[2],a=1-v(n/=255,v(o/=255,i/=255)),s=a<1?1/(1-a):0;return[(1-n-a)*s,(1-o-a)*s,(1-i-a)*s,a]}(this._rgb)},h.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["cmyk"])))},c.format.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=b(e,"cmyk"))[0],n=e[1],o=e[2],i=e[3],a=e.length>4?e[4]:1;return 1===i?[0,0,0,a]:[r>=1?0:255*(1-r)*(1-i),n>=1?0:255*(1-n)*(1-i),o>=1?0:255*(1-o)*(1-i),a]},c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=y(e,"cmyk"),"array"===E(e)&&4===e.length)return"cmyk"}});var w=s.unpack,_=s.last,O=function(e){return Math.round(100*e)/100},T=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=w(e,"hsla"),n=_(e)||"lsa";return r[0]=O(r[0]||0),r[1]=O(100*r[1])+"%",r[2]=O(100*r[2])+"%","hsla"===n||r.length>3&&r[3]<1?(r[3]=r.length>3?r[3]:1,n="hsla"):r.length=3,n+"("+r.join(",")+")"},D=s.unpack,P=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=D(e,"rgba"))[0],n=e[1],o=e[2];r/=255,n/=255,o/=255;var i,a,s=Math.min(r,n,o),c=Math.max(r,n,o),u=(c+s)/2;return c===s?(i=0,a=Number.NaN):i=u<.5?(c-s)/(c+s):(c-s)/(2-c-s),r==c?a=(n-o)/(c-s):n==c?a=2+(o-r)/(c-s):o==c&&(a=4+(r-n)/(c-s)),(a*=60)<0&&(a+=360),e.length>3&&void 0!==e[3]?[a,i,u,e[3]]:[a,i,u]},x=s.unpack,S=s.last,M=Math.round,k=s.unpack,R=Math.round,A=function(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];var n,o,i,a=(t=k(t,"hsl"))[0],s=t[1],c=t[2];if(0===s)n=o=i=255*c;else{var u=[0,0,0],l=[0,0,0],f=c<.5?c*(1+s):c+s-c*s,d=2*c-f,p=a/360;u[0]=p+1/3,u[1]=p,u[2]=p-1/3;for(var g=0;g<3;g++)u[g]<0&&(u[g]+=1),u[g]>1&&(u[g]-=1),6*u[g]<1?l[g]=d+6*(f-d)*u[g]:2*u[g]<1?l[g]=f:3*u[g]<2?l[g]=d+(f-d)*(2/3-u[g])*6:l[g]=d;n=(e=[R(255*l[0]),R(255*l[1]),R(255*l[2])])[0],o=e[1],i=e[2]}return t.length>3?[n,o,i,t[3]]:[n,o,i,1]},F=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,I=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,C=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,j=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,L=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,N=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,U=Math.round,H=function(e){var t;if(e=e.toLowerCase().trim(),c.format.named)try{return c.format.named(e)}catch(e){}if(t=e.match(F)){for(var r=t.slice(1,4),n=0;n<3;n++)r[n]=+r[n];return r[3]=1,r}if(t=e.match(I)){for(var o=t.slice(1,5),i=0;i<4;i++)o[i]=+o[i];return o}if(t=e.match(C)){for(var a=t.slice(1,4),s=0;s<3;s++)a[s]=U(2.55*a[s]);return a[3]=1,a}if(t=e.match(j)){for(var u=t.slice(1,5),l=0;l<3;l++)u[l]=U(2.55*u[l]);return u[3]=+u[3],u}if(t=e.match(L)){var f=t.slice(1,4);f[1]*=.01,f[2]*=.01;var d=A(f);return d[3]=1,d}if(t=e.match(N)){var p=t.slice(1,4);p[1]*=.01,p[2]*=.01;var g=A(p);return g[3]=+t[4],g}};H.test=function(e){return F.test(e)||I.test(e)||C.test(e)||j.test(e)||L.test(e)||N.test(e)};var B=H,X=s.type;p.prototype.css=function(e){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=x(e,"rgba"),n=S(e)||"rgb";return"hsl"==n.substr(0,3)?T(P(r),n):(r[0]=M(r[0]),r[1]=M(r[1]),r[2]=M(r[2]),("rgba"===n||r.length>3&&r[3]<1)&&(r[3]=r.length>3?r[3]:1,n="rgba"),n+"("+r.slice(0,"rgb"===n?3:4).join(",")+")")}(this._rgb,e)},h.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["css"])))},c.format.css=B,c.autodetect.push({p:5,test:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(!t.length&&"string"===X(e)&&B.test(e))return"css"}});var Q=s.unpack;c.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Q(e,"rgba");return r[0]*=255,r[1]*=255,r[2]*=255,r},h.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["gl"])))},p.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var G=s.unpack,q=s.unpack,V=Math.floor,z=s.unpack,W=s.type;p.prototype.hcg=function(){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n=G(e,"rgb"),o=n[0],i=n[1],a=n[2],s=Math.min(o,i,a),c=Math.max(o,i,a),u=c-s,l=100*u/255,f=s/(255-u)*100;return 0===u?r=Number.NaN:(o===c&&(r=(i-a)/u),i===c&&(r=2+(a-o)/u),a===c&&(r=4+(o-i)/u),(r*=60)<0&&(r+=360)),[r,l,f]}(this._rgb)},h.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hcg"])))},c.format.hcg=function(){for(var e,t,r,n,o,i,a=[],s=arguments.length;s--;)a[s]=arguments[s];var c,u,l,f=(a=q(a,"hcg"))[0],d=a[1],p=a[2];p*=255;var g=255*d;if(0===d)c=u=l=p;else{360===f&&(f=0),f>360&&(f-=360),f<0&&(f+=360);var h=V(f/=60),m=f-h,v=p*(1-d),b=v+g*(1-m),y=v+g*m,E=v+g;switch(h){case 0:c=(e=[E,y,v])[0],u=e[1],l=e[2];break;case 1:c=(t=[b,E,v])[0],u=t[1],l=t[2];break;case 2:c=(r=[v,E,y])[0],u=r[1],l=r[2];break;case 3:c=(n=[v,b,E])[0],u=n[1],l=n[2];break;case 4:c=(o=[y,v,E])[0],u=o[1],l=o[2];break;case 5:c=(i=[E,v,b])[0],u=i[1],l=i[2]}}return[c,u,l,a.length>3?a[3]:1]},c.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=z(e,"hcg"),"array"===W(e)&&3===e.length)return"hcg"}});var $=s.unpack,Y=s.last,K=Math.round,Z=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=$(e,"rgba"),n=r[0],o=r[1],i=r[2],a=r[3],s=Y(e)||"auto";void 0===a&&(a=1),"auto"===s&&(s=a<1?"rgba":"rgb");var c="000000"+((n=K(n))<<16|(o=K(o))<<8|(i=K(i))).toString(16);c=c.substr(c.length-6);var u="0"+K(255*a).toString(16);switch(u=u.substr(u.length-2),s.toLowerCase()){case"rgba":return"#"+c+u;case"argb":return"#"+u+c;default:return"#"+c}},J=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,ee=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,te=function(e){if(e.match(J)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(ee)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var r=parseInt(e,16);return[r>>24&255,r>>16&255,r>>8&255,Math.round((255&r)/255*100)/100]}throw new Error("unknown hex color: "+e)},re=s.type;p.prototype.hex=function(e){return Z(this._rgb,e)},h.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hex"])))},c.format.hex=te,c.autodetect.push({p:4,test:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(!t.length&&"string"===re(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var ne=s.unpack,oe=s.TWOPI,ie=Math.min,ae=Math.sqrt,se=Math.acos,ce=s.unpack,ue=s.limit,le=s.TWOPI,fe=s.PITHIRD,de=Math.cos,pe=s.unpack,ge=s.type;p.prototype.hsi=function(){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n=ne(e,"rgb"),o=n[0],i=n[1],a=n[2],s=ie(o/=255,i/=255,a/=255),c=(o+i+a)/3,u=c>0?1-s/c:0;return 0===u?r=NaN:(r=(o-i+(o-a))/2,r/=ae((o-i)*(o-i)+(o-a)*(i-a)),r=se(r),a>i&&(r=oe-r),r/=oe),[360*r,u,c]}(this._rgb)},h.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsi"])))},c.format.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,o,i=(e=ce(e,"hsi"))[0],a=e[1],s=e[2];return isNaN(i)&&(i=0),isNaN(a)&&(a=0),i>360&&(i-=360),i<0&&(i+=360),(i/=360)<1/3?n=1-((o=(1-a)/3)+(r=(1+a*de(le*i)/de(fe-le*i))/3)):i<2/3?o=1-((r=(1-a)/3)+(n=(1+a*de(le*(i-=1/3))/de(fe-le*i))/3)):r=1-((n=(1-a)/3)+(o=(1+a*de(le*(i-=2/3))/de(fe-le*i))/3)),[255*(r=ue(s*r*3)),255*(n=ue(s*n*3)),255*(o=ue(s*o*3)),e.length>3?e[3]:1]},c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=pe(e,"hsi"),"array"===ge(e)&&3===e.length)return"hsi"}});var he=s.unpack,me=s.type;p.prototype.hsl=function(){return P(this._rgb)},h.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsl"])))},c.format.hsl=A,c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=he(e,"hsl"),"array"===me(e)&&3===e.length)return"hsl"}});var ve=s.unpack,be=Math.min,ye=Math.max,Ee=s.unpack,we=Math.floor,_e=s.unpack,Oe=s.type;p.prototype.hsv=function(){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,o,i=(e=ve(e,"rgb"))[0],a=e[1],s=e[2],c=be(i,a,s),u=ye(i,a,s),l=u-c;return o=u/255,0===u?(r=Number.NaN,n=0):(n=l/u,i===u&&(r=(a-s)/l),a===u&&(r=2+(s-i)/l),s===u&&(r=4+(i-a)/l),(r*=60)<0&&(r+=360)),[r,n,o]}(this._rgb)},h.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hsv"])))},c.format.hsv=function(){for(var e,t,r,n,o,i,a=[],s=arguments.length;s--;)a[s]=arguments[s];var c,u,l,f=(a=Ee(a,"hsv"))[0],d=a[1],p=a[2];if(p*=255,0===d)c=u=l=p;else{360===f&&(f=0),f>360&&(f-=360),f<0&&(f+=360);var g=we(f/=60),h=f-g,m=p*(1-d),v=p*(1-d*h),b=p*(1-d*(1-h));switch(g){case 0:c=(e=[p,b,m])[0],u=e[1],l=e[2];break;case 1:c=(t=[v,p,m])[0],u=t[1],l=t[2];break;case 2:c=(r=[m,p,b])[0],u=r[1],l=r[2];break;case 3:c=(n=[m,v,p])[0],u=n[1],l=n[2];break;case 4:c=(o=[b,m,p])[0],u=o[1],l=o[2];break;case 5:c=(i=[p,m,v])[0],u=i[1],l=i[2]}}return[c,u,l,a.length>3?a[3]:1]},c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=_e(e,"hsv"),"array"===Oe(e)&&3===e.length)return"hsv"}});var Te=18,De=.95047,Pe=1,xe=1.08883,Se=.137931034,Me=.206896552,ke=.12841855,Re=.008856452,Ae=s.unpack,Fe=Math.pow,Ie=function(e){return(e/=255)<=.04045?e/12.92:Fe((e+.055)/1.055,2.4)},Ce=function(e){return e>Re?Fe(e,1/3):e/ke+Se},je=function(e,t,r){return e=Ie(e),t=Ie(t),r=Ie(r),[Ce((.4124564*e+.3575761*t+.1804375*r)/De),Ce((.2126729*e+.7151522*t+.072175*r)/Pe),Ce((.0193339*e+.119192*t+.9503041*r)/xe)]},Le=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Ae(e,"rgb"),n=r[0],o=r[1],i=r[2],a=je(n,o,i),s=a[0],c=a[1],u=116*c-16;return[u<0?0:u,500*(s-c),200*(c-a[2])]},Ne=s.unpack,Ue=Math.pow,He=function(e){return 255*(e<=.00304?12.92*e:1.055*Ue(e,1/2.4)-.055)},Be=function(e){return e>Me?e*e*e:ke*(e-Se)},Xe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,o,i=(e=Ne(e,"lab"))[0],a=e[1],s=e[2];return n=(i+16)/116,r=isNaN(a)?n:n+a/500,o=isNaN(s)?n:n-s/200,n=Pe*Be(n),r=De*Be(r),o=xe*Be(o),[He(3.2404542*r-1.5371385*n-.4985314*o),He(-.969266*r+1.8760108*n+.041556*o),He(.0556434*r-.2040259*n+1.0572252*o),e.length>3?e[3]:1]},Qe=s.unpack,Ge=s.type;p.prototype.lab=function(){return Le(this._rgb)},h.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["lab"])))},c.format.lab=Xe,c.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Qe(e,"lab"),"array"===Ge(e)&&3===e.length)return"lab"}});var qe=s.unpack,Ve=s.RAD2DEG,ze=Math.sqrt,We=Math.atan2,$e=Math.round,Ye=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=qe(e,"lab"),n=r[0],o=r[1],i=r[2],a=ze(o*o+i*i),s=(We(i,o)*Ve+360)%360;return 0===$e(1e4*a)&&(s=Number.NaN),[n,a,s]},Ke=s.unpack,Ze=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Ke(e,"rgb"),n=r[0],o=r[1],i=r[2],a=Le(n,o,i),s=a[0],c=a[1],u=a[2];return Ye(s,c,u)},Je=s.unpack,et=s.DEG2RAD,tt=Math.sin,rt=Math.cos,nt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Je(e,"lch"),n=r[0],o=r[1],i=r[2];return isNaN(i)&&(i=0),[n,rt(i*=et)*o,tt(i)*o]},ot=s.unpack,it=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=(e=ot(e,"lch"))[0],n=e[1],o=e[2],i=nt(r,n,o),a=i[0],s=i[1],c=i[2],u=Xe(a,s,c);return[u[0],u[1],u[2],e.length>3?e[3]:1]},at=s.unpack,st=s.unpack,ct=s.type;p.prototype.lch=function(){return Ze(this._rgb)},p.prototype.hcl=function(){return Ze(this._rgb).reverse()},h.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["lch"])))},h.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["hcl"])))},c.format.lch=it,c.format.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=at(e,"hcl").reverse();return it.apply(void 0,r)},["lch","hcl"].forEach((function(e){return c.autodetect.push({p:2,test:function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(t=st(t,e),"array"===ct(t)&&3===t.length)return e}})}));var ut={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},lt=s.type;p.prototype.name=function(){for(var e=Z(this._rgb,"rgb"),t=0,r=Object.keys(ut);t<r.length;t+=1){var n=r[t];if(ut[n]===e)return n.toLowerCase()}return e},c.format.named=function(e){if(e=e.toLowerCase(),ut[e])return te(ut[e]);throw new Error("unknown color name: "+e)},c.autodetect.push({p:5,test:function(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(!t.length&&"string"===lt(e)&&ut[e.toLowerCase()])return"named"}});var ft=s.unpack,dt=s.type,pt=s.type;p.prototype.num=function(){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=ft(e,"rgb");return(r[0]<<16)+(r[1]<<8)+r[2]}(this._rgb)},h.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["num"])))},c.format.num=function(e){if("number"==dt(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},c.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===pt(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var gt=s.unpack,ht=s.type,mt=Math.round;p.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(mt)},p.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,r){return r<3?!1===e?t:mt(t):t}))},h.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["rgb"])))},c.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=gt(e,"rgba");return void 0===r[3]&&(r[3]=1),r},c.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=gt(e,"rgba"),"array"===ht(e)&&(3===e.length||4===e.length&&"number"==ht(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var vt=Math.log,bt=function(e){var t,r,n,o=e/100;return o<66?(t=255,r=-155.25485562709179-.44596950469579133*(r=o-2)+104.49216199393888*vt(r),n=o<20?0:.8274096064007395*(n=o-10)-254.76935184120902+115.67994401066147*vt(n)):(t=351.97690566805693+.114206453784165*(t=o-55)-40.25366309332127*vt(t),r=325.4494125711974+.07943456536662342*(r=o-50)-28.0852963507957*vt(r),n=255),[t,r,n,1]},yt=s.unpack,Et=Math.round;p.prototype.temp=p.prototype.kelvin=p.prototype.temperature=function(){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var r,n=yt(e,"rgb"),o=n[0],i=n[2],a=1e3,s=4e4,c=.4;s-a>c;){var u=bt(r=.5*(s+a));u[2]/u[0]>=i/o?s=r:a=r}return Et(r)}(this._rgb)},h.temp=h.kelvin=h.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(p,[null].concat(e,["temp"])))},c.format.temp=c.format.kelvin=c.format.temperature=bt;var wt=s.type;p.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===wt(e)?t?(this._rgb[3]=e,this):new p([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},p.prototype.clipped=function(){return this._rgb._clipped||!1},p.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=Te*e,new p(t,"lab").alpha(this.alpha(),!0)},p.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},p.prototype.darker=p.prototype.darken,p.prototype.brighter=p.prototype.brighten,p.prototype.get=function(e){var t=e.split("."),r=t[0],n=t[1],o=this[r]();if(n){var i=r.indexOf(n);if(i>-1)return o[i];throw new Error("unknown channel "+n+" in mode "+r)}return o};var _t=s.type,Ot=Math.pow;p.prototype.luminance=function(e){if(void 0!==e&&"number"===_t(e)){if(0===e)return new p([0,0,0,this._rgb[3]],"rgb");if(1===e)return new p([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),r=20,n=function(t,o){var i=t.interpolate(o,.5,"rgb"),a=i.luminance();return Math.abs(e-a)<1e-7||!r--?i:a>e?n(t,i):n(i,o)},o=(t>e?n(new p([0,0,0]),this):n(this,new p([255,255,255]))).rgb();return new p(o.concat([this._rgb[3]]))}return Tt.apply(void 0,this._rgb.slice(0,3))};var Tt=function(e,t,r){return.2126*(e=Dt(e))+.7152*(t=Dt(t))+.0722*Dt(r)},Dt=function(e){return(e/=255)<=.03928?e/12.92:Ot((e+.055)/1.055,2.4)},Pt={},xt=s.type,St=function(e,t,r){void 0===r&&(r=.5);for(var n=[],o=arguments.length-3;o-- >0;)n[o]=arguments[o+3];var i=n[0]||"lrgb";if(Pt[i]||n.length||(i=Object.keys(Pt)[0]),!Pt[i])throw new Error("interpolation mode "+i+" is not defined");return"object"!==xt(e)&&(e=new p(e)),"object"!==xt(t)&&(t=new p(t)),Pt[i](e,t,r).alpha(e.alpha()+r*(t.alpha()-e.alpha()))};p.prototype.mix=p.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return St.apply(void 0,[this,e,t].concat(r))},p.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,r=t[3];return e?(this._rgb=[t[0]*r,t[1]*r,t[2]*r,r],this):new p([t[0]*r,t[1]*r,t[2]*r,r],"rgb")},p.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=Te*e,t[1]<0&&(t[1]=0),new p(t,"lch").alpha(this.alpha(),!0)},p.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var Mt=s.type;p.prototype.set=function(e,t,r){void 0===r&&(r=!1);var n=e.split("."),o=n[0],i=n[1],a=this[o]();if(i){var s=o.indexOf(i);if(s>-1){if("string"==Mt(t))switch(t.charAt(0)){case"+":case"-":a[s]+=+t;break;case"*":a[s]*=+t.substr(1);break;case"/":a[s]/=+t.substr(1);break;default:a[s]=+t}else{if("number"!==Mt(t))throw new Error("unsupported value for Color.set");a[s]=t}var c=new p(a,o);return r?(this._rgb=c._rgb,this):c}throw new Error("unknown channel "+i+" in mode "+o)}return a};Pt.rgb=function(e,t,r){var n=e._rgb,o=t._rgb;return new p(n[0]+r*(o[0]-n[0]),n[1]+r*(o[1]-n[1]),n[2]+r*(o[2]-n[2]),"rgb")};var kt=Math.sqrt,Rt=Math.pow;Pt.lrgb=function(e,t,r){var n=e._rgb,o=n[0],i=n[1],a=n[2],s=t._rgb,c=s[0],u=s[1],l=s[2];return new p(kt(Rt(o,2)*(1-r)+Rt(c,2)*r),kt(Rt(i,2)*(1-r)+Rt(u,2)*r),kt(Rt(a,2)*(1-r)+Rt(l,2)*r),"rgb")};Pt.lab=function(e,t,r){var n=e.lab(),o=t.lab();return new p(n[0]+r*(o[0]-n[0]),n[1]+r*(o[1]-n[1]),n[2]+r*(o[2]-n[2]),"lab")};var At=function(e,t,r,n){var o,i,a,s,c,u,l,f,d,g,h,m;return"hsl"===n?(a=e.hsl(),s=t.hsl()):"hsv"===n?(a=e.hsv(),s=t.hsv()):"hcg"===n?(a=e.hcg(),s=t.hcg()):"hsi"===n?(a=e.hsi(),s=t.hsi()):"lch"!==n&&"hcl"!==n||(n="hcl",a=e.hcl(),s=t.hcl()),"h"===n.substr(0,1)&&(c=(o=a)[0],l=o[1],d=o[2],u=(i=s)[0],f=i[1],g=i[2]),isNaN(c)||isNaN(u)?isNaN(c)?isNaN(u)?m=Number.NaN:(m=u,1!=d&&0!=d||"hsv"==n||(h=f)):(m=c,1!=g&&0!=g||"hsv"==n||(h=l)):m=c+r*(u>c&&u-c>180?u-(c+360):u<c&&c-u>180?u+360-c:u-c),void 0===h&&(h=l+r*(f-l)),new p([m,h,d+r*(g-d)],n)},Ft=function(e,t,r){return At(e,t,r,"lch")};Pt.lch=Ft,Pt.hcl=Ft;Pt.num=function(e,t,r){var n=e.num(),o=t.num();return new p(n+r*(o-n),"num")};Pt.hcg=function(e,t,r){return At(e,t,r,"hcg")};Pt.hsi=function(e,t,r){return At(e,t,r,"hsi")};Pt.hsl=function(e,t,r){return At(e,t,r,"hsl")};Pt.hsv=function(e,t,r){return At(e,t,r,"hsv")};var It=s.clip_rgb,Ct=Math.pow,jt=Math.sqrt,Lt=Math.PI,Nt=Math.cos,Ut=Math.sin,Ht=Math.atan2,Bt=function(e,t){for(var r=e.length,n=[0,0,0,0],o=0;o<e.length;o++){var i=e[o],a=t[o]/r,s=i._rgb;n[0]+=Ct(s[0],2)*a,n[1]+=Ct(s[1],2)*a,n[2]+=Ct(s[2],2)*a,n[3]+=s[3]*a}return n[0]=jt(n[0]),n[1]=jt(n[1]),n[2]=jt(n[2]),n[3]>.9999999&&(n[3]=1),new p(It(n))},Xt=s.type,Qt=Math.pow,Gt=function(e){var t="rgb",r=h("#ccc"),n=0,o=[0,1],i=[],a=[0,0],s=!1,c=[],u=!1,l=0,f=1,d=!1,p={},g=!0,m=1,v=function(e){if((e=e||["#fff","#000"])&&"string"===Xt(e)&&h.brewer&&h.brewer[e.toLowerCase()]&&(e=h.brewer[e.toLowerCase()]),"array"===Xt(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t<e.length;t++)e[t]=h(e[t]);i.length=0;for(var r=0;r<e.length;r++)i.push(r/(e.length-1))}return w(),c=e},b=function(e){return e},y=function(e){return e},E=function(e,n){var o,u;if(null==n&&(n=!1),isNaN(e)||null===e)return r;u=n?e:s&&s.length>2?function(e){if(null!=s){for(var t=s.length-1,r=0;r<t&&e>=s[r];)r++;return r-1}return 0}(e)/(s.length-2):f!==l?(e-l)/(f-l):1,u=y(u),n||(u=b(u)),1!==m&&(u=Qt(u,m)),u=a[0]+u*(1-a[0]-a[1]),u=Math.min(1,Math.max(0,u));var d=Math.floor(1e4*u);if(g&&p[d])o=p[d];else{if("array"===Xt(c))for(var v=0;v<i.length;v++){var E=i[v];if(u<=E){o=c[v];break}if(u>=E&&v===i.length-1){o=c[v];break}if(u>E&&u<i[v+1]){u=(u-E)/(i[v+1]-E),o=h.interpolate(c[v],c[v+1],u,t);break}}else"function"===Xt(c)&&(o=c(u));g&&(p[d]=o)}return o},w=function(){return p={}};v(e);var _=function(e){var t=h(E(e));return u&&t[u]?t[u]():t};return _.classes=function(e){if(null!=e){if("array"===Xt(e))s=e,o=[e[0],e[e.length-1]];else{var t=h.analyze(o);s=0===e?[t.min,t.max]:h.limits(t,"e",e)}return _}return s},_.domain=function(e){if(!arguments.length)return o;l=e[0],f=e[e.length-1],i=[];var t=c.length;if(e.length===t&&l!==f)for(var r=0,n=Array.from(e);r<n.length;r+=1){var a=n[r];i.push((a-l)/(f-l))}else{for(var s=0;s<t;s++)i.push(s/(t-1));if(e.length>2){var u=e.map((function(t,r){return r/(e.length-1)})),d=e.map((function(e){return(e-l)/(f-l)}));d.every((function(e,t){return u[t]===e}))||(y=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=d[t+1];)t++;var r=(e-d[t])/(d[t+1]-d[t]);return u[t]+r*(u[t+1]-u[t])})}}return o=[l,f],_},_.mode=function(e){return arguments.length?(t=e,w(),_):t},_.range=function(e,t){return v(e),_},_.out=function(e){return u=e,_},_.spread=function(e){return arguments.length?(n=e,_):n},_.correctLightness=function(e){return null==e&&(e=!0),d=e,w(),b=d?function(e){for(var t=E(0,!0).lab()[0],r=E(1,!0).lab()[0],n=t>r,o=E(e,!0).lab()[0],i=t+(r-t)*e,a=o-i,s=0,c=1,u=20;Math.abs(a)>.01&&u-- >0;)n&&(a*=-1),a<0?(s=e,e+=.5*(c-e)):(c=e,e+=.5*(s-e)),a=(o=E(e,!0).lab()[0])-i;return e}:function(e){return e},_},_.padding=function(e){return null!=e?("number"===Xt(e)&&(e=[e,e]),a=e,_):a},_.colors=function(t,r){arguments.length<2&&(r="hex");var n=[];if(0===arguments.length)n=c.slice(0);else if(1===t)n=[_(.5)];else if(t>1){var i=o[0],a=o[1]-i;n=qt(0,t,!1).map((function(e){return _(i+e/(t-1)*a)}))}else{e=[];var u=[];if(s&&s.length>2)for(var l=1,f=s.length,d=1<=f;d?l<f:l>f;d?l++:l--)u.push(.5*(s[l-1]+s[l]));else u=o;n=u.map((function(e){return _(e)}))}return h[r]&&(n=n.map((function(e){return e[r]()}))),n},_.cache=function(e){return null!=e?(g=e,_):g},_.gamma=function(e){return null!=e?(m=e,_):m},_.nodata=function(e){return null!=e?(r=h(e),_):r},_};function qt(e,t,r){for(var n=[],o=e<t,i=r?o?t+1:t-1:t,a=e;o?a<i:a>i;o?a++:a--)n.push(a);return n}var Vt=function(e){var t,r,n,o,i,a,s;if(2===(e=e.map((function(e){return new p(e)}))).length)t=e.map((function(e){return e.lab()})),i=t[0],a=t[1],o=function(e){var t=[0,1,2].map((function(t){return i[t]+e*(a[t]-i[t])}));return new p(t,"lab")};else if(3===e.length)r=e.map((function(e){return e.lab()})),i=r[0],a=r[1],s=r[2],o=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*i[t]+2*(1-e)*e*a[t]+e*e*s[t]}));return new p(t,"lab")};else if(4===e.length){var c;n=e.map((function(e){return e.lab()})),i=n[0],a=n[1],s=n[2],c=n[3],o=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*i[t]+3*(1-e)*(1-e)*e*a[t]+3*(1-e)*e*e*s[t]+e*e*e*c[t]}));return new p(t,"lab")}}else if(5===e.length){var u=Vt(e.slice(0,3)),l=Vt(e.slice(2,5));o=function(e){return e<.5?u(2*e):l(2*(e-.5))}}return o},zt=function(e,t,r){if(!zt[r])throw new Error("unknown blend mode "+r);return zt[r](e,t)},Wt=function(e){return function(t,r){var n=h(r).rgb(),o=h(t).rgb();return h.rgb(e(n,o))}},$t=function(e){return function(t,r){var n=[];return n[0]=e(t[0],r[0]),n[1]=e(t[1],r[1]),n[2]=e(t[2],r[2]),n}};zt.normal=Wt($t((function(e){return e}))),zt.multiply=Wt($t((function(e,t){return e*t/255}))),zt.screen=Wt($t((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),zt.overlay=Wt($t((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),zt.darken=Wt($t((function(e,t){return e>t?t:e}))),zt.lighten=Wt($t((function(e,t){return e>t?e:t}))),zt.dodge=Wt($t((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),zt.burn=Wt($t((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var Yt=zt,Kt=s.type,Zt=s.clip_rgb,Jt=s.TWOPI,er=Math.pow,tr=Math.sin,rr=Math.cos,nr=Math.floor,or=Math.random,ir=Math.log,ar=Math.pow,sr=Math.floor,cr=Math.abs,ur=function(e,t){void 0===t&&(t=null);var r={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===i(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===i(e)&&(e=e[t]),null==e||isNaN(e)||(r.values.push(e),r.sum+=e,e<r.min&&(r.min=e),e>r.max&&(r.max=e),r.count+=1)})),r.domain=[r.min,r.max],r.limits=function(e,t){return lr(r,e,t)},r},lr=function(e,t,r){void 0===t&&(t="equal"),void 0===r&&(r=7),"array"==i(e)&&(e=ur(e));var n=e.min,o=e.max,a=e.values.sort((function(e,t){return e-t}));if(1===r)return[n,o];var s=[];if("c"===t.substr(0,1)&&(s.push(n),s.push(o)),"e"===t.substr(0,1)){s.push(n);for(var c=1;c<r;c++)s.push(n+c/r*(o-n));s.push(o)}else if("l"===t.substr(0,1)){if(n<=0)throw new Error("Logarithmic scales are only possible for values > 0");var u=Math.LOG10E*ir(n),l=Math.LOG10E*ir(o);s.push(n);for(var f=1;f<r;f++)s.push(ar(10,u+f/r*(l-u)));s.push(o)}else if("q"===t.substr(0,1)){s.push(n);for(var d=1;d<r;d++){var p=(a.length-1)*d/r,g=sr(p);if(g===p)s.push(a[g]);else{var h=p-g;s.push(a[g]*(1-h)+a[g+1]*h)}}s.push(o)}else if("k"===t.substr(0,1)){var m,v=a.length,b=new Array(v),y=new Array(r),E=!0,w=0,_=null;(_=[]).push(n);for(var O=1;O<r;O++)_.push(n+O/r*(o-n));for(_.push(o);E;){for(var T=0;T<r;T++)y[T]=0;for(var D=0;D<v;D++)for(var P=a[D],x=Number.MAX_VALUE,S=void 0,M=0;M<r;M++){var k=cr(_[M]-P);k<x&&(x=k,S=M),y[S]++,b[D]=S}for(var R=new Array(r),A=0;A<r;A++)R[A]=null;for(var F=0;F<v;F++)null===R[m=b[F]]?R[m]=a[F]:R[m]+=a[F];for(var I=0;I<r;I++)R[I]*=1/y[I];E=!1;for(var C=0;C<r;C++)if(R[C]!==_[C]){E=!0;break}_=R,++w>200&&(E=!1)}for(var j={},L=0;L<r;L++)j[L]=[];for(var N=0;N<v;N++)j[m=b[N]].push(a[N]);for(var U=[],H=0;H<r;H++)U.push(j[H][0]),U.push(j[H][j[H].length-1]);U=U.sort((function(e,t){return e-t})),s.push(U[0]);for(var B=1;B<U.length;B+=2){var X=U[B];isNaN(X)||-1!==s.indexOf(X)||s.push(X)}}return s},fr={analyze:ur,limits:lr},dr=Math.sqrt,pr=Math.atan2,gr=Math.abs,hr=Math.cos,mr=Math.PI,vr={cool:function(){return Gt([h.hsl(180,1,.9),h.hsl(250,.7,.4)])},hot:function(){return Gt(["#000","#f00","#ff0","#fff"]).mode("rgb")}},br={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},yr=0,Er=Object.keys(br);yr<Er.length;yr+=1){var wr=Er[yr];br[wr.toLowerCase()]=br[wr]}var _r=br;return h.average=function(e,t,r){void 0===t&&(t="lrgb"),void 0===r&&(r=null);var n=e.length;r||(r=Array.from(new Array(n)).map((function(){return 1})));var o=n/r.reduce((function(e,t){return e+t}));if(r.forEach((function(e,t){r[t]*=o})),e=e.map((function(e){return new p(e)})),"lrgb"===t)return Bt(e,r);for(var i=e.shift(),a=i.get(t),s=[],c=0,u=0,l=0;l<a.length;l++)if(a[l]=(a[l]||0)*r[0],s.push(isNaN(a[l])?0:r[0]),"h"===t.charAt(l)&&!isNaN(a[l])){var f=a[l]/180*Lt;c+=Nt(f)*r[0],u+=Ut(f)*r[0]}var d=i.alpha()*r[0];e.forEach((function(e,n){var o=e.get(t);d+=e.alpha()*r[n+1];for(var i=0;i<a.length;i++)if(!isNaN(o[i]))if(s[i]+=r[n+1],"h"===t.charAt(i)){var l=o[i]/180*Lt;c+=Nt(l)*r[n+1],u+=Ut(l)*r[n+1]}else a[i]+=o[i]*r[n+1]}));for(var g=0;g<a.length;g++)if("h"===t.charAt(g)){for(var h=Ht(u/s[g],c/s[g])/Lt*180;h<0;)h+=360;for(;h>=360;)h-=360;a[g]=h}else a[g]=a[g]/s[g];return d/=n,new p(a,t).alpha(d>.99999?1:d,!0)},h.bezier=function(e){var t=Vt(e);return t.scale=function(){return Gt(t)},t},h.blend=Yt,h.cubehelix=function(e,t,r,n,o){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===r&&(r=1),void 0===n&&(n=1),void 0===o&&(o=[0,1]);var i,a=0;"array"===Kt(o)?i=o[1]-o[0]:(i=0,o=[o,o]);var s=function(s){var c=Jt*((e+120)/360+t*s),u=er(o[0]+i*s,n),l=(0!==a?r[0]+s*a:r)*u*(1-u)/2,f=rr(c),d=tr(c);return h(Zt([255*(u+l*(-.14861*f+1.78277*d)),255*(u+l*(-.29227*f-.90649*d)),255*(u+l*(1.97294*f)),1]))};return s.start=function(t){return null==t?e:(e=t,s)},s.rotations=function(e){return null==e?t:(t=e,s)},s.gamma=function(e){return null==e?n:(n=e,s)},s.hue=function(e){return null==e?r:("array"===Kt(r=e)?0==(a=r[1]-r[0])&&(r=r[1]):a=0,s)},s.lightness=function(e){return null==e?o:("array"===Kt(e)?(o=e,i=e[1]-e[0]):(o=[e,e],i=0),s)},s.scale=function(){return h.scale(s)},s.hue(r),s},h.mix=h.interpolate=St,h.random=function(){for(var e="#",t=0;t<6;t++)e+="0123456789abcdef".charAt(nr(16*or()));return new p(e,"hex")},h.scale=Gt,h.analyze=fr.analyze,h.contrast=function(e,t){e=new p(e),t=new p(t);var r=e.luminance(),n=t.luminance();return r>n?(r+.05)/(n+.05):(n+.05)/(r+.05)},h.deltaE=function(e,t,r,n){void 0===r&&(r=1),void 0===n&&(n=1),e=new p(e),t=new p(t);for(var o=Array.from(e.lab()),i=o[0],a=o[1],s=o[2],c=Array.from(t.lab()),u=c[0],l=c[1],f=c[2],d=dr(a*a+s*s),g=dr(l*l+f*f),h=i<16?.511:.040975*i/(1+.01765*i),m=.0638*d/(1+.0131*d)+.638,v=d<1e-6?0:180*pr(s,a)/mr;v<0;)v+=360;for(;v>=360;)v-=360;var b=v>=164&&v<=345?.56+gr(.2*hr(mr*(v+168)/180)):.36+gr(.4*hr(mr*(v+35)/180)),y=d*d*d*d,E=dr(y/(y+1900)),w=m*(E*b+1-E),_=d-g,O=a-l,T=s-f,D=(i-u)/(r*h),P=_/(n*m);return dr(D*D+P*P+(O*O+T*T-_*_)/(w*w))},h.distance=function(e,t,r){void 0===r&&(r="lab"),e=new p(e),t=new p(t);var n=e.get(r),o=t.get(r),i=0;for(var a in n){var s=(n[a]||0)-(o[a]||0);i+=s*s}return Math.sqrt(i)},h.limits=fr.limits,h.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(p,[null].concat(e))),!0}catch(e){return!1}},h.scales=vr,h.colors=ut,h.brewer=_r,h}()},7643:(e,t,r)=>{var n=r(5557),o=r(4349),i=r(407),a=r(5134),s=r(9951);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},3872:(e,t,r)=>{var n=r(2470),o=r(7289),i=r(7614),a=r(3067),s=r(9346);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},5674:(e,t,r)=>{var n=r(489)(r(4818),"Map");e.exports=n},2462:(e,t,r)=>{var n=r(6290),o=r(4951),i=r(440),a=r(6180),s=r(7719);function c(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}c.prototype.clear=n,c.prototype.delete=o,c.prototype.get=i,c.prototype.has=a,c.prototype.set=s,e.exports=c},5135:(e,t,r)=>{var n=r(3872),o=r(1490),i=r(2594),a=r(5953),s=r(4667),c=r(4615);function u(e){var t=this.__data__=new n(e);this.size=t.size}u.prototype.clear=o,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=s,u.prototype.set=c,e.exports=u},9652:(e,t,r)=>{var n=r(4818).Symbol;e.exports=n},4600:(e,t,r)=>{var n=r(4818).Uint8Array;e.exports=n},6562:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},1998:(e,t,r)=>{var n=r(1453),o=r(5664),i=r(5860),a=r(9571),s=r(8347),c=r(1859),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var r=i(e),l=!r&&o(e),f=!r&&!l&&a(e),d=!r&&!l&&!f&&c(e),p=r||l||f||d,g=p?n(e.length,String):[],h=g.length;for(var m in e)!t&&!u.call(e,m)||p&&("length"==m||f&&("offset"==m||"parent"==m)||d&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,h))||g.push(m);return g}},1612:(e,t,r)=>{var n=r(6912),o=r(3355);e.exports=function(e,t,r){(void 0!==r&&!o(e[t],r)||void 0===r&&!(t in e))&&n(e,t,r)}},6258:(e,t,r)=>{var n=r(6912),o=r(3355),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){var a=e[t];i.call(e,t)&&o(a,r)&&(void 0!==r||t in e)||n(e,t,r)}},8620:(e,t,r)=>{var n=r(3355);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},6912:(e,t,r)=>{var n=r(4698);e.exports=function(e,t,r){"__proto__"==t&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}},8528:(e,t,r)=>{var n=r(4820),o=Object.create,i=function(){function e(){}return function(t){if(!n(t))return{};if(o)return o(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=i},3153:(e,t,r)=>{var n=r(7572)();e.exports=n},2759:(e,t,r)=>{var n=r(9652),o=r(9911),i=r(3744),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},6651:(e,t,r)=>{var n=r(2759),o=r(1408);e.exports=function(e){return o(e)&&"[object Arguments]"==n(e)}},3216:(e,t,r)=>{var n=r(830),o=r(931),i=r(4820),a=r(1304),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,f=u.hasOwnProperty,d=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?d:s).test(a(e))}},9920:(e,t,r)=>{var n=r(2759),o=r(7906),i=r(1408),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},3339:(e,t,r)=>{var n=r(4820),o=r(7839),i=r(3003),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},7604:(e,t,r)=>{var n=r(5135),o=r(1612),i=r(3153),a=r(480),s=r(4820),c=r(2551),u=r(7700);e.exports=function e(t,r,l,f,d){t!==r&&i(r,(function(i,c){if(d||(d=new n),s(i))a(t,r,c,l,e,f,d);else{var p=f?f(u(t,c),i,c+"",t,r,d):void 0;void 0===p&&(p=i),o(t,c,p)}}),c)}},480:(e,t,r)=>{var n=r(1612),o=r(8192),i=r(9947),a=r(6581),s=r(1172),c=r(5664),u=r(5860),l=r(5274),f=r(9571),d=r(830),p=r(4820),g=r(1969),h=r(1859),m=r(7700),v=r(2963);e.exports=function(e,t,r,b,y,E,w){var _=m(e,r),O=m(t,r),T=w.get(O);if(T)n(e,r,T);else{var D=E?E(_,O,r+"",e,t,w):void 0,P=void 0===D;if(P){var x=u(O),S=!x&&f(O),M=!x&&!S&&h(O);D=O,x||S||M?u(_)?D=_:l(_)?D=a(_):S?(P=!1,D=o(O,!0)):M?(P=!1,D=i(O,!0)):D=[]:g(O)||c(O)?(D=_,c(_)?D=v(_):p(_)&&!d(_)||(D=s(O))):P=!1}P&&(w.set(O,D),y(D,O,b,E,w),w.delete(O)),n(e,r,D)}}},5757:(e,t,r)=>{var n=r(1191),o=r(2549),i=r(6613);e.exports=function(e,t){return i(o(e,t,n),e+"")}},4274:(e,t,r)=>{var n=r(7477),o=r(4698),i=r(1191),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i;e.exports=a},1453:e=>{e.exports=function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}},8275:e=>{e.exports=function(e){return function(t){return e(t)}}},1254:(e,t,r)=>{var n=r(4600);e.exports=function(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}},8192:(e,t,r)=>{e=r.nmd(e);var n=r(4818),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var r=e.length,n=s?s(r):new e.constructor(r);return e.copy(n),n}},9947:(e,t,r)=>{var n=r(1254);e.exports=function(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}},6581:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},7200:(e,t,r)=>{var n=r(6258),o=r(6912);e.exports=function(e,t,r,i){var a=!r;r||(r={});for(var s=-1,c=t.length;++s<c;){var u=t[s],l=i?i(r[u],e[u],u,r,e):void 0;void 0===l&&(l=e[u]),a?o(r,u,l):n(r,u,l)}return r}},8940:(e,t,r)=>{var n=r(4818)["__core-js_shared__"];e.exports=n},3102:(e,t,r)=>{var n=r(5757),o=r(7072);e.exports=function(e){return n((function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var c=r[n];c&&e(t,c,n,a)}return t}))}},7572:e=>{e.exports=function(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var c=a[e?s:++o];if(!1===r(i[c],c,i))break}return t}}},4698:(e,t,r)=>{var n=r(489),o=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},3566:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},6330:(e,t,r)=>{var n=r(5513);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},489:(e,t,r)=>{var n=r(3216),o=r(3626);e.exports=function(e,t){var r=o(e,t);return n(r)?r:void 0}},4966:(e,t,r)=>{var n=r(6148)(Object.getPrototypeOf,Object);e.exports=n},9911:(e,t,r)=>{var n=r(9652),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var o=a.call(e);return n&&(t?e[s]=r:delete e[s]),o}},3626:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},5557:(e,t,r)=>{var n=r(2037);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},4349:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},407:(e,t,r)=>{var n=r(2037),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(t,e)?t[e]:void 0}},5134:(e,t,r)=>{var n=r(2037),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:o.call(t,e)}},9951:(e,t,r)=>{var n=r(2037);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},1172:(e,t,r)=>{var n=r(8528),o=r(4966),i=r(7839);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:n(o(e))}},8347:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},7072:(e,t,r)=>{var n=r(3355),o=r(8809),i=r(8347),a=r(4820);e.exports=function(e,t,r){if(!a(r))return!1;var s=typeof t;return!!("number"==s?o(r)&&i(t,r.length):"string"==s&&t in r)&&n(r[t],e)}},5513:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},931:(e,t,r)=>{var n,o=r(8940),i=(n=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!i&&i in e}},7839:e=>{var t=Object.prototype;e.exports=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}},2470:e=>{e.exports=function(){this.__data__=[],this.size=0}},7289:(e,t,r)=>{var n=r(8620),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():o.call(t,r,1),--this.size,0))}},7614:(e,t,r)=>{var n=r(8620);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},3067:(e,t,r)=>{var n=r(8620);e.exports=function(e){return n(this.__data__,e)>-1}},9346:(e,t,r)=>{var n=r(8620);e.exports=function(e,t){var r=this.__data__,o=n(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}},6290:(e,t,r)=>{var n=r(7643),o=r(3872),i=r(5674);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(i||o),string:new n}}},4951:(e,t,r)=>{var n=r(6330);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},440:(e,t,r)=>{var n=r(6330);e.exports=function(e){return n(this,e).get(e)}},6180:(e,t,r)=>{var n=r(6330);e.exports=function(e){return n(this,e).has(e)}},7719:(e,t,r)=>{var n=r(6330);e.exports=function(e,t){var r=n(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}},2037:(e,t,r)=>{var n=r(489)(Object,"create");e.exports=n},3003:e=>{e.exports=function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}},9693:(e,t,r)=>{e=r.nmd(e);var n=r(3566),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&n.process,s=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},3744:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},6148:e=>{e.exports=function(e,t){return function(r){return e(t(r))}}},2549:(e,t,r)=>{var n=r(6562),o=Math.max;e.exports=function(e,t,r){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),c=Array(s);++a<s;)c[a]=i[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=i[a];return u[t]=r(c),n(e,this,u)}}},4818:(e,t,r)=>{var n=r(3566),o="object"==typeof self&&self&&self.Object===Object&&self,i=n||o||Function("return this")();e.exports=i},7700:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},6613:(e,t,r)=>{var n=r(4274),o=r(3546)(n);e.exports=o},3546:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var o=t(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},1490:(e,t,r)=>{var n=r(3872);e.exports=function(){this.__data__=new n,this.size=0}},2594:e=>{e.exports=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}},5953:e=>{e.exports=function(e){return this.__data__.get(e)}},4667:e=>{e.exports=function(e){return this.__data__.has(e)}},4615:(e,t,r)=>{var n=r(3872),o=r(5674),i=r(2462);e.exports=function(e,t){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new i(a)}return r.set(e,t),this.size=r.size,this}},1304:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7477:e=>{e.exports=function(e){return function(){return e}}},3355:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},1191:e=>{e.exports=function(e){return e}},5664:(e,t,r)=>{var n=r(6651),o=r(1408),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,c=n(function(){return arguments}())?n:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},5860:e=>{var t=Array.isArray;e.exports=t},8809:(e,t,r)=>{var n=r(830),o=r(7906);e.exports=function(e){return null!=e&&o(e.length)&&!n(e)}},5274:(e,t,r)=>{var n=r(8809),o=r(1408);e.exports=function(e){return o(e)&&n(e)}},9571:(e,t,r)=>{e=r.nmd(e);var n=r(4818),o=r(8585),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,s=a&&a.exports===i?n.Buffer:void 0,c=(s?s.isBuffer:void 0)||o;e.exports=c},830:(e,t,r)=>{var n=r(2759),o=r(4820);e.exports=function(e){if(!o(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},7906:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},4820:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},1408:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},1969:(e,t,r)=>{var n=r(2759),o=r(4966),i=r(1408),a=Function.prototype,s=Object.prototype,c=a.toString,u=s.hasOwnProperty,l=c.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=n(e))return!1;var t=o(e);if(null===t)return!0;var r=u.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==l}},1859:(e,t,r)=>{var n=r(9920),o=r(8275),i=r(9693),a=i&&i.isTypedArray,s=a?o(a):n;e.exports=s},2551:(e,t,r)=>{var n=r(1998),o=r(3339),i=r(8809);e.exports=function(e){return i(e)?n(e,!0):o(e)}},7168:(e,t,r)=>{var n=r(7604),o=r(3102)((function(e,t,r){n(e,t,r)}));e.exports=o},8585:e=>{e.exports=function(){return!1}},2963:(e,t,r)=>{var n=r(7200),o=r(2551);e.exports=function(e){return n(e,o(e))}},5732:(e,t,r)=>{var n=r(2743);e.exports=function(e){var t,r,o,i;if(t=/^((?:rgb|hs[lv]|cmyk|xyz|lab)a?)\s*\(([^\)]*)\)/.exec(e)){var a=t[1],s="cmyk"===(c=a.replace(/a$/,""))?4:3;r=n[c],o=t[2].replace(/^\s+|\s+$/g,"").split(/\s*,\s*/).map((function(e,t){return/%$/.test(e)&&t===s?parseFloat(e)/100:(/%$/.test(e),parseFloat(e))})),a===c&&o.push(1),i=void 0===o[s]?1:o[s],o=o.slice(0,s),r[c]=function(){return o}}else if(/^#[A-Fa-f0-9]+$/.test(e)){var c;s=(c=e.replace(/^#/,"")).length,r=n.rgb,o=(o=c.split(3===s?/(.)/:/(..)/)).filter(Boolean).map((function(e){return 3===s?parseInt(e+e,16):parseInt(e,16)})),i=1,r.rgb=function(){return o},o[0]||(o[0]=0),o[1]||(o[1]=0),o[2]||(o[2]=0)}else(r=n.keyword).keyword=function(){return e},o=e,i=1;var u={rgb:void 0,hsl:void 0,hsv:void 0,cmyk:void 0,keyword:void 0,hex:void 0};try{u.rgb=r.rgb(o)}catch(e){}try{u.hsl=r.hsl(o)}catch(e){}try{u.hsv=r.hsv(o)}catch(e){}try{u.cmyk=r.cmyk(o)}catch(e){}try{u.keyword=r.keyword(o)}catch(e){}return u.rgb&&(u.hex="#"+u.rgb.map((function(e){var t=e.toString(16);return 1===t.length?"0"+t:t})).join("")),u.rgb&&(u.rgba=u.rgb.concat(i)),u.hsl&&(u.hsla=u.hsl.concat(i)),u.hsv&&(u.hsva=u.hsv.concat(i)),u.cmyk&&(u.cmyka=u.cmyk.concat(i)),u}},1919:e=>{function t(e){var t,r,n=e[0]/255,o=e[1]/255,i=e[2]/255,a=Math.min(n,o,i),s=Math.max(n,o,i),c=s-a;return s==a?t=0:n==s?t=(o-i)/c:o==s?t=2+(i-n)/c:i==s&&(t=4+(n-o)/c),(t=Math.min(60*t,360))<0&&(t+=360),r=(a+s)/2,[t,100*(s==a?0:r<=.5?c/(s+a):c/(2-s-a)),100*r]}function n(e){var t,r,n=e[0],o=e[1],i=e[2],a=Math.min(n,o,i),s=Math.max(n,o,i),c=s-a;return r=0==s?0:c/s*1e3/10,s==a?t=0:n==s?t=(o-i)/c:o==s?t=2+(i-n)/c:i==s&&(t=4+(n-o)/c),(t=Math.min(60*t,360))<0&&(t+=360),[t,r,s/255*1e3/10]}function o(e){var r=e[0],n=e[1],o=e[2];return[t(e)[0],1/255*Math.min(r,Math.min(n,o))*100,100*(o=1-1/255*Math.max(r,Math.max(n,o)))]}function i(e){var t,r=e[0]/255,n=e[1]/255,o=e[2]/255;return[100*((1-r-(t=Math.min(1-r,1-n,1-o)))/(1-t)||0),100*((1-n-t)/(1-t)||0),100*((1-o-t)/(1-t)||0),100*t]}function a(e){return O[JSON.stringify(e)]}function s(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255;return[100*(.4124*(t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]}function c(e){var t=s(e),r=t[0],n=t[1],o=t[2];return n/=100,o/=108.883,r=(r/=95.047)>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(r-n),200*(n-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]}function u(e){var t,r,n,o,i,a=e[0]/360,s=e[1]/100,c=e[2]/100;if(0==s)return[i=255*c,i,i];t=2*c-(r=c<.5?c*(1+s):c+s-c*s),o=[0,0,0];for(var u=0;u<3;u++)(n=a+1/3*-(u-1))<0&&n++,n>1&&n--,i=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,o[u]=255*i;return o}function l(e){var t=e[0]/60,r=e[1]/100,n=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),a=255*n*(1-r),s=255*n*(1-r*i),c=255*n*(1-r*(1-i));switch(n*=255,o){case 0:return[n,c,a];case 1:return[s,n,a];case 2:return[a,n,c];case 3:return[a,s,n];case 4:return[c,a,n];case 5:return[n,a,s]}}function f(e){var t,n,o,i,a=e[0]/360,s=e[1]/100,c=e[2]/100,u=s+c;switch(u>1&&(s/=u,c/=u),o=6*a-(t=Math.floor(6*a)),0!=(1&t)&&(o=1-o),i=s+o*((n=1-c)-s),t){default:case 6:case 0:r=n,g=i,b=s;break;case 1:r=i,g=n,b=s;break;case 2:r=s,g=n,b=i;break;case 3:r=s,g=i,b=n;break;case 4:r=i,g=s,b=n;break;case 5:r=n,g=s,b=i}return[255*r,255*g,255*b]}function d(e){var t=e[0]/100,r=e[1]/100,n=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o))]}function p(e){var t,r,n,o=e[0]/100,i=e[1]/100,a=e[2]/100;return r=-.9689*o+1.8758*i+.0415*a,n=.0557*o+-.204*i+1.057*a,t=(t=3.2406*o+-1.5372*i+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:t*=12.92,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r*=12.92,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n*=12.92,[255*(t=Math.min(Math.max(0,t),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]}function h(e){var t=e[0],r=e[1],n=e[2];return r/=100,n/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(t-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]}function m(e){var t,r,n,o,i=e[0],a=e[1],s=e[2];return i<=8?o=(r=100*i/903.3)/100*7.787+16/116:(r=100*Math.pow((i+16)/116,3),o=Math.pow(r/100,1/3)),[t=t/95.047<=.008856?t=95.047*(a/500+o-16/116)/7.787:95.047*Math.pow(a/500+o,3),r,n=n/108.883<=.008859?n=108.883*(o-s/200-16/116)/7.787:108.883*Math.pow(o-s/200,3)]}function v(e){var t,r=e[0],n=e[1],o=e[2];return(t=360*Math.atan2(o,n)/2/Math.PI)<0&&(t+=360),[r,Math.sqrt(n*n+o*o),t]}function y(e){return p(m(e))}function E(e){var t,r=e[0],n=e[1];return t=e[2]/360*2*Math.PI,[r,n*Math.cos(t),n*Math.sin(t)]}function w(e){return _[e]}e.exports={rgb2hsl:t,rgb2hsv:n,rgb2hwb:o,rgb2cmyk:i,rgb2keyword:a,rgb2xyz:s,rgb2lab:c,rgb2lch:function(e){return v(c(e))},hsl2rgb:u,hsl2hsv:function(e){var t=e[0],r=e[1]/100,n=e[2]/100;return 0===n?[0,0,0]:[t,2*(r*=(n*=2)<=1?n:2-n)/(n+r)*100,(n+r)/2*100]},hsl2hwb:function(e){return o(u(e))},hsl2cmyk:function(e){return i(u(e))},hsl2keyword:function(e){return a(u(e))},hsv2rgb:l,hsv2hsl:function(e){var t,r,n=e[0],o=e[1]/100,i=e[2]/100;return t=o*i,[n,100*(t=(t/=(r=(2-o)*i)<=1?r:2-r)||0),100*(r/=2)]},hsv2hwb:function(e){return o(l(e))},hsv2cmyk:function(e){return i(l(e))},hsv2keyword:function(e){return a(l(e))},hwb2rgb:f,hwb2hsl:function(e){return t(f(e))},hwb2hsv:function(e){return n(f(e))},hwb2cmyk:function(e){return i(f(e))},hwb2keyword:function(e){return a(f(e))},cmyk2rgb:d,cmyk2hsl:function(e){return t(d(e))},cmyk2hsv:function(e){return n(d(e))},cmyk2hwb:function(e){return o(d(e))},cmyk2keyword:function(e){return a(d(e))},keyword2rgb:w,keyword2hsl:function(e){return t(w(e))},keyword2hsv:function(e){return n(w(e))},keyword2hwb:function(e){return o(w(e))},keyword2cmyk:function(e){return i(w(e))},keyword2lab:function(e){return c(w(e))},keyword2xyz:function(e){return s(w(e))},xyz2rgb:p,xyz2lab:h,xyz2lch:function(e){return v(h(e))},lab2xyz:m,lab2rgb:y,lab2lch:v,lch2lab:E,lch2xyz:function(e){return m(E(e))},lch2rgb:function(e){return y(E(e))}};var _={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},O={};for(var T in _)O[JSON.stringify(_[T])]=T},2743:(e,t,r)=>{var n=r(1919),o=function(){return new u};for(var i in n){o[i+"Raw"]=function(e){return function(t){return"number"==typeof t&&(t=Array.prototype.slice.call(arguments)),n[e](t)}}(i);var a=/(\w+)2(\w+)/.exec(i),s=a[1],c=a[2];(o[s]=o[s]||{})[c]=o[i]=function(e){return function(t){"number"==typeof t&&(t=Array.prototype.slice.call(arguments));var r=n[e](t);if("string"==typeof r||void 0===r)return r;for(var o=0;o<r.length;o++)r[o]=Math.round(r[o]);return r}}(i)}var u=function(){this.convs={}};u.prototype.routeSpace=function(e,t){var r=t[0];return void 0===r?this.getValues(e):("number"==typeof r&&(r=Array.prototype.slice.call(t)),this.setValues(e,r))},u.prototype.setValues=function(e,t){return this.space=e,this.convs={},this.convs[e]=t,this},u.prototype.getValues=function(e){var t=this.convs[e];if(!t){var r=this.space,n=this.convs[r];t=o[r][e](n),this.convs[e]=t}return t},["rgb","hsl","hsv","cmyk","keyword"].forEach((function(e){u.prototype[e]=function(t){return this.routeSpace(e,arguments)}})),e.exports=o},6954:(e,t,r)=>{"use strict";var n,o,i,a,s,c,u;r.d(t,{in:()=>a,_h:()=>c,$R:()=>u,uY:()=>l,JY:()=>F,X5:()=>w,HY:()=>R,Kc:()=>A}),function(e){e.Uninitialized="Uninitialized",e.EngineLoading="EngineLoading",e.AssetsLoading="AssetsLoading",e.EngineReady="EngineReady",e.SceneReady="SceneReady",e.EngineUnsupported="EngineUnsupported",e.EngineLoadingError="EngineLoadingError"}(n||(n={})),function(e){e.Download="download",e.Load="load",e.Decode="decode"}(o||(o={})),function(e){e[e.Pending=0]="Pending",e[e.Ready=1]="Ready",e[e.Error=2]="Error"}(i||(i={})),function(e){e.Info="Info",e.Warning="Warning",e.Error="Error"}(a||(a={})),function(e){e.Added="DesignBlockAddedEvent",e.Updated="DesignBlockUpdatedEvent",e.Removed="DesignBlockRemovedEvent"}(s||(s={})),function(e){e.Scene="//ly.img.ubq/scene",e.Camera="//ly.img.ubq/camera",e.Page="//ly.img.ubq/page",e.Image="//ly.img.ubq/image",e.Text="//ly.img.ubq/text",e.Sticker="//ly.img.ubq/sticker",e.VectorPath="//ly.img.ubq/vector_path",e.RectShape="//ly.img.ubq/shapes/rect",e.LineShape="//ly.img.ubq/shapes/line",e.StarShape="//ly.img.ubq/shapes/star",e.PolygonShape="//ly.img.ubq/shapes/polygon",e.EllipseShape="//ly.img.ubq/shapes/ellipse"}(c||(c={})),function(e){e.Scene="ubq/designblocks/SceneProps",e.Camera="ubq/designblocks/Camera",e.Page="ubq/designblocks/Page",e.Image="ubq/designblocks/AdjustableImage",e.Sticker="ubq/designblocks/Sticker",e.Text="ubq/designblocks/CompositedText",e.Crop="ubq/types/Crop",e.Scale="ubq/scene/Scale",e.Opacity="ubq/types/Opacity",e.FillColor="ubq/types/FillColor",e.BackgroundColor="ubq/types/BackgroundColor",e.Outline="ubq/types/Outline",e.VectorPath="ubq/designblocks/CESDKVectorPathProps"}(u||(u={}));const l="ubq/designblocks/CommonDesignBlockProps";var f,d,p,g,h,m,v;!function(e){e.Transform="ubq/editMode/transform",e.Crop="ubq/editMode/crop",e.Text="ubq/editMode/text"}(f||(f={})),function(e){e[e.Arrow=0]="Arrow",e[e.Move=1]="Move",e[e.MoveNotPermitted=2]="MoveNotPermitted",e[e.Resize=3]="Resize",e[e.Rotate=4]="Rotate",e[e.Text=5]="Text"}(d||(d={})),function(e){e.None="None",e.Normal="Normal",e.Darken="Darken",e.Multiply="Multiply",e.ColorBurn="ColorBurn",e.LinearBurn="LinearBurn",e.DarkenColor="DarkenColor",e.Lighten="Lighten",e.Screen="Screen",e.ColorDodge="ColorDodge",e.Add="Add",e.LightenColor="LightenColor",e.Overlay="Overlay",e.SoftLight="SoftLight",e.HardLight="HarfLight",e.VividLight="VividLight",e.LinearLight="LinearLight",e.PinLight="PinLight",e.HardMix="HardMix",e.Difference="Difference",e.Exclusion="Exclusion",e.Subtract="Substract",e.Divide="Divide"}(p||(p={})),function(e){e.None="None",e.Cover="Cover",e.Contain="Contain"}(g||(g={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Center=2]="Center"}(h||(h={})),function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom",e[e.Center=2]="Center"}(m||(m={})),function(e){e[e.Creator=0]="Creator",e[e.Adopter=1]="Adopter",e[e.Viewer=2]="Viewer",e[e.Presenter=3]="Presenter"}(v||(v={}));const b={c:.75,m:.68,y:.67,k:.9};var y,E,w,_,O,T,D,P,x,S,M,k,R,A;function F(e){return{colorSpace:y.sRGB,components:{x:e.r,y:e.g,z:e.b,w:e.a},spotColor:{name:"",rgbApproximation:e,cmykApproximation:b}}}!function(e){e[e.sRGB=0]="sRGB",e[e.CMYK=1]="CMYK",e[e.SpotColor=2]="SpotColor"}(y||(y={})),function(e){e[e.Information=0]="Information",e[e.Warning=1]="Warning",e[e.Error=2]="Error"}(E||(E={})),function(e){e[e.Pixel=0]="Pixel",e[e.Millimeter=1]="Millimeter",e[e.Inch=2]="Inch"}(w||(w={})),function(e){e[e.Began=0]="Began",e[e.Changed=1]="Changed",e[e.Ended=2]="Ended"}(_||(_={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Middle=2]="Middle",e[e.Unknown=255]="Unknown"}(O||(O={})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(T||(T={})),function(e){e[e.Key0=0]="Key0",e[e.Key1=1]="Key1",e[e.Key2=2]="Key2",e[e.Key3=3]="Key3",e[e.Key4=4]="Key4",e[e.Key5=5]="Key5",e[e.Key6=6]="Key6",e[e.Key7=7]="Key7",e[e.Key8=8]="Key8",e[e.Key9=9]="Key9",e[e.A=10]="A",e[e.B=11]="B",e[e.C=12]="C",e[e.D=13]="D",e[e.E=14]="E",e[e.F=15]="F",e[e.G=16]="G",e[e.H=17]="H",e[e.I=18]="I",e[e.J=19]="J",e[e.K=20]="K",e[e.L=21]="L",e[e.M=22]="M",e[e.N=23]="N",e[e.O=24]="O",e[e.P=25]="P",e[e.Q=26]="Q",e[e.R=27]="R",e[e.S=28]="S",e[e.T=29]="T",e[e.U=30]="U",e[e.V=31]="V",e[e.W=32]="W",e[e.X=33]="X",e[e.Y=34]="Y",e[e.Z=35]="Z",e[e.ArrowLeft=36]="ArrowLeft",e[e.ArrowRight=37]="ArrowRight",e[e.ArrowUp=38]="ArrowUp",e[e.ArrowDown=39]="ArrowDown",e[e.Backspace=40]="Backspace",e[e.Enter=41]="Enter",e[e.Space=42]="Space",e[e.Escape=43]="Escape",e[e.Delete=44]="Delete",e[e.Control=45]="Control",e[e.Option=46]="Option",e[e.Shift=47]="Shift",e[e.Unknown=255]="Unknown"}(D||(D={})),function(e){e.ImageMatting="imageMatting",e.ImageMattingBackground="imageMattingBackground",e.ImageMattingBackgroundForInpainting="imageMattingBackgroundForInpainting",e.ImageMattingAlphaMatte="imageMattingAlphaMatte",e.ImageMattingInvertedAlphaMatte="imageMattingInvertedAlphaMatte",e.Inpainting="inpainting",e.InpaintingHighRes="inpaintingHighRes",e.SmartCrop="smartCrop",e.SuperResolution="superResolution"}(P||(P={})),function(e){e[e.Thin=100]="Thin",e[e.ExtraLight=200]="ExtraLight",e[e.Light=300]="Light",e[e.Normal=400]="Normal",e[e.Medium=500]="Medium",e[e.SemiBold=600]="SemiBold",e[e.Bold=700]="Bold",e[e.ExtraBold=800]="ExtraBold",e[e.Heavy=900]="Heavy"}(x||(x={})),function(e){e[e.Normal=0]="Normal",e[e.Italic=1]="Italic"}(S||(S={})),function(e){e.Bold="bold",e.Italic="italic"}(M||(M={})),function(e){e[e.Undefined=0]="Undefined",e[e.DesignUnit=1]="DesignUnit",e[e.Percent=2]="Percent",e[e.Auto=3]="Auto"}(k||(k={})),function(e){e.Png="image/png",e.Jpeg="image/jpeg",e.Tga="image/x-tga"}(R||(R={})),function(e){e[e.Free=0]="Free",e[e.VerticalStack=1]="VerticalStack",e[e.HorizontalStack=2]="HorizontalStack"}(A||(A={}))},9331:(e,t,r)=>{"use strict";r.d(t,{default:()=>ht});var n,o,i=r(6954);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){s(e,t,r[t])}))}return e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),e}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?d(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}!function(e){e.Unknown="",e.Boolean="bool",e.Boolean2="ubq/math/bool2",e.Int="int",e.UInt8="uint8_t",e.Int32="int32_t",e.UInt32="uint32_t",e.Int2="ubq/math/ivec2",e.Size2="ubq/types/Size2",e.Color="ubq/types/Color",e.Double="double",e.Float="float",e.Float2="ubq/math/vec2",e.Float3="ubq/math/vec3",e.Float4="ubq/math/vec4",e.String="string",e.HorizontalTextAlignment="ubq/types/HorizontalTextAlignment",e.VerticalTextAlignment="ubq/types/VerticalTextAlignment",e.Margin2D="ubq/types/OuterMargin2D"}(n||(n={})),r(6212),r(5732),function(e){e.Background="background",e.Active="active",e.Accent="accent"}(o||(o={}));var v={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},b=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(this,e),this.init(t,r)}return f(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||v,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,r,n){return n&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(r).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,c({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),y=function(){function e(){u(this,e),this.observers={}}return f(e,[{key:"on",value:function(e,t){var r=this;return e.split(" ").forEach((function(e){r.observers[e]=r.observers[e]||[],r.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,r)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(r))}))}}}]),e}();function E(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function w(e){return null==e?"":""+e}function _(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function O(e,t,r){function n(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!e[a]&&r&&(e[a]=new r),e=e[a]}return o()?{}:{obj:e,k:n(i.shift())}}function T(e,t,r){var n=O(e,t,Object);n.obj[n.k]=r}function D(e,t){var r=O(e,t),n=r.obj,o=r.k;if(n)return n[o]}function P(e,t,r){var n=D(e,r);return void 0!==n?n:D(t,r)}function x(e,t,r){for(var n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?"string"==typeof e[n]||e[n]instanceof String||"string"==typeof t[n]||t[n]instanceof String?r&&(e[n]=t[n]):x(e[n],t[n],r):e[n]=t[n]);return e}function S(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var M={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function k(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return M[e]})):e}var R="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,A=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return u(this,t),r=p(this,g(t).call(this)),R&&y.call(d(r)),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return m(t,e),f(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=[e,t];return r&&"string"!=typeof r&&(i=i.concat(r)),r&&"string"==typeof r&&(i=i.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(i=e.split(".")),D(this.data,i)}},{key:"addResource",value:function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(n=t,t=(a=e.split("."))[1]),this.addNamespaces(t),T(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}},{key:"addResources",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in r)"string"!=typeof r[o]&&"[object Array]"!==Object.prototype.toString.apply(r[o])||this.addResource(e,t,o,r[o],{silent:!0});n.silent||this.emit("added",e,t,r)}},{key:"addResourceBundle",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(n=r,r=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=D(this.data,a)||{};n?x(s,r,o):s=c({},s,r),T(this.data,a,s),i.silent||this.emit("added",e,t,r)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?c({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(y),F={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,r,n,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,r,n,o))})),t}},I={},C=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return u(this,t),r=p(this,g(t).call(this)),R&&y.call(d(r)),_(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,d(r)),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=b.create("translator"),r}return m(t,e),f(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},r=this.resolve(e,t);return r&&void 0!==r.res}},{key:"extractFromKey",value:function(e,t){var r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");var n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(r&&e.indexOf(r)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(n)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var n=this;if("object"!==a(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=this.extractFromKey(e[e.length-1],t),s=i.key,u=i.namespaces,l=u[u.length-1],f=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f&&"cimode"===f.toLowerCase()){if(d){var p=t.nsSeparator||this.options.nsSeparator;return l+p+s}return s}var g=this.resolve(e,t),h=g&&g.res,m=g&&g.usedKey||s,v=g&&g.exactUsedKey||s,b=Object.prototype.toString.apply(h),y=["[object Number]","[object Function]","[object RegExp]"],E=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,_="string"!=typeof h&&"boolean"!=typeof h&&"number"!=typeof h;if(w&&h&&_&&y.indexOf(b)<0&&("string"!=typeof E||"[object Array]"!==b)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,h,t):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(o){var O="[object Array]"===b,T=O?[]:{},D=O?v:m;for(var P in h)if(Object.prototype.hasOwnProperty.call(h,P)){var x="".concat(D).concat(o).concat(P);T[P]=this.translate(x,c({},t,{joinArrays:!1,ns:u})),T[P]===x&&(T[P]=h[P])}h=T}}else if(w&&"string"==typeof E&&"[object Array]"===b)(h=h.join(E))&&(h=this.extendTranslation(h,e,t,r));else{var S=!1,M=!1;if(!this.isValidLookup(h)&&void 0!==t.defaultValue){if(S=!0,void 0!==t.count){var k=this.pluralResolver.getSuffix(f,t.count);h=t["defaultValue".concat(k)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(M=!0,h=s);var R=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(M||S||R){if(this.logger.log(R?"updateKey":"missingKey",f,l,s,R?t.defaultValue:h),o){var A=this.resolve(s,c({},t,{keySeparator:!1}));A&&A.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],I=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&I&&I[0])for(var C=0;C<I.length;C++)F.push(I[C]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(t.lng||this.language):F.push(t.lng||this.language);var j=function(e,r){n.options.missingKeyHandler?n.options.missingKeyHandler(e,l,r,R?t.defaultValue:h,R,t):n.backendConnector&&n.backendConnector.saveMissing&&n.backendConnector.saveMissing(e,l,r,R?t.defaultValue:h,R,t),n.emit("missingKey",e,l,r,h)};if(this.options.saveMissing){var L=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&L?F.forEach((function(e){n.pluralResolver.getPluralFormsOfKey(e,s).forEach((function(t){return j([e],t)}))})):j(F,s)}}h=this.extendTranslation(h,e,t,g,r),M&&h===s&&this.options.appendNamespaceToMissingKey&&(h="".concat(l,":").concat(s)),M&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(e,t,r,n,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,r,n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init(c({},r,{interpolation:c({},this.options.interpolation,r.interpolation)}));var a,s=r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var l=r.replace&&"string"!=typeof r.replace?r.replace:r;if(this.options.interpolation.defaultVariables&&(l=c({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,r.lng||this.language,r),s){var f=e.match(this.interpolator.nestingRegexp);a<(f&&f.length)&&(r.nest=!1)}!1!==r.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return o&&o[0]===n[0]&&!r.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(n[0]," in key: ").concat(t[0])),null):i.translate.apply(i,n.concat([t]))}),r)),r.interpolation&&this.interpolator.reset()}var d=r.postProcess||this.options.postProcess,p="string"==typeof d?[d]:d;return null!=e&&p&&p.length&&!1!==r.applyPostProcessor&&(e=F.handle(p,e,t,this.options&&this.options.postProcessPassResolved?c({i18nResolved:n},r):r,this)),e}},{key:"resolve",value:function(e){var t,r,n,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var c=a.extractFromKey(e,s),u=c.key;r=u;var l=c.namespaces;a.options.fallbackNS&&(l=l.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,d=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);l.forEach((function(e){a.isValidLookup(t)||(i=e,!I["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(I["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(r,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(r){if(!a.isValidLookup(t)){o=r;var i,c,l=u,p=[l];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(p,u,r,e,s):(f&&(i=a.pluralResolver.getSuffix(r,s.count)),f&&d&&p.push(l+i),d&&p.push(l+="".concat(a.options.contextSeparator).concat(s.context)),f&&p.push(l+=i));c=p.pop();)a.isValidLookup(t)||(n=c,t=a.getResource(r,e,c,s))}})))}))}})),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}}]),t}(y);function j(e){return e.charAt(0).toUpperCase()+e.slice(1)}var L=function(){function e(t){u(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=b.create("languageUtils")}return f(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],r=e.split("-");return this.options.lowerCaseLng?r=r.map((function(e){return e.toLowerCase()})):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=j(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=j(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=j(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,r=this;return e?(e.forEach((function(e){if(!t){var n=r.formatLanguageCode(e);r.options.supportedLngs&&!r.isSupportedCode(n)||(t=n)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var n=r.getLanguagePartFromCode(e);if(r.isSupportedCode(n))return t=n;t=r.options.supportedLngs.find((function(e){if(0===e.indexOf(n))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}},{key:"toResolveHierarchy",value:function(e,t){var r=this,n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(r.isSupportedCode(e)?o.push(e):r.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),n.forEach((function(e){o.indexOf(e)<0&&i(r.formatLanguageCode(e))})),o}}]),e}(),N=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],U={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}};function H(){var e={};return N.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:U[t.fc]}}))})),e}var B,X,Q=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(this,e),this.languageUtils=t,this.options=r,this.logger=b.create("pluralResolver"),this.rules=H()}return f(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var r=this,n=[],o=this.getRule(e);return o?(o.numbers.forEach((function(o){var i=r.getSuffix(e,o);n.push("".concat(t).concat(i))})),n):n}},{key:"getSuffix",value:function(e,t){var r=this,n=this.getRule(e);if(n){var o=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),i=n.numbers[o];this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return r.options.prepend&&i.toString()?r.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===n.numbers.length&&1===n.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),G=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this.logger=b.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return f(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:k,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?S(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?S(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?S(t.nestingPrefix):t.nestingPrefixEscaped||S("$t("),this.nestingSuffix=t.nestingSuffix?S(t.nestingSuffix):t.nestingSuffixEscaped||S(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var r="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(r,"g")}},{key:"interpolate",value:function(e,t,r,n){var o,i,a,s=this,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(e){return e.replace(/\$/g,"$$$$")}var l=function(e){if(e.indexOf(s.formatSeparator)<0){var o=P(t,c,e);return s.alwaysFormat?s.format(o,void 0,r):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),u=i.join(s.formatSeparator).trim();return s.format(P(t,c,a),u,r,n)};this.resetRegExp();var f=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,d=n&&n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return u(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?u(s.escape(e)):u(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=l(o[1].trim())))if("function"==typeof f){var r=f(e,o,n);i="string"==typeof r?r:""}else{if(d){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=w(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var r,n,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=c({},i);function s(e,t){var r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;var n=e.split(new RegExp("".concat(r,"[ ]*{"))),o="{".concat(n[1]);e=n[0],o=(o=this.interpolate(o,a)).replace(/'/g,'"');try{a=JSON.parse(o),t&&(a=c({},t,a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(r).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;r=this.nestingRegexp.exec(e);){var u=[],l=!1;if(r[0].includes(this.formatSeparator)&&!/{.*}/.test(r[1])){var f=r[1].split(this.formatSeparator).map((function(e){return e.trim()}));r[1]=f.shift(),u=f,l=!0}if((n=t(s.call(this,r[1].trim(),a),a))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=w(n)),n||(this.logger.warn("missed to resolve ".concat(r[1]," for nesting ").concat(e)),n=""),l&&(n=u.reduce((function(e,t){return o.format(e,t,i.lng,i)}),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}]),e}(),q=function(e){function t(e,r,n){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u(this,t),o=p(this,g(t).call(this)),R&&y.call(d(o)),o.backend=e,o.store=r,o.services=n,o.languageUtils=n.languageUtils,o.options=i,o.logger=b.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(n,i.backend,i),o}return m(t,e),f(t,[{key:"queueLoad",value:function(e,t,r,n){var o=this,i=[],a=[],s=[],c=[];return e.forEach((function(e){var n=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!r.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,n=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),c.indexOf(t)<0&&c.push(t)))})),n||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:n}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:c}}},{key:"loaded",value:function(e,t,r){var n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),r&&this.store.addResourceBundle(o,i,r),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(r){var n,s,c,u,l;n=r.loaded,s=i,c=O(n,[o],Object),u=c.obj,l=c.k,u[l]=u[l]||[],u[l].push(s),function(e,t){for(var r=e.indexOf(t);-1!==r;)e.splice(r,1),r=e.indexOf(t)}(r.pending,e),t&&r.errors.push(t),0!==r.pending.length||r.done||(Object.keys(r.loaded).forEach((function(e){a[e]||(a[e]=[]),r.loaded[e].length&&r.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[r](e,t,(function(s,c){s&&c&&o<5?setTimeout((function(){n.read.call(n,e,t,r,o+1,2*i,a)}),i):a(s,c)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,n,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){r.loadOne(e)}))}},{key:"load",value:function(e,t,r){this.prepareLoading(e,t,{},r)}},{key:"reload",value:function(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}},{key:"loadOne",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e.split("|"),o=n[0],i=n[1];this.read(o,i,"read",void 0,void 0,(function(n,a){n&&t.logger.warn("".concat(r,"loading namespace ").concat(i," for language ").concat(o," failed"),n),!n&&a&&t.logger.log("".concat(r,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,n,a)}))}},{key:"saveMissing",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(r,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=r&&""!==r&&(this.backend&&this.backend.create&&this.backend.create(e,t,r,n,null,c({},i,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),t}(y);function V(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===a(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===a(e[2])||"object"===a(e[3])){var r=e[3]||e[2];Object.keys(r).forEach((function(e){t[e]=r[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,r,n){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}}}function z(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function W(){}new(function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(u(this,t),e=p(this,g(t).call(this)),R&&y.call(d(e)),e.options=z(r),e.services={},e.logger=b,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),p(e,d(e));setTimeout((function(){e.init(r,n)}),0)}return e}return m(t,e),f(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;function n(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(r=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=c({},V(),this.options,z(t)),this.format=this.options.interpolation.format,r||(r=W),!this.options.isClone){this.modules.logger?b.init(n(this.modules.logger),this.options):b.init(null,this.options);var o=new L(this.options);this.store=new A(this.options.resources,this.options);var i=this.services;i.logger=b,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new Q(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new G(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new q(n(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))})),this.modules.languageDetector&&(i.languageDetector=n(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=n(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new C(this.services,this.options),this.translator.on("*",(function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit.apply(e,[t].concat(n))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var a=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];a.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments)}}));var s=["addResource","addResources","addResourceBundle","removeResourceBundle"];s.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}}));var u=E(),l=function(){e.changeLanguage(e.options.lng,(function(t,n){e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),u.resolve(n),r(t,n)}))};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),u}},{key:"loadResources",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,n=r,o="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return n();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,r){var n=E();return e||(e=this.languages),t||(t=this.options.ns),r||(r=W),this.services.backendConnector.reload(e,t,(function(e){n.resolve(),r(e)})),n}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&F.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var r=this;this.isLanguageChangingTo=e;var n=E();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:r.services.languageUtils.getBestMatchFromCodes(e);o&&(r.language||(r.language=o,r.languages=r.services.languageUtils.toResolveHierarchy(o)),r.translator.language||r.translator.changeLanguage(o),r.services.languageDetector&&r.services.languageDetector.cacheUserLanguage(o)),r.loadResources(o,(function(e){!function(e,o){o?(r.language=o,r.languages=r.services.languageUtils.toResolveHierarchy(o),r.translator.changeLanguage(o),r.isLanguageChangingTo=void 0,r.emit("languageChanged",o),r.logger.log("languageChanged",o)):r.isLanguageChangingTo=void 0,n.resolve((function(){return r.t.apply(r,arguments)})),t&&t(e,(function(){return r.t.apply(r,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}},{key:"getFixedT",value:function(e,t){var r=this,n=function e(t,n){var o;if("object"!==a(n)){for(var i=arguments.length,s=new Array(i>2?i-2:0),u=2;u<i;u++)s[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([t,n].concat(s))}else o=c({},n);return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,r.t(t,o)};return"string"==typeof e?n.lng=e:n.lngs=e,n.ns=t,n}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var n=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;var a=function(e,r){var n=t.services.backendConnector.state["".concat(e,"|").concat(r)];return-1===n||2===n};if(r.precheck){var s=r.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||!(!a(n,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var r=this,n=E();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){r.options.ns.indexOf(e)<0&&r.options.ns.push(e)})),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var r=E();"string"==typeof e&&(e=[e]);var n=this.options.preload||[],o=e.filter((function(e){return n.indexOf(e)<0}));return o.length?(this.options.preload=n.concat(o),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new t(e,r)}},{key:"cloneInstance",value:function(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:W,o=c({},this.options,r,{isClone:!0}),i=new t(o),a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.services=c({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new C(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];i.emit.apply(i,[e].concat(r))})),i.init(o,n),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}}]),t}(y)),(X=B||(B={})).Pixel="px",X.Millimeter="mm",X.Inch="in",B.Pixel,i.X5.Pixel,B.Millimeter,i.X5.Millimeter,B.Inch,i.X5.Inch,i.X5.Pixel,B.Pixel,i.X5.Millimeter,B.Millimeter,i.X5.Inch,B.Inch;const $=(e,t)=>({x:e.x*t,y:e.y*t});function Y(e,t,r=Number.EPSILON){return Math.abs(e-t)<r}class K{constructor(e){Object.defineProperty(this,"ubq",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"internalAPI",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.ubq=e,this.internalAPI=e.getInternalAPI()}async createElement(e,t,r){const n=await this.execute("ubq/designblocks/create",e);this.execute("ubq/designblocks/addToParent",[n,t]);const o=Z(this.ubq.getLastFrameSize(t)),{position:i,size:a}=function(e,t,r=8/13){const n=((e,t)=>{const r=e.x/e.y,n=t.x/t.y;return $(t,r>n?e.y/t.y:e.x/t.x)})(e,t),o=$(n,r);return{position:{x:.5*(e.x-o.x),y:.5*(e.y-o.y)},size:o}}({x:o.width,y:o.height},{x:r.width,y:r.height},8/13);this.execute("ubq/layout/setAbsoluteSize",{id:n,size:{width:a.x,height:a.y}}),a.x||this.execute("ubq/layout/setAutoWidth",{id:n}),a.y||this.execute("ubq/layout/setAutoHeight",{id:n});const s=function(e={x:50,y:50}){return{x:Math.random()*e.x,y:Math.random()*e.y}}({x:.08*o.width,y:.08*o.height});return await this.execute("ubq/layout/setAbsolutePosition",{id:n,position:{left:i.x+s.x,top:i.y+s.y}}),n}setValue(e,t,r,n){Z(this.internalAPI.setValue(e,t,r,n))}getValue(e,t,r){return Z(this.internalAPI.getValue(e,t,r))}async getEditorState(){return this.execute("ubq/editor/getEditorState")}async setEditorState(e){return this.execute("ubq/editor/setEditorState",e)}async execute(e,t){return new Promise((r=>{this.internalAPI.ubqExecute(e,t,(e=>{const t=Z(e);r(t)})).delete()}))}}function Z(e){if(e.isValid()){const t=e.value();return e.delete(),t}{const t=e.error(),r=t.publicMessage();throw t.delete(),e.delete(),new Error(r)}}const J=(e,t=!0)=>{const r=[];for(let t=0;t<e.size();t+=1)r.push(e.get(t));return t&&e.delete(),r};class ee extends TypeError{constructor(e,t){let r;const{message:n,...o}=e,{path:i}=e;super(0===i.length?n:"At path: "+i.join(".")+" -- "+n),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,o),this.name=this.constructor.name,this.failures=()=>{var n;return null!=(n=r)?n:r=[e,...t()]}}}function te(e){return"object"==typeof e&&null!=e}function re(e){return"string"==typeof e?JSON.stringify(e):""+e}function ne(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:o,branch:i}=t,{type:a}=r,{refinement:s,message:c="Expected a value of type `"+a+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+re(n)+"`"}=e;return{value:n,type:a,refinement:s,key:o[o.length-1],path:o,branch:i,...e,message:c}}function*oe(e,t,r,n){var o;te(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const o of e){const e=ne(o,t,r,n);e&&(yield e)}}function*ie(e,t,r={}){const{path:n=[],branch:o=[e],coerce:i=!1,mask:a=!1}=r,s={path:n,branch:o};if(i&&(e=t.coercer(e,s),a&&"type"!==t.type&&te(t.schema)&&te(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let c=!0;for(const r of t.validator(e,s))c=!1,yield[r,void 0];for(let[r,u,l]of t.entries(e,s)){const t=ie(u,l,{path:void 0===r?n:[...n,r],branch:void 0===r?o:[...o,u],coerce:i,mask:a});for(const n of t)n[0]?(c=!1,yield[n[0],void 0]):i&&(u=n[1],void 0===r?e=u:e instanceof Map?e.set(r,u):e instanceof Set?e.add(u):te(e)&&(e[r]=u))}if(c)for(const r of t.refiner(e,s))c=!1,yield[r,void 0];c&&(yield[void 0,e])}class ae{constructor(e){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:t,schema:r,validator:n,refiner:o,coercer:i=(e=>e),entries:a=function*(){}}=e;this.type=t,this.schema=r,this.entries=a,this.coercer=i,this.validator=n?(e,t)=>oe(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>oe(o(e,t),t,this,e):()=>[]}assert(e){return function(e,t){const r=se(e,t);if(r[0])throw r[0]}(e,this)}create(e){return function(e,t){const r=se(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}(e,this)}is(e){return function(e,t){return!se(e,t)[0]}(e,this)}mask(e){return function(e,t){const r=se(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}(e,this)}validate(e,t={}){return se(e,this,t)}}function se(e,t,r={}){const n=ie(e,t,r),o=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(n);return o[0]?[new ee(o[0],(function*(){for(const e of n)e[0]&&(yield e[0])})),void 0]:[void 0,o[1]]}function ce(e,t){return new ae({type:e,schema:null,validator:t})}function ue(){return ce("boolean",(e=>"boolean"==typeof e))}function le(e){const t=re(e),r=typeof e;return new ae({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||"Expected the literal `"+t+"`, but received: "+re(r)})}function fe(){return ce("number",(e=>"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+re(e)))}function de(){return ce("string",(e=>"string"==typeof e||"Expected a string, but received: "+re(e)))}function pe(e){const t=Object.keys(e);return new ae({type:"type",schema:e,*entries(r){if(te(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>te(e)||"Expected an object, but received: "+re(e)})}function ge(e,t,r={}){const{exclusive:n}=r;return function(e,t,r){return new ae({...e,*refiner(n,o){yield*e.refiner(n,o);const i=oe(r(n,o),o,e,n);for(const e of i)yield{...e,refinement:t}}})}(e,"min",(r=>n?r>t:r>=t||"Expected a "+e.type+" greater than "+(n?"":"or equal to ")+t+" but received `"+r+"`"))}function he(e,t,r){const[n]=se(t,r);if(n)throw n.message=`Error in argument '${e}': ${n.message}`,n}function me(){return function(e){const t=e.map((e=>e.type)).join(" | ");return new ae({type:"union",schema:null,coercer:(t,r)=>(e.find((e=>{const[r]=e.validate(t,{coerce:!0});return!r}))||ce("unknown",(()=>!0))).coercer(t,r),validator(r,n){const o=[];for(const t of e){const[...e]=ie(r,t,n),[i]=e;if(!i[0])return[];for(const[t]of e)t&&o.push(t)}return["Expected the value to satisfy a union of `"+t+"`, but received: "+re(r),...o]}})}([le("image/png"),le("image/jpeg"),le("image/x-tga")])}var ve,be,ye=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},Ee=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class we{constructor(e){ve.set(this,void 0),be.set(this,void 0),ye(this,ve,e,"f"),ye(this,be,new K(e),"f")}async export(e,t){return he("handle",e,fe()),he("mimeType",t,me()),new Promise(((r,n)=>{Ee(this,ve,"f").exportToBuffer(e,t,(e=>{"error"in e?n(e.error):r(new Blob([e],{type:t}))}),{jpegQuality:.9,pngCompressionLevel:5,useTargetSize:!1,targetSize:{width:0,height:0}})}))}create(e){return he("type",e,de()),Z(Ee(this,ve,"f").create(e))}getType(e){return he("id",e,fe()),Z(Ee(this,ve,"f").getType(e))}setSelected(e,t){return he("id",e,fe()),he("selected",t,ue()),Z(Ee(this,ve,"f").setSelected(e,t))}isSelected(e){return he("id",e,fe()),Z(Ee(this,ve,"f").isSelected(e))}findAllSelected(){return J(Ee(this,ve,"f").getAllSelected())}setName(e,t){return he("id",e,fe()),he("name",t,de()),Ee(this,be,"f").setValue(e,i.uY,"name",t)}getName(e){return he("id",e,fe()),Ee(this,be,"f").getValue(e,i.uY,"name")}findByName(e){he("name",e,de());const t=Ee(this,ve,"f").findByName(e);return J(t)}findByType(e){he("type",e,de());const t=Z(Ee(this,ve,"f").findByType(e));return J(t)}findAll(){return J(Ee(this,ve,"f").getAll())}isVisible(e){return he("id",e,fe()),Z(Ee(this,ve,"f").isVisible(e))}setVisible(e,t){return he("id",e,fe()),he("visible",t,ue()),Z(Ee(this,ve,"f").setVisible(e,t))}getPosition(e){return he("id",e,fe()),Z(Ee(this,ve,"f").getPosition(e))}setPosition(e,{x:t,y:r}){return he("id",e,fe()),he("position",{x:t,y:r},pe({x:fe(),y:fe()})),Z(Ee(this,ve,"f").setPosition(e,t,r))}getRotation(e){return he("id",e,fe()),Z(Ee(this,ve,"f").getRotation(e))}setRotation(e,t){return he("id",e,fe()),he("radians",t,fe()),Z(Ee(this,ve,"f").setRotation(e,t))}getFlipHorizontal(e){return he("id",e,fe()),Z(Ee(this,ve,"f").getFlip(e)).horizontal}getFlipVertical(e){return he("id",e,fe()),Z(Ee(this,ve,"f").getFlip(e)).vertical}setFlipHorizontal(e,t){return he("id",e,fe()),he("flip",t,ue()),Z(Ee(this,ve,"f").setFlipHorizontal(e,t))}setFlipVertical(e,t){return he("id",e,fe()),he("flip",t,ue()),Z(Ee(this,ve,"f").setFlipVertical(e,t))}getSize(e){var t,r;he("id",e,fe());const n=Z(Ee(this,ve,"f").getSize(e));return{width:null!==(t=n.width)&&void 0!==t?t:"auto",height:null!==(r=n.height)&&void 0!==r?r:"auto"}}setSize(e,t){return he("id",e,fe()),he("size",t,pe({width:fe(),height:fe()})),Z(Ee(this,ve,"f").setSize(e,t.width,t.height))}getFrameSize(e){return he("id",e,fe()),Z(Ee(this,ve,"f").getLastFrameSize(e))}duplicate(e){return he("id",e,fe()),Z(Ee(this,ve,"f").duplicate(e))}destroy(e){return he("id",e,fe()),Z(Ee(this,ve,"f").destroy(e))}getParent(e){return he("id",e,fe()),Z(Ee(this,ve,"f").getParent(e))}getChildren(e){he("id",e,fe());const t=Z(Ee(this,ve,"f").getChildren(e));return J(t)}insertChild(e,t,r){return he("parent",e,fe()),he("child",t,fe()),he("index",r,ge(fe(),0)),Z(Ee(this,ve,"f").insertChild(e,t,r))}appendChild(e,t){return he("parent",e,fe()),he("child",t,fe()),Z(Ee(this,ve,"f").appendChild(e,t))}}ve=new WeakMap,be=new WeakMap;var _e,Oe,Te,De=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},Pe=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class xe{constructor(e){_e.set(this,void 0),Oe.set(this,void 0),Te.set(this,null),De(this,_e,e,"f"),De(this,Oe,new K(e),"f")}loadFromString(e){return he("sceneContent",e,de()),De(this,Te,Z(Pe(this,_e,"f").loadSceneFromString(e)),"f"),Pe(this,Te,"f")}async loadFromURL(e){return he("url",e,de()),new Promise((t=>{Pe(this,_e,"f").loadSceneFromURL(e,(e=>{De(this,Te,Z(e),"f"),t(Pe(this,Te,"f"))}))}))}async saveToString(){const e=J(Pe(this,_e,"f").getAllSelected());Pe(this,Oe,"f").execute("ubq/designblocks/deselectAll");const t=await Pe(this,Oe,"f").execute("ubq/saveScene");return e.forEach((e=>{Z(Pe(this,_e,"f").setSelected(e,!0))})),t}create(){return De(this,Te,Z(Pe(this,_e,"f").createScene({layout:i.Kc.Free})),"f"),Pe(this,Te,"f")}createFromImage(e,t=300,r=1){return he("url",e,de()),he("dpi",t,ge(fe(),0)),he("pixelScaleFactor",r,ge(fe(),0)),new Promise((n=>{Pe(this,_e,"f").createSceneFromImage(e,t,r,i.Kc.Free,0,!1,(e=>{De(this,Te,Z(e),"f"),n(Pe(this,Te,"f"))}))}))}get(){return Pe(this,Te,"f")}}_e=new WeakMap,Oe=new WeakMap,Te=new WeakMap;var Se,Me=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class ke{constructor(e){Se.set(this,void 0),function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,r):o?o.value=r:t.set(e,r)}(this,Se,e,"f")}findAll(){return J(Me(this,Se,"f").getAllVariables())}set(e,t){return he("key",e,de()),he("value",t,de()),Z(Me(this,Se,"f").setVariableValue(e,t))}get(e){return he("key",e,de()),Z(Me(this,Se,"f").getVariableValue(e))}}Se=new WeakMap;var Re,Ae,Fe,Ie=r(7168),Ce=r.n(Ie);function je(e){return Array.from(Array(e+1).keys())}!function(e){e.Left="left",e.Right="right"}(Re||(Re={})),function(e){e.Top="top",e.Bottom="bottom"}(Ae||(Ae={})),function(e){e.Left="left",e.Right="right"}(Fe||(Fe={}));const Le={view:{adopter:{style:"minimal"}},panels:{inspector:{show:!0,position:Fe.Right},settings:{show:!1,position:Fe.Left},assetLibrary:{show:!0,position:Fe.Left}},templates:{show:!0},libraries:{image:{show:!0},text:{show:!0},element:{show:!0}},navigation:{show:!0,position:Ae.Top,action:{close:{show:!1},back:{show:!1},save:{show:!1},export:{show:!1},share:{show:!1},download:{show:!1},load:{show:!1}}},blocks:{opacity:!0,transform:!0,"//ly.img.ubq/text":{advanced:{show:!0},color:{show:!0},backgroundColor:{show:!0}},"//ly.img.ubq/image":{crop:{show:!0},filters:{show:!0},adjustments:{show:!0},effects:{show:!0},blur:{show:!0}}}},Ne=(je(10),je(50),je(10).map((e=>.1*e)),{baseURL:"extensions/",entries:["ly.img.cesdk.filters.duotone","ly.img.cesdk.filters.lut","ly.img.cesdk.stickers.emoticons","ly.img.cesdk.vectorpaths","ly.img.cesdk.fonts","ly.img.cesdk.images.samples","ly.img.cesdk.effects","ly.img.cesdk.stickers.doodle","ly.img.cesdk.stickers.hand","ly.img.cesdk.stickers.emoji"]}),Ue={"//ly.img.cesdk/image_placeholder":{src:"bundle://ly.img.cesdk/images/placeholder.png"},"//ly.img.cesdk/watermark":{src:"bundle://ly.img.cesdk/images/watermark.png"},"//ly.img/font/default":{src:"bundle://ly.img.cesdk/fonts/imgly_font_inter_semibold.otf"}},He={"din-a0":{width:1189,height:841,unit:B.Millimeter},"din-a1":{width:841,height:594,unit:B.Millimeter},"din-a2":{width:594,height:420,unit:B.Millimeter},"din-a3":{width:420,height:297,unit:B.Millimeter},"din-a4":{width:297,height:210,unit:B.Millimeter},"din-a5":{width:210,height:148,unit:B.Millimeter},"din-a6":{meta:{default:!0},width:148,height:105,unit:B.Millimeter},"din-a65":{width:210,height:105,unit:B.Millimeter},"din-b5":{width:250,height:176,unit:B.Millimeter},square:{width:105,height:105,unit:B.Millimeter},"twitter-profile":{width:400,height:400,unit:B.Pixel},"twitter-image":{width:1024,height:512,unit:B.Pixel},"twitter-header":{width:1500,height:500,unit:B.Pixel},"instagram-profile":{width:180,height:180,unit:B.Pixel},"instagram-photo":{width:1080,height:1080,unit:B.Pixel},"instagram-story":{width:1080,height:1920,unit:B.Pixel},"american-letter":{width:8.5,height:11,unit:B.Inch},"american-legal":{width:8.5,height:14,unit:B.Inch},"16:10":{width:1600,height:1e3,unit:B.Pixel},"16:9":{width:1600,height:900,unit:B.Pixel},"16:10@2400p":{width:3840,height:2400,unit:B.Pixel},"16:9@2160p":{width:3840,height:2160,unit:B.Pixel},"business-card":{width:85,height:55,unit:B.Millimeter}},Be=(e,t)=>{const r=`[UBQ] ${e}`;switch(t){case i.in.Warning:console.warn(r);break;case i.in.Error:console.error(r);break;case i.in.Info:console.log(r);break;default:console.log(r)}},Xe={log:Be},Qe={en:{presets:{variables:{company_name:{label:"Company Name"},first_name:{label:"First name"},last_name:{label:"Last name"},address:{label:"Address"},city:{label:"City"}}}},de:{presets:{variables:{company_name:{label:"Firmenname"},first_name:{label:"Vorname"},last_name:{label:"Nachname"},address:{label:"Adresse"},city:{label:"Stadt"}}}}},Ge={variables:{company_name:{value:"img.ly"},first_name:{value:"Charly"},last_name:{value:"Williams"},address:{value:"742 Evergreen Terrace"},city:{value:"Springfield"}},colorPalettes:{primary:{meta:{default:!0},entries:["#FFFFFF","#000000","#6686FF","#66CCFF","#54FFEA","#E75050","#F28855","#FFF763"]}},pageFormats:He},qe={headingsHierarchyStart:2},Ve={baseURL:"core/"},ze={baseURL:"ui/",scale:"normal",elements:Le,stylesheets:{disableShadowDOM:!1,disableTagInsertion:!1,disableFontInsertion:!1}},We={maskSpotColor:void 0,dpi:300,pixelScaleFactor:1},$e={title:{font:"//ly.img/font/default",show:!0}};var Ye;function Ke(e,t=window.location.href){return new URL(e,t).toString()}function Ze(e,t=window.location.href){const r=Ke(e,t);return"/"!==r[r.length-1]?`${r}/`:r}class Je{constructor(){Object.defineProperty(this,"baseURL",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"license",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"role",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"locale",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"theme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"devMode",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"featureFlags",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"initialSceneString",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"initialSceneURL",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"initialImageURL",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"extensions",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"core",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"ui",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"i18n",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"a11y",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"scene",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"assets",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"presets",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"callbacks",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"defaultFont",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}static initWithDefaults(e={}){var t,r,n,o,i,a,s,c,u,l,f,d,p,g,h,m,v,b,y,E,w;const _=new Je;if(e){_.initialSceneString=null!==(t=e.initialSceneString)&&void 0!==t?t:void 0,_.initialSceneURL=null!==(r=e.initialSceneURL)&&void 0!==r?r:void 0,_.initialImageURL=null!==(n=e.initialImageURL)&&void 0!==n?n:void 0,_.license=e.license,_.role=null!==(o=e.role)&&void 0!==o?o:"Creator",_.locale=null!==(i=e.locale)&&void 0!==i?i:"en",_.theme=null!==(a=e.theme)&&void 0!==a?a:"dark",_.devMode=null!==(s=e.devMode)&&void 0!==s&&s,_.featureFlags=null!==(c=e.featureFlags)&&void 0!==c?c:{},_.baseURL=null!==(u=e.baseURL)&&void 0!==u?u:"https://cdn.img.ly/packages/imgly/cesdk-js/1.4.0-alpha.0/assets",_.core=null!==(l=e.core)&&void 0!==l?l:Object.assign({},Ve),_.ui=Ce()(ze,null!==(f=e.ui)&&void 0!==f?f:{}),_.extensions=null!==(d=e.extensions)&&void 0!==d?d:Object.assign({},Ne),_.extensions.entries=null!==(p=_.extensions.entries)&&void 0!==p?p:Object.assign({},Ne.entries),_.i18n=null!==(g=e.i18n)&&void 0!==g?g:Object.assign({},Qe),_.a11y=null!==(h=e.a11y)&&void 0!==h?h:Object.assign({},qe),_.callbacks=null!==(m=e.callbacks)&&void 0!==m?m:Object.assign({},Xe),_.presets=null!==(v=e.presets)&&void 0!==v?v:Object.assign({},Ge),_.scene=null!==(b=e.scene)&&void 0!==b?b:Object.assign({},We),_.page=Ce()($e,null!==(y=e.page)&&void 0!==y?y:{});const O=null!==(E=e.assets)&&void 0!==E?E:{},{"//ly.img.cesdk/watermark":T}=O,D=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(O,["//ly.img.cesdk/watermark"]);_.assets=Ce()(Ue,D),Object.entries(_.assets).forEach((([e,t])=>{_.assets[e]={src:Ke(t.src)}})),_.defaultFont=null!==(w=e.defaultFont)&&void 0!==w?w:void 0,Object.entries(Ge).forEach((([e,t])=>{var r;_.presets[e]=null!==(r=_.presets[e])&&void 0!==r?r:Object.assign({},t)}))}return _.baseURL=Ze(_.baseURL),_.core.baseURL=Ze(_.core.baseURL,_.baseURL),_.ui.baseURL=Ze(_.ui.baseURL,_.baseURL),_.extensions.baseURL=Ze(_.extensions.baseURL,_.baseURL),_.extensions.entries=_.extensions.entries.map((e=>Ze(e,_.extensions.baseURL))),_}extend(e){return Ce()({},this,e)}}const et=(Ye="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e){var t,n,o=void 0!==(e=e||{})?e:{};o.ready=new Promise((function(e,r){t=e,n=r})),Object.getOwnPropertyDescriptor(o.ready,"_main")||(Object.defineProperty(o.ready,"_main",{configurable:!0,get:function(){Ne("You are getting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"_main",{configurable:!0,set:function(){Ne("You are setting _main on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"_emscripten_stack_get_end")||(Object.defineProperty(o.ready,"_emscripten_stack_get_end",{configurable:!0,get:function(){Ne("You are getting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"_emscripten_stack_get_end",{configurable:!0,set:function(){Ne("You are setting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"_emscripten_stack_get_free")||(Object.defineProperty(o.ready,"_emscripten_stack_get_free",{configurable:!0,get:function(){Ne("You are getting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"_emscripten_stack_get_free",{configurable:!0,set:function(){Ne("You are setting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"_emscripten_stack_init")||(Object.defineProperty(o.ready,"_emscripten_stack_init",{configurable:!0,get:function(){Ne("You are getting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"_emscripten_stack_init",{configurable:!0,set:function(){Ne("You are setting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"_stackSave")||(Object.defineProperty(o.ready,"_stackSave",{configurable:!0,get:function(){Ne("You are getting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"_stackSave",{configurable:!0,set:function(){Ne("You are setting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"_stackRestore")||(Object.defineProperty(o.ready,"_stackRestore",{configurable:!0,get:function(){Ne("You are getting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"_stackRestore",{configurable:!0,set:function(){Ne("You are setting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"_stackAlloc")||(Object.defineProperty(o.ready,"_stackAlloc",{configurable:!0,get:function(){Ne("You are getting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"_stackAlloc",{configurable:!0,set:function(){Ne("You are setting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"___wasm_call_ctors")||(Object.defineProperty(o.ready,"___wasm_call_ctors",{configurable:!0,get:function(){Ne("You are getting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"___wasm_call_ctors",{configurable:!0,set:function(){Ne("You are setting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"_fflush")||(Object.defineProperty(o.ready,"_fflush",{configurable:!0,get:function(){Ne("You are getting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"_fflush",{configurable:!0,set:function(){Ne("You are setting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"___errno_location")||(Object.defineProperty(o.ready,"___errno_location",{configurable:!0,get:function(){Ne("You are getting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"___errno_location",{configurable:!0,set:function(){Ne("You are setting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"_malloc")||(Object.defineProperty(o.ready,"_malloc",{configurable:!0,get:function(){Ne("You are getting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"_malloc",{configurable:!0,set:function(){Ne("You are setting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"_free")||(Object.defineProperty(o.ready,"_free",{configurable:!0,get:function(){Ne("You are getting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"_free",{configurable:!0,set:function(){Ne("You are setting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"___dl_seterr")||(Object.defineProperty(o.ready,"___dl_seterr",{configurable:!0,get:function(){Ne("You are getting ___dl_seterr on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"___dl_seterr",{configurable:!0,set:function(){Ne("You are setting ___dl_seterr on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"_memalign")||(Object.defineProperty(o.ready,"_memalign",{configurable:!0,get:function(){Ne("You are getting _memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"_memalign",{configurable:!0,set:function(){Ne("You are setting _memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"_saveSetjmp")||(Object.defineProperty(o.ready,"_saveSetjmp",{configurable:!0,get:function(){Ne("You are getting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"_saveSetjmp",{configurable:!0,set:function(){Ne("You are setting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"_setThrew")||(Object.defineProperty(o.ready,"_setThrew",{configurable:!0,get:function(){Ne("You are getting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"_setThrew",{configurable:!0,set:function(){Ne("You are setting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"___getTypeName")||(Object.defineProperty(o.ready,"___getTypeName",{configurable:!0,get:function(){Ne("You are getting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"___getTypeName",{configurable:!0,set:function(){Ne("You are setting ___getTypeName on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"___embind_register_native_and_builtin_types")||(Object.defineProperty(o.ready,"___embind_register_native_and_builtin_types",{configurable:!0,get:function(){Ne("You are getting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"___embind_register_native_and_builtin_types",{configurable:!0,set:function(){Ne("You are setting ___embind_register_native_and_builtin_types on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(o.ready,"onRuntimeInitialized")||(Object.defineProperty(o.ready,"onRuntimeInitialized",{configurable:!0,get:function(){Ne("You are getting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(o.ready,"onRuntimeInitialized",{configurable:!0,set:function(){Ne("You are setting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),o.expectedDataFileDownloads||(o.expectedDataFileDownloads=0),o.expectedDataFileDownloads++,function(e){"object"==typeof window?window.encodeURIComponent(window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/"):"undefined"==typeof process&&"undefined"!=typeof location&&encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/");var t="cesdk.data";"function"!=typeof o.locateFilePackage||o.locateFile||(o.locateFile=o.locateFilePackage,T("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)"));var r,n,i,a,s=o.locateFile?o.locateFile(t,""):t,c=e.remote_package_size,u=null,l=o.getPreloadedPackage?o.getPreloadedPackage(s,c):null;function f(){function t(e,t){if(!e)throw t+(new Error).stack}function r(e,t,r){this.start=e,this.end=t,this.audio=r}o.FS_createPath("/","ly.img.cesdk",!0,!0),o.FS_createPath("/ly.img.cesdk","images",!0,!0),o.FS_createPath("/ly.img.cesdk","shader",!0,!0),o.FS_createPath("/ly.img.cesdk","presets",!0,!0),o.FS_createPath("/ly.img.cesdk","fonts",!0,!0),r.prototype={requests:{},open:function(e,t){this.name=t,this.requests[t]=this,o.addRunDependency("fp "+this.name)},send:function(){},onload:function(){var e=this.byteArray.subarray(this.start,this.end);this.finish(e)},finish:function(e){o.FS_createDataFile(this.name,null,e,!0,!0,!0),o.removeRunDependency("fp "+this.name),this.requests[this.name]=null}};for(var n=e.files,i=0;i<n.length;++i)new r(n[i].start,n[i].end,n[i].audio||0).open("GET",n[i].filename);function a(n){t(n,"Loading data file failed."),t(n instanceof ArrayBuffer,"bad input to processPackageData");var i=new Uint8Array(n);r.prototype.byteArray=i;for(var a=e.files,s=0;s<a.length;++s)r.prototype.requests[a[s].filename].onload();o.removeRunDependency("datafile_cesdk.data")}o.addRunDependency("datafile_cesdk.data"),o.preloadResults||(o.preloadResults={}),o.preloadResults["cesdk.data"]={fromCache:!1},l?(a(l),l=null):u=a}l||(r=s,n=c,i=function(e){u?(u(e),u=null):l=e},(a=new XMLHttpRequest).open("GET",r,!0),a.responseType="arraybuffer",a.onprogress=function(e){var t=r,i=n;if(e.total&&(i=e.total),e.loaded){a.addedTotal?o.dataFileDownloads[t].loaded=e.loaded:(a.addedTotal=!0,o.dataFileDownloads||(o.dataFileDownloads={}),o.dataFileDownloads[t]={loaded:e.loaded,total:i});var s=0,c=0,u=0;for(var l in o.dataFileDownloads){var f=o.dataFileDownloads[l];s+=f.total,c+=f.loaded,u++}s=Math.ceil(s*o.expectedDataFileDownloads/u),o.setStatus&&o.setStatus("Downloading data... ("+c+"/"+s+")")}else o.dataFileDownloads||o.setStatus&&o.setStatus("Downloading data...")},a.onerror=function(e){throw new Error("NetworkError for: "+r)},a.onload=function(e){if(!(200==a.status||304==a.status||206==a.status||0==a.status&&a.response))throw new Error(a.statusText+" : "+a.responseURL);var t=a.response;i(t)},a.send(null)),o.calledRun?f():(o.preRun||(o.preRun=[]),o.preRun.push(f))}({files:[{filename:"/ly.img.cesdk/.DS_Store",start:0,end:6148},{filename:"/ly.img.cesdk/images/watermark.png",start:6148,end:96295},{filename:"/ly.img.cesdk/images/placeholder.png",start:96295,end:96363},{filename:"/ly.img.cesdk/shader/.keep",start:96363,end:96363},{filename:"/ly.img.cesdk/presets/.keep",start:96363,end:96363},{filename:"/ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",start:96363,end:367123}],remote_package_size:367123,package_uuid:"7c7bcb68-a12a-47ea-8413-49332af776f3"});var i=o.preRun.slice();"object"==typeof window&&"object"==typeof window.performance?o.performance=performance:"object"==typeof r.g&&"object"==typeof r.g.perf_hooks&&"object"==typeof r.g.perf_hooks.performance?o.performance=r.g.perf_hooks.performance:o.performance={mark:function(){},measure:function(){}},o.emscripten_ubq_asyncFetchStates=new Map,o.emscripten_ubq_asyncFetchCompletedBytes=new Map,o.emscripten_ubq_asyncFetchTotalBytes=new Map,o.emscripten_ubq_asyncFetchHeaders=new Map,o.emscripten_ubq_asyncFetchNextHandle=0,o.emscripten_ubq_asyncFetchNextHeaderHandle=0;const a={PENDING:0,FINISHED:1,ALLOCATED:2,ERROR:3},s=["GET","POST"];if(!o.preRun)throw"Module.preRun should exist because file support used it; did a pre-js delete it?";i.forEach((function(e){if(o.preRun.indexOf(e)<0)throw"All preRun tasks that exist before user pre-js code should remain after; did you replace Module or modify Module.preRun?"}));var c,u={};for(c in o)o.hasOwnProperty(c)&&(u[c]=o[c]);var l=[],f="./this.program",d=function(e,t){throw t},p=!0,g=!1,h=!1,m=!1;if(o.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var v,b,y,E="";function w(e){return o.locateFile?o.locateFile(e,E):E+e}function _(e){if(!(e instanceof Nd)){var t=e;e&&"object"==typeof e&&e.stack&&(t=[e,e.stack]),T("exiting due to exception: "+t)}}if(m){if("object"==typeof process||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(v=function(e){return read(e)}),y=function(e){var t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(C("object"==typeof(t=read(e,"binary"))),t)},b=function(e,t,r){setTimeout((function(){t(y(e))}),0)},"undefined"!=typeof scriptArgs?l=scriptArgs:void 0!==arguments&&(l=arguments),"function"==typeof quit&&(d=function(e,t){_(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!p&&!g)throw new Error("environment detection error");if(g?E=self.location.href:"undefined"!=typeof document&&document.currentScript&&(E=document.currentScript.src),Ye&&(E=Ye),E=0!==E.indexOf("blob:")?E.substr(0,E.replace(/[?#].*/,"").lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");v=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},g&&(y=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),b=function(e,t,r){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}}var O=o.print||console.log.bind(console),T=o.printErr||console.warn.bind(console);for(c in u)u.hasOwnProperty(c)&&(o[c]=u[c]);function D(e){D.shown||(D.shown={}),D.shown[e]||(D.shown[e]=1,T(e))}u=null,o.arguments&&(l=o.arguments),Object.getOwnPropertyDescriptor(o,"arguments")||Object.defineProperty(o,"arguments",{configurable:!0,get:function(){Ne("Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),o.thisProgram&&(f=o.thisProgram),Object.getOwnPropertyDescriptor(o,"thisProgram")||Object.defineProperty(o,"thisProgram",{configurable:!0,get:function(){Ne("Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),o.quit&&(d=o.quit),Object.getOwnPropertyDescriptor(o,"quit")||Object.defineProperty(o,"quit",{configurable:!0,get:function(){Ne("Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),C(void 0===o.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),C(void 0===o.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),C(void 0===o.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),C(void 0===o.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),C(void 0===o.read,"Module.read option was removed (modify read_ in JS)"),C(void 0===o.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),C(void 0===o.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),C(void 0===o.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),C(void 0===o.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Object.getOwnPropertyDescriptor(o,"read")||Object.defineProperty(o,"read",{configurable:!0,get:function(){Ne("Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(o,"readAsync")||Object.defineProperty(o,"readAsync",{configurable:!0,get:function(){Ne("Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(o,"readBinary")||Object.defineProperty(o,"readBinary",{configurable:!0,get:function(){Ne("Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(o,"setWindowTitle")||Object.defineProperty(o,"setWindowTitle",{configurable:!0,get:function(){Ne("Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),C(!g,"worker environment detected but not enabled at build time. Add 'worker' to `-s ENVIRONMENT` to enable."),C(!h,"node environment detected but not enabled at build time. Add 'node' to `-s ENVIRONMENT` to enable."),C(!m,"shell environment detected but not enabled at build time. Add 'shell' to `-s ENVIRONMENT` to enable.");var P,x=0,S=function(e){x=e},M=function(){return x};o.wasmBinary&&(P=o.wasmBinary),Object.getOwnPropertyDescriptor(o,"wasmBinary")||Object.defineProperty(o,"wasmBinary",{configurable:!0,get:function(){Ne("Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}});var k,R=o.noExitRuntime||!0;function A(e,t,r){switch("*"===(t=t||"i8").charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return Q[e>>0];case"i16":return q[e>>1];case"i32":case"i64":return z[e>>2];case"float":return $[e>>2];case"double":return Number(Y[e>>3]);default:Ne("invalid type for getValue: "+t)}return null}Object.getOwnPropertyDescriptor(o,"noExitRuntime")||Object.defineProperty(o,"noExitRuntime",{configurable:!0,get:function(){Ne("Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),"object"!=typeof WebAssembly&&Ne("no native wasm support detected");var F,I=!1;function C(e,t){e||Ne("Assertion failed: "+t)}var j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function L(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&j)return j.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var c=63&e[t++];if(224==(240&a)?a=(15&a)<<12|s<<6|c:(240!=(248&a)&&D("Invalid UTF-8 leading byte 0x"+a.toString(16)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),a=(7&a)<<18|s<<12|c<<6|63&e[t++]),a<65536)i+=String.fromCharCode(a);else{var u=a-65536;i+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function N(e,t){return e?L(G,e,t):""}function U(e,t,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=i)break;t[r++]=s}else if(s<=2047){if(r+1>=i)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=i)break;s>1114111&&D("Invalid Unicode code point 0x"+s.toString(16)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o}function H(e,t,r){return C("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),U(e,G,t,r)}function B(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}var X,Q,G,q,V,z,W,$,Y,K="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Z(e,t){C(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var r=e,n=r>>1,o=n+t/2;!(n>=o)&&V[n];)++n;if((r=n<<1)-e>32&&K)return K.decode(G.subarray(e,r));for(var i="",a=0;!(a>=t/2);++a){var s=q[e+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function J(e,t,r){if(C(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),C("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);q[t>>1]=a,t+=2}return q[t>>1]=0,t-n}function ee(e){return 2*e.length}function te(e,t){C(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(r>=t/4);){var o=z[e+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function re(e,t,r){if(C(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),C("number"==typeof r,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,o=n+r-4,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),z[t>>2]=a,(t+=4)+4>o)break}return z[t>>2]=0,t-n}function ne(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t}function oe(e){var t=B(e)+1,r=xd(t);return U(e,Q,r,t),r}function ie(e,t){C(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),Q.set(e,t)}function ae(e,t,r){for(var n=0;n<e.length;++n)C(e.charCodeAt(n)===(255&e.charCodeAt(n))),Q[t++>>0]=e.charCodeAt(n);r||(Q[t>>0]=0)}function se(e,t){return e%t>0&&(e+=t-e%t),e}function ce(e){X=e,o.HEAP8=Q=new Int8Array(e),o.HEAP16=q=new Int16Array(e),o.HEAP32=z=new Int32Array(e),o.HEAPU8=G=new Uint8Array(e),o.HEAPU16=V=new Uint16Array(e),o.HEAPU32=W=new Uint32Array(e),o.HEAPF32=$=new Float32Array(e),o.HEAPF64=Y=new Float64Array(e)}var ue=5242880;o.TOTAL_STACK&&C(ue===o.TOTAL_STACK,"the stack size can no longer be determined at runtime");var le,fe=o.INITIAL_MEMORY||268435456;function de(){var e=Md();C(0==(3&e)),z[e+4>>2]=34821223,z[e+8>>2]=2310721022,z[0]=1668509029}function pe(){if(!I){var e=Md(),t=W[e+4>>2],r=W[e+8>>2];34821223==t&&2310721022==r||Ne("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" "+t.toString(16)),1668509029!==z[0]&&Ne("Runtime error: The application has corrupted its heap memory area (address zero)!")}}Object.getOwnPropertyDescriptor(o,"INITIAL_MEMORY")||Object.defineProperty(o,"INITIAL_MEMORY",{configurable:!0,get:function(){Ne("Module.INITIAL_MEMORY has been replaced with plain INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),C(fe>=ue,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+fe+"! (TOTAL_STACK="+ue+")"),C("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),C(!o.wasmMemory,"Use of `wasmMemory` detected. Use -s IMPORTED_MEMORY to define wasmMemory externally"),C(268435456==fe,"Detected runtime INITIAL_MEMORY setting. Use -s IMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -s SUPPORT_BIG_ENDIAN=1 to bypass)"}();var ge=[],he=[],me=[],ve=[],be=[],ye=!1,Ee=!1,we=0;function _e(){return R||we>0}function Oe(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)Se(o.preRun.shift());$e(ge)}function Te(){pe(),C(!ye),ye=!0,o.noFSInit||yt.init.initialized||yt.init(),yt.ignorePermissions=!1,ft.init(),$e(he)}function De(){pe(),$e(me)}function Pe(){pe(),Ee=!0}function xe(){if(pe(),o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)ke(o.postRun.shift());$e(be)}function Se(e){ge.unshift(e)}function Me(e){he.unshift(e)}function ke(e){be.unshift(e)}C(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),C(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),C(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),C(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var Re=0,Ae=null,Fe=null,Ie={};function Ce(e){for(var t=e;;){if(!Ie[e])return e;e=t+Math.random()}}function je(e){Re++,o.monitorRunDependencies&&o.monitorRunDependencies(Re),e?(C(!Ie[e]),Ie[e]=1,null===Ae&&"undefined"!=typeof setInterval&&(Ae=setInterval((function(){if(I)return clearInterval(Ae),void(Ae=null);var e=!1;for(var t in Ie)e||(e=!0,T("still waiting on run dependencies:")),T("dependency: "+t);e&&T("(end of list)")}),1e4))):T("warning: run dependency added without ID")}function Le(e){if(Re--,o.monitorRunDependencies&&o.monitorRunDependencies(Re),e?(C(Ie[e]),delete Ie[e]):T("warning: run dependency removed without ID"),0==Re&&(null!==Ae&&(clearInterval(Ae),Ae=null),Fe)){var t=Fe;Fe=null,t()}}function Ne(e){o.onAbort&&o.onAbort(e),T(e="Aborted("+e+")"),I=!0,F=1;var t=new WebAssembly.RuntimeError(e);throw n(t),t}o.preloadedImages={},o.preloadedAudios={};var Ue,He,Be,Xe="data:application/octet-stream;base64,";function Qe(e){return e.startsWith(Xe)}function Ge(e){return e.startsWith("file://")}function qe(e,t){return function(){var r=e,n=t;return t||(n=o.asm),C(ye,"native function `"+r+"` called before runtime initialization"),C(!Ee,"native function `"+r+"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n[e]||C(n[e],"exported native function `"+r+"` not found"),n[e].apply(null,arguments)}}function Ve(e){try{if(e==Ue&&P)return new Uint8Array(P);if(y)return y(e);throw"both async and sync fetching of the wasm failed"}catch(e){Ne(e)}}function ze(){return P||!p&&!g||"function"!=typeof fetch?Promise.resolve().then((function(){return Ve(Ue)})):fetch(Ue,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+Ue+"'";return e.arrayBuffer()})).catch((function(){return Ve(Ue)}))}function We(){var e={env:Ed,wasi_snapshot_preview1:Ed};function t(e,t){var r=e.exports;o.asm=r,C(k=o.asm.memory,"memory not found in wasm exports"),ce(k.buffer),C(le=o.asm.__indirect_function_table,"table not found in wasm exports"),Me(o.asm.__wasm_call_ctors),Le("wasm-instantiate")}je("wasm-instantiate");var r=o;function i(e){C(o===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,t(e.instance)}function a(t){return ze().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){T("failed to asynchronously prepare wasm: "+e),Ge(Ue)&&T("warning: Loading from a file URI ("+Ue+") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"),Ne(e)}))}if(o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(e){return T("Module.instantiateWasm callback failed with error: "+e),!1}return(P||"function"!=typeof WebAssembly.instantiateStreaming||Qe(Ue)||"function"!=typeof fetch?a(i):fetch(Ue,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(i,(function(e){return T("wasm streaming compile failed: "+e),T("falling back to ArrayBuffer instantiation"),a(i)}))}))).catch(n),{}}function $e(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?et(r)():et(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(o)}}function Ke(e){return D("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function Ze(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t=Ke(e);return e===t?e:t+" ["+e+"]"}))}Qe(Ue="cesdk.wasm")||(Ue=w(Ue));var Je=[];function et(e){var t=Je[e];return t||(e>=Je.length&&(Je.length=e+1),Je[e]=t=le.get(e)),C(le.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}function tt(e){if(e instanceof Nd||"unwind"==e)return F;d(1,e)}function rt(e,t,r,n){Ne("Assertion failed: "+N(e)+", at: "+[t?N(t):"unknown filename",r,n?N(n):"unknown function"])}function nt(e){return wd(e+16)+16}function ot(e,t){}function it(e){this.excPtr=e,this.ptr=e-16,this.set_type=function(e){z[this.ptr+4>>2]=e},this.get_type=function(){return z[this.ptr+4>>2]},this.set_destructor=function(e){z[this.ptr+8>>2]=e},this.get_destructor=function(){return z[this.ptr+8>>2]},this.set_refcount=function(e){z[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,Q[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=Q[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,Q[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=Q[this.ptr+13>>0]},this.init=function(e,t){this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=z[this.ptr>>2];z[this.ptr>>2]=e+1},this.release_ref=function(){var e=z[this.ptr>>2];return z[this.ptr>>2]=e-1,C(e>0),1===e}}function at(e,t,r){throw new it(e).init(t,r),e+" - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch."}function st(e){return z[Od()>>2]=e,e}var ct={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=ct.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=ct.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:function(e){if("/"===e)return"/";var t=(e=(e=ct.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return ct.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return ct.normalize(e.join("/"))},join2:function(e,t){return ct.normalize(e+"/"+t)}};function ut(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}return function(){Ne("no cryptographic support found for randomDevice. consider polyfilling it if you want to use something insecure like Math.random(), e.g. put this in a --pre-js: var crypto = { getRandomValues: function(array) { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")}}var lt={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:yt.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t="/"===n.charAt(0)}return(t?"/":"")+(e=ct.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=lt.resolve(e).substr(1),t=lt.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var c=[];for(s=a;s<n.length;s++)c.push("..");return(c=c.concat(o.slice(a))).join("/")}},ft={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){ft.ttys[e]={input:[],output:[],ops:t},yt.registerDevice(e,ft.stream_ops)},stream_ops:{open:function(e){var t=ft.ttys[e.node.rdev];if(!t)throw new yt.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new yt.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new yt.ErrnoError(29)}if(void 0===s&&0===i)throw new yt.ErrnoError(6);if(null==s)break;i++,t[r+a]=s}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.put_char)throw new yt.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new yt.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;e.input=bd(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(O(L(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(O(L(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(T(L(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(T(L(e.output,0)),e.output=[])}}};function dt(e,t){G.fill(0,e,e+t)}function pt(e,t){return C(t,"alignment argument is required"),Math.ceil(e/t)*t}function gt(e){e=pt(e,65536);var t=Rd(65536,e);return t?(dt(t,e),t):0}var ht={ops_table:null,mount:function(e){return ht.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(yt.isBlkdev(r)||yt.isFIFO(r))throw new yt.ErrnoError(63);ht.ops_table||(ht.ops_table={dir:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr,lookup:ht.node_ops.lookup,mknod:ht.node_ops.mknod,rename:ht.node_ops.rename,unlink:ht.node_ops.unlink,rmdir:ht.node_ops.rmdir,readdir:ht.node_ops.readdir,symlink:ht.node_ops.symlink},stream:{llseek:ht.stream_ops.llseek}},file:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr},stream:{llseek:ht.stream_ops.llseek,read:ht.stream_ops.read,write:ht.stream_ops.write,allocate:ht.stream_ops.allocate,mmap:ht.stream_ops.mmap,msync:ht.stream_ops.msync}},link:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr,readlink:ht.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ht.node_ops.getattr,setattr:ht.node_ops.setattr},stream:yt.chrdev_stream_ops}});var o=yt.createNode(e,t,r,n);return yt.isDir(o.mode)?(o.node_ops=ht.ops_table.dir.node,o.stream_ops=ht.ops_table.dir.stream,o.contents={}):yt.isFile(o.mode)?(o.node_ops=ht.ops_table.file.node,o.stream_ops=ht.ops_table.file.stream,o.usedBytes=0,o.contents=null):yt.isLink(o.mode)?(o.node_ops=ht.ops_table.link.node,o.stream_ops=ht.ops_table.link.stream):yt.isChrdev(o.mode)&&(o.node_ops=ht.ops_table.chrdev.node,o.stream_ops=ht.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=yt.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,yt.isDir(e.mode)?t.size=4096:yt.isFile(e.mode)?t.size=e.usedBytes:yt.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&ht.resizeFileStorage(e,t.size)},lookup:function(e,t){throw yt.genericErrors[44]},mknod:function(e,t,r,n){return ht.createNode(e,t,r,n)},rename:function(e,t,r){if(yt.isDir(e.mode)){var n;try{n=yt.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new yt.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=yt.lookupNode(e,t);for(var n in r.contents)throw new yt.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=ht.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!yt.isLink(e.mode))throw new yt.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(C(a>=0),a>8&&i.subarray)t.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)t[r+s]=i[o+s];return a},write:function(e,t,r,n,o,i){if(C(!(t instanceof ArrayBuffer)),t.buffer===Q.buffer&&(i=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(i)return C(0===o,"canOwn must imply no weird position inside the file"),a.contents=t.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=t.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(t.subarray(r,r+n),o),n}if(ht.expandFileStorage(a,o+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&yt.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new yt.ErrnoError(28);return n},allocate:function(e,t,r){ht.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,n,o,i){if(0!==t)throw new yt.ErrnoError(28);if(!yt.isFile(e.node.mode))throw new yt.ErrnoError(43);var a,s,c=e.node.contents;if(2&i||c.buffer!==X){if((n>0||n+r<c.length)&&(c=c.subarray?c.subarray(n,n+r):Array.prototype.slice.call(c,n,n+r)),s=!0,!(a=gt(r)))throw new yt.ErrnoError(48);Q.set(c,a)}else s=!1,a=c.byteOffset;return{ptr:a,allocated:s}},msync:function(e,t,r,n,o){if(!yt.isFile(e.node.mode))throw new yt.ErrnoError(43);return 2&o||ht.stream_ops.write(e,t,0,n,r,!1),0}}};function mt(e,t,r,n){var o=n?"":Ce("al "+e);b(e,(function(r){C(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),o&&Le(o)}),(function(t){if(!r)throw'Loading data file "'+e+'" failed.';r()})),o&&je(o)}var vt={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},bt={},yt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(e,t){if(t=t||{},!(e=lt.resolve(yt.cwd(),e)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var n in r)void 0===t[n]&&(t[n]=r[n]);if(t.recurse_count>8)throw new yt.ErrnoError(32);for(var o=ct.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),i=yt.root,a="/",s=0;s<o.length;s++){var c=s===o.length-1;if(c&&t.parent)break;if(i=yt.lookupNode(i,o[s]),a=ct.join2(a,o[s]),yt.isMountpoint(i)&&(!c||c&&t.follow_mount)&&(i=i.mounted.root),!c||t.follow)for(var u=0;yt.isLink(i.mode);){var l=yt.readlink(a);if(a=lt.resolve(ct.dirname(a),l),i=yt.lookupPath(a,{recurse_count:t.recurse_count}).node,u++>40)throw new yt.ErrnoError(32)}}return{path:a,node:i}},getPath:function(e){for(var t;;){if(yt.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%yt.nameTable.length},hashAddNode:function(e){var t=yt.hashName(e.parent.id,e.name);e.name_next=yt.nameTable[t],yt.nameTable[t]=e},hashRemoveNode:function(e){var t=yt.hashName(e.parent.id,e.name);if(yt.nameTable[t]===e)yt.nameTable[t]=e.name_next;else for(var r=yt.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:function(e,t){var r=yt.mayLookup(e);if(r)throw new yt.ErrnoError(r,e);for(var n=yt.hashName(e.id,t),o=yt.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return yt.lookup(e,t)},createNode:function(e,t,r,n){C("object"==typeof e);var o=new yt.FSNode(e,t,r,n);return yt.hashAddNode(o),o},destroyNode:function(e){yt.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:function(e){var t=yt.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return yt.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2},mayLookup:function(e){return yt.nodePermissions(e,"x")||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{return yt.lookupNode(e,t),20}catch(e){}return yt.nodePermissions(e,"wx")},mayDelete:function(e,t,r){var n;try{n=yt.lookupNode(e,t)}catch(e){return e.errno}var o=yt.nodePermissions(e,"wx");if(o)return o;if(r){if(!yt.isDir(n.mode))return 54;if(yt.isRoot(n)||yt.getPath(n)===yt.cwd())return 10}else if(yt.isDir(n.mode))return 31;return 0},mayOpen:function(e,t){return e?yt.isLink(e.mode)?32:yt.isDir(e.mode)&&("r"!==yt.flagsToPermissionString(t)||512&t)?31:yt.nodePermissions(e,yt.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||yt.MAX_OPEN_FDS;for(var r=e;r<=t;r++)if(!yt.streams[r])return r;throw new yt.ErrnoError(33)},getStream:function(e){return yt.streams[e]},createStream:function(e,t,r){yt.FSStream||(yt.FSStream=function(){},yt.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var n=new yt.FSStream;for(var o in e)n[o]=e[o];e=n;var i=yt.nextfd(t,r);return e.fd=i,yt.streams[i]=e,e},closeStream:function(e){yt.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=yt.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new yt.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){yt.devices[e]={stream_ops:t}},getDevice:function(e){return yt.devices[e]},getMounts:function(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),yt.syncFSRequests++,yt.syncFSRequests>1&&T("warning: "+yt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=yt.getMounts(yt.root.mount),n=0;function o(e){return C(yt.syncFSRequests>0),yt.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((function(t){if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount:function(e,t,r){if("string"==typeof e)throw e;var n,o="/"===r,i=!r;if(o&&yt.root)throw new yt.ErrnoError(10);if(!o&&!i){var a=yt.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,yt.isMountpoint(n))throw new yt.ErrnoError(10);if(!yt.isDir(n.mode))throw new yt.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(s);return c.mount=s,s.root=c,o?yt.root=c:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),c},unmount:function(e){var t=yt.lookupPath(e,{follow_mount:!1});if(!yt.isMountpoint(t.node))throw new yt.ErrnoError(28);var r=t.node,n=r.mounted,o=yt.getMounts(n);Object.keys(yt.nameTable).forEach((function(e){for(var t=yt.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&yt.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);C(-1!==i),r.mount.mounts.splice(i,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,r){var n=yt.lookupPath(e,{parent:!0}).node,o=ct.basename(e);if(!o||"."===o||".."===o)throw new yt.ErrnoError(28);var i=yt.mayCreate(n,o);if(i)throw new yt.ErrnoError(i);if(!n.node_ops.mknod)throw new yt.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,yt.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,yt.mknod(e,t,0)},mkdirTree:function(e,t){for(var r=e.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{yt.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:function(e,t,r){return void 0===r&&(r=t,t=438),t|=8192,yt.mknod(e,t,r)},symlink:function(e,t){if(!lt.resolve(e))throw new yt.ErrnoError(44);var r=yt.lookupPath(t,{parent:!0}).node;if(!r)throw new yt.ErrnoError(44);var n=ct.basename(t),o=yt.mayCreate(r,n);if(o)throw new yt.ErrnoError(o);if(!r.node_ops.symlink)throw new yt.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:function(e,t){var r,n,o=ct.dirname(e),i=ct.dirname(t),a=ct.basename(e),s=ct.basename(t);if(r=yt.lookupPath(e,{parent:!0}).node,n=yt.lookupPath(t,{parent:!0}).node,!r||!n)throw new yt.ErrnoError(44);if(r.mount!==n.mount)throw new yt.ErrnoError(75);var c,u=yt.lookupNode(r,a),l=lt.relative(e,i);if("."!==l.charAt(0))throw new yt.ErrnoError(28);if("."!==(l=lt.relative(t,o)).charAt(0))throw new yt.ErrnoError(55);try{c=yt.lookupNode(n,s)}catch(e){}if(u!==c){var f=yt.isDir(u.mode),d=yt.mayDelete(r,a,f);if(d)throw new yt.ErrnoError(d);if(d=c?yt.mayDelete(n,s,f):yt.mayCreate(n,s))throw new yt.ErrnoError(d);if(!r.node_ops.rename)throw new yt.ErrnoError(63);if(yt.isMountpoint(u)||c&&yt.isMountpoint(c))throw new yt.ErrnoError(10);if(n!==r&&(d=yt.nodePermissions(r,"w")))throw new yt.ErrnoError(d);yt.hashRemoveNode(u);try{r.node_ops.rename(u,n,s)}catch(e){throw e}finally{yt.hashAddNode(u)}}},rmdir:function(e){var t=yt.lookupPath(e,{parent:!0}).node,r=ct.basename(e),n=yt.lookupNode(t,r),o=yt.mayDelete(t,r,!0);if(o)throw new yt.ErrnoError(o);if(!t.node_ops.rmdir)throw new yt.ErrnoError(63);if(yt.isMountpoint(n))throw new yt.ErrnoError(10);t.node_ops.rmdir(t,r),yt.destroyNode(n)},readdir:function(e){var t=yt.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new yt.ErrnoError(54);return t.node_ops.readdir(t)},unlink:function(e){var t=yt.lookupPath(e,{parent:!0}).node,r=ct.basename(e),n=yt.lookupNode(t,r),o=yt.mayDelete(t,r,!1);if(o)throw new yt.ErrnoError(o);if(!t.node_ops.unlink)throw new yt.ErrnoError(63);if(yt.isMountpoint(n))throw new yt.ErrnoError(10);t.node_ops.unlink(t,r),yt.destroyNode(n)},readlink:function(e){var t=yt.lookupPath(e).node;if(!t)throw new yt.ErrnoError(44);if(!t.node_ops.readlink)throw new yt.ErrnoError(28);return lt.resolve(yt.getPath(t.parent),t.node_ops.readlink(t))},stat:function(e,t){var r=yt.lookupPath(e,{follow:!t}).node;if(!r)throw new yt.ErrnoError(44);if(!r.node_ops.getattr)throw new yt.ErrnoError(63);return r.node_ops.getattr(r)},lstat:function(e){return yt.stat(e,!0)},chmod:function(e,t,r){var n;if(!(n="string"==typeof e?yt.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new yt.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:function(e,t){yt.chmod(e,t,!0)},fchmod:function(e,t){var r=yt.getStream(e);if(!r)throw new yt.ErrnoError(8);yt.chmod(r.node,t)},chown:function(e,t,r,n){var o;if(!(o="string"==typeof e?yt.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new yt.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(e,t,r){yt.chown(e,t,r,!0)},fchown:function(e,t,r){var n=yt.getStream(e);if(!n)throw new yt.ErrnoError(8);yt.chown(n.node,t,r)},truncate:function(e,t){if(t<0)throw new yt.ErrnoError(28);var r;if(!(r="string"==typeof e?yt.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new yt.ErrnoError(63);if(yt.isDir(r.mode))throw new yt.ErrnoError(31);if(!yt.isFile(r.mode))throw new yt.ErrnoError(28);var n=yt.nodePermissions(r,"w");if(n)throw new yt.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:function(e,t){var r=yt.getStream(e);if(!r)throw new yt.ErrnoError(8);if(0==(2097155&r.flags))throw new yt.ErrnoError(28);yt.truncate(r.node,t)},utime:function(e,t,r){var n=yt.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open:function(e,t,r,n,i){if(""===e)throw new yt.ErrnoError(44);var a;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?yt.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)a=e;else{e=ct.normalize(e);try{a=yt.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(a){if(128&t)throw new yt.ErrnoError(20)}else a=yt.mknod(e,r,0),s=!0;if(!a)throw new yt.ErrnoError(44);if(yt.isChrdev(a.mode)&&(t&=-513),65536&t&&!yt.isDir(a.mode))throw new yt.ErrnoError(54);if(!s){var c=yt.mayOpen(a,t);if(c)throw new yt.ErrnoError(c)}512&t&&yt.truncate(a,0),t&=-131713;var u=yt.createStream({node:a,path:yt.getPath(a),id:a.id,flags:t,mode:a.mode,seekable:!0,position:0,stream_ops:a.stream_ops,node_ops:a.node_ops,ungotten:[],error:!1},n,i);return u.stream_ops.open&&u.stream_ops.open(u),!o.logReadFiles||1&t||(yt.readFiles||(yt.readFiles={}),e in yt.readFiles||(yt.readFiles[e]=1)),u},close:function(e){if(yt.isClosed(e))throw new yt.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{yt.closeStream(e.fd)}e.fd=null},isClosed:function(e){return null===e.fd},llseek:function(e,t,r){if(yt.isClosed(e))throw new yt.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new yt.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new yt.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:function(e,t,r,n,o){if(n<0||o<0)throw new yt.ErrnoError(28);if(yt.isClosed(e))throw new yt.ErrnoError(8);if(1==(2097155&e.flags))throw new yt.ErrnoError(8);if(yt.isDir(e.node.mode))throw new yt.ErrnoError(31);if(!e.stream_ops.read)throw new yt.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new yt.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=a),a},write:function(e,t,r,n,o,i){if(n<0||o<0)throw new yt.ErrnoError(28);if(yt.isClosed(e))throw new yt.ErrnoError(8);if(0==(2097155&e.flags))throw new yt.ErrnoError(8);if(yt.isDir(e.node.mode))throw new yt.ErrnoError(31);if(!e.stream_ops.write)throw new yt.ErrnoError(28);e.seekable&&1024&e.flags&&yt.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new yt.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,t,r,n,o,i);return a||(e.position+=s),s},allocate:function(e,t,r){if(yt.isClosed(e))throw new yt.ErrnoError(8);if(t<0||r<=0)throw new yt.ErrnoError(28);if(0==(2097155&e.flags))throw new yt.ErrnoError(8);if(!yt.isFile(e.node.mode)&&!yt.isDir(e.node.mode))throw new yt.ErrnoError(43);if(!e.stream_ops.allocate)throw new yt.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:function(e,t,r,n,o,i){if(0!=(2&o)&&0==(2&i)&&2!=(2097155&e.flags))throw new yt.ErrnoError(2);if(1==(2097155&e.flags))throw new yt.ErrnoError(2);if(!e.stream_ops.mmap)throw new yt.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o,i)},msync:function(e,t,r,n,o){return e&&e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0},munmap:function(e){return 0},ioctl:function(e,t,r){if(!e.stream_ops.ioctl)throw new yt.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile:function(e,t){if((t=t||{}).flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var r,n=yt.open(e,t.flags),o=yt.stat(e).size,i=new Uint8Array(o);return yt.read(n,i,0,o,0),"utf8"===t.encoding?r=L(i,0):"binary"===t.encoding&&(r=i),yt.close(n),r},writeFile:function(e,t,r){(r=r||{}).flags=r.flags||577;var n=yt.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(B(t)+1),i=U(t,o,0,o.length);yt.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");yt.write(n,t,0,t.byteLength,void 0,r.canOwn)}yt.close(n)},cwd:function(){return yt.currentPath},chdir:function(e){var t=yt.lookupPath(e,{follow:!0});if(null===t.node)throw new yt.ErrnoError(44);if(!yt.isDir(t.node.mode))throw new yt.ErrnoError(54);var r=yt.nodePermissions(t.node,"x");if(r)throw new yt.ErrnoError(r);yt.currentPath=t.path},createDefaultDirectories:function(){yt.mkdir("/tmp"),yt.mkdir("/home"),yt.mkdir("/home/web_user")},createDefaultDevices:function(){yt.mkdir("/dev"),yt.registerDevice(yt.makedev(1,3),{read:function(){return 0},write:function(e,t,r,n,o){return n}}),yt.mkdev("/dev/null",yt.makedev(1,3)),ft.register(yt.makedev(5,0),ft.default_tty_ops),ft.register(yt.makedev(6,0),ft.default_tty1_ops),yt.mkdev("/dev/tty",yt.makedev(5,0)),yt.mkdev("/dev/tty1",yt.makedev(6,0));var e=ut();yt.createDevice("/dev","random",e),yt.createDevice("/dev","urandom",e),yt.mkdir("/dev/shm"),yt.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){yt.mkdir("/proc");var e=yt.mkdir("/proc/self");yt.mkdir("/proc/self/fd"),yt.mount({mount:function(){var t=yt.createNode(e,"fd",16895,73);return t.node_ops={lookup:function(e,t){var r=+t,n=yt.getStream(r);if(!n)throw new yt.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:function(){o.stdin?yt.createDevice("/dev","stdin",o.stdin):yt.symlink("/dev/tty","/dev/stdin"),o.stdout?yt.createDevice("/dev","stdout",null,o.stdout):yt.symlink("/dev/tty","/dev/stdout"),o.stderr?yt.createDevice("/dev","stderr",null,o.stderr):yt.symlink("/dev/tty1","/dev/stderr");var e=yt.open("/dev/stdin",0),t=yt.open("/dev/stdout",1),r=yt.open("/dev/stderr",1);C(0===e.fd,"invalid handle for stdin ("+e.fd+")"),C(1===t.fd,"invalid handle for stdout ("+t.fd+")"),C(2===r.fd,"invalid handle for stderr ("+r.fd+")")},ensureErrnoError:function(){yt.ErrnoError||(yt.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,bt)if(bt[t]===e){this.code=t;break}},this.setErrno(e),this.message=vt[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=Ze(this.stack))},yt.ErrnoError.prototype=new Error,yt.ErrnoError.prototype.constructor=yt.ErrnoError,[44].forEach((function(e){yt.genericErrors[e]=new yt.ErrnoError(e),yt.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:function(){yt.ensureErrnoError(),yt.nameTable=new Array(4096),yt.mount(ht,{},"/"),yt.createDefaultDirectories(),yt.createDefaultDevices(),yt.createSpecialDirectories(),yt.filesystems={MEMFS:ht}},init:function(e,t,r){C(!yt.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),yt.init.initialized=!0,yt.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=t||o.stdout,o.stderr=r||o.stderr,yt.createStandardStreams()},quit:function(){yt.init.initialized=!1;var e=o._fflush;e&&e(0);for(var t=0;t<yt.streams.length;t++){var r=yt.streams[t];r&&yt.close(r)}},getMode:function(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:function(e,t){var r=yt.analyzePath(e,t);return r.exists?r.object:null},analyzePath:function(e,t){try{e=(n=yt.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=yt.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=ct.basename(e),n=yt.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath:function(e,t,r,n){e="string"==typeof e?e:yt.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=ct.join2(e,i);try{yt.mkdir(a)}catch(e){}e=a}}return a},createFile:function(e,t,r,n,o){var i=ct.join2("string"==typeof e?e:yt.getPath(e),t),a=yt.getMode(n,o);return yt.create(i,a)},createDataFile:function(e,t,r,n,o,i){var a=t?ct.join2("string"==typeof e?e:yt.getPath(e),t):e,s=yt.getMode(n,o),c=yt.create(a,s);if(r){if("string"==typeof r){for(var u=new Array(r.length),l=0,f=r.length;l<f;++l)u[l]=r.charCodeAt(l);r=u}yt.chmod(c,146|s);var d=yt.open(c,577);yt.write(d,r,0,r.length,0,i),yt.close(d),yt.chmod(c,s)}return c},createDevice:function(e,t,r,n){var o=ct.join2("string"==typeof e?e:yt.getPath(e),t),i=yt.getMode(!!r,!!n);yt.createDevice.major||(yt.createDevice.major=64);var a=yt.makedev(yt.createDevice.major++,0);return yt.registerDevice(a,{open:function(e){e.seekable=!1},close:function(e){n&&n.buffer&&n.buffer.length&&n(10)},read:function(e,t,n,o,i){for(var a=0,s=0;s<o;s++){var c;try{c=r()}catch(e){throw new yt.ErrnoError(29)}if(void 0===c&&0===a)throw new yt.ErrnoError(6);if(null==c)break;a++,t[n+s]=c}return a&&(e.node.timestamp=Date.now()),a},write:function(e,t,r,o,i){for(var a=0;a<o;a++)try{n(t[r+a])}catch(e){throw new yt.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),yt.mkdev(o,i,a)},forceLoadFile:function(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!v)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=bd(v(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new yt.ErrnoError(29)}},createLazyFile:function(e,t,r,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),o=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(e){var t=e*a,o=(e+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+e+"-"+t),"undefined"!=typeof Uint8Array&&(o.responseType="arraybuffer"),o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):bd(o.responseText||"",!0)}(t,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,O("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!g)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:r};var c=yt.createFile(e,t,s,n,o);s.contents?c.contents=s.contents:s.url&&(c.contents=null,c.url=s.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(c.stream_ops).forEach((function(e){var t=c.stream_ops[e];u[e]=function(){return yt.forceLoadFile(c),t.apply(null,arguments)}})),u.read=function(e,t,r,n,o){yt.forceLoadFile(c);var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(C(a>=0),i.slice)for(var s=0;s<a;s++)t[r+s]=i[o+s];else for(s=0;s<a;s++)t[r+s]=i.get(o+s);return a},c.stream_ops=u,c},createPreloadedFile:function(e,t,r,n,i,a,s,c,u,l){ao.init();var f=t?lt.resolve(ct.join2(e,t)):e,d=Ce("cp "+f);function p(r){function p(r){l&&l(),c||yt.createDataFile(e,t,r,n,i,u),a&&a(),Le(d)}var g=!1;o.preloadPlugins.forEach((function(e){g||e.canHandle(f)&&(e.handle(r,f,p,(function(){s&&s(),Le(d)})),g=!0)})),g||p(r)}je(d),"string"==typeof r?mt(r,(function(e){p(e)}),s):p(r)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(e,t,r){t=t||function(){},r=r||function(){};var n=yt.indexedDB();try{var o=n.open(yt.DB_NAME(),yt.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=function(){O("creating db"),o.result.createObjectStore(yt.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([yt.DB_STORE_NAME],"readwrite"),i=n.objectStore(yt.DB_STORE_NAME),a=0,s=0,c=e.length;function u(){0==s?t():r()}e.forEach((function(e){var t=i.put(yt.analyzePath(e).object.contents,e);t.onsuccess=function(){++a+s==c&&u()},t.onerror=function(){s++,a+s==c&&u()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:function(e,t,r){t=t||function(){},r=r||function(){};var n=yt.indexedDB();try{var o=n.open(yt.DB_NAME(),yt.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=r,o.onsuccess=function(){var n=o.result;try{var i=n.transaction([yt.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var a=i.objectStore(yt.DB_STORE_NAME),s=0,c=0,u=e.length;function l(){0==c?t():r()}e.forEach((function(e){var t=a.get(e);t.onsuccess=function(){yt.analyzePath(e).exists&&yt.unlink(e),yt.createDataFile(ct.dirname(e),ct.basename(e),t.result,!0,!0,!0),++s+c==u&&l()},t.onerror=function(){c++,s+c==u&&l()}})),i.onerror=r},o.onerror=r},absolutePath:function(){Ne("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:function(){Ne("FS.createFolder has been removed; use FS.mkdir instead")},createLink:function(){Ne("FS.createLink has been removed; use FS.symlink instead")},joinPath:function(){Ne("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:function(){Ne("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:function(){Ne("FS.standardizePath has been removed; use PATH.normalize instead")}},Et={mappings:{},DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if("/"===t[0])return t;var n;if(-100===e)n=yt.cwd();else{var o=yt.getStream(e);if(!o)throw new yt.ErrnoError(8);n=o.path}if(0==t.length){if(!r)throw new yt.ErrnoError(44);return n}return ct.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&ct.normalize(t)!==ct.normalize(yt.getPath(e.node)))return-54;throw e}return z[r>>2]=n.dev,z[r+4>>2]=0,z[r+8>>2]=n.ino,z[r+12>>2]=n.mode,z[r+16>>2]=n.nlink,z[r+20>>2]=n.uid,z[r+24>>2]=n.gid,z[r+28>>2]=n.rdev,z[r+32>>2]=0,Be=[n.size>>>0,(He=n.size,+Math.abs(He)>=1?He>0?(0|Math.min(+Math.floor(He/4294967296),4294967295))>>>0:~~+Math.ceil((He-+(~~He>>>0))/4294967296)>>>0:0)],z[r+40>>2]=Be[0],z[r+44>>2]=Be[1],z[r+48>>2]=4096,z[r+52>>2]=n.blocks,z[r+56>>2]=n.atime.getTime()/1e3|0,z[r+60>>2]=0,z[r+64>>2]=n.mtime.getTime()/1e3|0,z[r+68>>2]=0,z[r+72>>2]=n.ctime.getTime()/1e3|0,z[r+76>>2]=0,Be=[n.ino>>>0,(He=n.ino,+Math.abs(He)>=1?He>0?(0|Math.min(+Math.floor(He/4294967296),4294967295))>>>0:~~+Math.ceil((He-+(~~He>>>0))/4294967296)>>>0:0)],z[r+80>>2]=Be[0],z[r+84>>2]=Be[1],0},doMsync:function(e,t,r,n,o){var i=G.slice(e,e+r);yt.msync(t,i,o,r,n)},doMkdir:function(e,t){return"/"===(e=ct.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),yt.mkdir(e,t,0),0},doMknod:function(e,t,r){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return yt.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-28;var n=yt.readlink(e),o=Math.min(r,B(n)),i=Q[t+o];return H(n,t,r+1),Q[t+o]=i,o},doAccess:function(e,t){if(-8&t)return-28;var r;if(!(r=yt.lookupPath(e,{follow:!0}).node))return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&yt.nodePermissions(r,n)?-2:0},doDup:function(e,t,r){var n=yt.getStream(r);return n&&yt.close(n),yt.open(e,t,0,r,r).fd},doReadv:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=z[t+8*i>>2],s=z[t+(8*i+4)>>2],c=yt.read(e,Q,a,s,n);if(c<0)return-1;if(o+=c,c<s)break}return o},doWritev:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=z[t+8*i>>2],s=z[t+(8*i+4)>>2],c=yt.write(e,Q,a,s,n);if(c<0)return-1;o+=c}return o},varargs:void 0,get:function(){return C(null!=Et.varargs),Et.varargs+=4,z[Et.varargs-4>>2]},getStr:function(e){return N(e)},getStreamFromFD:function(e){var t=yt.getStream(e);if(!t)throw new yt.ErrnoError(8);return t},get64:function(e,t){return C(e>=0?0===t:-1===t),e}};function wt(e,t,r){Et.varargs=r;try{var n=Et.getStreamFromFD(e);switch(t){case 0:return(o=Et.get())<0?-28:yt.open(n.path,n.flags,0,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=Et.get();return n.flags|=o,0;case 12:return o=Et.get(),q[o+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return st(28),-1;default:return-28}}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ne(e),-e.errno}}function _t(e,t,r){Et.varargs=r;try{var n=Et.getStreamFromFD(e);switch(t){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Et.get();return z[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=Et.get(),yt.ioctl(n,t,o);case 21523:case 21524:return n.tty?0:-59;default:Ne("bad ioctl syscall "+t)}}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ne(e),-e.errno}}function Ot(e,t,r){Et.varargs=r;try{var n=Et.getStr(e),o=r?Et.get():0;return yt.open(n,t,o).fd}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ne(e),-e.errno}}function Tt(e,t){Ne("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Dt(e,t){Ne("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}var Pt={};function xt(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function St(e){return this.fromWireType(W[e>>2])}var Mt={},kt={},Rt={},At=48,Ft=57;function It(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=At&&t<=Ft?"_"+e:e}function Ct(e,t){return e=It(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function jt(e,t){var r=Ct(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var Lt=void 0;function Nt(e){throw new Lt(e)}function Ut(e,t,r){function n(t){var n=r(t);n.length!==e.length&&Nt("Mismatched type converter count");for(var o=0;o<e.length;++o)Wt(e[o],n[o])}e.forEach((function(e){Rt[e]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(e,t){kt.hasOwnProperty(e)?o[t]=kt[e]:(i.push(e),Mt.hasOwnProperty(e)||(Mt[e]=[]),Mt[e].push((function(){o[t]=kt[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Ht(e){var t=Pt[e];delete Pt[e];var r=t.rawConstructor,n=t.rawDestructor,o=t.fields;Ut([e],o.map((function(e){return e.getterReturnType})).concat(o.map((function(e){return e.setterArgumentType}))),(function(e){var i={};return o.forEach((function(t,r){var n=t.fieldName,a=e[r],s=t.getter,c=t.getterContext,u=e[r+o.length],l=t.setter,f=t.setterContext;i[n]={read:function(e){return a.fromWireType(s(c,e))},write:function(e,t){var r=[];l(f,e,u.toWireType(r,t)),xt(r)}}})),[{name:t.name,fromWireType:function(e){var t={};for(var r in i)t[r]=i[r].read(e);return n(e),t},toWireType:function(e,t){for(var o in i)if(!(o in t))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,t[o]);return null!==e&&e.push(n,a),a},argPackAdvance:8,readValueFromPointer:St,destructorFunction:n}]}))}function Bt(e,t,r,n,o){}function Xt(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}function Qt(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Gt=e}var Gt=void 0;function qt(e){for(var t="",r=e;G[r];)t+=Gt[G[r++]];return t}var Vt=void 0;function zt(e){throw new Vt(e)}function Wt(e,t,r){if(r=r||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||zt('type "'+n+'" must have a positive integer typeid pointer'),kt.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;zt("Cannot register type '"+n+"' twice")}if(kt[e]=t,delete Rt[e],Mt.hasOwnProperty(e)){var o=Mt[e];delete Mt[e],o.forEach((function(e){e()}))}}function $t(e,t,r,n,o){var i=Xt(r);Wt(e,{name:t=qt(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:o},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===r)n=Q;else if(2===r)n=q;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=z}return this.fromWireType(n[e>>i])},destructorFunction:null})}function Yt(e){if(!(this instanceof dr))return!1;if(!(e instanceof dr))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&r===o}function Kt(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function Zt(e){zt(e.$$.ptrType.registeredClass.name+" instance already deleted")}var Jt=!1;function er(e){}function tr(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function rr(e){e.count.value-=1,0===e.count.value&&tr(e)}function nr(e){return"undefined"==typeof FinalizationRegistry?(nr=function(e){return e},e):(Jt=new FinalizationRegistry((function(e){console.warn(e.leakWarning.stack.replace(/^Error: /,"")),rr(e.$$)})),er=function(e){Jt.unregister(e)},(nr=function(e){var t=e.$$,r={$$:t},n=t.ptrType.registeredClass;return r.leakWarning=new Error("Embind found a leaked C++ instance "+n.name+" <0x"+t.ptr.toString(16)+">.\nWe'll free it automatically in this case, but this functionality is not reliable across various environments.\nMake sure to invoke .delete() manually once you're done with the instance instead.\nOriginally allocated"),"captureStackTrace"in Error&&Error.captureStackTrace(r.leakWarning,n.constructor),Jt.register(e,r,e),e})(e))}function or(){if(this.$$.ptr||Zt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=nr(Object.create(Object.getPrototypeOf(this),{$$:{value:Kt(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function ir(){this.$$.ptr||Zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&zt("Object already scheduled for deletion"),er(this),rr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function ar(){return!this.$$.ptr}var sr=void 0,cr=[];function ur(){for(;cr.length;){var e=cr.pop();e.$$.deleteScheduled=!1,e.delete()}}function lr(){return this.$$.ptr||Zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&zt("Object already scheduled for deletion"),cr.push(this),1===cr.length&&sr&&sr(ur),this.$$.deleteScheduled=!0,this}function fr(){dr.prototype.isAliasOf=Yt,dr.prototype.clone=or,dr.prototype.delete=ir,dr.prototype.isDeleted=ar,dr.prototype.deleteLater=lr}function dr(){}var pr={};function gr(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||zt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function hr(e,t,r){o.hasOwnProperty(e)?((void 0===r||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[r])&&zt("Cannot register public name '"+e+"' twice"),gr(o,e,e),o.hasOwnProperty(r)&&zt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),o[e].overloadTable[r]=t):(o[e]=t,void 0!==r&&(o[e].numArguments=r))}function mr(e,t,r,n,o,i,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function vr(e,t,r){for(;t!==r;)t.upcast||zt("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function br(e,t){if(null===t)return this.isReference&&zt("null is not a valid "+this.name),0;t.$$||zt('Cannot pass "'+un(t)+'" as a '+this.name),t.$$.ptr||zt("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return vr(t.$$.ptr,r,this.registeredClass)}function yr(e,t){var r;if(null===t)return this.isReference&&zt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||zt('Cannot pass "'+un(t)+'" as a '+this.name),t.$$.ptr||zt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&zt("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(r=vr(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&zt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:zt("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var o=t.clone();r=this.rawShare(r,rn.toHandle((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:zt("Unsupporting sharing policy")}return r}function Er(e,t){if(null===t)return this.isReference&&zt("null is not a valid "+this.name),0;t.$$||zt('Cannot pass "'+un(t)+'" as a '+this.name),t.$$.ptr||zt("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&zt("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return vr(t.$$.ptr,r,this.registeredClass)}function wr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function _r(e){this.rawDestructor&&this.rawDestructor(e)}function Or(e){null!==e&&e.delete()}function Tr(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=Tr(e,t,r.baseClass);return null===n?null:r.downcast(n)}function Dr(){return Object.keys(Mr).length}function Pr(){var e=[];for(var t in Mr)Mr.hasOwnProperty(t)&&e.push(Mr[t]);return e}function xr(e){sr=e,cr.length&&sr&&sr(ur)}function Sr(){o.getInheritedInstanceCount=Dr,o.getLiveInheritedInstances=Pr,o.flushPendingDeletes=ur,o.setDelayFunction=xr}var Mr={};function kr(e,t){for(void 0===t&&zt("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function Rr(e,t){return t=kr(e,t),Mr[t]}function Ar(e,t){return t.ptrType&&t.ptr||Nt("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Nt("Both smartPtrType and smartPtr must be specified"),t.count={value:1},nr(Object.create(e,{$$:{value:t}}))}function Fr(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Rr(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?Ar(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ar(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=pr[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var c=Tr(t,this.registeredClass,i.registeredClass);return null===c?o.call(this):this.isSmartPointer?Ar(i.registeredClass.instancePrototype,{ptrType:i,ptr:c,smartPtrType:this,smartPtr:e}):Ar(i.registeredClass.instancePrototype,{ptrType:i,ptr:c})}function Ir(){Cr.prototype.getPointee=wr,Cr.prototype.destructor=_r,Cr.prototype.argPackAdvance=8,Cr.prototype.readValueFromPointer=St,Cr.prototype.deleteObject=Or,Cr.prototype.fromWireType=Fr}function Cr(e,t,r,n,o,i,a,s,c,u,l){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=u,this.rawDestructor=l,o||void 0!==t.baseClass?this.toWireType=yr:n?(this.toWireType=br,this.destructorFunction=null):(this.toWireType=Er,this.destructorFunction=null)}function jr(e,t,r){o.hasOwnProperty(e)||Nt("Replacing nonexistant public symbol"),void 0!==o[e].overloadTable&&void 0!==r?o[e].overloadTable[r]=t:(o[e]=t,o[e].argCount=r)}function Lr(e,t,r){C("dynCall_"+e in o,"bad function pointer type - no table for sig '"+e+"'"),r&&r.length?C(r.length===e.substring(1).replace(/j/g,"--").length):C(1==e.length);var n=o["dynCall_"+e];return r&&r.length?n.apply(null,[t].concat(r)):n.call(null,t)}function Nr(e,t,r){return e.includes("j")?Lr(e,t,r):(C(et(t),"missing table entry in dynCall: "+t),et(t).apply(null,r))}function Ur(e,t){C(e.includes("j"),"getDynCaller should only be called with i64 sigs");var r=[];return function(){r.length=arguments.length;for(var n=0;n<arguments.length;n++)r[n]=arguments[n];return Nr(e,t,r)}}function Hr(e,t){var r=(e=qt(e)).includes("j")?Ur(e,t):et(t);return"function"!=typeof r&&zt("unknown function pointer with signature "+e+": "+t),r}var Br=void 0;function Xr(e){var t=Td(e),r=qt(t);return _d(t),r}function Qr(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||kt[t]||(Rt[t]?Rt[t].forEach(e):(r.push(t),n[t]=!0))})),new Br(e+": "+r.map(Xr).join([", "]))}function Gr(e,t,r,n,o,i,a,s,c,u,l,f,d){l=qt(l),i=Hr(o,i),s&&(s=Hr(a,s)),u&&(u=Hr(c,u)),d=Hr(f,d);var p=It(l);hr(p,(function(){Qr("Cannot construct "+l+" due to unbound types",[n])})),Ut([e,t,r],n?[n]:[],(function(t){var r,o;t=t[0],o=n?(r=t.registeredClass).instancePrototype:dr.prototype;var a=Ct(p,(function(){if(Object.getPrototypeOf(this)!==c)throw new Vt("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new Vt(l+" has no accessible constructor");var e=f.constructor_body[arguments.length];if(void 0===e)throw new Vt("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),c=Object.create(o,{constructor:{value:a}});a.prototype=c;var f=new mr(l,a,c,d,r,i,s,u),g=new Cr(l,f,!0,!1,!1),h=new Cr(l+"*",f,!1,!1,!1),m=new Cr(l+" const*",f,!1,!0,!1);return pr[e]={pointerType:h,constPointerType:m},jr(p,a),[g,h,m]}))}function qr(e,t){for(var r=[],n=0;n<e;n++)r.push(z[(t>>2)+n]);return r}function Vr(e,t,r,n,o,i){C(t>0);var a=qr(t,r);o=Hr(n,o),Ut([],[e],(function(e){var r="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Vt("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=function(){Qr("Cannot construct "+e.name+" due to unbound types",a)},Ut([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Wr(r,n,null,o,i),[]})),[]}))}function zr(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=Ct(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,o=e.apply(n,t);return o instanceof Object?o:n}function Wr(e,t,r,n,o){var i=t.length;i<2&&zt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,s=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){s=!0;break}var u="void"!==t[0].name,l="",f="";for(c=0;c<i-2;++c)l+=(0!==c?", ":"")+"arg"+c,f+=(0!==c?", ":"")+"arg"+c+"Wired";var d="return function "+It(e)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(d+="var destructors = [];\n");var p=s?"destructors":"null",g=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],h=[zt,n,o,xt,t[0],t[1]];for(a&&(d+="var thisWired = classParam.toWireType("+p+", this);\n"),c=0;c<i-2;++c)d+="var arg"+c+"Wired = argType"+c+".toWireType("+p+", arg"+c+"); // "+t[c+2].name+"\n",g.push("argType"+c),h.push(t[c+2]);if(a&&(f="thisWired"+(f.length>0?", ":"")+f),d+=(u?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)d+="runDestructors(destructors);\n";else for(c=a?1:2;c<t.length;++c){var m=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(d+=m+"_dtor("+m+"); // "+t[c].name+"\n",g.push(m+"_dtor"),h.push(t[c].destructorFunction))}return u&&(d+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),d+="}\n",g.push(d),zr(Function,g).apply(null,h)}function $r(e,t,r,n,o,i,a,s){var c=qr(r,n);t=qt(t),i=Hr(o,i),Ut([],[e],(function(e){var n=(e=e[0]).name+"."+t;function o(){Qr("Cannot call "+n+" due to unbound types",c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);var u=e.registeredClass.instancePrototype,l=u[t];return void 0===l||void 0===l.overloadTable&&l.className!==e.name&&l.argCount===r-2?(o.argCount=r-2,o.className=e.name,u[t]=o):(gr(u,t,n),u[t].overloadTable[r-2]=o),Ut([],c,(function(o){var s=Wr(n,o,e,i,a);return void 0===u[t].overloadTable?(s.argCount=r-2,u[t]=s):u[t].overloadTable[r-2]=s,[]})),[]}))}var Yr=[],Kr=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Zr(e){e>4&&0==--Kr[e].refcount&&(Kr[e]=void 0,Yr.push(e))}function Jr(){for(var e=0,t=5;t<Kr.length;++t)void 0!==Kr[t]&&++e;return e}function en(){for(var e=5;e<Kr.length;++e)if(void 0!==Kr[e])return Kr[e];return null}function tn(){o.count_emval_handles=Jr,o.get_first_emval=en}var rn={toValue:function(e){return e||zt("Cannot use deleted val. handle = "+e),Kr[e].value},toHandle:function(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Yr.length?Yr.pop():Kr.length;return Kr[t]={refcount:1,value:e},t}}};function nn(e,t){Wt(e,{name:t=qt(t),fromWireType:function(e){var t=rn.toValue(e);return Zr(e),t},toWireType:function(e,t){return rn.toHandle(t)},argPackAdvance:8,readValueFromPointer:St,destructorFunction:null})}function on(e,t,r){switch(t){case 0:return function(e){var t=r?Q:G;return this.fromWireType(t[e])};case 1:return function(e){var t=r?q:V;return this.fromWireType(t[e>>1])};case 2:return function(e){var t=r?z:W;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function an(e,t,r,n){var o=Xt(r);function i(){}t=qt(t),i.values={},Wt(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:on(t,o,n),destructorFunction:null}),hr(t,i)}function sn(e,t){var r=kt[e];return void 0===r&&zt(t+" has unknown type "+Xr(e)),r}function cn(e,t,r){var n=sn(e,"enum");t=qt(t);var o=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Ct(n.name+"_"+t,(function(){}))}});o.values[r]=i,o[t]=i}function un(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function ln(e,t){switch(t){case 2:return function(e){return this.fromWireType($[e>>2])};case 3:return function(e){return this.fromWireType(Y[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function fn(e,t,r){var n=Xt(r);Wt(e,{name:t=qt(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+un(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:ln(t,n),destructorFunction:null})}function dn(e,t,r,n,o,i){var a=qr(t,r);e=qt(e),o=Hr(n,o),hr(e,(function(){Qr("Cannot call "+e+" due to unbound types",a)}),t-1),Ut([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return jr(e,Wr(e,n,null,o,i),t-1),[]}))}function pn(e,t,r){switch(t){case 0:return r?function(e){return Q[e]}:function(e){return G[e]};case 1:return r?function(e){return q[e>>1]}:function(e){return V[e>>1]};case 2:return r?function(e){return z[e>>2]}:function(e){return W[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function gn(e,t,r,n,o){t=qt(t),-1===o&&(o=4294967295);var i=Xt(r),a=function(e){return e};if(0===n){var s=32-8*r;a=function(e){return e<<s>>>s}}var c=t.includes("unsigned");Wt(e,{name:t,fromWireType:a,toWireType:function(e,r){if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError('Cannot convert "'+un(r)+'" to '+this.name);if(r<n||r>o)throw new TypeError('Passing a number "'+un(r)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!");return c?r>>>0:0|r},argPackAdvance:8,readValueFromPointer:pn(t,i,0!==n),destructorFunction:null})}function hn(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=W,r=t[e>>=2],o=t[e+1];return new n(X,o,r)}Wt(e,{name:r=qt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function mn(e,t,r,n,o,i,a,s,c,u,l,f){r=qt(r),i=Hr(o,i),s=Hr(a,s),u=Hr(c,u),f=Hr(l,f),Ut([e],[t],(function(e){return e=e[0],[new Cr(r,e.registeredClass,!1,!1,!0,e,n,i,s,u,f)]}))}function vn(e,t){var r="std::string"===(t=qt(t));Wt(e,{name:t,fromWireType:function(e){var t,n=W[e>>2];if(r)for(var o=e+4,i=0;i<=n;++i){var a=e+4+i;if(i==n||0==G[a]){var s=N(o,a-o);void 0===t?t=s:(t+=String.fromCharCode(0),t+=s),o=a+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(G[e+4+i]);t=c.join("")}return _d(e),t},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n="string"==typeof t;n||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||zt("Cannot pass non-string to std::string");var o=(r&&n?function(){return B(t)}:function(){return t.length})(),i=wd(4+o+1);if(W[i>>2]=o,r&&n)H(t,i+4,o+1);else if(n)for(var a=0;a<o;++a){var s=t.charCodeAt(a);s>255&&(_d(i),zt("String has UTF-16 code units that do not fit in 8 bits")),G[i+4+a]=s}else for(a=0;a<o;++a)G[i+4+a]=t[a];return null!==e&&e.push(_d,i),i},argPackAdvance:8,readValueFromPointer:St,destructorFunction:function(e){_d(e)}})}function bn(e,t,r){var n,o,i,a,s;r=qt(r),2===t?(n=Z,o=J,a=ee,i=function(){return V},s=1):4===t&&(n=te,o=re,a=ne,i=function(){return W},s=2),Wt(e,{name:r,fromWireType:function(e){for(var r,o=W[e>>2],a=i(),c=e+4,u=0;u<=o;++u){var l=e+4+u*t;if(u==o||0==a[l>>s]){var f=n(c,l-c);void 0===r?r=f:(r+=String.fromCharCode(0),r+=f),c=l+t}}return _d(e),r},toWireType:function(e,n){"string"!=typeof n&&zt("Cannot pass non-string to C++ string type "+r);var i=a(n),c=wd(4+i+t);return W[c>>2]=i>>s,o(n,c+4,i+t),null!==e&&e.push(_d,c),c},argPackAdvance:8,readValueFromPointer:St,destructorFunction:function(e){_d(e)}})}function yn(e,t,r,n,o,i){Pt[e]={name:qt(t),rawConstructor:Hr(r,n),rawDestructor:Hr(o,i),fields:[]}}function En(e,t,r,n,o,i,a,s,c,u){Pt[e].fields.push({fieldName:qt(t),getterReturnType:r,getter:Hr(n,o),getterContext:i,setterArgumentType:a,setter:Hr(s,c),setterContext:u})}function wn(e,t){Wt(e,{isVoid:!0,name:t=qt(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})}function _n(){throw"longjmp"}function On(e,t,r){e=rn.toValue(e),t=sn(t,"emval::as");var n=[],o=rn.toHandle(n);return z[r>>2]=o,t.toWireType(n,e)}function Tn(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=sn(z[(t>>2)+n],"parameter "+n);return r}function Dn(e,t,r,n){e=rn.toValue(e);for(var o=Tn(t,r),i=new Array(t),a=0;a<t;++a){var s=o[a];i[a]=s.readValueFromPointer(n),n+=s.argPackAdvance}var c=e.apply(void 0,i);return rn.toHandle(c)}function Pn(e){var t=[];return z[e>>2]=rn.toHandle(t),t}var xn={};function Sn(e){var t=xn[e];return void 0===t?qt(e):t}var Mn=[];function kn(e,t,r,n,o){return(e=Mn[e])(t=rn.toValue(t),r=Sn(r),Pn(n),o)}function Rn(e,t,r,n){(e=Mn[e])(t=rn.toValue(t),r=Sn(r),null,n)}function An(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Fn(e){return 0===e?rn.toHandle(An()):(e=Sn(e),rn.toHandle(An()[e]))}function In(e){var t=Mn.length;return Mn.push(e),t}function Cn(e,t){for(var r=Tn(e,t),n=r[0],o=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",i=["retType"],a=[n],s="",c=0;c<e-1;++c)s+=(0!==c?", ":"")+"arg"+c,i.push("argType"+c),a.push(r[1+c]);var u="return function "+It("methodCaller_"+o)+"(handle, name, destructors, args) {\n",l=0;for(c=0;c<e-1;++c)u+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(l?"+"+l:"")+");\n",l+=r[c+1].argPackAdvance;for(u+=" var rv = handle[name]("+s+");\n",c=0;c<e-1;++c)r[c+1].deleteObject&&(u+=" argType"+c+".deleteObject(arg"+c+");\n");return n.isVoid||(u+=" return retType.toWireType(destructors, rv);\n"),u+="};\n",i.push(u),In(zr(Function,i).apply(null,a))}function jn(e,t){return e=rn.toValue(e),t=rn.toValue(t),rn.toHandle(e[t])}function Ln(e){e>4&&(Kr[e].refcount+=1)}function Nn(e,t){return(e=rn.toValue(e))instanceof rn.toValue(t)}function Un(e){return"string"==typeof(e=rn.toValue(e))}function Hn(e){for(var t="",r=0;r<e;++r)t+=(0!==r?", ":"")+"arg"+r;var n="return function emval_allocator_"+e+"(constructor, argTypes, args) {\n";for(r=0;r<e;++r)n+="var argType"+r+" = requireRegisteredType(Module['HEAP32'][(argTypes >>> 2) + "+r+'], "parameter '+r+'");\nvar arg'+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\n";return n+="var obj = new constructor("+t+");\nreturn valueToHandle(obj);\n}\n",new Function("requireRegisteredType","Module","valueToHandle",n)(sn,o,rn.toHandle)}var Bn,Xn={};function Qn(e,t,r,n){e=rn.toValue(e);var o=Xn[t];return o||(o=Hn(t),Xn[t]=o),o(e,r,n)}function Gn(){return rn.toHandle([])}function qn(e){return rn.toHandle(Sn(e))}function Vn(){return rn.toHandle({})}function zn(e){xt(rn.toValue(e)),Zr(e)}function Wn(e,t,r){e=rn.toValue(e),t=rn.toValue(t),r=rn.toValue(r),e[t]=r}function $n(e,t){var r=(e=sn(e,"_emval_take_value")).readValueFromPointer(t);return rn.toHandle(r)}function Yn(e){throw rn.toValue(e)}function Kn(){Ne("native code called abort()")}Bn=function(){return performance.now()};var Zn=!0;function Jn(e,t){var r;if(0===e)r=Date.now();else{if(1!==e&&4!==e||!Zn)return st(28),-1;r=Bn()}return z[t>>2]=r/1e3|0,z[t+4>>2]=r%1e3*1e3*1e3|0,0}function eo(e,t){if(ao.mainLoop.timingMode=e,ao.mainLoop.timingValue=t,!ao.mainLoop.func)return T("emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up."),1;if(ao.mainLoop.running||(ao.mainLoop.running=!0),0==e)ao.mainLoop.scheduler=function(){var e=0|Math.max(0,ao.mainLoop.tickStartTime+t-Bn());setTimeout(ao.mainLoop.runner,e)},ao.mainLoop.method="timeout";else if(1==e)ao.mainLoop.scheduler=function(){ao.requestAnimationFrame(ao.mainLoop.runner)},ao.mainLoop.method="rAF";else if(2==e){if("undefined"==typeof setImmediate){var r=[],n="setimmediate";addEventListener("message",(function(e){e.data!==n&&e.data.target!==n||(e.stopPropagation(),r.shift()())}),!0),setImmediate=function(e){r.push(e),g?(void 0===o.setImmediates&&(o.setImmediates=[]),o.setImmediates.push(e),postMessage({target:n})):postMessage(n,"*")}}ao.mainLoop.scheduler=function(){setImmediate(ao.mainLoop.runner)},ao.mainLoop.method="immediate"}return 0}function to(e){Qd(e)}function ro(){if(!_e())try{to(F)}catch(e){tt(e)}}function no(e,t,r,n,i){C(!ao.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),ao.mainLoop.func=e,ao.mainLoop.arg=n;var a=ao.mainLoop.currentlyRunningMainloop;function s(){return!(a<ao.mainLoop.currentlyRunningMainloop&&(ro(),1))}if(ao.mainLoop.running=!1,ao.mainLoop.runner=function(){if(!I)if(ao.mainLoop.queue.length>0){var t=Date.now(),r=ao.mainLoop.queue.shift();if(r.func(r.arg),ao.mainLoop.remainingBlockers){var n=ao.mainLoop.remainingBlockers,i=n%1==0?n-1:Math.floor(n);r.counted?ao.mainLoop.remainingBlockers=i:(i+=.5,ao.mainLoop.remainingBlockers=(8*n+i)/9)}if(O('main loop blocker "'+r.name+'" took '+(Date.now()-t)+" ms"),ao.mainLoop.updateStatus(),!s())return;setTimeout(ao.mainLoop.runner,0)}else s()&&(ao.mainLoop.currentFrameNumber=ao.mainLoop.currentFrameNumber+1|0,1==ao.mainLoop.timingMode&&ao.mainLoop.timingValue>1&&ao.mainLoop.currentFrameNumber%ao.mainLoop.timingValue!=0?ao.mainLoop.scheduler():(0==ao.mainLoop.timingMode&&(ao.mainLoop.tickStartTime=Bn()),"timeout"===ao.mainLoop.method&&o.ctx&&(D("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),ao.mainLoop.method=""),ao.mainLoop.runIter(e),pe(),s()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),ao.mainLoop.scheduler())))},i||(t&&t>0?eo(0,1e3/t):eo(1,1),ao.mainLoop.scheduler()),r)throw"unwind"}function oo(e,t){if(Ee||I)T("user callback triggered after runtime exited or application aborted. Ignoring.");else if(t)e();else try{e()}catch(e){tt(e)}}function io(e,t){return setTimeout((function(){oo(e)}),t)}var ao={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){ao.mainLoop.scheduler=null,ao.mainLoop.currentlyRunningMainloop++},resume:function(){ao.mainLoop.currentlyRunningMainloop++;var e=ao.mainLoop.timingMode,t=ao.mainLoop.timingValue,r=ao.mainLoop.func;ao.mainLoop.func=null,no(r,0,!1,ao.mainLoop.arg,!0),eo(e,t),ao.mainLoop.scheduler()},updateStatus:function(){if(o.setStatus){var e=o.statusMessage||"Please wait...",t=ao.mainLoop.remainingBlockers,r=ao.mainLoop.expectedBlockers;t?t<r?o.setStatus(e+" ("+(r-t)+"/"+r+")"):o.setStatus(e):o.setStatus("")}},runIter:function(e){if(!I){if(o.preMainLoop&&!1===o.preMainLoop())return;oo(e),o.postMainLoop&&o.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(o.preloadPlugins||(o.preloadPlugins=[]),!ao.initted){ao.initted=!0;try{new Blob,ao.hasBlobConstructor=!0}catch(e){ao.hasBlobConstructor=!1,O("warning: no blob constructor, cannot create blobs with mimetypes")}ao.BlobBuilder="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:ao.hasBlobConstructor?null:O("warning: no BlobBuilder"),ao.URLObject="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,o.noImageDecoding||void 0!==ao.URLObject||(O("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),o.noImageDecoding=!0);var e={canHandle:function(e){return!o.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},handle:function(e,t,r,n){var i=null;if(ao.hasBlobConstructor)try{(i=new Blob([e],{type:ao.getMimetype(t)})).size!==e.length&&(i=new Blob([new Uint8Array(e).buffer],{type:ao.getMimetype(t)}))}catch(e){D("Blob constructor present but fails: "+e+"; falling back to blob builder")}if(!i){var a=new ao.BlobBuilder;a.append(new Uint8Array(e).buffer),i=a.getBlob()}var s=ao.URLObject.createObjectURL(i);C("string"==typeof s,"createObjectURL must return a url as a string");var c=new Image;c.onload=function(){C(c.complete,"Image "+t+" could not be decoded");var n=document.createElement("canvas");n.width=c.width,n.height=c.height,n.getContext("2d").drawImage(c,0,0),o.preloadedImages[t]=n,ao.URLObject.revokeObjectURL(s),r&&r(e)},c.onerror=function(e){O("Image "+s+" could not be decoded"),n&&n()},c.src=s}};o.preloadPlugins.push(e);var t={canHandle:function(e){return!o.noAudioDecoding&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(e,t,r,n){var i=!1;function a(n){i||(i=!0,o.preloadedAudios[t]=n,r&&r(e))}function s(){i||(i=!0,o.preloadedAudios[t]=new Audio,n&&n())}if(!ao.hasBlobConstructor)return s();try{var c=new Blob([e],{type:ao.getMimetype(t)})}catch(e){return s()}var u=ao.URLObject.createObjectURL(c);C("string"==typeof u,"createObjectURL must return a url as a string");var l=new Audio;l.addEventListener("canplaythrough",(function(){a(l)}),!1),l.onerror=function(r){i||(O("warning: browser could not fully decode audio "+t+", trying slower base64 approach"),l.src="data:audio/x-"+t.substr(-3)+";base64,"+function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="",n=0,o=0,i=0;i<e.length;i++)for(n=n<<8|e[i],o+=8;o>=6;){var a=n>>o-6&63;o-=6,r+=t[a]}return 2==o?(r+=t[(3&n)<<4],r+="=="):4==o&&(r+=t[(15&n)<<2],r+="="),r}(e),a(l))},l.src=u,io((function(){a(l)}),1e4)}};o.preloadPlugins.push(t);var r=o.canvas;r&&(r.requestPointerLock=r.requestPointerLock||r.mozRequestPointerLock||r.webkitRequestPointerLock||r.msRequestPointerLock||function(){},r.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},r.exitPointerLock=r.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",n,!1),document.addEventListener("mozpointerlockchange",n,!1),document.addEventListener("webkitpointerlockchange",n,!1),document.addEventListener("mspointerlockchange",n,!1),o.elementPointerLock&&r.addEventListener("click",(function(e){!ao.pointerLock&&o.canvas.requestPointerLock&&(o.canvas.requestPointerLock(),e.preventDefault())}),!1))}function n(){ao.pointerLock=document.pointerLockElement===o.canvas||document.mozPointerLockElement===o.canvas||document.webkitPointerLockElement===o.canvas||document.msPointerLockElement===o.canvas}},createContext:function(e,t,r,n){if(t&&o.ctx&&e==o.canvas)return o.ctx;var i,a;if(t){var s={antialias:!1,alpha:!1,majorVersion:"undefined"!=typeof WebGL2RenderingContext?2:1};if(n)for(var c in n)s[c]=n[c];void 0!==mo&&(a=mo.createContext(e,s))&&(i=mo.getContext(a).GLctx)}else i=e.getContext("2d");return i?(r&&(t||C(void 0===fd,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),o.ctx=i,t&&mo.makeContextCurrent(a),o.useWebGL=t,ao.moduleContextCreatedCallbacks.forEach((function(e){e()})),ao.init()),i):null},destroyContext:function(e,t,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(e,t){ao.lockPointer=e,ao.resizeCanvas=t,void 0===ao.lockPointer&&(ao.lockPointer=!0),void 0===ao.resizeCanvas&&(ao.resizeCanvas=!1);var r=o.canvas;function n(){ao.isFullscreen=!1;var e=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(r.exitFullscreen=ao.exitFullscreen,ao.lockPointer&&r.requestPointerLock(),ao.isFullscreen=!0,ao.resizeCanvas?ao.setFullscreenCanvasSize():ao.updateCanvasDimensions(r)):(e.parentNode.insertBefore(r,e),e.parentNode.removeChild(e),ao.resizeCanvas?ao.setWindowedCanvasSize():ao.updateCanvasDimensions(r)),o.onFullScreen&&o.onFullScreen(ao.isFullscreen),o.onFullscreen&&o.onFullscreen(ao.isFullscreen)}ao.fullscreenHandlersInstalled||(ao.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",n,!1),document.addEventListener("mozfullscreenchange",n,!1),document.addEventListener("webkitfullscreenchange",n,!1),document.addEventListener("MSFullscreenChange",n,!1));var i=document.createElement("div");r.parentNode.insertBefore(i,r),i.appendChild(r),i.requestFullscreen=i.requestFullscreen||i.mozRequestFullScreen||i.msRequestFullscreen||(i.webkitRequestFullscreen?function(){i.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(i.webkitRequestFullScreen?function(){i.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),i.requestFullscreen()},requestFullScreen:function(){Ne("Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)")},exitFullscreen:function(){return!!ao.isFullscreen&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){}).apply(document,[]),!0)},nextRAF:0,fakeRequestAnimationFrame:function(e){var t=Date.now();if(0===ao.nextRAF)ao.nextRAF=t+1e3/60;else for(;t+2>=ao.nextRAF;)ao.nextRAF+=1e3/60;var r=Math.max(ao.nextRAF-t,0);setTimeout(e,r)},requestAnimationFrame:function(e){"function"!=typeof requestAnimationFrame?(0,ao.fakeRequestAnimationFrame)(e):requestAnimationFrame(e)},safeSetTimeout:function(e){return io(e)},safeRequestAnimationFrame:function(e){return ao.requestAnimationFrame((function(){oo(e)}))},getMimetype:function(e){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]},getUserMedia:function(e){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(e)},getMovementX:function(e){return e.movementX||e.mozMovementX||e.webkitMovementX||0},getMovementY:function(e){return e.movementY||e.mozMovementY||e.webkitMovementY||0},getMouseWheelDelta:function(e){var t=0;switch(e.type){case"DOMMouseScroll":t=e.detail/3;break;case"mousewheel":t=e.wheelDelta/120;break;case"wheel":switch(t=e.deltaY,e.deltaMode){case 0:t/=100;break;case 1:t/=3;break;case 2:t*=80;break;default:throw"unrecognized mouse wheel delta mode: "+e.deltaMode}break;default:throw"unrecognized mouse wheel event: "+e.type}return t},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(e){if(ao.pointerLock)"mousemove"!=e.type&&"mozMovementX"in e?ao.mouseMovementX=ao.mouseMovementY=0:(ao.mouseMovementX=ao.getMovementX(e),ao.mouseMovementY=ao.getMovementY(e)),"undefined"!=typeof SDL?(ao.mouseX=SDL.mouseX+ao.mouseMovementX,ao.mouseY=SDL.mouseY+ao.mouseMovementY):(ao.mouseX+=ao.mouseMovementX,ao.mouseY+=ao.mouseMovementY);else{var t=o.canvas.getBoundingClientRect(),r=o.canvas.width,n=o.canvas.height,i=void 0!==window.scrollX?window.scrollX:window.pageXOffset,a=void 0!==window.scrollY?window.scrollY:window.pageYOffset;if(C(void 0!==i&&void 0!==a,"Unable to retrieve scroll position, mouse positions likely broken."),"touchstart"===e.type||"touchend"===e.type||"touchmove"===e.type){var s=e.touch;if(void 0===s)return;var c=s.pageX-(i+t.left),u=s.pageY-(a+t.top),l={x:c*=r/t.width,y:u*=n/t.height};if("touchstart"===e.type)ao.lastTouches[s.identifier]=l,ao.touches[s.identifier]=l;else if("touchend"===e.type||"touchmove"===e.type){var f=ao.touches[s.identifier];f||(f=l),ao.lastTouches[s.identifier]=f,ao.touches[s.identifier]=l}return}var d=e.pageX-(i+t.left),p=e.pageY-(a+t.top);d*=r/t.width,p*=n/t.height,ao.mouseMovementX=d-ao.mouseX,ao.mouseMovementY=p-ao.mouseY,ao.mouseX=d,ao.mouseY=p}},resizeListeners:[],updateResizeListeners:function(){var e=o.canvas;ao.resizeListeners.forEach((function(t){t(e.width,e.height)}))},setCanvasSize:function(e,t,r){var n=o.canvas;ao.updateCanvasDimensions(n,e,t),r||ao.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if("undefined"!=typeof SDL){var e=W[SDL.screen>>2];e|=8388608,z[SDL.screen>>2]=e}ao.updateCanvasDimensions(o.canvas),ao.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var e=W[SDL.screen>>2];e&=-8388609,z[SDL.screen>>2]=e}ao.updateCanvasDimensions(o.canvas),ao.updateResizeListeners()},updateCanvasDimensions:function(e,t,r){t&&r?(e.widthNative=t,e.heightNative=r):(t=e.widthNative,r=e.heightNative);var n=t,i=r;if(o.forcedAspectRatio&&o.forcedAspectRatio>0&&(n/i<o.forcedAspectRatio?n=Math.round(i*o.forcedAspectRatio):i=Math.round(n/o.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e.parentNode&&"undefined"!=typeof screen){var a=Math.min(screen.width/n,screen.height/i);n=Math.round(n*a),i=Math.round(i*a)}ao.resizeCanvas?(e.width!=n&&(e.width=n),e.height!=i&&(e.height=i),void 0!==e.style&&(e.style.removeProperty("width"),e.style.removeProperty("height"))):(e.width!=t&&(e.width=t),e.height!=r&&(e.height=r),void 0!==e.style&&(n!=t||i!=r?(e.style.setProperty("width",n+"px","important"),e.style.setProperty("height",i+"px","important")):(e.style.removeProperty("width"),e.style.removeProperty("height"))))}},so={errorCode:12288,defaultDisplayInitialized:!1,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:!1,depth:!1,stencil:!1,antialias:!1},stringCache:{},setErrorCode:function(e){so.errorCode=e},chooseConfig:function(e,t,r,n,o){if(62e3!=e)return so.setErrorCode(12296),0;if(t)for(;;){var i=z[t>>2];if(12321==i){var a=z[t+4>>2];so.contextAttributes.alpha=a>0}else if(12325==i){var s=z[t+4>>2];so.contextAttributes.depth=s>0}else if(12326==i){var c=z[t+4>>2];so.contextAttributes.stencil=c>0}else if(12337==i){var u=z[t+4>>2];so.contextAttributes.antialias=u>0}else if(12338==i)u=z[t+4>>2],so.contextAttributes.antialias=1==u;else if(12544==i){var l=z[t+4>>2];so.contextAttributes.lowLatency=12547!=l}else if(12344==i)break;t+=8}return r&&n||o?(o&&(z[o>>2]=1),r&&n>0&&(z[r>>2]=62002),so.setErrorCode(12288),1):(so.setErrorCode(12300),0)}};function co(e,t,r,n,o){return so.chooseConfig(e,t,r,n,o)}function uo(e){var t=e.getExtension("ANGLE_instanced_arrays");if(t)return e.vertexAttribDivisor=function(e,r){t.vertexAttribDivisorANGLE(e,r)},e.drawArraysInstanced=function(e,r,n,o){t.drawArraysInstancedANGLE(e,r,n,o)},e.drawElementsInstanced=function(e,r,n,o,i){t.drawElementsInstancedANGLE(e,r,n,o,i)},1}function lo(e){var t=e.getExtension("OES_vertex_array_object");if(t)return e.createVertexArray=function(){return t.createVertexArrayOES()},e.deleteVertexArray=function(e){t.deleteVertexArrayOES(e)},e.bindVertexArray=function(e){t.bindVertexArrayOES(e)},e.isVertexArray=function(e){return t.isVertexArrayOES(e)},1}function fo(e){var t=e.getExtension("WEBGL_draw_buffers");if(t)return e.drawBuffers=function(e,r){t.drawBuffersWEBGL(e,r)},1}function po(e){return!!(e.dibvbi=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function go(e){return!!(e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))}function ho(e){return!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw"))}var mo={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function(e){mo.lastError||(mo.lastError=e)},getNewId:function(e){for(var t=mo.counter++,r=e.length;r<t;r++)e[r]=null;return t},getSource:function(e,t,r,n){for(var o="",i=0;i<t;++i){var a=n?z[n+4*i>>2]:-1;o+=N(z[r+4*i>>2],a<0?void 0:a)}return o},createContext:function(e,t){e.getContextSafariWebGL2Fixed||(e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=function(t,r){var n=e.getContextSafariWebGL2Fixed(t,r);return"webgl"==t==n instanceof WebGLRenderingContext?n:null});var r=t.majorVersion>1?e.getContext("webgl2",t):e.getContext("webgl",t);return r?mo.registerContext(r,t):0},registerContext:function(e,t){var r=mo.getNewId(mo.contexts),n={handle:r,attributes:t,version:t.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),mo.contexts[r]=n,(void 0===t.enableExtensionsByDefault||t.enableExtensionsByDefault)&&mo.initExtensions(n),r},makeContextCurrent:function(e){return mo.currentContext=mo.contexts[e],o.ctx=fd=mo.currentContext&&mo.currentContext.GLctx,!(e&&!fd)},getContext:function(e){return mo.contexts[e]},deleteContext:function(e){mo.currentContext===mo.contexts[e]&&(mo.currentContext=null),"object"==typeof vl&&vl.removeAllHandlersOnTarget(mo.contexts[e].GLctx.canvas),mo.contexts[e]&&mo.contexts[e].GLctx.canvas&&(mo.contexts[e].GLctx.canvas.GLctxObject=void 0),mo.contexts[e]=null},initExtensions:function(e){if(e||(e=mo.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var t=e.GLctx;uo(t),lo(t),fo(t),po(t),go(t),e.version>=2&&(t.disjointTimerQueryExt=t.getExtension("EXT_disjoint_timer_query_webgl2")),(e.version<2||!t.disjointTimerQueryExt)&&(t.disjointTimerQueryExt=t.getExtension("EXT_disjoint_timer_query")),ho(t),(t.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}};function vo(e,t,r,n){if(62e3!=e)return so.setErrorCode(12296),0;for(var i=1;;){var a=z[n>>2];if(12440!=a){if(12344==a)break;return so.setErrorCode(12292),0}i=z[n+4>>2],n+=8}return i<2||i>3?(so.setErrorCode(12293),0):(so.contextAttributes.majorVersion=i-1,so.contextAttributes.minorVersion=0,so.context=mo.createContext(o.canvas,so.contextAttributes),0!=so.context?(so.setErrorCode(12288),mo.makeContextCurrent(so.context),o.useWebGL=!0,ao.moduleContextCreatedCallbacks.forEach((function(e){e()})),mo.makeContextCurrent(null),62004):(so.setErrorCode(12297),0))}function bo(e,t,r,n){return 62e3!=e?(so.setErrorCode(12296),0):62002!=t?(so.setErrorCode(12293),0):(so.setErrorCode(12288),62006)}function yo(e,t){return 62e3!=e?(so.setErrorCode(12296),0):62004!=t?(so.setErrorCode(12294),0):(mo.deleteContext(so.context),so.setErrorCode(12288),so.currentContext==t&&(so.currentContext=0),1)}function Eo(e,t){return 62e3!=e?(so.setErrorCode(12296),0):62006!=t?(so.setErrorCode(12301),1):(so.currentReadSurface==t&&(so.currentReadSurface=0),so.currentDrawSurface==t&&(so.currentDrawSurface=0),so.setErrorCode(12288),1)}function wo(e,t,r,n){if(62e3!=e)return so.setErrorCode(12296),0;if(62002!=t)return so.setErrorCode(12293),0;if(!n)return so.setErrorCode(12300),0;switch(so.setErrorCode(12288),r){case 12320:return z[n>>2]=so.contextAttributes.alpha?32:24,1;case 12321:return z[n>>2]=so.contextAttributes.alpha?8:0,1;case 12322:case 12323:case 12324:return z[n>>2]=8,1;case 12325:return z[n>>2]=so.contextAttributes.depth?24:0,1;case 12326:return z[n>>2]=so.contextAttributes.stencil?8:0,1;case 12327:return z[n>>2]=12344,1;case 12328:return z[n>>2]=62002,1;case 12329:return z[n>>2]=0,1;case 12330:return z[n>>2]=4096,1;case 12331:return z[n>>2]=16777216,1;case 12332:return z[n>>2]=4096,1;case 12333:case 12334:return z[n>>2]=0,1;case 12335:return z[n>>2]=12344,1;case 12337:return z[n>>2]=so.contextAttributes.antialias?4:0,1;case 12338:return z[n>>2]=so.contextAttributes.antialias?1:0,1;case 12339:return z[n>>2]=4,1;case 12340:return z[n>>2]=12344,1;case 12341:case 12342:case 12343:return z[n>>2]=-1,1;case 12345:case 12346:case 12347:return z[n>>2]=0,1;case 12348:return z[n>>2]=1,1;case 12349:case 12350:return z[n>>2]=0,1;case 12351:return z[n>>2]=12430,1;case 12352:return z[n>>2]=4,1;case 12354:return z[n>>2]=0,1;default:return so.setErrorCode(12292),0}}function _o(e){return so.setErrorCode(12288),62e3}function Oo(){return so.errorCode}function To(e,t,r){return 62e3==e?(t&&(z[t>>2]=1),r&&(z[r>>2]=4),so.defaultDisplayInitialized=!0,so.setErrorCode(12288),1):(so.setErrorCode(12296),0)}function Do(e,t,r,n){return 62e3!=e?(so.setErrorCode(12296),0):0!=n&&62004!=n?(so.setErrorCode(12294),0):0!=r&&62006!=r||0!=t&&62006!=t?(so.setErrorCode(12301),0):(mo.makeContextCurrent(n?so.context:null),so.currentContext=n,so.currentDrawSurface=t,so.currentReadSurface=r,so.setErrorCode(12288),1)}function Po(){if(so.defaultDisplayInitialized)if(o.ctx){if(!o.ctx.isContextLost())return so.setErrorCode(12288),1;so.setErrorCode(12302)}else so.setErrorCode(12290);else so.setErrorCode(12289);return 0}function xo(e){return 62e3!=e?(so.setErrorCode(12296),0):(so.currentContext=0,so.currentReadSurface=0,so.currentDrawSurface=0,so.defaultDisplayInitialized=!1,so.setErrorCode(12288),1)}function So(e){C("number"==typeof e),T(N(e))}function Mo(e){C("number"==typeof e),O(N(e))}function ko(e){C("number"==typeof e),console.warn(N(e))}function Ro(){}function Ao(){return 2147483648}function Fo(e){fd.activeTexture(e)}function Io(e,t){fd.attachShader(mo.programs[e],mo.shaders[t])}function Co(e,t){fd.beginQuery(e,mo.queries[t])}function jo(e,t){fd.disjointTimerQueryExt.beginQueryEXT(e,mo.queries[t])}function Lo(e){fd.beginTransformFeedback(e)}function No(e,t,r){fd.bindAttribLocation(mo.programs[e],t,N(r))}function Uo(e,t){35051==e?fd.currentPixelPackBufferBinding=t:35052==e&&(fd.currentPixelUnpackBufferBinding=t),fd.bindBuffer(e,mo.buffers[t])}function Ho(e,t,r){fd.bindBufferBase(e,t,mo.buffers[r])}function Bo(e,t,r,n,o){fd.bindBufferRange(e,t,mo.buffers[r],n,o)}function Xo(e,t){fd.bindFramebuffer(e,mo.framebuffers[t])}function Qo(e,t){fd.bindRenderbuffer(e,mo.renderbuffers[t])}function Go(e,t){fd.bindSampler(e,mo.samplers[t])}function qo(e,t){fd.bindTexture(e,mo.textures[t])}function Vo(e,t){fd.bindTransformFeedback(e,mo.transformFeedbacks[t])}function zo(e){fd.bindVertexArray(mo.vaos[e])}function Wo(e){fd.bindVertexArray(mo.vaos[e])}function $o(e,t,r,n){fd.blendColor(e,t,r,n)}function Yo(e){fd.blendEquation(e)}function Ko(e,t){fd.blendEquationSeparate(e,t)}function Zo(e,t){fd.blendFunc(e,t)}function Jo(e,t,r,n){fd.blendFuncSeparate(e,t,r,n)}function ei(e,t,r,n,o,i,a,s,c,u){fd.blitFramebuffer(e,t,r,n,o,i,a,s,c,u)}function ti(e,t,r,n){mo.currentContext.version>=2?r?fd.bufferData(e,G,n,r,t):fd.bufferData(e,t,n):fd.bufferData(e,r?G.subarray(r,r+t):t,n)}function ri(e,t,r,n){mo.currentContext.version>=2?fd.bufferSubData(e,t,G,n,r):fd.bufferSubData(e,t,G.subarray(n,n+r))}function ni(e){return fd.checkFramebufferStatus(e)}function oi(e){fd.clear(e)}function ii(e,t,r,n){fd.clearBufferfi(e,t,r,n)}function ai(e,t,r){fd.clearBufferfv(e,t,$,r>>2)}function si(e,t,r){fd.clearBufferiv(e,t,z,r>>2)}function ci(e,t,r){fd.clearBufferuiv(e,t,W,r>>2)}function ui(e,t,r,n){fd.clearColor(e,t,r,n)}function li(e){fd.clearDepth(e)}function fi(e){fd.clearStencil(e)}function di(e,t){return C(t===(0|t)),(e>>>0)+4294967296*t}function pi(e,t,r,n){return fd.clientWaitSync(mo.syncs[e],t,di(r,n))}function gi(e,t,r,n){fd.colorMask(!!e,!!t,!!r,!!n)}function hi(e){fd.compileShader(mo.shaders[e])}function mi(e,t,r,n,o,i,a,s){mo.currentContext.version>=2?fd.currentPixelUnpackBufferBinding?fd.compressedTexImage2D(e,t,r,n,o,i,a,s):fd.compressedTexImage2D(e,t,r,n,o,i,G,s,a):fd.compressedTexImage2D(e,t,r,n,o,i,s?G.subarray(s,s+a):null)}function vi(e,t,r,n,o,i,a,s,c){fd.currentPixelUnpackBufferBinding?fd.compressedTexImage3D(e,t,r,n,o,i,a,s,c):fd.compressedTexImage3D(e,t,r,n,o,i,a,G,c,s)}function bi(e,t,r,n,o,i,a,s,c){mo.currentContext.version>=2?fd.currentPixelUnpackBufferBinding?fd.compressedTexSubImage2D(e,t,r,n,o,i,a,s,c):fd.compressedTexSubImage2D(e,t,r,n,o,i,a,G,c,s):fd.compressedTexSubImage2D(e,t,r,n,o,i,a,c?G.subarray(c,c+s):null)}function yi(e,t,r,n,o,i,a,s,c,u,l){fd.currentPixelUnpackBufferBinding?fd.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,u,l):fd.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,G,l,u)}function Ei(e,t,r,n,o){fd.copyBufferSubData(e,t,r,n,o)}function wi(e,t,r,n,o,i,a,s){fd.copyTexImage2D(e,t,r,n,o,i,a,s)}function _i(e,t,r,n,o,i,a,s){fd.copyTexSubImage2D(e,t,r,n,o,i,a,s)}function Oi(e,t,r,n,o,i,a,s,c){fd.copyTexSubImage3D(e,t,r,n,o,i,a,s,c)}function Ti(){var e=mo.getNewId(mo.programs),t=fd.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,mo.programs[e]=t,e}function Di(e){var t=mo.getNewId(mo.shaders);return mo.shaders[t]=fd.createShader(e),t}function Pi(e){fd.cullFace(e)}function xi(e,t){for(var r=0;r<e;r++){var n=z[t+4*r>>2],o=mo.buffers[n];o&&(fd.deleteBuffer(o),o.name=0,mo.buffers[n]=null,n==fd.currentPixelPackBufferBinding&&(fd.currentPixelPackBufferBinding=0),n==fd.currentPixelUnpackBufferBinding&&(fd.currentPixelUnpackBufferBinding=0))}}function Si(e,t){for(var r=0;r<e;++r){var n=z[t+4*r>>2],o=mo.framebuffers[n];o&&(fd.deleteFramebuffer(o),o.name=0,mo.framebuffers[n]=null)}}function Mi(e){if(e){var t=mo.programs[e];t?(fd.deleteProgram(t),t.name=0,mo.programs[e]=null):mo.recordError(1281)}}function ki(e,t){for(var r=0;r<e;r++){var n=z[t+4*r>>2],o=mo.queries[n];o&&(fd.deleteQuery(o),mo.queries[n]=null)}}function Ri(e,t){for(var r=0;r<e;r++){var n=z[t+4*r>>2],o=mo.queries[n];o&&(fd.disjointTimerQueryExt.deleteQueryEXT(o),mo.queries[n]=null)}}function Ai(e,t){for(var r=0;r<e;r++){var n=z[t+4*r>>2],o=mo.renderbuffers[n];o&&(fd.deleteRenderbuffer(o),o.name=0,mo.renderbuffers[n]=null)}}function Fi(e,t){for(var r=0;r<e;r++){var n=z[t+4*r>>2],o=mo.samplers[n];o&&(fd.deleteSampler(o),o.name=0,mo.samplers[n]=null)}}function Ii(e){if(e){var t=mo.shaders[e];t?(fd.deleteShader(t),mo.shaders[e]=null):mo.recordError(1281)}}function Ci(e){if(e){var t=mo.syncs[e];t?(fd.deleteSync(t),t.name=0,mo.syncs[e]=null):mo.recordError(1281)}}function ji(e,t){for(var r=0;r<e;r++){var n=z[t+4*r>>2],o=mo.textures[n];o&&(fd.deleteTexture(o),o.name=0,mo.textures[n]=null)}}function Li(e,t){for(var r=0;r<e;r++){var n=z[t+4*r>>2],o=mo.transformFeedbacks[n];o&&(fd.deleteTransformFeedback(o),o.name=0,mo.transformFeedbacks[n]=null)}}function Ni(e,t){for(var r=0;r<e;r++){var n=z[t+4*r>>2];fd.deleteVertexArray(mo.vaos[n]),mo.vaos[n]=null}}function Ui(e,t){for(var r=0;r<e;r++){var n=z[t+4*r>>2];fd.deleteVertexArray(mo.vaos[n]),mo.vaos[n]=null}}function Hi(e){fd.depthFunc(e)}function Bi(e){fd.depthMask(!!e)}function Xi(e,t){fd.depthRange(e,t)}function Qi(e,t){fd.detachShader(mo.programs[e],mo.shaders[t])}function Gi(e){fd.disable(e)}function qi(e){fd.disableVertexAttribArray(e)}function Vi(e,t,r){fd.drawArrays(e,t,r)}function zi(e,t,r,n){fd.drawArraysInstanced(e,t,r,n)}function Wi(e,t,r,n){fd.drawArraysInstanced(e,t,r,n)}function $i(e,t,r,n){fd.drawArraysInstanced(e,t,r,n)}function Yi(e,t,r,n){fd.drawArraysInstanced(e,t,r,n)}function Ki(e,t,r,n){fd.drawArraysInstanced(e,t,r,n)}var Zi=[];function Ji(e,t){for(var r=Zi[e],n=0;n<e;n++)r[n]=z[t+4*n>>2];fd.drawBuffers(r)}function ea(e,t){for(var r=Zi[e],n=0;n<e;n++)r[n]=z[t+4*n>>2];fd.drawBuffers(r)}function ta(e,t){for(var r=Zi[e],n=0;n<e;n++)r[n]=z[t+4*n>>2];fd.drawBuffers(r)}function ra(e,t,r,n){fd.drawElements(e,t,r,n)}function na(e,t,r,n,o){fd.drawElementsInstanced(e,t,r,n,o)}function oa(e,t,r,n,o){fd.drawElementsInstanced(e,t,r,n,o)}function ia(e,t,r,n,o){fd.drawElementsInstanced(e,t,r,n,o)}function aa(e,t,r,n,o){fd.drawElementsInstanced(e,t,r,n,o)}function sa(e,t,r,n,o){fd.drawElementsInstanced(e,t,r,n,o)}function ca(e,t,r,n){fd.drawElements(e,t,r,n)}function ua(e,t,r,n,o,i){ca(e,n,o,i)}function la(e){fd.enable(e)}function fa(e){fd.enableVertexAttribArray(e)}function da(e){fd.endQuery(e)}function pa(e){fd.disjointTimerQueryExt.endQueryEXT(e)}function ga(){fd.endTransformFeedback()}function ha(e,t){var r=fd.fenceSync(e,t);if(r){var n=mo.getNewId(mo.syncs);return r.name=n,mo.syncs[n]=r,n}return 0}function ma(){fd.finish()}function va(){fd.flush()}function ba(e,t,r,n){fd.framebufferRenderbuffer(e,t,r,mo.renderbuffers[n])}function ya(e,t,r,n,o){fd.framebufferTexture2D(e,t,r,mo.textures[n],o)}function Ea(e,t,r,n,o){fd.framebufferTextureLayer(e,t,mo.textures[r],n,o)}function wa(e){fd.frontFace(e)}function _a(e,t,r,n){for(var o=0;o<e;o++){var i=fd[r](),a=i&&mo.getNewId(n);i?(i.name=a,n[a]=i):mo.recordError(1282),z[t+4*o>>2]=a}}function Oa(e,t){_a(e,t,"createBuffer",mo.buffers)}function Ta(e,t){_a(e,t,"createFramebuffer",mo.framebuffers)}function Da(e,t){_a(e,t,"createQuery",mo.queries)}function Pa(e,t){for(var r=0;r<e;r++){var n=fd.disjointTimerQueryExt.createQueryEXT();if(!n){for(mo.recordError(1282);r<e;)z[t+4*r++>>2]=0;return}var o=mo.getNewId(mo.queries);n.name=o,mo.queries[o]=n,z[t+4*r>>2]=o}}function xa(e,t){_a(e,t,"createRenderbuffer",mo.renderbuffers)}function Sa(e,t){_a(e,t,"createSampler",mo.samplers)}function Ma(e,t){_a(e,t,"createTexture",mo.textures)}function ka(e,t){_a(e,t,"createTransformFeedback",mo.transformFeedbacks)}function Ra(e,t){_a(e,t,"createVertexArray",mo.vaos)}function Aa(e,t){_a(e,t,"createVertexArray",mo.vaos)}function Fa(e){fd.generateMipmap(e)}function Ia(e,t,r,n,o,i,a,s){t=mo.programs[t];var c=fd[e](t,r);if(c){var u=s&&H(c.name,s,n);o&&(z[o>>2]=u),i&&(z[i>>2]=c.size),a&&(z[a>>2]=c.type)}}function Ca(e,t,r,n,o,i,a){Ia("getActiveAttrib",e,t,r,n,o,i,a)}function ja(e,t,r,n,o,i,a){Ia("getActiveUniform",e,t,r,n,o,i,a)}function La(e,t,r,n,o){e=mo.programs[e];var i=fd.getActiveUniformBlockName(e,t);if(i)if(o&&r>0){var a=H(i,o,r);n&&(z[n>>2]=a)}else n&&(z[n>>2]=0)}function Na(e,t,r,n){if(n)if(e=mo.programs[e],35393!=r){var o=fd.getActiveUniformBlockParameter(e,t,r);if(null!==o)if(35395==r)for(var i=0;i<o.length;i++)z[n+4*i>>2]=o[i];else z[n>>2]=o}else{var a=fd.getActiveUniformBlockName(e,t);z[n>>2]=a.length+1}else mo.recordError(1281)}function Ua(e,t,r,n,o){if(o)if(t>0&&0==r)mo.recordError(1281);else{e=mo.programs[e];for(var i=[],a=0;a<t;a++)i.push(z[r+4*a>>2]);var s=fd.getActiveUniforms(e,i,n);if(s){var c=s.length;for(a=0;a<c;a++)z[o+4*a>>2]=s[a]}}else mo.recordError(1281)}function Ha(e,t,r,n){var o=fd.getAttachedShaders(mo.programs[e]),i=o.length;i>t&&(i=t),z[r>>2]=i;for(var a=0;a<i;++a){var s=mo.shaders.indexOf(o[a]);z[n+4*a>>2]=s}}function Ba(e,t){return fd.getAttribLocation(mo.programs[e],N(t))}function Xa(e){return W[e>>2]+4294967296*z[e+4>>2]}function Qa(e){return W[e>>2]+4294967296*W[e+4>>2]}function Ga(e,t){W[e>>2]=t,W[e+4>>2]=(t-W[e>>2])/4294967296;var r=t>=0?Qa(e):Xa(e);r!=t&&D("writeI53ToI64() out of range: serialized JS Number "+t+" to Wasm heap as bytes lo=0x"+W[e>>2].toString(16)+", hi=0x"+W[e+4>>2].toString(16)+", which deserializes back to "+r+" instead!")}function qa(e,t,r){if(t){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=r&&1!=r&&mo.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var o=fd.getParameter(34467);n=o?o.length:0;break;case 33309:if(mo.currentContext.version<2)return void mo.recordError(1282);n=2*(fd.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(mo.currentContext.version<2)return void mo.recordError(1280);n=33307==e?3:0}if(void 0===n){var i=fd.getParameter(e);switch(typeof i){case"number":n=i;break;case"boolean":n=i?1:0;break;case"string":return void mo.recordError(1280);case"object":if(null===i)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:n=0;break;default:return void mo.recordError(1280)}else{if(i instanceof Float32Array||i instanceof Uint32Array||i instanceof Int32Array||i instanceof Array){for(var a=0;a<i.length;++a)switch(r){case 0:z[t+4*a>>2]=i[a];break;case 2:$[t+4*a>>2]=i[a];break;case 4:Q[t+a>>0]=i[a]?1:0}return}try{n=0|i.name}catch(t){return mo.recordError(1280),void T("GL_INVALID_ENUM in glGet"+r+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+t+")")}}break;default:return mo.recordError(1280),void T("GL_INVALID_ENUM in glGet"+r+"v: Native code calling glGet"+r+"v("+e+") and it returns "+i+" of type "+typeof i+"!")}}switch(r){case 1:Ga(t,n);break;case 0:z[t>>2]=n;break;case 2:$[t>>2]=n;break;case 4:Q[t>>0]=n?1:0}}else mo.recordError(1281)}function Va(e,t){qa(e,t,4)}function za(e,t,r){r?Ga(r,fd.getBufferParameter(e,t)):mo.recordError(1281)}function Wa(e,t,r){r?z[r>>2]=fd.getBufferParameter(e,t):mo.recordError(1281)}function $a(){var e=fd.getError()||mo.lastError;return mo.lastError=0,e}function Ya(e,t){qa(e,t,2)}function Ka(e,t){return fd.getFragDataLocation(mo.programs[e],N(t))}function Za(e,t,r,n){var o=fd.getFramebufferAttachmentParameter(e,t,r);(o instanceof WebGLRenderbuffer||o instanceof WebGLTexture)&&(o=0|o.name),z[n>>2]=o}function Ja(e,t,r,n){if(r){var o,i=fd.getIndexedParameter(e,t);switch(typeof i){case"boolean":o=i?1:0;break;case"number":o=i;break;case"object":if(null===i)switch(e){case 35983:case 35368:o=0;break;default:return void mo.recordError(1280)}else{if(!(i instanceof WebGLBuffer))return void mo.recordError(1280);o=0|i.name}break;default:return void mo.recordError(1280)}switch(n){case 1:Ga(r,o);break;case 0:z[r>>2]=o;break;case 2:$[r>>2]=o;break;case 4:Q[r>>0]=o?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+n}}else mo.recordError(1281)}function es(e,t,r){Ja(e,t,r,1)}function ts(e,t){qa(e,t,1)}function rs(e,t,r){Ja(e,t,r,0)}function ns(e,t){qa(e,t,0)}function os(e,t,r,n,o){if(n<0)mo.recordError(1281);else if(o){var i=fd.getInternalformatParameter(e,t,r);if(null!==i)for(var a=0;a<i.length&&a<n;++a)z[o+a>>2]=i[a]}else mo.recordError(1281)}function is(e,t,r,n,o){mo.recordError(1282)}function as(e,t,r,n){var o=fd.getProgramInfoLog(mo.programs[e]);null===o&&(o="(unknown error)");var i=t>0&&n?H(o,n,t):0;r&&(z[r>>2]=i)}function ss(e,t,r){if(r)if(e>=mo.counter)mo.recordError(1281);else if(e=mo.programs[e],35716==t){var n=fd.getProgramInfoLog(e);null===n&&(n="(unknown error)"),z[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var o=0;o<fd.getProgramParameter(e,35718);++o)e.maxUniformLength=Math.max(e.maxUniformLength,fd.getActiveUniform(e,o).name.length+1);z[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(o=0;o<fd.getProgramParameter(e,35721);++o)e.maxAttributeLength=Math.max(e.maxAttributeLength,fd.getActiveAttrib(e,o).name.length+1);z[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(o=0;o<fd.getProgramParameter(e,35382);++o)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,fd.getActiveUniformBlockName(e,o).length+1);z[r>>2]=e.maxUniformBlockNameLength}else z[r>>2]=fd.getProgramParameter(e,t);else mo.recordError(1281)}function cs(e,t,r){if(r){var n,o=mo.queries[e];Ga(r,"boolean"==typeof(n=mo.currentContext.version<2?fd.disjointTimerQueryExt.getQueryObjectEXT(o,t):fd.getQueryParameter(o,t))?n?1:0:n)}else mo.recordError(1281)}function us(e,t,r){if(r){var n,o=mo.queries[e],i=fd.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,z[r>>2]=n}else mo.recordError(1281)}function ls(e,t,r){if(r){var n,o=mo.queries[e];Ga(r,"boolean"==typeof(n=mo.currentContext.version<2?fd.disjointTimerQueryExt.getQueryObjectEXT(o,t):fd.getQueryParameter(o,t))?n?1:0:n)}else mo.recordError(1281)}function fs(e,t,r){if(r){var n,o=mo.queries[e],i=fd.getQueryParameter(o,t);n="boolean"==typeof i?i?1:0:i,z[r>>2]=n}else mo.recordError(1281)}function ds(e,t,r){if(r){var n,o=mo.queries[e],i=fd.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,z[r>>2]=n}else mo.recordError(1281)}function ps(e,t,r){r?z[r>>2]=fd.getQuery(e,t):mo.recordError(1281)}function gs(e,t,r){r?z[r>>2]=fd.disjointTimerQueryExt.getQueryEXT(e,t):mo.recordError(1281)}function hs(e,t,r){r?z[r>>2]=fd.getRenderbufferParameter(e,t):mo.recordError(1281)}function ms(e,t,r){r?$[r>>2]=fd.getSamplerParameter(mo.samplers[e],t):mo.recordError(1281)}function vs(e,t,r){r?z[r>>2]=fd.getSamplerParameter(mo.samplers[e],t):mo.recordError(1281)}function bs(e,t,r,n){var o=fd.getShaderInfoLog(mo.shaders[e]);null===o&&(o="(unknown error)");var i=t>0&&n?H(o,n,t):0;r&&(z[r>>2]=i)}function ys(e,t,r,n){var o=fd.getShaderPrecisionFormat(e,t);z[r>>2]=o.rangeMin,z[r+4>>2]=o.rangeMax,z[n>>2]=o.precision}function Es(e,t,r,n){var o=fd.getShaderSource(mo.shaders[e]);if(o){var i=t>0&&n?H(o,n,t):0;r&&(z[r>>2]=i)}}function ws(e,t,r){if(r)if(35716==t){var n=fd.getShaderInfoLog(mo.shaders[e]);null===n&&(n="(unknown error)");var o=n?n.length+1:0;z[r>>2]=o}else if(35720==t){var i=fd.getShaderSource(mo.shaders[e]),a=i?i.length+1:0;z[r>>2]=a}else z[r>>2]=fd.getShaderParameter(mo.shaders[e],t);else mo.recordError(1281)}function _s(e){var t=B(e)+1,r=wd(t);return H(e,r,t),r}function Os(e){var t=mo.stringCache[e];if(!t){switch(e){case 7939:var r=fd.getSupportedExtensions()||[];t=_s((r=r.concat(r.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=fd.getParameter(e);n||mo.recordError(1280),t=n&&_s(n);break;case 7938:var o=fd.getParameter(7938);t=_s(o=mo.currentContext.version>=2?"OpenGL ES 3.0 ("+o+")":"OpenGL ES 2.0 ("+o+")");break;case 35724:var i=fd.getParameter(35724),a=i.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==a&&(3==a[1].length&&(a[1]=a[1]+"0"),i="OpenGL ES GLSL ES "+a[1]+" ("+i+")"),t=_s(i);break;default:mo.recordError(1280)}mo.stringCache[e]=t}return t}function Ts(e,t){if(mo.currentContext.version<2)return mo.recordError(1282),0;var r=mo.stringiCache[e];if(r)return t<0||t>=r.length?(mo.recordError(1281),0):r[t];switch(e){case 7939:var n=fd.getSupportedExtensions()||[];return n=(n=n.concat(n.map((function(e){return"GL_"+e})))).map((function(e){return _s(e)})),r=mo.stringiCache[e]=n,t<0||t>=r.length?(mo.recordError(1281),0):r[t];default:return mo.recordError(1280),0}}function Ds(e,t,r,n,o){if(r<0)mo.recordError(1281);else if(o){var i=fd.getSyncParameter(mo.syncs[e],t);null!==i&&(z[o>>2]=i,n&&(z[n>>2]=1))}else mo.recordError(1281)}function Ps(e,t,r){r?$[r>>2]=fd.getTexParameter(e,t):mo.recordError(1281)}function xs(e,t,r){r?z[r>>2]=fd.getTexParameter(e,t):mo.recordError(1281)}function Ss(e,t,r,n,o,i,a){e=mo.programs[e];var s=fd.getTransformFeedbackVarying(e,t);if(s){if(a&&r>0){var c=H(s.name,a,r);n&&(z[n>>2]=c)}else n&&(z[n>>2]=0);o&&(z[o>>2]=s.size),i&&(z[i>>2]=s.type)}}function Ms(e,t){return fd.getUniformBlockIndex(mo.programs[e],N(t))}function ks(e,t,r,n){if(n)if(t>0&&(0==r||0==n))mo.recordError(1281);else{e=mo.programs[e];for(var o=[],i=0;i<t;i++)o.push(N(z[r+4*i>>2]));var a=fd.getUniformIndices(e,o);if(a){var s=a.length;for(i=0;i<s;i++)z[n+4*i>>2]=a[i]}}else mo.recordError(1281)}function Rs(e){return parseInt(e)}function As(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function Fs(e){var t,r,n=e.uniformLocsById,o=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},t=0;t<fd.getProgramParameter(e,35718);++t){var i=fd.getActiveUniform(e,t),a=i.name,s=i.size,c=As(a),u=c>0?a.slice(0,c):a,l=e.uniformIdCounter;for(e.uniformIdCounter+=s,o[u]=[s,l],r=0;r<s;++r)n[l]=r,e.uniformArrayNamesById[l++]=u}}function Is(e,t){if(t=N(t),e=mo.programs[e]){Fs(e);var r=e.uniformLocsById,n=0,o=t,i=As(t);i>0&&(n=Rs(t.slice(i+1))>>>0,o=t.slice(0,i));var a=e.uniformSizeAndIdsByName[o];if(a&&n<a[0]&&(r[n+=a[1]]=r[n]||fd.getUniformLocation(e,t)))return n}else mo.recordError(1281);return-1}function Cs(e){var t=fd.currentProgram;if(t){var r=t.uniformLocsById[e];return"number"==typeof r&&(t.uniformLocsById[e]=r=fd.getUniformLocation(t,t.uniformArrayNamesById[e]+(r>0?"["+r+"]":""))),r}mo.recordError(1282)}function js(e,t,r,n){if(r){Fs(e=mo.programs[e]);var o=fd.getUniform(e,Cs(t));if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:z[r>>2]=o;break;case 2:$[r>>2]=o}else for(var i=0;i<o.length;i++)switch(n){case 0:z[r+4*i>>2]=o[i];break;case 2:$[r+4*i>>2]=o[i]}}else mo.recordError(1281)}function Ls(e,t,r){js(e,t,r,2)}function Ns(e,t,r){js(e,t,r,0)}function Us(e,t,r){js(e,t,r,0)}function Hs(e,t,r,n){if(r){var o=fd.getVertexAttrib(e,t);if(34975==t)z[r>>2]=o&&o.name;else if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:z[r>>2]=o;break;case 2:$[r>>2]=o;break;case 5:z[r>>2]=Math.fround(o)}else for(var i=0;i<o.length;i++)switch(n){case 0:z[r+4*i>>2]=o[i];break;case 2:$[r+4*i>>2]=o[i];break;case 5:z[r+4*i>>2]=Math.fround(o[i])}}else mo.recordError(1281)}function Bs(e,t,r){Hs(e,t,r,0)}function Xs(e,t,r){Hs(e,t,r,0)}function Qs(e,t,r){r?z[r>>2]=fd.getVertexAttribOffset(e,t):mo.recordError(1281)}function Gs(e,t,r){Hs(e,t,r,2)}function qs(e,t,r){Hs(e,t,r,5)}function Vs(e,t){fd.hint(e,t)}function zs(e,t,r){for(var n=Zi[t],o=0;o<t;o++)n[o]=z[r+4*o>>2];fd.invalidateFramebuffer(e,n)}function Ws(e,t,r,n,o,i,a){for(var s=Zi[t],c=0;c<t;c++)s[c]=z[r+4*c>>2];fd.invalidateSubFramebuffer(e,s,n,o,i,a)}function $s(e){var t=mo.buffers[e];return t?fd.isBuffer(t):0}function Ys(e){return fd.isEnabled(e)}function Ks(e){var t=mo.framebuffers[e];return t?fd.isFramebuffer(t):0}function Zs(e){return(e=mo.programs[e])?fd.isProgram(e):0}function Js(e){var t=mo.queries[e];return t?fd.isQuery(t):0}function ec(e){var t=mo.queries[e];return t?fd.disjointTimerQueryExt.isQueryEXT(t):0}function tc(e){var t=mo.renderbuffers[e];return t?fd.isRenderbuffer(t):0}function rc(e){var t=mo.samplers[e];return t?fd.isSampler(t):0}function nc(e){var t=mo.shaders[e];return t?fd.isShader(t):0}function oc(e){return fd.isSync(mo.syncs[e])}function ic(e){var t=mo.textures[e];return t?fd.isTexture(t):0}function ac(e){return fd.isTransformFeedback(mo.transformFeedbacks[e])}function sc(e){var t=mo.vaos[e];return t?fd.isVertexArray(t):0}function cc(e){var t=mo.vaos[e];return t?fd.isVertexArray(t):0}function uc(e){fd.lineWidth(e)}function lc(e){e=mo.programs[e],fd.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function fc(){fd.pauseTransformFeedback()}function dc(e,t){3317==e&&(mo.unpackAlignment=t),fd.pixelStorei(e,t)}function pc(e,t){fd.polygonOffset(e,t)}function gc(e,t,r,n){mo.recordError(1280)}function hc(e,t,r){mo.recordError(1280)}function mc(e,t){fd.disjointTimerQueryExt.queryCounterEXT(mo.queries[e],t)}function vc(e){fd.readBuffer(e)}function bc(e,t,r,n){var o;return t*(e*r+(o=n)-1&-o)}function yc(e){return{5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[e-6402]||1}function Ec(e){return 0==(e-=5120)?Q:1==e?G:2==e?q:4==e?z:6==e?$:5==e||28922==e||28520==e||30779==e||30782==e?W:V}function wc(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function _c(e,t,r,n,o,i){var a=Ec(e),s=wc(a),c=1<<s,u=bc(r,n,yc(t)*c,mo.unpackAlignment);return a.subarray(o>>s,o+u>>s)}function Oc(e,t,r,n,o,i,a){if(mo.currentContext.version>=2)if(fd.currentPixelPackBufferBinding)fd.readPixels(e,t,r,n,o,i,a);else{var s=Ec(i);fd.readPixels(e,t,r,n,o,i,s,a>>wc(s))}else{var c=_c(i,o,r,n,a);c?fd.readPixels(e,t,r,n,o,i,c):mo.recordError(1280)}}function Tc(){}function Dc(e,t,r,n){fd.renderbufferStorage(e,t,r,n)}function Pc(e,t,r,n,o){fd.renderbufferStorageMultisample(e,t,r,n,o)}function xc(){fd.resumeTransformFeedback()}function Sc(e,t){fd.sampleCoverage(e,!!t)}function Mc(e,t,r){fd.samplerParameterf(mo.samplers[e],t,r)}function kc(e,t,r){var n=$[r>>2];fd.samplerParameterf(mo.samplers[e],t,n)}function Rc(e,t,r){fd.samplerParameteri(mo.samplers[e],t,r)}function Ac(e,t,r){var n=z[r>>2];fd.samplerParameteri(mo.samplers[e],t,n)}function Fc(e,t,r,n){fd.scissor(e,t,r,n)}function Ic(){mo.recordError(1280)}function Cc(e,t,r,n){var o=mo.getSource(e,t,r,n);if(mo.currentContext.version>=2&&o.includes("#version 100")){var i="";(o=(o=o.replace(/#extension GL_OES_standard_derivatives : enable/g,"")).replace(/#extension GL_EXT_shader_texture_lod : enable/g,"")).includes("gl_FragColor")&&(i+="out mediump vec4 GL_FragColor;\n",o=o.replace(/gl_FragColor/g,"GL_FragColor")),o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o.includes("attribute")?(o=o.replace(/attribute/g,"in")).replace(/varying/g,"out"):o.replace(/varying/g,"in")).replace(/textureCubeLodEXT/g,"textureCubeLod")).replace(/texture2DLodEXT/g,"texture2DLod")).replace(/texture2DProjLodEXT/g,"texture2DProjLod")).replace(/texture2DGradEXT/g,"texture2DGrad")).replace(/texture2DProjGradEXT/g,"texture2DProjGrad")).replace(/textureCubeGradEXT/g,"textureCubeGrad")).replace(/textureCube/g,"texture")).replace(/texture1D/g,"texture")).replace(/texture2D/g,"texture")).replace(/texture3D/g,"texture")).replace(/#version 100/g,"#version 300 es\n"+i)}fd.shaderSource(mo.shaders[e],o)}function jc(e,t,r){fd.stencilFunc(e,t,r)}function Lc(e,t,r,n){fd.stencilFuncSeparate(e,t,r,n)}function Nc(e){fd.stencilMask(e)}function Uc(e,t){fd.stencilMaskSeparate(e,t)}function Hc(e,t,r){fd.stencilOp(e,t,r)}function Bc(e,t,r,n){fd.stencilOpSeparate(e,t,r,n)}function Xc(e,t,r,n,o,i,a,s,c){if(mo.currentContext.version>=2&&(6402==a&&6402==r&&5125==s&&(r=33190),36193==s&&(s=5131,6408==a&&6408==r&&(r=34842)),34041==r&&(r=35056)),mo.currentContext.version>=2)if(fd.currentPixelUnpackBufferBinding)fd.texImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Ec(s);fd.texImage2D(e,t,r,n,o,i,a,s,u,c>>wc(u))}else fd.texImage2D(e,t,r,n,o,i,a,s,null);else fd.texImage2D(e,t,r,n,o,i,a,s,c?_c(s,a,n,o,c):null)}function Qc(e,t,r,n,o,i,a,s,c,u){if(fd.currentPixelUnpackBufferBinding)fd.texImage3D(e,t,r,n,o,i,a,s,c,u);else if(u){var l=Ec(c);fd.texImage3D(e,t,r,n,o,i,a,s,c,l,u>>wc(l))}else fd.texImage3D(e,t,r,n,o,i,a,s,c,null)}function Gc(e,t,r){fd.texParameterf(e,t,r)}function qc(e,t,r){var n=$[r>>2];fd.texParameterf(e,t,n)}function Vc(e,t,r){fd.texParameteri(e,t,r)}function zc(e,t,r){var n=z[r>>2];fd.texParameteri(e,t,n)}function Wc(e,t,r,n,o){fd.texStorage2D(e,t,r,n,o)}function $c(e,t,r,n,o,i){fd.texStorage3D(e,t,r,n,o,i)}function Yc(e,t,r,n,o,i,a,s,c){if(mo.currentContext.version>=2&&36193==s&&(s=5131),mo.currentContext.version>=2)if(fd.currentPixelUnpackBufferBinding)fd.texSubImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Ec(s);fd.texSubImage2D(e,t,r,n,o,i,a,s,u,c>>wc(u))}else fd.texSubImage2D(e,t,r,n,o,i,a,s,null);else{var l=null;c&&(l=_c(s,a,o,i,c)),fd.texSubImage2D(e,t,r,n,o,i,a,s,l)}}function Kc(e,t,r,n,o,i,a,s,c,u,l){if(fd.currentPixelUnpackBufferBinding)fd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,l);else if(l){var f=Ec(u);fd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,f,l>>wc(f))}else fd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,null)}function Zc(e,t,r,n){e=mo.programs[e];for(var o=[],i=0;i<t;i++)o.push(N(z[r+4*i>>2]));fd.transformFeedbackVaryings(e,o,n)}function Jc(e,t){fd.uniform1f(Cs(e),t)}var eu=[];function tu(e,t,r){if(mo.currentContext.version>=2)fd.uniform1fv(Cs(e),$,r>>2,t);else{if(t<=288)for(var n=eu[t-1],o=0;o<t;++o)n[o]=$[r+4*o>>2];else n=$.subarray(r>>2,r+4*t>>2);fd.uniform1fv(Cs(e),n)}}function ru(e,t){fd.uniform1i(Cs(e),t)}var nu=[];function ou(e,t,r){if(mo.currentContext.version>=2)fd.uniform1iv(Cs(e),z,r>>2,t);else{if(t<=288)for(var n=nu[t-1],o=0;o<t;++o)n[o]=z[r+4*o>>2];else n=z.subarray(r>>2,r+4*t>>2);fd.uniform1iv(Cs(e),n)}}function iu(e,t){fd.uniform1ui(Cs(e),t)}function au(e,t,r){fd.uniform1uiv(Cs(e),W,r>>2,t)}function su(e,t,r){fd.uniform2f(Cs(e),t,r)}function cu(e,t,r){if(mo.currentContext.version>=2)fd.uniform2fv(Cs(e),$,r>>2,2*t);else{if(t<=144)for(var n=eu[2*t-1],o=0;o<2*t;o+=2)n[o]=$[r+4*o>>2],n[o+1]=$[r+(4*o+4)>>2];else n=$.subarray(r>>2,r+8*t>>2);fd.uniform2fv(Cs(e),n)}}function uu(e,t,r){fd.uniform2i(Cs(e),t,r)}function lu(e,t,r){if(mo.currentContext.version>=2)fd.uniform2iv(Cs(e),z,r>>2,2*t);else{if(t<=144)for(var n=nu[2*t-1],o=0;o<2*t;o+=2)n[o]=z[r+4*o>>2],n[o+1]=z[r+(4*o+4)>>2];else n=z.subarray(r>>2,r+8*t>>2);fd.uniform2iv(Cs(e),n)}}function fu(e,t,r){fd.uniform2ui(Cs(e),t,r)}function du(e,t,r){fd.uniform2uiv(Cs(e),W,r>>2,2*t)}function pu(e,t,r,n){fd.uniform3f(Cs(e),t,r,n)}function gu(e,t,r){if(mo.currentContext.version>=2)fd.uniform3fv(Cs(e),$,r>>2,3*t);else{if(t<=96)for(var n=eu[3*t-1],o=0;o<3*t;o+=3)n[o]=$[r+4*o>>2],n[o+1]=$[r+(4*o+4)>>2],n[o+2]=$[r+(4*o+8)>>2];else n=$.subarray(r>>2,r+12*t>>2);fd.uniform3fv(Cs(e),n)}}function hu(e,t,r,n){fd.uniform3i(Cs(e),t,r,n)}function mu(e,t,r){if(mo.currentContext.version>=2)fd.uniform3iv(Cs(e),z,r>>2,3*t);else{if(t<=96)for(var n=nu[3*t-1],o=0;o<3*t;o+=3)n[o]=z[r+4*o>>2],n[o+1]=z[r+(4*o+4)>>2],n[o+2]=z[r+(4*o+8)>>2];else n=z.subarray(r>>2,r+12*t>>2);fd.uniform3iv(Cs(e),n)}}function vu(e,t,r,n){fd.uniform3ui(Cs(e),t,r,n)}function bu(e,t,r){fd.uniform3uiv(Cs(e),W,r>>2,3*t)}function yu(e,t,r,n,o){fd.uniform4f(Cs(e),t,r,n,o)}function Eu(e,t,r){if(mo.currentContext.version>=2)fd.uniform4fv(Cs(e),$,r>>2,4*t);else{if(t<=72){var n=eu[4*t-1],o=$;r>>=2;for(var i=0;i<4*t;i+=4){var a=r+i;n[i]=o[a],n[i+1]=o[a+1],n[i+2]=o[a+2],n[i+3]=o[a+3]}}else n=$.subarray(r>>2,r+16*t>>2);fd.uniform4fv(Cs(e),n)}}function wu(e,t,r,n,o){fd.uniform4i(Cs(e),t,r,n,o)}function _u(e,t,r){if(mo.currentContext.version>=2)fd.uniform4iv(Cs(e),z,r>>2,4*t);else{if(t<=72)for(var n=nu[4*t-1],o=0;o<4*t;o+=4)n[o]=z[r+4*o>>2],n[o+1]=z[r+(4*o+4)>>2],n[o+2]=z[r+(4*o+8)>>2],n[o+3]=z[r+(4*o+12)>>2];else n=z.subarray(r>>2,r+16*t>>2);fd.uniform4iv(Cs(e),n)}}function Ou(e,t,r,n,o){fd.uniform4ui(Cs(e),t,r,n,o)}function Tu(e,t,r){fd.uniform4uiv(Cs(e),W,r>>2,4*t)}function Du(e,t,r){e=mo.programs[e],fd.uniformBlockBinding(e,t,r)}function Pu(e,t,r,n){if(mo.currentContext.version>=2)fd.uniformMatrix2fv(Cs(e),!!r,$,n>>2,4*t);else{if(t<=72)for(var o=eu[4*t-1],i=0;i<4*t;i+=4)o[i]=$[n+4*i>>2],o[i+1]=$[n+(4*i+4)>>2],o[i+2]=$[n+(4*i+8)>>2],o[i+3]=$[n+(4*i+12)>>2];else o=$.subarray(n>>2,n+16*t>>2);fd.uniformMatrix2fv(Cs(e),!!r,o)}}function xu(e,t,r,n){fd.uniformMatrix2x3fv(Cs(e),!!r,$,n>>2,6*t)}function Su(e,t,r,n){fd.uniformMatrix2x4fv(Cs(e),!!r,$,n>>2,8*t)}function Mu(e,t,r,n){if(mo.currentContext.version>=2)fd.uniformMatrix3fv(Cs(e),!!r,$,n>>2,9*t);else{if(t<=32)for(var o=eu[9*t-1],i=0;i<9*t;i+=9)o[i]=$[n+4*i>>2],o[i+1]=$[n+(4*i+4)>>2],o[i+2]=$[n+(4*i+8)>>2],o[i+3]=$[n+(4*i+12)>>2],o[i+4]=$[n+(4*i+16)>>2],o[i+5]=$[n+(4*i+20)>>2],o[i+6]=$[n+(4*i+24)>>2],o[i+7]=$[n+(4*i+28)>>2],o[i+8]=$[n+(4*i+32)>>2];else o=$.subarray(n>>2,n+36*t>>2);fd.uniformMatrix3fv(Cs(e),!!r,o)}}function ku(e,t,r,n){fd.uniformMatrix3x2fv(Cs(e),!!r,$,n>>2,6*t)}function Ru(e,t,r,n){fd.uniformMatrix3x4fv(Cs(e),!!r,$,n>>2,12*t)}function Au(e,t,r,n){if(mo.currentContext.version>=2)fd.uniformMatrix4fv(Cs(e),!!r,$,n>>2,16*t);else{if(t<=18){var o=eu[16*t-1],i=$;n>>=2;for(var a=0;a<16*t;a+=16){var s=n+a;o[a]=i[s],o[a+1]=i[s+1],o[a+2]=i[s+2],o[a+3]=i[s+3],o[a+4]=i[s+4],o[a+5]=i[s+5],o[a+6]=i[s+6],o[a+7]=i[s+7],o[a+8]=i[s+8],o[a+9]=i[s+9],o[a+10]=i[s+10],o[a+11]=i[s+11],o[a+12]=i[s+12],o[a+13]=i[s+13],o[a+14]=i[s+14],o[a+15]=i[s+15]}}else o=$.subarray(n>>2,n+64*t>>2);fd.uniformMatrix4fv(Cs(e),!!r,o)}}function Fu(e,t,r,n){fd.uniformMatrix4x2fv(Cs(e),!!r,$,n>>2,8*t)}function Iu(e,t,r,n){fd.uniformMatrix4x3fv(Cs(e),!!r,$,n>>2,12*t)}function Cu(e){e=mo.programs[e],fd.useProgram(e),fd.currentProgram=e}function ju(e){fd.validateProgram(mo.programs[e])}function Lu(e,t){fd.vertexAttrib1f(e,t)}function Nu(e,t){fd.vertexAttrib1f(e,$[t>>2])}function Uu(e,t,r){fd.vertexAttrib2f(e,t,r)}function Hu(e,t){fd.vertexAttrib2f(e,$[t>>2],$[t+4>>2])}function Bu(e,t,r,n){fd.vertexAttrib3f(e,t,r,n)}function Xu(e,t){fd.vertexAttrib3f(e,$[t>>2],$[t+4>>2],$[t+8>>2])}function Qu(e,t,r,n,o){fd.vertexAttrib4f(e,t,r,n,o)}function Gu(e,t){fd.vertexAttrib4f(e,$[t>>2],$[t+4>>2],$[t+8>>2],$[t+12>>2])}function qu(e,t){fd.vertexAttribDivisor(e,t)}function Vu(e,t){fd.vertexAttribDivisor(e,t)}function zu(e,t){fd.vertexAttribDivisor(e,t)}function Wu(e,t){fd.vertexAttribDivisor(e,t)}function $u(e,t){fd.vertexAttribDivisor(e,t)}function Yu(e,t,r,n,o){fd.vertexAttribI4i(e,t,r,n,o)}function Ku(e,t){fd.vertexAttribI4i(e,z[t>>2],z[t+4>>2],z[t+8>>2],z[t+12>>2])}function Zu(e,t,r,n,o){fd.vertexAttribI4ui(e,t,r,n,o)}function Ju(e,t){fd.vertexAttribI4ui(e,W[t>>2],W[t+4>>2],W[t+8>>2],W[t+12>>2])}function el(e,t,r,n,o){fd.vertexAttribIPointer(e,t,r,n,o)}function tl(e,t,r,n,o,i){fd.vertexAttribPointer(e,t,r,!!n,o,i)}function rl(e,t,r,n){fd.viewport(e,t,r,n)}function nl(e,t,r,n){fd.waitSync(mo.syncs[e],t,di(r,n))}function ol(e,t,r){G.copyWithin(e,t,t+r)}function il(e){try{return k.grow(e-X.byteLength+65535>>>16),ce(k.buffer),1}catch(t){T("emscripten_realloc_buffer: Attempted to grow heap from "+X.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function al(e){var t=G.length;C((e>>>=0)>t);var r=2147483648;if(e>r)return T("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147483648 bytes!"),!1;for(var n=1;n<=4;n*=2){var o=t*(1+.2/n);o=Math.min(o,e+100663296);var i=Math.min(r,se(Math.max(e,o),65536));if(il(i))return!0}return T("Failed to grow the heap from "+t+" bytes to "+i+" bytes, not enough memory!"),!1}function sl(e){if(o.emscripten_ubq_asyncFetchStates.has(e)){const t=o.emscripten_ubq_asyncFetchStates.get(e);if(t.state==a.ALLOCATED)return!0;if(t.state==a.FINISHED){const r=t.result.length,n=o._malloc(r);return o.HEAPU8.set(t.result,n),t.resultAddress=n,t.resultLength=r,t.state=a.ALLOCATED,o.emscripten_ubq_asyncFetchStates.set(e,t),!0}}return!1}function cl(e,t,r,n){let i=o.UTF8ToString(e,t),a=o.UTF8ToString(r,n),s=o.emscripten_ubq_asyncFetchNextHeaderHandle++;return o.emscripten_ubq_asyncFetchHeaders.set(s,{key:i,value:a}),s}function ul(e){return o.emscripten_ubq_asyncFetchHeaders.has(e)?o.emscripten_ubq_asyncFetchHeaders.get(e):0}function ll(e,t,r,n,i,c,u,l,f){let d=o.UTF8ToString(t,r),p=o.UTF8ToString(l,f),g=o.emscripten_ubq_asyncFetchNextHandle++;o.emscripten_ubq_asyncFetchStates.set(g,{state:a.PENDING});let h={};for(let e=0;e<i;e++){const t=o.getValue(n+4*e,"i32"),r=o.emscripten_ubq_asyncFetchHeaders.get(t);h[r.key]=r.value}const m=s[e],v="GET"!==m&&"HEAD"!==m?o.UTF8ToString(c,u):void 0;return fetch(d,{method:m,headers:h,body:v,mode:"cors",credentials:p}).then((e=>{if(e.status>=200&&e.status<=209){let t=0;async function r(e,t){const r=e.getReader();let n=0,i=[];for(;;){const{done:e,value:t}=await r.read();if(e)break;i.push(t),n+=t.length,o.emscripten_ubq_asyncFetchCompletedBytes.set(g,n)}let a=new Uint8Array(n),s=0;for(let e of i)a.set(e,s),s+=e.length;return a}return e.headers.has("Content-Length")&&(t=+e.headers.get("Content-Length")),o.emscripten_ubq_asyncFetchTotalBytes.set(g,t),r(e.body)}return Promise.reject(e.statusText)})).then((e=>{o.emscripten_ubq_asyncFetchStates.set(g,{state:a.FINISHED,result:e})})).catch((e=>{o.emscripten_ubq_asyncFetchStates.set(g,{state:a.ERROR,error:e})})),g}function fl(e){return!!o.emscripten_ubq_asyncFetchStates.has(e)&&(o.emscripten_ubq_asyncFetchStates.delete(e),!0)}function dl(e){return o.emscripten_ubq_asyncFetchCompletedBytes.has(e)?o.emscripten_ubq_asyncFetchCompletedBytes.get(e):0}function pl(e){if(o.emscripten_ubq_asyncFetchStates.has(e)){const t=o.emscripten_ubq_asyncFetchStates.get(e);if(t.state==a.ALLOCATED)return t.resultAddress}return-1}function gl(e){if(o.emscripten_ubq_asyncFetchStates.has(e)){const t=o.emscripten_ubq_asyncFetchStates.get(e);if(t.state==a.ALLOCATED)return t.resultLength}return-1}function hl(e){return o.emscripten_ubq_asyncFetchStates.has(e)?o.emscripten_ubq_asyncFetchStates.get(e).state:-1}function ml(e){return o.emscripten_ubq_asyncFetchTotalBytes.has(e)?o.emscripten_ubq_asyncFetchTotalBytes.get(e):0}var vl={inEventHandler:0,removeAllEventListeners:function(){for(var e=vl.eventHandlers.length-1;e>=0;--e)vl._removeHandler(e);vl.eventHandlers=[],vl.deferredCalls=[]},registerRemoveEventListeners:function(){vl.removeEventListenersRegistered||(ve.push(vl.removeAllEventListeners),vl.removeEventListenersRegistered=!0)},deferredCalls:[],deferCall:function(e,t,r){function n(e,t){if(e.length!=t.length)return!1;for(var r in e)if(e[r]!=t[r])return!1;return!0}for(var o in vl.deferredCalls){var i=vl.deferredCalls[o];if(i.targetFunction==e&&n(i.argsList,r))return}vl.deferredCalls.push({targetFunction:e,precedence:t,argsList:r}),vl.deferredCalls.sort((function(e,t){return e.precedence<t.precedence}))},removeDeferredCalls:function(e){for(var t=0;t<vl.deferredCalls.length;++t)vl.deferredCalls[t].targetFunction==e&&(vl.deferredCalls.splice(t,1),--t)},canPerformEventHandlerRequests:function(){return vl.inEventHandler&&vl.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(vl.canPerformEventHandlerRequests())for(var e=0;e<vl.deferredCalls.length;++e){var t=vl.deferredCalls[e];vl.deferredCalls.splice(e,1),--e,t.targetFunction.apply(null,t.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(e,t){for(var r=0;r<vl.eventHandlers.length;++r)vl.eventHandlers[r].target!=e||t&&t!=vl.eventHandlers[r].eventTypeString||vl._removeHandler(r--)},_removeHandler:function(e){var t=vl.eventHandlers[e];t.target.removeEventListener(t.eventTypeString,t.eventListenerFunc,t.useCapture),vl.eventHandlers.splice(e,1)},registerOrRemoveHandler:function(e){var t=function(t){++vl.inEventHandler,vl.currentEventHandler=e,vl.runDeferredCalls(),e.handlerFunc(t),vl.runDeferredCalls(),--vl.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=t,e.target.addEventListener(e.eventTypeString,t,e.useCapture),vl.eventHandlers.push(e),vl.registerRemoveEventListeners();else for(var r=0;r<vl.eventHandlers.length;++r)vl.eventHandlers[r].target==e.target&&vl.eventHandlers[r].eventTypeString==e.eventTypeString&&vl._removeHandler(r--)},getNodeNameForTarget:function(e){return e?e==window?"#window":e==screen?"#screen":e&&e.nodeName?e.nodeName:"":""},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}},bl=["default","low-power","high-performance"];function yl(e){return e>2?N(e):e}var El=[0,document,window];function wl(e){return e=yl(e),El[e]||document.querySelector(e)}function _l(e){return wl(e)}function Ol(e,t){C(t);var r=t>>2,n=z[r+6],o={alpha:!!z[r+0],depth:!!z[r+1],stencil:!!z[r+2],antialias:!!z[r+3],premultipliedAlpha:!!z[r+4],preserveDrawingBuffer:!!z[r+5],powerPreference:bl[n],failIfMajorPerformanceCaveat:!!z[r+7],majorVersion:z[r+8],minorVersion:z[r+9],enableExtensionsByDefault:z[r+10],explicitSwapControl:z[r+11],proxyContextToMainThread:z[r+12],renderViaOffscreenBackBuffer:z[r+13]},i=_l(e);return i?o.explicitSwapControl?0:mo.createContext(i,o):0}function Tl(e,t){return Ol(e,t)}function Dl(e){C(e);for(var t=e>>2,r=0;r<14;++r)z[t+r]=0;z[t+0]=z[t+1]=z[t+3]=z[t+4]=z[t+8]=z[t+10]=1}function Pl(e){return mo.makeContextCurrent(e)?0:-5}var xl={};function Sl(){return f||"./this.program"}function Ml(){if(!Ml.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Sl()};for(var t in xl)void 0===xl[t]?delete e[t]:e[t]=xl[t];var r=[];for(var t in e)r.push(t+"="+e[t]);Ml.strings=r}return Ml.strings}function kl(e,t){var r=0;return Ml().forEach((function(n,o){var i=t+r;z[e+4*o>>2]=i,ae(n,i),r+=n.length+1})),0}function Rl(e,t){var r=Ml();z[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),z[t>>2]=n,0}function Al(e){try{var t=Et.getStreamFromFD(e);return yt.close(t),0}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ne(e),e.errno}}function Fl(e,t,r,n){try{var o=Et.getStreamFromFD(e),i=Et.doReadv(o,t,r);return z[n>>2]=i,0}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ne(e),e.errno}}function Il(e,t,r,n,o){try{var i=Et.getStreamFromFD(e),a=4294967296*r+(t>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(yt.llseek(i,a,n),Be=[i.position>>>0,(He=i.position,+Math.abs(He)>=1?He>0?(0|Math.min(+Math.floor(He/4294967296),4294967295))>>>0:~~+Math.ceil((He-+(~~He>>>0))/4294967296)>>>0:0)],z[o>>2]=Be[0],z[o+4>>2]=Be[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ne(e),e.errno}}function Cl(e,t,r,n){try{var o=Et.getStreamFromFD(e),i=Et.doWritev(o,t,r);return z[n>>2]=i,0}catch(e){return void 0!==yt&&e instanceof yt.ErrnoError||Ne(e),e.errno}}function jl(){return M()}function Ll(e){var t=Date.now();return z[e>>2]=t/1e3|0,z[e+4>>2]=t%1e3*1e3|0,0}function Nl(e){fd.activeTexture(e)}function Ul(e,t){fd.attachShader(mo.programs[e],mo.shaders[t])}function Hl(e,t){35051==e?fd.currentPixelPackBufferBinding=t:35052==e&&(fd.currentPixelUnpackBufferBinding=t),fd.bindBuffer(e,mo.buffers[t])}function Bl(e,t){fd.bindFramebuffer(e,mo.framebuffers[t])}function Xl(e,t){fd.bindRenderbuffer(e,mo.renderbuffers[t])}function Ql(e,t){fd.bindTexture(e,mo.textures[t])}function Gl(e){fd.blendEquation(e)}function ql(e,t){fd.blendEquationSeparate(e,t)}function Vl(e,t){fd.blendFunc(e,t)}function zl(e,t,r,n){fd.blendFuncSeparate(e,t,r,n)}function Wl(e,t,r,n){mo.currentContext.version>=2?r?fd.bufferData(e,G,n,r,t):fd.bufferData(e,t,n):fd.bufferData(e,r?G.subarray(r,r+t):t,n)}function $l(e){fd.clear(e)}function Yl(e,t,r,n){fd.clearColor(e,t,r,n)}function Kl(e){fd.clearStencil(e)}function Zl(e,t,r,n){fd.colorMask(!!e,!!t,!!r,!!n)}function Jl(e){fd.compileShader(mo.shaders[e])}function ef(){var e=mo.getNewId(mo.programs),t=fd.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,mo.programs[e]=t,e}function tf(e){var t=mo.getNewId(mo.shaders);return mo.shaders[t]=fd.createShader(e),t}function rf(e,t){for(var r=0;r<e;r++){var n=z[t+4*r>>2],o=mo.buffers[n];o&&(fd.deleteBuffer(o),o.name=0,mo.buffers[n]=null,n==fd.currentPixelPackBufferBinding&&(fd.currentPixelPackBufferBinding=0),n==fd.currentPixelUnpackBufferBinding&&(fd.currentPixelUnpackBufferBinding=0))}}function nf(e,t){for(var r=0;r<e;++r){var n=z[t+4*r>>2],o=mo.framebuffers[n];o&&(fd.deleteFramebuffer(o),o.name=0,mo.framebuffers[n]=null)}}function of(e){if(e){var t=mo.programs[e];t?(fd.deleteProgram(t),t.name=0,mo.programs[e]=null):mo.recordError(1281)}}function af(e,t){for(var r=0;r<e;r++){var n=z[t+4*r>>2],o=mo.renderbuffers[n];o&&(fd.deleteRenderbuffer(o),o.name=0,mo.renderbuffers[n]=null)}}function sf(e){if(e){var t=mo.shaders[e];t?(fd.deleteShader(t),mo.shaders[e]=null):mo.recordError(1281)}}function cf(e,t){for(var r=0;r<e;r++){var n=z[t+4*r>>2],o=mo.textures[n];o&&(fd.deleteTexture(o),o.name=0,mo.textures[n]=null)}}function uf(e){fd.depthMask(!!e)}function lf(e,t){fd.detachShader(mo.programs[e],mo.shaders[t])}function ff(e){fd.disable(e)}function df(e,t,r){fd.drawArrays(e,t,r)}function pf(e){fd.enable(e)}function gf(e){fd.enableVertexAttribArray(e)}function hf(){fd.finish()}function mf(e,t,r,n){fd.framebufferRenderbuffer(e,t,r,mo.renderbuffers[n])}function vf(e,t,r,n,o){fd.framebufferTexture2D(e,t,r,mo.textures[n],o)}function bf(e,t){_a(e,t,"createBuffer",mo.buffers)}function yf(e,t){_a(e,t,"createFramebuffer",mo.framebuffers)}function Ef(e,t){_a(e,t,"createRenderbuffer",mo.renderbuffers)}function wf(e,t){_a(e,t,"createTexture",mo.textures)}function _f(e,t){return fd.getAttribLocation(mo.programs[e],N(t))}function Of(){var e=fd.getError()||mo.lastError;return mo.lastError=0,e}function Tf(e,t){qa(e,t,0)}function Df(e,t,r,n){var o=fd.getProgramInfoLog(mo.programs[e]);null===o&&(o="(unknown error)");var i=t>0&&n?H(o,n,t):0;r&&(z[r>>2]=i)}function Pf(e,t,r){if(r)if(e>=mo.counter)mo.recordError(1281);else if(e=mo.programs[e],35716==t){var n=fd.getProgramInfoLog(e);null===n&&(n="(unknown error)"),z[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var o=0;o<fd.getProgramParameter(e,35718);++o)e.maxUniformLength=Math.max(e.maxUniformLength,fd.getActiveUniform(e,o).name.length+1);z[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(o=0;o<fd.getProgramParameter(e,35721);++o)e.maxAttributeLength=Math.max(e.maxAttributeLength,fd.getActiveAttrib(e,o).name.length+1);z[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(o=0;o<fd.getProgramParameter(e,35382);++o)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,fd.getActiveUniformBlockName(e,o).length+1);z[r>>2]=e.maxUniformBlockNameLength}else z[r>>2]=fd.getProgramParameter(e,t);else mo.recordError(1281)}function xf(e,t,r,n){var o=fd.getShaderPrecisionFormat(e,t);z[r>>2]=o.rangeMin,z[r+4>>2]=o.rangeMax,z[n>>2]=o.precision}function Sf(e){var t=mo.stringCache[e];if(!t){switch(e){case 7939:var r=fd.getSupportedExtensions()||[];t=_s((r=r.concat(r.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=fd.getParameter(e);n||mo.recordError(1280),t=n&&_s(n);break;case 7938:var o=fd.getParameter(7938);t=_s(o=mo.currentContext.version>=2?"OpenGL ES 3.0 ("+o+")":"OpenGL ES 2.0 ("+o+")");break;case 35724:var i=fd.getParameter(35724),a=i.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==a&&(3==a[1].length&&(a[1]=a[1]+"0"),i="OpenGL ES GLSL ES "+a[1]+" ("+i+")"),t=_s(i);break;default:mo.recordError(1280)}mo.stringCache[e]=t}return t}function Mf(e,t){if(t=N(t),e=mo.programs[e]){Fs(e);var r=e.uniformLocsById,n=0,o=t,i=As(t);i>0&&(n=Rs(t.slice(i+1))>>>0,o=t.slice(0,i));var a=e.uniformSizeAndIdsByName[o];if(a&&n<a[0]&&(r[n+=a[1]]=r[n]||fd.getUniformLocation(e,t)))return n}else mo.recordError(1281);return-1}function kf(e){e=mo.programs[e],fd.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function Rf(e,t,r,n,o,i,a){if(mo.currentContext.version>=2)if(fd.currentPixelPackBufferBinding)fd.readPixels(e,t,r,n,o,i,a);else{var s=Ec(i);fd.readPixels(e,t,r,n,o,i,s,a>>wc(s))}else{var c=_c(i,o,r,n,a);c?fd.readPixels(e,t,r,n,o,i,c):mo.recordError(1280)}}function Af(e,t,r,n){fd.renderbufferStorage(e,t,r,n)}function Ff(e,t,r,n){var o=mo.getSource(e,t,r,n);if(mo.currentContext.version>=2&&o.includes("#version 100")){var i="";(o=(o=o.replace(/#extension GL_OES_standard_derivatives : enable/g,"")).replace(/#extension GL_EXT_shader_texture_lod : enable/g,"")).includes("gl_FragColor")&&(i+="out mediump vec4 GL_FragColor;\n",o=o.replace(/gl_FragColor/g,"GL_FragColor")),o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o.includes("attribute")?(o=o.replace(/attribute/g,"in")).replace(/varying/g,"out"):o.replace(/varying/g,"in")).replace(/textureCubeLodEXT/g,"textureCubeLod")).replace(/texture2DLodEXT/g,"texture2DLod")).replace(/texture2DProjLodEXT/g,"texture2DProjLod")).replace(/texture2DGradEXT/g,"texture2DGrad")).replace(/texture2DProjGradEXT/g,"texture2DProjGrad")).replace(/textureCubeGradEXT/g,"textureCubeGrad")).replace(/textureCube/g,"texture")).replace(/texture1D/g,"texture")).replace(/texture2D/g,"texture")).replace(/texture3D/g,"texture")).replace(/#version 100/g,"#version 300 es\n"+i)}fd.shaderSource(mo.shaders[e],o)}function If(e,t,r){fd.stencilFunc(e,t,r)}function Cf(e){fd.stencilMask(e)}function jf(e,t,r){fd.stencilOp(e,t,r)}function Lf(e,t,r,n,o,i,a,s,c){if(mo.currentContext.version>=2&&(6402==a&&6402==r&&5125==s&&(r=33190),36193==s&&(s=5131,6408==a&&6408==r&&(r=34842)),34041==r&&(r=35056)),mo.currentContext.version>=2)if(fd.currentPixelUnpackBufferBinding)fd.texImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Ec(s);fd.texImage2D(e,t,r,n,o,i,a,s,u,c>>wc(u))}else fd.texImage2D(e,t,r,n,o,i,a,s,null);else fd.texImage2D(e,t,r,n,o,i,a,s,c?_c(s,a,n,o,c):null)}function Nf(e,t,r){fd.texParameteri(e,t,r)}function Uf(e,t,r,n,o,i,a,s,c){if(mo.currentContext.version>=2&&36193==s&&(s=5131),mo.currentContext.version>=2)if(fd.currentPixelUnpackBufferBinding)fd.texSubImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Ec(s);fd.texSubImage2D(e,t,r,n,o,i,a,s,u,c>>wc(u))}else fd.texSubImage2D(e,t,r,n,o,i,a,s,null);else{var l=null;c&&(l=_c(s,a,o,i,c)),fd.texSubImage2D(e,t,r,n,o,i,a,s,l)}}function Hf(e,t){fd.uniform1f(Cs(e),t)}function Bf(e,t){fd.uniform1i(Cs(e),t)}function Xf(e,t,r){if(mo.currentContext.version>=2)fd.uniform2fv(Cs(e),$,r>>2,2*t);else{if(t<=144)for(var n=eu[2*t-1],o=0;o<2*t;o+=2)n[o]=$[r+4*o>>2],n[o+1]=$[r+(4*o+4)>>2];else n=$.subarray(r>>2,r+8*t>>2);fd.uniform2fv(Cs(e),n)}}function Qf(e,t,r){fd.uniform2i(Cs(e),t,r)}function Gf(e,t,r){if(mo.currentContext.version>=2)fd.uniform2iv(Cs(e),z,r>>2,2*t);else{if(t<=144)for(var n=nu[2*t-1],o=0;o<2*t;o+=2)n[o]=z[r+4*o>>2],n[o+1]=z[r+(4*o+4)>>2];else n=z.subarray(r>>2,r+8*t>>2);fd.uniform2iv(Cs(e),n)}}function qf(e,t,r){if(mo.currentContext.version>=2)fd.uniform3fv(Cs(e),$,r>>2,3*t);else{if(t<=96)for(var n=eu[3*t-1],o=0;o<3*t;o+=3)n[o]=$[r+4*o>>2],n[o+1]=$[r+(4*o+4)>>2],n[o+2]=$[r+(4*o+8)>>2];else n=$.subarray(r>>2,r+12*t>>2);fd.uniform3fv(Cs(e),n)}}function Vf(e,t,r,n){fd.uniform3i(Cs(e),t,r,n)}function zf(e,t,r){if(mo.currentContext.version>=2)fd.uniform3iv(Cs(e),z,r>>2,3*t);else{if(t<=96)for(var n=nu[3*t-1],o=0;o<3*t;o+=3)n[o]=z[r+4*o>>2],n[o+1]=z[r+(4*o+4)>>2],n[o+2]=z[r+(4*o+8)>>2];else n=z.subarray(r>>2,r+12*t>>2);fd.uniform3iv(Cs(e),n)}}function Wf(e,t,r){if(mo.currentContext.version>=2)fd.uniform4fv(Cs(e),$,r>>2,4*t);else{if(t<=72){var n=eu[4*t-1],o=$;r>>=2;for(var i=0;i<4*t;i+=4){var a=r+i;n[i]=o[a],n[i+1]=o[a+1],n[i+2]=o[a+2],n[i+3]=o[a+3]}}else n=$.subarray(r>>2,r+16*t>>2);fd.uniform4fv(Cs(e),n)}}function $f(e,t,r,n,o){fd.uniform4i(Cs(e),t,r,n,o)}function Yf(e,t,r){if(mo.currentContext.version>=2)fd.uniform4iv(Cs(e),z,r>>2,4*t);else{if(t<=72)for(var n=nu[4*t-1],o=0;o<4*t;o+=4)n[o]=z[r+4*o>>2],n[o+1]=z[r+(4*o+4)>>2],n[o+2]=z[r+(4*o+8)>>2],n[o+3]=z[r+(4*o+12)>>2];else n=z.subarray(r>>2,r+16*t>>2);fd.uniform4iv(Cs(e),n)}}function Kf(e,t,r,n){if(mo.currentContext.version>=2)fd.uniformMatrix3fv(Cs(e),!!r,$,n>>2,9*t);else{if(t<=32)for(var o=eu[9*t-1],i=0;i<9*t;i+=9)o[i]=$[n+4*i>>2],o[i+1]=$[n+(4*i+4)>>2],o[i+2]=$[n+(4*i+8)>>2],o[i+3]=$[n+(4*i+12)>>2],o[i+4]=$[n+(4*i+16)>>2],o[i+5]=$[n+(4*i+20)>>2],o[i+6]=$[n+(4*i+24)>>2],o[i+7]=$[n+(4*i+28)>>2],o[i+8]=$[n+(4*i+32)>>2];else o=$.subarray(n>>2,n+36*t>>2);fd.uniformMatrix3fv(Cs(e),!!r,o)}}function Zf(e,t,r,n){if(mo.currentContext.version>=2)fd.uniformMatrix4fv(Cs(e),!!r,$,n>>2,16*t);else{if(t<=18){var o=eu[16*t-1],i=$;n>>=2;for(var a=0;a<16*t;a+=16){var s=n+a;o[a]=i[s],o[a+1]=i[s+1],o[a+2]=i[s+2],o[a+3]=i[s+3],o[a+4]=i[s+4],o[a+5]=i[s+5],o[a+6]=i[s+6],o[a+7]=i[s+7],o[a+8]=i[s+8],o[a+9]=i[s+9],o[a+10]=i[s+10],o[a+11]=i[s+11],o[a+12]=i[s+12],o[a+13]=i[s+13],o[a+14]=i[s+14],o[a+15]=i[s+15]}}else o=$.subarray(n>>2,n+64*t>>2);fd.uniformMatrix4fv(Cs(e),!!r,o)}}function Jf(e){e=mo.programs[e],fd.useProgram(e),fd.currentProgram=e}function ed(e,t,r,n,o,i){fd.vertexAttribPointer(e,t,r,!!n,o,i)}function td(e,t,r,n){fd.viewport(e,t,r,n)}function rd(e){S(e)}function nd(e){return e%4==0&&(e%100!=0||e%400==0)}function od(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var id=[31,29,31,30,31,30,31,31,30,31,30,31],ad=[31,28,31,30,31,30,31,31,30,31,30,31];function sd(e,t){for(var r=new Date(e.getTime());t>0;){var n=nd(r.getFullYear()),o=r.getMonth(),i=(n?id:ad)[o];if(!(t>i-r.getDate()))return r.setDate(r.getDate()+t),r;t-=i-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}function cd(e,t,r,n){var o=z[n+40>>2],i={tm_sec:z[n>>2],tm_min:z[n+4>>2],tm_hour:z[n+8>>2],tm_mday:z[n+12>>2],tm_mon:z[n+16>>2],tm_year:z[n+20>>2],tm_wday:z[n+24>>2],tm_yday:z[n+28>>2],tm_isdst:z[n+32>>2],tm_gmtoff:z[n+36>>2],tm_zone:o?N(o):""},a=N(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in s)a=a.replace(new RegExp(c,"g"),s[c]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function d(e,t){return f(e,t,"0")}function p(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function g(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function h(e){var t=sd(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=g(r),i=g(n);return p(o,t)<=0?p(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return u[e.tm_wday].substring(0,3)},"%A":function(e){return u[e.tm_wday]},"%b":function(e){return l[e.tm_mon].substring(0,3)},"%B":function(e){return l[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return f(e.tm_mday,2," ")},"%g":function(e){return h(e).toString().substring(2)},"%G":function(e){return h(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(e){return d(e.tm_mday+od(nd(e.tm_year+1900)?id:ad,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),r=0===t.getDay()?t:sd(t,7-t.getDay()),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(p(r,n)<0){var o=od(nd(n.getFullYear())?id:ad,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return d(Math.ceil(i/7),2)}return 0===p(r,t)?"01":"00"},"%V":function(e){var t,r=new Date(e.tm_year+1900,0,4),n=new Date(e.tm_year+1901,0,4),o=g(r),i=g(n),a=sd(new Date(e.tm_year+1900,0,1),e.tm_yday);return p(a,o)<0?"53":p(i,a)<=0?"01":(t=o.getFullYear()<e.tm_year+1900?e.tm_yday+32-o.getDate():e.tm_yday+1-o.getDate(),d(Math.ceil(t/7),2))},"%w":function(e){return e.tm_wday},"%W":function(e){var t=new Date(e.tm_year,0,1),r=1===t.getDay()?t:sd(t,0===t.getDay()?1:7-t.getDay()+1),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(p(r,n)<0){var o=od(nd(n.getFullYear())?id:ad,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return d(Math.ceil(i/7),2)}return 0===p(r,t)?"01":"00"},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var c in m)a.includes(c)&&(a=a.replace(new RegExp(c,"g"),m[c](i)));var v=bd(a,!1);return v.length>t?0:(ie(v,e),v.length-1)}function ud(e,t,r,n){return cd(e,t,r,n)}function ld(e){var t=Date.now()/1e3|0;return e&&(z[e>>2]=t),t}var fd,dd=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=yt.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},pd=365,gd=146;Object.defineProperties(dd.prototype,{read:{get:function(){return(this.mode&pd)===pd},set:function(e){e?this.mode|=pd:this.mode&=~pd}},write:{get:function(){return(this.mode&gd)===gd},set:function(e){e?this.mode|=gd:this.mode&=~gd}},isFolder:{get:function(){return yt.isDir(this.mode)}},isDevice:{get:function(){return yt.isChrdev(this.mode)}}}),yt.FSNode=dd,yt.staticInit(),o.FS_createPath=yt.createPath,o.FS_createDataFile=yt.createDataFile,o.FS_createPreloadedFile=yt.createPreloadedFile,o.FS_createLazyFile=yt.createLazyFile,o.FS_createDevice=yt.createDevice,o.FS_unlink=yt.unlink,bt={EPERM:63,ENOENT:44,ESRCH:71,EINTR:27,EIO:29,ENXIO:60,E2BIG:1,ENOEXEC:45,EBADF:8,ECHILD:12,EAGAIN:6,EWOULDBLOCK:6,ENOMEM:48,EACCES:2,EFAULT:21,ENOTBLK:105,EBUSY:10,EEXIST:20,EXDEV:75,ENODEV:43,ENOTDIR:54,EISDIR:31,EINVAL:28,ENFILE:41,EMFILE:33,ENOTTY:59,ETXTBSY:74,EFBIG:22,ENOSPC:51,ESPIPE:70,EROFS:69,EMLINK:34,EPIPE:64,EDOM:18,ERANGE:68,ENOMSG:49,EIDRM:24,ECHRNG:106,EL2NSYNC:156,EL3HLT:107,EL3RST:108,ELNRNG:109,EUNATCH:110,ENOCSI:111,EL2HLT:112,EDEADLK:16,ENOLCK:46,EBADE:113,EBADR:114,EXFULL:115,ENOANO:104,EBADRQC:103,EBADSLT:102,EDEADLOCK:16,EBFONT:101,ENOSTR:100,ENODATA:116,ETIME:117,ENOSR:118,ENONET:119,ENOPKG:120,EREMOTE:121,ENOLINK:47,EADV:122,ESRMNT:123,ECOMM:124,EPROTO:65,EMULTIHOP:36,EDOTDOT:125,EBADMSG:9,ENOTUNIQ:126,EBADFD:127,EREMCHG:128,ELIBACC:129,ELIBBAD:130,ELIBSCN:131,ELIBMAX:132,ELIBEXEC:133,ENOSYS:52,ENOTEMPTY:55,ENAMETOOLONG:37,ELOOP:32,EOPNOTSUPP:138,EPFNOSUPPORT:139,ECONNRESET:15,ENOBUFS:42,EAFNOSUPPORT:5,EPROTOTYPE:67,ENOTSOCK:57,ENOPROTOOPT:50,ESHUTDOWN:140,ECONNREFUSED:14,EADDRINUSE:3,ECONNABORTED:13,ENETUNREACH:40,ENETDOWN:38,ETIMEDOUT:73,EHOSTDOWN:142,EHOSTUNREACH:23,EINPROGRESS:26,EALREADY:7,EDESTADDRREQ:17,EMSGSIZE:35,EPROTONOSUPPORT:66,ESOCKTNOSUPPORT:137,EADDRNOTAVAIL:4,ENETRESET:39,EISCONN:30,ENOTCONN:53,ETOOMANYREFS:141,EUSERS:136,EDQUOT:19,ESTALE:72,ENOTSUP:138,ENOMEDIUM:148,EILSEQ:25,EOVERFLOW:61,ECANCELED:11,ENOTRECOVERABLE:56,EOWNERDEAD:62,ESTRPIPE:135},Lt=o.InternalError=jt(Error,"InternalError"),Qt(),Vt=o.BindingError=jt(Error,"BindingError"),fr(),Ir(),Sr(),Br=o.UnboundTypeError=jt(Error,"UnboundTypeError"),tn(),o.requestFullscreen=function(e,t){ao.requestFullscreen(e,t)},o.requestFullScreen=function(){ao.requestFullScreen()},o.requestAnimationFrame=function(e){ao.requestAnimationFrame(e)},o.setCanvasSize=function(e,t,r){ao.setCanvasSize(e,t,r)},o.pauseMainLoop=function(){ao.mainLoop.pause()},o.resumeMainLoop=function(){ao.mainLoop.resume()},o.getUserMedia=function(){ao.getUserMedia()},o.createContext=function(e,t,r,n){return ao.createContext(e,t,r,n)};for(var hd=0;hd<32;++hd)Zi.push(new Array(hd));var md=new Float32Array(288);for(hd=0;hd<288;++hd)eu[hd]=md.subarray(0,hd+1);var vd=new Int32Array(288);for(hd=0;hd<288;++hd)nu[hd]=vd.subarray(0,hd+1);function bd(e,t,r){var n=r>0?r:B(e)+1,o=new Array(n),i=U(e,o,0,o.length);return t&&(o.length=i),o}"function"==typeof atob&&atob;var yd,Ed={__assert_fail:rt,__cxa_allocate_exception:nt,__cxa_atexit:ot,__cxa_throw:at,__syscall_fcntl64:wt,__syscall_ioctl:_t,__syscall_open:Ot,_dlopen_js:Tt,_dlsym_js:Dt,_embind_finalize_value_object:Ht,_embind_register_bigint:Bt,_embind_register_bool:$t,_embind_register_class:Gr,_embind_register_class_constructor:Vr,_embind_register_class_function:$r,_embind_register_emval:nn,_embind_register_enum:an,_embind_register_enum_value:cn,_embind_register_float:fn,_embind_register_function:dn,_embind_register_integer:gn,_embind_register_memory_view:hn,_embind_register_smart_ptr:mn,_embind_register_std_string:vn,_embind_register_std_wstring:bn,_embind_register_value_object:yn,_embind_register_value_object_field:En,_embind_register_void:wn,_emscripten_throw_longjmp:_n,_emval_as:On,_emval_call:Dn,_emval_call_method:kn,_emval_call_void_method:Rn,_emval_decref:Zr,_emval_get_global:Fn,_emval_get_method_caller:Cn,_emval_get_property:jn,_emval_incref:Ln,_emval_instanceof:Nn,_emval_is_string:Un,_emval_new:Qn,_emval_new_array:Gn,_emval_new_cstring:qn,_emval_new_object:Vn,_emval_run_destructors:zn,_emval_set_property:Wn,_emval_take_value:$n,_emval_throw:Yn,abort:Kn,clock_gettime:Jn,eglChooseConfig:co,eglCreateContext:vo,eglCreateWindowSurface:bo,eglDestroyContext:yo,eglDestroySurface:Eo,eglGetConfigAttrib:wo,eglGetDisplay:_o,eglGetError:Oo,eglInitialize:To,eglMakeCurrent:Do,eglSwapBuffers:Po,eglTerminate:xo,emscripten_console_error:So,emscripten_console_log:Mo,emscripten_console_warn:ko,emscripten_debugger:Ro,emscripten_get_heap_max:Ao,emscripten_get_now:Bn,emscripten_glActiveTexture:Fo,emscripten_glAttachShader:Io,emscripten_glBeginQuery:Co,emscripten_glBeginQueryEXT:jo,emscripten_glBeginTransformFeedback:Lo,emscripten_glBindAttribLocation:No,emscripten_glBindBuffer:Uo,emscripten_glBindBufferBase:Ho,emscripten_glBindBufferRange:Bo,emscripten_glBindFramebuffer:Xo,emscripten_glBindRenderbuffer:Qo,emscripten_glBindSampler:Go,emscripten_glBindTexture:qo,emscripten_glBindTransformFeedback:Vo,emscripten_glBindVertexArray:zo,emscripten_glBindVertexArrayOES:Wo,emscripten_glBlendColor:$o,emscripten_glBlendEquation:Yo,emscripten_glBlendEquationSeparate:Ko,emscripten_glBlendFunc:Zo,emscripten_glBlendFuncSeparate:Jo,emscripten_glBlitFramebuffer:ei,emscripten_glBufferData:ti,emscripten_glBufferSubData:ri,emscripten_glCheckFramebufferStatus:ni,emscripten_glClear:oi,emscripten_glClearBufferfi:ii,emscripten_glClearBufferfv:ai,emscripten_glClearBufferiv:si,emscripten_glClearBufferuiv:ci,emscripten_glClearColor:ui,emscripten_glClearDepthf:li,emscripten_glClearStencil:fi,emscripten_glClientWaitSync:pi,emscripten_glColorMask:gi,emscripten_glCompileShader:hi,emscripten_glCompressedTexImage2D:mi,emscripten_glCompressedTexImage3D:vi,emscripten_glCompressedTexSubImage2D:bi,emscripten_glCompressedTexSubImage3D:yi,emscripten_glCopyBufferSubData:Ei,emscripten_glCopyTexImage2D:wi,emscripten_glCopyTexSubImage2D:_i,emscripten_glCopyTexSubImage3D:Oi,emscripten_glCreateProgram:Ti,emscripten_glCreateShader:Di,emscripten_glCullFace:Pi,emscripten_glDeleteBuffers:xi,emscripten_glDeleteFramebuffers:Si,emscripten_glDeleteProgram:Mi,emscripten_glDeleteQueries:ki,emscripten_glDeleteQueriesEXT:Ri,emscripten_glDeleteRenderbuffers:Ai,emscripten_glDeleteSamplers:Fi,emscripten_glDeleteShader:Ii,emscripten_glDeleteSync:Ci,emscripten_glDeleteTextures:ji,emscripten_glDeleteTransformFeedbacks:Li,emscripten_glDeleteVertexArrays:Ni,emscripten_glDeleteVertexArraysOES:Ui,emscripten_glDepthFunc:Hi,emscripten_glDepthMask:Bi,emscripten_glDepthRangef:Xi,emscripten_glDetachShader:Qi,emscripten_glDisable:Gi,emscripten_glDisableVertexAttribArray:qi,emscripten_glDrawArrays:Vi,emscripten_glDrawArraysInstanced:zi,emscripten_glDrawArraysInstancedANGLE:Wi,emscripten_glDrawArraysInstancedARB:$i,emscripten_glDrawArraysInstancedEXT:Yi,emscripten_glDrawArraysInstancedNV:Ki,emscripten_glDrawBuffers:Ji,emscripten_glDrawBuffersEXT:ea,emscripten_glDrawBuffersWEBGL:ta,emscripten_glDrawElements:ra,emscripten_glDrawElementsInstanced:na,emscripten_glDrawElementsInstancedANGLE:oa,emscripten_glDrawElementsInstancedARB:ia,emscripten_glDrawElementsInstancedEXT:aa,emscripten_glDrawElementsInstancedNV:sa,emscripten_glDrawRangeElements:ua,emscripten_glEnable:la,emscripten_glEnableVertexAttribArray:fa,emscripten_glEndQuery:da,emscripten_glEndQueryEXT:pa,emscripten_glEndTransformFeedback:ga,emscripten_glFenceSync:ha,emscripten_glFinish:ma,emscripten_glFlush:va,emscripten_glFramebufferRenderbuffer:ba,emscripten_glFramebufferTexture2D:ya,emscripten_glFramebufferTextureLayer:Ea,emscripten_glFrontFace:wa,emscripten_glGenBuffers:Oa,emscripten_glGenFramebuffers:Ta,emscripten_glGenQueries:Da,emscripten_glGenQueriesEXT:Pa,emscripten_glGenRenderbuffers:xa,emscripten_glGenSamplers:Sa,emscripten_glGenTextures:Ma,emscripten_glGenTransformFeedbacks:ka,emscripten_glGenVertexArrays:Ra,emscripten_glGenVertexArraysOES:Aa,emscripten_glGenerateMipmap:Fa,emscripten_glGetActiveAttrib:Ca,emscripten_glGetActiveUniform:ja,emscripten_glGetActiveUniformBlockName:La,emscripten_glGetActiveUniformBlockiv:Na,emscripten_glGetActiveUniformsiv:Ua,emscripten_glGetAttachedShaders:Ha,emscripten_glGetAttribLocation:Ba,emscripten_glGetBooleanv:Va,emscripten_glGetBufferParameteri64v:za,emscripten_glGetBufferParameteriv:Wa,emscripten_glGetError:$a,emscripten_glGetFloatv:Ya,emscripten_glGetFragDataLocation:Ka,emscripten_glGetFramebufferAttachmentParameteriv:Za,emscripten_glGetInteger64i_v:es,emscripten_glGetInteger64v:ts,emscripten_glGetIntegeri_v:rs,emscripten_glGetIntegerv:ns,emscripten_glGetInternalformativ:os,emscripten_glGetProgramBinary:is,emscripten_glGetProgramInfoLog:as,emscripten_glGetProgramiv:ss,emscripten_glGetQueryObjecti64vEXT:cs,emscripten_glGetQueryObjectivEXT:us,emscripten_glGetQueryObjectui64vEXT:ls,emscripten_glGetQueryObjectuiv:fs,emscripten_glGetQueryObjectuivEXT:ds,emscripten_glGetQueryiv:ps,emscripten_glGetQueryivEXT:gs,emscripten_glGetRenderbufferParameteriv:hs,emscripten_glGetSamplerParameterfv:ms,emscripten_glGetSamplerParameteriv:vs,emscripten_glGetShaderInfoLog:bs,emscripten_glGetShaderPrecisionFormat:ys,emscripten_glGetShaderSource:Es,emscripten_glGetShaderiv:ws,emscripten_glGetString:Os,emscripten_glGetStringi:Ts,emscripten_glGetSynciv:Ds,emscripten_glGetTexParameterfv:Ps,emscripten_glGetTexParameteriv:xs,emscripten_glGetTransformFeedbackVarying:Ss,emscripten_glGetUniformBlockIndex:Ms,emscripten_glGetUniformIndices:ks,emscripten_glGetUniformLocation:Is,emscripten_glGetUniformfv:Ls,emscripten_glGetUniformiv:Ns,emscripten_glGetUniformuiv:Us,emscripten_glGetVertexAttribIiv:Bs,emscripten_glGetVertexAttribIuiv:Xs,emscripten_glGetVertexAttribPointerv:Qs,emscripten_glGetVertexAttribfv:Gs,emscripten_glGetVertexAttribiv:qs,emscripten_glHint:Vs,emscripten_glInvalidateFramebuffer:zs,emscripten_glInvalidateSubFramebuffer:Ws,emscripten_glIsBuffer:$s,emscripten_glIsEnabled:Ys,emscripten_glIsFramebuffer:Ks,emscripten_glIsProgram:Zs,emscripten_glIsQuery:Js,emscripten_glIsQueryEXT:ec,emscripten_glIsRenderbuffer:tc,emscripten_glIsSampler:rc,emscripten_glIsShader:nc,emscripten_glIsSync:oc,emscripten_glIsTexture:ic,emscripten_glIsTransformFeedback:ac,emscripten_glIsVertexArray:sc,emscripten_glIsVertexArrayOES:cc,emscripten_glLineWidth:uc,emscripten_glLinkProgram:lc,emscripten_glPauseTransformFeedback:fc,emscripten_glPixelStorei:dc,emscripten_glPolygonOffset:pc,emscripten_glProgramBinary:gc,emscripten_glProgramParameteri:hc,emscripten_glQueryCounterEXT:mc,emscripten_glReadBuffer:vc,emscripten_glReadPixels:Oc,emscripten_glReleaseShaderCompiler:Tc,emscripten_glRenderbufferStorage:Dc,emscripten_glRenderbufferStorageMultisample:Pc,emscripten_glResumeTransformFeedback:xc,emscripten_glSampleCoverage:Sc,emscripten_glSamplerParameterf:Mc,emscripten_glSamplerParameterfv:kc,emscripten_glSamplerParameteri:Rc,emscripten_glSamplerParameteriv:Ac,emscripten_glScissor:Fc,emscripten_glShaderBinary:Ic,emscripten_glShaderSource:Cc,emscripten_glStencilFunc:jc,emscripten_glStencilFuncSeparate:Lc,emscripten_glStencilMask:Nc,emscripten_glStencilMaskSeparate:Uc,emscripten_glStencilOp:Hc,emscripten_glStencilOpSeparate:Bc,emscripten_glTexImage2D:Xc,emscripten_glTexImage3D:Qc,emscripten_glTexParameterf:Gc,emscripten_glTexParameterfv:qc,emscripten_glTexParameteri:Vc,emscripten_glTexParameteriv:zc,emscripten_glTexStorage2D:Wc,emscripten_glTexStorage3D:$c,emscripten_glTexSubImage2D:Yc,emscripten_glTexSubImage3D:Kc,emscripten_glTransformFeedbackVaryings:Zc,emscripten_glUniform1f:Jc,emscripten_glUniform1fv:tu,emscripten_glUniform1i:ru,emscripten_glUniform1iv:ou,emscripten_glUniform1ui:iu,emscripten_glUniform1uiv:au,emscripten_glUniform2f:su,emscripten_glUniform2fv:cu,emscripten_glUniform2i:uu,emscripten_glUniform2iv:lu,emscripten_glUniform2ui:fu,emscripten_glUniform2uiv:du,emscripten_glUniform3f:pu,emscripten_glUniform3fv:gu,emscripten_glUniform3i:hu,emscripten_glUniform3iv:mu,emscripten_glUniform3ui:vu,emscripten_glUniform3uiv:bu,emscripten_glUniform4f:yu,emscripten_glUniform4fv:Eu,emscripten_glUniform4i:wu,emscripten_glUniform4iv:_u,emscripten_glUniform4ui:Ou,emscripten_glUniform4uiv:Tu,emscripten_glUniformBlockBinding:Du,emscripten_glUniformMatrix2fv:Pu,emscripten_glUniformMatrix2x3fv:xu,emscripten_glUniformMatrix2x4fv:Su,emscripten_glUniformMatrix3fv:Mu,emscripten_glUniformMatrix3x2fv:ku,emscripten_glUniformMatrix3x4fv:Ru,emscripten_glUniformMatrix4fv:Au,emscripten_glUniformMatrix4x2fv:Fu,emscripten_glUniformMatrix4x3fv:Iu,emscripten_glUseProgram:Cu,emscripten_glValidateProgram:ju,emscripten_glVertexAttrib1f:Lu,emscripten_glVertexAttrib1fv:Nu,emscripten_glVertexAttrib2f:Uu,emscripten_glVertexAttrib2fv:Hu,emscripten_glVertexAttrib3f:Bu,emscripten_glVertexAttrib3fv:Xu,emscripten_glVertexAttrib4f:Qu,emscripten_glVertexAttrib4fv:Gu,emscripten_glVertexAttribDivisor:qu,emscripten_glVertexAttribDivisorANGLE:Vu,emscripten_glVertexAttribDivisorARB:zu,emscripten_glVertexAttribDivisorEXT:Wu,emscripten_glVertexAttribDivisorNV:$u,emscripten_glVertexAttribI4i:Yu,emscripten_glVertexAttribI4iv:Ku,emscripten_glVertexAttribI4ui:Zu,emscripten_glVertexAttribI4uiv:Ju,emscripten_glVertexAttribIPointer:el,emscripten_glVertexAttribPointer:tl,emscripten_glViewport:rl,emscripten_glWaitSync:nl,emscripten_memcpy_big:ol,emscripten_resize_heap:al,emscripten_ubq_fetch_allocateFetchResult:sl,emscripten_ubq_fetch_createHeader:cl,emscripten_ubq_fetch_deleteHeader:ul,emscripten_ubq_fetch_dispatchAsyncFetch:ll,emscripten_ubq_fetch_freeFetchResult:fl,emscripten_ubq_fetch_getFetchCompletedBytes:dl,emscripten_ubq_fetch_getFetchResultAddress:pl,emscripten_ubq_fetch_getFetchResultLength:gl,emscripten_ubq_fetch_getFetchState:hl,emscripten_ubq_fetch_getFetchTotalBytes:ml,emscripten_webgl_create_context:Tl,emscripten_webgl_init_context_attributes:Dl,emscripten_webgl_make_context_current:Pl,environ_get:kl,environ_sizes_get:Rl,fd_close:Al,fd_read:Fl,fd_seek:Il,fd_write:Cl,getTempRet0:jl,gettimeofday:Ll,glActiveTexture:Nl,glAttachShader:Ul,glBindBuffer:Hl,glBindFramebuffer:Bl,glBindRenderbuffer:Xl,glBindTexture:Ql,glBlendEquation:Gl,glBlendEquationSeparate:ql,glBlendFunc:Vl,glBlendFuncSeparate:zl,glBufferData:Wl,glClear:$l,glClearColor:Yl,glClearStencil:Kl,glColorMask:Zl,glCompileShader:Jl,glCreateProgram:ef,glCreateShader:tf,glDeleteBuffers:rf,glDeleteFramebuffers:nf,glDeleteProgram:of,glDeleteRenderbuffers:af,glDeleteShader:sf,glDeleteTextures:cf,glDepthMask:uf,glDetachShader:lf,glDisable:ff,glDrawArrays:df,glEnable:pf,glEnableVertexAttribArray:gf,glFinish:hf,glFramebufferRenderbuffer:mf,glFramebufferTexture2D:vf,glGenBuffers:bf,glGenFramebuffers:yf,glGenRenderbuffers:Ef,glGenTextures:wf,glGetAttribLocation:_f,glGetError:Of,glGetIntegerv:Tf,glGetProgramInfoLog:Df,glGetProgramiv:Pf,glGetShaderPrecisionFormat:xf,glGetString:Sf,glGetUniformLocation:Mf,glLinkProgram:kf,glReadPixels:Rf,glRenderbufferStorage:Af,glShaderSource:Ff,glStencilFunc:If,glStencilMask:Cf,glStencilOp:jf,glTexImage2D:Lf,glTexParameteri:Nf,glTexSubImage2D:Uf,glUniform1f:Hf,glUniform1i:Bf,glUniform2fv:Xf,glUniform2i:Qf,glUniform2iv:Gf,glUniform3fv:qf,glUniform3i:Vf,glUniform3iv:zf,glUniform4fv:Wf,glUniform4i:$f,glUniform4iv:Yf,glUniformMatrix3fv:Kf,glUniformMatrix4fv:Zf,glUseProgram:Jf,glVertexAttribPointer:ed,glViewport:td,invoke_iii:Fd,invoke_iiii:Cd,invoke_iiiii:Id,invoke_v:jd,invoke_vii:Ld,invoke_viiii:Ad,setTempRet0:rd,strftime_l:ud,time:ld},wd=(We(),o.___wasm_call_ctors=qe("__wasm_call_ctors"),o._malloc=qe("malloc")),_d=(o._main=qe("main"),o._free=qe("free")),Od=o.___errno_location=qe("__errno_location"),Td=(o._saveSetjmp=qe("saveSetjmp"),o._fflush=qe("fflush"),o.___getTypeName=qe("__getTypeName")),Dd=(o.___embind_register_native_and_builtin_types=qe("__embind_register_native_and_builtin_types"),o.___dl_seterr=qe("__dl_seterr"),o.stackSave=qe("stackSave")),Pd=o.stackRestore=qe("stackRestore"),xd=o.stackAlloc=qe("stackAlloc"),Sd=o._emscripten_stack_init=function(){return(Sd=o._emscripten_stack_init=o.asm.emscripten_stack_init).apply(null,arguments)},Md=(o._emscripten_stack_get_free=function(){return(o._emscripten_stack_get_free=o.asm.emscripten_stack_get_free).apply(null,arguments)},o._emscripten_stack_get_end=function(){return(Md=o._emscripten_stack_get_end=o.asm.emscripten_stack_get_end).apply(null,arguments)}),kd=o._setThrew=qe("setThrew"),Rd=o._memalign=qe("memalign");function Ad(e,t,r,n,o){var i=Dd();try{et(e)(t,r,n,o)}catch(e){if(Pd(i),e!==e+0&&"longjmp"!==e)throw e;kd(1,0)}}function Fd(e,t,r){var n=Dd();try{return et(e)(t,r)}catch(e){if(Pd(n),e!==e+0&&"longjmp"!==e)throw e;kd(1,0)}}function Id(e,t,r,n,o){var i=Dd();try{return et(e)(t,r,n,o)}catch(e){if(Pd(i),e!==e+0&&"longjmp"!==e)throw e;kd(1,0)}}function Cd(e,t,r,n){var o=Dd();try{return et(e)(t,r,n)}catch(e){if(Pd(o),e!==e+0&&"longjmp"!==e)throw e;kd(1,0)}}function jd(e){var t=Dd();try{et(e)()}catch(e){if(Pd(t),e!==e+0&&"longjmp"!==e)throw e;kd(1,0)}}function Ld(e,t,r){var n=Dd();try{et(e)(t,r)}catch(e){if(Pd(n),e!==e+0&&"longjmp"!==e)throw e;kd(1,0)}}function Nd(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function Ud(e){C(0==Re,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),C(0==ge.length,"cannot call main when preRun functions remain to be called");var t=o._main,r=(e=e||[]).length+1,n=xd(4*(r+1));z[n>>2]=oe(f);for(var i=1;i<r;i++)z[(n>>2)+i]=oe(e[i-1]);z[(n>>2)+r]=0;try{var a=t(r,n);return Qd(a,!0),a}catch(e){return tt(e)}}function Hd(){Sd(),de()}function Bd(e){function r(){yd||(yd=!0,o.calledRun=!0,I||(Te(),De(),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),qd&&Ud(e),xe()))}e=e||l,Re>0||(Hd(),Oe(),Re>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),r()}),1)):r(),pe()))}function Xd(){var e=O,t=T,r=!1;O=T=function(e){r=!0};try{var n=o._fflush;n&&n(0),["stdout","stderr"].forEach((function(e){var t=yt.analyzePath("/dev/"+e);if(t){var n=t.object.rdev,o=ft.ttys[n];o&&o.output&&o.output.length&&(r=!0)}}))}catch(e){}O=e,T=t,r&&D("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.")}function Qd(e,t){if(F=e,Xd(),_e()){if(!t){var r="program exited (with status: "+e+"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)";n(r),T(r)}}else Pe();Gd(e)}function Gd(e){F=e,_e()||(o.onExit&&o.onExit(e),I=!0),d(e,new Nd(e))}if(o.dynCall_ji=qe("dynCall_ji"),o.dynCall_jij=qe("dynCall_jij"),o.dynCall_iiiijii=qe("dynCall_iiiijii"),o.dynCall_viiij=qe("dynCall_viiij"),o.dynCall_jiji=qe("dynCall_jiji"),o.dynCall_iiiiij=qe("dynCall_iiiiij"),o.dynCall_iiiiijj=qe("dynCall_iiiiijj"),o.dynCall_iiiiiijj=qe("dynCall_iiiiiijj"),o.dynCall_viijii=qe("dynCall_viijii"),Object.getOwnPropertyDescriptor(o,"intArrayFromString")||(o.intArrayFromString=function(){Ne("'intArrayFromString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"intArrayToString")||(o.intArrayToString=function(){Ne("'intArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"ccall")||(o.ccall=function(){Ne("'ccall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"cwrap")||(o.cwrap=function(){Ne("'cwrap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"setValue")||(o.setValue=function(){Ne("'setValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),o.getValue=A,Object.getOwnPropertyDescriptor(o,"allocate")||(o.allocate=function(){Ne("'allocate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"UTF8ArrayToString")||(o.UTF8ArrayToString=function(){Ne("'UTF8ArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),o.UTF8ToString=N,Object.getOwnPropertyDescriptor(o,"stringToUTF8Array")||(o.stringToUTF8Array=function(){Ne("'stringToUTF8Array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"stringToUTF8")||(o.stringToUTF8=function(){Ne("'stringToUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF8")||(o.lengthBytesUTF8=function(){Ne("'lengthBytesUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"stackTrace")||(o.stackTrace=function(){Ne("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"addOnPreRun")||(o.addOnPreRun=function(){Ne("'addOnPreRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"addOnInit")||(o.addOnInit=function(){Ne("'addOnInit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"addOnPreMain")||(o.addOnPreMain=function(){Ne("'addOnPreMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"addOnExit")||(o.addOnExit=function(){Ne("'addOnExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"addOnPostRun")||(o.addOnPostRun=function(){Ne("'addOnPostRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"writeStringToMemory")||(o.writeStringToMemory=function(){Ne("'writeStringToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"writeArrayToMemory")||(o.writeArrayToMemory=function(){Ne("'writeArrayToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"writeAsciiToMemory")||(o.writeAsciiToMemory=function(){Ne("'writeAsciiToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),o.addRunDependency=je,o.removeRunDependency=Le,Object.getOwnPropertyDescriptor(o,"FS_createFolder")||(o.FS_createFolder=function(){Ne("'FS_createFolder' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),o.FS_createPath=yt.createPath,o.FS_createDataFile=yt.createDataFile,o.FS_createPreloadedFile=yt.createPreloadedFile,o.FS_createLazyFile=yt.createLazyFile,Object.getOwnPropertyDescriptor(o,"FS_createLink")||(o.FS_createLink=function(){Ne("'FS_createLink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),o.FS_createDevice=yt.createDevice,o.FS_unlink=yt.unlink,Object.getOwnPropertyDescriptor(o,"getLEB")||(o.getLEB=function(){Ne("'getLEB' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getFunctionTables")||(o.getFunctionTables=function(){Ne("'getFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"alignFunctionTables")||(o.alignFunctionTables=function(){Ne("'alignFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerFunctions")||(o.registerFunctions=function(){Ne("'registerFunctions' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"addFunction")||(o.addFunction=function(){Ne("'addFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"removeFunction")||(o.removeFunction=function(){Ne("'removeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getFuncWrapper")||(o.getFuncWrapper=function(){Ne("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"prettyPrint")||(o.prettyPrint=function(){Ne("'prettyPrint' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"dynCall")||(o.dynCall=function(){Ne("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getCompilerSetting")||(o.getCompilerSetting=function(){Ne("'getCompilerSetting' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"print")||(o.print=function(){Ne("'print' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"printErr")||(o.printErr=function(){Ne("'printErr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getTempRet0")||(o.getTempRet0=function(){Ne("'getTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"setTempRet0")||(o.setTempRet0=function(){Ne("'setTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"callMain")||(o.callMain=function(){Ne("'callMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"abort")||(o.abort=function(){Ne("'abort' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"keepRuntimeAlive")||(o.keepRuntimeAlive=function(){Ne("'keepRuntimeAlive' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"zeroMemory")||(o.zeroMemory=function(){Ne("'zeroMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"stringToNewUTF8")||(o.stringToNewUTF8=function(){Ne("'stringToNewUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"setFileTime")||(o.setFileTime=function(){Ne("'setFileTime' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"emscripten_realloc_buffer")||(o.emscripten_realloc_buffer=function(){Ne("'emscripten_realloc_buffer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"ENV")||(o.ENV=function(){Ne("'ENV' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"withStackSave")||(o.withStackSave=function(){Ne("'withStackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"ERRNO_CODES")||(o.ERRNO_CODES=function(){Ne("'ERRNO_CODES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"ERRNO_MESSAGES")||(o.ERRNO_MESSAGES=function(){Ne("'ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"setErrNo")||(o.setErrNo=function(){Ne("'setErrNo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"inetPton4")||(o.inetPton4=function(){Ne("'inetPton4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"inetNtop4")||(o.inetNtop4=function(){Ne("'inetNtop4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"inetPton6")||(o.inetPton6=function(){Ne("'inetPton6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"inetNtop6")||(o.inetNtop6=function(){Ne("'inetNtop6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"readSockaddr")||(o.readSockaddr=function(){Ne("'readSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"writeSockaddr")||(o.writeSockaddr=function(){Ne("'writeSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"DNS")||(o.DNS=function(){Ne("'DNS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getHostByName")||(o.getHostByName=function(){Ne("'getHostByName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"GAI_ERRNO_MESSAGES")||(o.GAI_ERRNO_MESSAGES=function(){Ne("'GAI_ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"Protocols")||(o.Protocols=function(){Ne("'Protocols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"Sockets")||(o.Sockets=function(){Ne("'Sockets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getRandomDevice")||(o.getRandomDevice=function(){Ne("'getRandomDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"traverseStack")||(o.traverseStack=function(){Ne("'traverseStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"UNWIND_CACHE")||(o.UNWIND_CACHE=function(){Ne("'UNWIND_CACHE' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"readAsmConstArgsArray")||(o.readAsmConstArgsArray=function(){Ne("'readAsmConstArgsArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"readAsmConstArgs")||(o.readAsmConstArgs=function(){Ne("'readAsmConstArgs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"mainThreadEM_ASM")||(o.mainThreadEM_ASM=function(){Ne("'mainThreadEM_ASM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"jstoi_q")||(o.jstoi_q=function(){Ne("'jstoi_q' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"jstoi_s")||(o.jstoi_s=function(){Ne("'jstoi_s' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getExecutableName")||(o.getExecutableName=function(){Ne("'getExecutableName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"listenOnce")||(o.listenOnce=function(){Ne("'listenOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"autoResumeAudioContext")||(o.autoResumeAudioContext=function(){Ne("'autoResumeAudioContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"dynCallLegacy")||(o.dynCallLegacy=function(){Ne("'dynCallLegacy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getDynCaller")||(o.getDynCaller=function(){Ne("'getDynCaller' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"dynCall")||(o.dynCall=function(){Ne("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"callRuntimeCallbacks")||(o.callRuntimeCallbacks=function(){Ne("'callRuntimeCallbacks' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"wasmTableMirror")||(o.wasmTableMirror=function(){Ne("'wasmTableMirror' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"setWasmTableEntry")||(o.setWasmTableEntry=function(){Ne("'setWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getWasmTableEntry")||(o.getWasmTableEntry=function(){Ne("'getWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"handleException")||(o.handleException=function(){Ne("'handleException' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"runtimeKeepalivePush")||(o.runtimeKeepalivePush=function(){Ne("'runtimeKeepalivePush' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"runtimeKeepalivePop")||(o.runtimeKeepalivePop=function(){Ne("'runtimeKeepalivePop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"callUserCallback")||(o.callUserCallback=function(){Ne("'callUserCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"maybeExit")||(o.maybeExit=function(){Ne("'maybeExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"safeSetTimeout")||(o.safeSetTimeout=function(){Ne("'safeSetTimeout' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"asmjsMangle")||(o.asmjsMangle=function(){Ne("'asmjsMangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"asyncLoad")||(o.asyncLoad=function(){Ne("'asyncLoad' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"alignMemory")||(o.alignMemory=function(){Ne("'alignMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"mmapAlloc")||(o.mmapAlloc=function(){Ne("'mmapAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"reallyNegative")||(o.reallyNegative=function(){Ne("'reallyNegative' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"unSign")||(o.unSign=function(){Ne("'unSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"reSign")||(o.reSign=function(){Ne("'reSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"formatString")||(o.formatString=function(){Ne("'formatString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"PATH")||(o.PATH=function(){Ne("'PATH' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"PATH_FS")||(o.PATH_FS=function(){Ne("'PATH_FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"SYSCALLS")||(o.SYSCALLS=function(){Ne("'SYSCALLS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"syscallMmap2")||(o.syscallMmap2=function(){Ne("'syscallMmap2' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"syscallMunmap")||(o.syscallMunmap=function(){Ne("'syscallMunmap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getSocketFromFD")||(o.getSocketFromFD=function(){Ne("'getSocketFromFD' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getSocketAddress")||(o.getSocketAddress=function(){Ne("'getSocketAddress' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"JSEvents")||(o.JSEvents=function(){Ne("'JSEvents' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerKeyEventCallback")||(o.registerKeyEventCallback=function(){Ne("'registerKeyEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"specialHTMLTargets")||(o.specialHTMLTargets=function(){Ne("'specialHTMLTargets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"maybeCStringToJsString")||(o.maybeCStringToJsString=function(){Ne("'maybeCStringToJsString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"findEventTarget")||(o.findEventTarget=function(){Ne("'findEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"findCanvasEventTarget")||(o.findCanvasEventTarget=function(){Ne("'findCanvasEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getBoundingClientRect")||(o.getBoundingClientRect=function(){Ne("'getBoundingClientRect' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"fillMouseEventData")||(o.fillMouseEventData=function(){Ne("'fillMouseEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerMouseEventCallback")||(o.registerMouseEventCallback=function(){Ne("'registerMouseEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerWheelEventCallback")||(o.registerWheelEventCallback=function(){Ne("'registerWheelEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerUiEventCallback")||(o.registerUiEventCallback=function(){Ne("'registerUiEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerFocusEventCallback")||(o.registerFocusEventCallback=function(){Ne("'registerFocusEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"fillDeviceOrientationEventData")||(o.fillDeviceOrientationEventData=function(){Ne("'fillDeviceOrientationEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerDeviceOrientationEventCallback")||(o.registerDeviceOrientationEventCallback=function(){Ne("'registerDeviceOrientationEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"fillDeviceMotionEventData")||(o.fillDeviceMotionEventData=function(){Ne("'fillDeviceMotionEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerDeviceMotionEventCallback")||(o.registerDeviceMotionEventCallback=function(){Ne("'registerDeviceMotionEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"screenOrientation")||(o.screenOrientation=function(){Ne("'screenOrientation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"fillOrientationChangeEventData")||(o.fillOrientationChangeEventData=function(){Ne("'fillOrientationChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerOrientationChangeEventCallback")||(o.registerOrientationChangeEventCallback=function(){Ne("'registerOrientationChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"fillFullscreenChangeEventData")||(o.fillFullscreenChangeEventData=function(){Ne("'fillFullscreenChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerFullscreenChangeEventCallback")||(o.registerFullscreenChangeEventCallback=function(){Ne("'registerFullscreenChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerRestoreOldStyle")||(o.registerRestoreOldStyle=function(){Ne("'registerRestoreOldStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"hideEverythingExceptGivenElement")||(o.hideEverythingExceptGivenElement=function(){Ne("'hideEverythingExceptGivenElement' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"restoreHiddenElements")||(o.restoreHiddenElements=function(){Ne("'restoreHiddenElements' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"setLetterbox")||(o.setLetterbox=function(){Ne("'setLetterbox' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"currentFullscreenStrategy")||(o.currentFullscreenStrategy=function(){Ne("'currentFullscreenStrategy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"restoreOldWindowedStyle")||(o.restoreOldWindowedStyle=function(){Ne("'restoreOldWindowedStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"softFullscreenResizeWebGLRenderTarget")||(o.softFullscreenResizeWebGLRenderTarget=function(){Ne("'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"doRequestFullscreen")||(o.doRequestFullscreen=function(){Ne("'doRequestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"fillPointerlockChangeEventData")||(o.fillPointerlockChangeEventData=function(){Ne("'fillPointerlockChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerPointerlockChangeEventCallback")||(o.registerPointerlockChangeEventCallback=function(){Ne("'registerPointerlockChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerPointerlockErrorEventCallback")||(o.registerPointerlockErrorEventCallback=function(){Ne("'registerPointerlockErrorEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"requestPointerLock")||(o.requestPointerLock=function(){Ne("'requestPointerLock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"fillVisibilityChangeEventData")||(o.fillVisibilityChangeEventData=function(){Ne("'fillVisibilityChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerVisibilityChangeEventCallback")||(o.registerVisibilityChangeEventCallback=function(){Ne("'registerVisibilityChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerTouchEventCallback")||(o.registerTouchEventCallback=function(){Ne("'registerTouchEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"fillGamepadEventData")||(o.fillGamepadEventData=function(){Ne("'fillGamepadEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerGamepadEventCallback")||(o.registerGamepadEventCallback=function(){Ne("'registerGamepadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerBeforeUnloadEventCallback")||(o.registerBeforeUnloadEventCallback=function(){Ne("'registerBeforeUnloadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"fillBatteryEventData")||(o.fillBatteryEventData=function(){Ne("'fillBatteryEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"battery")||(o.battery=function(){Ne("'battery' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerBatteryEventCallback")||(o.registerBatteryEventCallback=function(){Ne("'registerBatteryEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"setCanvasElementSize")||(o.setCanvasElementSize=function(){Ne("'setCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getCanvasElementSize")||(o.getCanvasElementSize=function(){Ne("'getCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"demangle")||(o.demangle=function(){Ne("'demangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"demangleAll")||(o.demangleAll=function(){Ne("'demangleAll' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"jsStackTrace")||(o.jsStackTrace=function(){Ne("'jsStackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"stackTrace")||(o.stackTrace=function(){Ne("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getEnvStrings")||(o.getEnvStrings=function(){Ne("'getEnvStrings' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"checkWasiClock")||(o.checkWasiClock=function(){Ne("'checkWasiClock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"writeI53ToI64")||(o.writeI53ToI64=function(){Ne("'writeI53ToI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"writeI53ToI64Clamped")||(o.writeI53ToI64Clamped=function(){Ne("'writeI53ToI64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"writeI53ToI64Signaling")||(o.writeI53ToI64Signaling=function(){Ne("'writeI53ToI64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"writeI53ToU64Clamped")||(o.writeI53ToU64Clamped=function(){Ne("'writeI53ToU64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"writeI53ToU64Signaling")||(o.writeI53ToU64Signaling=function(){Ne("'writeI53ToU64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"readI53FromI64")||(o.readI53FromI64=function(){Ne("'readI53FromI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"readI53FromU64")||(o.readI53FromU64=function(){Ne("'readI53FromU64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"convertI32PairToI53")||(o.convertI32PairToI53=function(){Ne("'convertI32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"convertU32PairToI53")||(o.convertU32PairToI53=function(){Ne("'convertU32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"setImmediateWrapped")||(o.setImmediateWrapped=function(){Ne("'setImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"clearImmediateWrapped")||(o.clearImmediateWrapped=function(){Ne("'clearImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"polyfillSetImmediate")||(o.polyfillSetImmediate=function(){Ne("'polyfillSetImmediate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"uncaughtExceptionCount")||(o.uncaughtExceptionCount=function(){Ne("'uncaughtExceptionCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"exceptionLast")||(o.exceptionLast=function(){Ne("'exceptionLast' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"exceptionCaught")||(o.exceptionCaught=function(){Ne("'exceptionCaught' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"ExceptionInfo")||(o.ExceptionInfo=function(){Ne("'ExceptionInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"CatchInfo")||(o.CatchInfo=function(){Ne("'CatchInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"exception_addRef")||(o.exception_addRef=function(){Ne("'exception_addRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"exception_decRef")||(o.exception_decRef=function(){Ne("'exception_decRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"Browser")||(o.Browser=function(){Ne("'Browser' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"funcWrappers")||(o.funcWrappers=function(){Ne("'funcWrappers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getFuncWrapper")||(o.getFuncWrapper=function(){Ne("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"setMainLoop")||(o.setMainLoop=function(){Ne("'setMainLoop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"wget")||(o.wget=function(){Ne("'wget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"FS")||(o.FS=function(){Ne("'FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"MEMFS")||(o.MEMFS=function(){Ne("'MEMFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"TTY")||(o.TTY=function(){Ne("'TTY' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"PIPEFS")||(o.PIPEFS=function(){Ne("'PIPEFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"SOCKFS")||(o.SOCKFS=function(){Ne("'SOCKFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"_setNetworkCallback")||(o._setNetworkCallback=function(){Ne("'_setNetworkCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"tempFixedLengthArray")||(o.tempFixedLengthArray=function(){Ne("'tempFixedLengthArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"miniTempWebGLFloatBuffers")||(o.miniTempWebGLFloatBuffers=function(){Ne("'miniTempWebGLFloatBuffers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"heapObjectForWebGLType")||(o.heapObjectForWebGLType=function(){Ne("'heapObjectForWebGLType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"heapAccessShiftForWebGLHeap")||(o.heapAccessShiftForWebGLHeap=function(){Ne("'heapAccessShiftForWebGLHeap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"GL")||(o.GL=function(){Ne("'GL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGet")||(o.emscriptenWebGLGet=function(){Ne("'emscriptenWebGLGet' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"computeUnpackAlignedImageSize")||(o.computeUnpackAlignedImageSize=function(){Ne("'computeUnpackAlignedImageSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetTexPixelData")||(o.emscriptenWebGLGetTexPixelData=function(){Ne("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetUniform")||(o.emscriptenWebGLGetUniform=function(){Ne("'emscriptenWebGLGetUniform' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"webglGetUniformLocation")||(o.webglGetUniformLocation=function(){Ne("'webglGetUniformLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"webglPrepareUniformLocationsBeforeFirstUse")||(o.webglPrepareUniformLocationsBeforeFirstUse=function(){Ne("'webglPrepareUniformLocationsBeforeFirstUse' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"webglGetLeftBracePos")||(o.webglGetLeftBracePos=function(){Ne("'webglGetLeftBracePos' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetVertexAttrib")||(o.emscriptenWebGLGetVertexAttrib=function(){Ne("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"writeGLArray")||(o.writeGLArray=function(){Ne("'writeGLArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"AL")||(o.AL=function(){Ne("'AL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"SDL_unicode")||(o.SDL_unicode=function(){Ne("'SDL_unicode' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"SDL_ttfContext")||(o.SDL_ttfContext=function(){Ne("'SDL_ttfContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"SDL_audio")||(o.SDL_audio=function(){Ne("'SDL_audio' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"SDL")||(o.SDL=function(){Ne("'SDL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"SDL_gfx")||(o.SDL_gfx=function(){Ne("'SDL_gfx' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"GLUT")||(o.GLUT=function(){Ne("'GLUT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"EGL")||(o.EGL=function(){Ne("'EGL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"GLFW_Window")||(o.GLFW_Window=function(){Ne("'GLFW_Window' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"GLFW")||(o.GLFW=function(){Ne("'GLFW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"GLEW")||(o.GLEW=function(){Ne("'GLEW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"IDBStore")||(o.IDBStore=function(){Ne("'IDBStore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"runAndAbortIfError")||(o.runAndAbortIfError=function(){Ne("'runAndAbortIfError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"emval_handle_array")||(o.emval_handle_array=function(){Ne("'emval_handle_array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"emval_free_list")||(o.emval_free_list=function(){Ne("'emval_free_list' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"emval_symbols")||(o.emval_symbols=function(){Ne("'emval_symbols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"init_emval")||(o.init_emval=function(){Ne("'init_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"count_emval_handles")||(o.count_emval_handles=function(){Ne("'count_emval_handles' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"get_first_emval")||(o.get_first_emval=function(){Ne("'get_first_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getStringOrSymbol")||(o.getStringOrSymbol=function(){Ne("'getStringOrSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"Emval")||(o.Emval=function(){Ne("'Emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"emval_newers")||(o.emval_newers=function(){Ne("'emval_newers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"craftEmvalAllocator")||(o.craftEmvalAllocator=function(){Ne("'craftEmvalAllocator' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"emval_get_global")||(o.emval_get_global=function(){Ne("'emval_get_global' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"emval_methodCallers")||(o.emval_methodCallers=function(){Ne("'emval_methodCallers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"InternalError")||(o.InternalError=function(){Ne("'InternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"BindingError")||(o.BindingError=function(){Ne("'BindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"UnboundTypeError")||(o.UnboundTypeError=function(){Ne("'UnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"PureVirtualError")||(o.PureVirtualError=function(){Ne("'PureVirtualError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"init_embind")||(o.init_embind=function(){Ne("'init_embind' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"throwInternalError")||(o.throwInternalError=function(){Ne("'throwInternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"throwBindingError")||(o.throwBindingError=function(){Ne("'throwBindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"throwUnboundTypeError")||(o.throwUnboundTypeError=function(){Ne("'throwUnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"ensureOverloadTable")||(o.ensureOverloadTable=function(){Ne("'ensureOverloadTable' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"exposePublicSymbol")||(o.exposePublicSymbol=function(){Ne("'exposePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"replacePublicSymbol")||(o.replacePublicSymbol=function(){Ne("'replacePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"extendError")||(o.extendError=function(){Ne("'extendError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"createNamedFunction")||(o.createNamedFunction=function(){Ne("'createNamedFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registeredInstances")||(o.registeredInstances=function(){Ne("'registeredInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getBasestPointer")||(o.getBasestPointer=function(){Ne("'getBasestPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerInheritedInstance")||(o.registerInheritedInstance=function(){Ne("'registerInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"unregisterInheritedInstance")||(o.unregisterInheritedInstance=function(){Ne("'unregisterInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getInheritedInstance")||(o.getInheritedInstance=function(){Ne("'getInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getInheritedInstanceCount")||(o.getInheritedInstanceCount=function(){Ne("'getInheritedInstanceCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getLiveInheritedInstances")||(o.getLiveInheritedInstances=function(){Ne("'getLiveInheritedInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registeredTypes")||(o.registeredTypes=function(){Ne("'registeredTypes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"awaitingDependencies")||(o.awaitingDependencies=function(){Ne("'awaitingDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"typeDependencies")||(o.typeDependencies=function(){Ne("'typeDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registeredPointers")||(o.registeredPointers=function(){Ne("'registeredPointers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"registerType")||(o.registerType=function(){Ne("'registerType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"whenDependentTypesAreResolved")||(o.whenDependentTypesAreResolved=function(){Ne("'whenDependentTypesAreResolved' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"embind_charCodes")||(o.embind_charCodes=function(){Ne("'embind_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"embind_init_charCodes")||(o.embind_init_charCodes=function(){Ne("'embind_init_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"readLatin1String")||(o.readLatin1String=function(){Ne("'readLatin1String' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getTypeName")||(o.getTypeName=function(){Ne("'getTypeName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"heap32VectorToArray")||(o.heap32VectorToArray=function(){Ne("'heap32VectorToArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"requireRegisteredType")||(o.requireRegisteredType=function(){Ne("'requireRegisteredType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"getShiftFromSize")||(o.getShiftFromSize=function(){Ne("'getShiftFromSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"integerReadValueFromPointer")||(o.integerReadValueFromPointer=function(){Ne("'integerReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"enumReadValueFromPointer")||(o.enumReadValueFromPointer=function(){Ne("'enumReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"floatReadValueFromPointer")||(o.floatReadValueFromPointer=function(){Ne("'floatReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"simpleReadValueFromPointer")||(o.simpleReadValueFromPointer=function(){Ne("'simpleReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"runDestructors")||(o.runDestructors=function(){Ne("'runDestructors' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"new_")||(o.new_=function(){Ne("'new_' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"craftInvokerFunction")||(o.craftInvokerFunction=function(){Ne("'craftInvokerFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"embind__requireFunction")||(o.embind__requireFunction=function(){Ne("'embind__requireFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"tupleRegistrations")||(o.tupleRegistrations=function(){Ne("'tupleRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"structRegistrations")||(o.structRegistrations=function(){Ne("'structRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"genericPointerToWireType")||(o.genericPointerToWireType=function(){Ne("'genericPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"constNoSmartPtrRawPointerToWireType")||(o.constNoSmartPtrRawPointerToWireType=function(){Ne("'constNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"nonConstNoSmartPtrRawPointerToWireType")||(o.nonConstNoSmartPtrRawPointerToWireType=function(){Ne("'nonConstNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"init_RegisteredPointer")||(o.init_RegisteredPointer=function(){Ne("'init_RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"RegisteredPointer")||(o.RegisteredPointer=function(){Ne("'RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_getPointee")||(o.RegisteredPointer_getPointee=function(){Ne("'RegisteredPointer_getPointee' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_destructor")||(o.RegisteredPointer_destructor=function(){Ne("'RegisteredPointer_destructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_deleteObject")||(o.RegisteredPointer_deleteObject=function(){Ne("'RegisteredPointer_deleteObject' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_fromWireType")||(o.RegisteredPointer_fromWireType=function(){Ne("'RegisteredPointer_fromWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"runDestructor")||(o.runDestructor=function(){Ne("'runDestructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"releaseClassHandle")||(o.releaseClassHandle=function(){Ne("'releaseClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"finalizationRegistry")||(o.finalizationRegistry=function(){Ne("'finalizationRegistry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"detachFinalizer_deps")||(o.detachFinalizer_deps=function(){Ne("'detachFinalizer_deps' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"detachFinalizer")||(o.detachFinalizer=function(){Ne("'detachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"attachFinalizer")||(o.attachFinalizer=function(){Ne("'attachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"makeClassHandle")||(o.makeClassHandle=function(){Ne("'makeClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"init_ClassHandle")||(o.init_ClassHandle=function(){Ne("'init_ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"ClassHandle")||(o.ClassHandle=function(){Ne("'ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"ClassHandle_isAliasOf")||(o.ClassHandle_isAliasOf=function(){Ne("'ClassHandle_isAliasOf' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"throwInstanceAlreadyDeleted")||(o.throwInstanceAlreadyDeleted=function(){Ne("'throwInstanceAlreadyDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"ClassHandle_clone")||(o.ClassHandle_clone=function(){Ne("'ClassHandle_clone' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"ClassHandle_delete")||(o.ClassHandle_delete=function(){Ne("'ClassHandle_delete' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"deletionQueue")||(o.deletionQueue=function(){Ne("'deletionQueue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"ClassHandle_isDeleted")||(o.ClassHandle_isDeleted=function(){Ne("'ClassHandle_isDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"ClassHandle_deleteLater")||(o.ClassHandle_deleteLater=function(){Ne("'ClassHandle_deleteLater' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"flushPendingDeletes")||(o.flushPendingDeletes=function(){Ne("'flushPendingDeletes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"delayFunction")||(o.delayFunction=function(){Ne("'delayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"setDelayFunction")||(o.setDelayFunction=function(){Ne("'setDelayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"RegisteredClass")||(o.RegisteredClass=function(){Ne("'RegisteredClass' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"shallowCopyInternalPointer")||(o.shallowCopyInternalPointer=function(){Ne("'shallowCopyInternalPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"downcastPointer")||(o.downcastPointer=function(){Ne("'downcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"upcastPointer")||(o.upcastPointer=function(){Ne("'upcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"validateThis")||(o.validateThis=function(){Ne("'validateThis' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"char_0")||(o.char_0=function(){Ne("'char_0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"char_9")||(o.char_9=function(){Ne("'char_9' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"makeLegalFunctionName")||(o.makeLegalFunctionName=function(){Ne("'makeLegalFunctionName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetIndexed")||(o.emscriptenWebGLGetIndexed=function(){Ne("'emscriptenWebGLGetIndexed' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"warnOnce")||(o.warnOnce=function(){Ne("'warnOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"stackSave")||(o.stackSave=function(){Ne("'stackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"stackRestore")||(o.stackRestore=function(){Ne("'stackRestore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"stackAlloc")||(o.stackAlloc=function(){Ne("'stackAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"AsciiToString")||(o.AsciiToString=function(){Ne("'AsciiToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"stringToAscii")||(o.stringToAscii=function(){Ne("'stringToAscii' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"UTF16ToString")||(o.UTF16ToString=function(){Ne("'UTF16ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"stringToUTF16")||(o.stringToUTF16=function(){Ne("'stringToUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF16")||(o.lengthBytesUTF16=function(){Ne("'lengthBytesUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"UTF32ToString")||(o.UTF32ToString=function(){Ne("'UTF32ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"stringToUTF32")||(o.stringToUTF32=function(){Ne("'stringToUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF32")||(o.lengthBytesUTF32=function(){Ne("'lengthBytesUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"allocateUTF8")||(o.allocateUTF8=function(){Ne("'allocateUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),Object.getOwnPropertyDescriptor(o,"allocateUTF8OnStack")||(o.allocateUTF8OnStack=function(){Ne("'allocateUTF8OnStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}),o.writeStackCookie=de,o.checkStackCookie=pe,Object.getOwnPropertyDescriptor(o,"ALLOC_NORMAL")||Object.defineProperty(o,"ALLOC_NORMAL",{configurable:!0,get:function(){Ne("'ALLOC_NORMAL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Object.getOwnPropertyDescriptor(o,"ALLOC_STACK")||Object.defineProperty(o,"ALLOC_STACK",{configurable:!0,get:function(){Ne("'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Fe=function e(){yd||Bd(),yd||(Fe=e)},o.run=Bd,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();var qd=!0;return o.noInitialRun&&(qd=!1),Bd(),e.ready}),tt=r.p+"assets/core/cesdk.wasm",rt=r.p+"assets/core/cesdk.data",nt=(e,t)=>null!=t?[t,e.split("/").pop()].join(""):new URL(e,window.location.origin);var ot,it,at,st,ct,ut,lt,ft,dt,pt=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},gt=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class ht{constructor(e,t,r){ot.add(this),Object.defineProperty(this,"block",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"scene",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"variable",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),it.set(this,void 0),at.set(this,void 0),st.set(this,void 0),ct.set(this,(()=>{const e=this.block.findByType(i._h.Camera)[0];if(!e)return;const{width:t,height:r}=gt(this,at,"f"),n=gt(this,it,"f").getValue(e,i.$R.Camera,"resolution");Y(n.width,t,1e-4)&&Y(n.height,r,1e-4)||gt(this,it,"f").setValue(e,i.$R.Camera,"resolution",{width:t,height:r}),Y(gt(this,it,"f").getValue(e,i.$R.Camera,"pixelRatio"),window.devicePixelRatio,1e-4)||gt(this,it,"f").setValue(e,i.$R.Camera,"pixelRatio",window.devicePixelRatio)})),ut.set(this,void 0),pt(this,st,e,"f"),pt(this,it,new K(e),"f"),pt(this,at,t,"f"),this.block=new we(e),this.scene=new xe(e),this.variable=new ke(e),gt(this,it,"f").internalAPI.setPreUpdateCallback(gt(this,ct,"f")),gt(this,ot,"m",lt).call(this)}dispose(){gt(this,ot,"m",ft).call(this),gt(this,it,"f").internalAPI.setPreUpdateCallback(null),pt(this,at,null,"f"),pt(this,it,null,"f"),this.block=null,this.scene=null,this.variable=null,gt(this,st,"f").delete(),pt(this,st,null,"f")}static async init(e,t){console.log("[CESDK] Revision 1833b2d94001a471a7a0a14e95eb8f58bd9f5070"),e||(e=document.createElement("canvas"));const r=Je.initWithDefaults(t);return new this(await((e,t)=>{const r=Je.initWithDefaults(t),{core:n}=r,o=null!==(c=null===(s=null==(a=r)?void 0:a.callbacks)||void 0===s?void 0:s.log)&&void 0!==c?c:Be;var a,s,c;return new Promise(((t,a)=>{let s,c;return et({locateFile:(e,t)=>{if(e.endsWith(".wasm")){const e=nt(tt,n.baseURL).toString();return s=e,e}if(e.endsWith(".data")){const e=nt(rt,n.baseURL).toString();return c=e,e}return t+e},print:e=>{e&&"undefined"!==e&&o(e,i.in.Info)},printErr:e=>{e&&"undefined"!==e&&o(e,i.in.Error)},onRuntimeInitialized:()=>{o("Engine has been initialized.",i.in.Info)},logReadFiles:!1,printWithColors:!0}).then((n=>{let o="";"string"==typeof e?o=e:(n.canvas=e,o="canvas");const s=n.createEngine(o);if(s.isValid()){const e=s.value();!function(e,t){const r=new K(e);var n;function o(e,t){return r.execute("ubq/settings/set",[e,t])}o("ubq://license",t.license||""),Object.entries(t.assets).forEach((([e,t])=>{r.execute("ubq/assets/register",[e,t.src,""])})),Object.entries(t.presets.images||{}).forEach((([e,t])=>{r.execute("ubq/assets/registerImage",[e,t.thumbnailURL||t.imageURL,t.imageURL,t.width,t.height])})),Object.entries(t.presets.typefaces||{}).forEach((([e,t])=>{(t.fonts||[]).forEach((n=>{const o=`${e}_${n.weight}_${n.style}`;r.execute("ubq/assets/registerFont",[o,n.fontURL,t.family,n.weight,n.style])}))})),o("ubq://features/effectsEnabled",!0),o("ubq://page/title/font",t.page.title.font),o("ubq://page/title/show",t.page.title.show),function(){if(void 0!==t.scene.maskSpotColor){const{rgbApproximation:e}=t.scene.maskSpotColor,n=(0,i.JY)(Object.assign(Object.assign({},e),{a:1}));r.execute("cesdk/setSpecialSpotColor",n)}}(),(null!==(n=t.extensions)&&void 0!==n?n:[]).entries.forEach((e=>{r.execute("ubq/extension/register",`${e}`)})),function(){var r,n;const o=null!==(n=null===(r=t.presets)||void 0===r?void 0:r.variables)&&void 0!==n?n:{};Object.entries(o).forEach((([t,r])=>{Z(e.setVariableValue(t,r.value.toString()))}))}()}(e,r),t(e)}else{const e=s.error();a(new Error(e.publicMessage())),e.delete()}s.delete()})).catch((e=>{e instanceof Error&&(e.wasmPath=s,e.dataPath=c),a(e)}))}))})(e,r),e,r)}}it=new WeakMap,at=new WeakMap,st=new WeakMap,ct=new WeakMap,ut=new WeakMap,ot=new WeakSet,lt=function(e=!0){if(gt(this,ut,"f"))return;const t=()=>{gt(this,ot,"m",dt).call(this,e),pt(this,ut,requestAnimationFrame(t),"f")};pt(this,ut,requestAnimationFrame(t),"f")},ft=function(){gt(this,ut,"f")&&(cancelAnimationFrame(gt(this,ut,"f")),pt(this,ut,0,"f"))},dt=function(e=!0){e&&1===this.block.findByType(i._h.Scene).length&&gt(this,it,"f").execute("ubq/render",{displayWidth:gt(this,at,"f").width,displayHeight:gt(this,at,"f").height}),gt(this,it,"f").internalAPI.update()}}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=t,e=[],o.O=(t,r,n,i)=>{if(!r){var a=1/0;for(l=0;l<e.length;l++){for(var[r,n,i]=e[l],s=!0,c=0;c<r.length;c++)(!1&i||a>=i)&&Object.keys(o.O).every((e=>o.O[e](r[c])))?r.splice(c--,1):(s=!1,i<a&&(a=i));if(s){e.splice(l--,1);var u=n();void 0!==u&&(t=u)}}return t}i=i||0;for(var l=e.length;l>0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[r,n,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.p="",(()=>{var e={763:0};o.O.j=t=>0===e[t];var t=(t,r)=>{var n,i,[a,s,c]=r,u=0;if(a.some((t=>0!==e[t]))){for(n in s)o.o(s,n)&&(o.m[n]=s[n]);if(c)var l=c(o)}for(t&&t(r);u<a.length;u++)i=a[u],o.o(e,i)&&e[i]&&e[i][0](),e[a[u]]=0;return o.O(l)},r=self.webpackChunkcesdk=self.webpackChunkcesdk||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var i=o(9331);return(i=o.O(i)).default})()}));