@cesdk/cesdk-js 1.4.6 → 1.4.7
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.
- package/assets/core/cesdk.wasm +0 -0
- package/cesdk-engine.umd.js +1 -1
- package/cesdk.umd.js +1 -1
- package/package.json +1 -1
package/cesdk-engine.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
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,d=s.type,f=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=this;if("object"===d(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 f=c.format[n].apply(null,o?e:e.slice(0,-1));r._rgb=l(f),3===r._rgb.length&&r._rgb.push(1)};f.prototype.toString=function(){return"function"==d(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var p=f,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,R=s.unpack,k=Math.round,F=function(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];var n,o,i,a=(t=R(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],d=c<.5?c*(1+s):c+s-c*s,f=2*c-d,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]=f+6*(d-f)*u[g]:2*u[g]<1?l[g]=d:3*u[g]<2?l[g]=f+(d-f)*(2/3-u[g])*6:l[g]=f;n=(e=[k(255*l[0]),k(255*l[1]),k(255*l[2])])[0],o=e[1],i=e[2]}return t.length>3?[n,o,i,t[3]]:[n,o,i,1]},A=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,C=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,I=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,N=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,j=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,L=/^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(A)){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(C)){for(var o=t.slice(1,5),i=0;i<4;i++)o[i]=+o[i];return o}if(t=e.match(I)){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(N)){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(j)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var f=F(d);return f[3]=1,f}if(t=e.match(L)){var p=t.slice(1,4);p[1]*=.01,p[2]*=.01;var g=F(p);return g[3]=+t[4],g}};H.test=function(e){return A.test(e)||C.test(e)||I.test(e)||N.test(e)||j.test(e)||L.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,W=s.unpack,z=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,d=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,d]}(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,d=(a=q(a,"hcg"))[0],f=a[1],p=a[2];p*=255;var g=255*f;if(0===f)c=u=l=p;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var h=V(d/=60),m=d-h,v=p*(1-f),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=W(e,"hcg"),"array"===z(e)&&3===e.length)return"hcg"}});var $=s.unpack,Y=s.last,K=Math.round,J=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}},Z=/^#?([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(Z)){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 J(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,de=s.PITHIRD,fe=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*fe(le*i)/fe(de-le*i))/3)):i<2/3?o=1-((r=(1-a)/3)+(n=(1+a*fe(le*(i-=1/3))/fe(de-le*i))/3)):r=1-((n=(1-a)/3)+(o=(1+a*fe(le*(i-=2/3))/fe(de-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=F,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,d=(a=Ee(a,"hsv"))[0],f=a[1],p=a[2];if(p*=255,0===f)c=u=l=p;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var g=we(d/=60),h=d-g,m=p*(1-f),v=p*(1-f*h),b=p*(1-f*(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,Re=.12841855,ke=.008856452,Fe=s.unpack,Ae=Math.pow,Ce=function(e){return(e/=255)<=.04045?e/12.92:Ae((e+.055)/1.055,2.4)},Ie=function(e){return e>ke?Ae(e,1/3):e/Re+Se},Ne=function(e,t,r){return e=Ce(e),t=Ce(t),r=Ce(r),[Ie((.4124564*e+.3575761*t+.1804375*r)/De),Ie((.2126729*e+.7151522*t+.072175*r)/Pe),Ie((.0193339*e+.119192*t+.9503041*r)/xe)]},je=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Fe(e,"rgb"),n=r[0],o=r[1],i=r[2],a=Ne(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])]},Le=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:Re*(e-Se)},Xe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,o,i=(e=Le(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 je(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,We=Math.sqrt,ze=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=We(o*o+i*i),s=(ze(i,o)*Ve+360)%360;return 0===$e(1e4*a)&&(s=Number.NaN),[n,a,s]},Ke=s.unpack,Je=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=je(n,o,i),s=a[0],c=a[1],u=a[2];return Ye(s,c,u)},Ze=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=Ze(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 Je(this._rgb)},p.prototype.hcl=function(){return Je(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=J(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 dt=s.unpack,ft=s.type,pt=s.type;p.prototype.num=function(){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=dt(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"==ft(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 Rt=Math.sqrt,kt=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(Rt(kt(o,2)*(1-r)+kt(c,2)*r),Rt(kt(i,2)*(1-r)+kt(u,2)*r),Rt(kt(a,2)*(1-r)+kt(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 Ft=function(e,t,r,n){var o,i,a,s,c,u,l,d,f,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],f=o[2],u=(i=s)[0],d=i[1],g=i[2]),isNaN(c)||isNaN(u)?isNaN(c)?isNaN(u)?m=Number.NaN:(m=u,1!=f&&0!=f||"hsv"==n||(h=d)):(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*(d-l)),new p([m,h,f+r*(g-f)],n)},At=function(e,t,r){return Ft(e,t,r,"lch")};Pt.lch=At,Pt.hcl=At;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 Ft(e,t,r,"hcg")};Pt.hsi=function(e,t,r){return Ft(e,t,r,"hsi")};Pt.hsl=function(e,t,r){return Ft(e,t,r,"hsl")};Pt.hsv=function(e,t,r){return Ft(e,t,r,"hsv")};var Ct=s.clip_rgb,It=Math.pow,Nt=Math.sqrt,jt=Math.PI,Lt=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]+=It(s[0],2)*a,n[1]+=It(s[1],2)*a,n[2]+=It(s[2],2)*a,n[3]+=s[3]*a}return n[0]=Nt(n[0]),n[1]=Nt(n[1]),n[2]=Nt(n[2]),n[3]>.9999999&&(n[3]=1),new p(Ct(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,d=1,f=!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):d!==l?(e-l)/(d-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 f=Math.floor(1e4*u);if(g&&p[f])o=p[f];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[f]=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],d=e[e.length-1],i=[];var t=c.length;if(e.length===t&&l!==d)for(var r=0,n=Array.from(e);r<n.length;r+=1){var a=n[r];i.push((a-l)/(d-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)})),f=e.map((function(e){return(e-l)/(d-l)}));f.every((function(e,t){return u[t]===e}))||(y=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=f[t+1];)t++;var r=(e-f[t])/(f[t+1]-f[t]);return u[t]+r*(u[t+1]-u[t])})}}return o=[l,d],_},_.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),f=e,w(),b=f?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,d=s.length,f=1<=d;f?l<d:l>d;f?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},Wt=function(e,t,r){if(!Wt[r])throw new Error("unknown blend mode "+r);return Wt[r](e,t)},zt=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}};Wt.normal=zt($t((function(e){return e}))),Wt.multiply=zt($t((function(e,t){return e*t/255}))),Wt.screen=zt($t((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),Wt.overlay=zt($t((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),Wt.darken=zt($t((function(e,t){return e>t?t:e}))),Wt.lighten=zt($t((function(e,t){return e>t?e:t}))),Wt.dodge=zt($t((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),Wt.burn=zt($t((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var Yt=Wt,Kt=s.type,Jt=s.clip_rgb,Zt=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 d=1;d<r;d++)s.push(ar(10,u+d/r*(l-u)));s.push(o)}else if("q"===t.substr(0,1)){s.push(n);for(var f=1;f<r;f++){var p=(a.length-1)*f/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 R=cr(_[M]-P);R<x&&(x=R,S=M),y[S]++,b[D]=S}for(var k=new Array(r),F=0;F<r;F++)k[F]=null;for(var A=0;A<v;A++)null===k[m=b[A]]?k[m]=a[A]:k[m]+=a[A];for(var C=0;C<r;C++)k[C]*=1/y[C];E=!1;for(var I=0;I<r;I++)if(k[I]!==_[I]){E=!0;break}_=k,++w>200&&(E=!1)}for(var N={},j=0;j<r;j++)N[j]=[];for(var L=0;L<v;L++)N[m=b[L]].push(a[L]);for(var U=[],H=0;H<r;H++)U.push(N[H][0]),U.push(N[H][N[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},dr={analyze:ur,limits:lr},fr=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 d=a[l]/180*jt;c+=Lt(d)*r[0],u+=Ut(d)*r[0]}var f=i.alpha()*r[0];e.forEach((function(e,n){var o=e.get(t);f+=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*jt;c+=Lt(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])/jt*180;h<0;)h+=360;for(;h>=360;)h-=360;a[g]=h}else a[g]=a[g]/s[g];return f/=n,new p(a,t).alpha(f>.99999?1:f,!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=Zt*((e+120)/360+t*s),u=er(o[0]+i*s,n),l=(0!==a?r[0]+s*a:r)*u*(1-u)/2,d=rr(c),f=tr(c);return h(Jt([255*(u+l*(-.14861*d+1.78277*f)),255*(u+l*(-.29227*d-.90649*f)),255*(u+l*(1.97294*d)),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=dr.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],d=c[2],f=fr(a*a+s*s),g=fr(l*l+d*d),h=i<16?.511:.040975*i/(1+.01765*i),m=.0638*f/(1+.0131*f)+.638,v=f<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=f*f*f*f,E=fr(y/(y+1900)),w=m*(E*b+1-E),_=f-g,O=a-l,T=s-d,D=(i-u)/(r*h),P=_/(n*m);return fr(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=dr.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),d=!r&&!l&&a(e),f=!r&&!l&&!d&&c(e),p=r||l||d||f,g=p?n(e.length,String):[],h=g.length;for(var m in e)!t&&!u.call(e,m)||p&&("length"==m||d&&("offset"==m||"parent"==m)||f&&("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,d=u.hasOwnProperty,f=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?f: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,d,f){t!==r&&i(r,(function(i,c){if(f||(f=new n),s(i))a(t,r,c,l,e,d,f);else{var p=d?d(u(t,c),i,c+"",t,r,f):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),d=r(9571),f=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&&d(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(_)&&!f(_)||(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 d(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 f(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:d,hwb2hsl:function(e){return t(d(e))},hwb2hsv:function(e){return n(d(e))},hwb2cmyk:function(e){return i(d(e))},hwb2keyword:function(e){return a(d(e))},cmyk2rgb:f,cmyk2hsl:function(e){return t(f(e))},cmyk2hsv:function(e){return n(f(e))},cmyk2hwb:function(e){return o(f(e))},cmyk2keyword:function(e){return a(f(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:()=>A,X5:()=>w,HY:()=>k,Kc:()=>F}),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",e.PendingState="ubq/designblocks/PendingState",e.ErrorState="ubq/designblocks/ErrorState"}(u||(u={}));const l="ubq/designblocks/CommonDesignBlockProps";var d,f,p,g,h,m,v;!function(e){e.Transform="ubq/editMode/transform",e.Crop="ubq/editMode/crop",e.Text="ubq/editMode/text"}(d||(d={})),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"}(f||(f={})),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,R,k,F;function A(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"}(R||(R={})),function(e){e.Png="image/png",e.Jpeg="image/jpeg",e.Tga="image/x-tga",e.Binary="application/octet-stream",e.Zip="application/zip"}(k||(k={})),function(e){e[e.Free=0]="Free",e[e.VerticalStack=1]="VerticalStack",e[e.HorizontalStack=2]="HorizontalStack"}(F||(F={}))},9331:(e,t,r)=>{"use strict";r.d(t,{default:()=>_t});var n,o=r(6954);function i(e){return(i="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 a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(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){a(e,t,r[t])}))}return e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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 l(e,t,r){return t&&u(e.prototype,t),r&&u(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 f(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?d(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(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&&g(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);var m={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)}},v=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(this,e),this.init(t,r)}return l(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||m,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,s({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),b=function(){function e(){c(this,e),this.observers={}}return l(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 y(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function E(e){return null==e?"":""+e}function w(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function _(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 O(e,t,r){var n=_(e,t,Object);n.obj[n.k]=r}function T(e,t){var r=_(e,t),n=r.obj,o=r.k;if(n)return n[o]}function D(e,t,r){var n=T(e,r);return void 0!==n?n:T(t,r)}function P(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]):P(e[n],t[n],r):e[n]=t[n]);return e}function x(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var S={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function M(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return S[e]})):e}var R="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,k=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return c(this,t),r=f(this,p(t).call(this)),R&&b.call(d(r)),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return h(t,e),l(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(".")),T(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),O(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 c=T(this.data,a)||{};n?P(c,r,o):c=s({},c,r),O(this.data,a,c),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?s({},{},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}(b),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}},A={},C=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(this,t),r=f(this,p(t).call(this)),R&&b.call(d(r)),w(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,d(r)),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=v.create("translator"),r}return h(t,e),l(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"!==i(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,a=this.extractFromKey(e[e.length-1],t),c=a.key,u=a.namespaces,l=u[u.length-1],d=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(f){var p=t.nsSeparator||this.options.nsSeparator;return l+p+c}return c}var g=this.resolve(e,t),h=g&&g.res,m=g&&g.usedKey||c,v=g&&g.exactUsedKey||c,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(c," (").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,s({},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 R=this.pluralResolver.getSuffix(d,t.count);h=t["defaultValue".concat(R)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(M=!0,h=c);var k=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(M||S||k){if(this.logger.log(k?"updateKey":"missingKey",d,l,c,k?t.defaultValue:h),o){var F=this.resolve(c,s({},t,{keySeparator:!1}));F&&F.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 A=[],C=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&C&&C[0])for(var I=0;I<C.length;I++)A.push(C[I]);else"all"===this.options.saveMissingTo?A=this.languageUtils.toResolveHierarchy(t.lng||this.language):A.push(t.lng||this.language);var N=function(e,r){n.options.missingKeyHandler?n.options.missingKeyHandler(e,l,r,k?t.defaultValue:h,k,t):n.backendConnector&&n.backendConnector.saveMissing&&n.backendConnector.saveMissing(e,l,r,k?t.defaultValue:h,k,t),n.emit("missingKey",e,l,r,h)};if(this.options.saveMissing){var j=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&j?A.forEach((function(e){n.pluralResolver.getPluralFormsOfKey(e,c).forEach((function(t){return N([e],t)}))})):N(A,c)}}h=this.extendTranslation(h,e,t,g,r),M&&h===c&&this.options.appendNamespaceToMissingKey&&(h="".concat(l,":").concat(c)),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(s({},r,{interpolation:s({},this.options.interpolation,r.interpolation)}));var a,c=r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(c){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=s({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,r.lng||this.language,r),c){var d=e.match(this.interpolator.nestingRegexp);a<(d&&d.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 f=r.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==r.applyPostProcessor&&(e=F.handle(p,e,t,this.options&&this.options.postProcessPassResolved?s({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 d=void 0!==s.count&&"string"!=typeof s.count,f=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,!A["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(A["".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):(d&&(i=a.pluralResolver.getSuffix(r,s.count)),d&&f&&p.push(l+i),f&&p.push(l+="".concat(a.options.contextSeparator).concat(s.context)),d&&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}(b);function I(e){return e.charAt(0).toUpperCase()+e.slice(1)}var N=function(){function e(t){c(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=v.create("languageUtils")}return l(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]=I(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]=I(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=I(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}(),j=[{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}],L={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 U(){var e={};return j.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:L[t.fc]}}))})),e}var H,B,X,Q,G,q,V=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(this,e),this.languageUtils=t,this.options=r,this.logger=v.create("pluralResolver"),this.rules=U()}return l(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}(),W=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,e),this.logger=v.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return l(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:M,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?x(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?x(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?x(t.nestingPrefix):t.nestingPrefixEscaped||x("$t("),this.nestingSuffix=t.nestingSuffix?x(t.nestingSuffix):t.nestingSuffixEscaped||x(")"),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=D(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(D(t,c,a),u,r,n)};this.resetRegExp();var d=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,f=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 d){var r=d(e,o,n);i="string"==typeof r?r:""}else{if(f){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=E(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=s({},i);function c(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=s({},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 d=r[1].split(this.formatSeparator).map((function(e){return e.trim()}));r[1]=d.shift(),u=d,l=!0}if((n=t(c.call(this,r[1].trim(),a),a))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=E(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}(),z=function(e){function t(e,r,n){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return c(this,t),o=f(this,p(t).call(this)),R&&b.call(d(o)),o.backend=e,o.store=r,o.services=n,o.languageUtils=n.languageUtils,o.options=i,o.logger=v.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(n,i.backend,i),o}return h(t,e),l(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=_(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,s({},i,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),t}(b);function $(){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"===i(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===i(e[2])||"object"===i(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 Y(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 K(){}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(c(this,t),e=f(this,p(t).call(this)),R&&b.call(d(e)),e.options=Y(r),e.services={},e.logger=v,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),f(e,d(e));setTimeout((function(){e.init(r,n)}),0)}return e}return h(t,e),l(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=s({},$(),this.options,Y(t)),this.format=this.options.interpolation.format,r||(r=K),!this.options.isClone){this.modules.logger?v.init(n(this.modules.logger),this.options):v.init(null,this.options);var o=new N(this.options);this.store=new k(this.options.resources,this.options);var i=this.services;i.logger=v,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new V(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new W(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new z(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 c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}}));var u=y(),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]:K,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=y();return e||(e=this.languages),t||(t=this.options.ns),r||(r=K),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=y();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"!==i(n)){for(var a=arguments.length,c=new Array(a>2?a-2:0),u=2;u<a;u++)c[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([t,n].concat(c))}else o=s({},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=y();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=y();"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]:K,o=s({},this.options,r,{isClone:!0}),i=new t(o),a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.services=s({},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}(b)),function(e){e.Background="background",e.Active="active",e.Accent="accent"}(H||(H={})),function(e){e.Red="Red",e.Orange="Orange",e.Yellow="Yellow",e.Green="Green",e.Aqua="Aqua",e.Blue="Blue",e.Purple="Purple",e.Magenta="Magenta"}(B||(B={})),function(e){e.Hue="hue",e.Saturation="saturation",e.PerceivedBrightness="perceivedBrightness"}(X||(X={})),B.Red,B.Orange,B.Yellow,B.Green,B.Aqua,B.Blue,B.Purple,B.Magenta,(G=Q||(Q={})).Pixel="px",G.Millimeter="mm",G.Inch="in",Q.Pixel,o.X5.Pixel,Q.Millimeter,o.X5.Millimeter,Q.Inch,o.X5.Inch,o.X5.Pixel,Q.Pixel,o.X5.Millimeter,Q.Millimeter,o.X5.Inch,Q.Inch,function(e){e.Advanced="advanced",e.Default="default"}(q||(q={}));const J=(e,t)=>({x:e.x*t,y:e.y*t});function Z(e,t,r=Number.EPSILON){return Math.abs(e-t)<r}class ee{constructor(e){Object.defineProperty(this,"ubq",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.ubq=e}useInternalAPI(e){const t=this.ubq.getInternalAPI();try{return e(t)}finally{t.delete()}}async createElement(e,t,r){const n=await this.execute("ubq/designblocks/create",e);this.execute("ubq/designblocks/addToParent",[n,t]);const o=te(this.ubq.getLastFrameWidth(t)),i=te(this.ubq.getLastFrameHeight(t)),{position:a,size:s}=function(e,t,r=8/13){const n=((e,t)=>{const r=e.x/e.y,n=t.x/t.y;return J(t,r>n?e.y/t.y:e.x/t.x)})(e,t),o=J(n,r);return{position:{x:.5*(e.x-o.x),y:.5*(e.y-o.y)},size:o}}({x:o,y:i},{x:r.width,y:r.height},8/13);this.execute("ubq/layout/setAbsoluteSize",{id:n,size:{width:s.x,height:s.y}}),s.x||this.execute("ubq/layout/setAutoWidth",{id:n}),s.y||this.execute("ubq/layout/setAutoHeight",{id:n});const c=function(e={x:50,y:50}){return{x:Math.random()*e.x,y:Math.random()*e.y}}({x:.08*o,y:.08*i});return await this.execute("ubq/layout/setAbsolutePosition",{id:n,position:{left:a.x+c.x,top:a.y+c.y}}),n}setValue(e,t,r,n){return this.useInternalAPI((o=>te(o.setValue(e,t,r,n))))}getValue(e,t,r){return this.useInternalAPI((n=>te(n.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.useInternalAPI((n=>n.ubqExecute(e,t,(e=>{const t=te(e);r(t)})))).delete()}))}}function te(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 re=(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 ne 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 oe(e){return"object"==typeof e&&null!=e}function ie(e){return"string"==typeof e?JSON.stringify(e):""+e}function ae(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: `"+ie(n)+"`"}=e;return{value:n,type:a,refinement:s,key:o[o.length-1],path:o,branch:i,...e,message:c}}function*se(e,t,r,n){var o;oe(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const o of e){const e=ae(o,t,r,n);e&&(yield e)}}function*ce(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&&oe(t.schema)&&oe(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=ce(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):oe(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 ue{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)=>se(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>se(o(e,t),t,this,e):()=>[]}assert(e){return function(e,t){const r=le(e,t);if(r[0])throw r[0]}(e,this)}create(e){return function(e,t){const r=le(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}(e,this)}is(e){return function(e,t){return!le(e,t)[0]}(e,this)}mask(e){return function(e,t){const r=le(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}(e,this)}validate(e,t={}){return le(e,this,t)}}function le(e,t,r={}){const n=ce(e,t,r),o=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(n);return o[0]?[new ne(o[0],(function*(){for(const e of n)e[0]&&(yield e[0])})),void 0]:[void 0,o[1]]}function de(e,t){return new ue({type:e,schema:null,validator:t})}function fe(){return de("boolean",(e=>"boolean"==typeof e))}function pe(){return de("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||"Expected an integer, but received: "+ie(e)))}function ge(){return de("number",(e=>"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+ie(e)))}function he(){return de("string",(e=>"string"==typeof e||"Expected a string, but received: "+ie(e)))}function me(e,t,r={}){const{exclusive:n}=r;return function(e,t,r){return new ue({...e,*refiner(n,o){yield*e.refiner(n,o);const i=se(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 ve(e,t,r){const[n]=le(t,r);if(n)throw n.message=`Error in argument '${e}': ${n.message}`,n}var be,ye,Ee,we,_e,Oe=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},Te=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)};!function(e){e.Absolute="Absolute",e.Percent="Percent",e.Undefined="Auto"}(Ee||(Ee={})),function(e){e.Absolute="Absolute",e.Percent="Percent",e.Auto="Auto"}(we||(we={})),function(e){e.Bool="Bool",e.Int="Int",e.Float="Float",e.String="String",e.Color="Color",e.Enum="Enum",e.Struct="Struct"}(_e||(_e={}));class De{constructor(e){be.set(this,void 0),ye.set(this,void 0),Oe(this,be,e,"f"),Oe(this,ye,new ee(e),"f")}async export(e,t=o.HY.Png){return ve("handle",e,ge()),ve("mimeType",t,function(){const e=/image\/(png|jpeg|x-tga)|application\/octet-stream/;return de("MimeType",(t=>!("string"!=typeof t||!e.test(t))||{message:`expected one of "image/png", "image/jpeg", "image/x-tga", or "application/octet-stream", but got "${t}"`}))}()),new Promise(((r,n)=>{Te(this,be,"f").exportToBuffer(e,t,(e=>{"error"in e?n(e.error):r(new Blob([e],{type:t}))}),{jpegQuality:.9,pngCompressionLevel:5,useTargetSize:!1,targetWidth:0,targetHeight:0})}))}async loadFromString(e){return ve("content",e,he()),new Promise((t=>{Te(this,be,"f").loadBlocksFromString(e,(e=>{const r=te(e);t(re(r))}))}))}async saveToString(e){return ve("blocks",e,function(e){return new ue({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||"Expected an array value, but received: "+ie(e)})}(ge())),new Promise((t=>{Te(this,be,"f").saveBlocksToString(e,(e=>{const r=te(e);t(r)}))}))}create(e){return ve("type",e,he()),te(Te(this,be,"f").create(e))}getType(e){return ve("id",e,pe()),te(Te(this,be,"f").getType(e))}setSelected(e,t){return ve("id",e,pe()),ve("selected",t,fe()),te(Te(this,be,"f").setSelected(e,t))}isSelected(e){return ve("id",e,pe()),te(Te(this,be,"f").isSelected(e))}findAllSelected(){return re(Te(this,be,"f").findAllSelected())}setName(e,t){return ve("id",e,pe()),ve("name",t,he()),Te(this,ye,"f").setValue(e,o.uY,"name",t)}getName(e){return ve("id",e,pe()),Te(this,ye,"f").getValue(e,o.uY,"name")}findByName(e){ve("name",e,he());const t=Te(this,be,"f").findByName(e);return re(t)}findByType(e){ve("type",e,he());const t=te(Te(this,be,"f").findByType(e));return re(t)}findAll(){return re(Te(this,be,"f").findAll())}isVisible(e){return ve("id",e,pe()),te(Te(this,be,"f").isVisible(e))}setVisible(e,t){return ve("id",e,pe()),ve("visible",t,fe()),te(Te(this,be,"f").setVisible(e,t))}getPositionX(e){return ve("id",e,pe()),te(Te(this,be,"f").getPositionX(e))}getPositionXMode(e){return ve("id",e,pe()),te(Te(this,be,"f").getPositionXMode(e))}getPositionY(e){return ve("id",e,pe()),te(Te(this,be,"f").getPositionY(e))}getPositionYMode(e){return ve("id",e,pe()),te(Te(this,be,"f").getPositionYMode(e))}setPositionX(e,t){return ve("id",e,pe()),ve("value",t,ge()),te(Te(this,be,"f").setPositionX(e,t))}setPositionXMode(e,t){return ve("id",e,pe()),te(Te(this,be,"f").setPositionXMode(e,t))}setPositionY(e,t){return ve("id",e,pe()),ve("value",t,ge()),te(Te(this,be,"f").setPositionY(e,t))}setPositionYMode(e,t){return ve("id",e,pe()),te(Te(this,be,"f").setPositionYMode(e,t))}getRotation(e){return ve("id",e,pe()),te(Te(this,be,"f").getRotation(e))}setRotation(e,t){return ve("id",e,pe()),ve("radians",t,ge()),te(Te(this,be,"f").setRotation(e,t))}getFlipHorizontal(e){return ve("id",e,pe()),te(Te(this,be,"f").getFlip(e)).horizontal}getFlipVertical(e){return ve("id",e,pe()),te(Te(this,be,"f").getFlip(e)).vertical}setFlipHorizontal(e,t){return ve("id",e,pe()),ve("flip",t,fe()),te(Te(this,be,"f").setFlipHorizontal(e,t))}setFlipVertical(e,t){return ve("id",e,pe()),ve("flip",t,fe()),te(Te(this,be,"f").setFlipVertical(e,t))}getWidth(e){return ve("id",e,pe()),te(Te(this,be,"f").getWidth(e))}getWidthMode(e){return ve("id",e,pe()),te(Te(this,be,"f").getWidthMode(e))}getHeight(e){return ve("id",e,pe()),te(Te(this,be,"f").getHeight(e))}getHeightMode(e){return ve("id",e,pe()),te(Te(this,be,"f").getHeightMode(e))}setWidth(e,t){return ve("id",e,pe()),ve("value",t,ge()),te(Te(this,be,"f").setWidth(e,t))}setWidthMode(e,t){return ve("id",e,pe()),te(Te(this,be,"f").setWidthMode(e,t))}setHeight(e,t){return ve("id",e,pe()),ve("value",t,ge()),te(Te(this,be,"f").setHeight(e,t))}setHeightMode(e,t){return ve("id",e,pe()),te(Te(this,be,"f").setHeightMode(e,t))}getFrameWidth(e){return ve("id",e,pe()),te(Te(this,be,"f").getLastFrameWidth(e))}getFrameHeight(e){return ve("id",e,pe()),te(Te(this,be,"f").getLastFrameHeight(e))}duplicate(e){return ve("id",e,pe()),te(Te(this,be,"f").duplicate(e))}destroy(e){return ve("id",e,pe()),te(Te(this,be,"f").destroy(e))}getParent(e){return ve("id",e,pe()),te(Te(this,be,"f").getParent(e))}getChildren(e){ve("id",e,pe());const t=te(Te(this,be,"f").getChildren(e));return re(t)}insertChild(e,t,r){return ve("parent",e,ge()),ve("child",t,ge()),ve("index",r,me(ge(),0)),te(Te(this,be,"f").insertChild(e,t,r))}appendChild(e,t){return ve("parent",e,ge()),ve("child",t,ge()),te(Te(this,be,"f").appendChild(e,t))}referencesAnyVariables(e){return ve("id",e,pe()),te(Te(this,be,"f").referencesAnyVariables(e))}getGlobalBoundingBoxX(e){return ve("id",e,pe()),te(Te(this,be,"f").getGlobalBoundingBoxX(e))}getGlobalBoundingBoxY(e){return ve("id",e,pe()),te(Te(this,be,"f").getGlobalBoundingBoxY(e))}getGlobalBoundingBoxWidth(e){return ve("id",e,pe()),te(Te(this,be,"f").getGlobalBoundingBoxWidth(e))}getGlobalBoundingBoxHeight(e){return ve("id",e,pe()),te(Te(this,be,"f").getGlobalBoundingBoxHeight(e))}findAllProperties(e){return ve("id",e,pe()),re(te(Te(this,be,"f").findAllProperties(e)))}getPropertyType(e){return ve("property",e,he()),te(Te(this,be,"f").getPropertyType(e))}getEnumValues(e){return ve("enumProperty",e,he()),re(te(Te(this,be,"f").getEnumValues(e)))}setBool(e,t,r){return ve("id",e,pe()),ve("property",t,he()),ve("value",r,fe()),te(Te(this,be,"f").setBool(e,t,r))}getBool(e,t){return ve("id",e,pe()),ve("property",t,he()),te(Te(this,be,"f").getBool(e,t))}setInt(e,t,r){return ve("id",e,pe()),ve("property",t,he()),ve("value",r,pe()),te(Te(this,be,"f").setInt(e,t,r))}getInt(e,t){return ve("id",e,pe()),ve("property",t,he()),te(Te(this,be,"f").getInt(e,t))}setFloat(e,t,r){return ve("id",e,pe()),ve("property",t,he()),ve("value",r,ge()),te(Te(this,be,"f").setFloat(e,t,r))}getFloat(e,t){return ve("id",e,pe()),ve("property",t,he()),te(Te(this,be,"f").getFloat(e,t))}setString(e,t,r){return ve("id",e,pe()),ve("property",t,he()),ve("value",r,he()),te(Te(this,be,"f").setString(e,t,r))}getString(e,t){return ve("id",e,pe()),ve("property",t,he()),te(Te(this,be,"f").getString(e,t))}setColorRGBA(e,t,r,n,o,i){return ve("id",e,pe()),ve("property",t,he()),ve("r",r,ge()),ve("g",n,ge()),ve("b",o,ge()),ve("a",i,ge()),te(Te(this,be,"f").setColorRGBA(e,t,r,n,o,i))}getColorRGBA(e,t){return ve("id",e,pe()),ve("property",t,he()),te(Te(this,be,"f").getColorRGBA(e,t))}setEnum(e,t,r){return ve("id",e,pe()),ve("property",t,he()),ve("value",r,he()),te(Te(this,be,"f").setEnum(e,t,r))}getEnum(e,t){return ve("id",e,pe()),ve("property",t,he()),te(Te(this,be,"f").getEnum(e,t))}hasCrop(e){return ve("id",e,pe()),te(Te(this,be,"f").hasCrop(e))}setCropScaleX(e,t){return ve("id",e,pe()),ve("scaleX",t,ge()),te(Te(this,be,"f").setCropScaleX(e,t))}setCropScaleY(e,t){return ve("id",e,pe()),ve("scaleY",t,ge()),te(Te(this,be,"f").setCropScaleY(e,t))}setCropRotation(e,t){return ve("id",e,pe()),ve("rotation",t,ge()),te(Te(this,be,"f").setCropRotation(e,t))}setCropTranslationX(e,t){return ve("id",e,pe()),ve("translationX",t,ge()),te(Te(this,be,"f").setCropTranslationX(e,t))}setCropTranslationY(e,t){return ve("id",e,pe()),ve("translationY",t,ge()),te(Te(this,be,"f").setCropTranslationY(e,t))}resetCrop(e){return ve("id",e,pe()),te(Te(this,be,"f").resetCrop(e))}getCropScaleX(e){return ve("id",e,pe()),te(Te(this,be,"f").getCropScaleX(e))}getCropScaleY(e){return ve("id",e,pe()),te(Te(this,be,"f").getCropScaleY(e))}getCropRotation(e){return ve("id",e,pe()),te(Te(this,be,"f").getCropRotation(e))}getCropTranslationX(e){return ve("id",e,pe()),te(Te(this,be,"f").getCropTranslationX(e))}getCropTranslationY(e){return ve("id",e,pe()),te(Te(this,be,"f").getCropTranslationY(e))}hasOpacity(e){return ve("id",e,pe()),te(Te(this,be,"f").hasOpacity(e))}setOpacity(e,t){return ve("id",e,pe()),ve("opacity",t,ge()),te(Te(this,be,"f").setOpacity(e,t))}getOpacity(e){return ve("id",e,pe()),te(Te(this,be,"f").getOpacity(e))}hasFillColor(e){return ve("id",e,pe()),te(Te(this,be,"f").hasFillColor(e))}setFillColorRGBA(e,t,r,n,o){return ve("id",e,pe()),ve("r",t,ge()),ve("g",r,ge()),ve("b",n,ge()),ve("a",o,ge()),te(Te(this,be,"f").setFillColorRGBA(e,t,r,n,o))}getFillColorRGBA(e){return ve("id",e,pe()),te(Te(this,be,"f").getFillColorRGBA(e))}setFillColorEnabled(e,t){return ve("id",e,pe()),ve("enabled",t,fe()),te(Te(this,be,"f").setFillColorEnabled(e,t))}isFillColorEnabled(e){return ve("id",e,pe()),te(Te(this,be,"f").isFillColorEnabled(e))}hasBackgroundColor(e){return ve("id",e,pe()),te(Te(this,be,"f").hasBackgroundColor(e))}setBackgroundColorRGBA(e,t,r,n,o){return ve("id",e,pe()),ve("r",t,ge()),ve("g",r,ge()),ve("b",n,ge()),ve("a",o,ge()),te(Te(this,be,"f").setBackgroundColorRGBA(e,t,r,n,o))}getBackgroundColorRGBA(e){return ve("id",e,pe()),te(Te(this,be,"f").getBackgroundColorRGBA(e))}setBackgroundColorEnabled(e,t){return ve("id",e,pe()),ve("enabled",t,fe()),te(Te(this,be,"f").setBackgroundColorEnabled(e,t))}isBackgroundColorEnabled(e){return ve("id",e,pe()),te(Te(this,be,"f").isBackgroundColorEnabled(e))}hasOutline(e){return ve("id",e,pe()),te(Te(this,be,"f").hasOutline(e))}setOutlineColorRGBA(e,t,r,n,o){return ve("id",e,pe()),ve("r",t,ge()),ve("g",r,ge()),ve("b",n,ge()),ve("a",o,ge()),te(Te(this,be,"f").setOutlineColorRGBA(e,t,r,n,o))}getOutlineColorRGBA(e){return ve("id",e,pe()),te(Te(this,be,"f").getOutlineColorRGBA(e))}setOutlineEnabled(e,t){return ve("id",e,pe()),ve("enabled",t,fe()),te(Te(this,be,"f").setOutlineEnabled(e,t))}isOutlineEnabled(e){return ve("id",e,pe()),te(Te(this,be,"f").isOutlineEnabled(e))}setOutlineWidth(e,t){return ve("id",e,pe()),ve("width",t,ge()),te(Te(this,be,"f").setOutlineWidth(e,t))}getOutlineWidth(e){return ve("id",e,pe()),te(Te(this,be,"f").getOutlineWidth(e))}}be=new WeakMap,ye=new WeakMap;var Pe,xe,Se=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},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 Re{constructor(e){Pe.set(this,void 0),xe.set(this,void 0),Se(this,Pe,e,"f"),Se(this,xe,new ee(e),"f")}async loadFromString(e){return ve("sceneContent",e,he()),new Promise((t=>{Me(this,Pe,"f").loadSceneFromString(e,(e=>{const r=te(e);t(r)}))}))}async loadFromURL(e){return ve("url",e,he()),new Promise((t=>{Me(this,Pe,"f").loadSceneFromURL(e,(e=>{const r=te(e);t(r)}))}))}async saveToString(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):Me(this,Pe,"f").saveSceneToString(r,(t=>{const r=te(t);e(r)}))}))}async saveToArchive(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):Me(this,Pe,"f").saveSceneToArchive(r,(r=>{"error"in r?t(r.error):e(new Blob([r],{type:o.HY.Zip}))}))}))}create(){return te(Me(this,Pe,"f").createScene({layout:o.Kc.Free}))}createFromImage(e,t=300,r=1){return ve("url",e,he()),ve("dpi",t,me(ge(),0)),ve("pixelScaleFactor",r,me(ge(),0)),new Promise((n=>{Me(this,Pe,"f").createSceneFromImage(e,t,r,o.Kc.Free,0,!1,(e=>{const t=te(e);n(t)}))}))}get(){const e=te(Me(this,Pe,"f").findByType(o._h.Scene)),t=re(e);return t.length>0?t[0]:null}}Pe=new WeakMap,xe=new WeakMap;var ke,Fe=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 Ae{constructor(e){ke.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,ke,e,"f")}findAll(){return re(Fe(this,ke,"f").findAllVariables())}setString(e,t){return ve("key",e,he()),ve("value",t,he()),te(Fe(this,ke,"f").setVariableString(e,t))}getString(e){return ve("key",e,he()),te(Fe(this,ke,"f").getVariableString(e))}remove(e){return ve("key",e,he()),te(Fe(this,ke,"f").removeVariable(e))}}ke=new WeakMap;var Ce,Ie,Ne,je=r(7168),Le=r.n(je);function Ue(e){return Array.from(Array(e+1).keys())}!function(e){e.Left="left",e.Right="right"}(Ce||(Ce={})),function(e){e.Top="top",e.Bottom="bottom"}(Ie||(Ie={})),function(e){e.Left="left",e.Right="right"}(Ne||(Ne={}));const He={show:!0,position:Ne.Right},Be={show:!1,position:Ne.Left},Xe={show:!0,position:Ne.Left},Qe={show:!0,position:Ie.Top,title:null,action:{close:{show:!1},back:{show:!1},save:{show:!1},export:{show:!1},share:{show:!1},download:{show:!1},load:{show:!1}}},Ge={view:{adopter:{style:q.Default}},panels:{inspector:He,settings:Be,assetLibrary:Xe},templates:{show:!0},libraries:{image:{show:!0},text:{show:!0},element:{show:!0},panels:{insert:{autoClose:()=>!1},replace:{autoClose:()=>!0}}},navigation:Qe,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}}}},qe=(Ue(10),Ue(50),Ue(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"]}),Ve={"din-a0":{width:1189,height:841,unit:Q.Millimeter},"din-a1":{width:841,height:594,unit:Q.Millimeter},"din-a2":{width:594,height:420,unit:Q.Millimeter},"din-a3":{width:420,height:297,unit:Q.Millimeter},"din-a4":{width:297,height:210,unit:Q.Millimeter},"din-a5":{width:210,height:148,unit:Q.Millimeter},"din-a6":{meta:{default:!0},width:148,height:105,unit:Q.Millimeter},"din-a65":{width:210,height:105,unit:Q.Millimeter},"din-b5":{width:250,height:176,unit:Q.Millimeter},square:{width:105,height:105,unit:Q.Millimeter},"twitter-profile":{width:400,height:400,unit:Q.Pixel},"twitter-image":{width:1024,height:512,unit:Q.Pixel},"twitter-header":{width:1500,height:500,unit:Q.Pixel},"instagram-profile":{width:180,height:180,unit:Q.Pixel},"instagram-photo":{width:1080,height:1080,unit:Q.Pixel},"instagram-story":{width:1080,height:1920,unit:Q.Pixel},"american-letter":{width:8.5,height:11,unit:Q.Inch},"american-legal":{width:8.5,height:14,unit:Q.Inch},"16:10":{width:1600,height:1e3,unit:Q.Pixel},"16:9":{width:1600,height:900,unit:Q.Pixel},"16:10@2400p":{width:3840,height:2400,unit:Q.Pixel},"16:9@2160p":{width:3840,height:2160,unit:Q.Pixel},"business-card":{width:85,height:55,unit:Q.Millimeter}},We={company_name:{value:"img.ly"},first_name:{value:"Charly"},last_name:{value:"Williams"},address:{value:"742 Evergreen Terrace"},city:{value:"Springfield"}},ze=(e,t)=>{const r=`[UBQ] ${e}`;switch(t){case o.in.Warning:console.warn(r);break;case o.in.Error:console.error(r);break;case o.in.Info:console.log(r);break;default:console.log(r)}},$e={log:ze},Ye={en:{variables:{company_name:{label:"Company Name"},first_name:{label:"First name"},last_name:{label:"Last name"},address:{label:"Address"},city:{label:"City"}}},de:{variables:{company_name:{label:"Firmenname"},first_name:{label:"Vorname"},last_name:{label:"Nachname"},address:{label:"Adresse"},city:{label:"Stadt"}}}},Ke={colorPalettes:{primary:{meta:{default:!0},entries:["#FFFFFF","#000000","#6686FF","#66CCFF","#54FFEA","#E75050","#F28855","#FFF763"]}},pageFormats:Ve},Je={headingsHierarchyStart:2},Ze={baseURL:"core/"},et={baseURL:"ui/",scale:"normal",elements:Ge,stylesheets:{disableShadowDOM:!1,disableTagInsertion:!1,disableFontInsertion:!1}},tt={maskSpotColor:void 0,dpi:300,pixelScaleFactor:1},rt={title:{fontFileUri:"bundle://ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",show:!0}};function nt(e,t=window.location.href){return new URL(e,t).toString()}function ot(e){return"/"!==e[e.length-1]?`${e}/`:e}class it{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,"assetSources",{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,"variables",{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,d,f,p,g,h,m,v,b,y,E,w,_;const O=new it;return e&&(O.initialSceneString=null!==(t=e.initialSceneString)&&void 0!==t?t:void 0,O.initialSceneURL=null!==(r=e.initialSceneURL)&&void 0!==r?r:void 0,O.initialImageURL=null!==(n=e.initialImageURL)&&void 0!==n?n:void 0,O.license=e.license,O.role=null!==(o=e.role)&&void 0!==o?o:"Creator",O.locale=null!==(i=e.locale)&&void 0!==i?i:"en",O.theme=null!==(a=e.theme)&&void 0!==a?a:"dark",O.devMode=null!==(s=e.devMode)&&void 0!==s&&s,O.featureFlags=null!==(c=e.featureFlags)&&void 0!==c?c:{},O.baseURL=null!==(u=e.baseURL)&&void 0!==u?u:"https://cdn.img.ly/packages/imgly/cesdk-js/1.4.6/assets",O.core=null!==(l=e.core)&&void 0!==l?l:Object.assign({},Ze),O.ui=Le()({},et,null!==(d=e.ui)&&void 0!==d?d:{}),O.extensions=null!==(f=e.extensions)&&void 0!==f?f:Object.assign({},qe),O.extensions.entries=null!==(p=O.extensions.entries)&&void 0!==p?p:Object.assign({},qe.entries),O.i18n=null!==(g=e.i18n)&&void 0!==g?g:Object.assign({},Ye),O.a11y=null!==(h=e.a11y)&&void 0!==h?h:Object.assign({},Je),O.callbacks=null!==(m=e.callbacks)&&void 0!==m?m:Object.assign({},$e),O.variables=null!==(v=e.variables)&&void 0!==v?v:Object.assign({},We),O.presets=null!==(b=e.presets)&&void 0!==b?b:Object.assign({},Ke),O.scene=null!==(y=e.scene)&&void 0!==y?y:Object.assign({},tt),O.page=Le()({},rt,null!==(E=e.page)&&void 0!==E?E:{}),O.assets=null!==(w=e.assets)&&void 0!==w?w:{},O.assetSources=Le()({},e.assetSources),O.defaultFont=null!==(_=e.defaultFont)&&void 0!==_?_:void 0,Object.entries(Ke).forEach((([e,t])=>{var r;O.presets[e]=null!==(r=O.presets[e])&&void 0!==r?r:Object.assign({},t)}))),O.baseURL=nt(O.baseURL),O.baseURL=ot(O.baseURL),O.core.baseURL=nt(O.core.baseURL,O.baseURL),O.core.baseURL=ot(O.core.baseURL),O.ui.baseURL=nt(O.ui.baseURL,O.baseURL),O.ui.baseURL=ot(O.ui.baseURL),O.extensions.baseURL=ot(O.extensions.baseURL),O.extensions.entries=O.extensions.entries.map((e=>ot(e))),O}extend(e){return Le()({},this,e)}}var at;const st=(at="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(){Le("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(){Le("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,"___getTypeName")||(Object.defineProperty(o.ready,"___getTypeName",{configurable:!0,get:function(){Le("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(){Le("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(){Le("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(){Le("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,"___stdio_exit")||(Object.defineProperty(o.ready,"___stdio_exit",{configurable:!0,get:function(){Le("You are getting ___stdio_exit 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,"___stdio_exit",{configurable:!0,set:function(){Le("You are setting ___stdio_exit 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(){Le("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(){Le("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++,o.ENVIRONMENT_IS_PTHREAD||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,O("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 d(){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 d=o.dataFileDownloads[l];s+=d.total,c+=d.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?d():(o.preRun||(o.preRun=[]),o.preRun.push(d))}({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/shader/.keep",start:96295,end:96295},{filename:"/ly.img.cesdk/presets/.keep",start:96295,end:96295},{filename:"/ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",start:96295,end:367055}],remote_package_size:367055,package_uuid:"75fda623-2185-4ca8-b420-81e5df1af2d1"}),o.ENVIRONMENT_IS_PTHREAD&&(o.preRun=[]);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=Object.assign({},o),u=[],l="./this.program",d=(e,t)=>{throw t},f=!0,p=!1,g=!1,h=!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 m,v,b,y="";function E(e){return o.locateFile?o.locateFile(e,y):y+e}function w(e){if(e instanceof Wf)return;let t=e;e&&"object"==typeof e&&e.stack&&(t=[e,e.stack]),O("exiting due to exception: "+t)}if(h){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&&(m=function(e){return read(e)}),b=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),C("object"==typeof t),t)},v=function(e,t,r){setTimeout((()=>t(b(e))),0)},"undefined"!=typeof scriptArgs?u=scriptArgs:void 0!==arguments&&(u=arguments),"function"==typeof quit&&(d=(e,t)=>{w(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!f&&!p)throw new Error("environment detection error");if(p?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),at&&(y=at),y=0!==y.indexOf("blob:")?y.substr(0,y.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?)");m=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},p&&(b=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),v=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}}var _=o.print||console.log.bind(console),O=o.printErr||console.warn.bind(console);function T(e){T.shown||(T.shown={}),T.shown[e]||(T.shown[e]=1,O(e))}Object.assign(o,c),c=null,o.arguments&&(u=o.arguments),Object.getOwnPropertyDescriptor(o,"arguments")||Object.defineProperty(o,"arguments",{configurable:!0,get:function(){Le("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&&(l=o.thisProgram),Object.getOwnPropertyDescriptor(o,"thisProgram")||Object.defineProperty(o,"thisProgram",{configurable:!0,get:function(){Le("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(){Le("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(){Le("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(){Le("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(){Le("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(){Le("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(!p,"worker environment detected but not enabled at build time. Add 'worker' to `-s ENVIRONMENT` to enable."),C(!g,"node environment detected but not enabled at build time. Add 'node' to `-s ENVIRONMENT` to enable."),C(!h,"shell environment detected but not enabled at build time. Add 'shell' to `-s ENVIRONMENT` to enable.");var D,P=0,x=e=>{P=e},S=()=>P;o.wasmBinary&&(D=o.wasmBinary),Object.getOwnPropertyDescriptor(o,"wasmBinary")||Object.defineProperty(o,"wasmBinary",{configurable:!0,get:function(){Le("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 M,R=o.noExitRuntime||!0;function k(e,t="i8",r){switch("*"===t.charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return X[e>>0];case"i16":return G[e>>1];case"i32":case"i64":return V[e>>2];case"float":return z[e>>2];case"double":return Number($[e>>3]);default:Le("invalid type for getValue: "+t)}return null}Object.getOwnPropertyDescriptor(o,"noExitRuntime")||Object.defineProperty(o,"noExitRuntime",{configurable:!0,get:function(){Le("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&&Le("no native wasm support detected");var F,A=!1;function C(e,t){e||Le("Assertion failed"+(t?": "+t:""))}var I="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function N(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&I)return I.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)&&T("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 j(e,t){return e?N(Q,e,t):""}function L(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&&T("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 U(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!"),L(e,Q,t,r)}function H(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 B,X,Q,G,q,V,W,z,$,Y="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function K(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)&&q[n];)++n;if((r=n<<1)-e>32&&Y)return Y.decode(Q.subarray(e,r));for(var i="",a=0;!(a>=t/2);++a){var s=G[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);G[t>>1]=a,t+=2}return G[t>>1]=0,t-n}function Z(e){return 2*e.length}function ee(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=V[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 te(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)),V[t>>2]=a,(t+=4)+4>o)break}return V[t>>2]=0,t-n}function re(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 ne(e){var t=H(e)+1,r=Mf(t);return r&&L(e,X,r,t),r}function oe(e){var t=H(e)+1,r=Hf(t);return L(e,X,r,t),r}function ie(e,t){C(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),X.set(e,t)}function ae(e,t,r){for(var n=0;n<e.length;++n)C(e.charCodeAt(n)===(255&e.charCodeAt(n))),X[t++>>0]=e.charCodeAt(n);r||(X[t>>0]=0)}function se(e,t){return e%t>0&&(e+=t-e%t),e}function ce(e){B=e,o.HEAP8=X=new Int8Array(e),o.HEAP16=G=new Int16Array(e),o.HEAP32=V=new Int32Array(e),o.HEAPU8=Q=new Uint8Array(e),o.HEAPU16=q=new Uint16Array(e),o.HEAPU32=W=new Uint32Array(e),o.HEAPF32=z=new Float32Array(e),o.HEAPF64=$=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,de=o.INITIAL_MEMORY||268435456;function fe(){var e=jf();C(0==(3&e)),V[e+4>>2]=34821223,V[e+8>>2]=2310721022,V[0]=1668509029}function pe(){if(!A){var e=jf(),t=W[e+4>>2],r=W[e+8>>2];34821223==t&&2310721022==r||Le("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" 0x"+t.toString(16)),1668509029!==V[0]&&Le("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(){Le("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(de>=ue,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+de+"! (TOTAL_STACK="+ue+")"),C("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=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==de,"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||bt.init.initialized||bt.init(),bt.ignorePermissions=!1,lt.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;)Re(o.postRun.shift());$e(be)}function Se(e){ge.unshift(e)}function Me(e){he.unshift(e)}function Re(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 ke=0,Fe=null,Ae=null,Ce={};function Ie(e){for(var t=e;;){if(!Ce[e])return e;e=t+Math.random()}}function Ne(e){ke++,o.monitorRunDependencies&&o.monitorRunDependencies(ke),e?(C(!Ce[e]),Ce[e]=1,null===Fe&&"undefined"!=typeof setInterval&&(Fe=setInterval((function(){if(A)return clearInterval(Fe),void(Fe=null);var e=!1;for(var t in Ce)e||(e=!0,O("still waiting on run dependencies:")),O("dependency: "+t);e&&O("(end of list)")}),1e4))):O("warning: run dependency added without ID")}function je(e){if(ke--,o.monitorRunDependencies&&o.monitorRunDependencies(ke),e?(C(Ce[e]),delete Ce[e]):O("warning: run dependency removed without ID"),0==ke&&(null!==Fe&&(clearInterval(Fe),Fe=null),Ae)){var t=Ae;Ae=null,t()}}function Le(e){o.onAbort&&o.onAbort(e),O(e="Aborted("+e+")"),A=!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&&D)return new Uint8Array(D);if(b)return b(e);throw"both async and sync fetching of the wasm failed"}catch(e){Le(e)}}function We(){return D||!f&&!p||"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 ze(){var e={env:Sf,wasi_snapshot_preview1:Sf};function t(e,t){var r=e.exports;o.asm=r,C(M=o.asm.memory,"memory not found in wasm exports"),ce(M.buffer),C(le=o.asm.__indirect_function_table,"table not found in wasm exports"),Me(o.asm.__wasm_call_ctors),je("wasm-instantiate")}Ne("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 We().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){O("failed to asynchronously prepare wasm: "+e),Ge(Ue)&&O("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"),Le(e)}))}if(o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(e){return O("Module.instantiateWasm callback failed with error: "+e),!1}return(D||"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 O("wasm streaming compile failed: "+e),O("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?Ze(r)():Ze(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(o)}}function Ye(e){return T("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function Ke(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t=Ye(e);return e===t?e:t+" ["+e+"]"}))}Qe(Ue="cesdk.wasm")||(Ue=E(Ue));var Je=[];function Ze(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 et(e){if(e instanceof Wf||"unwind"==e)return F;d(1,e)}function tt(e,t,r,n){Le("Assertion failed: "+j(e)+", at: "+[t?j(t):"unknown filename",r,n?j(n):"unknown function"])}function rt(e){return Mf(e+16)+16}function nt(e){this.excPtr=e,this.ptr=e-16,this.set_type=function(e){V[this.ptr+4>>2]=e},this.get_type=function(){return V[this.ptr+4>>2]},this.set_destructor=function(e){V[this.ptr+8>>2]=e},this.get_destructor=function(){return V[this.ptr+8>>2]},this.set_refcount=function(e){V[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,X[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=X[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,X[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=X[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=V[this.ptr>>2];V[this.ptr>>2]=e+1},this.release_ref=function(){var e=V[this.ptr>>2];return V[this.ptr>>2]=e-1,C(e>0),1===e}}function ot(e,t,r){throw new nt(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 it(e){return V[kf()>>2]=e,e}var st={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=st.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=st.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=st.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return st.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return st.normalize(e.join("/"))},join2:function(e,t){return st.normalize(e+"/"+t)}};function ct(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}return function(){Le("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 ut={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:bt.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=st.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=ut.resolve(e).substr(1),t=ut.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("/")}},lt={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){lt.ttys[e]={input:[],output:[],ops:t},bt.registerDevice(e,lt.stream_ops)},stream_ops:{open:function(e){var t=lt.ttys[e.node.rdev];if(!t)throw new bt.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 bt.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 bt.ErrnoError(29)}if(void 0===s&&0===i)throw new bt.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 bt.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new bt.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=Pf(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(_(N(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(_(N(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(O(N(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(O(N(e.output,0)),e.output=[])}}};function dt(e,t){Q.fill(0,e,e+t)}function ft(e,t){return C(t,"alignment argument is required"),Math.ceil(e/t)*t}function pt(e){e=ft(e,65536);var t=Cf(65536,e);return t?(dt(t,e),t):0}var gt={ops_table:null,mount:function(e){return gt.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(bt.isBlkdev(r)||bt.isFIFO(r))throw new bt.ErrnoError(63);gt.ops_table||(gt.ops_table={dir:{node:{getattr:gt.node_ops.getattr,setattr:gt.node_ops.setattr,lookup:gt.node_ops.lookup,mknod:gt.node_ops.mknod,rename:gt.node_ops.rename,unlink:gt.node_ops.unlink,rmdir:gt.node_ops.rmdir,readdir:gt.node_ops.readdir,symlink:gt.node_ops.symlink},stream:{llseek:gt.stream_ops.llseek}},file:{node:{getattr:gt.node_ops.getattr,setattr:gt.node_ops.setattr},stream:{llseek:gt.stream_ops.llseek,read:gt.stream_ops.read,write:gt.stream_ops.write,allocate:gt.stream_ops.allocate,mmap:gt.stream_ops.mmap,msync:gt.stream_ops.msync}},link:{node:{getattr:gt.node_ops.getattr,setattr:gt.node_ops.setattr,readlink:gt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:gt.node_ops.getattr,setattr:gt.node_ops.setattr},stream:bt.chrdev_stream_ops}});var o=bt.createNode(e,t,r,n);return bt.isDir(o.mode)?(o.node_ops=gt.ops_table.dir.node,o.stream_ops=gt.ops_table.dir.stream,o.contents={}):bt.isFile(o.mode)?(o.node_ops=gt.ops_table.file.node,o.stream_ops=gt.ops_table.file.stream,o.usedBytes=0,o.contents=null):bt.isLink(o.mode)?(o.node_ops=gt.ops_table.link.node,o.stream_ops=gt.ops_table.link.stream):bt.isChrdev(o.mode)&&(o.node_ops=gt.ops_table.chrdev.node,o.stream_ops=gt.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=bt.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,bt.isDir(e.mode)?t.size=4096:bt.isFile(e.mode)?t.size=e.usedBytes:bt.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&>.resizeFileStorage(e,t.size)},lookup:function(e,t){throw bt.genericErrors[44]},mknod:function(e,t,r,n){return gt.createNode(e,t,r,n)},rename:function(e,t,r){if(bt.isDir(e.mode)){var n;try{n=bt.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new bt.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=bt.lookupNode(e,t);for(var n in r.contents)throw new bt.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=gt.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!bt.isLink(e.mode))throw new bt.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===X.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(gt.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&&bt.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new bt.ErrnoError(28);return n},allocate:function(e,t,r){gt.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 bt.ErrnoError(28);if(!bt.isFile(e.node.mode))throw new bt.ErrnoError(43);var a,s,c=e.node.contents;if(2&i||c.buffer!==B){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=pt(r)))throw new bt.ErrnoError(48);X.set(c,a)}else s=!1,a=c.byteOffset;return{ptr:a,allocated:s}},msync:function(e,t,r,n,o){if(!bt.isFile(e.node.mode))throw new bt.ErrnoError(43);return 2&o||gt.stream_ops.write(e,t,0,n,r,!1),0}}};function ht(e,t,r,n){var o=n?"":Ie("al "+e);v(e,(function(r){C(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),o&&je(o)}),(function(t){if(!r)throw'Loading data file "'+e+'" failed.';r()})),o&&Ne(o)}var mt={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"},vt={},bt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=ut.resolve(bt.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 bt.ErrnoError(32);for(var o=st.normalizeArray(e.split("/").filter((e=>!!e)),!1),i=bt.root,a="/",s=0;s<o.length;s++){var c=s===o.length-1;if(c&&t.parent)break;if(i=bt.lookupNode(i,o[s]),a=st.join2(a,o[s]),bt.isMountpoint(i)&&(!c||c&&t.follow_mount)&&(i=i.mounted.root),!c||t.follow)for(var u=0;bt.isLink(i.mode);){var l=bt.readlink(a);if(a=ut.resolve(st.dirname(a),l),i=bt.lookupPath(a,{recurse_count:t.recurse_count}).node,u++>40)throw new bt.ErrnoError(32)}}return{path:a,node:i}},getPath:e=>{for(var t;;){if(bt.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:(e,t)=>{for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%bt.nameTable.length},hashAddNode:e=>{var t=bt.hashName(e.parent.id,e.name);e.name_next=bt.nameTable[t],bt.nameTable[t]=e},hashRemoveNode:e=>{var t=bt.hashName(e.parent.id,e.name);if(bt.nameTable[t]===e)bt.nameTable[t]=e.name_next;else for(var r=bt.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:(e,t)=>{var r=bt.mayLookup(e);if(r)throw new bt.ErrnoError(r,e);for(var n=bt.hashName(e.id,t),o=bt.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return bt.lookup(e,t)},createNode:(e,t,r,n)=>{C("object"==typeof e);var o=new bt.FSNode(e,t,r,n);return bt.hashAddNode(o),o},destroyNode:e=>{bt.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=bt.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>bt.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>bt.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,t)=>{try{return bt.lookupNode(e,t),20}catch(e){}return bt.nodePermissions(e,"wx")},mayDelete:(e,t,r)=>{var n;try{n=bt.lookupNode(e,t)}catch(e){return e.errno}var o=bt.nodePermissions(e,"wx");if(o)return o;if(r){if(!bt.isDir(n.mode))return 54;if(bt.isRoot(n)||bt.getPath(n)===bt.cwd())return 10}else if(bt.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?bt.isLink(e.mode)?32:bt.isDir(e.mode)&&("r"!==bt.flagsToPermissionString(t)||512&t)?31:bt.nodePermissions(e,bt.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=bt.MAX_OPEN_FDS)=>{for(var r=e;r<=t;r++)if(!bt.streams[r])return r;throw new bt.ErrnoError(33)},getStream:e=>bt.streams[e],createStream:(e,t,r)=>{bt.FSStream||(bt.FSStream=function(){},bt.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}}}),e=Object.assign(new bt.FSStream,e);var n=bt.nextfd(t,r);return e.fd=n,bt.streams[n]=e,e},closeStream:e=>{bt.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=bt.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new bt.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{bt.devices[e]={stream_ops:t}},getDevice:e=>bt.devices[e],getMounts:e=>{for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),bt.syncFSRequests++,bt.syncFSRequests>1&&O("warning: "+bt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=bt.getMounts(bt.root.mount),n=0;function o(e){return C(bt.syncFSRequests>0),bt.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((t=>{if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount:(e,t,r)=>{if("string"==typeof e)throw e;var n,o="/"===r,i=!r;if(o&&bt.root)throw new bt.ErrnoError(10);if(!o&&!i){var a=bt.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,bt.isMountpoint(n))throw new bt.ErrnoError(10);if(!bt.isDir(n.mode))throw new bt.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(s);return c.mount=s,s.root=c,o?bt.root=c:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),c},unmount:e=>{var t=bt.lookupPath(e,{follow_mount:!1});if(!bt.isMountpoint(t.node))throw new bt.ErrnoError(28);var r=t.node,n=r.mounted,o=bt.getMounts(n);Object.keys(bt.nameTable).forEach((e=>{for(var t=bt.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&bt.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);C(-1!==i),r.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,r)=>{var n=bt.lookupPath(e,{parent:!0}).node,o=st.basename(e);if(!o||"."===o||".."===o)throw new bt.ErrnoError(28);var i=bt.mayCreate(n,o);if(i)throw new bt.ErrnoError(i);if(!n.node_ops.mknod)throw new bt.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,bt.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,bt.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var r=e.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{bt.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>(void 0===r&&(r=t,t=438),t|=8192,bt.mknod(e,t,r)),symlink:(e,t)=>{if(!ut.resolve(e))throw new bt.ErrnoError(44);var r=bt.lookupPath(t,{parent:!0}).node;if(!r)throw new bt.ErrnoError(44);var n=st.basename(t),o=bt.mayCreate(r,n);if(o)throw new bt.ErrnoError(o);if(!r.node_ops.symlink)throw new bt.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:(e,t)=>{var r,n,o=st.dirname(e),i=st.dirname(t),a=st.basename(e),s=st.basename(t);if(r=bt.lookupPath(e,{parent:!0}).node,n=bt.lookupPath(t,{parent:!0}).node,!r||!n)throw new bt.ErrnoError(44);if(r.mount!==n.mount)throw new bt.ErrnoError(75);var c,u=bt.lookupNode(r,a),l=ut.relative(e,i);if("."!==l.charAt(0))throw new bt.ErrnoError(28);if("."!==(l=ut.relative(t,o)).charAt(0))throw new bt.ErrnoError(55);try{c=bt.lookupNode(n,s)}catch(e){}if(u!==c){var d=bt.isDir(u.mode),f=bt.mayDelete(r,a,d);if(f)throw new bt.ErrnoError(f);if(f=c?bt.mayDelete(n,s,d):bt.mayCreate(n,s))throw new bt.ErrnoError(f);if(!r.node_ops.rename)throw new bt.ErrnoError(63);if(bt.isMountpoint(u)||c&&bt.isMountpoint(c))throw new bt.ErrnoError(10);if(n!==r&&(f=bt.nodePermissions(r,"w")))throw new bt.ErrnoError(f);bt.hashRemoveNode(u);try{r.node_ops.rename(u,n,s)}catch(e){throw e}finally{bt.hashAddNode(u)}}},rmdir:e=>{var t=bt.lookupPath(e,{parent:!0}).node,r=st.basename(e),n=bt.lookupNode(t,r),o=bt.mayDelete(t,r,!0);if(o)throw new bt.ErrnoError(o);if(!t.node_ops.rmdir)throw new bt.ErrnoError(63);if(bt.isMountpoint(n))throw new bt.ErrnoError(10);t.node_ops.rmdir(t,r),bt.destroyNode(n)},readdir:e=>{var t=bt.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new bt.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=bt.lookupPath(e,{parent:!0}).node;if(!t)throw new bt.ErrnoError(44);var r=st.basename(e),n=bt.lookupNode(t,r),o=bt.mayDelete(t,r,!1);if(o)throw new bt.ErrnoError(o);if(!t.node_ops.unlink)throw new bt.ErrnoError(63);if(bt.isMountpoint(n))throw new bt.ErrnoError(10);t.node_ops.unlink(t,r),bt.destroyNode(n)},readlink:e=>{var t=bt.lookupPath(e).node;if(!t)throw new bt.ErrnoError(44);if(!t.node_ops.readlink)throw new bt.ErrnoError(28);return ut.resolve(bt.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var r=bt.lookupPath(e,{follow:!t}).node;if(!r)throw new bt.ErrnoError(44);if(!r.node_ops.getattr)throw new bt.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>bt.stat(e,!0),chmod:(e,t,r)=>{var n;if(!(n="string"==typeof e?bt.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new bt.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{bt.chmod(e,t,!0)},fchmod:(e,t)=>{var r=bt.getStream(e);if(!r)throw new bt.ErrnoError(8);bt.chmod(r.node,t)},chown:(e,t,r,n)=>{var o;if(!(o="string"==typeof e?bt.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new bt.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,t,r)=>{bt.chown(e,t,r,!0)},fchown:(e,t,r)=>{var n=bt.getStream(e);if(!n)throw new bt.ErrnoError(8);bt.chown(n.node,t,r)},truncate:(e,t)=>{if(t<0)throw new bt.ErrnoError(28);var r;if(!(r="string"==typeof e?bt.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new bt.ErrnoError(63);if(bt.isDir(r.mode))throw new bt.ErrnoError(31);if(!bt.isFile(r.mode))throw new bt.ErrnoError(28);var n=bt.nodePermissions(r,"w");if(n)throw new bt.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var r=bt.getStream(e);if(!r)throw new bt.ErrnoError(8);if(0==(2097155&r.flags))throw new bt.ErrnoError(28);bt.truncate(r.node,t)},utime:(e,t,r)=>{var n=bt.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open:(e,t,r,n,i)=>{if(""===e)throw new bt.ErrnoError(44);var a;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?bt.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)a=e;else{e=st.normalize(e);try{a=bt.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(a){if(128&t)throw new bt.ErrnoError(20)}else a=bt.mknod(e,r,0),s=!0;if(!a)throw new bt.ErrnoError(44);if(bt.isChrdev(a.mode)&&(t&=-513),65536&t&&!bt.isDir(a.mode))throw new bt.ErrnoError(54);if(!s){var c=bt.mayOpen(a,t);if(c)throw new bt.ErrnoError(c)}512&t&&bt.truncate(a,0),t&=-131713;var u=bt.createStream({node:a,path:bt.getPath(a),flags:t,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);return u.stream_ops.open&&u.stream_ops.open(u),!o.logReadFiles||1&t||(bt.readFiles||(bt.readFiles={}),e in bt.readFiles||(bt.readFiles[e]=1)),u},close:e=>{if(bt.isClosed(e))throw new bt.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{bt.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,r)=>{if(bt.isClosed(e))throw new bt.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new bt.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new bt.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:(e,t,r,n,o)=>{if(n<0||o<0)throw new bt.ErrnoError(28);if(bt.isClosed(e))throw new bt.ErrnoError(8);if(1==(2097155&e.flags))throw new bt.ErrnoError(8);if(bt.isDir(e.node.mode))throw new bt.ErrnoError(31);if(!e.stream_ops.read)throw new bt.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new bt.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=a),a},write:(e,t,r,n,o,i)=>{if(n<0||o<0)throw new bt.ErrnoError(28);if(bt.isClosed(e))throw new bt.ErrnoError(8);if(0==(2097155&e.flags))throw new bt.ErrnoError(8);if(bt.isDir(e.node.mode))throw new bt.ErrnoError(31);if(!e.stream_ops.write)throw new bt.ErrnoError(28);e.seekable&&1024&e.flags&&bt.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new bt.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:(e,t,r)=>{if(bt.isClosed(e))throw new bt.ErrnoError(8);if(t<0||r<=0)throw new bt.ErrnoError(28);if(0==(2097155&e.flags))throw new bt.ErrnoError(8);if(!bt.isFile(e.node.mode)&&!bt.isDir(e.node.mode))throw new bt.ErrnoError(43);if(!e.stream_ops.allocate)throw new bt.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:(e,t,r,n,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&e.flags))throw new bt.ErrnoError(2);if(1==(2097155&e.flags))throw new bt.ErrnoError(2);if(!e.stream_ops.mmap)throw new bt.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o,i)},msync:(e,t,r,n,o)=>e&&e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0,munmap:e=>0,ioctl:(e,t,r)=>{if(!e.stream_ops.ioctl)throw new bt.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile:(e,t={})=>{if(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=bt.open(e,t.flags),o=bt.stat(e).size,i=new Uint8Array(o);return bt.read(n,i,0,o,0),"utf8"===t.encoding?r=N(i,0):"binary"===t.encoding&&(r=i),bt.close(n),r},writeFile:(e,t,r={})=>{r.flags=r.flags||577;var n=bt.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(H(t)+1),i=L(t,o,0,o.length);bt.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");bt.write(n,t,0,t.byteLength,void 0,r.canOwn)}bt.close(n)},cwd:()=>bt.currentPath,chdir:e=>{var t=bt.lookupPath(e,{follow:!0});if(null===t.node)throw new bt.ErrnoError(44);if(!bt.isDir(t.node.mode))throw new bt.ErrnoError(54);var r=bt.nodePermissions(t.node,"x");if(r)throw new bt.ErrnoError(r);bt.currentPath=t.path},createDefaultDirectories:()=>{bt.mkdir("/tmp"),bt.mkdir("/home"),bt.mkdir("/home/web_user")},createDefaultDevices:()=>{bt.mkdir("/dev"),bt.registerDevice(bt.makedev(1,3),{read:()=>0,write:(e,t,r,n,o)=>n}),bt.mkdev("/dev/null",bt.makedev(1,3)),lt.register(bt.makedev(5,0),lt.default_tty_ops),lt.register(bt.makedev(6,0),lt.default_tty1_ops),bt.mkdev("/dev/tty",bt.makedev(5,0)),bt.mkdev("/dev/tty1",bt.makedev(6,0));var e=ct();bt.createDevice("/dev","random",e),bt.createDevice("/dev","urandom",e),bt.mkdir("/dev/shm"),bt.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{bt.mkdir("/proc");var e=bt.mkdir("/proc/self");bt.mkdir("/proc/self/fd"),bt.mount({mount:()=>{var t=bt.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var r=+t,n=bt.getStream(r);if(!n)throw new bt.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?bt.createDevice("/dev","stdin",o.stdin):bt.symlink("/dev/tty","/dev/stdin"),o.stdout?bt.createDevice("/dev","stdout",null,o.stdout):bt.symlink("/dev/tty","/dev/stdout"),o.stderr?bt.createDevice("/dev","stderr",null,o.stderr):bt.symlink("/dev/tty1","/dev/stderr");var e=bt.open("/dev/stdin",0),t=bt.open("/dev/stdout",1),r=bt.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:()=>{bt.ErrnoError||(bt.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,vt)if(vt[t]===e){this.code=t;break}},this.setErrno(e),this.message=mt[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=Ke(this.stack))},bt.ErrnoError.prototype=new Error,bt.ErrnoError.prototype.constructor=bt.ErrnoError,[44].forEach((e=>{bt.genericErrors[e]=new bt.ErrnoError(e),bt.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{bt.ensureErrnoError(),bt.nameTable=new Array(4096),bt.mount(gt,{},"/"),bt.createDefaultDirectories(),bt.createDefaultDevices(),bt.createSpecialDirectories(),bt.filesystems={MEMFS:gt}},init:(e,t,r)=>{C(!bt.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)"),bt.init.initialized=!0,bt.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=t||o.stdout,o.stderr=r||o.stderr,bt.createStandardStreams()},quit:()=>{bt.init.initialized=!1,Af();for(var e=0;e<bt.streams.length;e++){var t=bt.streams[e];t&&bt.close(t)}},getMode:(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:(e,t)=>{var r=bt.analyzePath(e,t);return r.exists?r.object:null},analyzePath:(e,t)=>{try{e=(n=bt.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=bt.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=st.basename(e),n=bt.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:(e,t,r,n)=>{e="string"==typeof e?e:bt.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=st.join2(e,i);try{bt.mkdir(a)}catch(e){}e=a}}return a},createFile:(e,t,r,n,o)=>{var i=st.join2("string"==typeof e?e:bt.getPath(e),t),a=bt.getMode(n,o);return bt.create(i,a)},createDataFile:(e,t,r,n,o,i)=>{var a=t;e&&(e="string"==typeof e?e:bt.getPath(e),a=t?st.join2(e,t):e);var s=bt.getMode(n,o),c=bt.create(a,s);if(r){if("string"==typeof r){for(var u=new Array(r.length),l=0,d=r.length;l<d;++l)u[l]=r.charCodeAt(l);r=u}bt.chmod(c,146|s);var f=bt.open(c,577);bt.write(f,r,0,r.length,0,i),bt.close(f),bt.chmod(c,s)}return c},createDevice:(e,t,r,n)=>{var o=st.join2("string"==typeof e?e:bt.getPath(e),t),i=bt.getMode(!!r,!!n);bt.createDevice.major||(bt.createDevice.major=64);var a=bt.makedev(bt.createDevice.major++,0);return bt.registerDevice(a,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,t,n,o,i)=>{for(var a=0,s=0;s<o;s++){var c;try{c=r()}catch(e){throw new bt.ErrnoError(29)}if(void 0===c&&0===a)throw new bt.ErrnoError(6);if(null==c)break;a++,t[n+s]=c}return a&&(e.node.timestamp=Date.now()),a},write:(e,t,r,o,i)=>{for(var a=0;a<o;a++)try{n(t[r+a])}catch(e){throw new bt.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),bt.mkdev(o,i,a)},forceLoadFile: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(!m)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=Pf(m(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new bt.ErrnoError(29)}},createLazyFile:(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((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]=((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),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||[]):Pf(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,_("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(!p)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=bt.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((e=>{var t=c.stream_ops[e];u[e]=function(){return bt.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,o)=>{bt.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:(e,t,r,n,o,i,a,s,c,u)=>{var l=t?ut.resolve(st.join2(e,t)):e,d=Ie("cp "+l);function f(r){function f(r){u&&u(),s||bt.createDataFile(e,t,r,n,o,c),i&&i(),je(d)}ho.handledByPreloadPlugin(r,l,f,(()=>{a&&a(),je(d)}))||f(r)}Ne(d),"string"==typeof r?ht(r,(e=>f(e)),a):f(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=bt.indexedDB();try{var o=n.open(bt.DB_NAME(),bt.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=()=>{_("creating db"),o.result.createObjectStore(bt.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([bt.DB_STORE_NAME],"readwrite"),i=n.objectStore(bt.DB_STORE_NAME),a=0,s=0,c=e.length;function u(){0==s?t():r()}e.forEach((e=>{var t=i.put(bt.analyzePath(e).object.contents,e);t.onsuccess=()=>{++a+s==c&&u()},t.onerror=()=>{s++,a+s==c&&u()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=bt.indexedDB();try{var o=n.open(bt.DB_NAME(),bt.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=r,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([bt.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var a=i.objectStore(bt.DB_STORE_NAME),s=0,c=0,u=e.length;function l(){0==c?t():r()}e.forEach((e=>{var t=a.get(e);t.onsuccess=()=>{bt.analyzePath(e).exists&&bt.unlink(e),bt.createDataFile(st.dirname(e),st.basename(e),t.result,!0,!0,!0),++s+c==u&&l()},t.onerror=()=>{c++,s+c==u&&l()}})),i.onerror=r},o.onerror=r},absolutePath:()=>{Le("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:()=>{Le("FS.createFolder has been removed; use FS.mkdir instead")},createLink:()=>{Le("FS.createLink has been removed; use FS.symlink instead")},joinPath:()=>{Le("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:()=>{Le("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:()=>{Le("FS.standardizePath has been removed; use PATH.normalize instead")}},yt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if("/"===t[0])return t;var n;if(-100===e)n=bt.cwd();else{var o=bt.getStream(e);if(!o)throw new bt.ErrnoError(8);n=o.path}if(0==t.length){if(!r)throw new bt.ErrnoError(44);return n}return st.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&st.normalize(t)!==st.normalize(bt.getPath(e.node)))return-54;throw e}return V[r>>2]=n.dev,V[r+4>>2]=0,V[r+8>>2]=n.ino,V[r+12>>2]=n.mode,V[r+16>>2]=n.nlink,V[r+20>>2]=n.uid,V[r+24>>2]=n.gid,V[r+28>>2]=n.rdev,V[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)],V[r+40>>2]=Be[0],V[r+44>>2]=Be[1],V[r+48>>2]=4096,V[r+52>>2]=n.blocks,V[r+56>>2]=n.atime.getTime()/1e3|0,V[r+60>>2]=0,V[r+64>>2]=n.mtime.getTime()/1e3|0,V[r+68>>2]=0,V[r+72>>2]=n.ctime.getTime()/1e3|0,V[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)],V[r+80>>2]=Be[0],V[r+84>>2]=Be[1],0},doMsync:function(e,t,r,n,o){var i=Q.slice(e,e+r);bt.msync(t,i,o,r,n)},doMkdir:function(e,t){return"/"===(e=st.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),bt.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 bt.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-28;var n=bt.readlink(e),o=Math.min(r,H(n)),i=X[t+o];return U(n,t,r+1),X[t+o]=i,o},doAccess:function(e,t){if(-8&t)return-28;var r=bt.lookupPath(e,{follow:!0}).node;if(!r)return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&bt.nodePermissions(r,n)?-2:0},doDup:function(e,t,r){var n=bt.getStream(r);return n&&bt.close(n),bt.open(e,t,0,r,r).fd},doReadv:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=V[t+8*i>>2],s=V[t+(8*i+4)>>2],c=bt.read(e,X,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=V[t+8*i>>2],s=V[t+(8*i+4)>>2],c=bt.write(e,X,a,s,n);if(c<0)return-1;o+=c}return o},varargs:void 0,get:function(){return C(null!=yt.varargs),yt.varargs+=4,V[yt.varargs-4>>2]},getStr:function(e){return j(e)},getStreamFromFD:function(e){var t=bt.getStream(e);if(!t)throw new bt.ErrnoError(8);return t},get64:function(e,t){return C(e>=0?0===t:-1===t),e}};function Et(e,t,r){yt.varargs=r;try{var n=yt.getStreamFromFD(e);switch(t){case 0:return(o=yt.get())<0?-28:bt.open(n.path,n.flags,0,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=yt.get();return n.flags|=o,0;case 5:return o=yt.get(),G[o+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return it(28),-1;default:return-28}}catch(e){if(void 0===bt||!(e instanceof bt.ErrnoError))throw e;return-e.errno}}function wt(e,t,r){yt.varargs=r;try{var n=yt.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=yt.get();return V[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=yt.get(),bt.ioctl(n,t,o);case 21523:case 21524:return n.tty?0:-59;default:Le("bad ioctl syscall "+t)}}catch(e){if(void 0===bt||!(e instanceof bt.ErrnoError))throw e;return-e.errno}}function _t(e,t,r){yt.varargs=r;try{var n=yt.getStr(e),o=r?yt.get():0;return bt.open(n,t,o).fd}catch(e){if(void 0===bt||!(e instanceof bt.ErrnoError))throw e;return-e.errno}}function Ot(e,t){Le("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Tt(e,t){Le("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}var Dt={};function Pt(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function xt(e){return this.fromWireType(W[e>>2])}var St={},Mt={},Rt={},kt=48,Ft=57;function At(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=kt&&t<=Ft?"_"+e:e}function Ct(e,t){return e=At(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function It(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 Nt=void 0;function jt(e){throw new Nt(e)}function Lt(e,t,r){function n(t){var n=r(t);n.length!==e.length&&jt("Mismatched type converter count");for(var o=0;o<e.length;++o)$t(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){Mt.hasOwnProperty(e)?o[t]=Mt[e]:(i.push(e),St.hasOwnProperty(e)||(St[e]=[]),St[e].push((function(){o[t]=Mt[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Ut(e){var t=Dt[e];delete Dt[e];var r=t.elements,n=r.length,o=r.map((function(e){return e.getterReturnType})).concat(r.map((function(e){return e.setterArgumentType}))),i=t.rawConstructor,a=t.rawDestructor;Lt([e],o,(function(e){return r.forEach((function(t,r){var o=e[r],i=t.getter,a=t.getterContext,s=e[r+n],c=t.setter,u=t.setterContext;t.read=e=>o.fromWireType(i(a,e)),t.write=(e,t)=>{var r=[];c(u,e,s.toWireType(r,t)),Pt(r)}})),[{name:t.name,fromWireType:function(e){for(var t=new Array(n),o=0;o<n;++o)t[o]=r[o].read(e);return a(e),t},toWireType:function(e,o){if(n!==o.length)throw new TypeError("Incorrect number of tuple elements for "+t.name+": expected="+n+", actual="+o.length);for(var s=i(),c=0;c<n;++c)r[c].write(s,o[c]);return null!==e&&e.push(a,s),s},argPackAdvance:8,readValueFromPointer:xt,destructorFunction:a}]}))}var Ht={};function Bt(e){var t=Ht[e];delete Ht[e];var r=t.rawConstructor,n=t.rawDestructor,o=t.fields;Lt([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,d=t.setterContext;i[n]={read:function(e){return a.fromWireType(s(c,e))},write:function(e,t){var r=[];l(d,e,u.toWireType(r,t)),Pt(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:xt,destructorFunction:n}]}))}function Xt(e,t,r,n,o){}function Qt(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 Gt(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);qt=e}var qt=void 0;function Vt(e){for(var t="",r=e;Q[r];)t+=qt[Q[r++]];return t}var Wt=void 0;function zt(e){throw new Wt(e)}function $t(e,t,r={}){if(!("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'),Mt.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;zt("Cannot register type '"+n+"' twice")}if(Mt[e]=t,delete Rt[e],St.hasOwnProperty(e)){var o=St[e];delete St[e],o.forEach((function(e){e()}))}}function Yt(e,t,r,n,o){var i=Qt(r);$t(e,{name:t=Vt(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=X;else if(2===r)n=G;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=V}return this.fromWireType(n[e>>i])},destructorFunction:null})}function Kt(e){if(!(this instanceof Tr))return!1;if(!(e instanceof Tr))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 Jt(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 er=!1;function tr(e){}function rr(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function nr(e){e.count.value-=1,0===e.count.value&&rr(e)}function or(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=or(e,t,r.baseClass);return null===n?null:r.downcast(n)}var ir={};function ar(){return Object.keys(pr).length}function sr(){var e=[];for(var t in pr)pr.hasOwnProperty(t)&&e.push(pr[t]);return e}var cr=[];function ur(){for(;cr.length;){var e=cr.pop();e.$$.deleteScheduled=!1,e.delete()}}var lr=void 0;function dr(e){lr=e,cr.length&&lr&&lr(ur)}function fr(){o.getInheritedInstanceCount=ar,o.getLiveInheritedInstances=sr,o.flushPendingDeletes=ur,o.setDelayFunction=dr}var pr={};function gr(e,t){for(void 0===t&&zt("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function hr(e,t){return t=gr(e,t),pr[t]}function mr(e,t){return t.ptrType&&t.ptr||jt("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&jt("Both smartPtrType and smartPtr must be specified"),t.count={value:1},br(Object.create(e,{$$:{value:t}}))}function vr(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=hr(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?mr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):mr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=ir[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var c=or(t,this.registeredClass,i.registeredClass);return null===c?o.call(this):this.isSmartPointer?mr(i.registeredClass.instancePrototype,{ptrType:i,ptr:c,smartPtrType:this,smartPtr:e}):mr(i.registeredClass.instancePrototype,{ptrType:i,ptr:c})}function br(e){return"undefined"==typeof FinalizationRegistry?(br=e=>e,e):(er=new FinalizationRegistry((e=>{console.warn(e.leakWarning.stack.replace(/^Error: /,"")),nr(e.$$)})),tr=e=>er.unregister(e),(br=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t},n=t.ptrType.registeredClass;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,vr),er.register(e,r,e)}return e})(e))}function yr(){if(this.$$.ptr||Zt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=br(Object.create(Object.getPrototypeOf(this),{$$:{value:Jt(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Er(){this.$$.ptr||Zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&zt("Object already scheduled for deletion"),tr(this),nr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function wr(){return!this.$$.ptr}function _r(){return this.$$.ptr||Zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&zt("Object already scheduled for deletion"),cr.push(this),1===cr.length&&lr&&lr(ur),this.$$.deleteScheduled=!0,this}function Or(){Tr.prototype.isAliasOf=Kt,Tr.prototype.clone=yr,Tr.prototype.delete=Er,Tr.prototype.isDeleted=wr,Tr.prototype.deleteLater=_r}function Tr(){}function Dr(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 Pr(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"),Dr(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 xr(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 Sr(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 Mr(e,t){if(null===t)return this.isReference&&zt("null is not a valid "+this.name),0;t.$$||zt('Cannot pass "'+ln(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 Sr(t.$$.ptr,r,this.registeredClass)}function Rr(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 "'+ln(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=Sr(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,nn.toHandle((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:zt("Unsupporting sharing policy")}return r}function kr(e,t){if(null===t)return this.isReference&&zt("null is not a valid "+this.name),0;t.$$||zt('Cannot pass "'+ln(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 Sr(t.$$.ptr,r,this.registeredClass)}function Fr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Ar(e){this.rawDestructor&&this.rawDestructor(e)}function Cr(e){null!==e&&e.delete()}function Ir(){Nr.prototype.getPointee=Fr,Nr.prototype.destructor=Ar,Nr.prototype.argPackAdvance=8,Nr.prototype.readValueFromPointer=xt,Nr.prototype.deleteObject=Cr,Nr.prototype.fromWireType=vr}function Nr(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=Rr:n?(this.toWireType=Mr,this.destructorFunction=null):(this.toWireType=kr,this.destructorFunction=null)}function jr(e,t,r){o.hasOwnProperty(e)||jt("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 Ur(e,t,r){return e.includes("j")?Lr(e,t,r):(C(Ze(t),"missing table entry in dynCall: "+t),Ze(t).apply(null,r))}function Hr(e,t){C(e.includes("j"),"getDynCaller should only be called with i64 sigs");var r=[];return function(){return r.length=0,Object.assign(r,arguments),Ur(e,t,r)}}function Br(e,t){var r=(e=Vt(e)).includes("j")?Hr(e,t):Ze(t);return"function"!=typeof r&&zt("unknown function pointer with signature "+e+": "+t),r}var Xr=void 0;function Qr(e){var t=Ff(e),r=Vt(t);return Rf(t),r}function Gr(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||Mt[t]||(Rt[t]?Rt[t].forEach(e):(r.push(t),n[t]=!0))})),new Xr(e+": "+r.map(Qr).join([", "]))}function qr(e,t,r,n,o,i,a,s,c,u,l,d,f){l=Vt(l),i=Br(o,i),s&&(s=Br(a,s)),u&&(u=Br(c,u)),f=Br(d,f);var p=At(l);Pr(p,(function(){Gr("Cannot construct "+l+" due to unbound types",[n])})),Lt([e,t,r],n?[n]:[],(function(t){var r,o;t=t[0],o=n?(r=t.registeredClass).instancePrototype:Tr.prototype;var a=Ct(p,(function(){if(Object.getPrototypeOf(this)!==c)throw new Wt("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Wt(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Wt("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(d.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),c=Object.create(o,{constructor:{value:a}});a.prototype=c;var d=new xr(l,a,c,f,r,i,s,u),g=new Nr(l,d,!0,!1,!1),h=new Nr(l+"*",d,!1,!1,!1),m=new Nr(l+" const*",d,!1,!0,!1);return ir[e]={pointerType:h,constPointerType:m},jr(p,a),[g,h,m]}))}function Vr(e,t){for(var r=[],n=0;n<e;n++)r.push(V[(t>>2)+n]);return r}function Wr(e,t,r,n,o,i){C(t>0);var a=Vr(t,r);o=Br(n,o),Lt([],[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 Wt("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]=()=>{Gr("Cannot construct "+e.name+" due to unbound types",a)},Lt([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=$r(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 $r(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="",d="";for(c=0;c<i-2;++c)l+=(0!==c?", ":"")+"arg"+c,d+=(0!==c?", ":"")+"arg"+c+"Wired";var f="return function "+At(e)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(f+="var destructors = [];\n");var p=s?"destructors":"null",g=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],h=[zt,n,o,Pt,t[0],t[1]];for(a&&(f+="var thisWired = classParam.toWireType("+p+", this);\n"),c=0;c<i-2;++c)f+="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&&(d="thisWired"+(d.length>0?", ":"")+d),f+=(u?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",s)f+="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&&(f+=m+"_dtor("+m+"); // "+t[c].name+"\n",g.push(m+"_dtor"),h.push(t[c].destructorFunction))}return u&&(f+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),f+="}\n",g.push(f),zr(Function,g).apply(null,h)}function Yr(e,t,r,n,o,i,a,s){var c=Vr(r,n);t=Vt(t),i=Br(o,i),Lt([],[e],(function(e){var n=(e=e[0]).name+"."+t;function o(){Gr("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):(Dr(u,t,n),u[t].overloadTable[r-2]=o),Lt([],c,(function(o){var s=$r(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 Kr=[],Jr=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Zr(e){e>4&&0==--Jr[e].refcount&&(Jr[e]=void 0,Kr.push(e))}function en(){for(var e=0,t=5;t<Jr.length;++t)void 0!==Jr[t]&&++e;return e}function tn(){for(var e=5;e<Jr.length;++e)if(void 0!==Jr[e])return Jr[e];return null}function rn(){o.count_emval_handles=en,o.get_first_emval=tn}var nn={toValue:function(e){return e||zt("Cannot use deleted val. handle = "+e),Jr[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=Kr.length?Kr.pop():Jr.length;return Jr[t]={refcount:1,value:e},t}}};function on(e,t){$t(e,{name:t=Vt(t),fromWireType:function(e){var t=nn.toValue(e);return Zr(e),t},toWireType:function(e,t){return nn.toHandle(t)},argPackAdvance:8,readValueFromPointer:xt,destructorFunction:null})}function an(e,t,r){switch(t){case 0:return function(e){var t=r?X:Q;return this.fromWireType(t[e])};case 1:return function(e){var t=r?G:q;return this.fromWireType(t[e>>1])};case 2:return function(e){var t=r?V:W;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function sn(e,t,r,n){var o=Qt(r);function i(){}t=Vt(t),i.values={},$t(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:an(t,o,n),destructorFunction:null}),Pr(t,i)}function cn(e,t){var r=Mt[e];return void 0===r&&zt(t+" has unknown type "+Qr(e)),r}function un(e,t,r){var n=cn(e,"enum");t=Vt(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 ln(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function dn(e,t){switch(t){case 2:return function(e){return this.fromWireType(z[e>>2])};case 3:return function(e){return this.fromWireType($[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function fn(e,t,r){var n=Qt(r);$t(e,{name:t=Vt(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+ln(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:dn(t,n),destructorFunction:null})}function pn(e,t,r,n,o,i){var a=Vr(t,r);e=Vt(e),o=Br(n,o),Pr(e,(function(){Gr("Cannot call "+e+" due to unbound types",a)}),t-1),Lt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return jr(e,$r(e,n,null,o,i),t-1),[]}))}function gn(e,t,r){switch(t){case 0:return r?function(e){return X[e]}:function(e){return Q[e]};case 1:return r?function(e){return G[e>>1]}:function(e){return q[e>>1]};case 2:return r?function(e){return V[e>>2]}:function(e){return W[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function hn(e,t,r,n,o){t=Vt(t),-1===o&&(o=4294967295);var i=Qt(r),a=e=>e;if(0===n){var s=32-8*r;a=e=>e<<s>>>s}var c=t.includes("unsigned"),u=(e,r)=>{if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+ln(e)+'" to '+r);if(e<n||e>o)throw new TypeError('Passing a number "'+ln(e)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!")};$t(e,{name:t,fromWireType:a,toWireType:c?function(e,t){return u(t,this.name),t>>>0}:function(e,t){return u(t,this.name),t},argPackAdvance:8,readValueFromPointer:gn(t,i,0!==n),destructorFunction:null})}function mn(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(B,o,r)}$t(e,{name:r=Vt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function vn(e,t,r,n,o,i,a,s,c,u,l,d){r=Vt(r),i=Br(o,i),s=Br(a,s),u=Br(c,u),d=Br(l,d),Lt([e],[t],(function(e){return e=e[0],[new Nr(r,e.registeredClass,!1,!1,!0,e,n,i,s,u,d)]}))}function bn(e,t){var r="std::string"===(t=Vt(t));$t(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==Q[a]){var s=j(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(Q[e+4+i]);t=c.join("")}return Rf(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?()=>H(t):()=>t.length)(),i=Mf(4+o+1);if(W[i>>2]=o,r&&n)U(t,i+4,o+1);else if(n)for(var a=0;a<o;++a){var s=t.charCodeAt(a);s>255&&(Rf(i),zt("String has UTF-16 code units that do not fit in 8 bits")),Q[i+4+a]=s}else for(a=0;a<o;++a)Q[i+4+a]=t[a];return null!==e&&e.push(Rf,i),i},argPackAdvance:8,readValueFromPointer:xt,destructorFunction:function(e){Rf(e)}})}function yn(e,t,r){var n,o,i,a,s;r=Vt(r),2===t?(n=K,o=J,a=Z,i=()=>q,s=1):4===t&&(n=ee,o=te,a=re,i=()=>W,s=2),$t(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 d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+t}}return Rf(e),r},toWireType:function(e,n){"string"!=typeof n&&zt("Cannot pass non-string to C++ string type "+r);var i=a(n),c=Mf(4+i+t);return W[c>>2]=i>>s,o(n,c+4,i+t),null!==e&&e.push(Rf,c),c},argPackAdvance:8,readValueFromPointer:xt,destructorFunction:function(e){Rf(e)}})}function En(e,t,r,n,o,i){Dt[e]={name:Vt(t),rawConstructor:Br(r,n),rawDestructor:Br(o,i),elements:[]}}function wn(e,t,r,n,o,i,a,s,c){Dt[e].elements.push({getterReturnType:t,getter:Br(r,n),getterContext:o,setterArgumentType:i,setter:Br(a,s),setterContext:c})}function _n(e,t,r,n,o,i){Ht[e]={name:Vt(t),rawConstructor:Br(r,n),rawDestructor:Br(o,i),fields:[]}}function On(e,t,r,n,o,i,a,s,c,u){Ht[e].fields.push({fieldName:Vt(t),getterReturnType:r,getter:Br(n,o),getterContext:i,setterArgumentType:a,setter:Br(s,c),setterContext:u})}function Tn(e,t){$t(e,{isVoid:!0,name:t=Vt(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})}function Dn(){throw"longjmp"}function Pn(e,t,r){e=nn.toValue(e),t=cn(t,"emval::as");var n=[],o=nn.toHandle(n);return V[r>>2]=o,t.toWireType(n,e)}function xn(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=cn(V[(t>>2)+n],"parameter "+n);return r}function Sn(e,t,r,n){e=nn.toValue(e);for(var o=xn(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 nn.toHandle(c)}function Mn(e){var t=[];return V[e>>2]=nn.toHandle(t),t}var Rn={};function kn(e){var t=Rn[e];return void 0===t?Vt(e):t}var Fn=[];function An(e,t,r,n,o){return(e=Fn[e])(t=nn.toValue(t),r=kn(r),Mn(n),o)}function Cn(e,t,r,n){(e=Fn[e])(t=nn.toValue(t),r=kn(r),null,n)}function In(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Nn(e){return 0===e?nn.toHandle(In()):(e=kn(e),nn.toHandle(In()[e]))}function jn(e){var t=Fn.length;return Fn.push(e),t}var Ln=[];function Un(e,t){var r=xn(e,t),n=r[0],o=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",i=Ln[o];if(void 0!==i)return i;for(var a=["retType"],s=[n],c="",u=0;u<e-1;++u)c+=(0!==u?", ":"")+"arg"+u,a.push("argType"+u),s.push(r[1+u]);var l="return function "+At("methodCaller_"+o)+"(handle, name, destructors, args) {\n",d=0;for(u=0;u<e-1;++u)l+=" var arg"+u+" = argType"+u+".readValueFromPointer(args"+(d?"+"+d:"")+");\n",d+=r[u+1].argPackAdvance;for(l+=" var rv = handle[name]("+c+");\n",u=0;u<e-1;++u)r[u+1].deleteObject&&(l+=" argType"+u+".deleteObject(arg"+u+");\n");return n.isVoid||(l+=" return retType.toWireType(destructors, rv);\n"),l+="};\n",a.push(l),i=jn(zr(Function,a).apply(null,s)),Ln[o]=i,i}function Hn(e,t){return e=nn.toValue(e),t=nn.toValue(t),nn.toHandle(e[t])}function Bn(e){e>4&&(Jr[e].refcount+=1)}function Xn(e,t){return(e=nn.toValue(e))instanceof nn.toValue(t)}function Qn(e){return"string"==typeof(e=nn.toValue(e))}function Gn(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)(cn,o,nn.toHandle)}var qn,Vn={};function Wn(e,t,r,n){e=nn.toValue(e);var o=Vn[t];return o||(o=Gn(t),Vn[t]=o),o(e,r,n)}function zn(){return nn.toHandle([])}function $n(e){return nn.toHandle(kn(e))}function Yn(){return nn.toHandle({})}function Kn(e){Pt(nn.toValue(e)),Zr(e)}function Jn(e,t,r){e=nn.toValue(e),t=nn.toValue(t),r=nn.toValue(r),e[t]=r}function Zn(e,t){var r=(e=cn(e,"_emval_take_value")).readValueFromPointer(t);return nn.toHandle(r)}function eo(e){throw nn.toValue(e)}function to(e,t){var r=new Date(1e3*V[e>>2]);V[t>>2]=r.getSeconds(),V[t+4>>2]=r.getMinutes(),V[t+8>>2]=r.getHours(),V[t+12>>2]=r.getDate(),V[t+16>>2]=r.getMonth(),V[t+20>>2]=r.getFullYear()-1900,V[t+24>>2]=r.getDay();var n=new Date(r.getFullYear(),0,1),o=(r.getTime()-n.getTime())/864e5|0;V[t+28>>2]=o,V[t+36>>2]=-60*r.getTimezoneOffset();var i=new Date(r.getFullYear(),6,1).getTimezoneOffset(),a=n.getTimezoneOffset(),s=0|(i!=a&&r.getTimezoneOffset()==Math.min(a,i));V[t+32>>2]=s}function ro(e){var t=new Date(V[e+20>>2]+1900,V[e+16>>2],V[e+12>>2],V[e+8>>2],V[e+4>>2],V[e>>2],0),r=V[e+32>>2],n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=o.getTimezoneOffset(),s=Math.min(a,i);if(r<0)V[e+32>>2]=Number(i!=a&&s==n);else if(r>0!=(s==n)){var c=Math.max(a,i),u=r>0?s:c;t.setTime(t.getTime()+6e4*(u-n))}V[e+24>>2]=t.getDay();var l=(t.getTime()-o.getTime())/864e5|0;return V[e+28>>2]=l,V[e>>2]=t.getSeconds(),V[e+4>>2]=t.getMinutes(),V[e+8>>2]=t.getHours(),V[e+12>>2]=t.getDate(),V[e+16>>2]=t.getMonth(),t.getTime()/1e3|0}function no(e,t,r){var n=(new Date).getFullYear(),o=new Date(n,0,1),i=new Date(n,6,1),a=o.getTimezoneOffset(),s=i.getTimezoneOffset(),c=Math.max(a,s);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}V[e>>2]=60*c,V[t>>2]=Number(a!=s);var l=u(o),d=u(i),f=ne(l),p=ne(d);s<a?(V[r>>2]=f,V[r+4>>2]=p):(V[r>>2]=p,V[r+4>>2]=f)}function oo(e,t,r){oo.called||(oo.called=!0,no(e,t,r))}function io(){Le("native code called abort()")}qn=()=>performance.now();var ao=!0;function so(e,t){var r;if(0===e)r=Date.now();else{if(1!==e&&4!==e||!ao)return it(28),-1;r=qn()}return V[t>>2]=r/1e3|0,V[t+4>>2]=r%1e3*1e3*1e3|0,0}function co(e,t){if(ho.mainLoop.timingMode=e,ho.mainLoop.timingValue=t,!ho.mainLoop.func)return O("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(ho.mainLoop.running||(ho.mainLoop.running=!0),0==e)ho.mainLoop.scheduler=function(){var e=0|Math.max(0,ho.mainLoop.tickStartTime+t-qn());setTimeout(ho.mainLoop.runner,e)},ho.mainLoop.method="timeout";else if(1==e)ho.mainLoop.scheduler=function(){ho.requestAnimationFrame(ho.mainLoop.runner)},ho.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),p?(void 0===o.setImmediates&&(o.setImmediates=[]),o.setImmediates.push(e),postMessage({target:n})):postMessage(n,"*")}}ho.mainLoop.scheduler=function(){setImmediate(ho.mainLoop.runner)},ho.mainLoop.method="immediate"}return 0}function uo(e){Jf(e)}function lo(){if(!_e())try{uo(F)}catch(e){et(e)}}function fo(e,t,r,n,i){C(!ho.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."),ho.mainLoop.func=e,ho.mainLoop.arg=n;var a=ho.mainLoop.currentlyRunningMainloop;function s(){return!(a<ho.mainLoop.currentlyRunningMainloop&&(lo(),1))}if(ho.mainLoop.running=!1,ho.mainLoop.runner=function(){if(!A)if(ho.mainLoop.queue.length>0){var t=Date.now(),r=ho.mainLoop.queue.shift();if(r.func(r.arg),ho.mainLoop.remainingBlockers){var n=ho.mainLoop.remainingBlockers,i=n%1==0?n-1:Math.floor(n);r.counted?ho.mainLoop.remainingBlockers=i:(i+=.5,ho.mainLoop.remainingBlockers=(8*n+i)/9)}if(_('main loop blocker "'+r.name+'" took '+(Date.now()-t)+" ms"),ho.mainLoop.updateStatus(),!s())return;setTimeout(ho.mainLoop.runner,0)}else s()&&(ho.mainLoop.currentFrameNumber=ho.mainLoop.currentFrameNumber+1|0,1==ho.mainLoop.timingMode&&ho.mainLoop.timingValue>1&&ho.mainLoop.currentFrameNumber%ho.mainLoop.timingValue!=0?ho.mainLoop.scheduler():(0==ho.mainLoop.timingMode&&(ho.mainLoop.tickStartTime=qn()),"timeout"===ho.mainLoop.method&&o.ctx&&(T("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!"),ho.mainLoop.method=""),ho.mainLoop.runIter(e),pe(),s()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),ho.mainLoop.scheduler())))},i||(t&&t>0?co(0,1e3/t):co(1,1),ho.mainLoop.scheduler()),r)throw"unwind"}function po(e,t){if(Ee||A)O("user callback triggered after runtime exited or application aborted. Ignoring.");else if(t)e();else try{e()}catch(e){et(e)}}function go(e,t){return setTimeout((function(){po(e)}),t)}var ho={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){ho.mainLoop.scheduler=null,ho.mainLoop.currentlyRunningMainloop++},resume:function(){ho.mainLoop.currentlyRunningMainloop++;var e=ho.mainLoop.timingMode,t=ho.mainLoop.timingValue,r=ho.mainLoop.func;ho.mainLoop.func=null,fo(r,0,!1,ho.mainLoop.arg,!0),co(e,t),ho.mainLoop.scheduler()},updateStatus:function(){if(o.setStatus){var e=o.statusMessage||"Please wait...",t=ho.mainLoop.remainingBlockers,r=ho.mainLoop.expectedBlockers;t?t<r?o.setStatus(e+" ("+(r-t)+"/"+r+")"):o.setStatus(e):o.setStatus("")}},runIter:function(e){if(!A){if(o.preMainLoop&&!1===o.preMainLoop())return;po(e),o.postMainLoop&&o.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(o.preloadPlugins||(o.preloadPlugins=[]),!ho.initted){ho.initted=!0;try{new Blob,ho.hasBlobConstructor=!0}catch(e){ho.hasBlobConstructor=!1,_("warning: no blob constructor, cannot create blobs with mimetypes")}ho.BlobBuilder="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:ho.hasBlobConstructor?null:_("warning: no BlobBuilder"),ho.URLObject="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,o.noImageDecoding||void 0!==ho.URLObject||(_("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(ho.hasBlobConstructor)try{(i=new Blob([e],{type:ho.getMimetype(t)})).size!==e.length&&(i=new Blob([new Uint8Array(e).buffer],{type:ho.getMimetype(t)}))}catch(e){T("Blob constructor present but fails: "+e+"; falling back to blob builder")}if(!i){var a=new ho.BlobBuilder;a.append(new Uint8Array(e).buffer),i=a.getBlob()}var s=ho.URLObject.createObjectURL(i);C("string"==typeof s,"createObjectURL must return a url as a string");var c=new Image;c.onload=()=>{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,ho.URLObject.revokeObjectURL(s),r&&r(e)},c.onerror=e=>{_("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(!ho.hasBlobConstructor)return s();try{var c=new Blob([e],{type:ho.getMimetype(t)})}catch(e){return s()}var u=ho.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||(_("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,go((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){!ho.pointerLock&&o.canvas.requestPointerLock&&(o.canvas.requestPointerLock(),e.preventDefault())}),!1))}function n(){ho.pointerLock=document.pointerLockElement===o.canvas||document.mozPointerLockElement===o.canvas||document.webkitPointerLockElement===o.canvas||document.msPointerLockElement===o.canvas}},handledByPreloadPlugin:function(e,t,r,n){ho.init();var i=!1;return o.preloadPlugins.forEach((function(o){i||o.canHandle(t)&&(o.handle(e,t,r,n),i=!0)})),i},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!==To&&(a=To.createContext(e,s))&&(i=To.getContext(a).GLctx)}else i=e.getContext("2d");return i?(r&&(t||C(void 0===yf,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),o.ctx=i,t&&To.makeContextCurrent(a),o.useWebGL=t,ho.moduleContextCreatedCallbacks.forEach((function(e){e()})),ho.init()),i):null},destroyContext:function(e,t,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(e,t){ho.lockPointer=e,ho.resizeCanvas=t,void 0===ho.lockPointer&&(ho.lockPointer=!0),void 0===ho.resizeCanvas&&(ho.resizeCanvas=!1);var r=o.canvas;function n(){ho.isFullscreen=!1;var e=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(r.exitFullscreen=ho.exitFullscreen,ho.lockPointer&&r.requestPointerLock(),ho.isFullscreen=!0,ho.resizeCanvas?ho.setFullscreenCanvasSize():ho.updateCanvasDimensions(r)):(e.parentNode.insertBefore(r,e),e.parentNode.removeChild(e),ho.resizeCanvas?ho.setWindowedCanvasSize():ho.updateCanvasDimensions(r)),o.onFullScreen&&o.onFullScreen(ho.isFullscreen),o.onFullscreen&&o.onFullscreen(ho.isFullscreen)}ho.fullscreenHandlersInstalled||(ho.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(){Le("Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)")},exitFullscreen:function(){return!!ho.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===ho.nextRAF)ho.nextRAF=t+1e3/60;else for(;t+2>=ho.nextRAF;)ho.nextRAF+=1e3/60;var r=Math.max(ho.nextRAF-t,0);setTimeout(e,r)},requestAnimationFrame:function(e){"function"!=typeof requestAnimationFrame?(0,ho.fakeRequestAnimationFrame)(e):requestAnimationFrame(e)},safeSetTimeout:function(e){return go(e)},safeRequestAnimationFrame:function(e){return ho.requestAnimationFrame((function(){po(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(ho.pointerLock)"mousemove"!=e.type&&"mozMovementX"in e?ho.mouseMovementX=ho.mouseMovementY=0:(ho.mouseMovementX=ho.getMovementX(e),ho.mouseMovementY=ho.getMovementY(e)),"undefined"!=typeof SDL?(ho.mouseX=SDL.mouseX+ho.mouseMovementX,ho.mouseY=SDL.mouseY+ho.mouseMovementY):(ho.mouseX+=ho.mouseMovementX,ho.mouseY+=ho.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)ho.lastTouches[s.identifier]=l,ho.touches[s.identifier]=l;else if("touchend"===e.type||"touchmove"===e.type){var d=ho.touches[s.identifier];d||(d=l),ho.lastTouches[s.identifier]=d,ho.touches[s.identifier]=l}return}var f=e.pageX-(i+t.left),p=e.pageY-(a+t.top);f*=r/t.width,p*=n/t.height,ho.mouseMovementX=f-ho.mouseX,ho.mouseMovementY=p-ho.mouseY,ho.mouseX=f,ho.mouseY=p}},resizeListeners:[],updateResizeListeners:function(){var e=o.canvas;ho.resizeListeners.forEach((function(t){t(e.width,e.height)}))},setCanvasSize:function(e,t,r){var n=o.canvas;ho.updateCanvasDimensions(n,e,t),r||ho.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if("undefined"!=typeof SDL){var e=W[SDL.screen>>2];e|=8388608,V[SDL.screen>>2]=e}ho.updateCanvasDimensions(o.canvas),ho.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var e=W[SDL.screen>>2];e&=-8388609,V[SDL.screen>>2]=e}ho.updateCanvasDimensions(o.canvas),ho.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)}ho.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"))))}},mo={errorCode:12288,defaultDisplayInitialized:!1,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:!1,depth:!1,stencil:!1,antialias:!1},stringCache:{},setErrorCode:function(e){mo.errorCode=e},chooseConfig:function(e,t,r,n,o){if(62e3!=e)return mo.setErrorCode(12296),0;if(t)for(;;){var i=V[t>>2];if(12321==i){var a=V[t+4>>2];mo.contextAttributes.alpha=a>0}else if(12325==i){var s=V[t+4>>2];mo.contextAttributes.depth=s>0}else if(12326==i){var c=V[t+4>>2];mo.contextAttributes.stencil=c>0}else if(12337==i){var u=V[t+4>>2];mo.contextAttributes.antialias=u>0}else if(12338==i)u=V[t+4>>2],mo.contextAttributes.antialias=1==u;else if(12544==i){var l=V[t+4>>2];mo.contextAttributes.lowLatency=12547!=l}else if(12344==i)break;t+=8}return r&&n||o?(o&&(V[o>>2]=1),r&&n>0&&(V[r>>2]=62002),mo.setErrorCode(12288),1):(mo.setErrorCode(12300),0)}};function vo(e,t,r,n,o){return mo.chooseConfig(e,t,r,n,o)}function bo(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 yo(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 Eo(e){var t=e.getExtension("WEBGL_draw_buffers");if(t)return e.drawBuffers=function(e,r){t.drawBuffersWEBGL(e,r)},1}function wo(e){return!!(e.dibvbi=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function _o(e){return!!(e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))}function Oo(e){return!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw"))}var To={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function(e){To.lastError||(To.lastError=e)},getNewId:function(e){for(var t=To.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?V[n+4*i>>2]:-1;o+=j(V[r+4*i>>2],a<0?void 0:a)}return o},createContext:function(e,t){if(!e.getContextSafariWebGL2Fixed){function t(t,r){var n=e.getContextSafariWebGL2Fixed(t,r);return"webgl"==t==n instanceof WebGLRenderingContext?n:null}e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=t}var r=t.majorVersion>1?e.getContext("webgl2",t):e.getContext("webgl",t);return r?To.registerContext(r,t):0},registerContext:function(e,t){var r=To.getNewId(To.contexts),n={handle:r,attributes:t,version:t.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),To.contexts[r]=n,(void 0===t.enableExtensionsByDefault||t.enableExtensionsByDefault)&&To.initExtensions(n),r},makeContextCurrent:function(e){return To.currentContext=To.contexts[e],o.ctx=yf=To.currentContext&&To.currentContext.GLctx,!(e&&!yf)},getContext:function(e){return To.contexts[e]},deleteContext:function(e){To.currentContext===To.contexts[e]&&(To.currentContext=null),"object"==typeof Dl&&Dl.removeAllHandlersOnTarget(To.contexts[e].GLctx.canvas),To.contexts[e]&&To.contexts[e].GLctx.canvas&&(To.contexts[e].GLctx.canvas.GLctxObject=void 0),To.contexts[e]=null},initExtensions:function(e){if(e||(e=To.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var t=e.GLctx;bo(t),yo(t),Eo(t),wo(t),_o(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")),Oo(t),(t.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}};function Do(e,t,r,n){if(62e3!=e)return mo.setErrorCode(12296),0;for(var i=1;;){var a=V[n>>2];if(12440!=a){if(12344==a)break;return mo.setErrorCode(12292),0}i=V[n+4>>2],n+=8}return i<2||i>3?(mo.setErrorCode(12293),0):(mo.contextAttributes.majorVersion=i-1,mo.contextAttributes.minorVersion=0,mo.context=To.createContext(o.canvas,mo.contextAttributes),0!=mo.context?(mo.setErrorCode(12288),To.makeContextCurrent(mo.context),o.useWebGL=!0,ho.moduleContextCreatedCallbacks.forEach((function(e){e()})),To.makeContextCurrent(null),62004):(mo.setErrorCode(12297),0))}function Po(e,t,r,n){return 62e3!=e?(mo.setErrorCode(12296),0):62002!=t?(mo.setErrorCode(12293),0):(mo.setErrorCode(12288),62006)}function xo(e,t){return 62e3!=e?(mo.setErrorCode(12296),0):62004!=t?(mo.setErrorCode(12294),0):(To.deleteContext(mo.context),mo.setErrorCode(12288),mo.currentContext==t&&(mo.currentContext=0),1)}function So(e,t){return 62e3!=e?(mo.setErrorCode(12296),0):62006!=t?(mo.setErrorCode(12301),1):(mo.currentReadSurface==t&&(mo.currentReadSurface=0),mo.currentDrawSurface==t&&(mo.currentDrawSurface=0),mo.setErrorCode(12288),1)}function Mo(e,t,r,n){if(62e3!=e)return mo.setErrorCode(12296),0;if(62002!=t)return mo.setErrorCode(12293),0;if(!n)return mo.setErrorCode(12300),0;switch(mo.setErrorCode(12288),r){case 12320:return V[n>>2]=mo.contextAttributes.alpha?32:24,1;case 12321:return V[n>>2]=mo.contextAttributes.alpha?8:0,1;case 12322:case 12323:case 12324:return V[n>>2]=8,1;case 12325:return V[n>>2]=mo.contextAttributes.depth?24:0,1;case 12326:return V[n>>2]=mo.contextAttributes.stencil?8:0,1;case 12327:return V[n>>2]=12344,1;case 12328:return V[n>>2]=62002,1;case 12329:return V[n>>2]=0,1;case 12330:return V[n>>2]=4096,1;case 12331:return V[n>>2]=16777216,1;case 12332:return V[n>>2]=4096,1;case 12333:case 12334:return V[n>>2]=0,1;case 12335:return V[n>>2]=12344,1;case 12337:return V[n>>2]=mo.contextAttributes.antialias?4:0,1;case 12338:return V[n>>2]=mo.contextAttributes.antialias?1:0,1;case 12339:return V[n>>2]=4,1;case 12340:return V[n>>2]=12344,1;case 12341:case 12342:case 12343:return V[n>>2]=-1,1;case 12345:case 12346:case 12347:return V[n>>2]=0,1;case 12348:return V[n>>2]=1,1;case 12349:case 12350:return V[n>>2]=0,1;case 12351:return V[n>>2]=12430,1;case 12352:return V[n>>2]=4,1;case 12354:return V[n>>2]=0,1;default:return mo.setErrorCode(12292),0}}function Ro(e){return mo.setErrorCode(12288),62e3}function ko(){return mo.errorCode}function Fo(e,t,r){return 62e3==e?(t&&(V[t>>2]=1),r&&(V[r>>2]=4),mo.defaultDisplayInitialized=!0,mo.setErrorCode(12288),1):(mo.setErrorCode(12296),0)}function Ao(e,t,r,n){return 62e3!=e?(mo.setErrorCode(12296),0):0!=n&&62004!=n?(mo.setErrorCode(12294),0):0!=r&&62006!=r||0!=t&&62006!=t?(mo.setErrorCode(12301),0):(To.makeContextCurrent(n?mo.context:null),mo.currentContext=n,mo.currentDrawSurface=t,mo.currentReadSurface=r,mo.setErrorCode(12288),1)}function Co(){if(mo.defaultDisplayInitialized)if(o.ctx){if(!o.ctx.isContextLost())return mo.setErrorCode(12288),1;mo.setErrorCode(12302)}else mo.setErrorCode(12290);else mo.setErrorCode(12289);return 0}function Io(e){return 62e3!=e?(mo.setErrorCode(12296),0):(mo.currentContext=0,mo.currentReadSurface=0,mo.currentDrawSurface=0,mo.defaultDisplayInitialized=!1,mo.setErrorCode(12288),1)}function No(e){C("number"==typeof e),console.error(j(e))}function jo(e){C("number"==typeof e),console.log(j(e))}function Lo(e){C("number"==typeof e),console.warn(j(e))}function Uo(){}function Ho(){return 2147483648}function Bo(e){yf.activeTexture(e)}function Xo(e,t){yf.attachShader(To.programs[e],To.shaders[t])}function Qo(e,t){yf.beginQuery(e,To.queries[t])}function Go(e,t){yf.disjointTimerQueryExt.beginQueryEXT(e,To.queries[t])}function qo(e){yf.beginTransformFeedback(e)}function Vo(e,t,r){yf.bindAttribLocation(To.programs[e],t,j(r))}function Wo(e,t){35051==e?yf.currentPixelPackBufferBinding=t:35052==e&&(yf.currentPixelUnpackBufferBinding=t),yf.bindBuffer(e,To.buffers[t])}function zo(e,t,r){yf.bindBufferBase(e,t,To.buffers[r])}function $o(e,t,r,n,o){yf.bindBufferRange(e,t,To.buffers[r],n,o)}function Yo(e,t){yf.bindFramebuffer(e,To.framebuffers[t])}function Ko(e,t){yf.bindRenderbuffer(e,To.renderbuffers[t])}function Jo(e,t){yf.bindSampler(e,To.samplers[t])}function Zo(e,t){yf.bindTexture(e,To.textures[t])}function ei(e,t){yf.bindTransformFeedback(e,To.transformFeedbacks[t])}function ti(e){yf.bindVertexArray(To.vaos[e])}function ri(e){yf.bindVertexArray(To.vaos[e])}function ni(e,t,r,n){yf.blendColor(e,t,r,n)}function oi(e){yf.blendEquation(e)}function ii(e,t){yf.blendEquationSeparate(e,t)}function ai(e,t){yf.blendFunc(e,t)}function si(e,t,r,n){yf.blendFuncSeparate(e,t,r,n)}function ci(e,t,r,n,o,i,a,s,c,u){yf.blitFramebuffer(e,t,r,n,o,i,a,s,c,u)}function ui(e,t,r,n){To.currentContext.version>=2?r?yf.bufferData(e,Q,n,r,t):yf.bufferData(e,t,n):yf.bufferData(e,r?Q.subarray(r,r+t):t,n)}function li(e,t,r,n){To.currentContext.version>=2?yf.bufferSubData(e,t,Q,n,r):yf.bufferSubData(e,t,Q.subarray(n,n+r))}function di(e){return yf.checkFramebufferStatus(e)}function fi(e){yf.clear(e)}function pi(e,t,r,n){yf.clearBufferfi(e,t,r,n)}function gi(e,t,r){yf.clearBufferfv(e,t,z,r>>2)}function hi(e,t,r){yf.clearBufferiv(e,t,V,r>>2)}function mi(e,t,r){yf.clearBufferuiv(e,t,W,r>>2)}function vi(e,t,r,n){yf.clearColor(e,t,r,n)}function bi(e){yf.clearDepth(e)}function yi(e){yf.clearStencil(e)}function Ei(e,t){return C(t===(0|t)),(e>>>0)+4294967296*t}function wi(e,t,r,n){return yf.clientWaitSync(To.syncs[e],t,Ei(r,n))}function _i(e,t,r,n){yf.colorMask(!!e,!!t,!!r,!!n)}function Oi(e){yf.compileShader(To.shaders[e])}function Ti(e,t,r,n,o,i,a,s){To.currentContext.version>=2?yf.currentPixelUnpackBufferBinding?yf.compressedTexImage2D(e,t,r,n,o,i,a,s):yf.compressedTexImage2D(e,t,r,n,o,i,Q,s,a):yf.compressedTexImage2D(e,t,r,n,o,i,s?Q.subarray(s,s+a):null)}function Di(e,t,r,n,o,i,a,s,c){yf.currentPixelUnpackBufferBinding?yf.compressedTexImage3D(e,t,r,n,o,i,a,s,c):yf.compressedTexImage3D(e,t,r,n,o,i,a,Q,c,s)}function Pi(e,t,r,n,o,i,a,s,c){To.currentContext.version>=2?yf.currentPixelUnpackBufferBinding?yf.compressedTexSubImage2D(e,t,r,n,o,i,a,s,c):yf.compressedTexSubImage2D(e,t,r,n,o,i,a,Q,c,s):yf.compressedTexSubImage2D(e,t,r,n,o,i,a,c?Q.subarray(c,c+s):null)}function xi(e,t,r,n,o,i,a,s,c,u,l){yf.currentPixelUnpackBufferBinding?yf.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,u,l):yf.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,Q,l,u)}function Si(e,t,r,n,o){yf.copyBufferSubData(e,t,r,n,o)}function Mi(e,t,r,n,o,i,a,s){yf.copyTexImage2D(e,t,r,n,o,i,a,s)}function Ri(e,t,r,n,o,i,a,s){yf.copyTexSubImage2D(e,t,r,n,o,i,a,s)}function ki(e,t,r,n,o,i,a,s,c){yf.copyTexSubImage3D(e,t,r,n,o,i,a,s,c)}function Fi(){var e=To.getNewId(To.programs),t=yf.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,To.programs[e]=t,e}function Ai(e){var t=To.getNewId(To.shaders);return To.shaders[t]=yf.createShader(e),t}function Ci(e){yf.cullFace(e)}function Ii(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.buffers[n];o&&(yf.deleteBuffer(o),o.name=0,To.buffers[n]=null,n==yf.currentPixelPackBufferBinding&&(yf.currentPixelPackBufferBinding=0),n==yf.currentPixelUnpackBufferBinding&&(yf.currentPixelUnpackBufferBinding=0))}}function Ni(e,t){for(var r=0;r<e;++r){var n=V[t+4*r>>2],o=To.framebuffers[n];o&&(yf.deleteFramebuffer(o),o.name=0,To.framebuffers[n]=null)}}function ji(e){if(e){var t=To.programs[e];t?(yf.deleteProgram(t),t.name=0,To.programs[e]=null):To.recordError(1281)}}function Li(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.queries[n];o&&(yf.deleteQuery(o),To.queries[n]=null)}}function Ui(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.queries[n];o&&(yf.disjointTimerQueryExt.deleteQueryEXT(o),To.queries[n]=null)}}function Hi(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.renderbuffers[n];o&&(yf.deleteRenderbuffer(o),o.name=0,To.renderbuffers[n]=null)}}function Bi(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.samplers[n];o&&(yf.deleteSampler(o),o.name=0,To.samplers[n]=null)}}function Xi(e){if(e){var t=To.shaders[e];t?(yf.deleteShader(t),To.shaders[e]=null):To.recordError(1281)}}function Qi(e){if(e){var t=To.syncs[e];t?(yf.deleteSync(t),t.name=0,To.syncs[e]=null):To.recordError(1281)}}function Gi(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.textures[n];o&&(yf.deleteTexture(o),o.name=0,To.textures[n]=null)}}function qi(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.transformFeedbacks[n];o&&(yf.deleteTransformFeedback(o),o.name=0,To.transformFeedbacks[n]=null)}}function Vi(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2];yf.deleteVertexArray(To.vaos[n]),To.vaos[n]=null}}function Wi(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2];yf.deleteVertexArray(To.vaos[n]),To.vaos[n]=null}}function zi(e){yf.depthFunc(e)}function $i(e){yf.depthMask(!!e)}function Yi(e,t){yf.depthRange(e,t)}function Ki(e,t){yf.detachShader(To.programs[e],To.shaders[t])}function Ji(e){yf.disable(e)}function Zi(e){yf.disableVertexAttribArray(e)}function ea(e,t,r){yf.drawArrays(e,t,r)}function ta(e,t,r,n){yf.drawArraysInstanced(e,t,r,n)}function ra(e,t,r,n){yf.drawArraysInstanced(e,t,r,n)}function na(e,t,r,n){yf.drawArraysInstanced(e,t,r,n)}function oa(e,t,r,n){yf.drawArraysInstanced(e,t,r,n)}function ia(e,t,r,n){yf.drawArraysInstanced(e,t,r,n)}var aa=[];function sa(e,t){for(var r=aa[e],n=0;n<e;n++)r[n]=V[t+4*n>>2];yf.drawBuffers(r)}function ca(e,t){for(var r=aa[e],n=0;n<e;n++)r[n]=V[t+4*n>>2];yf.drawBuffers(r)}function ua(e,t){for(var r=aa[e],n=0;n<e;n++)r[n]=V[t+4*n>>2];yf.drawBuffers(r)}function la(e,t,r,n){yf.drawElements(e,t,r,n)}function da(e,t,r,n,o){yf.drawElementsInstanced(e,t,r,n,o)}function fa(e,t,r,n,o){yf.drawElementsInstanced(e,t,r,n,o)}function pa(e,t,r,n,o){yf.drawElementsInstanced(e,t,r,n,o)}function ga(e,t,r,n,o){yf.drawElementsInstanced(e,t,r,n,o)}function ha(e,t,r,n,o){yf.drawElementsInstanced(e,t,r,n,o)}function ma(e,t,r,n){yf.drawElements(e,t,r,n)}function va(e,t,r,n,o,i){ma(e,n,o,i)}function ba(e){yf.enable(e)}function ya(e){yf.enableVertexAttribArray(e)}function Ea(e){yf.endQuery(e)}function wa(e){yf.disjointTimerQueryExt.endQueryEXT(e)}function _a(){yf.endTransformFeedback()}function Oa(e,t){var r=yf.fenceSync(e,t);if(r){var n=To.getNewId(To.syncs);return r.name=n,To.syncs[n]=r,n}return 0}function Ta(){yf.finish()}function Da(){yf.flush()}function Pa(e,t,r,n){yf.framebufferRenderbuffer(e,t,r,To.renderbuffers[n])}function xa(e,t,r,n,o){yf.framebufferTexture2D(e,t,r,To.textures[n],o)}function Sa(e,t,r,n,o){yf.framebufferTextureLayer(e,t,To.textures[r],n,o)}function Ma(e){yf.frontFace(e)}function Ra(e,t,r,n){for(var o=0;o<e;o++){var i=yf[r](),a=i&&To.getNewId(n);i?(i.name=a,n[a]=i):To.recordError(1282),V[t+4*o>>2]=a}}function ka(e,t){Ra(e,t,"createBuffer",To.buffers)}function Fa(e,t){Ra(e,t,"createFramebuffer",To.framebuffers)}function Aa(e,t){Ra(e,t,"createQuery",To.queries)}function Ca(e,t){for(var r=0;r<e;r++){var n=yf.disjointTimerQueryExt.createQueryEXT();if(!n){for(To.recordError(1282);r<e;)V[t+4*r++>>2]=0;return}var o=To.getNewId(To.queries);n.name=o,To.queries[o]=n,V[t+4*r>>2]=o}}function Ia(e,t){Ra(e,t,"createRenderbuffer",To.renderbuffers)}function Na(e,t){Ra(e,t,"createSampler",To.samplers)}function ja(e,t){Ra(e,t,"createTexture",To.textures)}function La(e,t){Ra(e,t,"createTransformFeedback",To.transformFeedbacks)}function Ua(e,t){Ra(e,t,"createVertexArray",To.vaos)}function Ha(e,t){Ra(e,t,"createVertexArray",To.vaos)}function Ba(e){yf.generateMipmap(e)}function Xa(e,t,r,n,o,i,a,s){t=To.programs[t];var c=yf[e](t,r);if(c){var u=s&&U(c.name,s,n);o&&(V[o>>2]=u),i&&(V[i>>2]=c.size),a&&(V[a>>2]=c.type)}}function Qa(e,t,r,n,o,i,a){Xa("getActiveAttrib",e,t,r,n,o,i,a)}function Ga(e,t,r,n,o,i,a){Xa("getActiveUniform",e,t,r,n,o,i,a)}function qa(e,t,r,n,o){e=To.programs[e];var i=yf.getActiveUniformBlockName(e,t);if(i)if(o&&r>0){var a=U(i,o,r);n&&(V[n>>2]=a)}else n&&(V[n>>2]=0)}function Va(e,t,r,n){if(n)if(e=To.programs[e],35393!=r){var o=yf.getActiveUniformBlockParameter(e,t,r);if(null!==o)if(35395==r)for(var i=0;i<o.length;i++)V[n+4*i>>2]=o[i];else V[n>>2]=o}else{var a=yf.getActiveUniformBlockName(e,t);V[n>>2]=a.length+1}else To.recordError(1281)}function Wa(e,t,r,n,o){if(o)if(t>0&&0==r)To.recordError(1281);else{e=To.programs[e];for(var i=[],a=0;a<t;a++)i.push(V[r+4*a>>2]);var s=yf.getActiveUniforms(e,i,n);if(s){var c=s.length;for(a=0;a<c;a++)V[o+4*a>>2]=s[a]}}else To.recordError(1281)}function za(e,t,r,n){var o=yf.getAttachedShaders(To.programs[e]),i=o.length;i>t&&(i=t),V[r>>2]=i;for(var a=0;a<i;++a){var s=To.shaders.indexOf(o[a]);V[n+4*a>>2]=s}}function $a(e,t){return yf.getAttribLocation(To.programs[e],j(t))}function Ya(e){return W[e>>2]+4294967296*V[e+4>>2]}function Ka(e){return W[e>>2]+4294967296*W[e+4>>2]}function Ja(e,t){W[e>>2]=t,W[e+4>>2]=(t-W[e>>2])/4294967296;var r=t>=0?Ka(e):Ya(e);r!=t&&T("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 Za(e,t,r){if(t){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=r&&1!=r&&To.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var o=yf.getParameter(34467);n=o?o.length:0;break;case 33309:if(To.currentContext.version<2)return void To.recordError(1282);n=2*(yf.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(To.currentContext.version<2)return void To.recordError(1280);n=33307==e?3:0}if(void 0===n){var i=yf.getParameter(e);switch(typeof i){case"number":n=i;break;case"boolean":n=i?1:0;break;case"string":return void To.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 To.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:V[t+4*a>>2]=i[a];break;case 2:z[t+4*a>>2]=i[a];break;case 4:X[t+a>>0]=i[a]?1:0}return}try{n=0|i.name}catch(t){return To.recordError(1280),void O("GL_INVALID_ENUM in glGet"+r+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+t+")")}}break;default:return To.recordError(1280),void O("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:Ja(t,n);break;case 0:V[t>>2]=n;break;case 2:z[t>>2]=n;break;case 4:X[t>>0]=n?1:0}}else To.recordError(1281)}function es(e,t){Za(e,t,4)}function ts(e,t,r){r?Ja(r,yf.getBufferParameter(e,t)):To.recordError(1281)}function rs(e,t,r){r?V[r>>2]=yf.getBufferParameter(e,t):To.recordError(1281)}function ns(){var e=yf.getError()||To.lastError;return To.lastError=0,e}function os(e,t){Za(e,t,2)}function is(e,t){return yf.getFragDataLocation(To.programs[e],j(t))}function as(e,t,r,n){var o=yf.getFramebufferAttachmentParameter(e,t,r);(o instanceof WebGLRenderbuffer||o instanceof WebGLTexture)&&(o=0|o.name),V[n>>2]=o}function ss(e,t,r,n){if(r){var o,i=yf.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 To.recordError(1280)}else{if(!(i instanceof WebGLBuffer))return void To.recordError(1280);o=0|i.name}break;default:return void To.recordError(1280)}switch(n){case 1:Ja(r,o);break;case 0:V[r>>2]=o;break;case 2:z[r>>2]=o;break;case 4:X[r>>0]=o?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+n}}else To.recordError(1281)}function cs(e,t,r){ss(e,t,r,1)}function us(e,t){Za(e,t,1)}function ls(e,t,r){ss(e,t,r,0)}function ds(e,t){Za(e,t,0)}function fs(e,t,r,n,o){if(n<0)To.recordError(1281);else if(o){var i=yf.getInternalformatParameter(e,t,r);if(null!==i)for(var a=0;a<i.length&&a<n;++a)V[o+4*a>>2]=i[a]}else To.recordError(1281)}function ps(e,t,r,n,o){To.recordError(1282)}function gs(e,t,r,n){var o=yf.getProgramInfoLog(To.programs[e]);null===o&&(o="(unknown error)");var i=t>0&&n?U(o,n,t):0;r&&(V[r>>2]=i)}function hs(e,t,r){if(r)if(e>=To.counter)To.recordError(1281);else if(e=To.programs[e],35716==t){var n=yf.getProgramInfoLog(e);null===n&&(n="(unknown error)"),V[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var o=0;o<yf.getProgramParameter(e,35718);++o)e.maxUniformLength=Math.max(e.maxUniformLength,yf.getActiveUniform(e,o).name.length+1);V[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(o=0;o<yf.getProgramParameter(e,35721);++o)e.maxAttributeLength=Math.max(e.maxAttributeLength,yf.getActiveAttrib(e,o).name.length+1);V[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(o=0;o<yf.getProgramParameter(e,35382);++o)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,yf.getActiveUniformBlockName(e,o).length+1);V[r>>2]=e.maxUniformBlockNameLength}else V[r>>2]=yf.getProgramParameter(e,t);else To.recordError(1281)}function ms(e,t,r){if(r){var n,o=To.queries[e];Ja(r,"boolean"==typeof(n=To.currentContext.version<2?yf.disjointTimerQueryExt.getQueryObjectEXT(o,t):yf.getQueryParameter(o,t))?n?1:0:n)}else To.recordError(1281)}function vs(e,t,r){if(r){var n,o=To.queries[e],i=yf.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,V[r>>2]=n}else To.recordError(1281)}function bs(e,t,r){if(r){var n,o=To.queries[e];Ja(r,"boolean"==typeof(n=To.currentContext.version<2?yf.disjointTimerQueryExt.getQueryObjectEXT(o,t):yf.getQueryParameter(o,t))?n?1:0:n)}else To.recordError(1281)}function ys(e,t,r){if(r){var n,o=To.queries[e],i=yf.getQueryParameter(o,t);n="boolean"==typeof i?i?1:0:i,V[r>>2]=n}else To.recordError(1281)}function Es(e,t,r){if(r){var n,o=To.queries[e],i=yf.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,V[r>>2]=n}else To.recordError(1281)}function ws(e,t,r){r?V[r>>2]=yf.getQuery(e,t):To.recordError(1281)}function _s(e,t,r){r?V[r>>2]=yf.disjointTimerQueryExt.getQueryEXT(e,t):To.recordError(1281)}function Os(e,t,r){r?V[r>>2]=yf.getRenderbufferParameter(e,t):To.recordError(1281)}function Ts(e,t,r){r?z[r>>2]=yf.getSamplerParameter(To.samplers[e],t):To.recordError(1281)}function Ds(e,t,r){r?V[r>>2]=yf.getSamplerParameter(To.samplers[e],t):To.recordError(1281)}function Ps(e,t,r,n){var o=yf.getShaderInfoLog(To.shaders[e]);null===o&&(o="(unknown error)");var i=t>0&&n?U(o,n,t):0;r&&(V[r>>2]=i)}function xs(e,t,r,n){var o=yf.getShaderPrecisionFormat(e,t);V[r>>2]=o.rangeMin,V[r+4>>2]=o.rangeMax,V[n>>2]=o.precision}function Ss(e,t,r,n){var o=yf.getShaderSource(To.shaders[e]);if(o){var i=t>0&&n?U(o,n,t):0;r&&(V[r>>2]=i)}}function Ms(e,t,r){if(r)if(35716==t){var n=yf.getShaderInfoLog(To.shaders[e]);null===n&&(n="(unknown error)");var o=n?n.length+1:0;V[r>>2]=o}else if(35720==t){var i=yf.getShaderSource(To.shaders[e]),a=i?i.length+1:0;V[r>>2]=a}else V[r>>2]=yf.getShaderParameter(To.shaders[e],t);else To.recordError(1281)}function Rs(e){var t=H(e)+1,r=Mf(t);return U(e,r,t),r}function ks(e){var t=To.stringCache[e];if(!t){switch(e){case 7939:var r=yf.getSupportedExtensions()||[];t=Rs((r=r.concat(r.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=yf.getParameter(e);n||To.recordError(1280),t=n&&Rs(n);break;case 7938:var o=yf.getParameter(7938);t=Rs(o=To.currentContext.version>=2?"OpenGL ES 3.0 ("+o+")":"OpenGL ES 2.0 ("+o+")");break;case 35724:var i=yf.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=Rs(i);break;default:To.recordError(1280)}To.stringCache[e]=t}return t}function Fs(e,t){if(To.currentContext.version<2)return To.recordError(1282),0;var r=To.stringiCache[e];if(r)return t<0||t>=r.length?(To.recordError(1281),0):r[t];switch(e){case 7939:var n=yf.getSupportedExtensions()||[];return n=(n=n.concat(n.map((function(e){return"GL_"+e})))).map((function(e){return Rs(e)})),r=To.stringiCache[e]=n,t<0||t>=r.length?(To.recordError(1281),0):r[t];default:return To.recordError(1280),0}}function As(e,t,r,n,o){if(r<0)To.recordError(1281);else if(o){var i=yf.getSyncParameter(To.syncs[e],t);null!==i&&(V[o>>2]=i,n&&(V[n>>2]=1))}else To.recordError(1281)}function Cs(e,t,r){r?z[r>>2]=yf.getTexParameter(e,t):To.recordError(1281)}function Is(e,t,r){r?V[r>>2]=yf.getTexParameter(e,t):To.recordError(1281)}function Ns(e,t,r,n,o,i,a){e=To.programs[e];var s=yf.getTransformFeedbackVarying(e,t);if(s){if(a&&r>0){var c=U(s.name,a,r);n&&(V[n>>2]=c)}else n&&(V[n>>2]=0);o&&(V[o>>2]=s.size),i&&(V[i>>2]=s.type)}}function js(e,t){return yf.getUniformBlockIndex(To.programs[e],j(t))}function Ls(e,t,r,n){if(n)if(t>0&&(0==r||0==n))To.recordError(1281);else{e=To.programs[e];for(var o=[],i=0;i<t;i++)o.push(j(V[r+4*i>>2]));var a=yf.getUniformIndices(e,o);if(a){var s=a.length;for(i=0;i<s;i++)V[n+4*i>>2]=a[i]}}else To.recordError(1281)}function Us(e){return parseInt(e)}function Hs(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function Bs(e){var t,r,n=e.uniformLocsById,o=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},t=0;t<yf.getProgramParameter(e,35718);++t){var i=yf.getActiveUniform(e,t),a=i.name,s=i.size,c=Hs(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 Xs(e,t){if(t=j(t),e=To.programs[e]){Bs(e);var r=e.uniformLocsById,n=0,o=t,i=Hs(t);i>0&&(n=Us(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]||yf.getUniformLocation(e,t)))return n}else To.recordError(1281);return-1}function Qs(e){var t=yf.currentProgram;if(t){var r=t.uniformLocsById[e];return"number"==typeof r&&(t.uniformLocsById[e]=r=yf.getUniformLocation(t,t.uniformArrayNamesById[e]+(r>0?"["+r+"]":""))),r}To.recordError(1282)}function Gs(e,t,r,n){if(r){Bs(e=To.programs[e]);var o=yf.getUniform(e,Qs(t));if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:V[r>>2]=o;break;case 2:z[r>>2]=o}else for(var i=0;i<o.length;i++)switch(n){case 0:V[r+4*i>>2]=o[i];break;case 2:z[r+4*i>>2]=o[i]}}else To.recordError(1281)}function qs(e,t,r){Gs(e,t,r,2)}function Vs(e,t,r){Gs(e,t,r,0)}function Ws(e,t,r){Gs(e,t,r,0)}function zs(e,t,r,n){if(r){var o=yf.getVertexAttrib(e,t);if(34975==t)V[r>>2]=o&&o.name;else if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:V[r>>2]=o;break;case 2:z[r>>2]=o;break;case 5:V[r>>2]=Math.fround(o)}else for(var i=0;i<o.length;i++)switch(n){case 0:V[r+4*i>>2]=o[i];break;case 2:z[r+4*i>>2]=o[i];break;case 5:V[r+4*i>>2]=Math.fround(o[i])}}else To.recordError(1281)}function $s(e,t,r){zs(e,t,r,0)}function Ys(e,t,r){zs(e,t,r,0)}function Ks(e,t,r){r?V[r>>2]=yf.getVertexAttribOffset(e,t):To.recordError(1281)}function Js(e,t,r){zs(e,t,r,2)}function Zs(e,t,r){zs(e,t,r,5)}function ec(e,t){yf.hint(e,t)}function tc(e,t,r){for(var n=aa[t],o=0;o<t;o++)n[o]=V[r+4*o>>2];yf.invalidateFramebuffer(e,n)}function rc(e,t,r,n,o,i,a){for(var s=aa[t],c=0;c<t;c++)s[c]=V[r+4*c>>2];yf.invalidateSubFramebuffer(e,s,n,o,i,a)}function nc(e){var t=To.buffers[e];return t?yf.isBuffer(t):0}function oc(e){return yf.isEnabled(e)}function ic(e){var t=To.framebuffers[e];return t?yf.isFramebuffer(t):0}function ac(e){return(e=To.programs[e])?yf.isProgram(e):0}function sc(e){var t=To.queries[e];return t?yf.isQuery(t):0}function cc(e){var t=To.queries[e];return t?yf.disjointTimerQueryExt.isQueryEXT(t):0}function uc(e){var t=To.renderbuffers[e];return t?yf.isRenderbuffer(t):0}function lc(e){var t=To.samplers[e];return t?yf.isSampler(t):0}function dc(e){var t=To.shaders[e];return t?yf.isShader(t):0}function fc(e){return yf.isSync(To.syncs[e])}function pc(e){var t=To.textures[e];return t?yf.isTexture(t):0}function gc(e){return yf.isTransformFeedback(To.transformFeedbacks[e])}function hc(e){var t=To.vaos[e];return t?yf.isVertexArray(t):0}function mc(e){var t=To.vaos[e];return t?yf.isVertexArray(t):0}function vc(e){yf.lineWidth(e)}function bc(e){e=To.programs[e],yf.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function yc(){yf.pauseTransformFeedback()}function Ec(e,t){3317==e&&(To.unpackAlignment=t),yf.pixelStorei(e,t)}function wc(e,t){yf.polygonOffset(e,t)}function _c(e,t,r,n){To.recordError(1280)}function Oc(e,t,r){To.recordError(1280)}function Tc(e,t){yf.disjointTimerQueryExt.queryCounterEXT(To.queries[e],t)}function Dc(e){yf.readBuffer(e)}function Pc(e,t,r,n){var o;return t*(e*r+(o=n)-1&-o)}function xc(e){return{5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[e-6402]||1}function Sc(e){return 0==(e-=5120)?X:1==e?Q:2==e?G:4==e?V:6==e?z:5==e||28922==e||28520==e||30779==e||30782==e?W:q}function Mc(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function Rc(e,t,r,n,o,i){var a=Sc(e),s=Mc(a),c=1<<s,u=Pc(r,n,xc(t)*c,To.unpackAlignment);return a.subarray(o>>s,o+u>>s)}function kc(e,t,r,n,o,i,a){if(To.currentContext.version>=2)if(yf.currentPixelPackBufferBinding)yf.readPixels(e,t,r,n,o,i,a);else{var s=Sc(i);yf.readPixels(e,t,r,n,o,i,s,a>>Mc(s))}else{var c=Rc(i,o,r,n,a);c?yf.readPixels(e,t,r,n,o,i,c):To.recordError(1280)}}function Fc(){}function Ac(e,t,r,n){yf.renderbufferStorage(e,t,r,n)}function Cc(e,t,r,n,o){yf.renderbufferStorageMultisample(e,t,r,n,o)}function Ic(){yf.resumeTransformFeedback()}function Nc(e,t){yf.sampleCoverage(e,!!t)}function jc(e,t,r){yf.samplerParameterf(To.samplers[e],t,r)}function Lc(e,t,r){var n=z[r>>2];yf.samplerParameterf(To.samplers[e],t,n)}function Uc(e,t,r){yf.samplerParameteri(To.samplers[e],t,r)}function Hc(e,t,r){var n=V[r>>2];yf.samplerParameteri(To.samplers[e],t,n)}function Bc(e,t,r,n){yf.scissor(e,t,r,n)}function Xc(){To.recordError(1280)}function Qc(e,t,r,n){var o=To.getSource(e,t,r,n);if(To.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)}yf.shaderSource(To.shaders[e],o)}function Gc(e,t,r){yf.stencilFunc(e,t,r)}function qc(e,t,r,n){yf.stencilFuncSeparate(e,t,r,n)}function Vc(e){yf.stencilMask(e)}function Wc(e,t){yf.stencilMaskSeparate(e,t)}function zc(e,t,r){yf.stencilOp(e,t,r)}function $c(e,t,r,n){yf.stencilOpSeparate(e,t,r,n)}function Yc(e,t,r,n,o,i,a,s,c){if(To.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)),To.currentContext.version>=2)if(yf.currentPixelUnpackBufferBinding)yf.texImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Sc(s);yf.texImage2D(e,t,r,n,o,i,a,s,u,c>>Mc(u))}else yf.texImage2D(e,t,r,n,o,i,a,s,null);else yf.texImage2D(e,t,r,n,o,i,a,s,c?Rc(s,a,n,o,c):null)}function Kc(e,t,r,n,o,i,a,s,c,u){if(yf.currentPixelUnpackBufferBinding)yf.texImage3D(e,t,r,n,o,i,a,s,c,u);else if(u){var l=Sc(c);yf.texImage3D(e,t,r,n,o,i,a,s,c,l,u>>Mc(l))}else yf.texImage3D(e,t,r,n,o,i,a,s,c,null)}function Jc(e,t,r){yf.texParameterf(e,t,r)}function Zc(e,t,r){var n=z[r>>2];yf.texParameterf(e,t,n)}function eu(e,t,r){yf.texParameteri(e,t,r)}function tu(e,t,r){var n=V[r>>2];yf.texParameteri(e,t,n)}function ru(e,t,r,n,o){yf.texStorage2D(e,t,r,n,o)}function nu(e,t,r,n,o,i){yf.texStorage3D(e,t,r,n,o,i)}function ou(e,t,r,n,o,i,a,s,c){if(To.currentContext.version>=2&&36193==s&&(s=5131),To.currentContext.version>=2)if(yf.currentPixelUnpackBufferBinding)yf.texSubImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Sc(s);yf.texSubImage2D(e,t,r,n,o,i,a,s,u,c>>Mc(u))}else yf.texSubImage2D(e,t,r,n,o,i,a,s,null);else{var l=null;c&&(l=Rc(s,a,o,i,c)),yf.texSubImage2D(e,t,r,n,o,i,a,s,l)}}function iu(e,t,r,n,o,i,a,s,c,u,l){if(yf.currentPixelUnpackBufferBinding)yf.texSubImage3D(e,t,r,n,o,i,a,s,c,u,l);else if(l){var d=Sc(u);yf.texSubImage3D(e,t,r,n,o,i,a,s,c,u,d,l>>Mc(d))}else yf.texSubImage3D(e,t,r,n,o,i,a,s,c,u,null)}function au(e,t,r,n){e=To.programs[e];for(var o=[],i=0;i<t;i++)o.push(j(V[r+4*i>>2]));yf.transformFeedbackVaryings(e,o,n)}function su(e,t){yf.uniform1f(Qs(e),t)}var cu=[];function uu(e,t,r){if(To.currentContext.version>=2)yf.uniform1fv(Qs(e),z,r>>2,t);else{if(t<=288)for(var n=cu[t-1],o=0;o<t;++o)n[o]=z[r+4*o>>2];else n=z.subarray(r>>2,r+4*t>>2);yf.uniform1fv(Qs(e),n)}}function lu(e,t){yf.uniform1i(Qs(e),t)}var du=[];function fu(e,t,r){if(To.currentContext.version>=2)yf.uniform1iv(Qs(e),V,r>>2,t);else{if(t<=288)for(var n=du[t-1],o=0;o<t;++o)n[o]=V[r+4*o>>2];else n=V.subarray(r>>2,r+4*t>>2);yf.uniform1iv(Qs(e),n)}}function pu(e,t){yf.uniform1ui(Qs(e),t)}function gu(e,t,r){yf.uniform1uiv(Qs(e),W,r>>2,t)}function hu(e,t,r){yf.uniform2f(Qs(e),t,r)}function mu(e,t,r){if(To.currentContext.version>=2)yf.uniform2fv(Qs(e),z,r>>2,2*t);else{if(t<=144)for(var n=cu[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);yf.uniform2fv(Qs(e),n)}}function vu(e,t,r){yf.uniform2i(Qs(e),t,r)}function bu(e,t,r){if(To.currentContext.version>=2)yf.uniform2iv(Qs(e),V,r>>2,2*t);else{if(t<=144)for(var n=du[2*t-1],o=0;o<2*t;o+=2)n[o]=V[r+4*o>>2],n[o+1]=V[r+(4*o+4)>>2];else n=V.subarray(r>>2,r+8*t>>2);yf.uniform2iv(Qs(e),n)}}function yu(e,t,r){yf.uniform2ui(Qs(e),t,r)}function Eu(e,t,r){yf.uniform2uiv(Qs(e),W,r>>2,2*t)}function wu(e,t,r,n){yf.uniform3f(Qs(e),t,r,n)}function _u(e,t,r){if(To.currentContext.version>=2)yf.uniform3fv(Qs(e),z,r>>2,3*t);else{if(t<=96)for(var n=cu[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);yf.uniform3fv(Qs(e),n)}}function Ou(e,t,r,n){yf.uniform3i(Qs(e),t,r,n)}function Tu(e,t,r){if(To.currentContext.version>=2)yf.uniform3iv(Qs(e),V,r>>2,3*t);else{if(t<=96)for(var n=du[3*t-1],o=0;o<3*t;o+=3)n[o]=V[r+4*o>>2],n[o+1]=V[r+(4*o+4)>>2],n[o+2]=V[r+(4*o+8)>>2];else n=V.subarray(r>>2,r+12*t>>2);yf.uniform3iv(Qs(e),n)}}function Du(e,t,r,n){yf.uniform3ui(Qs(e),t,r,n)}function Pu(e,t,r){yf.uniform3uiv(Qs(e),W,r>>2,3*t)}function xu(e,t,r,n,o){yf.uniform4f(Qs(e),t,r,n,o)}function Su(e,t,r){if(To.currentContext.version>=2)yf.uniform4fv(Qs(e),z,r>>2,4*t);else{if(t<=72){var n=cu[4*t-1],o=z;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=z.subarray(r>>2,r+16*t>>2);yf.uniform4fv(Qs(e),n)}}function Mu(e,t,r,n,o){yf.uniform4i(Qs(e),t,r,n,o)}function Ru(e,t,r){if(To.currentContext.version>=2)yf.uniform4iv(Qs(e),V,r>>2,4*t);else{if(t<=72)for(var n=du[4*t-1],o=0;o<4*t;o+=4)n[o]=V[r+4*o>>2],n[o+1]=V[r+(4*o+4)>>2],n[o+2]=V[r+(4*o+8)>>2],n[o+3]=V[r+(4*o+12)>>2];else n=V.subarray(r>>2,r+16*t>>2);yf.uniform4iv(Qs(e),n)}}function ku(e,t,r,n,o){yf.uniform4ui(Qs(e),t,r,n,o)}function Fu(e,t,r){yf.uniform4uiv(Qs(e),W,r>>2,4*t)}function Au(e,t,r){e=To.programs[e],yf.uniformBlockBinding(e,t,r)}function Cu(e,t,r,n){if(To.currentContext.version>=2)yf.uniformMatrix2fv(Qs(e),!!r,z,n>>2,4*t);else{if(t<=72)for(var o=cu[4*t-1],i=0;i<4*t;i+=4)o[i]=z[n+4*i>>2],o[i+1]=z[n+(4*i+4)>>2],o[i+2]=z[n+(4*i+8)>>2],o[i+3]=z[n+(4*i+12)>>2];else o=z.subarray(n>>2,n+16*t>>2);yf.uniformMatrix2fv(Qs(e),!!r,o)}}function Iu(e,t,r,n){yf.uniformMatrix2x3fv(Qs(e),!!r,z,n>>2,6*t)}function Nu(e,t,r,n){yf.uniformMatrix2x4fv(Qs(e),!!r,z,n>>2,8*t)}function ju(e,t,r,n){if(To.currentContext.version>=2)yf.uniformMatrix3fv(Qs(e),!!r,z,n>>2,9*t);else{if(t<=32)for(var o=cu[9*t-1],i=0;i<9*t;i+=9)o[i]=z[n+4*i>>2],o[i+1]=z[n+(4*i+4)>>2],o[i+2]=z[n+(4*i+8)>>2],o[i+3]=z[n+(4*i+12)>>2],o[i+4]=z[n+(4*i+16)>>2],o[i+5]=z[n+(4*i+20)>>2],o[i+6]=z[n+(4*i+24)>>2],o[i+7]=z[n+(4*i+28)>>2],o[i+8]=z[n+(4*i+32)>>2];else o=z.subarray(n>>2,n+36*t>>2);yf.uniformMatrix3fv(Qs(e),!!r,o)}}function Lu(e,t,r,n){yf.uniformMatrix3x2fv(Qs(e),!!r,z,n>>2,6*t)}function Uu(e,t,r,n){yf.uniformMatrix3x4fv(Qs(e),!!r,z,n>>2,12*t)}function Hu(e,t,r,n){if(To.currentContext.version>=2)yf.uniformMatrix4fv(Qs(e),!!r,z,n>>2,16*t);else{if(t<=18){var o=cu[16*t-1],i=z;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=z.subarray(n>>2,n+64*t>>2);yf.uniformMatrix4fv(Qs(e),!!r,o)}}function Bu(e,t,r,n){yf.uniformMatrix4x2fv(Qs(e),!!r,z,n>>2,8*t)}function Xu(e,t,r,n){yf.uniformMatrix4x3fv(Qs(e),!!r,z,n>>2,12*t)}function Qu(e){e=To.programs[e],yf.useProgram(e),yf.currentProgram=e}function Gu(e){yf.validateProgram(To.programs[e])}function qu(e,t){yf.vertexAttrib1f(e,t)}function Vu(e,t){yf.vertexAttrib1f(e,z[t>>2])}function Wu(e,t,r){yf.vertexAttrib2f(e,t,r)}function zu(e,t){yf.vertexAttrib2f(e,z[t>>2],z[t+4>>2])}function $u(e,t,r,n){yf.vertexAttrib3f(e,t,r,n)}function Yu(e,t){yf.vertexAttrib3f(e,z[t>>2],z[t+4>>2],z[t+8>>2])}function Ku(e,t,r,n,o){yf.vertexAttrib4f(e,t,r,n,o)}function Ju(e,t){yf.vertexAttrib4f(e,z[t>>2],z[t+4>>2],z[t+8>>2],z[t+12>>2])}function Zu(e,t){yf.vertexAttribDivisor(e,t)}function el(e,t){yf.vertexAttribDivisor(e,t)}function tl(e,t){yf.vertexAttribDivisor(e,t)}function rl(e,t){yf.vertexAttribDivisor(e,t)}function nl(e,t){yf.vertexAttribDivisor(e,t)}function ol(e,t,r,n,o){yf.vertexAttribI4i(e,t,r,n,o)}function il(e,t){yf.vertexAttribI4i(e,V[t>>2],V[t+4>>2],V[t+8>>2],V[t+12>>2])}function al(e,t,r,n,o){yf.vertexAttribI4ui(e,t,r,n,o)}function sl(e,t){yf.vertexAttribI4ui(e,W[t>>2],W[t+4>>2],W[t+8>>2],W[t+12>>2])}function cl(e,t,r,n,o){yf.vertexAttribIPointer(e,t,r,n,o)}function ul(e,t,r,n,o,i){yf.vertexAttribPointer(e,t,r,!!n,o,i)}function ll(e,t,r,n){yf.viewport(e,t,r,n)}function dl(e,t,r,n){yf.waitSync(To.syncs[e],t,Ei(r,n))}function fl(e,t,r){Q.copyWithin(e,t,t+r)}function pl(e){try{return M.grow(e-B.byteLength+65535>>>16),ce(M.buffer),1}catch(t){O("emscripten_realloc_buffer: Attempted to grow heap from "+B.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function gl(e){var t=Q.length;C((e>>>=0)>t);var r=2147483648;if(e>r)return O("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(pl(i))return!0}return O("Failed to grow the heap from "+t+" bytes to "+i+" bytes, not enough memory!"),!1}function hl(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 ml(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 vl(e){return o.emscripten_ubq_asyncFetchHeaders.has(e)?o.emscripten_ubq_asyncFetchHeaders.get(e):0}function bl(e,t,r,n,i,c,u,l,d){let f=o.UTF8ToString(t,r),p=o.UTF8ToString(l,d),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];let v;return"GET"!==m&&"HEAD"!==m&&(v=new Uint8Array(o.HEAPU8.buffer,c,u)),fetch(f,{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 yl(e){return!!o.emscripten_ubq_asyncFetchStates.has(e)&&(o.emscripten_ubq_asyncFetchStates.delete(e),!0)}function El(e){return o.emscripten_ubq_asyncFetchCompletedBytes.has(e)?o.emscripten_ubq_asyncFetchCompletedBytes.get(e):0}function wl(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 _l(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 Ol(e){return o.emscripten_ubq_asyncFetchStates.has(e)?o.emscripten_ubq_asyncFetchStates.get(e).state:-1}function Tl(e){return o.emscripten_ubq_asyncFetchTotalBytes.has(e)?o.emscripten_ubq_asyncFetchTotalBytes.get(e):0}var Dl={inEventHandler:0,removeAllEventListeners:function(){for(var e=Dl.eventHandlers.length-1;e>=0;--e)Dl._removeHandler(e);Dl.eventHandlers=[],Dl.deferredCalls=[]},registerRemoveEventListeners:function(){Dl.removeEventListenersRegistered||(ve.push(Dl.removeAllEventListeners),Dl.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 Dl.deferredCalls){var i=Dl.deferredCalls[o];if(i.targetFunction==e&&n(i.argsList,r))return}Dl.deferredCalls.push({targetFunction:e,precedence:t,argsList:r}),Dl.deferredCalls.sort((function(e,t){return e.precedence<t.precedence}))},removeDeferredCalls:function(e){for(var t=0;t<Dl.deferredCalls.length;++t)Dl.deferredCalls[t].targetFunction==e&&(Dl.deferredCalls.splice(t,1),--t)},canPerformEventHandlerRequests:function(){return Dl.inEventHandler&&Dl.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(Dl.canPerformEventHandlerRequests())for(var e=0;e<Dl.deferredCalls.length;++e){var t=Dl.deferredCalls[e];Dl.deferredCalls.splice(e,1),--e,t.targetFunction.apply(null,t.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(e,t){for(var r=0;r<Dl.eventHandlers.length;++r)Dl.eventHandlers[r].target!=e||t&&t!=Dl.eventHandlers[r].eventTypeString||Dl._removeHandler(r--)},_removeHandler:function(e){var t=Dl.eventHandlers[e];t.target.removeEventListener(t.eventTypeString,t.eventListenerFunc,t.useCapture),Dl.eventHandlers.splice(e,1)},registerOrRemoveHandler:function(e){var t=function(t){++Dl.inEventHandler,Dl.currentEventHandler=e,Dl.runDeferredCalls(),e.handlerFunc(t),Dl.runDeferredCalls(),--Dl.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=t,e.target.addEventListener(e.eventTypeString,t,e.useCapture),Dl.eventHandlers.push(e),Dl.registerRemoveEventListeners();else for(var r=0;r<Dl.eventHandlers.length;++r)Dl.eventHandlers[r].target==e.target&&Dl.eventHandlers[r].eventTypeString==e.eventTypeString&&Dl._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}},Pl=["default","low-power","high-performance"];function xl(e){return e>2?j(e):e}var Sl=[0,document,window];function Ml(e){return e=xl(e),Sl[e]||document.querySelector(e)}function Rl(e){return Ml(e)}function kl(e,t){C(t);var r=t>>2,n=V[r+6],o={alpha:!!V[r+0],depth:!!V[r+1],stencil:!!V[r+2],antialias:!!V[r+3],premultipliedAlpha:!!V[r+4],preserveDrawingBuffer:!!V[r+5],powerPreference:Pl[n],failIfMajorPerformanceCaveat:!!V[r+7],majorVersion:V[r+8],minorVersion:V[r+9],enableExtensionsByDefault:V[r+10],explicitSwapControl:V[r+11],proxyContextToMainThread:V[r+12],renderViaOffscreenBackBuffer:V[r+13]},i=Rl(e);return i?o.explicitSwapControl?0:To.createContext(i,o):0}function Fl(e,t){return kl(e,t)}function Al(e){C(e);for(var t=e>>2,r=0;r<14;++r)V[t+r]=0;V[t+0]=V[t+1]=V[t+3]=V[t+4]=V[t+8]=V[t+10]=1}function Cl(e){return To.makeContextCurrent(e)?0:-5}var Il={};function Nl(){return l||"./this.program"}function jl(){if(!jl.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",_:Nl()};for(var t in Il)void 0===Il[t]?delete e[t]:e[t]=Il[t];var r=[];for(var t in e)r.push(t+"="+e[t]);jl.strings=r}return jl.strings}function Ll(e,t){var r=0;return jl().forEach((function(n,o){var i=t+r;V[e+4*o>>2]=i,ae(n,i),r+=n.length+1})),0}function Ul(e,t){var r=jl();V[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),V[t>>2]=n,0}function Hl(e){try{var t=yt.getStreamFromFD(e);return bt.close(t),0}catch(e){if(void 0===bt||!(e instanceof bt.ErrnoError))throw e;return e.errno}}function Bl(e,t,r,n){try{var o=yt.getStreamFromFD(e),i=yt.doReadv(o,t,r);return V[n>>2]=i,0}catch(e){if(void 0===bt||!(e instanceof bt.ErrnoError))throw e;return e.errno}}function Xl(e,t,r,n,o){try{var i=yt.getStreamFromFD(e),a=4294967296*r+(t>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(bt.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)],V[o>>2]=Be[0],V[o+4>>2]=Be[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(e){if(void 0===bt||!(e instanceof bt.ErrnoError))throw e;return e.errno}}function Ql(e,t,r,n){try{var o=yt.getStreamFromFD(e),i=yt.doWritev(o,t,r);return V[n>>2]=i,0}catch(e){if(void 0===bt||!(e instanceof bt.ErrnoError))throw e;return e.errno}}function Gl(){return S()}function ql(e){var t=Date.now();return V[e>>2]=t/1e3|0,V[e+4>>2]=t%1e3*1e3|0,0}function Vl(e){yf.activeTexture(e)}function Wl(e,t){yf.attachShader(To.programs[e],To.shaders[t])}function zl(e,t){35051==e?yf.currentPixelPackBufferBinding=t:35052==e&&(yf.currentPixelUnpackBufferBinding=t),yf.bindBuffer(e,To.buffers[t])}function $l(e,t){yf.bindFramebuffer(e,To.framebuffers[t])}function Yl(e,t){yf.bindRenderbuffer(e,To.renderbuffers[t])}function Kl(e,t){yf.bindTexture(e,To.textures[t])}function Jl(e){yf.blendEquation(e)}function Zl(e,t){yf.blendEquationSeparate(e,t)}function ed(e,t){yf.blendFunc(e,t)}function td(e,t,r,n){yf.blendFuncSeparate(e,t,r,n)}function rd(e,t,r,n){To.currentContext.version>=2?r?yf.bufferData(e,Q,n,r,t):yf.bufferData(e,t,n):yf.bufferData(e,r?Q.subarray(r,r+t):t,n)}function nd(e){yf.clear(e)}function od(e,t,r,n){yf.clearColor(e,t,r,n)}function id(e){yf.clearStencil(e)}function ad(e,t,r,n){yf.colorMask(!!e,!!t,!!r,!!n)}function sd(e){yf.compileShader(To.shaders[e])}function cd(){var e=To.getNewId(To.programs),t=yf.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,To.programs[e]=t,e}function ud(e){var t=To.getNewId(To.shaders);return To.shaders[t]=yf.createShader(e),t}function ld(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.buffers[n];o&&(yf.deleteBuffer(o),o.name=0,To.buffers[n]=null,n==yf.currentPixelPackBufferBinding&&(yf.currentPixelPackBufferBinding=0),n==yf.currentPixelUnpackBufferBinding&&(yf.currentPixelUnpackBufferBinding=0))}}function dd(e,t){for(var r=0;r<e;++r){var n=V[t+4*r>>2],o=To.framebuffers[n];o&&(yf.deleteFramebuffer(o),o.name=0,To.framebuffers[n]=null)}}function fd(e){if(e){var t=To.programs[e];t?(yf.deleteProgram(t),t.name=0,To.programs[e]=null):To.recordError(1281)}}function pd(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.renderbuffers[n];o&&(yf.deleteRenderbuffer(o),o.name=0,To.renderbuffers[n]=null)}}function gd(e){if(e){var t=To.shaders[e];t?(yf.deleteShader(t),To.shaders[e]=null):To.recordError(1281)}}function hd(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.textures[n];o&&(yf.deleteTexture(o),o.name=0,To.textures[n]=null)}}function md(e){yf.depthMask(!!e)}function vd(e,t){yf.detachShader(To.programs[e],To.shaders[t])}function bd(e){yf.disable(e)}function yd(e,t,r){yf.drawArrays(e,t,r)}function Ed(e){yf.enable(e)}function wd(e){yf.enableVertexAttribArray(e)}function _d(){yf.finish()}function Od(e,t,r,n){yf.framebufferRenderbuffer(e,t,r,To.renderbuffers[n])}function Td(e,t,r,n,o){yf.framebufferTexture2D(e,t,r,To.textures[n],o)}function Dd(e,t){Ra(e,t,"createBuffer",To.buffers)}function Pd(e,t){Ra(e,t,"createFramebuffer",To.framebuffers)}function xd(e,t){Ra(e,t,"createRenderbuffer",To.renderbuffers)}function Sd(e,t){Ra(e,t,"createTexture",To.textures)}function Md(e,t){return yf.getAttribLocation(To.programs[e],j(t))}function Rd(){var e=yf.getError()||To.lastError;return To.lastError=0,e}function kd(e,t){Za(e,t,0)}function Fd(e,t,r,n){var o=yf.getProgramInfoLog(To.programs[e]);null===o&&(o="(unknown error)");var i=t>0&&n?U(o,n,t):0;r&&(V[r>>2]=i)}function Ad(e,t,r){if(r)if(e>=To.counter)To.recordError(1281);else if(e=To.programs[e],35716==t){var n=yf.getProgramInfoLog(e);null===n&&(n="(unknown error)"),V[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var o=0;o<yf.getProgramParameter(e,35718);++o)e.maxUniformLength=Math.max(e.maxUniformLength,yf.getActiveUniform(e,o).name.length+1);V[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(o=0;o<yf.getProgramParameter(e,35721);++o)e.maxAttributeLength=Math.max(e.maxAttributeLength,yf.getActiveAttrib(e,o).name.length+1);V[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(o=0;o<yf.getProgramParameter(e,35382);++o)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,yf.getActiveUniformBlockName(e,o).length+1);V[r>>2]=e.maxUniformBlockNameLength}else V[r>>2]=yf.getProgramParameter(e,t);else To.recordError(1281)}function Cd(e,t,r,n){var o=yf.getShaderPrecisionFormat(e,t);V[r>>2]=o.rangeMin,V[r+4>>2]=o.rangeMax,V[n>>2]=o.precision}function Id(e){var t=To.stringCache[e];if(!t){switch(e){case 7939:var r=yf.getSupportedExtensions()||[];t=Rs((r=r.concat(r.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=yf.getParameter(e);n||To.recordError(1280),t=n&&Rs(n);break;case 7938:var o=yf.getParameter(7938);t=Rs(o=To.currentContext.version>=2?"OpenGL ES 3.0 ("+o+")":"OpenGL ES 2.0 ("+o+")");break;case 35724:var i=yf.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=Rs(i);break;default:To.recordError(1280)}To.stringCache[e]=t}return t}function Nd(e,t){if(t=j(t),e=To.programs[e]){Bs(e);var r=e.uniformLocsById,n=0,o=t,i=Hs(t);i>0&&(n=Us(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]||yf.getUniformLocation(e,t)))return n}else To.recordError(1281);return-1}function jd(e){e=To.programs[e],yf.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function Ld(e,t,r,n,o,i,a){if(To.currentContext.version>=2)if(yf.currentPixelPackBufferBinding)yf.readPixels(e,t,r,n,o,i,a);else{var s=Sc(i);yf.readPixels(e,t,r,n,o,i,s,a>>Mc(s))}else{var c=Rc(i,o,r,n,a);c?yf.readPixels(e,t,r,n,o,i,c):To.recordError(1280)}}function Ud(e,t,r,n){yf.renderbufferStorage(e,t,r,n)}function Hd(e,t,r,n){var o=To.getSource(e,t,r,n);if(To.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)}yf.shaderSource(To.shaders[e],o)}function Bd(e,t,r){yf.stencilFunc(e,t,r)}function Xd(e){yf.stencilMask(e)}function Qd(e,t,r){yf.stencilOp(e,t,r)}function Gd(e,t,r,n,o,i,a,s,c){if(To.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)),To.currentContext.version>=2)if(yf.currentPixelUnpackBufferBinding)yf.texImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Sc(s);yf.texImage2D(e,t,r,n,o,i,a,s,u,c>>Mc(u))}else yf.texImage2D(e,t,r,n,o,i,a,s,null);else yf.texImage2D(e,t,r,n,o,i,a,s,c?Rc(s,a,n,o,c):null)}function qd(e,t,r){yf.texParameteri(e,t,r)}function Vd(e,t,r,n,o,i,a,s,c){if(To.currentContext.version>=2&&36193==s&&(s=5131),To.currentContext.version>=2)if(yf.currentPixelUnpackBufferBinding)yf.texSubImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Sc(s);yf.texSubImage2D(e,t,r,n,o,i,a,s,u,c>>Mc(u))}else yf.texSubImage2D(e,t,r,n,o,i,a,s,null);else{var l=null;c&&(l=Rc(s,a,o,i,c)),yf.texSubImage2D(e,t,r,n,o,i,a,s,l)}}function Wd(e,t){yf.uniform1f(Qs(e),t)}function zd(e,t){yf.uniform1i(Qs(e),t)}function $d(e,t,r){if(To.currentContext.version>=2)yf.uniform2fv(Qs(e),z,r>>2,2*t);else{if(t<=144)for(var n=cu[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);yf.uniform2fv(Qs(e),n)}}function Yd(e,t,r){yf.uniform2i(Qs(e),t,r)}function Kd(e,t,r){if(To.currentContext.version>=2)yf.uniform2iv(Qs(e),V,r>>2,2*t);else{if(t<=144)for(var n=du[2*t-1],o=0;o<2*t;o+=2)n[o]=V[r+4*o>>2],n[o+1]=V[r+(4*o+4)>>2];else n=V.subarray(r>>2,r+8*t>>2);yf.uniform2iv(Qs(e),n)}}function Jd(e,t,r){if(To.currentContext.version>=2)yf.uniform3fv(Qs(e),z,r>>2,3*t);else{if(t<=96)for(var n=cu[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);yf.uniform3fv(Qs(e),n)}}function Zd(e,t,r,n){yf.uniform3i(Qs(e),t,r,n)}function ef(e,t,r){if(To.currentContext.version>=2)yf.uniform3iv(Qs(e),V,r>>2,3*t);else{if(t<=96)for(var n=du[3*t-1],o=0;o<3*t;o+=3)n[o]=V[r+4*o>>2],n[o+1]=V[r+(4*o+4)>>2],n[o+2]=V[r+(4*o+8)>>2];else n=V.subarray(r>>2,r+12*t>>2);yf.uniform3iv(Qs(e),n)}}function tf(e,t,r){if(To.currentContext.version>=2)yf.uniform4fv(Qs(e),z,r>>2,4*t);else{if(t<=72){var n=cu[4*t-1],o=z;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=z.subarray(r>>2,r+16*t>>2);yf.uniform4fv(Qs(e),n)}}function rf(e,t,r,n,o){yf.uniform4i(Qs(e),t,r,n,o)}function nf(e,t,r){if(To.currentContext.version>=2)yf.uniform4iv(Qs(e),V,r>>2,4*t);else{if(t<=72)for(var n=du[4*t-1],o=0;o<4*t;o+=4)n[o]=V[r+4*o>>2],n[o+1]=V[r+(4*o+4)>>2],n[o+2]=V[r+(4*o+8)>>2],n[o+3]=V[r+(4*o+12)>>2];else n=V.subarray(r>>2,r+16*t>>2);yf.uniform4iv(Qs(e),n)}}function of(e,t,r,n){if(To.currentContext.version>=2)yf.uniformMatrix3fv(Qs(e),!!r,z,n>>2,9*t);else{if(t<=32)for(var o=cu[9*t-1],i=0;i<9*t;i+=9)o[i]=z[n+4*i>>2],o[i+1]=z[n+(4*i+4)>>2],o[i+2]=z[n+(4*i+8)>>2],o[i+3]=z[n+(4*i+12)>>2],o[i+4]=z[n+(4*i+16)>>2],o[i+5]=z[n+(4*i+20)>>2],o[i+6]=z[n+(4*i+24)>>2],o[i+7]=z[n+(4*i+28)>>2],o[i+8]=z[n+(4*i+32)>>2];else o=z.subarray(n>>2,n+36*t>>2);yf.uniformMatrix3fv(Qs(e),!!r,o)}}function af(e,t,r,n){if(To.currentContext.version>=2)yf.uniformMatrix4fv(Qs(e),!!r,z,n>>2,16*t);else{if(t<=18){var o=cu[16*t-1],i=z;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=z.subarray(n>>2,n+64*t>>2);yf.uniformMatrix4fv(Qs(e),!!r,o)}}function sf(e){e=To.programs[e],yf.useProgram(e),yf.currentProgram=e}function cf(e,t,r,n,o,i){yf.vertexAttribPointer(e,t,r,!!n,o,i)}function uf(e,t,r,n){yf.viewport(e,t,r,n)}function lf(e){x(e)}function df(e){return e%4==0&&(e%100!=0||e%400==0)}function ff(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var pf=[31,29,31,30,31,30,31,31,30,31,30,31],gf=[31,28,31,30,31,30,31,31,30,31,30,31];function hf(e,t){for(var r=new Date(e.getTime());t>0;){var n=df(r.getFullYear()),o=r.getMonth(),i=(n?pf:gf)[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 mf(e,t,r,n){var o=V[n+40>>2],i={tm_sec:V[n>>2],tm_min:V[n+4>>2],tm_hour:V[n+8>>2],tm_mday:V[n+12>>2],tm_mon:V[n+16>>2],tm_year:V[n+20>>2],tm_wday:V[n+24>>2],tm_yday:V[n+28>>2],tm_isdst:V[n+32>>2],tm_gmtoff:V[n+36>>2],tm_zone:o?j(o):""},a=j(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 d(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function f(e,t){return d(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=hf(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 f((e.tm_year+1900)/100|0,2)},"%d":function(e){return f(e.tm_mday,2)},"%e":function(e){return d(e.tm_mday,2," ")},"%g":function(e){return h(e).toString().substring(2)},"%G":function(e){return h(e)},"%H":function(e){return f(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),f(t,2)},"%j":function(e){return f(e.tm_mday+ff(df(e.tm_year+1900)?pf:gf,e.tm_mon-1),3)},"%m":function(e){return f(e.tm_mon+1,2)},"%M":function(e){return f(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 f(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:hf(t,7-t.getDay()),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(p(r,n)<0){var o=ff(df(n.getFullYear())?pf:gf,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return f(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=hf(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(),f(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:hf(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=ff(df(n.getFullYear())?pf:gf,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return f(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 a=a.replace(/%%/g,"\0\0"),m)a.includes(c)&&(a=a.replace(new RegExp(c,"g"),m[c](i)));var v=Pf(a=a.replace(/\0\0/g,"%"),!1);return v.length>t?0:(ie(v,e),v.length-1)}function vf(e,t,r,n){return mf(e,t,r,n)}function bf(e){var t=Date.now()/1e3|0;return e&&(V[e>>2]=t),t}var yf,Ef=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=bt.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},wf=365,_f=146;Object.defineProperties(Ef.prototype,{read:{get:function(){return(this.mode&wf)===wf},set:function(e){e?this.mode|=wf:this.mode&=~wf}},write:{get:function(){return(this.mode&_f)===_f},set:function(e){e?this.mode|=_f:this.mode&=~_f}},isFolder:{get:function(){return bt.isDir(this.mode)}},isDevice:{get:function(){return bt.isChrdev(this.mode)}}}),bt.FSNode=Ef,bt.staticInit(),o.FS_createPath=bt.createPath,o.FS_createDataFile=bt.createDataFile,o.FS_createPreloadedFile=bt.createPreloadedFile,o.FS_createLazyFile=bt.createLazyFile,o.FS_createDevice=bt.createDevice,o.FS_unlink=bt.unlink,vt={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},Nt=o.InternalError=It(Error,"InternalError"),Gt(),Wt=o.BindingError=It(Error,"BindingError"),Or(),fr(),Ir(),Xr=o.UnboundTypeError=It(Error,"UnboundTypeError"),rn(),o.requestFullscreen=function(e,t){ho.requestFullscreen(e,t)},o.requestFullScreen=function(){ho.requestFullScreen()},o.requestAnimationFrame=function(e){ho.requestAnimationFrame(e)},o.setCanvasSize=function(e,t,r){ho.setCanvasSize(e,t,r)},o.pauseMainLoop=function(){ho.mainLoop.pause()},o.resumeMainLoop=function(){ho.mainLoop.resume()},o.getUserMedia=function(){ho.getUserMedia()},o.createContext=function(e,t,r,n){return ho.createContext(e,t,r,n)};for(var Of=0;Of<32;++Of)aa.push(new Array(Of));var Tf=new Float32Array(288);for(Of=0;Of<288;++Of)cu[Of]=Tf.subarray(0,Of+1);var Df=new Int32Array(288);for(Of=0;Of<288;++Of)du[Of]=Df.subarray(0,Of+1);function Pf(e,t,r){var n=r>0?r:H(e)+1,o=new Array(n),i=L(e,o,0,o.length);return t&&(o.length=i),o}"function"==typeof atob&&atob;var xf,Sf={__assert_fail:tt,__cxa_allocate_exception:rt,__cxa_throw:ot,__syscall_fcntl64:Et,__syscall_ioctl:wt,__syscall_open:_t,_dlopen_js:Ot,_dlsym_js:Tt,_embind_finalize_value_array:Ut,_embind_finalize_value_object:Bt,_embind_register_bigint:Xt,_embind_register_bool:Yt,_embind_register_class:qr,_embind_register_class_constructor:Wr,_embind_register_class_function:Yr,_embind_register_emval:on,_embind_register_enum:sn,_embind_register_enum_value:un,_embind_register_float:fn,_embind_register_function:pn,_embind_register_integer:hn,_embind_register_memory_view:mn,_embind_register_smart_ptr:vn,_embind_register_std_string:bn,_embind_register_std_wstring:yn,_embind_register_value_array:En,_embind_register_value_array_element:wn,_embind_register_value_object:_n,_embind_register_value_object_field:On,_embind_register_void:Tn,_emscripten_throw_longjmp:Dn,_emval_as:Pn,_emval_call:Sn,_emval_call_method:An,_emval_call_void_method:Cn,_emval_decref:Zr,_emval_get_global:Nn,_emval_get_method_caller:Un,_emval_get_property:Hn,_emval_incref:Bn,_emval_instanceof:Xn,_emval_is_string:Qn,_emval_new:Wn,_emval_new_array:zn,_emval_new_cstring:$n,_emval_new_object:Yn,_emval_run_destructors:Kn,_emval_set_property:Jn,_emval_take_value:Zn,_emval_throw:eo,_localtime_js:to,_mktime_js:ro,_tzset_js:oo,abort:io,clock_gettime:so,eglChooseConfig:vo,eglCreateContext:Do,eglCreateWindowSurface:Po,eglDestroyContext:xo,eglDestroySurface:So,eglGetConfigAttrib:Mo,eglGetDisplay:Ro,eglGetError:ko,eglInitialize:Fo,eglMakeCurrent:Ao,eglSwapBuffers:Co,eglTerminate:Io,emscripten_console_error:No,emscripten_console_log:jo,emscripten_console_warn:Lo,emscripten_debugger:Uo,emscripten_get_heap_max:Ho,emscripten_glActiveTexture:Bo,emscripten_glAttachShader:Xo,emscripten_glBeginQuery:Qo,emscripten_glBeginQueryEXT:Go,emscripten_glBeginTransformFeedback:qo,emscripten_glBindAttribLocation:Vo,emscripten_glBindBuffer:Wo,emscripten_glBindBufferBase:zo,emscripten_glBindBufferRange:$o,emscripten_glBindFramebuffer:Yo,emscripten_glBindRenderbuffer:Ko,emscripten_glBindSampler:Jo,emscripten_glBindTexture:Zo,emscripten_glBindTransformFeedback:ei,emscripten_glBindVertexArray:ti,emscripten_glBindVertexArrayOES:ri,emscripten_glBlendColor:ni,emscripten_glBlendEquation:oi,emscripten_glBlendEquationSeparate:ii,emscripten_glBlendFunc:ai,emscripten_glBlendFuncSeparate:si,emscripten_glBlitFramebuffer:ci,emscripten_glBufferData:ui,emscripten_glBufferSubData:li,emscripten_glCheckFramebufferStatus:di,emscripten_glClear:fi,emscripten_glClearBufferfi:pi,emscripten_glClearBufferfv:gi,emscripten_glClearBufferiv:hi,emscripten_glClearBufferuiv:mi,emscripten_glClearColor:vi,emscripten_glClearDepthf:bi,emscripten_glClearStencil:yi,emscripten_glClientWaitSync:wi,emscripten_glColorMask:_i,emscripten_glCompileShader:Oi,emscripten_glCompressedTexImage2D:Ti,emscripten_glCompressedTexImage3D:Di,emscripten_glCompressedTexSubImage2D:Pi,emscripten_glCompressedTexSubImage3D:xi,emscripten_glCopyBufferSubData:Si,emscripten_glCopyTexImage2D:Mi,emscripten_glCopyTexSubImage2D:Ri,emscripten_glCopyTexSubImage3D:ki,emscripten_glCreateProgram:Fi,emscripten_glCreateShader:Ai,emscripten_glCullFace:Ci,emscripten_glDeleteBuffers:Ii,emscripten_glDeleteFramebuffers:Ni,emscripten_glDeleteProgram:ji,emscripten_glDeleteQueries:Li,emscripten_glDeleteQueriesEXT:Ui,emscripten_glDeleteRenderbuffers:Hi,emscripten_glDeleteSamplers:Bi,emscripten_glDeleteShader:Xi,emscripten_glDeleteSync:Qi,emscripten_glDeleteTextures:Gi,emscripten_glDeleteTransformFeedbacks:qi,emscripten_glDeleteVertexArrays:Vi,emscripten_glDeleteVertexArraysOES:Wi,emscripten_glDepthFunc:zi,emscripten_glDepthMask:$i,emscripten_glDepthRangef:Yi,emscripten_glDetachShader:Ki,emscripten_glDisable:Ji,emscripten_glDisableVertexAttribArray:Zi,emscripten_glDrawArrays:ea,emscripten_glDrawArraysInstanced:ta,emscripten_glDrawArraysInstancedANGLE:ra,emscripten_glDrawArraysInstancedARB:na,emscripten_glDrawArraysInstancedEXT:oa,emscripten_glDrawArraysInstancedNV:ia,emscripten_glDrawBuffers:sa,emscripten_glDrawBuffersEXT:ca,emscripten_glDrawBuffersWEBGL:ua,emscripten_glDrawElements:la,emscripten_glDrawElementsInstanced:da,emscripten_glDrawElementsInstancedANGLE:fa,emscripten_glDrawElementsInstancedARB:pa,emscripten_glDrawElementsInstancedEXT:ga,emscripten_glDrawElementsInstancedNV:ha,emscripten_glDrawRangeElements:va,emscripten_glEnable:ba,emscripten_glEnableVertexAttribArray:ya,emscripten_glEndQuery:Ea,emscripten_glEndQueryEXT:wa,emscripten_glEndTransformFeedback:_a,emscripten_glFenceSync:Oa,emscripten_glFinish:Ta,emscripten_glFlush:Da,emscripten_glFramebufferRenderbuffer:Pa,emscripten_glFramebufferTexture2D:xa,emscripten_glFramebufferTextureLayer:Sa,emscripten_glFrontFace:Ma,emscripten_glGenBuffers:ka,emscripten_glGenFramebuffers:Fa,emscripten_glGenQueries:Aa,emscripten_glGenQueriesEXT:Ca,emscripten_glGenRenderbuffers:Ia,emscripten_glGenSamplers:Na,emscripten_glGenTextures:ja,emscripten_glGenTransformFeedbacks:La,emscripten_glGenVertexArrays:Ua,emscripten_glGenVertexArraysOES:Ha,emscripten_glGenerateMipmap:Ba,emscripten_glGetActiveAttrib:Qa,emscripten_glGetActiveUniform:Ga,emscripten_glGetActiveUniformBlockName:qa,emscripten_glGetActiveUniformBlockiv:Va,emscripten_glGetActiveUniformsiv:Wa,emscripten_glGetAttachedShaders:za,emscripten_glGetAttribLocation:$a,emscripten_glGetBooleanv:es,emscripten_glGetBufferParameteri64v:ts,emscripten_glGetBufferParameteriv:rs,emscripten_glGetError:ns,emscripten_glGetFloatv:os,emscripten_glGetFragDataLocation:is,emscripten_glGetFramebufferAttachmentParameteriv:as,emscripten_glGetInteger64i_v:cs,emscripten_glGetInteger64v:us,emscripten_glGetIntegeri_v:ls,emscripten_glGetIntegerv:ds,emscripten_glGetInternalformativ:fs,emscripten_glGetProgramBinary:ps,emscripten_glGetProgramInfoLog:gs,emscripten_glGetProgramiv:hs,emscripten_glGetQueryObjecti64vEXT:ms,emscripten_glGetQueryObjectivEXT:vs,emscripten_glGetQueryObjectui64vEXT:bs,emscripten_glGetQueryObjectuiv:ys,emscripten_glGetQueryObjectuivEXT:Es,emscripten_glGetQueryiv:ws,emscripten_glGetQueryivEXT:_s,emscripten_glGetRenderbufferParameteriv:Os,emscripten_glGetSamplerParameterfv:Ts,emscripten_glGetSamplerParameteriv:Ds,emscripten_glGetShaderInfoLog:Ps,emscripten_glGetShaderPrecisionFormat:xs,emscripten_glGetShaderSource:Ss,emscripten_glGetShaderiv:Ms,emscripten_glGetString:ks,emscripten_glGetStringi:Fs,emscripten_glGetSynciv:As,emscripten_glGetTexParameterfv:Cs,emscripten_glGetTexParameteriv:Is,emscripten_glGetTransformFeedbackVarying:Ns,emscripten_glGetUniformBlockIndex:js,emscripten_glGetUniformIndices:Ls,emscripten_glGetUniformLocation:Xs,emscripten_glGetUniformfv:qs,emscripten_glGetUniformiv:Vs,emscripten_glGetUniformuiv:Ws,emscripten_glGetVertexAttribIiv:$s,emscripten_glGetVertexAttribIuiv:Ys,emscripten_glGetVertexAttribPointerv:Ks,emscripten_glGetVertexAttribfv:Js,emscripten_glGetVertexAttribiv:Zs,emscripten_glHint:ec,emscripten_glInvalidateFramebuffer:tc,emscripten_glInvalidateSubFramebuffer:rc,emscripten_glIsBuffer:nc,emscripten_glIsEnabled:oc,emscripten_glIsFramebuffer:ic,emscripten_glIsProgram:ac,emscripten_glIsQuery:sc,emscripten_glIsQueryEXT:cc,emscripten_glIsRenderbuffer:uc,emscripten_glIsSampler:lc,emscripten_glIsShader:dc,emscripten_glIsSync:fc,emscripten_glIsTexture:pc,emscripten_glIsTransformFeedback:gc,emscripten_glIsVertexArray:hc,emscripten_glIsVertexArrayOES:mc,emscripten_glLineWidth:vc,emscripten_glLinkProgram:bc,emscripten_glPauseTransformFeedback:yc,emscripten_glPixelStorei:Ec,emscripten_glPolygonOffset:wc,emscripten_glProgramBinary:_c,emscripten_glProgramParameteri:Oc,emscripten_glQueryCounterEXT:Tc,emscripten_glReadBuffer:Dc,emscripten_glReadPixels:kc,emscripten_glReleaseShaderCompiler:Fc,emscripten_glRenderbufferStorage:Ac,emscripten_glRenderbufferStorageMultisample:Cc,emscripten_glResumeTransformFeedback:Ic,emscripten_glSampleCoverage:Nc,emscripten_glSamplerParameterf:jc,emscripten_glSamplerParameterfv:Lc,emscripten_glSamplerParameteri:Uc,emscripten_glSamplerParameteriv:Hc,emscripten_glScissor:Bc,emscripten_glShaderBinary:Xc,emscripten_glShaderSource:Qc,emscripten_glStencilFunc:Gc,emscripten_glStencilFuncSeparate:qc,emscripten_glStencilMask:Vc,emscripten_glStencilMaskSeparate:Wc,emscripten_glStencilOp:zc,emscripten_glStencilOpSeparate:$c,emscripten_glTexImage2D:Yc,emscripten_glTexImage3D:Kc,emscripten_glTexParameterf:Jc,emscripten_glTexParameterfv:Zc,emscripten_glTexParameteri:eu,emscripten_glTexParameteriv:tu,emscripten_glTexStorage2D:ru,emscripten_glTexStorage3D:nu,emscripten_glTexSubImage2D:ou,emscripten_glTexSubImage3D:iu,emscripten_glTransformFeedbackVaryings:au,emscripten_glUniform1f:su,emscripten_glUniform1fv:uu,emscripten_glUniform1i:lu,emscripten_glUniform1iv:fu,emscripten_glUniform1ui:pu,emscripten_glUniform1uiv:gu,emscripten_glUniform2f:hu,emscripten_glUniform2fv:mu,emscripten_glUniform2i:vu,emscripten_glUniform2iv:bu,emscripten_glUniform2ui:yu,emscripten_glUniform2uiv:Eu,emscripten_glUniform3f:wu,emscripten_glUniform3fv:_u,emscripten_glUniform3i:Ou,emscripten_glUniform3iv:Tu,emscripten_glUniform3ui:Du,emscripten_glUniform3uiv:Pu,emscripten_glUniform4f:xu,emscripten_glUniform4fv:Su,emscripten_glUniform4i:Mu,emscripten_glUniform4iv:Ru,emscripten_glUniform4ui:ku,emscripten_glUniform4uiv:Fu,emscripten_glUniformBlockBinding:Au,emscripten_glUniformMatrix2fv:Cu,emscripten_glUniformMatrix2x3fv:Iu,emscripten_glUniformMatrix2x4fv:Nu,emscripten_glUniformMatrix3fv:ju,emscripten_glUniformMatrix3x2fv:Lu,emscripten_glUniformMatrix3x4fv:Uu,emscripten_glUniformMatrix4fv:Hu,emscripten_glUniformMatrix4x2fv:Bu,emscripten_glUniformMatrix4x3fv:Xu,emscripten_glUseProgram:Qu,emscripten_glValidateProgram:Gu,emscripten_glVertexAttrib1f:qu,emscripten_glVertexAttrib1fv:Vu,emscripten_glVertexAttrib2f:Wu,emscripten_glVertexAttrib2fv:zu,emscripten_glVertexAttrib3f:$u,emscripten_glVertexAttrib3fv:Yu,emscripten_glVertexAttrib4f:Ku,emscripten_glVertexAttrib4fv:Ju,emscripten_glVertexAttribDivisor:Zu,emscripten_glVertexAttribDivisorANGLE:el,emscripten_glVertexAttribDivisorARB:tl,emscripten_glVertexAttribDivisorEXT:rl,emscripten_glVertexAttribDivisorNV:nl,emscripten_glVertexAttribI4i:ol,emscripten_glVertexAttribI4iv:il,emscripten_glVertexAttribI4ui:al,emscripten_glVertexAttribI4uiv:sl,emscripten_glVertexAttribIPointer:cl,emscripten_glVertexAttribPointer:ul,emscripten_glViewport:ll,emscripten_glWaitSync:dl,emscripten_memcpy_big:fl,emscripten_resize_heap:gl,emscripten_ubq_fetch_allocateFetchResult:hl,emscripten_ubq_fetch_createHeader:ml,emscripten_ubq_fetch_deleteHeader:vl,emscripten_ubq_fetch_dispatchAsyncFetch:bl,emscripten_ubq_fetch_freeFetchResult:yl,emscripten_ubq_fetch_getFetchCompletedBytes:El,emscripten_ubq_fetch_getFetchResultAddress:wl,emscripten_ubq_fetch_getFetchResultLength:_l,emscripten_ubq_fetch_getFetchState:Ol,emscripten_ubq_fetch_getFetchTotalBytes:Tl,emscripten_webgl_create_context:Fl,emscripten_webgl_init_context_attributes:Al,emscripten_webgl_make_context_current:Cl,environ_get:Ll,environ_sizes_get:Ul,fd_close:Hl,fd_read:Bl,fd_seek:Xl,fd_write:Ql,getTempRet0:Gl,gettimeofday:ql,glActiveTexture:Vl,glAttachShader:Wl,glBindBuffer:zl,glBindFramebuffer:$l,glBindRenderbuffer:Yl,glBindTexture:Kl,glBlendEquation:Jl,glBlendEquationSeparate:Zl,glBlendFunc:ed,glBlendFuncSeparate:td,glBufferData:rd,glClear:nd,glClearColor:od,glClearStencil:id,glColorMask:ad,glCompileShader:sd,glCreateProgram:cd,glCreateShader:ud,glDeleteBuffers:ld,glDeleteFramebuffers:dd,glDeleteProgram:fd,glDeleteRenderbuffers:pd,glDeleteShader:gd,glDeleteTextures:hd,glDepthMask:md,glDetachShader:vd,glDisable:bd,glDrawArrays:yd,glEnable:Ed,glEnableVertexAttribArray:wd,glFinish:_d,glFramebufferRenderbuffer:Od,glFramebufferTexture2D:Td,glGenBuffers:Dd,glGenFramebuffers:Pd,glGenRenderbuffers:xd,glGenTextures:Sd,glGetAttribLocation:Md,glGetError:Rd,glGetIntegerv:kd,glGetProgramInfoLog:Fd,glGetProgramiv:Ad,glGetShaderPrecisionFormat:Cd,glGetString:Id,glGetUniformLocation:Nd,glLinkProgram:jd,glReadPixels:Ld,glRenderbufferStorage:Ud,glShaderSource:Hd,glStencilFunc:Bd,glStencilMask:Xd,glStencilOp:Qd,glTexImage2D:Gd,glTexParameteri:qd,glTexSubImage2D:Vd,glUniform1f:Wd,glUniform1i:zd,glUniform2fv:$d,glUniform2i:Yd,glUniform2iv:Kd,glUniform3fv:Jd,glUniform3i:Zd,glUniform3iv:ef,glUniform4fv:tf,glUniform4i:rf,glUniform4iv:nf,glUniformMatrix3fv:of,glUniformMatrix4fv:af,glUseProgram:sf,glVertexAttribPointer:cf,glViewport:uf,invoke_iii:Xf,invoke_iiii:Gf,invoke_iiiii:Qf,invoke_v:qf,invoke_vii:Vf,invoke_viiii:Bf,setTempRet0:lf,strftime_l:vf,time:bf},Mf=(ze(),o.___wasm_call_ctors=qe("__wasm_call_ctors"),o._malloc=qe("malloc")),Rf=(o._main=qe("main"),o._free=qe("free")),kf=o.___errno_location=qe("__errno_location"),Ff=(o._saveSetjmp=qe("saveSetjmp"),o.___getTypeName=qe("__getTypeName")),Af=(o.___embind_register_native_and_builtin_types=qe("__embind_register_native_and_builtin_types"),o.___stdio_exit=qe("__stdio_exit")),Cf=(o.___dl_seterr=qe("__dl_seterr"),o._emscripten_builtin_memalign=qe("emscripten_builtin_memalign")),If=o._setThrew=qe("setThrew"),Nf=o._emscripten_stack_init=function(){return(Nf=o._emscripten_stack_init=o.asm.emscripten_stack_init).apply(null,arguments)},jf=(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_base=function(){return(o._emscripten_stack_get_base=o.asm.emscripten_stack_get_base).apply(null,arguments)},o._emscripten_stack_get_end=function(){return(jf=o._emscripten_stack_get_end=o.asm.emscripten_stack_get_end).apply(null,arguments)}),Lf=o.stackSave=qe("stackSave"),Uf=o.stackRestore=qe("stackRestore"),Hf=o.stackAlloc=qe("stackAlloc");function Bf(e,t,r,n,o){var i=Lf();try{Ze(e)(t,r,n,o)}catch(e){if(Uf(i),e!==e+0&&"longjmp"!==e)throw e;If(1,0)}}function Xf(e,t,r){var n=Lf();try{return Ze(e)(t,r)}catch(e){if(Uf(n),e!==e+0&&"longjmp"!==e)throw e;If(1,0)}}function Qf(e,t,r,n,o){var i=Lf();try{return Ze(e)(t,r,n,o)}catch(e){if(Uf(i),e!==e+0&&"longjmp"!==e)throw e;If(1,0)}}function Gf(e,t,r,n){var o=Lf();try{return Ze(e)(t,r,n)}catch(e){if(Uf(o),e!==e+0&&"longjmp"!==e)throw e;If(1,0)}}function qf(e){var t=Lf();try{Ze(e)()}catch(e){if(Uf(t),e!==e+0&&"longjmp"!==e)throw e;If(1,0)}}function Vf(e,t,r){var n=Lf();try{Ze(e)(t,r)}catch(e){if(Uf(n),e!==e+0&&"longjmp"!==e)throw e;If(1,0)}}function Wf(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function zf(e){C(0==ke,'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=Hf(4*(r+1));V[n>>2]=oe(l);for(var i=1;i<r;i++)V[(n>>2)+i]=oe(e[i-1]);V[(n>>2)+r]=0;try{var a=t(r,n);return Jf(a,!0),a}catch(e){return et(e)}}function $f(){Nf(),fe()}function Yf(e){function r(){xf||(xf=!0,o.calledRun=!0,A||(Te(),De(),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),ep&&zf(e),xe()))}e=e||u,ke>0||($f(),Oe(),ke>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),r()}),1)):r(),pe()))}function Kf(){var e=_,t=O,r=!1;_=O=e=>{r=!0};try{Af(),["stdout","stderr"].forEach((function(e){var t=bt.analyzePath("/dev/"+e);if(t){var n=t.object.rdev,o=lt.ttys[n];o&&o.output&&o.output.length&&(r=!0)}}))}catch(e){}_=e,O=t,r&&T("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 Jf(e,t){if(F=e,we||Kf(),_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),O(r)}}else Pe();Zf(e)}function Zf(e){F=e,_e()||(o.onExit&&o.onExit(e),A=!0),d(e,new Wf(e))}if(o.dynCall_ji=qe("dynCall_ji"),o.dynCall_jij=qe("dynCall_jij"),o.dynCall_iiiijii=qe("dynCall_iiiijii"),o.dynCall_jiiji=qe("dynCall_jiiji"),o.dynCall_jj=qe("dynCall_jj"),o.dynCall_iiij=qe("dynCall_iiij"),o.dynCall_jiiiji=qe("dynCall_jiiiji"),o.dynCall_viiij=qe("dynCall_viiij"),o.dynCall_jiji=qe("dynCall_jiji"),o.dynCall_viijii=qe("dynCall_viijii"),o.dynCall_iiiiij=qe("dynCall_iiiiij"),o.dynCall_iiiiijj=qe("dynCall_iiiiijj"),o.dynCall_iiiiiijj=qe("dynCall_iiiiiijj"),Object.getOwnPropertyDescriptor(o,"intArrayFromString")||(o.intArrayFromString=()=>Le("'intArrayFromString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"intArrayToString")||(o.intArrayToString=()=>Le("'intArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ccall")||(o.ccall=()=>Le("'ccall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"cwrap")||(o.cwrap=()=>Le("'cwrap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setValue")||(o.setValue=()=>Le("'setValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.getValue=k,Object.getOwnPropertyDescriptor(o,"allocate")||(o.allocate=()=>Le("'allocate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UTF8ArrayToString")||(o.UTF8ArrayToString=()=>Le("'UTF8ArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.UTF8ToString=j,Object.getOwnPropertyDescriptor(o,"stringToUTF8Array")||(o.stringToUTF8Array=()=>Le("'stringToUTF8Array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToUTF8")||(o.stringToUTF8=()=>Le("'stringToUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF8")||(o.lengthBytesUTF8=()=>Le("'lengthBytesUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackTrace")||(o.stackTrace=()=>Le("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnPreRun")||(o.addOnPreRun=()=>Le("'addOnPreRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnInit")||(o.addOnInit=()=>Le("'addOnInit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnPreMain")||(o.addOnPreMain=()=>Le("'addOnPreMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnExit")||(o.addOnExit=()=>Le("'addOnExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnPostRun")||(o.addOnPostRun=()=>Le("'addOnPostRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeStringToMemory")||(o.writeStringToMemory=()=>Le("'writeStringToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeArrayToMemory")||(o.writeArrayToMemory=()=>Le("'writeArrayToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeAsciiToMemory")||(o.writeAsciiToMemory=()=>Le("'writeAsciiToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.addRunDependency=Ne,o.removeRunDependency=je,Object.getOwnPropertyDescriptor(o,"FS_createFolder")||(o.FS_createFolder=()=>Le("'FS_createFolder' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.FS_createPath=bt.createPath,o.FS_createDataFile=bt.createDataFile,o.FS_createPreloadedFile=bt.createPreloadedFile,o.FS_createLazyFile=bt.createLazyFile,Object.getOwnPropertyDescriptor(o,"FS_createLink")||(o.FS_createLink=()=>Le("'FS_createLink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.FS_createDevice=bt.createDevice,o.FS_unlink=bt.unlink,Object.getOwnPropertyDescriptor(o,"getLEB")||(o.getLEB=()=>Le("'getLEB' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getFunctionTables")||(o.getFunctionTables=()=>Le("'getFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"alignFunctionTables")||(o.alignFunctionTables=()=>Le("'alignFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerFunctions")||(o.registerFunctions=()=>Le("'registerFunctions' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addFunction")||(o.addFunction=()=>Le("'addFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"removeFunction")||(o.removeFunction=()=>Le("'removeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getFuncWrapper")||(o.getFuncWrapper=()=>Le("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"prettyPrint")||(o.prettyPrint=()=>Le("'prettyPrint' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"dynCall")||(o.dynCall=()=>Le("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getCompilerSetting")||(o.getCompilerSetting=()=>Le("'getCompilerSetting' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"print")||(o.print=()=>Le("'print' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"printErr")||(o.printErr=()=>Le("'printErr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getTempRet0")||(o.getTempRet0=()=>Le("'getTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setTempRet0")||(o.setTempRet0=()=>Le("'setTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"callMain")||(o.callMain=()=>Le("'callMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"abort")||(o.abort=()=>Le("'abort' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"keepRuntimeAlive")||(o.keepRuntimeAlive=()=>Le("'keepRuntimeAlive' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"zeroMemory")||(o.zeroMemory=()=>Le("'zeroMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToNewUTF8")||(o.stringToNewUTF8=()=>Le("'stringToNewUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscripten_realloc_buffer")||(o.emscripten_realloc_buffer=()=>Le("'emscripten_realloc_buffer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ENV")||(o.ENV=()=>Le("'ENV' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"withStackSave")||(o.withStackSave=()=>Le("'withStackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ERRNO_CODES")||(o.ERRNO_CODES=()=>Le("'ERRNO_CODES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ERRNO_MESSAGES")||(o.ERRNO_MESSAGES=()=>Le("'ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setErrNo")||(o.setErrNo=()=>Le("'setErrNo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetPton4")||(o.inetPton4=()=>Le("'inetPton4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetNtop4")||(o.inetNtop4=()=>Le("'inetNtop4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetPton6")||(o.inetPton6=()=>Le("'inetPton6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetNtop6")||(o.inetNtop6=()=>Le("'inetNtop6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readSockaddr")||(o.readSockaddr=()=>Le("'readSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeSockaddr")||(o.writeSockaddr=()=>Le("'writeSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"DNS")||(o.DNS=()=>Le("'DNS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getHostByName")||(o.getHostByName=()=>Le("'getHostByName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Protocols")||(o.Protocols=()=>Le("'Protocols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Sockets")||(o.Sockets=()=>Le("'Sockets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getRandomDevice")||(o.getRandomDevice=()=>Le("'getRandomDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"traverseStack")||(o.traverseStack=()=>Le("'traverseStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertFrameToPC")||(o.convertFrameToPC=()=>Le("'convertFrameToPC' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UNWIND_CACHE")||(o.UNWIND_CACHE=()=>Le("'UNWIND_CACHE' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"saveInUnwindCache")||(o.saveInUnwindCache=()=>Le("'saveInUnwindCache' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertPCtoSourceLocation")||(o.convertPCtoSourceLocation=()=>Le("'convertPCtoSourceLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readAsmConstArgsArray")||(o.readAsmConstArgsArray=()=>Le("'readAsmConstArgsArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readAsmConstArgs")||(o.readAsmConstArgs=()=>Le("'readAsmConstArgs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"mainThreadEM_ASM")||(o.mainThreadEM_ASM=()=>Le("'mainThreadEM_ASM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"jstoi_q")||(o.jstoi_q=()=>Le("'jstoi_q' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"jstoi_s")||(o.jstoi_s=()=>Le("'jstoi_s' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getExecutableName")||(o.getExecutableName=()=>Le("'getExecutableName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"listenOnce")||(o.listenOnce=()=>Le("'listenOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"autoResumeAudioContext")||(o.autoResumeAudioContext=()=>Le("'autoResumeAudioContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"dynCallLegacy")||(o.dynCallLegacy=()=>Le("'dynCallLegacy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getDynCaller")||(o.getDynCaller=()=>Le("'getDynCaller' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"dynCall")||(o.dynCall=()=>Le("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"callRuntimeCallbacks")||(o.callRuntimeCallbacks=()=>Le("'callRuntimeCallbacks' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"wasmTableMirror")||(o.wasmTableMirror=()=>Le("'wasmTableMirror' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setWasmTableEntry")||(o.setWasmTableEntry=()=>Le("'setWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getWasmTableEntry")||(o.getWasmTableEntry=()=>Le("'getWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"handleException")||(o.handleException=()=>Le("'handleException' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runtimeKeepalivePush")||(o.runtimeKeepalivePush=()=>Le("'runtimeKeepalivePush' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runtimeKeepalivePop")||(o.runtimeKeepalivePop=()=>Le("'runtimeKeepalivePop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"callUserCallback")||(o.callUserCallback=()=>Le("'callUserCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"maybeExit")||(o.maybeExit=()=>Le("'maybeExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"safeSetTimeout")||(o.safeSetTimeout=()=>Le("'safeSetTimeout' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"asmjsMangle")||(o.asmjsMangle=()=>Le("'asmjsMangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"asyncLoad")||(o.asyncLoad=()=>Le("'asyncLoad' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"alignMemory")||(o.alignMemory=()=>Le("'alignMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"mmapAlloc")||(o.mmapAlloc=()=>Le("'mmapAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"reallyNegative")||(o.reallyNegative=()=>Le("'reallyNegative' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"unSign")||(o.unSign=()=>Le("'unSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"reSign")||(o.reSign=()=>Le("'reSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"formatString")||(o.formatString=()=>Le("'formatString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PATH")||(o.PATH=()=>Le("'PATH' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PATH_FS")||(o.PATH_FS=()=>Le("'PATH_FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SYSCALLS")||(o.SYSCALLS=()=>Le("'SYSCALLS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getSocketFromFD")||(o.getSocketFromFD=()=>Le("'getSocketFromFD' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getSocketAddress")||(o.getSocketAddress=()=>Le("'getSocketAddress' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"JSEvents")||(o.JSEvents=()=>Le("'JSEvents' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerKeyEventCallback")||(o.registerKeyEventCallback=()=>Le("'registerKeyEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.specialHTMLTargets=Sl,Object.getOwnPropertyDescriptor(o,"maybeCStringToJsString")||(o.maybeCStringToJsString=()=>Le("'maybeCStringToJsString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"findEventTarget")||(o.findEventTarget=()=>Le("'findEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"findCanvasEventTarget")||(o.findCanvasEventTarget=()=>Le("'findCanvasEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getBoundingClientRect")||(o.getBoundingClientRect=()=>Le("'getBoundingClientRect' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillMouseEventData")||(o.fillMouseEventData=()=>Le("'fillMouseEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerMouseEventCallback")||(o.registerMouseEventCallback=()=>Le("'registerMouseEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerWheelEventCallback")||(o.registerWheelEventCallback=()=>Le("'registerWheelEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerUiEventCallback")||(o.registerUiEventCallback=()=>Le("'registerUiEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerFocusEventCallback")||(o.registerFocusEventCallback=()=>Le("'registerFocusEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillDeviceOrientationEventData")||(o.fillDeviceOrientationEventData=()=>Le("'fillDeviceOrientationEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerDeviceOrientationEventCallback")||(o.registerDeviceOrientationEventCallback=()=>Le("'registerDeviceOrientationEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillDeviceMotionEventData")||(o.fillDeviceMotionEventData=()=>Le("'fillDeviceMotionEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerDeviceMotionEventCallback")||(o.registerDeviceMotionEventCallback=()=>Le("'registerDeviceMotionEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"screenOrientation")||(o.screenOrientation=()=>Le("'screenOrientation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillOrientationChangeEventData")||(o.fillOrientationChangeEventData=()=>Le("'fillOrientationChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerOrientationChangeEventCallback")||(o.registerOrientationChangeEventCallback=()=>Le("'registerOrientationChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillFullscreenChangeEventData")||(o.fillFullscreenChangeEventData=()=>Le("'fillFullscreenChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerFullscreenChangeEventCallback")||(o.registerFullscreenChangeEventCallback=()=>Le("'registerFullscreenChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerRestoreOldStyle")||(o.registerRestoreOldStyle=()=>Le("'registerRestoreOldStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"hideEverythingExceptGivenElement")||(o.hideEverythingExceptGivenElement=()=>Le("'hideEverythingExceptGivenElement' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"restoreHiddenElements")||(o.restoreHiddenElements=()=>Le("'restoreHiddenElements' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setLetterbox")||(o.setLetterbox=()=>Le("'setLetterbox' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"currentFullscreenStrategy")||(o.currentFullscreenStrategy=()=>Le("'currentFullscreenStrategy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"restoreOldWindowedStyle")||(o.restoreOldWindowedStyle=()=>Le("'restoreOldWindowedStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"softFullscreenResizeWebGLRenderTarget")||(o.softFullscreenResizeWebGLRenderTarget=()=>Le("'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"doRequestFullscreen")||(o.doRequestFullscreen=()=>Le("'doRequestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillPointerlockChangeEventData")||(o.fillPointerlockChangeEventData=()=>Le("'fillPointerlockChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerPointerlockChangeEventCallback")||(o.registerPointerlockChangeEventCallback=()=>Le("'registerPointerlockChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerPointerlockErrorEventCallback")||(o.registerPointerlockErrorEventCallback=()=>Le("'registerPointerlockErrorEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"requestPointerLock")||(o.requestPointerLock=()=>Le("'requestPointerLock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillVisibilityChangeEventData")||(o.fillVisibilityChangeEventData=()=>Le("'fillVisibilityChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerVisibilityChangeEventCallback")||(o.registerVisibilityChangeEventCallback=()=>Le("'registerVisibilityChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerTouchEventCallback")||(o.registerTouchEventCallback=()=>Le("'registerTouchEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillGamepadEventData")||(o.fillGamepadEventData=()=>Le("'fillGamepadEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerGamepadEventCallback")||(o.registerGamepadEventCallback=()=>Le("'registerGamepadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerBeforeUnloadEventCallback")||(o.registerBeforeUnloadEventCallback=()=>Le("'registerBeforeUnloadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillBatteryEventData")||(o.fillBatteryEventData=()=>Le("'fillBatteryEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"battery")||(o.battery=()=>Le("'battery' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerBatteryEventCallback")||(o.registerBatteryEventCallback=()=>Le("'registerBatteryEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setCanvasElementSize")||(o.setCanvasElementSize=()=>Le("'setCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getCanvasElementSize")||(o.getCanvasElementSize=()=>Le("'getCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"demangle")||(o.demangle=()=>Le("'demangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"demangleAll")||(o.demangleAll=()=>Le("'demangleAll' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"jsStackTrace")||(o.jsStackTrace=()=>Le("'jsStackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackTrace")||(o.stackTrace=()=>Le("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getEnvStrings")||(o.getEnvStrings=()=>Le("'getEnvStrings' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"checkWasiClock")||(o.checkWasiClock=()=>Le("'checkWasiClock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToI64")||(o.writeI53ToI64=()=>Le("'writeI53ToI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToI64Clamped")||(o.writeI53ToI64Clamped=()=>Le("'writeI53ToI64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToI64Signaling")||(o.writeI53ToI64Signaling=()=>Le("'writeI53ToI64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToU64Clamped")||(o.writeI53ToU64Clamped=()=>Le("'writeI53ToU64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToU64Signaling")||(o.writeI53ToU64Signaling=()=>Le("'writeI53ToU64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readI53FromI64")||(o.readI53FromI64=()=>Le("'readI53FromI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readI53FromU64")||(o.readI53FromU64=()=>Le("'readI53FromU64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertI32PairToI53")||(o.convertI32PairToI53=()=>Le("'convertI32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertU32PairToI53")||(o.convertU32PairToI53=()=>Le("'convertU32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setImmediateWrapped")||(o.setImmediateWrapped=()=>Le("'setImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"clearImmediateWrapped")||(o.clearImmediateWrapped=()=>Le("'clearImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"polyfillSetImmediate")||(o.polyfillSetImmediate=()=>Le("'polyfillSetImmediate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"uncaughtExceptionCount")||(o.uncaughtExceptionCount=()=>Le("'uncaughtExceptionCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exceptionLast")||(o.exceptionLast=()=>Le("'exceptionLast' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exceptionCaught")||(o.exceptionCaught=()=>Le("'exceptionCaught' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ExceptionInfo")||(o.ExceptionInfo=()=>Le("'ExceptionInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"CatchInfo")||(o.CatchInfo=()=>Le("'CatchInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exception_addRef")||(o.exception_addRef=()=>Le("'exception_addRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exception_decRef")||(o.exception_decRef=()=>Le("'exception_decRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Browser")||(o.Browser=()=>Le("'Browser' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"funcWrappers")||(o.funcWrappers=()=>Le("'funcWrappers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getFuncWrapper")||(o.getFuncWrapper=()=>Le("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setMainLoop")||(o.setMainLoop=()=>Le("'setMainLoop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"wget")||(o.wget=()=>Le("'wget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"FS")||(o.FS=()=>Le("'FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"MEMFS")||(o.MEMFS=()=>Le("'MEMFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"TTY")||(o.TTY=()=>Le("'TTY' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PIPEFS")||(o.PIPEFS=()=>Le("'PIPEFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SOCKFS")||(o.SOCKFS=()=>Le("'SOCKFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"_setNetworkCallback")||(o._setNetworkCallback=()=>Le("'_setNetworkCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"tempFixedLengthArray")||(o.tempFixedLengthArray=()=>Le("'tempFixedLengthArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"miniTempWebGLFloatBuffers")||(o.miniTempWebGLFloatBuffers=()=>Le("'miniTempWebGLFloatBuffers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"heapObjectForWebGLType")||(o.heapObjectForWebGLType=()=>Le("'heapObjectForWebGLType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"heapAccessShiftForWebGLHeap")||(o.heapAccessShiftForWebGLHeap=()=>Le("'heapAccessShiftForWebGLHeap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GL")||(o.GL=()=>Le("'GL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGet")||(o.emscriptenWebGLGet=()=>Le("'emscriptenWebGLGet' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"computeUnpackAlignedImageSize")||(o.computeUnpackAlignedImageSize=()=>Le("'computeUnpackAlignedImageSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetTexPixelData")||(o.emscriptenWebGLGetTexPixelData=()=>Le("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetUniform")||(o.emscriptenWebGLGetUniform=()=>Le("'emscriptenWebGLGetUniform' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"webglGetUniformLocation")||(o.webglGetUniformLocation=()=>Le("'webglGetUniformLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"webglPrepareUniformLocationsBeforeFirstUse")||(o.webglPrepareUniformLocationsBeforeFirstUse=()=>Le("'webglPrepareUniformLocationsBeforeFirstUse' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"webglGetLeftBracePos")||(o.webglGetLeftBracePos=()=>Le("'webglGetLeftBracePos' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetVertexAttrib")||(o.emscriptenWebGLGetVertexAttrib=()=>Le("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeGLArray")||(o.writeGLArray=()=>Le("'writeGLArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"AL")||(o.AL=()=>Le("'AL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_unicode")||(o.SDL_unicode=()=>Le("'SDL_unicode' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_ttfContext")||(o.SDL_ttfContext=()=>Le("'SDL_ttfContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_audio")||(o.SDL_audio=()=>Le("'SDL_audio' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL")||(o.SDL=()=>Le("'SDL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_gfx")||(o.SDL_gfx=()=>Le("'SDL_gfx' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLUT")||(o.GLUT=()=>Le("'GLUT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"EGL")||(o.EGL=()=>Le("'EGL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLFW_Window")||(o.GLFW_Window=()=>Le("'GLFW_Window' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLFW")||(o.GLFW=()=>Le("'GLFW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLEW")||(o.GLEW=()=>Le("'GLEW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"IDBStore")||(o.IDBStore=()=>Le("'IDBStore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runAndAbortIfError")||(o.runAndAbortIfError=()=>Le("'runAndAbortIfError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetIndexed")||(o.emscriptenWebGLGetIndexed=()=>Le("'emscriptenWebGLGetIndexed' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"InternalError")||(o.InternalError=()=>Le("'InternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"BindingError")||(o.BindingError=()=>Le("'BindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UnboundTypeError")||(o.UnboundTypeError=()=>Le("'UnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PureVirtualError")||(o.PureVirtualError=()=>Le("'PureVirtualError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_embind")||(o.init_embind=()=>Le("'init_embind' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwInternalError")||(o.throwInternalError=()=>Le("'throwInternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwBindingError")||(o.throwBindingError=()=>Le("'throwBindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwUnboundTypeError")||(o.throwUnboundTypeError=()=>Le("'throwUnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ensureOverloadTable")||(o.ensureOverloadTable=()=>Le("'ensureOverloadTable' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exposePublicSymbol")||(o.exposePublicSymbol=()=>Le("'exposePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"replacePublicSymbol")||(o.replacePublicSymbol=()=>Le("'replacePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"extendError")||(o.extendError=()=>Le("'extendError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"createNamedFunction")||(o.createNamedFunction=()=>Le("'createNamedFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registeredInstances")||(o.registeredInstances=()=>Le("'registeredInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getBasestPointer")||(o.getBasestPointer=()=>Le("'getBasestPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerInheritedInstance")||(o.registerInheritedInstance=()=>Le("'registerInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"unregisterInheritedInstance")||(o.unregisterInheritedInstance=()=>Le("'unregisterInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getInheritedInstance")||(o.getInheritedInstance=()=>Le("'getInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getInheritedInstanceCount")||(o.getInheritedInstanceCount=()=>Le("'getInheritedInstanceCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getLiveInheritedInstances")||(o.getLiveInheritedInstances=()=>Le("'getLiveInheritedInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registeredTypes")||(o.registeredTypes=()=>Le("'registeredTypes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"awaitingDependencies")||(o.awaitingDependencies=()=>Le("'awaitingDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"typeDependencies")||(o.typeDependencies=()=>Le("'typeDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registeredPointers")||(o.registeredPointers=()=>Le("'registeredPointers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerType")||(o.registerType=()=>Le("'registerType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"whenDependentTypesAreResolved")||(o.whenDependentTypesAreResolved=()=>Le("'whenDependentTypesAreResolved' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"embind_charCodes")||(o.embind_charCodes=()=>Le("'embind_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"embind_init_charCodes")||(o.embind_init_charCodes=()=>Le("'embind_init_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readLatin1String")||(o.readLatin1String=()=>Le("'readLatin1String' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getTypeName")||(o.getTypeName=()=>Le("'getTypeName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"heap32VectorToArray")||(o.heap32VectorToArray=()=>Le("'heap32VectorToArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"requireRegisteredType")||(o.requireRegisteredType=()=>Le("'requireRegisteredType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getShiftFromSize")||(o.getShiftFromSize=()=>Le("'getShiftFromSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"integerReadValueFromPointer")||(o.integerReadValueFromPointer=()=>Le("'integerReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"enumReadValueFromPointer")||(o.enumReadValueFromPointer=()=>Le("'enumReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"floatReadValueFromPointer")||(o.floatReadValueFromPointer=()=>Le("'floatReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"simpleReadValueFromPointer")||(o.simpleReadValueFromPointer=()=>Le("'simpleReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runDestructors")||(o.runDestructors=()=>Le("'runDestructors' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"new_")||(o.new_=()=>Le("'new_' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"craftInvokerFunction")||(o.craftInvokerFunction=()=>Le("'craftInvokerFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"embind__requireFunction")||(o.embind__requireFunction=()=>Le("'embind__requireFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"tupleRegistrations")||(o.tupleRegistrations=()=>Le("'tupleRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"structRegistrations")||(o.structRegistrations=()=>Le("'structRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"genericPointerToWireType")||(o.genericPointerToWireType=()=>Le("'genericPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"constNoSmartPtrRawPointerToWireType")||(o.constNoSmartPtrRawPointerToWireType=()=>Le("'constNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"nonConstNoSmartPtrRawPointerToWireType")||(o.nonConstNoSmartPtrRawPointerToWireType=()=>Le("'nonConstNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_RegisteredPointer")||(o.init_RegisteredPointer=()=>Le("'init_RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer")||(o.RegisteredPointer=()=>Le("'RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_getPointee")||(o.RegisteredPointer_getPointee=()=>Le("'RegisteredPointer_getPointee' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_destructor")||(o.RegisteredPointer_destructor=()=>Le("'RegisteredPointer_destructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_deleteObject")||(o.RegisteredPointer_deleteObject=()=>Le("'RegisteredPointer_deleteObject' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_fromWireType")||(o.RegisteredPointer_fromWireType=()=>Le("'RegisteredPointer_fromWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runDestructor")||(o.runDestructor=()=>Le("'runDestructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"releaseClassHandle")||(o.releaseClassHandle=()=>Le("'releaseClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"finalizationRegistry")||(o.finalizationRegistry=()=>Le("'finalizationRegistry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"detachFinalizer_deps")||(o.detachFinalizer_deps=()=>Le("'detachFinalizer_deps' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"detachFinalizer")||(o.detachFinalizer=()=>Le("'detachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"attachFinalizer")||(o.attachFinalizer=()=>Le("'attachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"makeClassHandle")||(o.makeClassHandle=()=>Le("'makeClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_ClassHandle")||(o.init_ClassHandle=()=>Le("'init_ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle")||(o.ClassHandle=()=>Le("'ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_isAliasOf")||(o.ClassHandle_isAliasOf=()=>Le("'ClassHandle_isAliasOf' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwInstanceAlreadyDeleted")||(o.throwInstanceAlreadyDeleted=()=>Le("'throwInstanceAlreadyDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_clone")||(o.ClassHandle_clone=()=>Le("'ClassHandle_clone' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_delete")||(o.ClassHandle_delete=()=>Le("'ClassHandle_delete' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"deletionQueue")||(o.deletionQueue=()=>Le("'deletionQueue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_isDeleted")||(o.ClassHandle_isDeleted=()=>Le("'ClassHandle_isDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_deleteLater")||(o.ClassHandle_deleteLater=()=>Le("'ClassHandle_deleteLater' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"flushPendingDeletes")||(o.flushPendingDeletes=()=>Le("'flushPendingDeletes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"delayFunction")||(o.delayFunction=()=>Le("'delayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setDelayFunction")||(o.setDelayFunction=()=>Le("'setDelayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredClass")||(o.RegisteredClass=()=>Le("'RegisteredClass' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"shallowCopyInternalPointer")||(o.shallowCopyInternalPointer=()=>Le("'shallowCopyInternalPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"downcastPointer")||(o.downcastPointer=()=>Le("'downcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"upcastPointer")||(o.upcastPointer=()=>Le("'upcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"validateThis")||(o.validateThis=()=>Le("'validateThis' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"char_0")||(o.char_0=()=>Le("'char_0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"char_9")||(o.char_9=()=>Le("'char_9' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"makeLegalFunctionName")||(o.makeLegalFunctionName=()=>Le("'makeLegalFunctionName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_handle_array")||(o.emval_handle_array=()=>Le("'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=()=>Le("'emval_free_list' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_symbols")||(o.emval_symbols=()=>Le("'emval_symbols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_emval")||(o.init_emval=()=>Le("'init_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"count_emval_handles")||(o.count_emval_handles=()=>Le("'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=()=>Le("'get_first_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getStringOrSymbol")||(o.getStringOrSymbol=()=>Le("'getStringOrSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Emval")||(o.Emval=()=>Le("'Emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_newers")||(o.emval_newers=()=>Le("'emval_newers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"craftEmvalAllocator")||(o.craftEmvalAllocator=()=>Le("'craftEmvalAllocator' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_get_global")||(o.emval_get_global=()=>Le("'emval_get_global' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_methodCallers")||(o.emval_methodCallers=()=>Le("'emval_methodCallers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_registeredMethods")||(o.emval_registeredMethods=()=>Le("'emval_registeredMethods' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"warnOnce")||(o.warnOnce=()=>Le("'warnOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackSave")||(o.stackSave=()=>Le("'stackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackRestore")||(o.stackRestore=()=>Le("'stackRestore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackAlloc")||(o.stackAlloc=()=>Le("'stackAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"AsciiToString")||(o.AsciiToString=()=>Le("'AsciiToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToAscii")||(o.stringToAscii=()=>Le("'stringToAscii' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UTF16ToString")||(o.UTF16ToString=()=>Le("'UTF16ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToUTF16")||(o.stringToUTF16=()=>Le("'stringToUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF16")||(o.lengthBytesUTF16=()=>Le("'lengthBytesUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UTF32ToString")||(o.UTF32ToString=()=>Le("'UTF32ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToUTF32")||(o.stringToUTF32=()=>Le("'stringToUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF32")||(o.lengthBytesUTF32=()=>Le("'lengthBytesUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"allocateUTF8")||(o.allocateUTF8=()=>Le("'allocateUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"allocateUTF8OnStack")||(o.allocateUTF8OnStack=()=>Le("'allocateUTF8OnStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.writeStackCookie=fe,o.checkStackCookie=pe,Object.getOwnPropertyDescriptor(o,"ALLOC_NORMAL")||Object.defineProperty(o,"ALLOC_NORMAL",{configurable:!0,get:function(){Le("'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(){Le("'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Ae=function e(){xf||Yf(),xf||(Ae=e)},o.run=Yf,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();var ep=!0;return o.noInitialRun&&(ep=!1),Yf(),e.ready}),ct=r.p+"assets/core/cesdk.wasm",ut=r.p+"assets/core/cesdk.data",lt=(e,t)=>null!=t?[t,e.split("/").pop()].join(""):new URL(e,window.location.origin);var dt,ft,pt,gt,ht,mt,vt,bt,yt,Et=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},wt=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 _t{constructor(e,t,r){dt.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}),ft.set(this,void 0),pt.set(this,void 0),gt.set(this,void 0),ht.set(this,(()=>{const e=this.block.findByType(o._h.Camera)[0];if(!e)return;const{width:t,height:r}=wt(this,pt,"f"),n=wt(this,ft,"f").getValue(e,o.$R.Camera,"resolution");Z(n.width,t,1e-4)&&Z(n.height,r,1e-4)||wt(this,ft,"f").setValue(e,o.$R.Camera,"resolution",{width:t,height:r}),Z(wt(this,ft,"f").getValue(e,o.$R.Camera,"pixelRatio"),window.devicePixelRatio,1e-4)||wt(this,ft,"f").setValue(e,o.$R.Camera,"pixelRatio",window.devicePixelRatio)})),mt.set(this,void 0),Et(this,gt,e,"f"),Et(this,ft,new ee(e),"f"),Et(this,pt,t,"f"),this.block=new De(e),this.scene=new Re(e),this.variable=new Ae(e),wt(this,ft,"f").useInternalAPI((e=>{e.setPreUpdateCallback(wt(this,ht,"f"))})),wt(this,dt,"m",vt).call(this)}dispose(){wt(this,dt,"m",bt).call(this),wt(this,ft,"f").useInternalAPI((e=>{e.setPreUpdateCallback(null)})),Et(this,pt,null,"f"),Et(this,ft,null,"f"),this.block=null,this.scene=null,this.variable=null,wt(this,gt,"f").delete(),Et(this,gt,null,"f")}static async init(e,t){console.log("[CESDK] Revision 88a5e5cf6bf2f70f947da340dc254202b993eb6e"),t||(t=document.createElement("canvas"));const r=it.initWithDefaults(e);return new this(await((e,t)=>{const r=it.initWithDefaults(t),{core:n}=r,i=null!==(c=null===(s=null==(a=r)?void 0:a.callbacks)||void 0===s?void 0:s.log)&&void 0!==c?c:ze;var a,s,c;return new Promise(((t,a)=>{let s,c;return st({locateFile:(e,t)=>{if(e.endsWith(".wasm")){const e=lt(ct,n.baseURL).toString();return s=e,e}if(e.endsWith(".data")){const e=lt(ut,n.baseURL).toString();return c=e,e}return t+e},print:e=>{e&&"undefined"!==e&&i(e,o.in.Info)},printErr:e=>{e&&"undefined"!==e&&i(e,o.in.Error)},onRuntimeInitialized:()=>{i("Engine has been initialized.",o.in.Info)},logReadFiles:!1,printWithColors:!0}).then((n=>{let i="";"string"==typeof e?i=e:(n.specialHTMLTargets["!canvas"]=e,i="!canvas");const s=n.createEngine(i);if(s.isValid()){const e=s.value();!function(e,t){const r=new ee(e);function n(e,t){return r.execute("ubq/settings/set",[e,t])}n("ubq://license",t.license||""),n("ubq://basePath",t.baseURL),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])}))})),function(){const{imageMattingOnly:e,singlePageMode:r}=t.featureFlags||{};n("ubq://features/singlePageModeEnabled",r),n("cesdk://trackActivePage",!r),n("ubq://features/effectsEnabled",!0)}(),n("ubq://page/title/fontFileUri",t.page.title.fontFileUri),n("ubq://page/title/show",t.page.title.show),function(){if(void 0!==t.scene.maskSpotColor){const{rgbApproximation:e}=t.scene.maskSpotColor,n=(0,o.JY)(Object.assign(Object.assign({},e),{a:1}));r.execute("cesdk/setSpecialSpotColor",n)}}(),function(){var e;const n=null!==(e=t.extensions)&&void 0!==e?e:[];n.entries.forEach((e=>{r.execute("ubq/extension/register",`${n.baseURL+e}`)}))}(),function(){var r;const n=null!==(r=t.variables)&&void 0!==r?r:{};Object.entries(n).forEach((([t,r])=>{te(e.setVariableString(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)}))}))})(t,r),t,r)}}ft=new WeakMap,pt=new WeakMap,gt=new WeakMap,ht=new WeakMap,mt=new WeakMap,dt=new WeakSet,vt=function(e=!0){if(wt(this,mt,"f"))return;const t=()=>{wt(this,dt,"m",yt).call(this,e),Et(this,mt,requestAnimationFrame(t),"f")};Et(this,mt,requestAnimationFrame(t),"f")},bt=function(){wt(this,mt,"f")&&(cancelAnimationFrame(wt(this,mt,"f")),Et(this,mt,0,"f"))},yt=function(e=!0){e&&1===this.block.findByType(o._h.Scene).length&&wt(this,ft,"f").execute("ubq/render",{displayWidth:wt(this,pt,"f").width,displayHeight:wt(this,pt,"f").height}),wt(this,gt,"f").update()},Object.defineProperty(_t,"PositionMode",{enumerable:!0,configurable:!0,writable:!0,value:Ee}),Object.defineProperty(_t,"SizeMode",{enumerable:!0,configurable:!0,writable:!0,value:we}),Object.defineProperty(_t,"PropertyType",{enumerable:!0,configurable:!0,writable:!0,value:_e})}},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})()}));
|
|
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,d=s.type,f=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=this;if("object"===d(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 f=c.format[n].apply(null,o?e:e.slice(0,-1));r._rgb=l(f),3===r._rgb.length&&r._rgb.push(1)};f.prototype.toString=function(){return"function"==d(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var p=f,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,R=s.unpack,k=Math.round,F=function(){for(var e,t=[],r=arguments.length;r--;)t[r]=arguments[r];var n,o,i,a=(t=R(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],d=c<.5?c*(1+s):c+s-c*s,f=2*c-d,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]=f+6*(d-f)*u[g]:2*u[g]<1?l[g]=d:3*u[g]<2?l[g]=f+(d-f)*(2/3-u[g])*6:l[g]=f;n=(e=[k(255*l[0]),k(255*l[1]),k(255*l[2])])[0],o=e[1],i=e[2]}return t.length>3?[n,o,i,t[3]]:[n,o,i,1]},A=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,C=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,I=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,N=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,j=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,L=/^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(A)){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(C)){for(var o=t.slice(1,5),i=0;i<4;i++)o[i]=+o[i];return o}if(t=e.match(I)){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(N)){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(j)){var d=t.slice(1,4);d[1]*=.01,d[2]*=.01;var f=F(d);return f[3]=1,f}if(t=e.match(L)){var p=t.slice(1,4);p[1]*=.01,p[2]*=.01;var g=F(p);return g[3]=+t[4],g}};H.test=function(e){return A.test(e)||C.test(e)||I.test(e)||N.test(e)||j.test(e)||L.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,W=s.unpack,z=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,d=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,d]}(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,d=(a=q(a,"hcg"))[0],f=a[1],p=a[2];p*=255;var g=255*f;if(0===f)c=u=l=p;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var h=V(d/=60),m=d-h,v=p*(1-f),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=W(e,"hcg"),"array"===z(e)&&3===e.length)return"hcg"}});var $=s.unpack,Y=s.last,K=Math.round,J=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}},Z=/^#?([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(Z)){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 J(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,de=s.PITHIRD,fe=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*fe(le*i)/fe(de-le*i))/3)):i<2/3?o=1-((r=(1-a)/3)+(n=(1+a*fe(le*(i-=1/3))/fe(de-le*i))/3)):r=1-((n=(1-a)/3)+(o=(1+a*fe(le*(i-=2/3))/fe(de-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=F,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,d=(a=Ee(a,"hsv"))[0],f=a[1],p=a[2];if(p*=255,0===f)c=u=l=p;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var g=we(d/=60),h=d-g,m=p*(1-f),v=p*(1-f*h),b=p*(1-f*(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,Re=.12841855,ke=.008856452,Fe=s.unpack,Ae=Math.pow,Ce=function(e){return(e/=255)<=.04045?e/12.92:Ae((e+.055)/1.055,2.4)},Ie=function(e){return e>ke?Ae(e,1/3):e/Re+Se},Ne=function(e,t,r){return e=Ce(e),t=Ce(t),r=Ce(r),[Ie((.4124564*e+.3575761*t+.1804375*r)/De),Ie((.2126729*e+.7151522*t+.072175*r)/Pe),Ie((.0193339*e+.119192*t+.9503041*r)/xe)]},je=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=Fe(e,"rgb"),n=r[0],o=r[1],i=r[2],a=Ne(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])]},Le=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:Re*(e-Se)},Xe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r,n,o,i=(e=Le(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 je(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,We=Math.sqrt,ze=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=We(o*o+i*i),s=(ze(i,o)*Ve+360)%360;return 0===$e(1e4*a)&&(s=Number.NaN),[n,a,s]},Ke=s.unpack,Je=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=je(n,o,i),s=a[0],c=a[1],u=a[2];return Ye(s,c,u)},Ze=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=Ze(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 Je(this._rgb)},p.prototype.hcl=function(){return Je(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=J(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 dt=s.unpack,ft=s.type,pt=s.type;p.prototype.num=function(){return function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var r=dt(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"==ft(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 Rt=Math.sqrt,kt=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(Rt(kt(o,2)*(1-r)+kt(c,2)*r),Rt(kt(i,2)*(1-r)+kt(u,2)*r),Rt(kt(a,2)*(1-r)+kt(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 Ft=function(e,t,r,n){var o,i,a,s,c,u,l,d,f,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],f=o[2],u=(i=s)[0],d=i[1],g=i[2]),isNaN(c)||isNaN(u)?isNaN(c)?isNaN(u)?m=Number.NaN:(m=u,1!=f&&0!=f||"hsv"==n||(h=d)):(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*(d-l)),new p([m,h,f+r*(g-f)],n)},At=function(e,t,r){return Ft(e,t,r,"lch")};Pt.lch=At,Pt.hcl=At;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 Ft(e,t,r,"hcg")};Pt.hsi=function(e,t,r){return Ft(e,t,r,"hsi")};Pt.hsl=function(e,t,r){return Ft(e,t,r,"hsl")};Pt.hsv=function(e,t,r){return Ft(e,t,r,"hsv")};var Ct=s.clip_rgb,It=Math.pow,Nt=Math.sqrt,jt=Math.PI,Lt=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]+=It(s[0],2)*a,n[1]+=It(s[1],2)*a,n[2]+=It(s[2],2)*a,n[3]+=s[3]*a}return n[0]=Nt(n[0]),n[1]=Nt(n[1]),n[2]=Nt(n[2]),n[3]>.9999999&&(n[3]=1),new p(Ct(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,d=1,f=!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):d!==l?(e-l)/(d-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 f=Math.floor(1e4*u);if(g&&p[f])o=p[f];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[f]=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],d=e[e.length-1],i=[];var t=c.length;if(e.length===t&&l!==d)for(var r=0,n=Array.from(e);r<n.length;r+=1){var a=n[r];i.push((a-l)/(d-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)})),f=e.map((function(e){return(e-l)/(d-l)}));f.every((function(e,t){return u[t]===e}))||(y=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=f[t+1];)t++;var r=(e-f[t])/(f[t+1]-f[t]);return u[t]+r*(u[t+1]-u[t])})}}return o=[l,d],_},_.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),f=e,w(),b=f?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,d=s.length,f=1<=d;f?l<d:l>d;f?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},Wt=function(e,t,r){if(!Wt[r])throw new Error("unknown blend mode "+r);return Wt[r](e,t)},zt=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}};Wt.normal=zt($t((function(e){return e}))),Wt.multiply=zt($t((function(e,t){return e*t/255}))),Wt.screen=zt($t((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),Wt.overlay=zt($t((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),Wt.darken=zt($t((function(e,t){return e>t?t:e}))),Wt.lighten=zt($t((function(e,t){return e>t?e:t}))),Wt.dodge=zt($t((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),Wt.burn=zt($t((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var Yt=Wt,Kt=s.type,Jt=s.clip_rgb,Zt=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 d=1;d<r;d++)s.push(ar(10,u+d/r*(l-u)));s.push(o)}else if("q"===t.substr(0,1)){s.push(n);for(var f=1;f<r;f++){var p=(a.length-1)*f/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 R=cr(_[M]-P);R<x&&(x=R,S=M),y[S]++,b[D]=S}for(var k=new Array(r),F=0;F<r;F++)k[F]=null;for(var A=0;A<v;A++)null===k[m=b[A]]?k[m]=a[A]:k[m]+=a[A];for(var C=0;C<r;C++)k[C]*=1/y[C];E=!1;for(var I=0;I<r;I++)if(k[I]!==_[I]){E=!0;break}_=k,++w>200&&(E=!1)}for(var N={},j=0;j<r;j++)N[j]=[];for(var L=0;L<v;L++)N[m=b[L]].push(a[L]);for(var U=[],H=0;H<r;H++)U.push(N[H][0]),U.push(N[H][N[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},dr={analyze:ur,limits:lr},fr=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 d=a[l]/180*jt;c+=Lt(d)*r[0],u+=Ut(d)*r[0]}var f=i.alpha()*r[0];e.forEach((function(e,n){var o=e.get(t);f+=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*jt;c+=Lt(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])/jt*180;h<0;)h+=360;for(;h>=360;)h-=360;a[g]=h}else a[g]=a[g]/s[g];return f/=n,new p(a,t).alpha(f>.99999?1:f,!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=Zt*((e+120)/360+t*s),u=er(o[0]+i*s,n),l=(0!==a?r[0]+s*a:r)*u*(1-u)/2,d=rr(c),f=tr(c);return h(Jt([255*(u+l*(-.14861*d+1.78277*f)),255*(u+l*(-.29227*d-.90649*f)),255*(u+l*(1.97294*d)),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=dr.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],d=c[2],f=fr(a*a+s*s),g=fr(l*l+d*d),h=i<16?.511:.040975*i/(1+.01765*i),m=.0638*f/(1+.0131*f)+.638,v=f<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=f*f*f*f,E=fr(y/(y+1900)),w=m*(E*b+1-E),_=f-g,O=a-l,T=s-d,D=(i-u)/(r*h),P=_/(n*m);return fr(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=dr.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),d=!r&&!l&&a(e),f=!r&&!l&&!d&&c(e),p=r||l||d||f,g=p?n(e.length,String):[],h=g.length;for(var m in e)!t&&!u.call(e,m)||p&&("length"==m||d&&("offset"==m||"parent"==m)||f&&("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,d=u.hasOwnProperty,f=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?f: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,d,f){t!==r&&i(r,(function(i,c){if(f||(f=new n),s(i))a(t,r,c,l,e,d,f);else{var p=d?d(u(t,c),i,c+"",t,r,f):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),d=r(9571),f=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&&d(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(_)&&!f(_)||(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 d(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 f(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:d,hwb2hsl:function(e){return t(d(e))},hwb2hsv:function(e){return n(d(e))},hwb2cmyk:function(e){return i(d(e))},hwb2keyword:function(e){return a(d(e))},cmyk2rgb:f,cmyk2hsl:function(e){return t(f(e))},cmyk2hsv:function(e){return n(f(e))},cmyk2hwb:function(e){return o(f(e))},cmyk2keyword:function(e){return a(f(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:()=>A,X5:()=>w,HY:()=>k,Kc:()=>F}),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",e.PendingState="ubq/designblocks/PendingState",e.ErrorState="ubq/designblocks/ErrorState"}(u||(u={}));const l="ubq/designblocks/CommonDesignBlockProps";var d,f,p,g,h,m,v;!function(e){e.Transform="ubq/editMode/transform",e.Crop="ubq/editMode/crop",e.Text="ubq/editMode/text"}(d||(d={})),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"}(f||(f={})),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,R,k,F;function A(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"}(R||(R={})),function(e){e.Png="image/png",e.Jpeg="image/jpeg",e.Tga="image/x-tga",e.Binary="application/octet-stream",e.Zip="application/zip"}(k||(k={})),function(e){e[e.Free=0]="Free",e[e.VerticalStack=1]="VerticalStack",e[e.HorizontalStack=2]="HorizontalStack"}(F||(F={}))},9331:(e,t,r)=>{"use strict";r.d(t,{default:()=>_t});var n,o=r(6954);function i(e){return(i="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 a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(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){a(e,t,r[t])}))}return e}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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 l(e,t,r){return t&&u(e.prototype,t),r&&u(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 f(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?d(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(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&&g(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);var m={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)}},v=new(function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(this,e),this.init(t,r)}return l(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||m,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,s({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),b=function(){function e(){c(this,e),this.observers={}}return l(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 y(){var e,t,r=new Promise((function(r,n){e=r,t=n}));return r.resolve=e,r.reject=t,r}function E(e){return null==e?"":""+e}function w(e,t,r){e.forEach((function(e){t[e]&&(r[e]=t[e])}))}function _(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 O(e,t,r){var n=_(e,t,Object);n.obj[n.k]=r}function T(e,t){var r=_(e,t),n=r.obj,o=r.k;if(n)return n[o]}function D(e,t,r){var n=T(e,r);return void 0!==n?n:T(t,r)}function P(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]):P(e[n],t[n],r):e[n]=t[n]);return e}function x(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var S={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function M(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return S[e]})):e}var R="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,k=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return c(this,t),r=f(this,p(t).call(this)),R&&b.call(d(r)),r.data=e||{},r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r}return h(t,e),l(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(".")),T(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),O(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 c=T(this.data,a)||{};n?P(c,r,o):c=s({},c,r),O(this.data,a,c),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?s({},{},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}(b),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}},A={},C=function(e){function t(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(this,t),r=f(this,p(t).call(this)),R&&b.call(d(r)),w(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,d(r)),r.options=n,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=v.create("translator"),r}return h(t,e),l(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"!==i(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,a=this.extractFromKey(e[e.length-1],t),c=a.key,u=a.namespaces,l=u[u.length-1],d=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(f){var p=t.nsSeparator||this.options.nsSeparator;return l+p+c}return c}var g=this.resolve(e,t),h=g&&g.res,m=g&&g.usedKey||c,v=g&&g.exactUsedKey||c,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(c," (").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,s({},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 R=this.pluralResolver.getSuffix(d,t.count);h=t["defaultValue".concat(R)]}h||(h=t.defaultValue)}this.isValidLookup(h)||(M=!0,h=c);var k=t.defaultValue&&t.defaultValue!==h&&this.options.updateMissing;if(M||S||k){if(this.logger.log(k?"updateKey":"missingKey",d,l,c,k?t.defaultValue:h),o){var F=this.resolve(c,s({},t,{keySeparator:!1}));F&&F.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 A=[],C=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&C&&C[0])for(var I=0;I<C.length;I++)A.push(C[I]);else"all"===this.options.saveMissingTo?A=this.languageUtils.toResolveHierarchy(t.lng||this.language):A.push(t.lng||this.language);var N=function(e,r){n.options.missingKeyHandler?n.options.missingKeyHandler(e,l,r,k?t.defaultValue:h,k,t):n.backendConnector&&n.backendConnector.saveMissing&&n.backendConnector.saveMissing(e,l,r,k?t.defaultValue:h,k,t),n.emit("missingKey",e,l,r,h)};if(this.options.saveMissing){var j=void 0!==t.count&&"string"!=typeof t.count;this.options.saveMissingPlurals&&j?A.forEach((function(e){n.pluralResolver.getPluralFormsOfKey(e,c).forEach((function(t){return N([e],t)}))})):N(A,c)}}h=this.extendTranslation(h,e,t,g,r),M&&h===c&&this.options.appendNamespaceToMissingKey&&(h="".concat(l,":").concat(c)),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(s({},r,{interpolation:s({},this.options.interpolation,r.interpolation)}));var a,c=r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(c){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=s({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,r.lng||this.language,r),c){var d=e.match(this.interpolator.nestingRegexp);a<(d&&d.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 f=r.postProcess||this.options.postProcess,p="string"==typeof f?[f]:f;return null!=e&&p&&p.length&&!1!==r.applyPostProcessor&&(e=F.handle(p,e,t,this.options&&this.options.postProcessPassResolved?s({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 d=void 0!==s.count&&"string"!=typeof s.count,f=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,!A["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(A["".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):(d&&(i=a.pluralResolver.getSuffix(r,s.count)),d&&f&&p.push(l+i),f&&p.push(l+="".concat(a.options.contextSeparator).concat(s.context)),d&&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}(b);function I(e){return e.charAt(0).toUpperCase()+e.slice(1)}var N=function(){function e(t){c(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=v.create("languageUtils")}return l(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]=I(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]=I(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=I(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}(),j=[{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}],L={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 U(){var e={};return j.forEach((function(t){t.lngs.forEach((function(r){e[r]={numbers:t.nr,plurals:L[t.fc]}}))})),e}var H,B,X,Q,G,q,V=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(this,e),this.languageUtils=t,this.options=r,this.logger=v.create("pluralResolver"),this.rules=U()}return l(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}(),W=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,e),this.logger=v.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return l(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:M,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?x(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?x(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?x(t.nestingPrefix):t.nestingPrefixEscaped||x("$t("),this.nestingSuffix=t.nestingSuffix?x(t.nestingSuffix):t.nestingSuffixEscaped||x(")"),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=D(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(D(t,c,a),u,r,n)};this.resetRegExp();var d=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,f=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 d){var r=d(e,o,n);i="string"==typeof r?r:""}else{if(f){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=E(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=s({},i);function c(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=s({},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 d=r[1].split(this.formatSeparator).map((function(e){return e.trim()}));r[1]=d.shift(),u=d,l=!0}if((n=t(c.call(this,r[1].trim(),a),a))&&r[0]===e&&"string"!=typeof n)return n;"string"!=typeof n&&(n=E(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}(),z=function(e){function t(e,r,n){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return c(this,t),o=f(this,p(t).call(this)),R&&b.call(d(o)),o.backend=e,o.store=r,o.services=n,o.languageUtils=n.languageUtils,o.options=i,o.logger=v.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(n,i.backend,i),o}return h(t,e),l(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=_(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,s({},i,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,r,n))}}]),t}(b);function $(){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"===i(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===i(e[2])||"object"===i(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 Y(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 K(){}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(c(this,t),e=f(this,p(t).call(this)),R&&b.call(d(e)),e.options=Y(r),e.services={},e.logger=v,e.modules={external:[]},n&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,n),f(e,d(e));setTimeout((function(){e.init(r,n)}),0)}return e}return h(t,e),l(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=s({},$(),this.options,Y(t)),this.format=this.options.interpolation.format,r||(r=K),!this.options.isClone){this.modules.logger?v.init(n(this.modules.logger),this.options):v.init(null,this.options);var o=new N(this.options);this.store=new k(this.options.resources,this.options);var i=this.services;i.logger=v,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new V(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new W(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new z(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 c=["addResource","addResources","addResourceBundle","removeResourceBundle"];c.forEach((function(t){e[t]=function(){var r;return(r=e.store)[t].apply(r,arguments),e}}));var u=y(),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]:K,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=y();return e||(e=this.languages),t||(t=this.options.ns),r||(r=K),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=y();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"!==i(n)){for(var a=arguments.length,c=new Array(a>2?a-2:0),u=2;u<a;u++)c[u-2]=arguments[u];o=r.options.overloadTranslationOptionHandler([t,n].concat(c))}else o=s({},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=y();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=y();"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]:K,o=s({},this.options,r,{isClone:!0}),i=new t(o),a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.services=s({},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}(b)),function(e){e.Background="background",e.Active="active",e.Accent="accent"}(H||(H={})),function(e){e.Red="Red",e.Orange="Orange",e.Yellow="Yellow",e.Green="Green",e.Aqua="Aqua",e.Blue="Blue",e.Purple="Purple",e.Magenta="Magenta"}(B||(B={})),function(e){e.Hue="hue",e.Saturation="saturation",e.PerceivedBrightness="perceivedBrightness"}(X||(X={})),B.Red,B.Orange,B.Yellow,B.Green,B.Aqua,B.Blue,B.Purple,B.Magenta,(G=Q||(Q={})).Pixel="px",G.Millimeter="mm",G.Inch="in",Q.Pixel,o.X5.Pixel,Q.Millimeter,o.X5.Millimeter,Q.Inch,o.X5.Inch,o.X5.Pixel,Q.Pixel,o.X5.Millimeter,Q.Millimeter,o.X5.Inch,Q.Inch,function(e){e.Advanced="advanced",e.Default="default"}(q||(q={}));const J=(e,t)=>({x:e.x*t,y:e.y*t});function Z(e,t,r=Number.EPSILON){return Math.abs(e-t)<r}class ee{constructor(e){Object.defineProperty(this,"ubq",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.ubq=e}useInternalAPI(e){const t=this.ubq.getInternalAPI();try{return e(t)}finally{t.delete()}}async createElement(e,t,r){const n=await this.execute("ubq/designblocks/create",e);this.execute("ubq/designblocks/addToParent",[n,t]);const o=te(this.ubq.getLastFrameWidth(t)),i=te(this.ubq.getLastFrameHeight(t)),{position:a,size:s}=function(e,t,r=8/13){const n=((e,t)=>{const r=e.x/e.y,n=t.x/t.y;return J(t,r>n?e.y/t.y:e.x/t.x)})(e,t),o=J(n,r);return{position:{x:.5*(e.x-o.x),y:.5*(e.y-o.y)},size:o}}({x:o,y:i},{x:r.width,y:r.height},8/13);this.execute("ubq/layout/setAbsoluteSize",{id:n,size:{width:s.x,height:s.y}}),s.x||this.execute("ubq/layout/setAutoWidth",{id:n}),s.y||this.execute("ubq/layout/setAutoHeight",{id:n});const c=function(e={x:50,y:50}){return{x:Math.random()*e.x,y:Math.random()*e.y}}({x:.08*o,y:.08*i});return await this.execute("ubq/layout/setAbsolutePosition",{id:n,position:{left:a.x+c.x,top:a.y+c.y}}),n}setValue(e,t,r,n){return this.useInternalAPI((o=>te(o.setValue(e,t,r,n))))}getValue(e,t,r){return this.useInternalAPI((n=>te(n.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.useInternalAPI((n=>n.ubqExecute(e,t,(e=>{const t=te(e);r(t)})))).delete()}))}}function te(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 re=(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 ne 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 oe(e){return"object"==typeof e&&null!=e}function ie(e){return"string"==typeof e?JSON.stringify(e):""+e}function ae(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: `"+ie(n)+"`"}=e;return{value:n,type:a,refinement:s,key:o[o.length-1],path:o,branch:i,...e,message:c}}function*se(e,t,r,n){var o;oe(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const o of e){const e=ae(o,t,r,n);e&&(yield e)}}function*ce(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&&oe(t.schema)&&oe(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=ce(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):oe(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 ue{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)=>se(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>se(o(e,t),t,this,e):()=>[]}assert(e){return function(e,t){const r=le(e,t);if(r[0])throw r[0]}(e,this)}create(e){return function(e,t){const r=le(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}(e,this)}is(e){return function(e,t){return!le(e,t)[0]}(e,this)}mask(e){return function(e,t){const r=le(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}(e,this)}validate(e,t={}){return le(e,this,t)}}function le(e,t,r={}){const n=ce(e,t,r),o=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(n);return o[0]?[new ne(o[0],(function*(){for(const e of n)e[0]&&(yield e[0])})),void 0]:[void 0,o[1]]}function de(e,t){return new ue({type:e,schema:null,validator:t})}function fe(){return de("boolean",(e=>"boolean"==typeof e))}function pe(){return de("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||"Expected an integer, but received: "+ie(e)))}function ge(){return de("number",(e=>"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+ie(e)))}function he(){return de("string",(e=>"string"==typeof e||"Expected a string, but received: "+ie(e)))}function me(e,t,r={}){const{exclusive:n}=r;return function(e,t,r){return new ue({...e,*refiner(n,o){yield*e.refiner(n,o);const i=se(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 ve(e,t,r){const[n]=le(t,r);if(n)throw n.message=`Error in argument '${e}': ${n.message}`,n}var be,ye,Ee,we,_e,Oe=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},Te=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)};!function(e){e.Absolute="Absolute",e.Percent="Percent",e.Undefined="Auto"}(Ee||(Ee={})),function(e){e.Absolute="Absolute",e.Percent="Percent",e.Auto="Auto"}(we||(we={})),function(e){e.Bool="Bool",e.Int="Int",e.Float="Float",e.String="String",e.Color="Color",e.Enum="Enum",e.Struct="Struct"}(_e||(_e={}));class De{constructor(e){be.set(this,void 0),ye.set(this,void 0),Oe(this,be,e,"f"),Oe(this,ye,new ee(e),"f")}async export(e,t=o.HY.Png){return ve("handle",e,ge()),ve("mimeType",t,function(){const e=/image\/(png|jpeg|x-tga)|application\/octet-stream/;return de("MimeType",(t=>!("string"!=typeof t||!e.test(t))||{message:`expected one of "image/png", "image/jpeg", "image/x-tga", or "application/octet-stream", but got "${t}"`}))}()),new Promise(((r,n)=>{Te(this,be,"f").exportToBuffer(e,t,(e=>{"error"in e?n(e.error):r(new Blob([e],{type:t}))}),{jpegQuality:.9,pngCompressionLevel:5,useTargetSize:!1,targetWidth:0,targetHeight:0})}))}async loadFromString(e){return ve("content",e,he()),new Promise((t=>{Te(this,be,"f").loadBlocksFromString(e,(e=>{const r=te(e);t(re(r))}))}))}async saveToString(e){return ve("blocks",e,function(e){return new ue({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||"Expected an array value, but received: "+ie(e)})}(ge())),new Promise((t=>{Te(this,be,"f").saveBlocksToString(e,(e=>{const r=te(e);t(r)}))}))}create(e){return ve("type",e,he()),te(Te(this,be,"f").create(e))}getType(e){return ve("id",e,pe()),te(Te(this,be,"f").getType(e))}setSelected(e,t){return ve("id",e,pe()),ve("selected",t,fe()),te(Te(this,be,"f").setSelected(e,t))}isSelected(e){return ve("id",e,pe()),te(Te(this,be,"f").isSelected(e))}findAllSelected(){return re(Te(this,be,"f").findAllSelected())}setName(e,t){return ve("id",e,pe()),ve("name",t,he()),Te(this,ye,"f").setValue(e,o.uY,"name",t)}getName(e){return ve("id",e,pe()),Te(this,ye,"f").getValue(e,o.uY,"name")}findByName(e){ve("name",e,he());const t=Te(this,be,"f").findByName(e);return re(t)}findByType(e){ve("type",e,he());const t=te(Te(this,be,"f").findByType(e));return re(t)}findAll(){return re(Te(this,be,"f").findAll())}isVisible(e){return ve("id",e,pe()),te(Te(this,be,"f").isVisible(e))}setVisible(e,t){return ve("id",e,pe()),ve("visible",t,fe()),te(Te(this,be,"f").setVisible(e,t))}getPositionX(e){return ve("id",e,pe()),te(Te(this,be,"f").getPositionX(e))}getPositionXMode(e){return ve("id",e,pe()),te(Te(this,be,"f").getPositionXMode(e))}getPositionY(e){return ve("id",e,pe()),te(Te(this,be,"f").getPositionY(e))}getPositionYMode(e){return ve("id",e,pe()),te(Te(this,be,"f").getPositionYMode(e))}setPositionX(e,t){return ve("id",e,pe()),ve("value",t,ge()),te(Te(this,be,"f").setPositionX(e,t))}setPositionXMode(e,t){return ve("id",e,pe()),te(Te(this,be,"f").setPositionXMode(e,t))}setPositionY(e,t){return ve("id",e,pe()),ve("value",t,ge()),te(Te(this,be,"f").setPositionY(e,t))}setPositionYMode(e,t){return ve("id",e,pe()),te(Te(this,be,"f").setPositionYMode(e,t))}getRotation(e){return ve("id",e,pe()),te(Te(this,be,"f").getRotation(e))}setRotation(e,t){return ve("id",e,pe()),ve("radians",t,ge()),te(Te(this,be,"f").setRotation(e,t))}getFlipHorizontal(e){return ve("id",e,pe()),te(Te(this,be,"f").getFlip(e)).horizontal}getFlipVertical(e){return ve("id",e,pe()),te(Te(this,be,"f").getFlip(e)).vertical}setFlipHorizontal(e,t){return ve("id",e,pe()),ve("flip",t,fe()),te(Te(this,be,"f").setFlipHorizontal(e,t))}setFlipVertical(e,t){return ve("id",e,pe()),ve("flip",t,fe()),te(Te(this,be,"f").setFlipVertical(e,t))}getWidth(e){return ve("id",e,pe()),te(Te(this,be,"f").getWidth(e))}getWidthMode(e){return ve("id",e,pe()),te(Te(this,be,"f").getWidthMode(e))}getHeight(e){return ve("id",e,pe()),te(Te(this,be,"f").getHeight(e))}getHeightMode(e){return ve("id",e,pe()),te(Te(this,be,"f").getHeightMode(e))}setWidth(e,t){return ve("id",e,pe()),ve("value",t,ge()),te(Te(this,be,"f").setWidth(e,t))}setWidthMode(e,t){return ve("id",e,pe()),te(Te(this,be,"f").setWidthMode(e,t))}setHeight(e,t){return ve("id",e,pe()),ve("value",t,ge()),te(Te(this,be,"f").setHeight(e,t))}setHeightMode(e,t){return ve("id",e,pe()),te(Te(this,be,"f").setHeightMode(e,t))}getFrameWidth(e){return ve("id",e,pe()),te(Te(this,be,"f").getLastFrameWidth(e))}getFrameHeight(e){return ve("id",e,pe()),te(Te(this,be,"f").getLastFrameHeight(e))}duplicate(e){return ve("id",e,pe()),te(Te(this,be,"f").duplicate(e))}destroy(e){return ve("id",e,pe()),te(Te(this,be,"f").destroy(e))}getParent(e){return ve("id",e,pe()),te(Te(this,be,"f").getParent(e))}getChildren(e){ve("id",e,pe());const t=te(Te(this,be,"f").getChildren(e));return re(t)}insertChild(e,t,r){return ve("parent",e,ge()),ve("child",t,ge()),ve("index",r,me(ge(),0)),te(Te(this,be,"f").insertChild(e,t,r))}appendChild(e,t){return ve("parent",e,ge()),ve("child",t,ge()),te(Te(this,be,"f").appendChild(e,t))}referencesAnyVariables(e){return ve("id",e,pe()),te(Te(this,be,"f").referencesAnyVariables(e))}getGlobalBoundingBoxX(e){return ve("id",e,pe()),te(Te(this,be,"f").getGlobalBoundingBoxX(e))}getGlobalBoundingBoxY(e){return ve("id",e,pe()),te(Te(this,be,"f").getGlobalBoundingBoxY(e))}getGlobalBoundingBoxWidth(e){return ve("id",e,pe()),te(Te(this,be,"f").getGlobalBoundingBoxWidth(e))}getGlobalBoundingBoxHeight(e){return ve("id",e,pe()),te(Te(this,be,"f").getGlobalBoundingBoxHeight(e))}findAllProperties(e){return ve("id",e,pe()),re(te(Te(this,be,"f").findAllProperties(e)))}getPropertyType(e){return ve("property",e,he()),te(Te(this,be,"f").getPropertyType(e))}getEnumValues(e){return ve("enumProperty",e,he()),re(te(Te(this,be,"f").getEnumValues(e)))}setBool(e,t,r){return ve("id",e,pe()),ve("property",t,he()),ve("value",r,fe()),te(Te(this,be,"f").setBool(e,t,r))}getBool(e,t){return ve("id",e,pe()),ve("property",t,he()),te(Te(this,be,"f").getBool(e,t))}setInt(e,t,r){return ve("id",e,pe()),ve("property",t,he()),ve("value",r,pe()),te(Te(this,be,"f").setInt(e,t,r))}getInt(e,t){return ve("id",e,pe()),ve("property",t,he()),te(Te(this,be,"f").getInt(e,t))}setFloat(e,t,r){return ve("id",e,pe()),ve("property",t,he()),ve("value",r,ge()),te(Te(this,be,"f").setFloat(e,t,r))}getFloat(e,t){return ve("id",e,pe()),ve("property",t,he()),te(Te(this,be,"f").getFloat(e,t))}setString(e,t,r){return ve("id",e,pe()),ve("property",t,he()),ve("value",r,he()),te(Te(this,be,"f").setString(e,t,r))}getString(e,t){return ve("id",e,pe()),ve("property",t,he()),te(Te(this,be,"f").getString(e,t))}setColorRGBA(e,t,r,n,o,i){return ve("id",e,pe()),ve("property",t,he()),ve("r",r,ge()),ve("g",n,ge()),ve("b",o,ge()),ve("a",i,ge()),te(Te(this,be,"f").setColorRGBA(e,t,r,n,o,i))}getColorRGBA(e,t){return ve("id",e,pe()),ve("property",t,he()),te(Te(this,be,"f").getColorRGBA(e,t))}setEnum(e,t,r){return ve("id",e,pe()),ve("property",t,he()),ve("value",r,he()),te(Te(this,be,"f").setEnum(e,t,r))}getEnum(e,t){return ve("id",e,pe()),ve("property",t,he()),te(Te(this,be,"f").getEnum(e,t))}hasCrop(e){return ve("id",e,pe()),te(Te(this,be,"f").hasCrop(e))}setCropScaleX(e,t){return ve("id",e,pe()),ve("scaleX",t,ge()),te(Te(this,be,"f").setCropScaleX(e,t))}setCropScaleY(e,t){return ve("id",e,pe()),ve("scaleY",t,ge()),te(Te(this,be,"f").setCropScaleY(e,t))}setCropRotation(e,t){return ve("id",e,pe()),ve("rotation",t,ge()),te(Te(this,be,"f").setCropRotation(e,t))}setCropTranslationX(e,t){return ve("id",e,pe()),ve("translationX",t,ge()),te(Te(this,be,"f").setCropTranslationX(e,t))}setCropTranslationY(e,t){return ve("id",e,pe()),ve("translationY",t,ge()),te(Te(this,be,"f").setCropTranslationY(e,t))}resetCrop(e){return ve("id",e,pe()),te(Te(this,be,"f").resetCrop(e))}getCropScaleX(e){return ve("id",e,pe()),te(Te(this,be,"f").getCropScaleX(e))}getCropScaleY(e){return ve("id",e,pe()),te(Te(this,be,"f").getCropScaleY(e))}getCropRotation(e){return ve("id",e,pe()),te(Te(this,be,"f").getCropRotation(e))}getCropTranslationX(e){return ve("id",e,pe()),te(Te(this,be,"f").getCropTranslationX(e))}getCropTranslationY(e){return ve("id",e,pe()),te(Te(this,be,"f").getCropTranslationY(e))}hasOpacity(e){return ve("id",e,pe()),te(Te(this,be,"f").hasOpacity(e))}setOpacity(e,t){return ve("id",e,pe()),ve("opacity",t,ge()),te(Te(this,be,"f").setOpacity(e,t))}getOpacity(e){return ve("id",e,pe()),te(Te(this,be,"f").getOpacity(e))}hasFillColor(e){return ve("id",e,pe()),te(Te(this,be,"f").hasFillColor(e))}setFillColorRGBA(e,t,r,n,o){return ve("id",e,pe()),ve("r",t,ge()),ve("g",r,ge()),ve("b",n,ge()),ve("a",o,ge()),te(Te(this,be,"f").setFillColorRGBA(e,t,r,n,o))}getFillColorRGBA(e){return ve("id",e,pe()),te(Te(this,be,"f").getFillColorRGBA(e))}setFillColorEnabled(e,t){return ve("id",e,pe()),ve("enabled",t,fe()),te(Te(this,be,"f").setFillColorEnabled(e,t))}isFillColorEnabled(e){return ve("id",e,pe()),te(Te(this,be,"f").isFillColorEnabled(e))}hasBackgroundColor(e){return ve("id",e,pe()),te(Te(this,be,"f").hasBackgroundColor(e))}setBackgroundColorRGBA(e,t,r,n,o){return ve("id",e,pe()),ve("r",t,ge()),ve("g",r,ge()),ve("b",n,ge()),ve("a",o,ge()),te(Te(this,be,"f").setBackgroundColorRGBA(e,t,r,n,o))}getBackgroundColorRGBA(e){return ve("id",e,pe()),te(Te(this,be,"f").getBackgroundColorRGBA(e))}setBackgroundColorEnabled(e,t){return ve("id",e,pe()),ve("enabled",t,fe()),te(Te(this,be,"f").setBackgroundColorEnabled(e,t))}isBackgroundColorEnabled(e){return ve("id",e,pe()),te(Te(this,be,"f").isBackgroundColorEnabled(e))}hasOutline(e){return ve("id",e,pe()),te(Te(this,be,"f").hasOutline(e))}setOutlineColorRGBA(e,t,r,n,o){return ve("id",e,pe()),ve("r",t,ge()),ve("g",r,ge()),ve("b",n,ge()),ve("a",o,ge()),te(Te(this,be,"f").setOutlineColorRGBA(e,t,r,n,o))}getOutlineColorRGBA(e){return ve("id",e,pe()),te(Te(this,be,"f").getOutlineColorRGBA(e))}setOutlineEnabled(e,t){return ve("id",e,pe()),ve("enabled",t,fe()),te(Te(this,be,"f").setOutlineEnabled(e,t))}isOutlineEnabled(e){return ve("id",e,pe()),te(Te(this,be,"f").isOutlineEnabled(e))}setOutlineWidth(e,t){return ve("id",e,pe()),ve("width",t,ge()),te(Te(this,be,"f").setOutlineWidth(e,t))}getOutlineWidth(e){return ve("id",e,pe()),te(Te(this,be,"f").getOutlineWidth(e))}}be=new WeakMap,ye=new WeakMap;var Pe,xe,Se=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},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 Re{constructor(e){Pe.set(this,void 0),xe.set(this,void 0),Se(this,Pe,e,"f"),Se(this,xe,new ee(e),"f")}async loadFromString(e){return ve("sceneContent",e,he()),new Promise((t=>{Me(this,Pe,"f").loadSceneFromString(e,(e=>{const r=te(e);t(r)}))}))}async loadFromURL(e){return ve("url",e,he()),new Promise((t=>{Me(this,Pe,"f").loadSceneFromURL(e,(e=>{const r=te(e);t(r)}))}))}async saveToString(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):Me(this,Pe,"f").saveSceneToString(r,(t=>{const r=te(t);e(r)}))}))}async saveToArchive(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):Me(this,Pe,"f").saveSceneToArchive(r,(r=>{"error"in r?t(r.error):e(new Blob([r],{type:o.HY.Zip}))}))}))}create(){return te(Me(this,Pe,"f").createScene({layout:o.Kc.Free}))}createFromImage(e,t=300,r=1){return ve("url",e,he()),ve("dpi",t,me(ge(),0)),ve("pixelScaleFactor",r,me(ge(),0)),new Promise((n=>{Me(this,Pe,"f").createSceneFromImage(e,t,r,o.Kc.Free,0,!1,(e=>{const t=te(e);n(t)}))}))}get(){const e=te(Me(this,Pe,"f").findByType(o._h.Scene)),t=re(e);return t.length>0?t[0]:null}}Pe=new WeakMap,xe=new WeakMap;var ke,Fe=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 Ae{constructor(e){ke.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,ke,e,"f")}findAll(){return re(Fe(this,ke,"f").findAllVariables())}setString(e,t){return ve("key",e,he()),ve("value",t,he()),te(Fe(this,ke,"f").setVariableString(e,t))}getString(e){return ve("key",e,he()),te(Fe(this,ke,"f").getVariableString(e))}remove(e){return ve("key",e,he()),te(Fe(this,ke,"f").removeVariable(e))}}ke=new WeakMap;var Ce,Ie,Ne,je=r(7168),Le=r.n(je);function Ue(e){return Array.from(Array(e+1).keys())}!function(e){e.Left="left",e.Right="right"}(Ce||(Ce={})),function(e){e.Top="top",e.Bottom="bottom"}(Ie||(Ie={})),function(e){e.Left="left",e.Right="right"}(Ne||(Ne={}));const He={show:!0,position:Ne.Right},Be={show:!1,position:Ne.Left},Xe={show:!0,position:Ne.Left},Qe={show:!0,position:Ie.Top,title:null,action:{close:{show:!1},back:{show:!1},save:{show:!1},export:{show:!1},share:{show:!1},download:{show:!1},load:{show:!1}}},Ge={view:{adopter:{style:q.Default}},panels:{inspector:He,settings:Be,assetLibrary:Xe},templates:{show:!0},libraries:{image:{show:!0},text:{show:!0},element:{show:!0},panels:{insert:{autoClose:()=>!1},replace:{autoClose:()=>!0}}},navigation:Qe,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}}}},qe=(Ue(10),Ue(50),Ue(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"]}),Ve={"din-a0":{width:1189,height:841,unit:Q.Millimeter},"din-a1":{width:841,height:594,unit:Q.Millimeter},"din-a2":{width:594,height:420,unit:Q.Millimeter},"din-a3":{width:420,height:297,unit:Q.Millimeter},"din-a4":{width:297,height:210,unit:Q.Millimeter},"din-a5":{width:210,height:148,unit:Q.Millimeter},"din-a6":{meta:{default:!0},width:148,height:105,unit:Q.Millimeter},"din-a65":{width:210,height:105,unit:Q.Millimeter},"din-b5":{width:250,height:176,unit:Q.Millimeter},square:{width:105,height:105,unit:Q.Millimeter},"twitter-profile":{width:400,height:400,unit:Q.Pixel},"twitter-image":{width:1024,height:512,unit:Q.Pixel},"twitter-header":{width:1500,height:500,unit:Q.Pixel},"instagram-profile":{width:180,height:180,unit:Q.Pixel},"instagram-photo":{width:1080,height:1080,unit:Q.Pixel},"instagram-story":{width:1080,height:1920,unit:Q.Pixel},"american-letter":{width:8.5,height:11,unit:Q.Inch},"american-legal":{width:8.5,height:14,unit:Q.Inch},"16:10":{width:1600,height:1e3,unit:Q.Pixel},"16:9":{width:1600,height:900,unit:Q.Pixel},"16:10@2400p":{width:3840,height:2400,unit:Q.Pixel},"16:9@2160p":{width:3840,height:2160,unit:Q.Pixel},"business-card":{width:85,height:55,unit:Q.Millimeter}},We={company_name:{value:"img.ly"},first_name:{value:"Charly"},last_name:{value:"Williams"},address:{value:"742 Evergreen Terrace"},city:{value:"Springfield"}},ze=(e,t)=>{const r=`[UBQ] ${e}`;switch(t){case o.in.Warning:console.warn(r);break;case o.in.Error:console.error(r);break;case o.in.Info:console.log(r);break;default:console.log(r)}},$e={log:ze},Ye={en:{variables:{company_name:{label:"Company Name"},first_name:{label:"First name"},last_name:{label:"Last name"},address:{label:"Address"},city:{label:"City"}}},de:{variables:{company_name:{label:"Firmenname"},first_name:{label:"Vorname"},last_name:{label:"Nachname"},address:{label:"Adresse"},city:{label:"Stadt"}}}},Ke={colorPalettes:{primary:{meta:{default:!0},entries:["#FFFFFF","#000000","#6686FF","#66CCFF","#54FFEA","#E75050","#F28855","#FFF763"]}},pageFormats:Ve},Je={headingsHierarchyStart:2},Ze={baseURL:"core/"},et={baseURL:"ui/",scale:"normal",elements:Ge,stylesheets:{disableShadowDOM:!1,disableTagInsertion:!1,disableFontInsertion:!1}},tt={maskSpotColor:void 0,dpi:300,pixelScaleFactor:1},rt={title:{fontFileUri:"bundle://ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",show:!0}};function nt(e,t=window.location.href){return new URL(e,t).toString()}function ot(e){return"/"!==e[e.length-1]?`${e}/`:e}class it{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,"assetSources",{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,"variables",{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,d,f,p,g,h,m,v,b,y,E,w,_;const O=new it;return e&&(O.initialSceneString=null!==(t=e.initialSceneString)&&void 0!==t?t:void 0,O.initialSceneURL=null!==(r=e.initialSceneURL)&&void 0!==r?r:void 0,O.initialImageURL=null!==(n=e.initialImageURL)&&void 0!==n?n:void 0,O.license=e.license,O.role=null!==(o=e.role)&&void 0!==o?o:"Creator",O.locale=null!==(i=e.locale)&&void 0!==i?i:"en",O.theme=null!==(a=e.theme)&&void 0!==a?a:"dark",O.devMode=null!==(s=e.devMode)&&void 0!==s&&s,O.featureFlags=null!==(c=e.featureFlags)&&void 0!==c?c:{},O.baseURL=null!==(u=e.baseURL)&&void 0!==u?u:"https://cdn.img.ly/packages/imgly/cesdk-js/1.4.7/assets",O.core=null!==(l=e.core)&&void 0!==l?l:Object.assign({},Ze),O.ui=Le()({},et,null!==(d=e.ui)&&void 0!==d?d:{}),O.extensions=null!==(f=e.extensions)&&void 0!==f?f:Object.assign({},qe),O.extensions.entries=null!==(p=O.extensions.entries)&&void 0!==p?p:Object.assign({},qe.entries),O.i18n=null!==(g=e.i18n)&&void 0!==g?g:Object.assign({},Ye),O.a11y=null!==(h=e.a11y)&&void 0!==h?h:Object.assign({},Je),O.callbacks=null!==(m=e.callbacks)&&void 0!==m?m:Object.assign({},$e),O.variables=null!==(v=e.variables)&&void 0!==v?v:Object.assign({},We),O.presets=null!==(b=e.presets)&&void 0!==b?b:Object.assign({},Ke),O.scene=null!==(y=e.scene)&&void 0!==y?y:Object.assign({},tt),O.page=Le()({},rt,null!==(E=e.page)&&void 0!==E?E:{}),O.assets=null!==(w=e.assets)&&void 0!==w?w:{},O.assetSources=Le()({},e.assetSources),O.defaultFont=null!==(_=e.defaultFont)&&void 0!==_?_:void 0,Object.entries(Ke).forEach((([e,t])=>{var r;O.presets[e]=null!==(r=O.presets[e])&&void 0!==r?r:Object.assign({},t)}))),O.baseURL=nt(O.baseURL),O.baseURL=ot(O.baseURL),O.core.baseURL=nt(O.core.baseURL,O.baseURL),O.core.baseURL=ot(O.core.baseURL),O.ui.baseURL=nt(O.ui.baseURL,O.baseURL),O.ui.baseURL=ot(O.ui.baseURL),O.extensions.baseURL=ot(O.extensions.baseURL),O.extensions.entries=O.extensions.entries.map((e=>ot(e))),O}extend(e){return Le()({},this,e)}}var at;const st=(at="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(){Le("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(){Le("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,"___getTypeName")||(Object.defineProperty(o.ready,"___getTypeName",{configurable:!0,get:function(){Le("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(){Le("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(){Le("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(){Le("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,"___stdio_exit")||(Object.defineProperty(o.ready,"___stdio_exit",{configurable:!0,get:function(){Le("You are getting ___stdio_exit 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,"___stdio_exit",{configurable:!0,set:function(){Le("You are setting ___stdio_exit 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(){Le("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(){Le("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++,o.ENVIRONMENT_IS_PTHREAD||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,O("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 d(){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 d=o.dataFileDownloads[l];s+=d.total,c+=d.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?d():(o.preRun||(o.preRun=[]),o.preRun.push(d))}({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/shader/.keep",start:96295,end:96295},{filename:"/ly.img.cesdk/presets/.keep",start:96295,end:96295},{filename:"/ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",start:96295,end:367055}],remote_package_size:367055,package_uuid:"784e88ed-e678-4c5d-9f5e-a121bed1ee19"}),o.ENVIRONMENT_IS_PTHREAD&&(o.preRun=[]);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=Object.assign({},o),u=[],l="./this.program",d=(e,t)=>{throw t},f=!0,p=!1,g=!1,h=!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 m,v,b,y="";function E(e){return o.locateFile?o.locateFile(e,y):y+e}function w(e){if(e instanceof Wf)return;let t=e;e&&"object"==typeof e&&e.stack&&(t=[e,e.stack]),O("exiting due to exception: "+t)}if(h){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&&(m=function(e){return read(e)}),b=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),C("object"==typeof t),t)},v=function(e,t,r){setTimeout((()=>t(b(e))),0)},"undefined"!=typeof scriptArgs?u=scriptArgs:void 0!==arguments&&(u=arguments),"function"==typeof quit&&(d=(e,t)=>{w(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!f&&!p)throw new Error("environment detection error");if(p?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),at&&(y=at),y=0!==y.indexOf("blob:")?y.substr(0,y.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?)");m=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},p&&(b=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),v=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}}var _=o.print||console.log.bind(console),O=o.printErr||console.warn.bind(console);function T(e){T.shown||(T.shown={}),T.shown[e]||(T.shown[e]=1,O(e))}Object.assign(o,c),c=null,o.arguments&&(u=o.arguments),Object.getOwnPropertyDescriptor(o,"arguments")||Object.defineProperty(o,"arguments",{configurable:!0,get:function(){Le("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&&(l=o.thisProgram),Object.getOwnPropertyDescriptor(o,"thisProgram")||Object.defineProperty(o,"thisProgram",{configurable:!0,get:function(){Le("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(){Le("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(){Le("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(){Le("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(){Le("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(){Le("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(!p,"worker environment detected but not enabled at build time. Add 'worker' to `-s ENVIRONMENT` to enable."),C(!g,"node environment detected but not enabled at build time. Add 'node' to `-s ENVIRONMENT` to enable."),C(!h,"shell environment detected but not enabled at build time. Add 'shell' to `-s ENVIRONMENT` to enable.");var D,P=0,x=e=>{P=e},S=()=>P;o.wasmBinary&&(D=o.wasmBinary),Object.getOwnPropertyDescriptor(o,"wasmBinary")||Object.defineProperty(o,"wasmBinary",{configurable:!0,get:function(){Le("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 M,R=o.noExitRuntime||!0;function k(e,t="i8",r){switch("*"===t.charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return X[e>>0];case"i16":return G[e>>1];case"i32":case"i64":return V[e>>2];case"float":return z[e>>2];case"double":return Number($[e>>3]);default:Le("invalid type for getValue: "+t)}return null}Object.getOwnPropertyDescriptor(o,"noExitRuntime")||Object.defineProperty(o,"noExitRuntime",{configurable:!0,get:function(){Le("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&&Le("no native wasm support detected");var F,A=!1;function C(e,t){e||Le("Assertion failed"+(t?": "+t:""))}var I="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function N(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&I)return I.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)&&T("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 j(e,t){return e?N(Q,e,t):""}function L(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&&T("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 U(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!"),L(e,Q,t,r)}function H(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 B,X,Q,G,q,V,W,z,$,Y="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function K(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)&&q[n];)++n;if((r=n<<1)-e>32&&Y)return Y.decode(Q.subarray(e,r));for(var i="",a=0;!(a>=t/2);++a){var s=G[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);G[t>>1]=a,t+=2}return G[t>>1]=0,t-n}function Z(e){return 2*e.length}function ee(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=V[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 te(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)),V[t>>2]=a,(t+=4)+4>o)break}return V[t>>2]=0,t-n}function re(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 ne(e){var t=H(e)+1,r=Mf(t);return r&&L(e,X,r,t),r}function oe(e){var t=H(e)+1,r=Hf(t);return L(e,X,r,t),r}function ie(e,t){C(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),X.set(e,t)}function ae(e,t,r){for(var n=0;n<e.length;++n)C(e.charCodeAt(n)===(255&e.charCodeAt(n))),X[t++>>0]=e.charCodeAt(n);r||(X[t>>0]=0)}function se(e,t){return e%t>0&&(e+=t-e%t),e}function ce(e){B=e,o.HEAP8=X=new Int8Array(e),o.HEAP16=G=new Int16Array(e),o.HEAP32=V=new Int32Array(e),o.HEAPU8=Q=new Uint8Array(e),o.HEAPU16=q=new Uint16Array(e),o.HEAPU32=W=new Uint32Array(e),o.HEAPF32=z=new Float32Array(e),o.HEAPF64=$=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,de=o.INITIAL_MEMORY||268435456;function fe(){var e=jf();C(0==(3&e)),V[e+4>>2]=34821223,V[e+8>>2]=2310721022,V[0]=1668509029}function pe(){if(!A){var e=jf(),t=W[e+4>>2],r=W[e+8>>2];34821223==t&&2310721022==r||Le("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" 0x"+t.toString(16)),1668509029!==V[0]&&Le("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(){Le("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(de>=ue,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+de+"! (TOTAL_STACK="+ue+")"),C("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=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==de,"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||bt.init.initialized||bt.init(),bt.ignorePermissions=!1,lt.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;)Re(o.postRun.shift());$e(be)}function Se(e){ge.unshift(e)}function Me(e){he.unshift(e)}function Re(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 ke=0,Fe=null,Ae=null,Ce={};function Ie(e){for(var t=e;;){if(!Ce[e])return e;e=t+Math.random()}}function Ne(e){ke++,o.monitorRunDependencies&&o.monitorRunDependencies(ke),e?(C(!Ce[e]),Ce[e]=1,null===Fe&&"undefined"!=typeof setInterval&&(Fe=setInterval((function(){if(A)return clearInterval(Fe),void(Fe=null);var e=!1;for(var t in Ce)e||(e=!0,O("still waiting on run dependencies:")),O("dependency: "+t);e&&O("(end of list)")}),1e4))):O("warning: run dependency added without ID")}function je(e){if(ke--,o.monitorRunDependencies&&o.monitorRunDependencies(ke),e?(C(Ce[e]),delete Ce[e]):O("warning: run dependency removed without ID"),0==ke&&(null!==Fe&&(clearInterval(Fe),Fe=null),Ae)){var t=Ae;Ae=null,t()}}function Le(e){o.onAbort&&o.onAbort(e),O(e="Aborted("+e+")"),A=!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&&D)return new Uint8Array(D);if(b)return b(e);throw"both async and sync fetching of the wasm failed"}catch(e){Le(e)}}function We(){return D||!f&&!p||"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 ze(){var e={env:Sf,wasi_snapshot_preview1:Sf};function t(e,t){var r=e.exports;o.asm=r,C(M=o.asm.memory,"memory not found in wasm exports"),ce(M.buffer),C(le=o.asm.__indirect_function_table,"table not found in wasm exports"),Me(o.asm.__wasm_call_ctors),je("wasm-instantiate")}Ne("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 We().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){O("failed to asynchronously prepare wasm: "+e),Ge(Ue)&&O("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"),Le(e)}))}if(o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(e){return O("Module.instantiateWasm callback failed with error: "+e),!1}return(D||"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 O("wasm streaming compile failed: "+e),O("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?Ze(r)():Ze(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(o)}}function Ye(e){return T("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function Ke(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t=Ye(e);return e===t?e:t+" ["+e+"]"}))}Qe(Ue="cesdk.wasm")||(Ue=E(Ue));var Je=[];function Ze(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 et(e){if(e instanceof Wf||"unwind"==e)return F;d(1,e)}function tt(e,t,r,n){Le("Assertion failed: "+j(e)+", at: "+[t?j(t):"unknown filename",r,n?j(n):"unknown function"])}function rt(e){return Mf(e+16)+16}function nt(e){this.excPtr=e,this.ptr=e-16,this.set_type=function(e){V[this.ptr+4>>2]=e},this.get_type=function(){return V[this.ptr+4>>2]},this.set_destructor=function(e){V[this.ptr+8>>2]=e},this.get_destructor=function(){return V[this.ptr+8>>2]},this.set_refcount=function(e){V[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,X[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=X[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,X[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=X[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=V[this.ptr>>2];V[this.ptr>>2]=e+1},this.release_ref=function(){var e=V[this.ptr>>2];return V[this.ptr>>2]=e-1,C(e>0),1===e}}function ot(e,t,r){throw new nt(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 it(e){return V[kf()>>2]=e,e}var st={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=st.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=st.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=st.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return st.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return st.normalize(e.join("/"))},join2:function(e,t){return st.normalize(e+"/"+t)}};function ct(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}return function(){Le("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 ut={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:bt.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=st.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=ut.resolve(e).substr(1),t=ut.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("/")}},lt={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){lt.ttys[e]={input:[],output:[],ops:t},bt.registerDevice(e,lt.stream_ops)},stream_ops:{open:function(e){var t=lt.ttys[e.node.rdev];if(!t)throw new bt.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 bt.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 bt.ErrnoError(29)}if(void 0===s&&0===i)throw new bt.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 bt.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new bt.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=Pf(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(_(N(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(_(N(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(O(N(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(O(N(e.output,0)),e.output=[])}}};function dt(e,t){Q.fill(0,e,e+t)}function ft(e,t){return C(t,"alignment argument is required"),Math.ceil(e/t)*t}function pt(e){e=ft(e,65536);var t=Cf(65536,e);return t?(dt(t,e),t):0}var gt={ops_table:null,mount:function(e){return gt.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(bt.isBlkdev(r)||bt.isFIFO(r))throw new bt.ErrnoError(63);gt.ops_table||(gt.ops_table={dir:{node:{getattr:gt.node_ops.getattr,setattr:gt.node_ops.setattr,lookup:gt.node_ops.lookup,mknod:gt.node_ops.mknod,rename:gt.node_ops.rename,unlink:gt.node_ops.unlink,rmdir:gt.node_ops.rmdir,readdir:gt.node_ops.readdir,symlink:gt.node_ops.symlink},stream:{llseek:gt.stream_ops.llseek}},file:{node:{getattr:gt.node_ops.getattr,setattr:gt.node_ops.setattr},stream:{llseek:gt.stream_ops.llseek,read:gt.stream_ops.read,write:gt.stream_ops.write,allocate:gt.stream_ops.allocate,mmap:gt.stream_ops.mmap,msync:gt.stream_ops.msync}},link:{node:{getattr:gt.node_ops.getattr,setattr:gt.node_ops.setattr,readlink:gt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:gt.node_ops.getattr,setattr:gt.node_ops.setattr},stream:bt.chrdev_stream_ops}});var o=bt.createNode(e,t,r,n);return bt.isDir(o.mode)?(o.node_ops=gt.ops_table.dir.node,o.stream_ops=gt.ops_table.dir.stream,o.contents={}):bt.isFile(o.mode)?(o.node_ops=gt.ops_table.file.node,o.stream_ops=gt.ops_table.file.stream,o.usedBytes=0,o.contents=null):bt.isLink(o.mode)?(o.node_ops=gt.ops_table.link.node,o.stream_ops=gt.ops_table.link.stream):bt.isChrdev(o.mode)&&(o.node_ops=gt.ops_table.chrdev.node,o.stream_ops=gt.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=bt.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,bt.isDir(e.mode)?t.size=4096:bt.isFile(e.mode)?t.size=e.usedBytes:bt.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&>.resizeFileStorage(e,t.size)},lookup:function(e,t){throw bt.genericErrors[44]},mknod:function(e,t,r,n){return gt.createNode(e,t,r,n)},rename:function(e,t,r){if(bt.isDir(e.mode)){var n;try{n=bt.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new bt.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=bt.lookupNode(e,t);for(var n in r.contents)throw new bt.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=gt.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!bt.isLink(e.mode))throw new bt.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===X.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(gt.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&&bt.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new bt.ErrnoError(28);return n},allocate:function(e,t,r){gt.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 bt.ErrnoError(28);if(!bt.isFile(e.node.mode))throw new bt.ErrnoError(43);var a,s,c=e.node.contents;if(2&i||c.buffer!==B){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=pt(r)))throw new bt.ErrnoError(48);X.set(c,a)}else s=!1,a=c.byteOffset;return{ptr:a,allocated:s}},msync:function(e,t,r,n,o){if(!bt.isFile(e.node.mode))throw new bt.ErrnoError(43);return 2&o||gt.stream_ops.write(e,t,0,n,r,!1),0}}};function ht(e,t,r,n){var o=n?"":Ie("al "+e);v(e,(function(r){C(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),o&&je(o)}),(function(t){if(!r)throw'Loading data file "'+e+'" failed.';r()})),o&&Ne(o)}var mt={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"},vt={},bt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=ut.resolve(bt.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 bt.ErrnoError(32);for(var o=st.normalizeArray(e.split("/").filter((e=>!!e)),!1),i=bt.root,a="/",s=0;s<o.length;s++){var c=s===o.length-1;if(c&&t.parent)break;if(i=bt.lookupNode(i,o[s]),a=st.join2(a,o[s]),bt.isMountpoint(i)&&(!c||c&&t.follow_mount)&&(i=i.mounted.root),!c||t.follow)for(var u=0;bt.isLink(i.mode);){var l=bt.readlink(a);if(a=ut.resolve(st.dirname(a),l),i=bt.lookupPath(a,{recurse_count:t.recurse_count}).node,u++>40)throw new bt.ErrnoError(32)}}return{path:a,node:i}},getPath:e=>{for(var t;;){if(bt.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:(e,t)=>{for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%bt.nameTable.length},hashAddNode:e=>{var t=bt.hashName(e.parent.id,e.name);e.name_next=bt.nameTable[t],bt.nameTable[t]=e},hashRemoveNode:e=>{var t=bt.hashName(e.parent.id,e.name);if(bt.nameTable[t]===e)bt.nameTable[t]=e.name_next;else for(var r=bt.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:(e,t)=>{var r=bt.mayLookup(e);if(r)throw new bt.ErrnoError(r,e);for(var n=bt.hashName(e.id,t),o=bt.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return bt.lookup(e,t)},createNode:(e,t,r,n)=>{C("object"==typeof e);var o=new bt.FSNode(e,t,r,n);return bt.hashAddNode(o),o},destroyNode:e=>{bt.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=bt.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>bt.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>bt.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,t)=>{try{return bt.lookupNode(e,t),20}catch(e){}return bt.nodePermissions(e,"wx")},mayDelete:(e,t,r)=>{var n;try{n=bt.lookupNode(e,t)}catch(e){return e.errno}var o=bt.nodePermissions(e,"wx");if(o)return o;if(r){if(!bt.isDir(n.mode))return 54;if(bt.isRoot(n)||bt.getPath(n)===bt.cwd())return 10}else if(bt.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?bt.isLink(e.mode)?32:bt.isDir(e.mode)&&("r"!==bt.flagsToPermissionString(t)||512&t)?31:bt.nodePermissions(e,bt.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=bt.MAX_OPEN_FDS)=>{for(var r=e;r<=t;r++)if(!bt.streams[r])return r;throw new bt.ErrnoError(33)},getStream:e=>bt.streams[e],createStream:(e,t,r)=>{bt.FSStream||(bt.FSStream=function(){},bt.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}}}),e=Object.assign(new bt.FSStream,e);var n=bt.nextfd(t,r);return e.fd=n,bt.streams[n]=e,e},closeStream:e=>{bt.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=bt.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new bt.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{bt.devices[e]={stream_ops:t}},getDevice:e=>bt.devices[e],getMounts:e=>{for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),bt.syncFSRequests++,bt.syncFSRequests>1&&O("warning: "+bt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=bt.getMounts(bt.root.mount),n=0;function o(e){return C(bt.syncFSRequests>0),bt.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((t=>{if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount:(e,t,r)=>{if("string"==typeof e)throw e;var n,o="/"===r,i=!r;if(o&&bt.root)throw new bt.ErrnoError(10);if(!o&&!i){var a=bt.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,bt.isMountpoint(n))throw new bt.ErrnoError(10);if(!bt.isDir(n.mode))throw new bt.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(s);return c.mount=s,s.root=c,o?bt.root=c:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),c},unmount:e=>{var t=bt.lookupPath(e,{follow_mount:!1});if(!bt.isMountpoint(t.node))throw new bt.ErrnoError(28);var r=t.node,n=r.mounted,o=bt.getMounts(n);Object.keys(bt.nameTable).forEach((e=>{for(var t=bt.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&bt.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);C(-1!==i),r.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,r)=>{var n=bt.lookupPath(e,{parent:!0}).node,o=st.basename(e);if(!o||"."===o||".."===o)throw new bt.ErrnoError(28);var i=bt.mayCreate(n,o);if(i)throw new bt.ErrnoError(i);if(!n.node_ops.mknod)throw new bt.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,bt.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,bt.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var r=e.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{bt.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>(void 0===r&&(r=t,t=438),t|=8192,bt.mknod(e,t,r)),symlink:(e,t)=>{if(!ut.resolve(e))throw new bt.ErrnoError(44);var r=bt.lookupPath(t,{parent:!0}).node;if(!r)throw new bt.ErrnoError(44);var n=st.basename(t),o=bt.mayCreate(r,n);if(o)throw new bt.ErrnoError(o);if(!r.node_ops.symlink)throw new bt.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:(e,t)=>{var r,n,o=st.dirname(e),i=st.dirname(t),a=st.basename(e),s=st.basename(t);if(r=bt.lookupPath(e,{parent:!0}).node,n=bt.lookupPath(t,{parent:!0}).node,!r||!n)throw new bt.ErrnoError(44);if(r.mount!==n.mount)throw new bt.ErrnoError(75);var c,u=bt.lookupNode(r,a),l=ut.relative(e,i);if("."!==l.charAt(0))throw new bt.ErrnoError(28);if("."!==(l=ut.relative(t,o)).charAt(0))throw new bt.ErrnoError(55);try{c=bt.lookupNode(n,s)}catch(e){}if(u!==c){var d=bt.isDir(u.mode),f=bt.mayDelete(r,a,d);if(f)throw new bt.ErrnoError(f);if(f=c?bt.mayDelete(n,s,d):bt.mayCreate(n,s))throw new bt.ErrnoError(f);if(!r.node_ops.rename)throw new bt.ErrnoError(63);if(bt.isMountpoint(u)||c&&bt.isMountpoint(c))throw new bt.ErrnoError(10);if(n!==r&&(f=bt.nodePermissions(r,"w")))throw new bt.ErrnoError(f);bt.hashRemoveNode(u);try{r.node_ops.rename(u,n,s)}catch(e){throw e}finally{bt.hashAddNode(u)}}},rmdir:e=>{var t=bt.lookupPath(e,{parent:!0}).node,r=st.basename(e),n=bt.lookupNode(t,r),o=bt.mayDelete(t,r,!0);if(o)throw new bt.ErrnoError(o);if(!t.node_ops.rmdir)throw new bt.ErrnoError(63);if(bt.isMountpoint(n))throw new bt.ErrnoError(10);t.node_ops.rmdir(t,r),bt.destroyNode(n)},readdir:e=>{var t=bt.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new bt.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=bt.lookupPath(e,{parent:!0}).node;if(!t)throw new bt.ErrnoError(44);var r=st.basename(e),n=bt.lookupNode(t,r),o=bt.mayDelete(t,r,!1);if(o)throw new bt.ErrnoError(o);if(!t.node_ops.unlink)throw new bt.ErrnoError(63);if(bt.isMountpoint(n))throw new bt.ErrnoError(10);t.node_ops.unlink(t,r),bt.destroyNode(n)},readlink:e=>{var t=bt.lookupPath(e).node;if(!t)throw new bt.ErrnoError(44);if(!t.node_ops.readlink)throw new bt.ErrnoError(28);return ut.resolve(bt.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var r=bt.lookupPath(e,{follow:!t}).node;if(!r)throw new bt.ErrnoError(44);if(!r.node_ops.getattr)throw new bt.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>bt.stat(e,!0),chmod:(e,t,r)=>{var n;if(!(n="string"==typeof e?bt.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new bt.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{bt.chmod(e,t,!0)},fchmod:(e,t)=>{var r=bt.getStream(e);if(!r)throw new bt.ErrnoError(8);bt.chmod(r.node,t)},chown:(e,t,r,n)=>{var o;if(!(o="string"==typeof e?bt.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new bt.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,t,r)=>{bt.chown(e,t,r,!0)},fchown:(e,t,r)=>{var n=bt.getStream(e);if(!n)throw new bt.ErrnoError(8);bt.chown(n.node,t,r)},truncate:(e,t)=>{if(t<0)throw new bt.ErrnoError(28);var r;if(!(r="string"==typeof e?bt.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new bt.ErrnoError(63);if(bt.isDir(r.mode))throw new bt.ErrnoError(31);if(!bt.isFile(r.mode))throw new bt.ErrnoError(28);var n=bt.nodePermissions(r,"w");if(n)throw new bt.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var r=bt.getStream(e);if(!r)throw new bt.ErrnoError(8);if(0==(2097155&r.flags))throw new bt.ErrnoError(28);bt.truncate(r.node,t)},utime:(e,t,r)=>{var n=bt.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open:(e,t,r,n,i)=>{if(""===e)throw new bt.ErrnoError(44);var a;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?bt.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)a=e;else{e=st.normalize(e);try{a=bt.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(a){if(128&t)throw new bt.ErrnoError(20)}else a=bt.mknod(e,r,0),s=!0;if(!a)throw new bt.ErrnoError(44);if(bt.isChrdev(a.mode)&&(t&=-513),65536&t&&!bt.isDir(a.mode))throw new bt.ErrnoError(54);if(!s){var c=bt.mayOpen(a,t);if(c)throw new bt.ErrnoError(c)}512&t&&bt.truncate(a,0),t&=-131713;var u=bt.createStream({node:a,path:bt.getPath(a),flags:t,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);return u.stream_ops.open&&u.stream_ops.open(u),!o.logReadFiles||1&t||(bt.readFiles||(bt.readFiles={}),e in bt.readFiles||(bt.readFiles[e]=1)),u},close:e=>{if(bt.isClosed(e))throw new bt.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{bt.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,r)=>{if(bt.isClosed(e))throw new bt.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new bt.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new bt.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:(e,t,r,n,o)=>{if(n<0||o<0)throw new bt.ErrnoError(28);if(bt.isClosed(e))throw new bt.ErrnoError(8);if(1==(2097155&e.flags))throw new bt.ErrnoError(8);if(bt.isDir(e.node.mode))throw new bt.ErrnoError(31);if(!e.stream_ops.read)throw new bt.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new bt.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=a),a},write:(e,t,r,n,o,i)=>{if(n<0||o<0)throw new bt.ErrnoError(28);if(bt.isClosed(e))throw new bt.ErrnoError(8);if(0==(2097155&e.flags))throw new bt.ErrnoError(8);if(bt.isDir(e.node.mode))throw new bt.ErrnoError(31);if(!e.stream_ops.write)throw new bt.ErrnoError(28);e.seekable&&1024&e.flags&&bt.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new bt.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:(e,t,r)=>{if(bt.isClosed(e))throw new bt.ErrnoError(8);if(t<0||r<=0)throw new bt.ErrnoError(28);if(0==(2097155&e.flags))throw new bt.ErrnoError(8);if(!bt.isFile(e.node.mode)&&!bt.isDir(e.node.mode))throw new bt.ErrnoError(43);if(!e.stream_ops.allocate)throw new bt.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:(e,t,r,n,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&e.flags))throw new bt.ErrnoError(2);if(1==(2097155&e.flags))throw new bt.ErrnoError(2);if(!e.stream_ops.mmap)throw new bt.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o,i)},msync:(e,t,r,n,o)=>e&&e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0,munmap:e=>0,ioctl:(e,t,r)=>{if(!e.stream_ops.ioctl)throw new bt.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile:(e,t={})=>{if(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=bt.open(e,t.flags),o=bt.stat(e).size,i=new Uint8Array(o);return bt.read(n,i,0,o,0),"utf8"===t.encoding?r=N(i,0):"binary"===t.encoding&&(r=i),bt.close(n),r},writeFile:(e,t,r={})=>{r.flags=r.flags||577;var n=bt.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(H(t)+1),i=L(t,o,0,o.length);bt.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");bt.write(n,t,0,t.byteLength,void 0,r.canOwn)}bt.close(n)},cwd:()=>bt.currentPath,chdir:e=>{var t=bt.lookupPath(e,{follow:!0});if(null===t.node)throw new bt.ErrnoError(44);if(!bt.isDir(t.node.mode))throw new bt.ErrnoError(54);var r=bt.nodePermissions(t.node,"x");if(r)throw new bt.ErrnoError(r);bt.currentPath=t.path},createDefaultDirectories:()=>{bt.mkdir("/tmp"),bt.mkdir("/home"),bt.mkdir("/home/web_user")},createDefaultDevices:()=>{bt.mkdir("/dev"),bt.registerDevice(bt.makedev(1,3),{read:()=>0,write:(e,t,r,n,o)=>n}),bt.mkdev("/dev/null",bt.makedev(1,3)),lt.register(bt.makedev(5,0),lt.default_tty_ops),lt.register(bt.makedev(6,0),lt.default_tty1_ops),bt.mkdev("/dev/tty",bt.makedev(5,0)),bt.mkdev("/dev/tty1",bt.makedev(6,0));var e=ct();bt.createDevice("/dev","random",e),bt.createDevice("/dev","urandom",e),bt.mkdir("/dev/shm"),bt.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{bt.mkdir("/proc");var e=bt.mkdir("/proc/self");bt.mkdir("/proc/self/fd"),bt.mount({mount:()=>{var t=bt.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var r=+t,n=bt.getStream(r);if(!n)throw new bt.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?bt.createDevice("/dev","stdin",o.stdin):bt.symlink("/dev/tty","/dev/stdin"),o.stdout?bt.createDevice("/dev","stdout",null,o.stdout):bt.symlink("/dev/tty","/dev/stdout"),o.stderr?bt.createDevice("/dev","stderr",null,o.stderr):bt.symlink("/dev/tty1","/dev/stderr");var e=bt.open("/dev/stdin",0),t=bt.open("/dev/stdout",1),r=bt.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:()=>{bt.ErrnoError||(bt.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,vt)if(vt[t]===e){this.code=t;break}},this.setErrno(e),this.message=mt[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=Ke(this.stack))},bt.ErrnoError.prototype=new Error,bt.ErrnoError.prototype.constructor=bt.ErrnoError,[44].forEach((e=>{bt.genericErrors[e]=new bt.ErrnoError(e),bt.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{bt.ensureErrnoError(),bt.nameTable=new Array(4096),bt.mount(gt,{},"/"),bt.createDefaultDirectories(),bt.createDefaultDevices(),bt.createSpecialDirectories(),bt.filesystems={MEMFS:gt}},init:(e,t,r)=>{C(!bt.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)"),bt.init.initialized=!0,bt.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=t||o.stdout,o.stderr=r||o.stderr,bt.createStandardStreams()},quit:()=>{bt.init.initialized=!1,Af();for(var e=0;e<bt.streams.length;e++){var t=bt.streams[e];t&&bt.close(t)}},getMode:(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:(e,t)=>{var r=bt.analyzePath(e,t);return r.exists?r.object:null},analyzePath:(e,t)=>{try{e=(n=bt.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=bt.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=st.basename(e),n=bt.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:(e,t,r,n)=>{e="string"==typeof e?e:bt.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=st.join2(e,i);try{bt.mkdir(a)}catch(e){}e=a}}return a},createFile:(e,t,r,n,o)=>{var i=st.join2("string"==typeof e?e:bt.getPath(e),t),a=bt.getMode(n,o);return bt.create(i,a)},createDataFile:(e,t,r,n,o,i)=>{var a=t;e&&(e="string"==typeof e?e:bt.getPath(e),a=t?st.join2(e,t):e);var s=bt.getMode(n,o),c=bt.create(a,s);if(r){if("string"==typeof r){for(var u=new Array(r.length),l=0,d=r.length;l<d;++l)u[l]=r.charCodeAt(l);r=u}bt.chmod(c,146|s);var f=bt.open(c,577);bt.write(f,r,0,r.length,0,i),bt.close(f),bt.chmod(c,s)}return c},createDevice:(e,t,r,n)=>{var o=st.join2("string"==typeof e?e:bt.getPath(e),t),i=bt.getMode(!!r,!!n);bt.createDevice.major||(bt.createDevice.major=64);var a=bt.makedev(bt.createDevice.major++,0);return bt.registerDevice(a,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,t,n,o,i)=>{for(var a=0,s=0;s<o;s++){var c;try{c=r()}catch(e){throw new bt.ErrnoError(29)}if(void 0===c&&0===a)throw new bt.ErrnoError(6);if(null==c)break;a++,t[n+s]=c}return a&&(e.node.timestamp=Date.now()),a},write:(e,t,r,o,i)=>{for(var a=0;a<o;a++)try{n(t[r+a])}catch(e){throw new bt.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),bt.mkdev(o,i,a)},forceLoadFile: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(!m)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=Pf(m(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new bt.ErrnoError(29)}},createLazyFile:(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((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]=((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),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||[]):Pf(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,_("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(!p)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=bt.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((e=>{var t=c.stream_ops[e];u[e]=function(){return bt.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,o)=>{bt.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:(e,t,r,n,o,i,a,s,c,u)=>{var l=t?ut.resolve(st.join2(e,t)):e,d=Ie("cp "+l);function f(r){function f(r){u&&u(),s||bt.createDataFile(e,t,r,n,o,c),i&&i(),je(d)}ho.handledByPreloadPlugin(r,l,f,(()=>{a&&a(),je(d)}))||f(r)}Ne(d),"string"==typeof r?ht(r,(e=>f(e)),a):f(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=bt.indexedDB();try{var o=n.open(bt.DB_NAME(),bt.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=()=>{_("creating db"),o.result.createObjectStore(bt.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([bt.DB_STORE_NAME],"readwrite"),i=n.objectStore(bt.DB_STORE_NAME),a=0,s=0,c=e.length;function u(){0==s?t():r()}e.forEach((e=>{var t=i.put(bt.analyzePath(e).object.contents,e);t.onsuccess=()=>{++a+s==c&&u()},t.onerror=()=>{s++,a+s==c&&u()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=bt.indexedDB();try{var o=n.open(bt.DB_NAME(),bt.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=r,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([bt.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var a=i.objectStore(bt.DB_STORE_NAME),s=0,c=0,u=e.length;function l(){0==c?t():r()}e.forEach((e=>{var t=a.get(e);t.onsuccess=()=>{bt.analyzePath(e).exists&&bt.unlink(e),bt.createDataFile(st.dirname(e),st.basename(e),t.result,!0,!0,!0),++s+c==u&&l()},t.onerror=()=>{c++,s+c==u&&l()}})),i.onerror=r},o.onerror=r},absolutePath:()=>{Le("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:()=>{Le("FS.createFolder has been removed; use FS.mkdir instead")},createLink:()=>{Le("FS.createLink has been removed; use FS.symlink instead")},joinPath:()=>{Le("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:()=>{Le("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:()=>{Le("FS.standardizePath has been removed; use PATH.normalize instead")}},yt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if("/"===t[0])return t;var n;if(-100===e)n=bt.cwd();else{var o=bt.getStream(e);if(!o)throw new bt.ErrnoError(8);n=o.path}if(0==t.length){if(!r)throw new bt.ErrnoError(44);return n}return st.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&st.normalize(t)!==st.normalize(bt.getPath(e.node)))return-54;throw e}return V[r>>2]=n.dev,V[r+4>>2]=0,V[r+8>>2]=n.ino,V[r+12>>2]=n.mode,V[r+16>>2]=n.nlink,V[r+20>>2]=n.uid,V[r+24>>2]=n.gid,V[r+28>>2]=n.rdev,V[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)],V[r+40>>2]=Be[0],V[r+44>>2]=Be[1],V[r+48>>2]=4096,V[r+52>>2]=n.blocks,V[r+56>>2]=n.atime.getTime()/1e3|0,V[r+60>>2]=0,V[r+64>>2]=n.mtime.getTime()/1e3|0,V[r+68>>2]=0,V[r+72>>2]=n.ctime.getTime()/1e3|0,V[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)],V[r+80>>2]=Be[0],V[r+84>>2]=Be[1],0},doMsync:function(e,t,r,n,o){var i=Q.slice(e,e+r);bt.msync(t,i,o,r,n)},doMkdir:function(e,t){return"/"===(e=st.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),bt.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 bt.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-28;var n=bt.readlink(e),o=Math.min(r,H(n)),i=X[t+o];return U(n,t,r+1),X[t+o]=i,o},doAccess:function(e,t){if(-8&t)return-28;var r=bt.lookupPath(e,{follow:!0}).node;if(!r)return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&bt.nodePermissions(r,n)?-2:0},doDup:function(e,t,r){var n=bt.getStream(r);return n&&bt.close(n),bt.open(e,t,0,r,r).fd},doReadv:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=V[t+8*i>>2],s=V[t+(8*i+4)>>2],c=bt.read(e,X,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=V[t+8*i>>2],s=V[t+(8*i+4)>>2],c=bt.write(e,X,a,s,n);if(c<0)return-1;o+=c}return o},varargs:void 0,get:function(){return C(null!=yt.varargs),yt.varargs+=4,V[yt.varargs-4>>2]},getStr:function(e){return j(e)},getStreamFromFD:function(e){var t=bt.getStream(e);if(!t)throw new bt.ErrnoError(8);return t},get64:function(e,t){return C(e>=0?0===t:-1===t),e}};function Et(e,t,r){yt.varargs=r;try{var n=yt.getStreamFromFD(e);switch(t){case 0:return(o=yt.get())<0?-28:bt.open(n.path,n.flags,0,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=yt.get();return n.flags|=o,0;case 5:return o=yt.get(),G[o+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return it(28),-1;default:return-28}}catch(e){if(void 0===bt||!(e instanceof bt.ErrnoError))throw e;return-e.errno}}function wt(e,t,r){yt.varargs=r;try{var n=yt.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=yt.get();return V[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=yt.get(),bt.ioctl(n,t,o);case 21523:case 21524:return n.tty?0:-59;default:Le("bad ioctl syscall "+t)}}catch(e){if(void 0===bt||!(e instanceof bt.ErrnoError))throw e;return-e.errno}}function _t(e,t,r){yt.varargs=r;try{var n=yt.getStr(e),o=r?yt.get():0;return bt.open(n,t,o).fd}catch(e){if(void 0===bt||!(e instanceof bt.ErrnoError))throw e;return-e.errno}}function Ot(e,t){Le("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Tt(e,t){Le("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}var Dt={};function Pt(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function xt(e){return this.fromWireType(W[e>>2])}var St={},Mt={},Rt={},kt=48,Ft=57;function At(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=kt&&t<=Ft?"_"+e:e}function Ct(e,t){return e=At(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function It(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 Nt=void 0;function jt(e){throw new Nt(e)}function Lt(e,t,r){function n(t){var n=r(t);n.length!==e.length&&jt("Mismatched type converter count");for(var o=0;o<e.length;++o)$t(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){Mt.hasOwnProperty(e)?o[t]=Mt[e]:(i.push(e),St.hasOwnProperty(e)||(St[e]=[]),St[e].push((function(){o[t]=Mt[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Ut(e){var t=Dt[e];delete Dt[e];var r=t.elements,n=r.length,o=r.map((function(e){return e.getterReturnType})).concat(r.map((function(e){return e.setterArgumentType}))),i=t.rawConstructor,a=t.rawDestructor;Lt([e],o,(function(e){return r.forEach((function(t,r){var o=e[r],i=t.getter,a=t.getterContext,s=e[r+n],c=t.setter,u=t.setterContext;t.read=e=>o.fromWireType(i(a,e)),t.write=(e,t)=>{var r=[];c(u,e,s.toWireType(r,t)),Pt(r)}})),[{name:t.name,fromWireType:function(e){for(var t=new Array(n),o=0;o<n;++o)t[o]=r[o].read(e);return a(e),t},toWireType:function(e,o){if(n!==o.length)throw new TypeError("Incorrect number of tuple elements for "+t.name+": expected="+n+", actual="+o.length);for(var s=i(),c=0;c<n;++c)r[c].write(s,o[c]);return null!==e&&e.push(a,s),s},argPackAdvance:8,readValueFromPointer:xt,destructorFunction:a}]}))}var Ht={};function Bt(e){var t=Ht[e];delete Ht[e];var r=t.rawConstructor,n=t.rawDestructor,o=t.fields;Lt([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,d=t.setterContext;i[n]={read:function(e){return a.fromWireType(s(c,e))},write:function(e,t){var r=[];l(d,e,u.toWireType(r,t)),Pt(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:xt,destructorFunction:n}]}))}function Xt(e,t,r,n,o){}function Qt(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 Gt(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);qt=e}var qt=void 0;function Vt(e){for(var t="",r=e;Q[r];)t+=qt[Q[r++]];return t}var Wt=void 0;function zt(e){throw new Wt(e)}function $t(e,t,r={}){if(!("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'),Mt.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;zt("Cannot register type '"+n+"' twice")}if(Mt[e]=t,delete Rt[e],St.hasOwnProperty(e)){var o=St[e];delete St[e],o.forEach((function(e){e()}))}}function Yt(e,t,r,n,o){var i=Qt(r);$t(e,{name:t=Vt(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=X;else if(2===r)n=G;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=V}return this.fromWireType(n[e>>i])},destructorFunction:null})}function Kt(e){if(!(this instanceof Tr))return!1;if(!(e instanceof Tr))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 Jt(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 er=!1;function tr(e){}function rr(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function nr(e){e.count.value-=1,0===e.count.value&&rr(e)}function or(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=or(e,t,r.baseClass);return null===n?null:r.downcast(n)}var ir={};function ar(){return Object.keys(pr).length}function sr(){var e=[];for(var t in pr)pr.hasOwnProperty(t)&&e.push(pr[t]);return e}var cr=[];function ur(){for(;cr.length;){var e=cr.pop();e.$$.deleteScheduled=!1,e.delete()}}var lr=void 0;function dr(e){lr=e,cr.length&&lr&&lr(ur)}function fr(){o.getInheritedInstanceCount=ar,o.getLiveInheritedInstances=sr,o.flushPendingDeletes=ur,o.setDelayFunction=dr}var pr={};function gr(e,t){for(void 0===t&&zt("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function hr(e,t){return t=gr(e,t),pr[t]}function mr(e,t){return t.ptrType&&t.ptr||jt("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&jt("Both smartPtrType and smartPtr must be specified"),t.count={value:1},br(Object.create(e,{$$:{value:t}}))}function vr(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=hr(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?mr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):mr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=ir[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var c=or(t,this.registeredClass,i.registeredClass);return null===c?o.call(this):this.isSmartPointer?mr(i.registeredClass.instancePrototype,{ptrType:i,ptr:c,smartPtrType:this,smartPtr:e}):mr(i.registeredClass.instancePrototype,{ptrType:i,ptr:c})}function br(e){return"undefined"==typeof FinalizationRegistry?(br=e=>e,e):(er=new FinalizationRegistry((e=>{console.warn(e.leakWarning.stack.replace(/^Error: /,"")),nr(e.$$)})),tr=e=>er.unregister(e),(br=e=>{var t=e.$$;if(t.smartPtr){var r={$$:t},n=t.ptrType.registeredClass;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,vr),er.register(e,r,e)}return e})(e))}function yr(){if(this.$$.ptr||Zt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=br(Object.create(Object.getPrototypeOf(this),{$$:{value:Jt(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Er(){this.$$.ptr||Zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&zt("Object already scheduled for deletion"),tr(this),nr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function wr(){return!this.$$.ptr}function _r(){return this.$$.ptr||Zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&zt("Object already scheduled for deletion"),cr.push(this),1===cr.length&&lr&&lr(ur),this.$$.deleteScheduled=!0,this}function Or(){Tr.prototype.isAliasOf=Kt,Tr.prototype.clone=yr,Tr.prototype.delete=Er,Tr.prototype.isDeleted=wr,Tr.prototype.deleteLater=_r}function Tr(){}function Dr(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 Pr(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"),Dr(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 xr(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 Sr(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 Mr(e,t){if(null===t)return this.isReference&&zt("null is not a valid "+this.name),0;t.$$||zt('Cannot pass "'+ln(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 Sr(t.$$.ptr,r,this.registeredClass)}function Rr(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 "'+ln(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=Sr(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,nn.toHandle((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:zt("Unsupporting sharing policy")}return r}function kr(e,t){if(null===t)return this.isReference&&zt("null is not a valid "+this.name),0;t.$$||zt('Cannot pass "'+ln(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 Sr(t.$$.ptr,r,this.registeredClass)}function Fr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Ar(e){this.rawDestructor&&this.rawDestructor(e)}function Cr(e){null!==e&&e.delete()}function Ir(){Nr.prototype.getPointee=Fr,Nr.prototype.destructor=Ar,Nr.prototype.argPackAdvance=8,Nr.prototype.readValueFromPointer=xt,Nr.prototype.deleteObject=Cr,Nr.prototype.fromWireType=vr}function Nr(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=Rr:n?(this.toWireType=Mr,this.destructorFunction=null):(this.toWireType=kr,this.destructorFunction=null)}function jr(e,t,r){o.hasOwnProperty(e)||jt("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 Ur(e,t,r){return e.includes("j")?Lr(e,t,r):(C(Ze(t),"missing table entry in dynCall: "+t),Ze(t).apply(null,r))}function Hr(e,t){C(e.includes("j"),"getDynCaller should only be called with i64 sigs");var r=[];return function(){return r.length=0,Object.assign(r,arguments),Ur(e,t,r)}}function Br(e,t){var r=(e=Vt(e)).includes("j")?Hr(e,t):Ze(t);return"function"!=typeof r&&zt("unknown function pointer with signature "+e+": "+t),r}var Xr=void 0;function Qr(e){var t=Ff(e),r=Vt(t);return Rf(t),r}function Gr(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||Mt[t]||(Rt[t]?Rt[t].forEach(e):(r.push(t),n[t]=!0))})),new Xr(e+": "+r.map(Qr).join([", "]))}function qr(e,t,r,n,o,i,a,s,c,u,l,d,f){l=Vt(l),i=Br(o,i),s&&(s=Br(a,s)),u&&(u=Br(c,u)),f=Br(d,f);var p=At(l);Pr(p,(function(){Gr("Cannot construct "+l+" due to unbound types",[n])})),Lt([e,t,r],n?[n]:[],(function(t){var r,o;t=t[0],o=n?(r=t.registeredClass).instancePrototype:Tr.prototype;var a=Ct(p,(function(){if(Object.getPrototypeOf(this)!==c)throw new Wt("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Wt(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Wt("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(d.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),c=Object.create(o,{constructor:{value:a}});a.prototype=c;var d=new xr(l,a,c,f,r,i,s,u),g=new Nr(l,d,!0,!1,!1),h=new Nr(l+"*",d,!1,!1,!1),m=new Nr(l+" const*",d,!1,!0,!1);return ir[e]={pointerType:h,constPointerType:m},jr(p,a),[g,h,m]}))}function Vr(e,t){for(var r=[],n=0;n<e;n++)r.push(V[(t>>2)+n]);return r}function Wr(e,t,r,n,o,i){C(t>0);var a=Vr(t,r);o=Br(n,o),Lt([],[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 Wt("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]=()=>{Gr("Cannot construct "+e.name+" due to unbound types",a)},Lt([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=$r(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 $r(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="",d="";for(c=0;c<i-2;++c)l+=(0!==c?", ":"")+"arg"+c,d+=(0!==c?", ":"")+"arg"+c+"Wired";var f="return function "+At(e)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(f+="var destructors = [];\n");var p=s?"destructors":"null",g=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],h=[zt,n,o,Pt,t[0],t[1]];for(a&&(f+="var thisWired = classParam.toWireType("+p+", this);\n"),c=0;c<i-2;++c)f+="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&&(d="thisWired"+(d.length>0?", ":"")+d),f+=(u?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",s)f+="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&&(f+=m+"_dtor("+m+"); // "+t[c].name+"\n",g.push(m+"_dtor"),h.push(t[c].destructorFunction))}return u&&(f+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),f+="}\n",g.push(f),zr(Function,g).apply(null,h)}function Yr(e,t,r,n,o,i,a,s){var c=Vr(r,n);t=Vt(t),i=Br(o,i),Lt([],[e],(function(e){var n=(e=e[0]).name+"."+t;function o(){Gr("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):(Dr(u,t,n),u[t].overloadTable[r-2]=o),Lt([],c,(function(o){var s=$r(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 Kr=[],Jr=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function Zr(e){e>4&&0==--Jr[e].refcount&&(Jr[e]=void 0,Kr.push(e))}function en(){for(var e=0,t=5;t<Jr.length;++t)void 0!==Jr[t]&&++e;return e}function tn(){for(var e=5;e<Jr.length;++e)if(void 0!==Jr[e])return Jr[e];return null}function rn(){o.count_emval_handles=en,o.get_first_emval=tn}var nn={toValue:function(e){return e||zt("Cannot use deleted val. handle = "+e),Jr[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=Kr.length?Kr.pop():Jr.length;return Jr[t]={refcount:1,value:e},t}}};function on(e,t){$t(e,{name:t=Vt(t),fromWireType:function(e){var t=nn.toValue(e);return Zr(e),t},toWireType:function(e,t){return nn.toHandle(t)},argPackAdvance:8,readValueFromPointer:xt,destructorFunction:null})}function an(e,t,r){switch(t){case 0:return function(e){var t=r?X:Q;return this.fromWireType(t[e])};case 1:return function(e){var t=r?G:q;return this.fromWireType(t[e>>1])};case 2:return function(e){var t=r?V:W;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function sn(e,t,r,n){var o=Qt(r);function i(){}t=Vt(t),i.values={},$t(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:an(t,o,n),destructorFunction:null}),Pr(t,i)}function cn(e,t){var r=Mt[e];return void 0===r&&zt(t+" has unknown type "+Qr(e)),r}function un(e,t,r){var n=cn(e,"enum");t=Vt(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 ln(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function dn(e,t){switch(t){case 2:return function(e){return this.fromWireType(z[e>>2])};case 3:return function(e){return this.fromWireType($[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function fn(e,t,r){var n=Qt(r);$t(e,{name:t=Vt(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+ln(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:dn(t,n),destructorFunction:null})}function pn(e,t,r,n,o,i){var a=Vr(t,r);e=Vt(e),o=Br(n,o),Pr(e,(function(){Gr("Cannot call "+e+" due to unbound types",a)}),t-1),Lt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return jr(e,$r(e,n,null,o,i),t-1),[]}))}function gn(e,t,r){switch(t){case 0:return r?function(e){return X[e]}:function(e){return Q[e]};case 1:return r?function(e){return G[e>>1]}:function(e){return q[e>>1]};case 2:return r?function(e){return V[e>>2]}:function(e){return W[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function hn(e,t,r,n,o){t=Vt(t),-1===o&&(o=4294967295);var i=Qt(r),a=e=>e;if(0===n){var s=32-8*r;a=e=>e<<s>>>s}var c=t.includes("unsigned"),u=(e,r)=>{if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+ln(e)+'" to '+r);if(e<n||e>o)throw new TypeError('Passing a number "'+ln(e)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!")};$t(e,{name:t,fromWireType:a,toWireType:c?function(e,t){return u(t,this.name),t>>>0}:function(e,t){return u(t,this.name),t},argPackAdvance:8,readValueFromPointer:gn(t,i,0!==n),destructorFunction:null})}function mn(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(B,o,r)}$t(e,{name:r=Vt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function vn(e,t,r,n,o,i,a,s,c,u,l,d){r=Vt(r),i=Br(o,i),s=Br(a,s),u=Br(c,u),d=Br(l,d),Lt([e],[t],(function(e){return e=e[0],[new Nr(r,e.registeredClass,!1,!1,!0,e,n,i,s,u,d)]}))}function bn(e,t){var r="std::string"===(t=Vt(t));$t(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==Q[a]){var s=j(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(Q[e+4+i]);t=c.join("")}return Rf(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?()=>H(t):()=>t.length)(),i=Mf(4+o+1);if(W[i>>2]=o,r&&n)U(t,i+4,o+1);else if(n)for(var a=0;a<o;++a){var s=t.charCodeAt(a);s>255&&(Rf(i),zt("String has UTF-16 code units that do not fit in 8 bits")),Q[i+4+a]=s}else for(a=0;a<o;++a)Q[i+4+a]=t[a];return null!==e&&e.push(Rf,i),i},argPackAdvance:8,readValueFromPointer:xt,destructorFunction:function(e){Rf(e)}})}function yn(e,t,r){var n,o,i,a,s;r=Vt(r),2===t?(n=K,o=J,a=Z,i=()=>q,s=1):4===t&&(n=ee,o=te,a=re,i=()=>W,s=2),$t(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 d=n(c,l-c);void 0===r?r=d:(r+=String.fromCharCode(0),r+=d),c=l+t}}return Rf(e),r},toWireType:function(e,n){"string"!=typeof n&&zt("Cannot pass non-string to C++ string type "+r);var i=a(n),c=Mf(4+i+t);return W[c>>2]=i>>s,o(n,c+4,i+t),null!==e&&e.push(Rf,c),c},argPackAdvance:8,readValueFromPointer:xt,destructorFunction:function(e){Rf(e)}})}function En(e,t,r,n,o,i){Dt[e]={name:Vt(t),rawConstructor:Br(r,n),rawDestructor:Br(o,i),elements:[]}}function wn(e,t,r,n,o,i,a,s,c){Dt[e].elements.push({getterReturnType:t,getter:Br(r,n),getterContext:o,setterArgumentType:i,setter:Br(a,s),setterContext:c})}function _n(e,t,r,n,o,i){Ht[e]={name:Vt(t),rawConstructor:Br(r,n),rawDestructor:Br(o,i),fields:[]}}function On(e,t,r,n,o,i,a,s,c,u){Ht[e].fields.push({fieldName:Vt(t),getterReturnType:r,getter:Br(n,o),getterContext:i,setterArgumentType:a,setter:Br(s,c),setterContext:u})}function Tn(e,t){$t(e,{isVoid:!0,name:t=Vt(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})}function Dn(){throw"longjmp"}function Pn(e,t,r){e=nn.toValue(e),t=cn(t,"emval::as");var n=[],o=nn.toHandle(n);return V[r>>2]=o,t.toWireType(n,e)}function xn(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=cn(V[(t>>2)+n],"parameter "+n);return r}function Sn(e,t,r,n){e=nn.toValue(e);for(var o=xn(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 nn.toHandle(c)}function Mn(e){var t=[];return V[e>>2]=nn.toHandle(t),t}var Rn={};function kn(e){var t=Rn[e];return void 0===t?Vt(e):t}var Fn=[];function An(e,t,r,n,o){return(e=Fn[e])(t=nn.toValue(t),r=kn(r),Mn(n),o)}function Cn(e,t,r,n){(e=Fn[e])(t=nn.toValue(t),r=kn(r),null,n)}function In(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Nn(e){return 0===e?nn.toHandle(In()):(e=kn(e),nn.toHandle(In()[e]))}function jn(e){var t=Fn.length;return Fn.push(e),t}var Ln=[];function Un(e,t){var r=xn(e,t),n=r[0],o=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",i=Ln[o];if(void 0!==i)return i;for(var a=["retType"],s=[n],c="",u=0;u<e-1;++u)c+=(0!==u?", ":"")+"arg"+u,a.push("argType"+u),s.push(r[1+u]);var l="return function "+At("methodCaller_"+o)+"(handle, name, destructors, args) {\n",d=0;for(u=0;u<e-1;++u)l+=" var arg"+u+" = argType"+u+".readValueFromPointer(args"+(d?"+"+d:"")+");\n",d+=r[u+1].argPackAdvance;for(l+=" var rv = handle[name]("+c+");\n",u=0;u<e-1;++u)r[u+1].deleteObject&&(l+=" argType"+u+".deleteObject(arg"+u+");\n");return n.isVoid||(l+=" return retType.toWireType(destructors, rv);\n"),l+="};\n",a.push(l),i=jn(zr(Function,a).apply(null,s)),Ln[o]=i,i}function Hn(e,t){return e=nn.toValue(e),t=nn.toValue(t),nn.toHandle(e[t])}function Bn(e){e>4&&(Jr[e].refcount+=1)}function Xn(e,t){return(e=nn.toValue(e))instanceof nn.toValue(t)}function Qn(e){return"string"==typeof(e=nn.toValue(e))}function Gn(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)(cn,o,nn.toHandle)}var qn,Vn={};function Wn(e,t,r,n){e=nn.toValue(e);var o=Vn[t];return o||(o=Gn(t),Vn[t]=o),o(e,r,n)}function zn(){return nn.toHandle([])}function $n(e){return nn.toHandle(kn(e))}function Yn(){return nn.toHandle({})}function Kn(e){Pt(nn.toValue(e)),Zr(e)}function Jn(e,t,r){e=nn.toValue(e),t=nn.toValue(t),r=nn.toValue(r),e[t]=r}function Zn(e,t){var r=(e=cn(e,"_emval_take_value")).readValueFromPointer(t);return nn.toHandle(r)}function eo(e){throw nn.toValue(e)}function to(e,t){var r=new Date(1e3*V[e>>2]);V[t>>2]=r.getSeconds(),V[t+4>>2]=r.getMinutes(),V[t+8>>2]=r.getHours(),V[t+12>>2]=r.getDate(),V[t+16>>2]=r.getMonth(),V[t+20>>2]=r.getFullYear()-1900,V[t+24>>2]=r.getDay();var n=new Date(r.getFullYear(),0,1),o=(r.getTime()-n.getTime())/864e5|0;V[t+28>>2]=o,V[t+36>>2]=-60*r.getTimezoneOffset();var i=new Date(r.getFullYear(),6,1).getTimezoneOffset(),a=n.getTimezoneOffset(),s=0|(i!=a&&r.getTimezoneOffset()==Math.min(a,i));V[t+32>>2]=s}function ro(e){var t=new Date(V[e+20>>2]+1900,V[e+16>>2],V[e+12>>2],V[e+8>>2],V[e+4>>2],V[e>>2],0),r=V[e+32>>2],n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=o.getTimezoneOffset(),s=Math.min(a,i);if(r<0)V[e+32>>2]=Number(i!=a&&s==n);else if(r>0!=(s==n)){var c=Math.max(a,i),u=r>0?s:c;t.setTime(t.getTime()+6e4*(u-n))}V[e+24>>2]=t.getDay();var l=(t.getTime()-o.getTime())/864e5|0;return V[e+28>>2]=l,V[e>>2]=t.getSeconds(),V[e+4>>2]=t.getMinutes(),V[e+8>>2]=t.getHours(),V[e+12>>2]=t.getDate(),V[e+16>>2]=t.getMonth(),t.getTime()/1e3|0}function no(e,t,r){var n=(new Date).getFullYear(),o=new Date(n,0,1),i=new Date(n,6,1),a=o.getTimezoneOffset(),s=i.getTimezoneOffset(),c=Math.max(a,s);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}V[e>>2]=60*c,V[t>>2]=Number(a!=s);var l=u(o),d=u(i),f=ne(l),p=ne(d);s<a?(V[r>>2]=f,V[r+4>>2]=p):(V[r>>2]=p,V[r+4>>2]=f)}function oo(e,t,r){oo.called||(oo.called=!0,no(e,t,r))}function io(){Le("native code called abort()")}qn=()=>performance.now();var ao=!0;function so(e,t){var r;if(0===e)r=Date.now();else{if(1!==e&&4!==e||!ao)return it(28),-1;r=qn()}return V[t>>2]=r/1e3|0,V[t+4>>2]=r%1e3*1e3*1e3|0,0}function co(e,t){if(ho.mainLoop.timingMode=e,ho.mainLoop.timingValue=t,!ho.mainLoop.func)return O("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(ho.mainLoop.running||(ho.mainLoop.running=!0),0==e)ho.mainLoop.scheduler=function(){var e=0|Math.max(0,ho.mainLoop.tickStartTime+t-qn());setTimeout(ho.mainLoop.runner,e)},ho.mainLoop.method="timeout";else if(1==e)ho.mainLoop.scheduler=function(){ho.requestAnimationFrame(ho.mainLoop.runner)},ho.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),p?(void 0===o.setImmediates&&(o.setImmediates=[]),o.setImmediates.push(e),postMessage({target:n})):postMessage(n,"*")}}ho.mainLoop.scheduler=function(){setImmediate(ho.mainLoop.runner)},ho.mainLoop.method="immediate"}return 0}function uo(e){Jf(e)}function lo(){if(!_e())try{uo(F)}catch(e){et(e)}}function fo(e,t,r,n,i){C(!ho.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."),ho.mainLoop.func=e,ho.mainLoop.arg=n;var a=ho.mainLoop.currentlyRunningMainloop;function s(){return!(a<ho.mainLoop.currentlyRunningMainloop&&(lo(),1))}if(ho.mainLoop.running=!1,ho.mainLoop.runner=function(){if(!A)if(ho.mainLoop.queue.length>0){var t=Date.now(),r=ho.mainLoop.queue.shift();if(r.func(r.arg),ho.mainLoop.remainingBlockers){var n=ho.mainLoop.remainingBlockers,i=n%1==0?n-1:Math.floor(n);r.counted?ho.mainLoop.remainingBlockers=i:(i+=.5,ho.mainLoop.remainingBlockers=(8*n+i)/9)}if(_('main loop blocker "'+r.name+'" took '+(Date.now()-t)+" ms"),ho.mainLoop.updateStatus(),!s())return;setTimeout(ho.mainLoop.runner,0)}else s()&&(ho.mainLoop.currentFrameNumber=ho.mainLoop.currentFrameNumber+1|0,1==ho.mainLoop.timingMode&&ho.mainLoop.timingValue>1&&ho.mainLoop.currentFrameNumber%ho.mainLoop.timingValue!=0?ho.mainLoop.scheduler():(0==ho.mainLoop.timingMode&&(ho.mainLoop.tickStartTime=qn()),"timeout"===ho.mainLoop.method&&o.ctx&&(T("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!"),ho.mainLoop.method=""),ho.mainLoop.runIter(e),pe(),s()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),ho.mainLoop.scheduler())))},i||(t&&t>0?co(0,1e3/t):co(1,1),ho.mainLoop.scheduler()),r)throw"unwind"}function po(e,t){if(Ee||A)O("user callback triggered after runtime exited or application aborted. Ignoring.");else if(t)e();else try{e()}catch(e){et(e)}}function go(e,t){return setTimeout((function(){po(e)}),t)}var ho={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){ho.mainLoop.scheduler=null,ho.mainLoop.currentlyRunningMainloop++},resume:function(){ho.mainLoop.currentlyRunningMainloop++;var e=ho.mainLoop.timingMode,t=ho.mainLoop.timingValue,r=ho.mainLoop.func;ho.mainLoop.func=null,fo(r,0,!1,ho.mainLoop.arg,!0),co(e,t),ho.mainLoop.scheduler()},updateStatus:function(){if(o.setStatus){var e=o.statusMessage||"Please wait...",t=ho.mainLoop.remainingBlockers,r=ho.mainLoop.expectedBlockers;t?t<r?o.setStatus(e+" ("+(r-t)+"/"+r+")"):o.setStatus(e):o.setStatus("")}},runIter:function(e){if(!A){if(o.preMainLoop&&!1===o.preMainLoop())return;po(e),o.postMainLoop&&o.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(o.preloadPlugins||(o.preloadPlugins=[]),!ho.initted){ho.initted=!0;try{new Blob,ho.hasBlobConstructor=!0}catch(e){ho.hasBlobConstructor=!1,_("warning: no blob constructor, cannot create blobs with mimetypes")}ho.BlobBuilder="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:ho.hasBlobConstructor?null:_("warning: no BlobBuilder"),ho.URLObject="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,o.noImageDecoding||void 0!==ho.URLObject||(_("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(ho.hasBlobConstructor)try{(i=new Blob([e],{type:ho.getMimetype(t)})).size!==e.length&&(i=new Blob([new Uint8Array(e).buffer],{type:ho.getMimetype(t)}))}catch(e){T("Blob constructor present but fails: "+e+"; falling back to blob builder")}if(!i){var a=new ho.BlobBuilder;a.append(new Uint8Array(e).buffer),i=a.getBlob()}var s=ho.URLObject.createObjectURL(i);C("string"==typeof s,"createObjectURL must return a url as a string");var c=new Image;c.onload=()=>{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,ho.URLObject.revokeObjectURL(s),r&&r(e)},c.onerror=e=>{_("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(!ho.hasBlobConstructor)return s();try{var c=new Blob([e],{type:ho.getMimetype(t)})}catch(e){return s()}var u=ho.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||(_("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,go((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){!ho.pointerLock&&o.canvas.requestPointerLock&&(o.canvas.requestPointerLock(),e.preventDefault())}),!1))}function n(){ho.pointerLock=document.pointerLockElement===o.canvas||document.mozPointerLockElement===o.canvas||document.webkitPointerLockElement===o.canvas||document.msPointerLockElement===o.canvas}},handledByPreloadPlugin:function(e,t,r,n){ho.init();var i=!1;return o.preloadPlugins.forEach((function(o){i||o.canHandle(t)&&(o.handle(e,t,r,n),i=!0)})),i},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!==To&&(a=To.createContext(e,s))&&(i=To.getContext(a).GLctx)}else i=e.getContext("2d");return i?(r&&(t||C(void 0===yf,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),o.ctx=i,t&&To.makeContextCurrent(a),o.useWebGL=t,ho.moduleContextCreatedCallbacks.forEach((function(e){e()})),ho.init()),i):null},destroyContext:function(e,t,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(e,t){ho.lockPointer=e,ho.resizeCanvas=t,void 0===ho.lockPointer&&(ho.lockPointer=!0),void 0===ho.resizeCanvas&&(ho.resizeCanvas=!1);var r=o.canvas;function n(){ho.isFullscreen=!1;var e=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(r.exitFullscreen=ho.exitFullscreen,ho.lockPointer&&r.requestPointerLock(),ho.isFullscreen=!0,ho.resizeCanvas?ho.setFullscreenCanvasSize():ho.updateCanvasDimensions(r)):(e.parentNode.insertBefore(r,e),e.parentNode.removeChild(e),ho.resizeCanvas?ho.setWindowedCanvasSize():ho.updateCanvasDimensions(r)),o.onFullScreen&&o.onFullScreen(ho.isFullscreen),o.onFullscreen&&o.onFullscreen(ho.isFullscreen)}ho.fullscreenHandlersInstalled||(ho.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(){Le("Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)")},exitFullscreen:function(){return!!ho.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===ho.nextRAF)ho.nextRAF=t+1e3/60;else for(;t+2>=ho.nextRAF;)ho.nextRAF+=1e3/60;var r=Math.max(ho.nextRAF-t,0);setTimeout(e,r)},requestAnimationFrame:function(e){"function"!=typeof requestAnimationFrame?(0,ho.fakeRequestAnimationFrame)(e):requestAnimationFrame(e)},safeSetTimeout:function(e){return go(e)},safeRequestAnimationFrame:function(e){return ho.requestAnimationFrame((function(){po(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(ho.pointerLock)"mousemove"!=e.type&&"mozMovementX"in e?ho.mouseMovementX=ho.mouseMovementY=0:(ho.mouseMovementX=ho.getMovementX(e),ho.mouseMovementY=ho.getMovementY(e)),"undefined"!=typeof SDL?(ho.mouseX=SDL.mouseX+ho.mouseMovementX,ho.mouseY=SDL.mouseY+ho.mouseMovementY):(ho.mouseX+=ho.mouseMovementX,ho.mouseY+=ho.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)ho.lastTouches[s.identifier]=l,ho.touches[s.identifier]=l;else if("touchend"===e.type||"touchmove"===e.type){var d=ho.touches[s.identifier];d||(d=l),ho.lastTouches[s.identifier]=d,ho.touches[s.identifier]=l}return}var f=e.pageX-(i+t.left),p=e.pageY-(a+t.top);f*=r/t.width,p*=n/t.height,ho.mouseMovementX=f-ho.mouseX,ho.mouseMovementY=p-ho.mouseY,ho.mouseX=f,ho.mouseY=p}},resizeListeners:[],updateResizeListeners:function(){var e=o.canvas;ho.resizeListeners.forEach((function(t){t(e.width,e.height)}))},setCanvasSize:function(e,t,r){var n=o.canvas;ho.updateCanvasDimensions(n,e,t),r||ho.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if("undefined"!=typeof SDL){var e=W[SDL.screen>>2];e|=8388608,V[SDL.screen>>2]=e}ho.updateCanvasDimensions(o.canvas),ho.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var e=W[SDL.screen>>2];e&=-8388609,V[SDL.screen>>2]=e}ho.updateCanvasDimensions(o.canvas),ho.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)}ho.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"))))}},mo={errorCode:12288,defaultDisplayInitialized:!1,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:!1,depth:!1,stencil:!1,antialias:!1},stringCache:{},setErrorCode:function(e){mo.errorCode=e},chooseConfig:function(e,t,r,n,o){if(62e3!=e)return mo.setErrorCode(12296),0;if(t)for(;;){var i=V[t>>2];if(12321==i){var a=V[t+4>>2];mo.contextAttributes.alpha=a>0}else if(12325==i){var s=V[t+4>>2];mo.contextAttributes.depth=s>0}else if(12326==i){var c=V[t+4>>2];mo.contextAttributes.stencil=c>0}else if(12337==i){var u=V[t+4>>2];mo.contextAttributes.antialias=u>0}else if(12338==i)u=V[t+4>>2],mo.contextAttributes.antialias=1==u;else if(12544==i){var l=V[t+4>>2];mo.contextAttributes.lowLatency=12547!=l}else if(12344==i)break;t+=8}return r&&n||o?(o&&(V[o>>2]=1),r&&n>0&&(V[r>>2]=62002),mo.setErrorCode(12288),1):(mo.setErrorCode(12300),0)}};function vo(e,t,r,n,o){return mo.chooseConfig(e,t,r,n,o)}function bo(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 yo(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 Eo(e){var t=e.getExtension("WEBGL_draw_buffers");if(t)return e.drawBuffers=function(e,r){t.drawBuffersWEBGL(e,r)},1}function wo(e){return!!(e.dibvbi=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function _o(e){return!!(e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))}function Oo(e){return!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw"))}var To={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function(e){To.lastError||(To.lastError=e)},getNewId:function(e){for(var t=To.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?V[n+4*i>>2]:-1;o+=j(V[r+4*i>>2],a<0?void 0:a)}return o},createContext:function(e,t){if(!e.getContextSafariWebGL2Fixed){function t(t,r){var n=e.getContextSafariWebGL2Fixed(t,r);return"webgl"==t==n instanceof WebGLRenderingContext?n:null}e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=t}var r=t.majorVersion>1?e.getContext("webgl2",t):e.getContext("webgl",t);return r?To.registerContext(r,t):0},registerContext:function(e,t){var r=To.getNewId(To.contexts),n={handle:r,attributes:t,version:t.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),To.contexts[r]=n,(void 0===t.enableExtensionsByDefault||t.enableExtensionsByDefault)&&To.initExtensions(n),r},makeContextCurrent:function(e){return To.currentContext=To.contexts[e],o.ctx=yf=To.currentContext&&To.currentContext.GLctx,!(e&&!yf)},getContext:function(e){return To.contexts[e]},deleteContext:function(e){To.currentContext===To.contexts[e]&&(To.currentContext=null),"object"==typeof Dl&&Dl.removeAllHandlersOnTarget(To.contexts[e].GLctx.canvas),To.contexts[e]&&To.contexts[e].GLctx.canvas&&(To.contexts[e].GLctx.canvas.GLctxObject=void 0),To.contexts[e]=null},initExtensions:function(e){if(e||(e=To.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var t=e.GLctx;bo(t),yo(t),Eo(t),wo(t),_o(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")),Oo(t),(t.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}};function Do(e,t,r,n){if(62e3!=e)return mo.setErrorCode(12296),0;for(var i=1;;){var a=V[n>>2];if(12440!=a){if(12344==a)break;return mo.setErrorCode(12292),0}i=V[n+4>>2],n+=8}return i<2||i>3?(mo.setErrorCode(12293),0):(mo.contextAttributes.majorVersion=i-1,mo.contextAttributes.minorVersion=0,mo.context=To.createContext(o.canvas,mo.contextAttributes),0!=mo.context?(mo.setErrorCode(12288),To.makeContextCurrent(mo.context),o.useWebGL=!0,ho.moduleContextCreatedCallbacks.forEach((function(e){e()})),To.makeContextCurrent(null),62004):(mo.setErrorCode(12297),0))}function Po(e,t,r,n){return 62e3!=e?(mo.setErrorCode(12296),0):62002!=t?(mo.setErrorCode(12293),0):(mo.setErrorCode(12288),62006)}function xo(e,t){return 62e3!=e?(mo.setErrorCode(12296),0):62004!=t?(mo.setErrorCode(12294),0):(To.deleteContext(mo.context),mo.setErrorCode(12288),mo.currentContext==t&&(mo.currentContext=0),1)}function So(e,t){return 62e3!=e?(mo.setErrorCode(12296),0):62006!=t?(mo.setErrorCode(12301),1):(mo.currentReadSurface==t&&(mo.currentReadSurface=0),mo.currentDrawSurface==t&&(mo.currentDrawSurface=0),mo.setErrorCode(12288),1)}function Mo(e,t,r,n){if(62e3!=e)return mo.setErrorCode(12296),0;if(62002!=t)return mo.setErrorCode(12293),0;if(!n)return mo.setErrorCode(12300),0;switch(mo.setErrorCode(12288),r){case 12320:return V[n>>2]=mo.contextAttributes.alpha?32:24,1;case 12321:return V[n>>2]=mo.contextAttributes.alpha?8:0,1;case 12322:case 12323:case 12324:return V[n>>2]=8,1;case 12325:return V[n>>2]=mo.contextAttributes.depth?24:0,1;case 12326:return V[n>>2]=mo.contextAttributes.stencil?8:0,1;case 12327:return V[n>>2]=12344,1;case 12328:return V[n>>2]=62002,1;case 12329:return V[n>>2]=0,1;case 12330:return V[n>>2]=4096,1;case 12331:return V[n>>2]=16777216,1;case 12332:return V[n>>2]=4096,1;case 12333:case 12334:return V[n>>2]=0,1;case 12335:return V[n>>2]=12344,1;case 12337:return V[n>>2]=mo.contextAttributes.antialias?4:0,1;case 12338:return V[n>>2]=mo.contextAttributes.antialias?1:0,1;case 12339:return V[n>>2]=4,1;case 12340:return V[n>>2]=12344,1;case 12341:case 12342:case 12343:return V[n>>2]=-1,1;case 12345:case 12346:case 12347:return V[n>>2]=0,1;case 12348:return V[n>>2]=1,1;case 12349:case 12350:return V[n>>2]=0,1;case 12351:return V[n>>2]=12430,1;case 12352:return V[n>>2]=4,1;case 12354:return V[n>>2]=0,1;default:return mo.setErrorCode(12292),0}}function Ro(e){return mo.setErrorCode(12288),62e3}function ko(){return mo.errorCode}function Fo(e,t,r){return 62e3==e?(t&&(V[t>>2]=1),r&&(V[r>>2]=4),mo.defaultDisplayInitialized=!0,mo.setErrorCode(12288),1):(mo.setErrorCode(12296),0)}function Ao(e,t,r,n){return 62e3!=e?(mo.setErrorCode(12296),0):0!=n&&62004!=n?(mo.setErrorCode(12294),0):0!=r&&62006!=r||0!=t&&62006!=t?(mo.setErrorCode(12301),0):(To.makeContextCurrent(n?mo.context:null),mo.currentContext=n,mo.currentDrawSurface=t,mo.currentReadSurface=r,mo.setErrorCode(12288),1)}function Co(){if(mo.defaultDisplayInitialized)if(o.ctx){if(!o.ctx.isContextLost())return mo.setErrorCode(12288),1;mo.setErrorCode(12302)}else mo.setErrorCode(12290);else mo.setErrorCode(12289);return 0}function Io(e){return 62e3!=e?(mo.setErrorCode(12296),0):(mo.currentContext=0,mo.currentReadSurface=0,mo.currentDrawSurface=0,mo.defaultDisplayInitialized=!1,mo.setErrorCode(12288),1)}function No(e){C("number"==typeof e),console.error(j(e))}function jo(e){C("number"==typeof e),console.log(j(e))}function Lo(e){C("number"==typeof e),console.warn(j(e))}function Uo(){}function Ho(){return 2147483648}function Bo(e){yf.activeTexture(e)}function Xo(e,t){yf.attachShader(To.programs[e],To.shaders[t])}function Qo(e,t){yf.beginQuery(e,To.queries[t])}function Go(e,t){yf.disjointTimerQueryExt.beginQueryEXT(e,To.queries[t])}function qo(e){yf.beginTransformFeedback(e)}function Vo(e,t,r){yf.bindAttribLocation(To.programs[e],t,j(r))}function Wo(e,t){35051==e?yf.currentPixelPackBufferBinding=t:35052==e&&(yf.currentPixelUnpackBufferBinding=t),yf.bindBuffer(e,To.buffers[t])}function zo(e,t,r){yf.bindBufferBase(e,t,To.buffers[r])}function $o(e,t,r,n,o){yf.bindBufferRange(e,t,To.buffers[r],n,o)}function Yo(e,t){yf.bindFramebuffer(e,To.framebuffers[t])}function Ko(e,t){yf.bindRenderbuffer(e,To.renderbuffers[t])}function Jo(e,t){yf.bindSampler(e,To.samplers[t])}function Zo(e,t){yf.bindTexture(e,To.textures[t])}function ei(e,t){yf.bindTransformFeedback(e,To.transformFeedbacks[t])}function ti(e){yf.bindVertexArray(To.vaos[e])}function ri(e){yf.bindVertexArray(To.vaos[e])}function ni(e,t,r,n){yf.blendColor(e,t,r,n)}function oi(e){yf.blendEquation(e)}function ii(e,t){yf.blendEquationSeparate(e,t)}function ai(e,t){yf.blendFunc(e,t)}function si(e,t,r,n){yf.blendFuncSeparate(e,t,r,n)}function ci(e,t,r,n,o,i,a,s,c,u){yf.blitFramebuffer(e,t,r,n,o,i,a,s,c,u)}function ui(e,t,r,n){To.currentContext.version>=2?r?yf.bufferData(e,Q,n,r,t):yf.bufferData(e,t,n):yf.bufferData(e,r?Q.subarray(r,r+t):t,n)}function li(e,t,r,n){To.currentContext.version>=2?yf.bufferSubData(e,t,Q,n,r):yf.bufferSubData(e,t,Q.subarray(n,n+r))}function di(e){return yf.checkFramebufferStatus(e)}function fi(e){yf.clear(e)}function pi(e,t,r,n){yf.clearBufferfi(e,t,r,n)}function gi(e,t,r){yf.clearBufferfv(e,t,z,r>>2)}function hi(e,t,r){yf.clearBufferiv(e,t,V,r>>2)}function mi(e,t,r){yf.clearBufferuiv(e,t,W,r>>2)}function vi(e,t,r,n){yf.clearColor(e,t,r,n)}function bi(e){yf.clearDepth(e)}function yi(e){yf.clearStencil(e)}function Ei(e,t){return C(t===(0|t)),(e>>>0)+4294967296*t}function wi(e,t,r,n){return yf.clientWaitSync(To.syncs[e],t,Ei(r,n))}function _i(e,t,r,n){yf.colorMask(!!e,!!t,!!r,!!n)}function Oi(e){yf.compileShader(To.shaders[e])}function Ti(e,t,r,n,o,i,a,s){To.currentContext.version>=2?yf.currentPixelUnpackBufferBinding?yf.compressedTexImage2D(e,t,r,n,o,i,a,s):yf.compressedTexImage2D(e,t,r,n,o,i,Q,s,a):yf.compressedTexImage2D(e,t,r,n,o,i,s?Q.subarray(s,s+a):null)}function Di(e,t,r,n,o,i,a,s,c){yf.currentPixelUnpackBufferBinding?yf.compressedTexImage3D(e,t,r,n,o,i,a,s,c):yf.compressedTexImage3D(e,t,r,n,o,i,a,Q,c,s)}function Pi(e,t,r,n,o,i,a,s,c){To.currentContext.version>=2?yf.currentPixelUnpackBufferBinding?yf.compressedTexSubImage2D(e,t,r,n,o,i,a,s,c):yf.compressedTexSubImage2D(e,t,r,n,o,i,a,Q,c,s):yf.compressedTexSubImage2D(e,t,r,n,o,i,a,c?Q.subarray(c,c+s):null)}function xi(e,t,r,n,o,i,a,s,c,u,l){yf.currentPixelUnpackBufferBinding?yf.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,u,l):yf.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,Q,l,u)}function Si(e,t,r,n,o){yf.copyBufferSubData(e,t,r,n,o)}function Mi(e,t,r,n,o,i,a,s){yf.copyTexImage2D(e,t,r,n,o,i,a,s)}function Ri(e,t,r,n,o,i,a,s){yf.copyTexSubImage2D(e,t,r,n,o,i,a,s)}function ki(e,t,r,n,o,i,a,s,c){yf.copyTexSubImage3D(e,t,r,n,o,i,a,s,c)}function Fi(){var e=To.getNewId(To.programs),t=yf.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,To.programs[e]=t,e}function Ai(e){var t=To.getNewId(To.shaders);return To.shaders[t]=yf.createShader(e),t}function Ci(e){yf.cullFace(e)}function Ii(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.buffers[n];o&&(yf.deleteBuffer(o),o.name=0,To.buffers[n]=null,n==yf.currentPixelPackBufferBinding&&(yf.currentPixelPackBufferBinding=0),n==yf.currentPixelUnpackBufferBinding&&(yf.currentPixelUnpackBufferBinding=0))}}function Ni(e,t){for(var r=0;r<e;++r){var n=V[t+4*r>>2],o=To.framebuffers[n];o&&(yf.deleteFramebuffer(o),o.name=0,To.framebuffers[n]=null)}}function ji(e){if(e){var t=To.programs[e];t?(yf.deleteProgram(t),t.name=0,To.programs[e]=null):To.recordError(1281)}}function Li(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.queries[n];o&&(yf.deleteQuery(o),To.queries[n]=null)}}function Ui(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.queries[n];o&&(yf.disjointTimerQueryExt.deleteQueryEXT(o),To.queries[n]=null)}}function Hi(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.renderbuffers[n];o&&(yf.deleteRenderbuffer(o),o.name=0,To.renderbuffers[n]=null)}}function Bi(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.samplers[n];o&&(yf.deleteSampler(o),o.name=0,To.samplers[n]=null)}}function Xi(e){if(e){var t=To.shaders[e];t?(yf.deleteShader(t),To.shaders[e]=null):To.recordError(1281)}}function Qi(e){if(e){var t=To.syncs[e];t?(yf.deleteSync(t),t.name=0,To.syncs[e]=null):To.recordError(1281)}}function Gi(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.textures[n];o&&(yf.deleteTexture(o),o.name=0,To.textures[n]=null)}}function qi(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.transformFeedbacks[n];o&&(yf.deleteTransformFeedback(o),o.name=0,To.transformFeedbacks[n]=null)}}function Vi(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2];yf.deleteVertexArray(To.vaos[n]),To.vaos[n]=null}}function Wi(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2];yf.deleteVertexArray(To.vaos[n]),To.vaos[n]=null}}function zi(e){yf.depthFunc(e)}function $i(e){yf.depthMask(!!e)}function Yi(e,t){yf.depthRange(e,t)}function Ki(e,t){yf.detachShader(To.programs[e],To.shaders[t])}function Ji(e){yf.disable(e)}function Zi(e){yf.disableVertexAttribArray(e)}function ea(e,t,r){yf.drawArrays(e,t,r)}function ta(e,t,r,n){yf.drawArraysInstanced(e,t,r,n)}function ra(e,t,r,n){yf.drawArraysInstanced(e,t,r,n)}function na(e,t,r,n){yf.drawArraysInstanced(e,t,r,n)}function oa(e,t,r,n){yf.drawArraysInstanced(e,t,r,n)}function ia(e,t,r,n){yf.drawArraysInstanced(e,t,r,n)}var aa=[];function sa(e,t){for(var r=aa[e],n=0;n<e;n++)r[n]=V[t+4*n>>2];yf.drawBuffers(r)}function ca(e,t){for(var r=aa[e],n=0;n<e;n++)r[n]=V[t+4*n>>2];yf.drawBuffers(r)}function ua(e,t){for(var r=aa[e],n=0;n<e;n++)r[n]=V[t+4*n>>2];yf.drawBuffers(r)}function la(e,t,r,n){yf.drawElements(e,t,r,n)}function da(e,t,r,n,o){yf.drawElementsInstanced(e,t,r,n,o)}function fa(e,t,r,n,o){yf.drawElementsInstanced(e,t,r,n,o)}function pa(e,t,r,n,o){yf.drawElementsInstanced(e,t,r,n,o)}function ga(e,t,r,n,o){yf.drawElementsInstanced(e,t,r,n,o)}function ha(e,t,r,n,o){yf.drawElementsInstanced(e,t,r,n,o)}function ma(e,t,r,n){yf.drawElements(e,t,r,n)}function va(e,t,r,n,o,i){ma(e,n,o,i)}function ba(e){yf.enable(e)}function ya(e){yf.enableVertexAttribArray(e)}function Ea(e){yf.endQuery(e)}function wa(e){yf.disjointTimerQueryExt.endQueryEXT(e)}function _a(){yf.endTransformFeedback()}function Oa(e,t){var r=yf.fenceSync(e,t);if(r){var n=To.getNewId(To.syncs);return r.name=n,To.syncs[n]=r,n}return 0}function Ta(){yf.finish()}function Da(){yf.flush()}function Pa(e,t,r,n){yf.framebufferRenderbuffer(e,t,r,To.renderbuffers[n])}function xa(e,t,r,n,o){yf.framebufferTexture2D(e,t,r,To.textures[n],o)}function Sa(e,t,r,n,o){yf.framebufferTextureLayer(e,t,To.textures[r],n,o)}function Ma(e){yf.frontFace(e)}function Ra(e,t,r,n){for(var o=0;o<e;o++){var i=yf[r](),a=i&&To.getNewId(n);i?(i.name=a,n[a]=i):To.recordError(1282),V[t+4*o>>2]=a}}function ka(e,t){Ra(e,t,"createBuffer",To.buffers)}function Fa(e,t){Ra(e,t,"createFramebuffer",To.framebuffers)}function Aa(e,t){Ra(e,t,"createQuery",To.queries)}function Ca(e,t){for(var r=0;r<e;r++){var n=yf.disjointTimerQueryExt.createQueryEXT();if(!n){for(To.recordError(1282);r<e;)V[t+4*r++>>2]=0;return}var o=To.getNewId(To.queries);n.name=o,To.queries[o]=n,V[t+4*r>>2]=o}}function Ia(e,t){Ra(e,t,"createRenderbuffer",To.renderbuffers)}function Na(e,t){Ra(e,t,"createSampler",To.samplers)}function ja(e,t){Ra(e,t,"createTexture",To.textures)}function La(e,t){Ra(e,t,"createTransformFeedback",To.transformFeedbacks)}function Ua(e,t){Ra(e,t,"createVertexArray",To.vaos)}function Ha(e,t){Ra(e,t,"createVertexArray",To.vaos)}function Ba(e){yf.generateMipmap(e)}function Xa(e,t,r,n,o,i,a,s){t=To.programs[t];var c=yf[e](t,r);if(c){var u=s&&U(c.name,s,n);o&&(V[o>>2]=u),i&&(V[i>>2]=c.size),a&&(V[a>>2]=c.type)}}function Qa(e,t,r,n,o,i,a){Xa("getActiveAttrib",e,t,r,n,o,i,a)}function Ga(e,t,r,n,o,i,a){Xa("getActiveUniform",e,t,r,n,o,i,a)}function qa(e,t,r,n,o){e=To.programs[e];var i=yf.getActiveUniformBlockName(e,t);if(i)if(o&&r>0){var a=U(i,o,r);n&&(V[n>>2]=a)}else n&&(V[n>>2]=0)}function Va(e,t,r,n){if(n)if(e=To.programs[e],35393!=r){var o=yf.getActiveUniformBlockParameter(e,t,r);if(null!==o)if(35395==r)for(var i=0;i<o.length;i++)V[n+4*i>>2]=o[i];else V[n>>2]=o}else{var a=yf.getActiveUniformBlockName(e,t);V[n>>2]=a.length+1}else To.recordError(1281)}function Wa(e,t,r,n,o){if(o)if(t>0&&0==r)To.recordError(1281);else{e=To.programs[e];for(var i=[],a=0;a<t;a++)i.push(V[r+4*a>>2]);var s=yf.getActiveUniforms(e,i,n);if(s){var c=s.length;for(a=0;a<c;a++)V[o+4*a>>2]=s[a]}}else To.recordError(1281)}function za(e,t,r,n){var o=yf.getAttachedShaders(To.programs[e]),i=o.length;i>t&&(i=t),V[r>>2]=i;for(var a=0;a<i;++a){var s=To.shaders.indexOf(o[a]);V[n+4*a>>2]=s}}function $a(e,t){return yf.getAttribLocation(To.programs[e],j(t))}function Ya(e){return W[e>>2]+4294967296*V[e+4>>2]}function Ka(e){return W[e>>2]+4294967296*W[e+4>>2]}function Ja(e,t){W[e>>2]=t,W[e+4>>2]=(t-W[e>>2])/4294967296;var r=t>=0?Ka(e):Ya(e);r!=t&&T("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 Za(e,t,r){if(t){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=r&&1!=r&&To.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var o=yf.getParameter(34467);n=o?o.length:0;break;case 33309:if(To.currentContext.version<2)return void To.recordError(1282);n=2*(yf.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(To.currentContext.version<2)return void To.recordError(1280);n=33307==e?3:0}if(void 0===n){var i=yf.getParameter(e);switch(typeof i){case"number":n=i;break;case"boolean":n=i?1:0;break;case"string":return void To.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 To.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:V[t+4*a>>2]=i[a];break;case 2:z[t+4*a>>2]=i[a];break;case 4:X[t+a>>0]=i[a]?1:0}return}try{n=0|i.name}catch(t){return To.recordError(1280),void O("GL_INVALID_ENUM in glGet"+r+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+t+")")}}break;default:return To.recordError(1280),void O("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:Ja(t,n);break;case 0:V[t>>2]=n;break;case 2:z[t>>2]=n;break;case 4:X[t>>0]=n?1:0}}else To.recordError(1281)}function es(e,t){Za(e,t,4)}function ts(e,t,r){r?Ja(r,yf.getBufferParameter(e,t)):To.recordError(1281)}function rs(e,t,r){r?V[r>>2]=yf.getBufferParameter(e,t):To.recordError(1281)}function ns(){var e=yf.getError()||To.lastError;return To.lastError=0,e}function os(e,t){Za(e,t,2)}function is(e,t){return yf.getFragDataLocation(To.programs[e],j(t))}function as(e,t,r,n){var o=yf.getFramebufferAttachmentParameter(e,t,r);(o instanceof WebGLRenderbuffer||o instanceof WebGLTexture)&&(o=0|o.name),V[n>>2]=o}function ss(e,t,r,n){if(r){var o,i=yf.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 To.recordError(1280)}else{if(!(i instanceof WebGLBuffer))return void To.recordError(1280);o=0|i.name}break;default:return void To.recordError(1280)}switch(n){case 1:Ja(r,o);break;case 0:V[r>>2]=o;break;case 2:z[r>>2]=o;break;case 4:X[r>>0]=o?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+n}}else To.recordError(1281)}function cs(e,t,r){ss(e,t,r,1)}function us(e,t){Za(e,t,1)}function ls(e,t,r){ss(e,t,r,0)}function ds(e,t){Za(e,t,0)}function fs(e,t,r,n,o){if(n<0)To.recordError(1281);else if(o){var i=yf.getInternalformatParameter(e,t,r);if(null!==i)for(var a=0;a<i.length&&a<n;++a)V[o+4*a>>2]=i[a]}else To.recordError(1281)}function ps(e,t,r,n,o){To.recordError(1282)}function gs(e,t,r,n){var o=yf.getProgramInfoLog(To.programs[e]);null===o&&(o="(unknown error)");var i=t>0&&n?U(o,n,t):0;r&&(V[r>>2]=i)}function hs(e,t,r){if(r)if(e>=To.counter)To.recordError(1281);else if(e=To.programs[e],35716==t){var n=yf.getProgramInfoLog(e);null===n&&(n="(unknown error)"),V[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var o=0;o<yf.getProgramParameter(e,35718);++o)e.maxUniformLength=Math.max(e.maxUniformLength,yf.getActiveUniform(e,o).name.length+1);V[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(o=0;o<yf.getProgramParameter(e,35721);++o)e.maxAttributeLength=Math.max(e.maxAttributeLength,yf.getActiveAttrib(e,o).name.length+1);V[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(o=0;o<yf.getProgramParameter(e,35382);++o)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,yf.getActiveUniformBlockName(e,o).length+1);V[r>>2]=e.maxUniformBlockNameLength}else V[r>>2]=yf.getProgramParameter(e,t);else To.recordError(1281)}function ms(e,t,r){if(r){var n,o=To.queries[e];Ja(r,"boolean"==typeof(n=To.currentContext.version<2?yf.disjointTimerQueryExt.getQueryObjectEXT(o,t):yf.getQueryParameter(o,t))?n?1:0:n)}else To.recordError(1281)}function vs(e,t,r){if(r){var n,o=To.queries[e],i=yf.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,V[r>>2]=n}else To.recordError(1281)}function bs(e,t,r){if(r){var n,o=To.queries[e];Ja(r,"boolean"==typeof(n=To.currentContext.version<2?yf.disjointTimerQueryExt.getQueryObjectEXT(o,t):yf.getQueryParameter(o,t))?n?1:0:n)}else To.recordError(1281)}function ys(e,t,r){if(r){var n,o=To.queries[e],i=yf.getQueryParameter(o,t);n="boolean"==typeof i?i?1:0:i,V[r>>2]=n}else To.recordError(1281)}function Es(e,t,r){if(r){var n,o=To.queries[e],i=yf.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,V[r>>2]=n}else To.recordError(1281)}function ws(e,t,r){r?V[r>>2]=yf.getQuery(e,t):To.recordError(1281)}function _s(e,t,r){r?V[r>>2]=yf.disjointTimerQueryExt.getQueryEXT(e,t):To.recordError(1281)}function Os(e,t,r){r?V[r>>2]=yf.getRenderbufferParameter(e,t):To.recordError(1281)}function Ts(e,t,r){r?z[r>>2]=yf.getSamplerParameter(To.samplers[e],t):To.recordError(1281)}function Ds(e,t,r){r?V[r>>2]=yf.getSamplerParameter(To.samplers[e],t):To.recordError(1281)}function Ps(e,t,r,n){var o=yf.getShaderInfoLog(To.shaders[e]);null===o&&(o="(unknown error)");var i=t>0&&n?U(o,n,t):0;r&&(V[r>>2]=i)}function xs(e,t,r,n){var o=yf.getShaderPrecisionFormat(e,t);V[r>>2]=o.rangeMin,V[r+4>>2]=o.rangeMax,V[n>>2]=o.precision}function Ss(e,t,r,n){var o=yf.getShaderSource(To.shaders[e]);if(o){var i=t>0&&n?U(o,n,t):0;r&&(V[r>>2]=i)}}function Ms(e,t,r){if(r)if(35716==t){var n=yf.getShaderInfoLog(To.shaders[e]);null===n&&(n="(unknown error)");var o=n?n.length+1:0;V[r>>2]=o}else if(35720==t){var i=yf.getShaderSource(To.shaders[e]),a=i?i.length+1:0;V[r>>2]=a}else V[r>>2]=yf.getShaderParameter(To.shaders[e],t);else To.recordError(1281)}function Rs(e){var t=H(e)+1,r=Mf(t);return U(e,r,t),r}function ks(e){var t=To.stringCache[e];if(!t){switch(e){case 7939:var r=yf.getSupportedExtensions()||[];t=Rs((r=r.concat(r.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=yf.getParameter(e);n||To.recordError(1280),t=n&&Rs(n);break;case 7938:var o=yf.getParameter(7938);t=Rs(o=To.currentContext.version>=2?"OpenGL ES 3.0 ("+o+")":"OpenGL ES 2.0 ("+o+")");break;case 35724:var i=yf.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=Rs(i);break;default:To.recordError(1280)}To.stringCache[e]=t}return t}function Fs(e,t){if(To.currentContext.version<2)return To.recordError(1282),0;var r=To.stringiCache[e];if(r)return t<0||t>=r.length?(To.recordError(1281),0):r[t];switch(e){case 7939:var n=yf.getSupportedExtensions()||[];return n=(n=n.concat(n.map((function(e){return"GL_"+e})))).map((function(e){return Rs(e)})),r=To.stringiCache[e]=n,t<0||t>=r.length?(To.recordError(1281),0):r[t];default:return To.recordError(1280),0}}function As(e,t,r,n,o){if(r<0)To.recordError(1281);else if(o){var i=yf.getSyncParameter(To.syncs[e],t);null!==i&&(V[o>>2]=i,n&&(V[n>>2]=1))}else To.recordError(1281)}function Cs(e,t,r){r?z[r>>2]=yf.getTexParameter(e,t):To.recordError(1281)}function Is(e,t,r){r?V[r>>2]=yf.getTexParameter(e,t):To.recordError(1281)}function Ns(e,t,r,n,o,i,a){e=To.programs[e];var s=yf.getTransformFeedbackVarying(e,t);if(s){if(a&&r>0){var c=U(s.name,a,r);n&&(V[n>>2]=c)}else n&&(V[n>>2]=0);o&&(V[o>>2]=s.size),i&&(V[i>>2]=s.type)}}function js(e,t){return yf.getUniformBlockIndex(To.programs[e],j(t))}function Ls(e,t,r,n){if(n)if(t>0&&(0==r||0==n))To.recordError(1281);else{e=To.programs[e];for(var o=[],i=0;i<t;i++)o.push(j(V[r+4*i>>2]));var a=yf.getUniformIndices(e,o);if(a){var s=a.length;for(i=0;i<s;i++)V[n+4*i>>2]=a[i]}}else To.recordError(1281)}function Us(e){return parseInt(e)}function Hs(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function Bs(e){var t,r,n=e.uniformLocsById,o=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},t=0;t<yf.getProgramParameter(e,35718);++t){var i=yf.getActiveUniform(e,t),a=i.name,s=i.size,c=Hs(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 Xs(e,t){if(t=j(t),e=To.programs[e]){Bs(e);var r=e.uniformLocsById,n=0,o=t,i=Hs(t);i>0&&(n=Us(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]||yf.getUniformLocation(e,t)))return n}else To.recordError(1281);return-1}function Qs(e){var t=yf.currentProgram;if(t){var r=t.uniformLocsById[e];return"number"==typeof r&&(t.uniformLocsById[e]=r=yf.getUniformLocation(t,t.uniformArrayNamesById[e]+(r>0?"["+r+"]":""))),r}To.recordError(1282)}function Gs(e,t,r,n){if(r){Bs(e=To.programs[e]);var o=yf.getUniform(e,Qs(t));if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:V[r>>2]=o;break;case 2:z[r>>2]=o}else for(var i=0;i<o.length;i++)switch(n){case 0:V[r+4*i>>2]=o[i];break;case 2:z[r+4*i>>2]=o[i]}}else To.recordError(1281)}function qs(e,t,r){Gs(e,t,r,2)}function Vs(e,t,r){Gs(e,t,r,0)}function Ws(e,t,r){Gs(e,t,r,0)}function zs(e,t,r,n){if(r){var o=yf.getVertexAttrib(e,t);if(34975==t)V[r>>2]=o&&o.name;else if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:V[r>>2]=o;break;case 2:z[r>>2]=o;break;case 5:V[r>>2]=Math.fround(o)}else for(var i=0;i<o.length;i++)switch(n){case 0:V[r+4*i>>2]=o[i];break;case 2:z[r+4*i>>2]=o[i];break;case 5:V[r+4*i>>2]=Math.fround(o[i])}}else To.recordError(1281)}function $s(e,t,r){zs(e,t,r,0)}function Ys(e,t,r){zs(e,t,r,0)}function Ks(e,t,r){r?V[r>>2]=yf.getVertexAttribOffset(e,t):To.recordError(1281)}function Js(e,t,r){zs(e,t,r,2)}function Zs(e,t,r){zs(e,t,r,5)}function ec(e,t){yf.hint(e,t)}function tc(e,t,r){for(var n=aa[t],o=0;o<t;o++)n[o]=V[r+4*o>>2];yf.invalidateFramebuffer(e,n)}function rc(e,t,r,n,o,i,a){for(var s=aa[t],c=0;c<t;c++)s[c]=V[r+4*c>>2];yf.invalidateSubFramebuffer(e,s,n,o,i,a)}function nc(e){var t=To.buffers[e];return t?yf.isBuffer(t):0}function oc(e){return yf.isEnabled(e)}function ic(e){var t=To.framebuffers[e];return t?yf.isFramebuffer(t):0}function ac(e){return(e=To.programs[e])?yf.isProgram(e):0}function sc(e){var t=To.queries[e];return t?yf.isQuery(t):0}function cc(e){var t=To.queries[e];return t?yf.disjointTimerQueryExt.isQueryEXT(t):0}function uc(e){var t=To.renderbuffers[e];return t?yf.isRenderbuffer(t):0}function lc(e){var t=To.samplers[e];return t?yf.isSampler(t):0}function dc(e){var t=To.shaders[e];return t?yf.isShader(t):0}function fc(e){return yf.isSync(To.syncs[e])}function pc(e){var t=To.textures[e];return t?yf.isTexture(t):0}function gc(e){return yf.isTransformFeedback(To.transformFeedbacks[e])}function hc(e){var t=To.vaos[e];return t?yf.isVertexArray(t):0}function mc(e){var t=To.vaos[e];return t?yf.isVertexArray(t):0}function vc(e){yf.lineWidth(e)}function bc(e){e=To.programs[e],yf.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function yc(){yf.pauseTransformFeedback()}function Ec(e,t){3317==e&&(To.unpackAlignment=t),yf.pixelStorei(e,t)}function wc(e,t){yf.polygonOffset(e,t)}function _c(e,t,r,n){To.recordError(1280)}function Oc(e,t,r){To.recordError(1280)}function Tc(e,t){yf.disjointTimerQueryExt.queryCounterEXT(To.queries[e],t)}function Dc(e){yf.readBuffer(e)}function Pc(e,t,r,n){var o;return t*(e*r+(o=n)-1&-o)}function xc(e){return{5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[e-6402]||1}function Sc(e){return 0==(e-=5120)?X:1==e?Q:2==e?G:4==e?V:6==e?z:5==e||28922==e||28520==e||30779==e||30782==e?W:q}function Mc(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function Rc(e,t,r,n,o,i){var a=Sc(e),s=Mc(a),c=1<<s,u=Pc(r,n,xc(t)*c,To.unpackAlignment);return a.subarray(o>>s,o+u>>s)}function kc(e,t,r,n,o,i,a){if(To.currentContext.version>=2)if(yf.currentPixelPackBufferBinding)yf.readPixels(e,t,r,n,o,i,a);else{var s=Sc(i);yf.readPixels(e,t,r,n,o,i,s,a>>Mc(s))}else{var c=Rc(i,o,r,n,a);c?yf.readPixels(e,t,r,n,o,i,c):To.recordError(1280)}}function Fc(){}function Ac(e,t,r,n){yf.renderbufferStorage(e,t,r,n)}function Cc(e,t,r,n,o){yf.renderbufferStorageMultisample(e,t,r,n,o)}function Ic(){yf.resumeTransformFeedback()}function Nc(e,t){yf.sampleCoverage(e,!!t)}function jc(e,t,r){yf.samplerParameterf(To.samplers[e],t,r)}function Lc(e,t,r){var n=z[r>>2];yf.samplerParameterf(To.samplers[e],t,n)}function Uc(e,t,r){yf.samplerParameteri(To.samplers[e],t,r)}function Hc(e,t,r){var n=V[r>>2];yf.samplerParameteri(To.samplers[e],t,n)}function Bc(e,t,r,n){yf.scissor(e,t,r,n)}function Xc(){To.recordError(1280)}function Qc(e,t,r,n){var o=To.getSource(e,t,r,n);if(To.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)}yf.shaderSource(To.shaders[e],o)}function Gc(e,t,r){yf.stencilFunc(e,t,r)}function qc(e,t,r,n){yf.stencilFuncSeparate(e,t,r,n)}function Vc(e){yf.stencilMask(e)}function Wc(e,t){yf.stencilMaskSeparate(e,t)}function zc(e,t,r){yf.stencilOp(e,t,r)}function $c(e,t,r,n){yf.stencilOpSeparate(e,t,r,n)}function Yc(e,t,r,n,o,i,a,s,c){if(To.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)),To.currentContext.version>=2)if(yf.currentPixelUnpackBufferBinding)yf.texImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Sc(s);yf.texImage2D(e,t,r,n,o,i,a,s,u,c>>Mc(u))}else yf.texImage2D(e,t,r,n,o,i,a,s,null);else yf.texImage2D(e,t,r,n,o,i,a,s,c?Rc(s,a,n,o,c):null)}function Kc(e,t,r,n,o,i,a,s,c,u){if(yf.currentPixelUnpackBufferBinding)yf.texImage3D(e,t,r,n,o,i,a,s,c,u);else if(u){var l=Sc(c);yf.texImage3D(e,t,r,n,o,i,a,s,c,l,u>>Mc(l))}else yf.texImage3D(e,t,r,n,o,i,a,s,c,null)}function Jc(e,t,r){yf.texParameterf(e,t,r)}function Zc(e,t,r){var n=z[r>>2];yf.texParameterf(e,t,n)}function eu(e,t,r){yf.texParameteri(e,t,r)}function tu(e,t,r){var n=V[r>>2];yf.texParameteri(e,t,n)}function ru(e,t,r,n,o){yf.texStorage2D(e,t,r,n,o)}function nu(e,t,r,n,o,i){yf.texStorage3D(e,t,r,n,o,i)}function ou(e,t,r,n,o,i,a,s,c){if(To.currentContext.version>=2&&36193==s&&(s=5131),To.currentContext.version>=2)if(yf.currentPixelUnpackBufferBinding)yf.texSubImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Sc(s);yf.texSubImage2D(e,t,r,n,o,i,a,s,u,c>>Mc(u))}else yf.texSubImage2D(e,t,r,n,o,i,a,s,null);else{var l=null;c&&(l=Rc(s,a,o,i,c)),yf.texSubImage2D(e,t,r,n,o,i,a,s,l)}}function iu(e,t,r,n,o,i,a,s,c,u,l){if(yf.currentPixelUnpackBufferBinding)yf.texSubImage3D(e,t,r,n,o,i,a,s,c,u,l);else if(l){var d=Sc(u);yf.texSubImage3D(e,t,r,n,o,i,a,s,c,u,d,l>>Mc(d))}else yf.texSubImage3D(e,t,r,n,o,i,a,s,c,u,null)}function au(e,t,r,n){e=To.programs[e];for(var o=[],i=0;i<t;i++)o.push(j(V[r+4*i>>2]));yf.transformFeedbackVaryings(e,o,n)}function su(e,t){yf.uniform1f(Qs(e),t)}var cu=[];function uu(e,t,r){if(To.currentContext.version>=2)yf.uniform1fv(Qs(e),z,r>>2,t);else{if(t<=288)for(var n=cu[t-1],o=0;o<t;++o)n[o]=z[r+4*o>>2];else n=z.subarray(r>>2,r+4*t>>2);yf.uniform1fv(Qs(e),n)}}function lu(e,t){yf.uniform1i(Qs(e),t)}var du=[];function fu(e,t,r){if(To.currentContext.version>=2)yf.uniform1iv(Qs(e),V,r>>2,t);else{if(t<=288)for(var n=du[t-1],o=0;o<t;++o)n[o]=V[r+4*o>>2];else n=V.subarray(r>>2,r+4*t>>2);yf.uniform1iv(Qs(e),n)}}function pu(e,t){yf.uniform1ui(Qs(e),t)}function gu(e,t,r){yf.uniform1uiv(Qs(e),W,r>>2,t)}function hu(e,t,r){yf.uniform2f(Qs(e),t,r)}function mu(e,t,r){if(To.currentContext.version>=2)yf.uniform2fv(Qs(e),z,r>>2,2*t);else{if(t<=144)for(var n=cu[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);yf.uniform2fv(Qs(e),n)}}function vu(e,t,r){yf.uniform2i(Qs(e),t,r)}function bu(e,t,r){if(To.currentContext.version>=2)yf.uniform2iv(Qs(e),V,r>>2,2*t);else{if(t<=144)for(var n=du[2*t-1],o=0;o<2*t;o+=2)n[o]=V[r+4*o>>2],n[o+1]=V[r+(4*o+4)>>2];else n=V.subarray(r>>2,r+8*t>>2);yf.uniform2iv(Qs(e),n)}}function yu(e,t,r){yf.uniform2ui(Qs(e),t,r)}function Eu(e,t,r){yf.uniform2uiv(Qs(e),W,r>>2,2*t)}function wu(e,t,r,n){yf.uniform3f(Qs(e),t,r,n)}function _u(e,t,r){if(To.currentContext.version>=2)yf.uniform3fv(Qs(e),z,r>>2,3*t);else{if(t<=96)for(var n=cu[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);yf.uniform3fv(Qs(e),n)}}function Ou(e,t,r,n){yf.uniform3i(Qs(e),t,r,n)}function Tu(e,t,r){if(To.currentContext.version>=2)yf.uniform3iv(Qs(e),V,r>>2,3*t);else{if(t<=96)for(var n=du[3*t-1],o=0;o<3*t;o+=3)n[o]=V[r+4*o>>2],n[o+1]=V[r+(4*o+4)>>2],n[o+2]=V[r+(4*o+8)>>2];else n=V.subarray(r>>2,r+12*t>>2);yf.uniform3iv(Qs(e),n)}}function Du(e,t,r,n){yf.uniform3ui(Qs(e),t,r,n)}function Pu(e,t,r){yf.uniform3uiv(Qs(e),W,r>>2,3*t)}function xu(e,t,r,n,o){yf.uniform4f(Qs(e),t,r,n,o)}function Su(e,t,r){if(To.currentContext.version>=2)yf.uniform4fv(Qs(e),z,r>>2,4*t);else{if(t<=72){var n=cu[4*t-1],o=z;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=z.subarray(r>>2,r+16*t>>2);yf.uniform4fv(Qs(e),n)}}function Mu(e,t,r,n,o){yf.uniform4i(Qs(e),t,r,n,o)}function Ru(e,t,r){if(To.currentContext.version>=2)yf.uniform4iv(Qs(e),V,r>>2,4*t);else{if(t<=72)for(var n=du[4*t-1],o=0;o<4*t;o+=4)n[o]=V[r+4*o>>2],n[o+1]=V[r+(4*o+4)>>2],n[o+2]=V[r+(4*o+8)>>2],n[o+3]=V[r+(4*o+12)>>2];else n=V.subarray(r>>2,r+16*t>>2);yf.uniform4iv(Qs(e),n)}}function ku(e,t,r,n,o){yf.uniform4ui(Qs(e),t,r,n,o)}function Fu(e,t,r){yf.uniform4uiv(Qs(e),W,r>>2,4*t)}function Au(e,t,r){e=To.programs[e],yf.uniformBlockBinding(e,t,r)}function Cu(e,t,r,n){if(To.currentContext.version>=2)yf.uniformMatrix2fv(Qs(e),!!r,z,n>>2,4*t);else{if(t<=72)for(var o=cu[4*t-1],i=0;i<4*t;i+=4)o[i]=z[n+4*i>>2],o[i+1]=z[n+(4*i+4)>>2],o[i+2]=z[n+(4*i+8)>>2],o[i+3]=z[n+(4*i+12)>>2];else o=z.subarray(n>>2,n+16*t>>2);yf.uniformMatrix2fv(Qs(e),!!r,o)}}function Iu(e,t,r,n){yf.uniformMatrix2x3fv(Qs(e),!!r,z,n>>2,6*t)}function Nu(e,t,r,n){yf.uniformMatrix2x4fv(Qs(e),!!r,z,n>>2,8*t)}function ju(e,t,r,n){if(To.currentContext.version>=2)yf.uniformMatrix3fv(Qs(e),!!r,z,n>>2,9*t);else{if(t<=32)for(var o=cu[9*t-1],i=0;i<9*t;i+=9)o[i]=z[n+4*i>>2],o[i+1]=z[n+(4*i+4)>>2],o[i+2]=z[n+(4*i+8)>>2],o[i+3]=z[n+(4*i+12)>>2],o[i+4]=z[n+(4*i+16)>>2],o[i+5]=z[n+(4*i+20)>>2],o[i+6]=z[n+(4*i+24)>>2],o[i+7]=z[n+(4*i+28)>>2],o[i+8]=z[n+(4*i+32)>>2];else o=z.subarray(n>>2,n+36*t>>2);yf.uniformMatrix3fv(Qs(e),!!r,o)}}function Lu(e,t,r,n){yf.uniformMatrix3x2fv(Qs(e),!!r,z,n>>2,6*t)}function Uu(e,t,r,n){yf.uniformMatrix3x4fv(Qs(e),!!r,z,n>>2,12*t)}function Hu(e,t,r,n){if(To.currentContext.version>=2)yf.uniformMatrix4fv(Qs(e),!!r,z,n>>2,16*t);else{if(t<=18){var o=cu[16*t-1],i=z;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=z.subarray(n>>2,n+64*t>>2);yf.uniformMatrix4fv(Qs(e),!!r,o)}}function Bu(e,t,r,n){yf.uniformMatrix4x2fv(Qs(e),!!r,z,n>>2,8*t)}function Xu(e,t,r,n){yf.uniformMatrix4x3fv(Qs(e),!!r,z,n>>2,12*t)}function Qu(e){e=To.programs[e],yf.useProgram(e),yf.currentProgram=e}function Gu(e){yf.validateProgram(To.programs[e])}function qu(e,t){yf.vertexAttrib1f(e,t)}function Vu(e,t){yf.vertexAttrib1f(e,z[t>>2])}function Wu(e,t,r){yf.vertexAttrib2f(e,t,r)}function zu(e,t){yf.vertexAttrib2f(e,z[t>>2],z[t+4>>2])}function $u(e,t,r,n){yf.vertexAttrib3f(e,t,r,n)}function Yu(e,t){yf.vertexAttrib3f(e,z[t>>2],z[t+4>>2],z[t+8>>2])}function Ku(e,t,r,n,o){yf.vertexAttrib4f(e,t,r,n,o)}function Ju(e,t){yf.vertexAttrib4f(e,z[t>>2],z[t+4>>2],z[t+8>>2],z[t+12>>2])}function Zu(e,t){yf.vertexAttribDivisor(e,t)}function el(e,t){yf.vertexAttribDivisor(e,t)}function tl(e,t){yf.vertexAttribDivisor(e,t)}function rl(e,t){yf.vertexAttribDivisor(e,t)}function nl(e,t){yf.vertexAttribDivisor(e,t)}function ol(e,t,r,n,o){yf.vertexAttribI4i(e,t,r,n,o)}function il(e,t){yf.vertexAttribI4i(e,V[t>>2],V[t+4>>2],V[t+8>>2],V[t+12>>2])}function al(e,t,r,n,o){yf.vertexAttribI4ui(e,t,r,n,o)}function sl(e,t){yf.vertexAttribI4ui(e,W[t>>2],W[t+4>>2],W[t+8>>2],W[t+12>>2])}function cl(e,t,r,n,o){yf.vertexAttribIPointer(e,t,r,n,o)}function ul(e,t,r,n,o,i){yf.vertexAttribPointer(e,t,r,!!n,o,i)}function ll(e,t,r,n){yf.viewport(e,t,r,n)}function dl(e,t,r,n){yf.waitSync(To.syncs[e],t,Ei(r,n))}function fl(e,t,r){Q.copyWithin(e,t,t+r)}function pl(e){try{return M.grow(e-B.byteLength+65535>>>16),ce(M.buffer),1}catch(t){O("emscripten_realloc_buffer: Attempted to grow heap from "+B.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function gl(e){var t=Q.length;C((e>>>=0)>t);var r=2147483648;if(e>r)return O("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(pl(i))return!0}return O("Failed to grow the heap from "+t+" bytes to "+i+" bytes, not enough memory!"),!1}function hl(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 ml(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 vl(e){return o.emscripten_ubq_asyncFetchHeaders.has(e)?o.emscripten_ubq_asyncFetchHeaders.get(e):0}function bl(e,t,r,n,i,c,u,l,d){let f=o.UTF8ToString(t,r),p=o.UTF8ToString(l,d),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];let v;return"GET"!==m&&"HEAD"!==m&&(v=new Uint8Array(o.HEAPU8.buffer,c,u)),fetch(f,{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 yl(e){return!!o.emscripten_ubq_asyncFetchStates.has(e)&&(o.emscripten_ubq_asyncFetchStates.delete(e),!0)}function El(e){return o.emscripten_ubq_asyncFetchCompletedBytes.has(e)?o.emscripten_ubq_asyncFetchCompletedBytes.get(e):0}function wl(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 _l(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 Ol(e){return o.emscripten_ubq_asyncFetchStates.has(e)?o.emscripten_ubq_asyncFetchStates.get(e).state:-1}function Tl(e){return o.emscripten_ubq_asyncFetchTotalBytes.has(e)?o.emscripten_ubq_asyncFetchTotalBytes.get(e):0}var Dl={inEventHandler:0,removeAllEventListeners:function(){for(var e=Dl.eventHandlers.length-1;e>=0;--e)Dl._removeHandler(e);Dl.eventHandlers=[],Dl.deferredCalls=[]},registerRemoveEventListeners:function(){Dl.removeEventListenersRegistered||(ve.push(Dl.removeAllEventListeners),Dl.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 Dl.deferredCalls){var i=Dl.deferredCalls[o];if(i.targetFunction==e&&n(i.argsList,r))return}Dl.deferredCalls.push({targetFunction:e,precedence:t,argsList:r}),Dl.deferredCalls.sort((function(e,t){return e.precedence<t.precedence}))},removeDeferredCalls:function(e){for(var t=0;t<Dl.deferredCalls.length;++t)Dl.deferredCalls[t].targetFunction==e&&(Dl.deferredCalls.splice(t,1),--t)},canPerformEventHandlerRequests:function(){return Dl.inEventHandler&&Dl.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(Dl.canPerformEventHandlerRequests())for(var e=0;e<Dl.deferredCalls.length;++e){var t=Dl.deferredCalls[e];Dl.deferredCalls.splice(e,1),--e,t.targetFunction.apply(null,t.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(e,t){for(var r=0;r<Dl.eventHandlers.length;++r)Dl.eventHandlers[r].target!=e||t&&t!=Dl.eventHandlers[r].eventTypeString||Dl._removeHandler(r--)},_removeHandler:function(e){var t=Dl.eventHandlers[e];t.target.removeEventListener(t.eventTypeString,t.eventListenerFunc,t.useCapture),Dl.eventHandlers.splice(e,1)},registerOrRemoveHandler:function(e){var t=function(t){++Dl.inEventHandler,Dl.currentEventHandler=e,Dl.runDeferredCalls(),e.handlerFunc(t),Dl.runDeferredCalls(),--Dl.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=t,e.target.addEventListener(e.eventTypeString,t,e.useCapture),Dl.eventHandlers.push(e),Dl.registerRemoveEventListeners();else for(var r=0;r<Dl.eventHandlers.length;++r)Dl.eventHandlers[r].target==e.target&&Dl.eventHandlers[r].eventTypeString==e.eventTypeString&&Dl._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}},Pl=["default","low-power","high-performance"];function xl(e){return e>2?j(e):e}var Sl=[0,document,window];function Ml(e){return e=xl(e),Sl[e]||document.querySelector(e)}function Rl(e){return Ml(e)}function kl(e,t){C(t);var r=t>>2,n=V[r+6],o={alpha:!!V[r+0],depth:!!V[r+1],stencil:!!V[r+2],antialias:!!V[r+3],premultipliedAlpha:!!V[r+4],preserveDrawingBuffer:!!V[r+5],powerPreference:Pl[n],failIfMajorPerformanceCaveat:!!V[r+7],majorVersion:V[r+8],minorVersion:V[r+9],enableExtensionsByDefault:V[r+10],explicitSwapControl:V[r+11],proxyContextToMainThread:V[r+12],renderViaOffscreenBackBuffer:V[r+13]},i=Rl(e);return i?o.explicitSwapControl?0:To.createContext(i,o):0}function Fl(e,t){return kl(e,t)}function Al(e){C(e);for(var t=e>>2,r=0;r<14;++r)V[t+r]=0;V[t+0]=V[t+1]=V[t+3]=V[t+4]=V[t+8]=V[t+10]=1}function Cl(e){return To.makeContextCurrent(e)?0:-5}var Il={};function Nl(){return l||"./this.program"}function jl(){if(!jl.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",_:Nl()};for(var t in Il)void 0===Il[t]?delete e[t]:e[t]=Il[t];var r=[];for(var t in e)r.push(t+"="+e[t]);jl.strings=r}return jl.strings}function Ll(e,t){var r=0;return jl().forEach((function(n,o){var i=t+r;V[e+4*o>>2]=i,ae(n,i),r+=n.length+1})),0}function Ul(e,t){var r=jl();V[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),V[t>>2]=n,0}function Hl(e){try{var t=yt.getStreamFromFD(e);return bt.close(t),0}catch(e){if(void 0===bt||!(e instanceof bt.ErrnoError))throw e;return e.errno}}function Bl(e,t,r,n){try{var o=yt.getStreamFromFD(e),i=yt.doReadv(o,t,r);return V[n>>2]=i,0}catch(e){if(void 0===bt||!(e instanceof bt.ErrnoError))throw e;return e.errno}}function Xl(e,t,r,n,o){try{var i=yt.getStreamFromFD(e),a=4294967296*r+(t>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(bt.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)],V[o>>2]=Be[0],V[o+4>>2]=Be[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(e){if(void 0===bt||!(e instanceof bt.ErrnoError))throw e;return e.errno}}function Ql(e,t,r,n){try{var o=yt.getStreamFromFD(e),i=yt.doWritev(o,t,r);return V[n>>2]=i,0}catch(e){if(void 0===bt||!(e instanceof bt.ErrnoError))throw e;return e.errno}}function Gl(){return S()}function ql(e){var t=Date.now();return V[e>>2]=t/1e3|0,V[e+4>>2]=t%1e3*1e3|0,0}function Vl(e){yf.activeTexture(e)}function Wl(e,t){yf.attachShader(To.programs[e],To.shaders[t])}function zl(e,t){35051==e?yf.currentPixelPackBufferBinding=t:35052==e&&(yf.currentPixelUnpackBufferBinding=t),yf.bindBuffer(e,To.buffers[t])}function $l(e,t){yf.bindFramebuffer(e,To.framebuffers[t])}function Yl(e,t){yf.bindRenderbuffer(e,To.renderbuffers[t])}function Kl(e,t){yf.bindTexture(e,To.textures[t])}function Jl(e){yf.blendEquation(e)}function Zl(e,t){yf.blendEquationSeparate(e,t)}function ed(e,t){yf.blendFunc(e,t)}function td(e,t,r,n){yf.blendFuncSeparate(e,t,r,n)}function rd(e,t,r,n){To.currentContext.version>=2?r?yf.bufferData(e,Q,n,r,t):yf.bufferData(e,t,n):yf.bufferData(e,r?Q.subarray(r,r+t):t,n)}function nd(e){yf.clear(e)}function od(e,t,r,n){yf.clearColor(e,t,r,n)}function id(e){yf.clearStencil(e)}function ad(e,t,r,n){yf.colorMask(!!e,!!t,!!r,!!n)}function sd(e){yf.compileShader(To.shaders[e])}function cd(){var e=To.getNewId(To.programs),t=yf.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,To.programs[e]=t,e}function ud(e){var t=To.getNewId(To.shaders);return To.shaders[t]=yf.createShader(e),t}function ld(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.buffers[n];o&&(yf.deleteBuffer(o),o.name=0,To.buffers[n]=null,n==yf.currentPixelPackBufferBinding&&(yf.currentPixelPackBufferBinding=0),n==yf.currentPixelUnpackBufferBinding&&(yf.currentPixelUnpackBufferBinding=0))}}function dd(e,t){for(var r=0;r<e;++r){var n=V[t+4*r>>2],o=To.framebuffers[n];o&&(yf.deleteFramebuffer(o),o.name=0,To.framebuffers[n]=null)}}function fd(e){if(e){var t=To.programs[e];t?(yf.deleteProgram(t),t.name=0,To.programs[e]=null):To.recordError(1281)}}function pd(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.renderbuffers[n];o&&(yf.deleteRenderbuffer(o),o.name=0,To.renderbuffers[n]=null)}}function gd(e){if(e){var t=To.shaders[e];t?(yf.deleteShader(t),To.shaders[e]=null):To.recordError(1281)}}function hd(e,t){for(var r=0;r<e;r++){var n=V[t+4*r>>2],o=To.textures[n];o&&(yf.deleteTexture(o),o.name=0,To.textures[n]=null)}}function md(e){yf.depthMask(!!e)}function vd(e,t){yf.detachShader(To.programs[e],To.shaders[t])}function bd(e){yf.disable(e)}function yd(e,t,r){yf.drawArrays(e,t,r)}function Ed(e){yf.enable(e)}function wd(e){yf.enableVertexAttribArray(e)}function _d(){yf.finish()}function Od(e,t,r,n){yf.framebufferRenderbuffer(e,t,r,To.renderbuffers[n])}function Td(e,t,r,n,o){yf.framebufferTexture2D(e,t,r,To.textures[n],o)}function Dd(e,t){Ra(e,t,"createBuffer",To.buffers)}function Pd(e,t){Ra(e,t,"createFramebuffer",To.framebuffers)}function xd(e,t){Ra(e,t,"createRenderbuffer",To.renderbuffers)}function Sd(e,t){Ra(e,t,"createTexture",To.textures)}function Md(e,t){return yf.getAttribLocation(To.programs[e],j(t))}function Rd(){var e=yf.getError()||To.lastError;return To.lastError=0,e}function kd(e,t){Za(e,t,0)}function Fd(e,t,r,n){var o=yf.getProgramInfoLog(To.programs[e]);null===o&&(o="(unknown error)");var i=t>0&&n?U(o,n,t):0;r&&(V[r>>2]=i)}function Ad(e,t,r){if(r)if(e>=To.counter)To.recordError(1281);else if(e=To.programs[e],35716==t){var n=yf.getProgramInfoLog(e);null===n&&(n="(unknown error)"),V[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var o=0;o<yf.getProgramParameter(e,35718);++o)e.maxUniformLength=Math.max(e.maxUniformLength,yf.getActiveUniform(e,o).name.length+1);V[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(o=0;o<yf.getProgramParameter(e,35721);++o)e.maxAttributeLength=Math.max(e.maxAttributeLength,yf.getActiveAttrib(e,o).name.length+1);V[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(o=0;o<yf.getProgramParameter(e,35382);++o)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,yf.getActiveUniformBlockName(e,o).length+1);V[r>>2]=e.maxUniformBlockNameLength}else V[r>>2]=yf.getProgramParameter(e,t);else To.recordError(1281)}function Cd(e,t,r,n){var o=yf.getShaderPrecisionFormat(e,t);V[r>>2]=o.rangeMin,V[r+4>>2]=o.rangeMax,V[n>>2]=o.precision}function Id(e){var t=To.stringCache[e];if(!t){switch(e){case 7939:var r=yf.getSupportedExtensions()||[];t=Rs((r=r.concat(r.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=yf.getParameter(e);n||To.recordError(1280),t=n&&Rs(n);break;case 7938:var o=yf.getParameter(7938);t=Rs(o=To.currentContext.version>=2?"OpenGL ES 3.0 ("+o+")":"OpenGL ES 2.0 ("+o+")");break;case 35724:var i=yf.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=Rs(i);break;default:To.recordError(1280)}To.stringCache[e]=t}return t}function Nd(e,t){if(t=j(t),e=To.programs[e]){Bs(e);var r=e.uniformLocsById,n=0,o=t,i=Hs(t);i>0&&(n=Us(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]||yf.getUniformLocation(e,t)))return n}else To.recordError(1281);return-1}function jd(e){e=To.programs[e],yf.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function Ld(e,t,r,n,o,i,a){if(To.currentContext.version>=2)if(yf.currentPixelPackBufferBinding)yf.readPixels(e,t,r,n,o,i,a);else{var s=Sc(i);yf.readPixels(e,t,r,n,o,i,s,a>>Mc(s))}else{var c=Rc(i,o,r,n,a);c?yf.readPixels(e,t,r,n,o,i,c):To.recordError(1280)}}function Ud(e,t,r,n){yf.renderbufferStorage(e,t,r,n)}function Hd(e,t,r,n){var o=To.getSource(e,t,r,n);if(To.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)}yf.shaderSource(To.shaders[e],o)}function Bd(e,t,r){yf.stencilFunc(e,t,r)}function Xd(e){yf.stencilMask(e)}function Qd(e,t,r){yf.stencilOp(e,t,r)}function Gd(e,t,r,n,o,i,a,s,c){if(To.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)),To.currentContext.version>=2)if(yf.currentPixelUnpackBufferBinding)yf.texImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Sc(s);yf.texImage2D(e,t,r,n,o,i,a,s,u,c>>Mc(u))}else yf.texImage2D(e,t,r,n,o,i,a,s,null);else yf.texImage2D(e,t,r,n,o,i,a,s,c?Rc(s,a,n,o,c):null)}function qd(e,t,r){yf.texParameteri(e,t,r)}function Vd(e,t,r,n,o,i,a,s,c){if(To.currentContext.version>=2&&36193==s&&(s=5131),To.currentContext.version>=2)if(yf.currentPixelUnpackBufferBinding)yf.texSubImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Sc(s);yf.texSubImage2D(e,t,r,n,o,i,a,s,u,c>>Mc(u))}else yf.texSubImage2D(e,t,r,n,o,i,a,s,null);else{var l=null;c&&(l=Rc(s,a,o,i,c)),yf.texSubImage2D(e,t,r,n,o,i,a,s,l)}}function Wd(e,t){yf.uniform1f(Qs(e),t)}function zd(e,t){yf.uniform1i(Qs(e),t)}function $d(e,t,r){if(To.currentContext.version>=2)yf.uniform2fv(Qs(e),z,r>>2,2*t);else{if(t<=144)for(var n=cu[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);yf.uniform2fv(Qs(e),n)}}function Yd(e,t,r){yf.uniform2i(Qs(e),t,r)}function Kd(e,t,r){if(To.currentContext.version>=2)yf.uniform2iv(Qs(e),V,r>>2,2*t);else{if(t<=144)for(var n=du[2*t-1],o=0;o<2*t;o+=2)n[o]=V[r+4*o>>2],n[o+1]=V[r+(4*o+4)>>2];else n=V.subarray(r>>2,r+8*t>>2);yf.uniform2iv(Qs(e),n)}}function Jd(e,t,r){if(To.currentContext.version>=2)yf.uniform3fv(Qs(e),z,r>>2,3*t);else{if(t<=96)for(var n=cu[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);yf.uniform3fv(Qs(e),n)}}function Zd(e,t,r,n){yf.uniform3i(Qs(e),t,r,n)}function ef(e,t,r){if(To.currentContext.version>=2)yf.uniform3iv(Qs(e),V,r>>2,3*t);else{if(t<=96)for(var n=du[3*t-1],o=0;o<3*t;o+=3)n[o]=V[r+4*o>>2],n[o+1]=V[r+(4*o+4)>>2],n[o+2]=V[r+(4*o+8)>>2];else n=V.subarray(r>>2,r+12*t>>2);yf.uniform3iv(Qs(e),n)}}function tf(e,t,r){if(To.currentContext.version>=2)yf.uniform4fv(Qs(e),z,r>>2,4*t);else{if(t<=72){var n=cu[4*t-1],o=z;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=z.subarray(r>>2,r+16*t>>2);yf.uniform4fv(Qs(e),n)}}function rf(e,t,r,n,o){yf.uniform4i(Qs(e),t,r,n,o)}function nf(e,t,r){if(To.currentContext.version>=2)yf.uniform4iv(Qs(e),V,r>>2,4*t);else{if(t<=72)for(var n=du[4*t-1],o=0;o<4*t;o+=4)n[o]=V[r+4*o>>2],n[o+1]=V[r+(4*o+4)>>2],n[o+2]=V[r+(4*o+8)>>2],n[o+3]=V[r+(4*o+12)>>2];else n=V.subarray(r>>2,r+16*t>>2);yf.uniform4iv(Qs(e),n)}}function of(e,t,r,n){if(To.currentContext.version>=2)yf.uniformMatrix3fv(Qs(e),!!r,z,n>>2,9*t);else{if(t<=32)for(var o=cu[9*t-1],i=0;i<9*t;i+=9)o[i]=z[n+4*i>>2],o[i+1]=z[n+(4*i+4)>>2],o[i+2]=z[n+(4*i+8)>>2],o[i+3]=z[n+(4*i+12)>>2],o[i+4]=z[n+(4*i+16)>>2],o[i+5]=z[n+(4*i+20)>>2],o[i+6]=z[n+(4*i+24)>>2],o[i+7]=z[n+(4*i+28)>>2],o[i+8]=z[n+(4*i+32)>>2];else o=z.subarray(n>>2,n+36*t>>2);yf.uniformMatrix3fv(Qs(e),!!r,o)}}function af(e,t,r,n){if(To.currentContext.version>=2)yf.uniformMatrix4fv(Qs(e),!!r,z,n>>2,16*t);else{if(t<=18){var o=cu[16*t-1],i=z;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=z.subarray(n>>2,n+64*t>>2);yf.uniformMatrix4fv(Qs(e),!!r,o)}}function sf(e){e=To.programs[e],yf.useProgram(e),yf.currentProgram=e}function cf(e,t,r,n,o,i){yf.vertexAttribPointer(e,t,r,!!n,o,i)}function uf(e,t,r,n){yf.viewport(e,t,r,n)}function lf(e){x(e)}function df(e){return e%4==0&&(e%100!=0||e%400==0)}function ff(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var pf=[31,29,31,30,31,30,31,31,30,31,30,31],gf=[31,28,31,30,31,30,31,31,30,31,30,31];function hf(e,t){for(var r=new Date(e.getTime());t>0;){var n=df(r.getFullYear()),o=r.getMonth(),i=(n?pf:gf)[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 mf(e,t,r,n){var o=V[n+40>>2],i={tm_sec:V[n>>2],tm_min:V[n+4>>2],tm_hour:V[n+8>>2],tm_mday:V[n+12>>2],tm_mon:V[n+16>>2],tm_year:V[n+20>>2],tm_wday:V[n+24>>2],tm_yday:V[n+28>>2],tm_isdst:V[n+32>>2],tm_gmtoff:V[n+36>>2],tm_zone:o?j(o):""},a=j(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 d(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function f(e,t){return d(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=hf(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 f((e.tm_year+1900)/100|0,2)},"%d":function(e){return f(e.tm_mday,2)},"%e":function(e){return d(e.tm_mday,2," ")},"%g":function(e){return h(e).toString().substring(2)},"%G":function(e){return h(e)},"%H":function(e){return f(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),f(t,2)},"%j":function(e){return f(e.tm_mday+ff(df(e.tm_year+1900)?pf:gf,e.tm_mon-1),3)},"%m":function(e){return f(e.tm_mon+1,2)},"%M":function(e){return f(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 f(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:hf(t,7-t.getDay()),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(p(r,n)<0){var o=ff(df(n.getFullYear())?pf:gf,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return f(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=hf(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(),f(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:hf(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=ff(df(n.getFullYear())?pf:gf,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return f(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 a=a.replace(/%%/g,"\0\0"),m)a.includes(c)&&(a=a.replace(new RegExp(c,"g"),m[c](i)));var v=Pf(a=a.replace(/\0\0/g,"%"),!1);return v.length>t?0:(ie(v,e),v.length-1)}function vf(e,t,r,n){return mf(e,t,r,n)}function bf(e){var t=Date.now()/1e3|0;return e&&(V[e>>2]=t),t}var yf,Ef=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=bt.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},wf=365,_f=146;Object.defineProperties(Ef.prototype,{read:{get:function(){return(this.mode&wf)===wf},set:function(e){e?this.mode|=wf:this.mode&=~wf}},write:{get:function(){return(this.mode&_f)===_f},set:function(e){e?this.mode|=_f:this.mode&=~_f}},isFolder:{get:function(){return bt.isDir(this.mode)}},isDevice:{get:function(){return bt.isChrdev(this.mode)}}}),bt.FSNode=Ef,bt.staticInit(),o.FS_createPath=bt.createPath,o.FS_createDataFile=bt.createDataFile,o.FS_createPreloadedFile=bt.createPreloadedFile,o.FS_createLazyFile=bt.createLazyFile,o.FS_createDevice=bt.createDevice,o.FS_unlink=bt.unlink,vt={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},Nt=o.InternalError=It(Error,"InternalError"),Gt(),Wt=o.BindingError=It(Error,"BindingError"),Or(),fr(),Ir(),Xr=o.UnboundTypeError=It(Error,"UnboundTypeError"),rn(),o.requestFullscreen=function(e,t){ho.requestFullscreen(e,t)},o.requestFullScreen=function(){ho.requestFullScreen()},o.requestAnimationFrame=function(e){ho.requestAnimationFrame(e)},o.setCanvasSize=function(e,t,r){ho.setCanvasSize(e,t,r)},o.pauseMainLoop=function(){ho.mainLoop.pause()},o.resumeMainLoop=function(){ho.mainLoop.resume()},o.getUserMedia=function(){ho.getUserMedia()},o.createContext=function(e,t,r,n){return ho.createContext(e,t,r,n)};for(var Of=0;Of<32;++Of)aa.push(new Array(Of));var Tf=new Float32Array(288);for(Of=0;Of<288;++Of)cu[Of]=Tf.subarray(0,Of+1);var Df=new Int32Array(288);for(Of=0;Of<288;++Of)du[Of]=Df.subarray(0,Of+1);function Pf(e,t,r){var n=r>0?r:H(e)+1,o=new Array(n),i=L(e,o,0,o.length);return t&&(o.length=i),o}"function"==typeof atob&&atob;var xf,Sf={__assert_fail:tt,__cxa_allocate_exception:rt,__cxa_throw:ot,__syscall_fcntl64:Et,__syscall_ioctl:wt,__syscall_open:_t,_dlopen_js:Ot,_dlsym_js:Tt,_embind_finalize_value_array:Ut,_embind_finalize_value_object:Bt,_embind_register_bigint:Xt,_embind_register_bool:Yt,_embind_register_class:qr,_embind_register_class_constructor:Wr,_embind_register_class_function:Yr,_embind_register_emval:on,_embind_register_enum:sn,_embind_register_enum_value:un,_embind_register_float:fn,_embind_register_function:pn,_embind_register_integer:hn,_embind_register_memory_view:mn,_embind_register_smart_ptr:vn,_embind_register_std_string:bn,_embind_register_std_wstring:yn,_embind_register_value_array:En,_embind_register_value_array_element:wn,_embind_register_value_object:_n,_embind_register_value_object_field:On,_embind_register_void:Tn,_emscripten_throw_longjmp:Dn,_emval_as:Pn,_emval_call:Sn,_emval_call_method:An,_emval_call_void_method:Cn,_emval_decref:Zr,_emval_get_global:Nn,_emval_get_method_caller:Un,_emval_get_property:Hn,_emval_incref:Bn,_emval_instanceof:Xn,_emval_is_string:Qn,_emval_new:Wn,_emval_new_array:zn,_emval_new_cstring:$n,_emval_new_object:Yn,_emval_run_destructors:Kn,_emval_set_property:Jn,_emval_take_value:Zn,_emval_throw:eo,_localtime_js:to,_mktime_js:ro,_tzset_js:oo,abort:io,clock_gettime:so,eglChooseConfig:vo,eglCreateContext:Do,eglCreateWindowSurface:Po,eglDestroyContext:xo,eglDestroySurface:So,eglGetConfigAttrib:Mo,eglGetDisplay:Ro,eglGetError:ko,eglInitialize:Fo,eglMakeCurrent:Ao,eglSwapBuffers:Co,eglTerminate:Io,emscripten_console_error:No,emscripten_console_log:jo,emscripten_console_warn:Lo,emscripten_debugger:Uo,emscripten_get_heap_max:Ho,emscripten_glActiveTexture:Bo,emscripten_glAttachShader:Xo,emscripten_glBeginQuery:Qo,emscripten_glBeginQueryEXT:Go,emscripten_glBeginTransformFeedback:qo,emscripten_glBindAttribLocation:Vo,emscripten_glBindBuffer:Wo,emscripten_glBindBufferBase:zo,emscripten_glBindBufferRange:$o,emscripten_glBindFramebuffer:Yo,emscripten_glBindRenderbuffer:Ko,emscripten_glBindSampler:Jo,emscripten_glBindTexture:Zo,emscripten_glBindTransformFeedback:ei,emscripten_glBindVertexArray:ti,emscripten_glBindVertexArrayOES:ri,emscripten_glBlendColor:ni,emscripten_glBlendEquation:oi,emscripten_glBlendEquationSeparate:ii,emscripten_glBlendFunc:ai,emscripten_glBlendFuncSeparate:si,emscripten_glBlitFramebuffer:ci,emscripten_glBufferData:ui,emscripten_glBufferSubData:li,emscripten_glCheckFramebufferStatus:di,emscripten_glClear:fi,emscripten_glClearBufferfi:pi,emscripten_glClearBufferfv:gi,emscripten_glClearBufferiv:hi,emscripten_glClearBufferuiv:mi,emscripten_glClearColor:vi,emscripten_glClearDepthf:bi,emscripten_glClearStencil:yi,emscripten_glClientWaitSync:wi,emscripten_glColorMask:_i,emscripten_glCompileShader:Oi,emscripten_glCompressedTexImage2D:Ti,emscripten_glCompressedTexImage3D:Di,emscripten_glCompressedTexSubImage2D:Pi,emscripten_glCompressedTexSubImage3D:xi,emscripten_glCopyBufferSubData:Si,emscripten_glCopyTexImage2D:Mi,emscripten_glCopyTexSubImage2D:Ri,emscripten_glCopyTexSubImage3D:ki,emscripten_glCreateProgram:Fi,emscripten_glCreateShader:Ai,emscripten_glCullFace:Ci,emscripten_glDeleteBuffers:Ii,emscripten_glDeleteFramebuffers:Ni,emscripten_glDeleteProgram:ji,emscripten_glDeleteQueries:Li,emscripten_glDeleteQueriesEXT:Ui,emscripten_glDeleteRenderbuffers:Hi,emscripten_glDeleteSamplers:Bi,emscripten_glDeleteShader:Xi,emscripten_glDeleteSync:Qi,emscripten_glDeleteTextures:Gi,emscripten_glDeleteTransformFeedbacks:qi,emscripten_glDeleteVertexArrays:Vi,emscripten_glDeleteVertexArraysOES:Wi,emscripten_glDepthFunc:zi,emscripten_glDepthMask:$i,emscripten_glDepthRangef:Yi,emscripten_glDetachShader:Ki,emscripten_glDisable:Ji,emscripten_glDisableVertexAttribArray:Zi,emscripten_glDrawArrays:ea,emscripten_glDrawArraysInstanced:ta,emscripten_glDrawArraysInstancedANGLE:ra,emscripten_glDrawArraysInstancedARB:na,emscripten_glDrawArraysInstancedEXT:oa,emscripten_glDrawArraysInstancedNV:ia,emscripten_glDrawBuffers:sa,emscripten_glDrawBuffersEXT:ca,emscripten_glDrawBuffersWEBGL:ua,emscripten_glDrawElements:la,emscripten_glDrawElementsInstanced:da,emscripten_glDrawElementsInstancedANGLE:fa,emscripten_glDrawElementsInstancedARB:pa,emscripten_glDrawElementsInstancedEXT:ga,emscripten_glDrawElementsInstancedNV:ha,emscripten_glDrawRangeElements:va,emscripten_glEnable:ba,emscripten_glEnableVertexAttribArray:ya,emscripten_glEndQuery:Ea,emscripten_glEndQueryEXT:wa,emscripten_glEndTransformFeedback:_a,emscripten_glFenceSync:Oa,emscripten_glFinish:Ta,emscripten_glFlush:Da,emscripten_glFramebufferRenderbuffer:Pa,emscripten_glFramebufferTexture2D:xa,emscripten_glFramebufferTextureLayer:Sa,emscripten_glFrontFace:Ma,emscripten_glGenBuffers:ka,emscripten_glGenFramebuffers:Fa,emscripten_glGenQueries:Aa,emscripten_glGenQueriesEXT:Ca,emscripten_glGenRenderbuffers:Ia,emscripten_glGenSamplers:Na,emscripten_glGenTextures:ja,emscripten_glGenTransformFeedbacks:La,emscripten_glGenVertexArrays:Ua,emscripten_glGenVertexArraysOES:Ha,emscripten_glGenerateMipmap:Ba,emscripten_glGetActiveAttrib:Qa,emscripten_glGetActiveUniform:Ga,emscripten_glGetActiveUniformBlockName:qa,emscripten_glGetActiveUniformBlockiv:Va,emscripten_glGetActiveUniformsiv:Wa,emscripten_glGetAttachedShaders:za,emscripten_glGetAttribLocation:$a,emscripten_glGetBooleanv:es,emscripten_glGetBufferParameteri64v:ts,emscripten_glGetBufferParameteriv:rs,emscripten_glGetError:ns,emscripten_glGetFloatv:os,emscripten_glGetFragDataLocation:is,emscripten_glGetFramebufferAttachmentParameteriv:as,emscripten_glGetInteger64i_v:cs,emscripten_glGetInteger64v:us,emscripten_glGetIntegeri_v:ls,emscripten_glGetIntegerv:ds,emscripten_glGetInternalformativ:fs,emscripten_glGetProgramBinary:ps,emscripten_glGetProgramInfoLog:gs,emscripten_glGetProgramiv:hs,emscripten_glGetQueryObjecti64vEXT:ms,emscripten_glGetQueryObjectivEXT:vs,emscripten_glGetQueryObjectui64vEXT:bs,emscripten_glGetQueryObjectuiv:ys,emscripten_glGetQueryObjectuivEXT:Es,emscripten_glGetQueryiv:ws,emscripten_glGetQueryivEXT:_s,emscripten_glGetRenderbufferParameteriv:Os,emscripten_glGetSamplerParameterfv:Ts,emscripten_glGetSamplerParameteriv:Ds,emscripten_glGetShaderInfoLog:Ps,emscripten_glGetShaderPrecisionFormat:xs,emscripten_glGetShaderSource:Ss,emscripten_glGetShaderiv:Ms,emscripten_glGetString:ks,emscripten_glGetStringi:Fs,emscripten_glGetSynciv:As,emscripten_glGetTexParameterfv:Cs,emscripten_glGetTexParameteriv:Is,emscripten_glGetTransformFeedbackVarying:Ns,emscripten_glGetUniformBlockIndex:js,emscripten_glGetUniformIndices:Ls,emscripten_glGetUniformLocation:Xs,emscripten_glGetUniformfv:qs,emscripten_glGetUniformiv:Vs,emscripten_glGetUniformuiv:Ws,emscripten_glGetVertexAttribIiv:$s,emscripten_glGetVertexAttribIuiv:Ys,emscripten_glGetVertexAttribPointerv:Ks,emscripten_glGetVertexAttribfv:Js,emscripten_glGetVertexAttribiv:Zs,emscripten_glHint:ec,emscripten_glInvalidateFramebuffer:tc,emscripten_glInvalidateSubFramebuffer:rc,emscripten_glIsBuffer:nc,emscripten_glIsEnabled:oc,emscripten_glIsFramebuffer:ic,emscripten_glIsProgram:ac,emscripten_glIsQuery:sc,emscripten_glIsQueryEXT:cc,emscripten_glIsRenderbuffer:uc,emscripten_glIsSampler:lc,emscripten_glIsShader:dc,emscripten_glIsSync:fc,emscripten_glIsTexture:pc,emscripten_glIsTransformFeedback:gc,emscripten_glIsVertexArray:hc,emscripten_glIsVertexArrayOES:mc,emscripten_glLineWidth:vc,emscripten_glLinkProgram:bc,emscripten_glPauseTransformFeedback:yc,emscripten_glPixelStorei:Ec,emscripten_glPolygonOffset:wc,emscripten_glProgramBinary:_c,emscripten_glProgramParameteri:Oc,emscripten_glQueryCounterEXT:Tc,emscripten_glReadBuffer:Dc,emscripten_glReadPixels:kc,emscripten_glReleaseShaderCompiler:Fc,emscripten_glRenderbufferStorage:Ac,emscripten_glRenderbufferStorageMultisample:Cc,emscripten_glResumeTransformFeedback:Ic,emscripten_glSampleCoverage:Nc,emscripten_glSamplerParameterf:jc,emscripten_glSamplerParameterfv:Lc,emscripten_glSamplerParameteri:Uc,emscripten_glSamplerParameteriv:Hc,emscripten_glScissor:Bc,emscripten_glShaderBinary:Xc,emscripten_glShaderSource:Qc,emscripten_glStencilFunc:Gc,emscripten_glStencilFuncSeparate:qc,emscripten_glStencilMask:Vc,emscripten_glStencilMaskSeparate:Wc,emscripten_glStencilOp:zc,emscripten_glStencilOpSeparate:$c,emscripten_glTexImage2D:Yc,emscripten_glTexImage3D:Kc,emscripten_glTexParameterf:Jc,emscripten_glTexParameterfv:Zc,emscripten_glTexParameteri:eu,emscripten_glTexParameteriv:tu,emscripten_glTexStorage2D:ru,emscripten_glTexStorage3D:nu,emscripten_glTexSubImage2D:ou,emscripten_glTexSubImage3D:iu,emscripten_glTransformFeedbackVaryings:au,emscripten_glUniform1f:su,emscripten_glUniform1fv:uu,emscripten_glUniform1i:lu,emscripten_glUniform1iv:fu,emscripten_glUniform1ui:pu,emscripten_glUniform1uiv:gu,emscripten_glUniform2f:hu,emscripten_glUniform2fv:mu,emscripten_glUniform2i:vu,emscripten_glUniform2iv:bu,emscripten_glUniform2ui:yu,emscripten_glUniform2uiv:Eu,emscripten_glUniform3f:wu,emscripten_glUniform3fv:_u,emscripten_glUniform3i:Ou,emscripten_glUniform3iv:Tu,emscripten_glUniform3ui:Du,emscripten_glUniform3uiv:Pu,emscripten_glUniform4f:xu,emscripten_glUniform4fv:Su,emscripten_glUniform4i:Mu,emscripten_glUniform4iv:Ru,emscripten_glUniform4ui:ku,emscripten_glUniform4uiv:Fu,emscripten_glUniformBlockBinding:Au,emscripten_glUniformMatrix2fv:Cu,emscripten_glUniformMatrix2x3fv:Iu,emscripten_glUniformMatrix2x4fv:Nu,emscripten_glUniformMatrix3fv:ju,emscripten_glUniformMatrix3x2fv:Lu,emscripten_glUniformMatrix3x4fv:Uu,emscripten_glUniformMatrix4fv:Hu,emscripten_glUniformMatrix4x2fv:Bu,emscripten_glUniformMatrix4x3fv:Xu,emscripten_glUseProgram:Qu,emscripten_glValidateProgram:Gu,emscripten_glVertexAttrib1f:qu,emscripten_glVertexAttrib1fv:Vu,emscripten_glVertexAttrib2f:Wu,emscripten_glVertexAttrib2fv:zu,emscripten_glVertexAttrib3f:$u,emscripten_glVertexAttrib3fv:Yu,emscripten_glVertexAttrib4f:Ku,emscripten_glVertexAttrib4fv:Ju,emscripten_glVertexAttribDivisor:Zu,emscripten_glVertexAttribDivisorANGLE:el,emscripten_glVertexAttribDivisorARB:tl,emscripten_glVertexAttribDivisorEXT:rl,emscripten_glVertexAttribDivisorNV:nl,emscripten_glVertexAttribI4i:ol,emscripten_glVertexAttribI4iv:il,emscripten_glVertexAttribI4ui:al,emscripten_glVertexAttribI4uiv:sl,emscripten_glVertexAttribIPointer:cl,emscripten_glVertexAttribPointer:ul,emscripten_glViewport:ll,emscripten_glWaitSync:dl,emscripten_memcpy_big:fl,emscripten_resize_heap:gl,emscripten_ubq_fetch_allocateFetchResult:hl,emscripten_ubq_fetch_createHeader:ml,emscripten_ubq_fetch_deleteHeader:vl,emscripten_ubq_fetch_dispatchAsyncFetch:bl,emscripten_ubq_fetch_freeFetchResult:yl,emscripten_ubq_fetch_getFetchCompletedBytes:El,emscripten_ubq_fetch_getFetchResultAddress:wl,emscripten_ubq_fetch_getFetchResultLength:_l,emscripten_ubq_fetch_getFetchState:Ol,emscripten_ubq_fetch_getFetchTotalBytes:Tl,emscripten_webgl_create_context:Fl,emscripten_webgl_init_context_attributes:Al,emscripten_webgl_make_context_current:Cl,environ_get:Ll,environ_sizes_get:Ul,fd_close:Hl,fd_read:Bl,fd_seek:Xl,fd_write:Ql,getTempRet0:Gl,gettimeofday:ql,glActiveTexture:Vl,glAttachShader:Wl,glBindBuffer:zl,glBindFramebuffer:$l,glBindRenderbuffer:Yl,glBindTexture:Kl,glBlendEquation:Jl,glBlendEquationSeparate:Zl,glBlendFunc:ed,glBlendFuncSeparate:td,glBufferData:rd,glClear:nd,glClearColor:od,glClearStencil:id,glColorMask:ad,glCompileShader:sd,glCreateProgram:cd,glCreateShader:ud,glDeleteBuffers:ld,glDeleteFramebuffers:dd,glDeleteProgram:fd,glDeleteRenderbuffers:pd,glDeleteShader:gd,glDeleteTextures:hd,glDepthMask:md,glDetachShader:vd,glDisable:bd,glDrawArrays:yd,glEnable:Ed,glEnableVertexAttribArray:wd,glFinish:_d,glFramebufferRenderbuffer:Od,glFramebufferTexture2D:Td,glGenBuffers:Dd,glGenFramebuffers:Pd,glGenRenderbuffers:xd,glGenTextures:Sd,glGetAttribLocation:Md,glGetError:Rd,glGetIntegerv:kd,glGetProgramInfoLog:Fd,glGetProgramiv:Ad,glGetShaderPrecisionFormat:Cd,glGetString:Id,glGetUniformLocation:Nd,glLinkProgram:jd,glReadPixels:Ld,glRenderbufferStorage:Ud,glShaderSource:Hd,glStencilFunc:Bd,glStencilMask:Xd,glStencilOp:Qd,glTexImage2D:Gd,glTexParameteri:qd,glTexSubImage2D:Vd,glUniform1f:Wd,glUniform1i:zd,glUniform2fv:$d,glUniform2i:Yd,glUniform2iv:Kd,glUniform3fv:Jd,glUniform3i:Zd,glUniform3iv:ef,glUniform4fv:tf,glUniform4i:rf,glUniform4iv:nf,glUniformMatrix3fv:of,glUniformMatrix4fv:af,glUseProgram:sf,glVertexAttribPointer:cf,glViewport:uf,invoke_iii:Xf,invoke_iiii:Gf,invoke_iiiii:Qf,invoke_v:qf,invoke_vii:Vf,invoke_viiii:Bf,setTempRet0:lf,strftime_l:vf,time:bf},Mf=(ze(),o.___wasm_call_ctors=qe("__wasm_call_ctors"),o._malloc=qe("malloc")),Rf=(o._main=qe("main"),o._free=qe("free")),kf=o.___errno_location=qe("__errno_location"),Ff=(o._saveSetjmp=qe("saveSetjmp"),o.___getTypeName=qe("__getTypeName")),Af=(o.___embind_register_native_and_builtin_types=qe("__embind_register_native_and_builtin_types"),o.___stdio_exit=qe("__stdio_exit")),Cf=(o.___dl_seterr=qe("__dl_seterr"),o._emscripten_builtin_memalign=qe("emscripten_builtin_memalign")),If=o._setThrew=qe("setThrew"),Nf=o._emscripten_stack_init=function(){return(Nf=o._emscripten_stack_init=o.asm.emscripten_stack_init).apply(null,arguments)},jf=(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_base=function(){return(o._emscripten_stack_get_base=o.asm.emscripten_stack_get_base).apply(null,arguments)},o._emscripten_stack_get_end=function(){return(jf=o._emscripten_stack_get_end=o.asm.emscripten_stack_get_end).apply(null,arguments)}),Lf=o.stackSave=qe("stackSave"),Uf=o.stackRestore=qe("stackRestore"),Hf=o.stackAlloc=qe("stackAlloc");function Bf(e,t,r,n,o){var i=Lf();try{Ze(e)(t,r,n,o)}catch(e){if(Uf(i),e!==e+0&&"longjmp"!==e)throw e;If(1,0)}}function Xf(e,t,r){var n=Lf();try{return Ze(e)(t,r)}catch(e){if(Uf(n),e!==e+0&&"longjmp"!==e)throw e;If(1,0)}}function Qf(e,t,r,n,o){var i=Lf();try{return Ze(e)(t,r,n,o)}catch(e){if(Uf(i),e!==e+0&&"longjmp"!==e)throw e;If(1,0)}}function Gf(e,t,r,n){var o=Lf();try{return Ze(e)(t,r,n)}catch(e){if(Uf(o),e!==e+0&&"longjmp"!==e)throw e;If(1,0)}}function qf(e){var t=Lf();try{Ze(e)()}catch(e){if(Uf(t),e!==e+0&&"longjmp"!==e)throw e;If(1,0)}}function Vf(e,t,r){var n=Lf();try{Ze(e)(t,r)}catch(e){if(Uf(n),e!==e+0&&"longjmp"!==e)throw e;If(1,0)}}function Wf(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function zf(e){C(0==ke,'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=Hf(4*(r+1));V[n>>2]=oe(l);for(var i=1;i<r;i++)V[(n>>2)+i]=oe(e[i-1]);V[(n>>2)+r]=0;try{var a=t(r,n);return Jf(a,!0),a}catch(e){return et(e)}}function $f(){Nf(),fe()}function Yf(e){function r(){xf||(xf=!0,o.calledRun=!0,A||(Te(),De(),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),ep&&zf(e),xe()))}e=e||u,ke>0||($f(),Oe(),ke>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),r()}),1)):r(),pe()))}function Kf(){var e=_,t=O,r=!1;_=O=e=>{r=!0};try{Af(),["stdout","stderr"].forEach((function(e){var t=bt.analyzePath("/dev/"+e);if(t){var n=t.object.rdev,o=lt.ttys[n];o&&o.output&&o.output.length&&(r=!0)}}))}catch(e){}_=e,O=t,r&&T("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 Jf(e,t){if(F=e,we||Kf(),_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),O(r)}}else Pe();Zf(e)}function Zf(e){F=e,_e()||(o.onExit&&o.onExit(e),A=!0),d(e,new Wf(e))}if(o.dynCall_ji=qe("dynCall_ji"),o.dynCall_jij=qe("dynCall_jij"),o.dynCall_iiiijii=qe("dynCall_iiiijii"),o.dynCall_jiiji=qe("dynCall_jiiji"),o.dynCall_jj=qe("dynCall_jj"),o.dynCall_iiij=qe("dynCall_iiij"),o.dynCall_jiiiji=qe("dynCall_jiiiji"),o.dynCall_viiij=qe("dynCall_viiij"),o.dynCall_jiji=qe("dynCall_jiji"),o.dynCall_viijii=qe("dynCall_viijii"),o.dynCall_iiiiij=qe("dynCall_iiiiij"),o.dynCall_iiiiijj=qe("dynCall_iiiiijj"),o.dynCall_iiiiiijj=qe("dynCall_iiiiiijj"),Object.getOwnPropertyDescriptor(o,"intArrayFromString")||(o.intArrayFromString=()=>Le("'intArrayFromString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"intArrayToString")||(o.intArrayToString=()=>Le("'intArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ccall")||(o.ccall=()=>Le("'ccall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"cwrap")||(o.cwrap=()=>Le("'cwrap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setValue")||(o.setValue=()=>Le("'setValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.getValue=k,Object.getOwnPropertyDescriptor(o,"allocate")||(o.allocate=()=>Le("'allocate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UTF8ArrayToString")||(o.UTF8ArrayToString=()=>Le("'UTF8ArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.UTF8ToString=j,Object.getOwnPropertyDescriptor(o,"stringToUTF8Array")||(o.stringToUTF8Array=()=>Le("'stringToUTF8Array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToUTF8")||(o.stringToUTF8=()=>Le("'stringToUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF8")||(o.lengthBytesUTF8=()=>Le("'lengthBytesUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackTrace")||(o.stackTrace=()=>Le("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnPreRun")||(o.addOnPreRun=()=>Le("'addOnPreRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnInit")||(o.addOnInit=()=>Le("'addOnInit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnPreMain")||(o.addOnPreMain=()=>Le("'addOnPreMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnExit")||(o.addOnExit=()=>Le("'addOnExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnPostRun")||(o.addOnPostRun=()=>Le("'addOnPostRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeStringToMemory")||(o.writeStringToMemory=()=>Le("'writeStringToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeArrayToMemory")||(o.writeArrayToMemory=()=>Le("'writeArrayToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeAsciiToMemory")||(o.writeAsciiToMemory=()=>Le("'writeAsciiToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.addRunDependency=Ne,o.removeRunDependency=je,Object.getOwnPropertyDescriptor(o,"FS_createFolder")||(o.FS_createFolder=()=>Le("'FS_createFolder' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.FS_createPath=bt.createPath,o.FS_createDataFile=bt.createDataFile,o.FS_createPreloadedFile=bt.createPreloadedFile,o.FS_createLazyFile=bt.createLazyFile,Object.getOwnPropertyDescriptor(o,"FS_createLink")||(o.FS_createLink=()=>Le("'FS_createLink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.FS_createDevice=bt.createDevice,o.FS_unlink=bt.unlink,Object.getOwnPropertyDescriptor(o,"getLEB")||(o.getLEB=()=>Le("'getLEB' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getFunctionTables")||(o.getFunctionTables=()=>Le("'getFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"alignFunctionTables")||(o.alignFunctionTables=()=>Le("'alignFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerFunctions")||(o.registerFunctions=()=>Le("'registerFunctions' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addFunction")||(o.addFunction=()=>Le("'addFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"removeFunction")||(o.removeFunction=()=>Le("'removeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getFuncWrapper")||(o.getFuncWrapper=()=>Le("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"prettyPrint")||(o.prettyPrint=()=>Le("'prettyPrint' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"dynCall")||(o.dynCall=()=>Le("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getCompilerSetting")||(o.getCompilerSetting=()=>Le("'getCompilerSetting' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"print")||(o.print=()=>Le("'print' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"printErr")||(o.printErr=()=>Le("'printErr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getTempRet0")||(o.getTempRet0=()=>Le("'getTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setTempRet0")||(o.setTempRet0=()=>Le("'setTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"callMain")||(o.callMain=()=>Le("'callMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"abort")||(o.abort=()=>Le("'abort' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"keepRuntimeAlive")||(o.keepRuntimeAlive=()=>Le("'keepRuntimeAlive' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"zeroMemory")||(o.zeroMemory=()=>Le("'zeroMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToNewUTF8")||(o.stringToNewUTF8=()=>Le("'stringToNewUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscripten_realloc_buffer")||(o.emscripten_realloc_buffer=()=>Le("'emscripten_realloc_buffer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ENV")||(o.ENV=()=>Le("'ENV' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"withStackSave")||(o.withStackSave=()=>Le("'withStackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ERRNO_CODES")||(o.ERRNO_CODES=()=>Le("'ERRNO_CODES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ERRNO_MESSAGES")||(o.ERRNO_MESSAGES=()=>Le("'ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setErrNo")||(o.setErrNo=()=>Le("'setErrNo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetPton4")||(o.inetPton4=()=>Le("'inetPton4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetNtop4")||(o.inetNtop4=()=>Le("'inetNtop4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetPton6")||(o.inetPton6=()=>Le("'inetPton6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetNtop6")||(o.inetNtop6=()=>Le("'inetNtop6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readSockaddr")||(o.readSockaddr=()=>Le("'readSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeSockaddr")||(o.writeSockaddr=()=>Le("'writeSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"DNS")||(o.DNS=()=>Le("'DNS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getHostByName")||(o.getHostByName=()=>Le("'getHostByName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Protocols")||(o.Protocols=()=>Le("'Protocols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Sockets")||(o.Sockets=()=>Le("'Sockets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getRandomDevice")||(o.getRandomDevice=()=>Le("'getRandomDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"traverseStack")||(o.traverseStack=()=>Le("'traverseStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertFrameToPC")||(o.convertFrameToPC=()=>Le("'convertFrameToPC' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UNWIND_CACHE")||(o.UNWIND_CACHE=()=>Le("'UNWIND_CACHE' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"saveInUnwindCache")||(o.saveInUnwindCache=()=>Le("'saveInUnwindCache' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertPCtoSourceLocation")||(o.convertPCtoSourceLocation=()=>Le("'convertPCtoSourceLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readAsmConstArgsArray")||(o.readAsmConstArgsArray=()=>Le("'readAsmConstArgsArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readAsmConstArgs")||(o.readAsmConstArgs=()=>Le("'readAsmConstArgs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"mainThreadEM_ASM")||(o.mainThreadEM_ASM=()=>Le("'mainThreadEM_ASM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"jstoi_q")||(o.jstoi_q=()=>Le("'jstoi_q' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"jstoi_s")||(o.jstoi_s=()=>Le("'jstoi_s' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getExecutableName")||(o.getExecutableName=()=>Le("'getExecutableName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"listenOnce")||(o.listenOnce=()=>Le("'listenOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"autoResumeAudioContext")||(o.autoResumeAudioContext=()=>Le("'autoResumeAudioContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"dynCallLegacy")||(o.dynCallLegacy=()=>Le("'dynCallLegacy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getDynCaller")||(o.getDynCaller=()=>Le("'getDynCaller' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"dynCall")||(o.dynCall=()=>Le("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"callRuntimeCallbacks")||(o.callRuntimeCallbacks=()=>Le("'callRuntimeCallbacks' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"wasmTableMirror")||(o.wasmTableMirror=()=>Le("'wasmTableMirror' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setWasmTableEntry")||(o.setWasmTableEntry=()=>Le("'setWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getWasmTableEntry")||(o.getWasmTableEntry=()=>Le("'getWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"handleException")||(o.handleException=()=>Le("'handleException' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runtimeKeepalivePush")||(o.runtimeKeepalivePush=()=>Le("'runtimeKeepalivePush' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runtimeKeepalivePop")||(o.runtimeKeepalivePop=()=>Le("'runtimeKeepalivePop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"callUserCallback")||(o.callUserCallback=()=>Le("'callUserCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"maybeExit")||(o.maybeExit=()=>Le("'maybeExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"safeSetTimeout")||(o.safeSetTimeout=()=>Le("'safeSetTimeout' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"asmjsMangle")||(o.asmjsMangle=()=>Le("'asmjsMangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"asyncLoad")||(o.asyncLoad=()=>Le("'asyncLoad' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"alignMemory")||(o.alignMemory=()=>Le("'alignMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"mmapAlloc")||(o.mmapAlloc=()=>Le("'mmapAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"reallyNegative")||(o.reallyNegative=()=>Le("'reallyNegative' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"unSign")||(o.unSign=()=>Le("'unSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"reSign")||(o.reSign=()=>Le("'reSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"formatString")||(o.formatString=()=>Le("'formatString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PATH")||(o.PATH=()=>Le("'PATH' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PATH_FS")||(o.PATH_FS=()=>Le("'PATH_FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SYSCALLS")||(o.SYSCALLS=()=>Le("'SYSCALLS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getSocketFromFD")||(o.getSocketFromFD=()=>Le("'getSocketFromFD' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getSocketAddress")||(o.getSocketAddress=()=>Le("'getSocketAddress' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"JSEvents")||(o.JSEvents=()=>Le("'JSEvents' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerKeyEventCallback")||(o.registerKeyEventCallback=()=>Le("'registerKeyEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.specialHTMLTargets=Sl,Object.getOwnPropertyDescriptor(o,"maybeCStringToJsString")||(o.maybeCStringToJsString=()=>Le("'maybeCStringToJsString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"findEventTarget")||(o.findEventTarget=()=>Le("'findEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"findCanvasEventTarget")||(o.findCanvasEventTarget=()=>Le("'findCanvasEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getBoundingClientRect")||(o.getBoundingClientRect=()=>Le("'getBoundingClientRect' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillMouseEventData")||(o.fillMouseEventData=()=>Le("'fillMouseEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerMouseEventCallback")||(o.registerMouseEventCallback=()=>Le("'registerMouseEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerWheelEventCallback")||(o.registerWheelEventCallback=()=>Le("'registerWheelEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerUiEventCallback")||(o.registerUiEventCallback=()=>Le("'registerUiEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerFocusEventCallback")||(o.registerFocusEventCallback=()=>Le("'registerFocusEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillDeviceOrientationEventData")||(o.fillDeviceOrientationEventData=()=>Le("'fillDeviceOrientationEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerDeviceOrientationEventCallback")||(o.registerDeviceOrientationEventCallback=()=>Le("'registerDeviceOrientationEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillDeviceMotionEventData")||(o.fillDeviceMotionEventData=()=>Le("'fillDeviceMotionEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerDeviceMotionEventCallback")||(o.registerDeviceMotionEventCallback=()=>Le("'registerDeviceMotionEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"screenOrientation")||(o.screenOrientation=()=>Le("'screenOrientation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillOrientationChangeEventData")||(o.fillOrientationChangeEventData=()=>Le("'fillOrientationChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerOrientationChangeEventCallback")||(o.registerOrientationChangeEventCallback=()=>Le("'registerOrientationChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillFullscreenChangeEventData")||(o.fillFullscreenChangeEventData=()=>Le("'fillFullscreenChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerFullscreenChangeEventCallback")||(o.registerFullscreenChangeEventCallback=()=>Le("'registerFullscreenChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerRestoreOldStyle")||(o.registerRestoreOldStyle=()=>Le("'registerRestoreOldStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"hideEverythingExceptGivenElement")||(o.hideEverythingExceptGivenElement=()=>Le("'hideEverythingExceptGivenElement' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"restoreHiddenElements")||(o.restoreHiddenElements=()=>Le("'restoreHiddenElements' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setLetterbox")||(o.setLetterbox=()=>Le("'setLetterbox' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"currentFullscreenStrategy")||(o.currentFullscreenStrategy=()=>Le("'currentFullscreenStrategy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"restoreOldWindowedStyle")||(o.restoreOldWindowedStyle=()=>Le("'restoreOldWindowedStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"softFullscreenResizeWebGLRenderTarget")||(o.softFullscreenResizeWebGLRenderTarget=()=>Le("'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"doRequestFullscreen")||(o.doRequestFullscreen=()=>Le("'doRequestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillPointerlockChangeEventData")||(o.fillPointerlockChangeEventData=()=>Le("'fillPointerlockChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerPointerlockChangeEventCallback")||(o.registerPointerlockChangeEventCallback=()=>Le("'registerPointerlockChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerPointerlockErrorEventCallback")||(o.registerPointerlockErrorEventCallback=()=>Le("'registerPointerlockErrorEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"requestPointerLock")||(o.requestPointerLock=()=>Le("'requestPointerLock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillVisibilityChangeEventData")||(o.fillVisibilityChangeEventData=()=>Le("'fillVisibilityChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerVisibilityChangeEventCallback")||(o.registerVisibilityChangeEventCallback=()=>Le("'registerVisibilityChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerTouchEventCallback")||(o.registerTouchEventCallback=()=>Le("'registerTouchEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillGamepadEventData")||(o.fillGamepadEventData=()=>Le("'fillGamepadEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerGamepadEventCallback")||(o.registerGamepadEventCallback=()=>Le("'registerGamepadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerBeforeUnloadEventCallback")||(o.registerBeforeUnloadEventCallback=()=>Le("'registerBeforeUnloadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillBatteryEventData")||(o.fillBatteryEventData=()=>Le("'fillBatteryEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"battery")||(o.battery=()=>Le("'battery' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerBatteryEventCallback")||(o.registerBatteryEventCallback=()=>Le("'registerBatteryEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setCanvasElementSize")||(o.setCanvasElementSize=()=>Le("'setCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getCanvasElementSize")||(o.getCanvasElementSize=()=>Le("'getCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"demangle")||(o.demangle=()=>Le("'demangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"demangleAll")||(o.demangleAll=()=>Le("'demangleAll' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"jsStackTrace")||(o.jsStackTrace=()=>Le("'jsStackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackTrace")||(o.stackTrace=()=>Le("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getEnvStrings")||(o.getEnvStrings=()=>Le("'getEnvStrings' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"checkWasiClock")||(o.checkWasiClock=()=>Le("'checkWasiClock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToI64")||(o.writeI53ToI64=()=>Le("'writeI53ToI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToI64Clamped")||(o.writeI53ToI64Clamped=()=>Le("'writeI53ToI64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToI64Signaling")||(o.writeI53ToI64Signaling=()=>Le("'writeI53ToI64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToU64Clamped")||(o.writeI53ToU64Clamped=()=>Le("'writeI53ToU64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToU64Signaling")||(o.writeI53ToU64Signaling=()=>Le("'writeI53ToU64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readI53FromI64")||(o.readI53FromI64=()=>Le("'readI53FromI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readI53FromU64")||(o.readI53FromU64=()=>Le("'readI53FromU64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertI32PairToI53")||(o.convertI32PairToI53=()=>Le("'convertI32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertU32PairToI53")||(o.convertU32PairToI53=()=>Le("'convertU32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setImmediateWrapped")||(o.setImmediateWrapped=()=>Le("'setImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"clearImmediateWrapped")||(o.clearImmediateWrapped=()=>Le("'clearImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"polyfillSetImmediate")||(o.polyfillSetImmediate=()=>Le("'polyfillSetImmediate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"uncaughtExceptionCount")||(o.uncaughtExceptionCount=()=>Le("'uncaughtExceptionCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exceptionLast")||(o.exceptionLast=()=>Le("'exceptionLast' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exceptionCaught")||(o.exceptionCaught=()=>Le("'exceptionCaught' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ExceptionInfo")||(o.ExceptionInfo=()=>Le("'ExceptionInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"CatchInfo")||(o.CatchInfo=()=>Le("'CatchInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exception_addRef")||(o.exception_addRef=()=>Le("'exception_addRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exception_decRef")||(o.exception_decRef=()=>Le("'exception_decRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Browser")||(o.Browser=()=>Le("'Browser' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"funcWrappers")||(o.funcWrappers=()=>Le("'funcWrappers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getFuncWrapper")||(o.getFuncWrapper=()=>Le("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setMainLoop")||(o.setMainLoop=()=>Le("'setMainLoop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"wget")||(o.wget=()=>Le("'wget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"FS")||(o.FS=()=>Le("'FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"MEMFS")||(o.MEMFS=()=>Le("'MEMFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"TTY")||(o.TTY=()=>Le("'TTY' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PIPEFS")||(o.PIPEFS=()=>Le("'PIPEFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SOCKFS")||(o.SOCKFS=()=>Le("'SOCKFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"_setNetworkCallback")||(o._setNetworkCallback=()=>Le("'_setNetworkCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"tempFixedLengthArray")||(o.tempFixedLengthArray=()=>Le("'tempFixedLengthArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"miniTempWebGLFloatBuffers")||(o.miniTempWebGLFloatBuffers=()=>Le("'miniTempWebGLFloatBuffers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"heapObjectForWebGLType")||(o.heapObjectForWebGLType=()=>Le("'heapObjectForWebGLType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"heapAccessShiftForWebGLHeap")||(o.heapAccessShiftForWebGLHeap=()=>Le("'heapAccessShiftForWebGLHeap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GL")||(o.GL=()=>Le("'GL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGet")||(o.emscriptenWebGLGet=()=>Le("'emscriptenWebGLGet' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"computeUnpackAlignedImageSize")||(o.computeUnpackAlignedImageSize=()=>Le("'computeUnpackAlignedImageSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetTexPixelData")||(o.emscriptenWebGLGetTexPixelData=()=>Le("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetUniform")||(o.emscriptenWebGLGetUniform=()=>Le("'emscriptenWebGLGetUniform' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"webglGetUniformLocation")||(o.webglGetUniformLocation=()=>Le("'webglGetUniformLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"webglPrepareUniformLocationsBeforeFirstUse")||(o.webglPrepareUniformLocationsBeforeFirstUse=()=>Le("'webglPrepareUniformLocationsBeforeFirstUse' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"webglGetLeftBracePos")||(o.webglGetLeftBracePos=()=>Le("'webglGetLeftBracePos' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetVertexAttrib")||(o.emscriptenWebGLGetVertexAttrib=()=>Le("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeGLArray")||(o.writeGLArray=()=>Le("'writeGLArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"AL")||(o.AL=()=>Le("'AL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_unicode")||(o.SDL_unicode=()=>Le("'SDL_unicode' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_ttfContext")||(o.SDL_ttfContext=()=>Le("'SDL_ttfContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_audio")||(o.SDL_audio=()=>Le("'SDL_audio' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL")||(o.SDL=()=>Le("'SDL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_gfx")||(o.SDL_gfx=()=>Le("'SDL_gfx' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLUT")||(o.GLUT=()=>Le("'GLUT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"EGL")||(o.EGL=()=>Le("'EGL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLFW_Window")||(o.GLFW_Window=()=>Le("'GLFW_Window' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLFW")||(o.GLFW=()=>Le("'GLFW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLEW")||(o.GLEW=()=>Le("'GLEW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"IDBStore")||(o.IDBStore=()=>Le("'IDBStore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runAndAbortIfError")||(o.runAndAbortIfError=()=>Le("'runAndAbortIfError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetIndexed")||(o.emscriptenWebGLGetIndexed=()=>Le("'emscriptenWebGLGetIndexed' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"InternalError")||(o.InternalError=()=>Le("'InternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"BindingError")||(o.BindingError=()=>Le("'BindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UnboundTypeError")||(o.UnboundTypeError=()=>Le("'UnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PureVirtualError")||(o.PureVirtualError=()=>Le("'PureVirtualError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_embind")||(o.init_embind=()=>Le("'init_embind' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwInternalError")||(o.throwInternalError=()=>Le("'throwInternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwBindingError")||(o.throwBindingError=()=>Le("'throwBindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwUnboundTypeError")||(o.throwUnboundTypeError=()=>Le("'throwUnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ensureOverloadTable")||(o.ensureOverloadTable=()=>Le("'ensureOverloadTable' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exposePublicSymbol")||(o.exposePublicSymbol=()=>Le("'exposePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"replacePublicSymbol")||(o.replacePublicSymbol=()=>Le("'replacePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"extendError")||(o.extendError=()=>Le("'extendError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"createNamedFunction")||(o.createNamedFunction=()=>Le("'createNamedFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registeredInstances")||(o.registeredInstances=()=>Le("'registeredInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getBasestPointer")||(o.getBasestPointer=()=>Le("'getBasestPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerInheritedInstance")||(o.registerInheritedInstance=()=>Le("'registerInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"unregisterInheritedInstance")||(o.unregisterInheritedInstance=()=>Le("'unregisterInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getInheritedInstance")||(o.getInheritedInstance=()=>Le("'getInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getInheritedInstanceCount")||(o.getInheritedInstanceCount=()=>Le("'getInheritedInstanceCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getLiveInheritedInstances")||(o.getLiveInheritedInstances=()=>Le("'getLiveInheritedInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registeredTypes")||(o.registeredTypes=()=>Le("'registeredTypes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"awaitingDependencies")||(o.awaitingDependencies=()=>Le("'awaitingDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"typeDependencies")||(o.typeDependencies=()=>Le("'typeDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registeredPointers")||(o.registeredPointers=()=>Le("'registeredPointers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerType")||(o.registerType=()=>Le("'registerType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"whenDependentTypesAreResolved")||(o.whenDependentTypesAreResolved=()=>Le("'whenDependentTypesAreResolved' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"embind_charCodes")||(o.embind_charCodes=()=>Le("'embind_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"embind_init_charCodes")||(o.embind_init_charCodes=()=>Le("'embind_init_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readLatin1String")||(o.readLatin1String=()=>Le("'readLatin1String' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getTypeName")||(o.getTypeName=()=>Le("'getTypeName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"heap32VectorToArray")||(o.heap32VectorToArray=()=>Le("'heap32VectorToArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"requireRegisteredType")||(o.requireRegisteredType=()=>Le("'requireRegisteredType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getShiftFromSize")||(o.getShiftFromSize=()=>Le("'getShiftFromSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"integerReadValueFromPointer")||(o.integerReadValueFromPointer=()=>Le("'integerReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"enumReadValueFromPointer")||(o.enumReadValueFromPointer=()=>Le("'enumReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"floatReadValueFromPointer")||(o.floatReadValueFromPointer=()=>Le("'floatReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"simpleReadValueFromPointer")||(o.simpleReadValueFromPointer=()=>Le("'simpleReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runDestructors")||(o.runDestructors=()=>Le("'runDestructors' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"new_")||(o.new_=()=>Le("'new_' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"craftInvokerFunction")||(o.craftInvokerFunction=()=>Le("'craftInvokerFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"embind__requireFunction")||(o.embind__requireFunction=()=>Le("'embind__requireFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"tupleRegistrations")||(o.tupleRegistrations=()=>Le("'tupleRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"structRegistrations")||(o.structRegistrations=()=>Le("'structRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"genericPointerToWireType")||(o.genericPointerToWireType=()=>Le("'genericPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"constNoSmartPtrRawPointerToWireType")||(o.constNoSmartPtrRawPointerToWireType=()=>Le("'constNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"nonConstNoSmartPtrRawPointerToWireType")||(o.nonConstNoSmartPtrRawPointerToWireType=()=>Le("'nonConstNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_RegisteredPointer")||(o.init_RegisteredPointer=()=>Le("'init_RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer")||(o.RegisteredPointer=()=>Le("'RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_getPointee")||(o.RegisteredPointer_getPointee=()=>Le("'RegisteredPointer_getPointee' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_destructor")||(o.RegisteredPointer_destructor=()=>Le("'RegisteredPointer_destructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_deleteObject")||(o.RegisteredPointer_deleteObject=()=>Le("'RegisteredPointer_deleteObject' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_fromWireType")||(o.RegisteredPointer_fromWireType=()=>Le("'RegisteredPointer_fromWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runDestructor")||(o.runDestructor=()=>Le("'runDestructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"releaseClassHandle")||(o.releaseClassHandle=()=>Le("'releaseClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"finalizationRegistry")||(o.finalizationRegistry=()=>Le("'finalizationRegistry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"detachFinalizer_deps")||(o.detachFinalizer_deps=()=>Le("'detachFinalizer_deps' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"detachFinalizer")||(o.detachFinalizer=()=>Le("'detachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"attachFinalizer")||(o.attachFinalizer=()=>Le("'attachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"makeClassHandle")||(o.makeClassHandle=()=>Le("'makeClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_ClassHandle")||(o.init_ClassHandle=()=>Le("'init_ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle")||(o.ClassHandle=()=>Le("'ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_isAliasOf")||(o.ClassHandle_isAliasOf=()=>Le("'ClassHandle_isAliasOf' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwInstanceAlreadyDeleted")||(o.throwInstanceAlreadyDeleted=()=>Le("'throwInstanceAlreadyDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_clone")||(o.ClassHandle_clone=()=>Le("'ClassHandle_clone' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_delete")||(o.ClassHandle_delete=()=>Le("'ClassHandle_delete' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"deletionQueue")||(o.deletionQueue=()=>Le("'deletionQueue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_isDeleted")||(o.ClassHandle_isDeleted=()=>Le("'ClassHandle_isDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_deleteLater")||(o.ClassHandle_deleteLater=()=>Le("'ClassHandle_deleteLater' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"flushPendingDeletes")||(o.flushPendingDeletes=()=>Le("'flushPendingDeletes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"delayFunction")||(o.delayFunction=()=>Le("'delayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setDelayFunction")||(o.setDelayFunction=()=>Le("'setDelayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredClass")||(o.RegisteredClass=()=>Le("'RegisteredClass' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"shallowCopyInternalPointer")||(o.shallowCopyInternalPointer=()=>Le("'shallowCopyInternalPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"downcastPointer")||(o.downcastPointer=()=>Le("'downcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"upcastPointer")||(o.upcastPointer=()=>Le("'upcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"validateThis")||(o.validateThis=()=>Le("'validateThis' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"char_0")||(o.char_0=()=>Le("'char_0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"char_9")||(o.char_9=()=>Le("'char_9' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"makeLegalFunctionName")||(o.makeLegalFunctionName=()=>Le("'makeLegalFunctionName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_handle_array")||(o.emval_handle_array=()=>Le("'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=()=>Le("'emval_free_list' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_symbols")||(o.emval_symbols=()=>Le("'emval_symbols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_emval")||(o.init_emval=()=>Le("'init_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"count_emval_handles")||(o.count_emval_handles=()=>Le("'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=()=>Le("'get_first_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getStringOrSymbol")||(o.getStringOrSymbol=()=>Le("'getStringOrSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Emval")||(o.Emval=()=>Le("'Emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_newers")||(o.emval_newers=()=>Le("'emval_newers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"craftEmvalAllocator")||(o.craftEmvalAllocator=()=>Le("'craftEmvalAllocator' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_get_global")||(o.emval_get_global=()=>Le("'emval_get_global' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_methodCallers")||(o.emval_methodCallers=()=>Le("'emval_methodCallers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_registeredMethods")||(o.emval_registeredMethods=()=>Le("'emval_registeredMethods' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"warnOnce")||(o.warnOnce=()=>Le("'warnOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackSave")||(o.stackSave=()=>Le("'stackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackRestore")||(o.stackRestore=()=>Le("'stackRestore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackAlloc")||(o.stackAlloc=()=>Le("'stackAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"AsciiToString")||(o.AsciiToString=()=>Le("'AsciiToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToAscii")||(o.stringToAscii=()=>Le("'stringToAscii' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UTF16ToString")||(o.UTF16ToString=()=>Le("'UTF16ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToUTF16")||(o.stringToUTF16=()=>Le("'stringToUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF16")||(o.lengthBytesUTF16=()=>Le("'lengthBytesUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UTF32ToString")||(o.UTF32ToString=()=>Le("'UTF32ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToUTF32")||(o.stringToUTF32=()=>Le("'stringToUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF32")||(o.lengthBytesUTF32=()=>Le("'lengthBytesUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"allocateUTF8")||(o.allocateUTF8=()=>Le("'allocateUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"allocateUTF8OnStack")||(o.allocateUTF8OnStack=()=>Le("'allocateUTF8OnStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.writeStackCookie=fe,o.checkStackCookie=pe,Object.getOwnPropertyDescriptor(o,"ALLOC_NORMAL")||Object.defineProperty(o,"ALLOC_NORMAL",{configurable:!0,get:function(){Le("'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(){Le("'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Ae=function e(){xf||Yf(),xf||(Ae=e)},o.run=Yf,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();var ep=!0;return o.noInitialRun&&(ep=!1),Yf(),e.ready}),ct=r.p+"assets/core/cesdk.wasm",ut=r.p+"assets/core/cesdk.data",lt=(e,t)=>null!=t?[t,e.split("/").pop()].join(""):new URL(e,window.location.origin);var dt,ft,pt,gt,ht,mt,vt,bt,yt,Et=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},wt=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 _t{constructor(e,t,r){dt.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}),ft.set(this,void 0),pt.set(this,void 0),gt.set(this,void 0),ht.set(this,(()=>{const e=this.block.findByType(o._h.Camera)[0];if(!e)return;const{width:t,height:r}=wt(this,pt,"f"),n=wt(this,ft,"f").getValue(e,o.$R.Camera,"resolution");Z(n.width,t,1e-4)&&Z(n.height,r,1e-4)||wt(this,ft,"f").setValue(e,o.$R.Camera,"resolution",{width:t,height:r}),Z(wt(this,ft,"f").getValue(e,o.$R.Camera,"pixelRatio"),window.devicePixelRatio,1e-4)||wt(this,ft,"f").setValue(e,o.$R.Camera,"pixelRatio",window.devicePixelRatio)})),mt.set(this,void 0),Et(this,gt,e,"f"),Et(this,ft,new ee(e),"f"),Et(this,pt,t,"f"),this.block=new De(e),this.scene=new Re(e),this.variable=new Ae(e),wt(this,ft,"f").useInternalAPI((e=>{e.setPreUpdateCallback(wt(this,ht,"f"))})),wt(this,dt,"m",vt).call(this)}dispose(){wt(this,dt,"m",bt).call(this),wt(this,ft,"f").useInternalAPI((e=>{e.setPreUpdateCallback(null)})),Et(this,pt,null,"f"),Et(this,ft,null,"f"),this.block=null,this.scene=null,this.variable=null,wt(this,gt,"f").delete(),Et(this,gt,null,"f")}static async init(e,t){console.log("[CESDK] Revision a596f407ca20c9286388512423766f4a530437e9"),t||(t=document.createElement("canvas"));const r=it.initWithDefaults(e);return new this(await((e,t)=>{const r=it.initWithDefaults(t),{core:n}=r,i=null!==(c=null===(s=null==(a=r)?void 0:a.callbacks)||void 0===s?void 0:s.log)&&void 0!==c?c:ze;var a,s,c;return new Promise(((t,a)=>{let s,c;return st({locateFile:(e,t)=>{if(e.endsWith(".wasm")){const e=lt(ct,n.baseURL).toString();return s=e,e}if(e.endsWith(".data")){const e=lt(ut,n.baseURL).toString();return c=e,e}return t+e},print:e=>{e&&"undefined"!==e&&i(e,o.in.Info)},printErr:e=>{e&&"undefined"!==e&&i(e,o.in.Error)},onRuntimeInitialized:()=>{i("Engine has been initialized.",o.in.Info)},logReadFiles:!1,printWithColors:!0}).then((n=>{let i="";"string"==typeof e?i=e:(n.specialHTMLTargets["!canvas"]=e,i="!canvas");const s=n.createEngine(i);if(s.isValid()){const e=s.value();!function(e,t){const r=new ee(e);function n(e,t){return r.execute("ubq/settings/set",[e,t])}n("ubq://license",t.license||""),n("ubq://basePath",t.baseURL),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])}))})),function(){const{imageMattingOnly:e,singlePageMode:r}=t.featureFlags||{};n("ubq://features/singlePageModeEnabled",r),n("cesdk://trackActivePage",!r),n("ubq://features/effectsEnabled",!0)}(),n("ubq://page/title/fontFileUri",t.page.title.fontFileUri),n("ubq://page/title/show",t.page.title.show),function(){if(void 0!==t.scene.maskSpotColor){const{rgbApproximation:e}=t.scene.maskSpotColor,n=(0,o.JY)(Object.assign(Object.assign({},e),{a:1}));r.execute("cesdk/setSpecialSpotColor",n)}}(),function(){var e;const n=null!==(e=t.extensions)&&void 0!==e?e:[];n.entries.forEach((e=>{r.execute("ubq/extension/register",`${n.baseURL+e}`)}))}(),function(){var r;const n=null!==(r=t.variables)&&void 0!==r?r:{};Object.entries(n).forEach((([t,r])=>{te(e.setVariableString(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)}))}))})(t,r),t,r)}}ft=new WeakMap,pt=new WeakMap,gt=new WeakMap,ht=new WeakMap,mt=new WeakMap,dt=new WeakSet,vt=function(e=!0){if(wt(this,mt,"f"))return;const t=()=>{wt(this,dt,"m",yt).call(this,e),Et(this,mt,requestAnimationFrame(t),"f")};Et(this,mt,requestAnimationFrame(t),"f")},bt=function(){wt(this,mt,"f")&&(cancelAnimationFrame(wt(this,mt,"f")),Et(this,mt,0,"f"))},yt=function(e=!0){e&&1===this.block.findByType(o._h.Scene).length&&wt(this,ft,"f").execute("ubq/render",{displayWidth:wt(this,pt,"f").width,displayHeight:wt(this,pt,"f").height}),wt(this,gt,"f").update()},Object.defineProperty(_t,"PositionMode",{enumerable:!0,configurable:!0,writable:!0,value:Ee}),Object.defineProperty(_t,"SizeMode",{enumerable:!0,configurable:!0,writable:!0,value:we}),Object.defineProperty(_t,"PropertyType",{enumerable:!0,configurable:!0,writable:!0,value:_e})}},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})()}));
|