@cesdk/engine 1.6.1 → 1.6.2
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.data +0 -0
- package/assets/core/cesdk.wasm +0 -0
- package/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={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},4691:(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)}},7554:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}},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),p=!r&&!l&&!d&&c(e),f=r||l||d||p,m=f?n(e.length,String):[],g=m.length;for(var h in e)!t&&!u.call(e,h)||f&&("length"==h||d&&("offset"==h||"parent"==h)||p&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||s(h,g))||m.push(h);return m}},3675:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},4656:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},8247:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},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},8288:(e,t,r)=>{var n=r(4656),o=r(1813);e.exports=function e(t,r,i,a,s){var c=-1,u=t.length;for(i||(i=o),s||(s=[]);++c<u;){var l=t[c];r>0&&i(l)?r>1?e(l,r-1,i,a,s):n(s,l):a||(s[s.length]=l)}return s}},3153:(e,t,r)=>{var n=r(7572)();e.exports=n},2759:(e,t,r)=>{var n=r(9652),o=r(5135),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,p=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?p: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(4691),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,p){t!==r&&i(r,(function(i,c){if(p||(p=new n),s(i))a(t,r,c,l,e,d,p);else{var f=d?d(u(t,c),i,c+"",t,r,p):void 0;void 0===f&&(f=i),o(t,c,f)}}),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),p=r(830),f=r(4820),m=r(1969),g=r(1859),h=r(7700),E=r(2963);e.exports=function(e,t,r,y,v,_,b){var w=h(e,r),T=h(t,r),O=b.get(T);if(O)n(e,r,O);else{var D=_?_(w,T,r+"",e,t,b):void 0,P=void 0===D;if(P){var x=u(T),S=!x&&d(T),R=!x&&!S&&g(T);D=T,x||S||R?u(w)?D=w:l(w)?D=a(w):S?(P=!1,D=o(T,!0)):R?(P=!1,D=i(T,!0)):D=[]:m(T)||c(T)?(D=w,c(w)?D=E(w):f(w)&&!p(w)||(D=s(T))):P=!1}P&&(b.set(T,D),v(D,T,y,_,b),b.delete(T)),n(e,r,D)}}},1445:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},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}},5208:(e,t,r)=>{var n=r(9652),o=r(3675),i=r(5860),a=r(1918),s=n?n.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},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},5135:(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]}},4530:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},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))}},1813:(e,t,r)=>{var n=r(9652),o=r(5664),i=r(5860),a=n?n.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},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""}},5153:e=>{var t="a-z\\xdf-\\xf6\\xf8-\\xff",r="A-Z\\xc0-\\xd6\\xd8-\\xde",n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="["+n+"]",i="\\d+",a="["+t+"]",s="[^\\ud800-\\udfff"+n+i+"\\u2700-\\u27bf"+t+r+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",l="["+r+"]",d="(?:"+a+"|"+s+")",p="(?:"+l+"|"+s+")",f="(?:['’](?:d|ll|m|re|s|t|ve))?",m="(?:['’](?:D|LL|M|RE|S|T|VE))?",g="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",h="[\\ufe0e\\ufe0f]?",E=h+g+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",c,u].join("|")+")"+h+g+")*",y="(?:"+["[\\u2700-\\u27bf]",c,u].join("|")+")"+E,v=RegExp([l+"?"+a+"+"+f+"(?="+[o,l,"$"].join("|")+")",p+"+"+m+"(?="+[o,l+d,"$"].join("|")+")",l+"?"+d+"+"+f,l+"+"+m,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,y].join("|"),"g");e.exports=function(e){return e.match(v)||[]}},7477:e=>{e.exports=function(e){return function(){return e}}},3355:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},9423:(e,t,r)=>{var n=r(8288);e.exports=function(e){return null!=e&&e.length?n(e,1):[]}},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}},1918:(e,t,r)=>{var n=r(2759),o=r(1408);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},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))}},8395:(e,t,r)=>{var n=r(5208);e.exports=function(e){return null==e?"":n(e)}},5377:(e,t,r)=>{var n=r(7554),o=r(3675),i=r(1445),a=r(1453),s=r(5274),c=Math.max;e.exports=function(e){if(!e||!e.length)return[];var t=0;return e=n(e,(function(e){if(s(e))return t=c(e.length,t),!0})),a(t,(function(t){return o(e,i(t))}))}},582:(e,t,r)=>{var n=r(8247),o=r(4530),i=r(8395),a=r(5153);e.exports=function(e,t,r){return e=i(e),void 0===(t=r?void 0:t)?o(e)?a(e):n(e):e.match(t)||[]}},3145:(e,t,r)=>{var n=r(5757)(r(5377));e.exports=n},7984:(e,t,r)=>{e.exports=r.p+"assets/core/cesdk.data"},2934:(e,t,r)=>{e.exports=r.p+"assets/core/cesdk.wasm"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n](i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.p="";var n={};(()=>{r.d(n,{Il:()=>M,yQ:()=>e,Ju:()=>O,in:()=>be,HY:()=>pe,uU:()=>x,ZP:()=>Et});var e={};r.r(e);const t={canManageAssets:!1,getGroups:()=>Promise.resolve([]),findAssets(){throw new Error("Implementation required")},getAsset(){throw new Error("Implementation required")},updateAsset(){throw new Error("Implementation required")},addAsset(){throw new Error("Implementation required")},removeAsset(){throw new Error("Implementation required")},getTypes(){throw new Error("Implementation required")},hasType(){throw new Error("Implementation required")}};var o,i,a,s,c,u,l,d,p,f,m,g,h,E=r(9423),y=r.n(E),v=r(582),_=r.n(v),b=r(3145),w=r.n(b);function T(e){switch(e){case 0:return c.Left;case 1:return c.Middle;case 2:return c.Right;default:return c.Unknown}}!function(e){e[e.Pending=0]="Pending",e[e.Ready=1]="Ready",e[e.Error=2]="Error"}(o||(o={})),function(e){e.Added="DesignBlockAddedEvent",e.Updated="DesignBlockUpdatedEvent",e.Removed="DesignBlockRemovedEvent"}(i||(i={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Center=2]="Center"}(a||(a={})),function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom",e[e.Center=2]="Center"}(s||(s={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Middle=2]="Middle",e[e.Unknown=255]="Unknown"}(c||(c={})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(u||(u={})),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"}(l||(l={})),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"}(d||(d={})),function(e){e[e.Normal=0]="Normal",e[e.Italic=1]="Italic"}(p||(p={})),function(e){e.Bold="bold",e.Italic="italic"}(f||(f={})),function(e){e[e.Undefined=0]="Undefined",e[e.DesignUnit=1]="DesignUnit",e[e.Percent=2]="Percent",e[e.Auto=3]="Auto"}(m||(m={})),function(e){e[e.Free=0]="Free",e[e.VerticalStack=1]="VerticalStack",e[e.HorizontalStack=2]="HorizontalStack"}(g||(g={})),function(e){e.Scene="//ly.img.ubq/scene",e.Stack="//ly.img.ubq/stack",e.Camera="//ly.img.ubq/camera",e.Page="//ly.img.ubq/page",e.Image="//ly.img.ubq/image",e.Video="//ly.img.ubq/video",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",e.Group="//ly.img.ubq/group"}(h||(h={}));const O=h;var D,P;!function(e){e[e.Information=0]="Information",e[e.Warning=1]="Warning",e[e.Error=2]="Error"}(D||(D={})),function(e){e[e.Creator=0]="Creator",e[e.Adopter=1]="Adopter",e[e.Viewer=2]="Viewer",e[e.Presenter=3]="Presenter"}(P||(P={}));const x=P;var S,R,M,F,A;!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"}(S||(S={})),function(e){e[e.Pixel=0]="Pixel",e[e.Millimeter=1]="Millimeter",e[e.Inch=2]="Inch"}(R||(R={})),function(e){e.toDesignUnit=function(t){return t===e.Pixel?"px":t===e.Millimeter?"mm":t===e.Inch?"in":void 0},e.fromDesignUnit=function(t){return"px"===t?e.Pixel:"mm"===t?e.Millimeter:"in"===t?e.Inch:void 0},e.getLabel=function(t){switch(t){case e.Pixel:return"px";case e.Millimeter:return"mm";case e.Inch:return"in";default:return""}},e.convertToPoints=function(t,r,n){switch(r){case e.Pixel:return t/n*72;case e.Inch:return 72*t;case e.Millimeter:return 72*t/25.4;default:throw new Error("Unknown design unit!")}}}(R||(R={})),function(e){let t;!function(e){e[e.sRGB=0]="sRGB",e[e.CMYK=1]="CMYK",e[e.SpotColor=2]="SpotColor"}(t=e.ColorSpace||(e.ColorSpace={})),e.fromRGBA=function(e){return{colorSpace:t.sRGB,components:{x:e.r,y:e.g,z:e.b,w:e.a},spotColor:{name:"",rgbApproximation:e,cmykApproximation:{c:.75,m:.68,y:.67,k:.9}}}},e.toRGBA=function(e){switch(e.colorSpace){case t.sRGB:return{r:e.components.x,g:e.components.y,b:e.components.z,a:e.components.w};case t.SpotColor:return e.spotColor.rgbApproximation;case t.CMYK:throw new Error("CMYK to RGBA conversion not supported!");default:throw new Error("Unknown color space!")}}}(M||(M={})),function(e){e.Transform="ubq/editMode/transform",e.Crop="ubq/editMode/crop",e.Text="ubq/editMode/text"}(F||(F={})),function(e){e[e.Arrow=0]="Arrow",e[e.Move=1]="Move",e[e.MoveNotPermitted=2]="MoveNotPermitted",e[e.Resize=3]="Resize",e[e.Rotate=4]="Rotate",e[e.Text=5]="Text"}(A||(A={}));const k=(e,t)=>({x:e.x*t,y:e.y*t});function I(e,t,r=Number.EPSILON){return Math.abs(e-t)<r}class C{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=U(this.ubq.getLastFrameWidth(t)),i=U(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 k(t,r>n?e.y/t.y:e.x/t.x)})(e,t),o=k(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=>U(o.setValue(e,t,r,n))))}getValue(e,t,r){return this.useInternalAPI((n=>U(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=U(e);r(t)})))).delete()}))}}function U(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)}}var N,j,L,H,B,X,Q,G=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},q=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)};j=new WeakMap,L=new WeakMap,H=new WeakMap,B=new WeakMap,N=new WeakSet,X=async function(e,t){return this.helper.execute("ubq/assets/getMetadata",[e,t])},Q=async function(e,t){const r=await this.helper.execute("ubq/assets/getRegisteredCategoryIDsForType",t),n=[];return await Promise.all(r.map((async t=>{if(t.endsWith(e)){const e=await this.helper.execute("ubq/assets/getAssetsInCategory",t);n.splice(n.length-1,0,...e)}}))),n};class W 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 z(e){return"object"==typeof e&&null!=e}function V(e){return"string"==typeof e?JSON.stringify(e):""+e}function Y(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: `"+V(n)+"`"}=e;return{value:n,type:a,refinement:s,key:o[o.length-1],path:o,branch:i,...e,message:c}}function*$(e,t,r,n){var o;z(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const o of e){const e=Y(o,t,r,n);e&&(yield e)}}function*K(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&&z(t.schema)&&z(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=K(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):z(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 Z{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)=>$(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>$(o(e,t),t,this,e):()=>[]}assert(e){return function(e,t){const r=J(e,t);if(r[0])throw r[0]}(e,this)}create(e){return function(e,t){const r=J(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}(e,this)}is(e){return function(e,t){return!J(e,t)[0]}(e,this)}mask(e){return function(e,t){const r=J(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}(e,this)}validate(e,t={}){return J(e,this,t)}}function J(e,t,r={}){const n=K(e,t,r),o=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(n);return o[0]?[new W(o[0],(function*(){for(const e of n)e[0]&&(yield e[0])})),void 0]:[void 0,o[1]]}function ee(e,t){return new Z({type:e,schema:null,validator:t})}function te(e){return new Z({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: "+V(e)})}function re(){return ee("boolean",(e=>"boolean"==typeof e))}function ne(){return ee("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||"Expected an integer, but received: "+V(e)))}function oe(){return ee("number",(e=>"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+V(e)))}function ie(){return ee("string",(e=>"string"==typeof e||"Expected a string, but received: "+V(e)))}function ae(e,t,r={}){const{exclusive:n}=r;return ce(e,"min",(r=>n?r>t:r>=t||"Expected a "+e.type+" greater than "+(n?"":"or equal to ")+t+" but received `"+r+"`"))}function se(e){return ce(e,"nonempty",(t=>function(e){return e instanceof Map||e instanceof Set?e.size:e.length}(t)>0||"Expected a nonempty "+e.type+" but received an empty one"))}function ce(e,t,r){return new Z({...e,*refiner(n,o){yield*e.refiner(n,o);const i=$(r(n,o),o,e,n);for(const e of i)yield{...e,refinement:t}}})}function ue(e,t,r){const[n]=J(t,r);if(n)throw n.message=`Error in argument '${e}': ${n.message}`,n}function le(){const e=/image\/(png|jpeg|x-tga)|video\/mp4|application\/octet-stream|application\/pdf/;return ee("MimeType",(t=>!("string"!=typeof t||!e.test(t))||{message:`expected one of "image/png", "image/jpeg", "image/x-tga", "video/mp4", "application/pdf" or "application/octet-stream", but got "${t}"`}))}var de;!function(e){e.Png="image/png",e.Jpeg="image/jpeg",e.Tga="image/x-tga",e.Mp4="video/mp4",e.Binary="application/octet-stream",e.Pdf="application/pdf",e.Zip="application/zip"}(de||(de={}));const pe=de;var fe;!function(e){e.Scene="ubq/designblocks/SceneProps",e.Camera="ubq/designblocks/Camera",e.Common="ubq/designblocks/CommonDesignBlockProps",e.Page="ubq/designblocks/Page",e.Image="ubq/designblocks/Image",e.Video="ubq/designblocks/Video",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.Fill="ubq/types/Fill",e.BackgroundColor="ubq/types/BackgroundColor",e.Stroke="ubq/types/Stroke",e.Group="ubq/designblocks/Group",e.VectorPath="ubq/designblocks/VectorPath",e.PendingState="ubq/designblocks/PendingState",e.ErrorState="ubq/designblocks/ErrorState"}(fe||(fe={}));const me=fe,ge=(e,t=!0)=>{const r=[];for(let t=0;t<e.size();t+=1)r.push(e.get(t));return t&&e.delete(),r};var he,Ee,ye=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},ve=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 _e{constructor(e){he.set(this,void 0),Ee.set(this,void 0),ye(this,he,e,"f"),ye(this,Ee,new C(e),"f")}async export(e,t=pe.Png){return ue("handle",e,oe()),ue("mimeType",t,le()),new Promise(((r,n)=>{ve(this,he,"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 unstable_exportVideo(e,t,r,n=pe.Mp4,o,i,a,s){return ue("handle",e,oe()),ue("mimeType",n,le()),ue("resolutionWidth",o,ne()),ue("resolutionHeight",i,ne()),ue("framerate",a,oe()),new Promise(((c,u)=>{ve(this,he,"f").exportVideoToBuffer(e,t,r,n,s,(e=>{"error"in e?u(e.error):c(new Blob([e],{type:n}))}),{h264Profile:77,h264Level:52,framerate:a,useTargetSize:!0,targetWidth:o,targetHeight:i})}))}async loadFromString(e){return ue("content",e,ie()),new Promise((t=>{ve(this,he,"f").loadBlocksFromString(e,(e=>{const r=U(e);t(ge(r))}))}))}async saveToString(e){return ue("blocks",e,te(oe())),new Promise((t=>{ve(this,he,"f").saveBlocksToString(e,(e=>{const r=U(e);t(r)}))}))}create(e){return ue("type",e,ie()),U(ve(this,he,"f").create(e))}unstable_createFromAsset(e,t,r,n){return ue("id",e,ie()),ue("type",t,ie()),ue("mimeType",r,ie()),new Promise(((o,i)=>{ve(this,he,"f").createFromAsset(e,t,r,n,(e=>{try{o(U(e))}catch(e){i(e)}}))}))}getType(e){return ue("id",e,ne()),U(ve(this,he,"f").getType(e))}setSelected(e,t){return ue("id",e,ne()),ue("selected",t,re()),U(ve(this,he,"f").setSelected(e,t))}isSelected(e){return ue("id",e,ne()),U(ve(this,he,"f").isSelected(e))}findAllSelected(){return ge(ve(this,he,"f").findAllSelected())}isGroupable(e){return ue("ids",e,se(te(oe()))),U(ve(this,he,"f").isGroupable(e))}group(e){return ue("ids",e,se(te(oe()))),U(ve(this,he,"f").group(e))}ungroup(e){return ue("id",e,oe()),U(ve(this,he,"f").ungroup(e))}enterGroup(e){return ue("id",e,oe()),U(ve(this,he,"f").enterGroup(e))}exitGroup(e){return ue("id",e,oe()),U(ve(this,he,"f").exitGroup(e))}setName(e,t){return ue("id",e,ne()),ue("name",t,ie()),ve(this,Ee,"f").setValue(e,me.Common,"name",t)}getName(e){return ue("id",e,ne()),ve(this,Ee,"f").getValue(e,me.Common,"name")}findByName(e){ue("name",e,ie());const t=ve(this,he,"f").findByName(e);return ge(t)}findByType(e){ue("type",e,ie());const t=U(ve(this,he,"f").findByType(e));return ge(t)}findAll(){return ge(ve(this,he,"f").findAll())}findAllPlaceholders(){return ge(ve(this,he,"f").findAllPlaceholders())}isVisible(e){return ue("id",e,ne()),U(ve(this,he,"f").isVisible(e))}setVisible(e,t){return ue("id",e,ne()),ue("visible",t,re()),U(ve(this,he,"f").setVisible(e,t))}isClipped(e){return ue("id",e,ne()),U(ve(this,he,"f").isClipped(e))}setClipped(e,t){return ue("id",e,ne()),ue("clipped",t,re()),U(ve(this,he,"f").setClipped(e,t))}getPositionX(e){return ue("id",e,ne()),U(ve(this,he,"f").getPositionX(e))}getPositionXMode(e){return ue("id",e,ne()),U(ve(this,he,"f").getPositionXMode(e))}getPositionY(e){return ue("id",e,ne()),U(ve(this,he,"f").getPositionY(e))}getPositionYMode(e){return ue("id",e,ne()),U(ve(this,he,"f").getPositionYMode(e))}setPositionX(e,t){return ue("id",e,ne()),ue("value",t,oe()),U(ve(this,he,"f").setPositionX(e,t))}setPositionXMode(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setPositionXMode(e,t))}setPositionY(e,t){return ue("id",e,ne()),ue("value",t,oe()),U(ve(this,he,"f").setPositionY(e,t))}setPositionYMode(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setPositionYMode(e,t))}getRotation(e){return ue("id",e,ne()),U(ve(this,he,"f").getRotation(e))}setRotation(e,t){return ue("id",e,ne()),ue("radians",t,oe()),U(ve(this,he,"f").setRotation(e,t))}getFlipHorizontal(e){return ue("id",e,ne()),U(ve(this,he,"f").getFlip(e)).horizontal}getFlipVertical(e){return ue("id",e,ne()),U(ve(this,he,"f").getFlip(e)).vertical}setFlipHorizontal(e,t){return ue("id",e,ne()),ue("flip",t,re()),U(ve(this,he,"f").setFlipHorizontal(e,t))}setFlipVertical(e,t){return ue("id",e,ne()),ue("flip",t,re()),U(ve(this,he,"f").setFlipVertical(e,t))}getWidth(e){return ue("id",e,ne()),U(ve(this,he,"f").getWidth(e))}getWidthMode(e){return ue("id",e,ne()),U(ve(this,he,"f").getWidthMode(e))}getHeight(e){return ue("id",e,ne()),U(ve(this,he,"f").getHeight(e))}getHeightMode(e){return ue("id",e,ne()),U(ve(this,he,"f").getHeightMode(e))}getContentFillMode(e){return ue("id",e,ne()),U(ve(this,he,"f").getContentFillMode(e))}setWidth(e,t){return ue("id",e,ne()),ue("value",t,oe()),U(ve(this,he,"f").setWidth(e,t))}setWidthMode(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setWidthMode(e,t))}setHeight(e,t){return ue("id",e,ne()),ue("value",t,oe()),U(ve(this,he,"f").setHeight(e,t))}setHeightMode(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setHeightMode(e,t))}setContentFillMode(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setContentFillMode(e,t))}getFrameWidth(e){return ue("id",e,ne()),U(ve(this,he,"f").getLastFrameWidth(e))}getFrameHeight(e){return ue("id",e,ne()),U(ve(this,he,"f").getLastFrameHeight(e))}duplicate(e){return ue("id",e,ne()),U(ve(this,he,"f").duplicate(e))}destroy(e){return ue("id",e,ne()),U(ve(this,he,"f").destroy(e))}isValid(e){return ue("id",e,ne()),ve(this,he,"f").isValid(e)}getParent(e){return ue("id",e,ne()),U(ve(this,he,"f").getParent(e))}getChildren(e){ue("id",e,ne());const t=U(ve(this,he,"f").getChildren(e));return ge(t)}insertChild(e,t,r){return ue("parent",e,oe()),ue("child",t,oe()),ue("index",r,ae(oe(),0)),U(ve(this,he,"f").insertChild(e,t,r))}appendChild(e,t){return ue("parent",e,oe()),ue("child",t,oe()),U(ve(this,he,"f").appendChild(e,t))}referencesAnyVariables(e){return ue("id",e,ne()),U(ve(this,he,"f").referencesAnyVariables(e))}getGlobalBoundingBoxX(e){return ue("id",e,ne()),U(ve(this,he,"f").getGlobalBoundingBoxX(e))}getGlobalBoundingBoxY(e){return ue("id",e,ne()),U(ve(this,he,"f").getGlobalBoundingBoxY(e))}getGlobalBoundingBoxWidth(e){return ue("id",e,ne()),U(ve(this,he,"f").getGlobalBoundingBoxWidth(e))}getGlobalBoundingBoxHeight(e){return ue("id",e,ne()),U(ve(this,he,"f").getGlobalBoundingBoxHeight(e))}scale(e,t,r=0,n=0){return ue("id",e,ne()),U(ve(this,he,"f").scale(e,t,r,n))}findAllProperties(e){return ue("id",e,ne()),ge(U(ve(this,he,"f").findAllProperties(e)))}getPropertyType(e){return ue("property",e,ie()),U(ve(this,he,"f").getPropertyType(e))}getEnumValues(e){return ue("enumProperty",e,ie()),ge(U(ve(this,he,"f").getEnumValues(e)))}setBool(e,t,r){return ue("id",e,ne()),ue("property",t,ie()),ue("value",r,re()),U(ve(this,he,"f").setBool(e,t,r))}getBool(e,t){return ue("id",e,ne()),ue("property",t,ie()),U(ve(this,he,"f").getBool(e,t))}setInt(e,t,r){return ue("id",e,ne()),ue("property",t,ie()),ue("value",r,ne()),U(ve(this,he,"f").setInt(e,t,r))}getInt(e,t){return ue("id",e,ne()),ue("property",t,ie()),U(ve(this,he,"f").getInt(e,t))}setFloat(e,t,r){return ue("id",e,ne()),ue("property",t,ie()),ue("value",r,oe()),U(ve(this,he,"f").setFloat(e,t,r))}getFloat(e,t){return ue("id",e,ne()),ue("property",t,ie()),U(ve(this,he,"f").getFloat(e,t))}setString(e,t,r){return ue("id",e,ne()),ue("property",t,ie()),ue("value",r,ie()),U(ve(this,he,"f").setString(e,t,r))}getString(e,t){return ue("id",e,ne()),ue("property",t,ie()),U(ve(this,he,"f").getString(e,t))}setColorRGBA(e,t,r,n,o,i){return ue("id",e,ne()),ue("property",t,ie()),ue("r",r,oe()),ue("g",n,oe()),ue("b",o,oe()),ue("a",i,oe()),U(ve(this,he,"f").setColorRGBA(e,t,r,n,o,i))}getColorRGBA(e,t){return ue("id",e,ne()),ue("property",t,ie()),U(ve(this,he,"f").getColorRGBA(e,t))}setEnum(e,t,r){return ue("id",e,ne()),ue("property",t,ie()),ue("value",r,ie()),U(ve(this,he,"f").setEnum(e,t,r))}getEnum(e,t){return ue("id",e,ne()),ue("property",t,ie()),U(ve(this,he,"f").getEnum(e,t))}hasCrop(e){return ue("id",e,ne()),U(ve(this,he,"f").hasCrop(e))}setCropScaleX(e,t){return ue("id",e,ne()),ue("scaleX",t,oe()),U(ve(this,he,"f").setCropScaleX(e,t))}setCropScaleY(e,t){return ue("id",e,ne()),ue("scaleY",t,oe()),U(ve(this,he,"f").setCropScaleY(e,t))}setCropRotation(e,t){return ue("id",e,ne()),ue("rotation",t,oe()),U(ve(this,he,"f").setCropRotation(e,t))}setCropTranslationX(e,t){return ue("id",e,ne()),ue("translationX",t,oe()),U(ve(this,he,"f").setCropTranslationX(e,t))}setCropTranslationY(e,t){return ue("id",e,ne()),ue("translationY",t,oe()),U(ve(this,he,"f").setCropTranslationY(e,t))}resetCrop(e){return ue("id",e,ne()),U(ve(this,he,"f").resetCrop(e))}getCropScaleX(e){return ue("id",e,ne()),U(ve(this,he,"f").getCropScaleX(e))}getCropScaleY(e){return ue("id",e,ne()),U(ve(this,he,"f").getCropScaleY(e))}getCropRotation(e){return ue("id",e,ne()),U(ve(this,he,"f").getCropRotation(e))}getCropTranslationX(e){return ue("id",e,ne()),U(ve(this,he,"f").getCropTranslationX(e))}getCropTranslationY(e){return ue("id",e,ne()),U(ve(this,he,"f").getCropTranslationY(e))}hasOpacity(e){return ue("id",e,ne()),U(ve(this,he,"f").hasOpacity(e))}setOpacity(e,t){return ue("id",e,ne()),ue("opacity",t,oe()),U(ve(this,he,"f").setOpacity(e,t))}getOpacity(e){return ue("id",e,ne()),U(ve(this,he,"f").getOpacity(e))}setBlendMode(e,t){return ue("id",e,ne()),ue("blendMode",t,ie()),U(ve(this,he,"f").setBlendMode(e,t))}getBlendMode(e){return ue("id",e,ne()),U(ve(this,he,"f").getBlendMode(e))}hasFillColor(e){return ue("id",e,ne()),U(ve(this,he,"f").hasFillColor(e))}setFillColorRGBA(e,t,r,n,o){return ue("id",e,ne()),ue("r",t,oe()),ue("g",r,oe()),ue("b",n,oe()),ue("a",o,oe()),U(ve(this,he,"f").setFillColorRGBA(e,t,r,n,o))}getFillColorRGBA(e){return ue("id",e,ne()),U(ve(this,he,"f").getFillColorRGBA(e))}setFillColorEnabled(e,t){return ue("id",e,ne()),ue("enabled",t,re()),U(ve(this,he,"f").setFillColorEnabled(e,t))}isFillColorEnabled(e){return ue("id",e,ne()),U(ve(this,he,"f").isFillColorEnabled(e))}hasBackgroundColor(e){return ue("id",e,ne()),U(ve(this,he,"f").hasBackgroundColor(e))}setBackgroundColorRGBA(e,t,r,n,o){return ue("id",e,ne()),ue("r",t,oe()),ue("g",r,oe()),ue("b",n,oe()),ue("a",o,oe()),U(ve(this,he,"f").setBackgroundColorRGBA(e,t,r,n,o))}getBackgroundColorRGBA(e){return ue("id",e,ne()),U(ve(this,he,"f").getBackgroundColorRGBA(e))}setBackgroundColorEnabled(e,t){return ue("id",e,ne()),ue("enabled",t,re()),U(ve(this,he,"f").setBackgroundColorEnabled(e,t))}isBackgroundColorEnabled(e){return ue("id",e,ne()),U(ve(this,he,"f").isBackgroundColorEnabled(e))}hasStroke(e){return ue("id",e,ne()),U(ve(this,he,"f").hasStroke(e))}setStrokeEnabled(e,t){return ue("id",e,ne()),ue("enabled",t,re()),U(ve(this,he,"f").setStrokeEnabled(e,t))}isStrokeEnabled(e){return ue("id",e,ne()),U(ve(this,he,"f").isStrokeEnabled(e))}setStrokeColorRGBA(e,t,r,n,o){return ue("id",e,ne()),ue("r",t,oe()),ue("g",r,oe()),ue("b",n,oe()),ue("a",o,oe()),U(ve(this,he,"f").setStrokeColorRGBA(e,t,r,n,o))}getStrokeColorRGBA(e){return ue("id",e,ne()),U(ve(this,he,"f").getStrokeColorRGBA(e))}setStrokeWidth(e,t){return ue("id",e,ne()),ue("width",t,oe()),U(ve(this,he,"f").setStrokeWidth(e,t))}getStrokeWidth(e){return ue("id",e,ne()),U(ve(this,he,"f").getStrokeWidth(e))}setStrokeStyle(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setStrokeStyle(e,t))}getStrokeStyle(e){return ue("id",e,ne()),U(ve(this,he,"f").getStrokeStyle(e))}setStrokePosition(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setStrokePosition(e,t))}getStrokePosition(e){return ue("id",e,ne()),U(ve(this,he,"f").getStrokePosition(e))}setStrokeCornerGeometry(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setStrokeCornerGeometry(e,t))}getStrokeCornerGeometry(e){return ue("id",e,ne()),U(ve(this,he,"f").getStrokeCornerGeometry(e))}hasOutline(e){return ue("id",e,ne()),this.hasStroke(e)}setOutlineColorRGBA(e,t,r,n,o){return ue("id",e,ne()),ue("r",t,oe()),ue("g",r,oe()),ue("b",n,oe()),ue("a",o,oe()),this.setStrokeColorRGBA(e,t,r,n,o)}getOutlineColorRGBA(e){return ue("id",e,ne()),this.getStrokeColorRGBA(e)}setOutlineEnabled(e,t){return ue("id",e,ne()),ue("enabled",t,re()),this.setStrokeEnabled(e,t)}isOutlineEnabled(e){return ue("id",e,ne()),this.isStrokeEnabled(e)}setOutlineWidth(e,t){return ue("id",e,ne()),ue("width",t,oe()),this.setStrokeWidth(e,t)}getOutlineWidth(e){return ue("id",e,ne()),this.getStrokeWidth(e)}hasFill(e){return ue("id",e,ne()),U(ve(this,he,"f").hasFill(e))}isFillEnabled(e){return ue("id",e,ne()),U(ve(this,he,"f").isFillEnabled(e))}setFillEnabled(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setFillEnabled(e,t))}setFillType(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setFillType(e,t))}getFillType(e){return ue("id",e,ne()),U(ve(this,he,"f").getFillType(e))}setFillSolidColor(e,t,r,n,o){ue("id",e,ne()),U(ve(this,he,"f").setFillSolidColor(e,t,n,r,o))}getFillSolidColor(e){return ue("id",e,ne()),U(ve(this,he,"f").getFillSolidColor(e))}setFillGradientType(e,t){ue("id",e,ne()),U(ve(this,he,"f").setFillGradientType(e,t))}getFillGradientType(e){return ue("id",e,ne()),U(ve(this,he,"f").getFillGradientType(e))}addFillGradientColorStop(e,t,r,n,o,i){ue("id",e,ne()),U(ve(this,he,"f").addFillGradientColorStop(e,t,r,n,o,i))}removeFillGradientColorStop(e,t){ue("id",e,ne()),U(ve(this,he,"f").removeFillGradientColorStop(e,t))}getFillGradientColorStops(e){return ue("id",e,ne()),ge(ve(this,he,"f").getFillGradientColorStops(e))}setFillGradientColorStops(e,t){ue("id",e,ne()),U(ve(this,he,"f").setFillGradientColorStops(e,t))}setFillGradientControlPoint(e,t,r,n){return ue("id",e,ne()),U(ve(this,he,"f").setFillGradientControlPoint(e,t,r,n))}getFillGradientControlPointX(e,t){return ue("id",e,ne()),U(ve(this,he,"f").getFillGradientControlPointX(e,t))}getFillGradientControlPointY(e,t){return ue("id",e,ne()),U(ve(this,he,"f").getFillGradientControlPointY(e,t))}setFillGradientRadius(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setFillGradientRadius(e,t))}getFillGradientRadius(e){return ue("id",e,ne()),U(ve(this,he,"f").getFillGradientRadius(e))}}he=new WeakMap,Ee=new WeakMap;var be,we=r(7168),Te=r.n(we);!function(e){e.Info="Info",e.Warning="Warning",e.Error="Error"}(be||(be={}));const Oe={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.vectorpaths.abstract","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"]},De={company_name:{value:"img.ly"},first_name:{value:"Charly"},last_name:{value:"Williams"},address:{value:"742 Evergreen Terrace"},city:{value:"Springfield"}},Pe=(e,t)=>{const r=`[UBQ] ${e}`;switch(t){case be.Warning:console.warn(r);break;case be.Error:console.error(r);break;case be.Info:default:console.log(r)}},xe={log:Pe},Se={colorPalettes:{primary:{meta:{default:!0},entries:["#FFFFFF","#000000","#6686FF","#66CCFF","#54FFEA","#E75050","#F28855","#FFF763"]}},pageFormats:{"din-a0":{width:1189,height:841,unit:"mm"},"din-a1":{width:841,height:594,unit:"mm"},"din-a2":{width:594,height:420,unit:"mm"},"din-a3":{width:420,height:297,unit:"mm"},"din-a4":{width:297,height:210,unit:"mm"},"din-a5":{width:210,height:148,unit:"mm"},"din-a6":{meta:{default:!0},width:148,height:105,unit:"mm"},"din-a65":{width:210,height:105,unit:"mm"},"din-b5":{width:250,height:176,unit:"mm"},square:{width:105,height:105,unit:"mm"},"twitter-profile":{width:400,height:400,unit:"px"},"twitter-image":{width:1024,height:512,unit:"px"},"twitter-header":{width:1500,height:500,unit:"px"},"instagram-profile":{width:180,height:180,unit:"px"},"instagram-photo":{width:1080,height:1080,unit:"px"},"instagram-story":{width:1080,height:1920,unit:"px"},"american-letter":{width:8.5,height:11,unit:"in"},"american-legal":{width:8.5,height:14,unit:"in"},"16:10":{width:1600,height:1e3,unit:"px"},"16:9":{width:1600,height:900,unit:"px"},"16:10@2400p":{width:3840,height:2400,unit:"px"},"16:9@2160p":{width:3840,height:2160,unit:"px"},"business-card":{width:85,height:55,unit:"mm"}}},Re={baseURL:"core/"},Me={maskSpotColor:void 0,dpi:300,pixelScaleFactor:1},Fe={title:{fontFileUri:"bundle://ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",show:!0},dimOutOfPageAreas:!0};function Ae(e,t=("undefined"==typeof window?"":window.location.href)){return new URL(e,""===t?void 0:t).toString()}function ke(e){return"/"!==e[e.length-1]?`${e}/`:e}function Ie(e={}){var t,r,n,o,i,a,s,c,u,l,d,p,f,m,g;const h={license:e.license,role:null!==(t=e.role)&&void 0!==t?t:"Creator",featureFlags:null!==(r=e.featureFlags)&&void 0!==r?r:{},baseURL:null!==(n=e.baseURL)&&void 0!==n?n:"https://cdn.img.ly/packages/imgly/cesdk-engine/1.6.1/assets",core:null!==(o=e.core)&&void 0!==o?o:Object.assign({},Re),extensions:null!==(i=e.extensions)&&void 0!==i?i:Object.assign({},Oe),callbacks:null!==(a=e.callbacks)&&void 0!==a?a:Object.assign({},xe),variables:null!==(s=e.variables)&&void 0!==s?s:Object.assign({},De),presets:null!==(c=e.presets)&&void 0!==c?c:Object.assign({},Se),scene:null!==(u=e.scene)&&void 0!==u?u:Object.assign({},Me),page:Te()({},Fe,null!==(l=e.page)&&void 0!==l?l:{}),assetSources:Te()({},e.assetSources),defaultFont:null!==(d=e.defaultFont)&&void 0!==d?d:void 0};return null!==(p=(m=h.extensions).baseURL)&&void 0!==p||(m.baseURL=Oe.baseURL),null!==(f=(g=h.extensions).entries)&&void 0!==f||(g.entries=Object.assign({},Oe.entries)),Object.entries(Se).forEach((([e,t])=>{var r;h.presets[e]=null!==(r=h.presets[e])&&void 0!==r?r:Object.assign({},t)})),h.baseURL=Ae(h.baseURL),h.baseURL=ke(h.baseURL),h.core.baseURL=Ae(h.core.baseURL,h.baseURL),h.core.baseURL=ke(h.core.baseURL),h.extensions.baseURL=ke(h.extensions.baseURL),h.extensions.entries=h.extensions.entries.map((e=>ke(e))),h}var Ce,Ue,Ne=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},je=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 Le{constructor(e){Ce.set(this,void 0),Ue.set(this,void 0),Ne(this,Ce,e,"f"),Ne(this,Ue,new C(e),"f")}onStateChanged(e){const t=je(this,Ce,"f").subscribeToEditorState(e);return()=>{U(je(this,Ce,"f").unsubscribe(t))}}setEditMode(e){ue("keypath",e,ie()),je(this,Ce,"f").setEditMode(e)}getEditMode(){return je(this,Ce,"f").getEditMode()}getCursorType(){return je(this,Ce,"f").getCursorType()}getCursorRotation(){return je(this,Ce,"f").getCursorRotation()}getTextCursorPositionInScreenSpaceX(){return je(this,Ce,"f").getTextCursorPositionInScreenSpaceX()}getTextCursorPositionInScreenSpaceY(){return je(this,Ce,"f").getTextCursorPositionInScreenSpaceY()}setZoomLevel(e=1){ue("zoomLevel",e,ae(oe(),0)),je(this,Ce,"f").setZoomLevel(e)}getZoomLevel(){return U(je(this,Ce,"f").getZoomLevel())}addUndoStep(){U(je(this,Ce,"f").addUndoStep())}undo(){U(je(this,Ce,"f").undo())}redo(){U(je(this,Ce,"f").redo())}canUndo(){return U(je(this,Ce,"f").canUndo())}canRedo(){return U(je(this,Ce,"f").canRedo())}setSettingBool(e,t){return ue("keypath",e,ie()),ue("value",t,re()),U(je(this,Ce,"f").setSettingBool(e,t))}getSettingBool(e){return ue("keypath",e,ie()),U(je(this,Ce,"f").getSettingBool(e))}setSettingInt(e,t){return ue("keypath",e,ie()),ue("value",t,ne()),U(je(this,Ce,"f").setSettingFloat(e,t))}getSettingInt(e){return ue("keypath",e,ie()),U(je(this,Ce,"f").getSettingFloat(e))}setSettingFloat(e,t){return ue("keypath",e,ie()),ue("value",t,oe()),U(je(this,Ce,"f").setSettingFloat(e,t))}getSettingFloat(e){return ue("keypath",e,ie()),U(je(this,Ce,"f").getSettingFloat(e))}setSettingString(e,t){return ue("keypath",e,ie()),ue("value",t,ie()),U(je(this,Ce,"f").setSettingString(e,t))}getSettingString(e){return ue("keypath",e,ie()),U(je(this,Ce,"f").getSettingString(e))}setSettingColorRGBA(e,t,r,n,o){return ue("keypath",e,ie()),ue("r",t,oe()),ue("g",r,oe()),ue("b",n,oe()),ue("a",o,oe()),U(je(this,Ce,"f").setSettingColorRGBA(e,t,r,n,o))}getSettingColorRGBA(e){return ue("keypath",e,ie()),U(je(this,Ce,"f").getSettingColorRGBA(e))}setSettingEnum(e,t){return ue("keypath",e,ie()),ue("value",t,ie()),U(je(this,Ce,"f").setSettingEnum(e,t))}getSettingEnum(e){return ue("keypath",e,ie()),U(je(this,Ce,"f").getSettingEnum(e))}}Ce=new WeakMap,Ue=new WeakMap;var He,Be=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class Xe{constructor(e){He.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,He,e,"f")}subscribe(e,t){ue("blocks",e,te());const r=Be(this,He,"f").subscribe(e,(e=>{try{t(ge(e,!0))}catch(e){console.error(e)}}));return()=>{U(Be(this,He,"f").unsubscribe(r))}}}He=new WeakMap;var Qe,Ge=(Qe="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(){He("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(){He("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(){He("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(){He("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(){He("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(){He("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(){He("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(){He("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(){He("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(){He("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,T("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)"));var r,n,i,a,s=o.locateFile?o.locateFile(t,""):t,c=e.remote_package_size,u=null,l=o.getPreloadedPackage?o.getPreloadedPackage(s,c):null;function 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","shaders",!0,!0),o.FS_createPath("/ly.img.cesdk/shaders","common",!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/images/watermark.png",start:0,end:90147},{filename:"/ly.img.cesdk/shaders/liquid.sksl",start:90147,end:90629},{filename:"/ly.img.cesdk/shaders/mirror.sksl",start:90629,end:91083},{filename:"/ly.img.cesdk/shaders/outliner.sksl",start:91083,end:92720},{filename:"/ly.img.cesdk/shaders/tv_glitch.sksl",start:92720,end:93438},{filename:"/ly.img.cesdk/shaders/mask_color.sksl",start:93438,end:93940},{filename:"/ly.img.cesdk/shaders/lut_filter.sksl",start:93940,end:96803},{filename:"/ly.img.cesdk/shaders/vignette.sksl",start:96803,end:97175},{filename:"/ly.img.cesdk/shaders/sharpie.sksl",start:97175,end:99480},{filename:"/ly.img.cesdk/shaders/hsp_selective_adjustments.sksl",start:99480,end:113080},{filename:"/ly.img.cesdk/shaders/half_tone.sksl",start:113080,end:113574},{filename:"/ly.img.cesdk/shaders/tiltshift.sksl",start:113574,end:114156},{filename:"/ly.img.cesdk/shaders/pixelize.sksl",start:114156,end:114456},{filename:"/ly.img.cesdk/shaders/linocut.sksl",start:114456,end:115241},{filename:"/ly.img.cesdk/shaders/glow.sksl",start:115241,end:116208},{filename:"/ly.img.cesdk/shaders/radial_pixel.sksl",start:116208,end:116771},{filename:"/ly.img.cesdk/shaders/black_and_white_color_mixer.sksl",start:116771,end:123088},{filename:"/ly.img.cesdk/shaders/shifter.sksl",start:123088,end:123772},{filename:"/ly.img.cesdk/shaders/posterize.sksl",start:123772,end:123984},{filename:"/ly.img.cesdk/shaders/dot_pattern.sksl",start:123984,end:124499},{filename:"/ly.img.cesdk/shaders/adjustments.sksl",start:124499,end:128388},{filename:"/ly.img.cesdk/shaders/extrude_blur.sksl",start:128388,end:130505},{filename:"/ly.img.cesdk/shaders/duotone_filter.sksl",start:130505,end:131469},{filename:"/ly.img.cesdk/shaders/cross_cut.sksl",start:131469,end:132416},{filename:"/ly.img.cesdk/shaders/placeholder_overlay_lines.sksl",start:132416,end:132997},{filename:"/ly.img.cesdk/shaders/common/ubq_constants.sksl",start:132997,end:133487},{filename:"/ly.img.cesdk/shaders/common/ubq_adjustments.sksl",start:133487,end:138050},{filename:"/ly.img.cesdk/shaders/common/ubq_color_conversions.sksl",start:138050,end:148035},{filename:"/ly.img.cesdk/shaders/common/ubq_hue_constants.sksl",start:148035,end:151202},{filename:"/ly.img.cesdk/shaders/common/ubq_noise.sksl",start:151202,end:153840},{filename:"/ly.img.cesdk/presets/.keep",start:153840,end:153840},{filename:"/ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",start:153840,end:424600}],remote_package_size:424600,package_uuid:"4fac77f7-6803-43f6-9007-5a271a52ceaf"}),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.emscripten_ubq_codec_decoders=new Map,o.emscripten_ubq_codec_encoders=new Map,o.emscripten_ubq_codec_decoderNextHandle=1,o.emscripten_ubq_codec_encoderNextHandle=1,o.emscripten_ubq_codec_createVideoDecoder=function(e){const t=new VideoDecoder({output:r=>{if(t.decodedFrames%=t.numberOfFrames,t.decodedFrames++,t.probing&&1===t.decodedFrames)return(n=o.ctx).bindTexture(n.TEXTURE_2D,e[0]),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),void r.close();if(t.decodeQueueSize>0||t.probing)return void r.close();var n=o.ctx;const i=(t.decodedFrames-1)%e.length;n.bindTexture(n.TEXTURE_2D,e[i]),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),r.close(),t.textureUploadFlag=!0},error:e=>console.error(e)});return t.decodedFrames=0,t},!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},p="object"==typeof window,f="function"==typeof importScripts,m="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,g=!p&&!m&&!f;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 h,E,y,v="";function _(e){return o.locateFile?o.locateFile(e,v):v+e}function b(e){if(e instanceof cp)return;let t=e;e&&"object"==typeof e&&e.stack&&(t=[e,e.stack]),T("exiting due to exception: "+t)}if(g){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&&(h=function(e){return read(e)}),y=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),I("object"==typeof t),t)},E=function(e,t,r){setTimeout((()=>t(y(e))),0)},"undefined"!=typeof scriptArgs?u=scriptArgs:void 0!==arguments&&(u=arguments),"function"==typeof quit&&(d=(e,t)=>{b(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!p&&!f)throw new Error("environment detection error");if(f?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),Qe&&(v=Qe),v=0!==v.indexOf("blob:")?v.substr(0,v.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?)");h=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},f&&(y=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),E=(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 w=o.print||console.log.bind(console),T=o.printErr||console.warn.bind(console);function O(e){O.shown||(O.shown={}),O.shown[e]||(O.shown[e]=1,T(e))}Object.assign(o,c),c=null,o.arguments&&(u=o.arguments),Object.getOwnPropertyDescriptor(o,"arguments")||Object.defineProperty(o,"arguments",{configurable:!0,get:function(){He("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(){He("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(){He("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)")}}),I(void 0===o.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),I(void 0===o.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),I(void 0===o.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),I(void 0===o.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),I(void 0===o.read,"Module.read option was removed (modify read_ in JS)"),I(void 0===o.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),I(void 0===o.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),I(void 0===o.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),I(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(){He("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(){He("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(){He("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(){He("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)")}}),I(!m,"node environment detected but not enabled at build time. Add 'node' to `-s ENVIRONMENT` to enable."),I(!g,"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(){He("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 R,M=o.noExitRuntime||!0;function F(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":return W[e>>2];case"i64":return Number(Y[e>>3]);case"float":return V[e>>2];case"double":return Number(K[e>>3]);default:He("invalid type for getValue: "+t)}return null}Object.getOwnPropertyDescriptor(o,"noExitRuntime")||Object.defineProperty(o,"noExitRuntime",{configurable:!0,get:function(){He("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&&He("no native wasm support detected");var A,k=!1;function I(e,t){e||He("Assertion failed"+(t?": "+t:""))}var C="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function U(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&C)return C.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)&&O("Invalid UTF-8 leading byte 0x"+a.toString(16)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),a=(7&a)<<18|s<<12|c<<6|63&e[t++]),a<65536)i+=String.fromCharCode(a);else{var u=a-65536;i+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function N(e,t){return e?U(Q,e,t):""}function j(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&&O("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 L(e,t,r){return I("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),j(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,W,z,V,Y,$,K,Z="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function J(e,t){I(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&&Z)return Z.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 ee(e,t,r){if(I(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),I("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 te(e){return 2*e.length}function re(e,t){I(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(r>=t/4);){var o=W[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 ne(e,t,r){if(I(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),I("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)),W[t>>2]=a,(t+=4)+4>o)break}return W[t>>2]=0,t-n}function oe(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 ie(e){var t=H(e)+1,r=Ud(t);return r&&j(e,X,r,t),r}function ae(e){var t=H(e)+1,r=zd(t);return j(e,X,r,t),r}function se(e,t){I(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),X.set(e,t)}function ce(e,t,r){for(var n=0;n<e.length;++n)I(e.charCodeAt(n)===(255&e.charCodeAt(n))),X[t++>>0]=e.charCodeAt(n);r||(X[t>>0]=0)}function ue(e,t){return e%t>0&&(e+=t-e%t),e}function le(e){B=e,o.HEAP8=X=new Int8Array(e),o.HEAP16=G=new Int16Array(e),o.HEAP32=W=new Int32Array(e),o.HEAPU8=Q=new Uint8Array(e),o.HEAPU16=q=new Uint16Array(e),o.HEAPU32=z=new Uint32Array(e),o.HEAPF32=V=new Float32Array(e),o.HEAPF64=K=new Float64Array(e),o.HEAP64=Y=new BigInt64Array(e),o.HEAPU64=$=new BigUint64Array(e)}var de=5242880;o.TOTAL_STACK&&I(de===o.TOTAL_STACK,"the stack size can no longer be determined at runtime");var pe,fe=o.INITIAL_MEMORY||268435456;function me(){var e=Gd();I(0==(3&e)),W[e+4>>2]=34821223,W[e+8>>2]=2310721022,W[0]=1668509029}function ge(){if(!k){var e=Gd(),t=z[e+4>>2],r=z[e+8>>2];34821223==t&&2310721022==r||He("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" 0x"+t.toString(16)),1668509029!==W[0]&&He("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(){He("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)")}}),I(fe>=de,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+fe+"! (TOTAL_STACK="+de+")"),I("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),I(!o.wasmMemory,"Use of `wasmMemory` detected. Use -s IMPORTED_MEMORY to define wasmMemory externally"),I(268435456==fe,"Detected runtime INITIAL_MEMORY setting. Use -s IMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -s SUPPORT_BIG_ENDIAN=1 to bypass)"}();var he=[],Ee=[],ye=[],ve=[],_e=[],be=!1,we=!1,Te=0;function Oe(){return M||Te>0}function De(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)Me(o.preRun.shift());$e(he)}function Pe(){ge(),I(!be),be=!0,o.noFSInit||yt.init.initialized||yt.init(),yt.ignorePermissions=!1,lt.init(),$e(Ee)}function xe(){ge(),$e(ye)}function Se(){ge(),we=!0}function Re(){if(ge(),o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)Ae(o.postRun.shift());$e(_e)}function Me(e){he.unshift(e)}function Fe(e){Ee.unshift(e)}function Ae(e){_e.unshift(e)}I(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),I(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),I(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),I(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,Ie=null,Ce=null,Ue={};function Ne(e){for(var t=e;;){if(!Ue[e])return e;e=t+Math.random()}}function je(e){ke++,o.monitorRunDependencies&&o.monitorRunDependencies(ke),e?(I(!Ue[e]),Ue[e]=1,null===Ie&&"undefined"!=typeof setInterval&&(Ie=setInterval((function(){if(k)return clearInterval(Ie),void(Ie=null);var e=!1;for(var t in Ue)e||(e=!0,T("still waiting on run dependencies:")),T("dependency: "+t);e&&T("(end of list)")}),1e4))):T("warning: run dependency added without ID")}function Le(e){if(ke--,o.monitorRunDependencies&&o.monitorRunDependencies(ke),e?(I(Ue[e]),delete Ue[e]):T("warning: run dependency removed without ID"),0==ke&&(null!==Ie&&(clearInterval(Ie),Ie=null),Ce)){var t=Ce;Ce=null,t()}}function He(e){o.onAbort&&o.onAbort(e),T(e="Aborted("+e+")"),k=!0,A=1;var t=new WebAssembly.RuntimeError(e);throw n(t),t}o.preloadedImages={},o.preloadedAudios={};var Be,Xe="data:application/octet-stream;base64,";function Ge(e){return e.startsWith(Xe)}function qe(e){return e.startsWith("file://")}function We(e,t){return function(){var r=e,n=t;return t||(n=o.asm),I(be,"native function `"+r+"` called before runtime initialization"),I(!we,"native function `"+r+"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n[e]||I(n[e],"exported native function `"+r+"` not found"),n[e].apply(null,arguments)}}function ze(e){try{if(e==Be&&D)return new Uint8Array(D);if(y)return y(e);throw"both async and sync fetching of the wasm failed"}catch(e){He(e)}}function Ve(){return D||!p&&!f||"function"!=typeof fetch?Promise.resolve().then((function(){return ze(Be)})):fetch(Be,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+Be+"'";return e.arrayBuffer()})).catch((function(){return ze(Be)}))}function Ye(){var e={env:Cd,wasi_snapshot_preview1:Cd};function t(e,t){var r=e.exports;o.asm=r,I(R=o.asm.memory,"memory not found in wasm exports"),le(R.buffer),I(pe=o.asm.__indirect_function_table,"table not found in wasm exports"),Fe(o.asm.__wasm_call_ctors),Le("wasm-instantiate")}je("wasm-instantiate");var r=o;function i(e){I(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 Ve().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){T("failed to asynchronously prepare wasm: "+e),qe(Be)&&T("warning: Loading from a file URI ("+Be+") 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"),He(e)}))}if(o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(e){return T("Module.instantiateWasm callback failed with error: "+e),!1}return(D||"function"!=typeof WebAssembly.instantiateStreaming||Ge(Be)||"function"!=typeof fetch?a(i):fetch(Be,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(i,(function(e){return T("wasm streaming compile failed: "+e),T("falling back to ArrayBuffer instantiation"),a(i)}))}))).catch(n),{}}function $e(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?et(r)():et(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(o)}}function Ke(e){return O("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function Ze(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t=Ke(e);return e===t?e:t+" ["+e+"]"}))}Ge(Be="cesdk.wasm")||(Be=_(Be));var Je=[];function et(e){var t=Je[e];return t||(e>=Je.length&&(Je.length=e+1),Je[e]=t=pe.get(e)),I(pe.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}function tt(e){if(e instanceof cp||"unwind"==e)return A;d(1,e)}function rt(e,t,r,n){He("Assertion failed: "+N(e)+", at: "+[t?N(t):"unknown filename",r,n?N(n):"unknown function"])}function nt(e){return Ud(e+16)+16}function ot(e){this.excPtr=e,this.ptr=e-16,this.set_type=function(e){W[this.ptr+4>>2]=e},this.get_type=function(){return W[this.ptr+4>>2]},this.set_destructor=function(e){W[this.ptr+8>>2]=e},this.get_destructor=function(){return W[this.ptr+8>>2]},this.set_refcount=function(e){W[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=W[this.ptr>>2];W[this.ptr>>2]=e+1},this.release_ref=function(){var e=W[this.ptr>>2];return W[this.ptr>>2]=e-1,I(e>0),1===e}}function it(e,t,r){throw new ot(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 at(e){return W[jd()>>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(){He("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]:yt.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t="/"===n.charAt(0)}return(t?"/":"")+(e=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},yt.registerDevice(e,lt.stream_ops)},stream_ops:{open:function(e){var t=lt.ttys[e.node.rdev];if(!t)throw new yt.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new yt.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new yt.ErrnoError(29)}if(void 0===s&&0===i)throw new yt.ErrnoError(6);if(null==s)break;i++,t[r+a]=s}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.put_char)throw new yt.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new yt.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;e.input=kd(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(w(U(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(w(U(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(T(U(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(T(U(e.output,0)),e.output=[])}}};function dt(e,t){Q.fill(0,e,e+t)}function pt(e,t){return I(t,"alignment argument is required"),Math.ceil(e/t)*t}function ft(e){e=pt(e,65536);var t=Bd(65536,e);return t?(dt(t,e),t):0}var mt={ops_table:null,mount:function(e){return mt.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(yt.isBlkdev(r)||yt.isFIFO(r))throw new yt.ErrnoError(63);mt.ops_table||(mt.ops_table={dir:{node:{getattr:mt.node_ops.getattr,setattr:mt.node_ops.setattr,lookup:mt.node_ops.lookup,mknod:mt.node_ops.mknod,rename:mt.node_ops.rename,unlink:mt.node_ops.unlink,rmdir:mt.node_ops.rmdir,readdir:mt.node_ops.readdir,symlink:mt.node_ops.symlink},stream:{llseek:mt.stream_ops.llseek}},file:{node:{getattr:mt.node_ops.getattr,setattr:mt.node_ops.setattr},stream:{llseek:mt.stream_ops.llseek,read:mt.stream_ops.read,write:mt.stream_ops.write,allocate:mt.stream_ops.allocate,mmap:mt.stream_ops.mmap,msync:mt.stream_ops.msync}},link:{node:{getattr:mt.node_ops.getattr,setattr:mt.node_ops.setattr,readlink:mt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:mt.node_ops.getattr,setattr:mt.node_ops.setattr},stream:yt.chrdev_stream_ops}});var o=yt.createNode(e,t,r,n);return yt.isDir(o.mode)?(o.node_ops=mt.ops_table.dir.node,o.stream_ops=mt.ops_table.dir.stream,o.contents={}):yt.isFile(o.mode)?(o.node_ops=mt.ops_table.file.node,o.stream_ops=mt.ops_table.file.stream,o.usedBytes=0,o.contents=null):yt.isLink(o.mode)?(o.node_ops=mt.ops_table.link.node,o.stream_ops=mt.ops_table.link.stream):yt.isChrdev(o.mode)&&(o.node_ops=mt.ops_table.chrdev.node,o.stream_ops=mt.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=yt.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,yt.isDir(e.mode)?t.size=4096:yt.isFile(e.mode)?t.size=e.usedBytes:yt.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&mt.resizeFileStorage(e,t.size)},lookup:function(e,t){throw yt.genericErrors[44]},mknod:function(e,t,r,n){return mt.createNode(e,t,r,n)},rename:function(e,t,r){if(yt.isDir(e.mode)){var n;try{n=yt.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new yt.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=yt.lookupNode(e,t);for(var n in r.contents)throw new yt.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=mt.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!yt.isLink(e.mode))throw new yt.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(I(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(I(!(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 I(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(mt.expandFileStorage(a,o+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&yt.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new yt.ErrnoError(28);return n},allocate:function(e,t,r){mt.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,n,o,i){if(0!==t)throw new yt.ErrnoError(28);if(!yt.isFile(e.node.mode))throw new yt.ErrnoError(43);var a,s,c=e.node.contents;if(2&i||c.buffer!==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=ft(r)))throw new yt.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(!yt.isFile(e.node.mode))throw new yt.ErrnoError(43);return 2&o||mt.stream_ops.write(e,t,0,n,r,!1),0}}};function gt(e,t,r,n){var o=n?"":Ne("al "+e);E(e,(function(r){I(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),o&&Le(o)}),(function(t){if(!r)throw'Loading data file "'+e+'" failed.';r()})),o&&je(o)}var ht={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"},Et={},yt={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(yt.cwd(),e)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var n in r)void 0===t[n]&&(t[n]=r[n]);if(t.recurse_count>8)throw new yt.ErrnoError(32);for(var o=st.normalizeArray(e.split("/").filter((e=>!!e)),!1),i=yt.root,a="/",s=0;s<o.length;s++){var c=s===o.length-1;if(c&&t.parent)break;if(i=yt.lookupNode(i,o[s]),a=st.join2(a,o[s]),yt.isMountpoint(i)&&(!c||c&&t.follow_mount)&&(i=i.mounted.root),!c||t.follow)for(var u=0;yt.isLink(i.mode);){var l=yt.readlink(a);if(a=ut.resolve(st.dirname(a),l),i=yt.lookupPath(a,{recurse_count:t.recurse_count}).node,u++>40)throw new yt.ErrnoError(32)}}return{path:a,node:i}},getPath:e=>{for(var t;;){if(yt.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%yt.nameTable.length},hashAddNode:e=>{var t=yt.hashName(e.parent.id,e.name);e.name_next=yt.nameTable[t],yt.nameTable[t]=e},hashRemoveNode:e=>{var t=yt.hashName(e.parent.id,e.name);if(yt.nameTable[t]===e)yt.nameTable[t]=e.name_next;else for(var r=yt.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:(e,t)=>{var r=yt.mayLookup(e);if(r)throw new yt.ErrnoError(r,e);for(var n=yt.hashName(e.id,t),o=yt.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return yt.lookup(e,t)},createNode:(e,t,r,n)=>{I("object"==typeof e);var o=new yt.FSNode(e,t,r,n);return yt.hashAddNode(o),o},destroyNode:e=>{yt.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=yt.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)=>yt.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>yt.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,t)=>{try{return yt.lookupNode(e,t),20}catch(e){}return yt.nodePermissions(e,"wx")},mayDelete:(e,t,r)=>{var n;try{n=yt.lookupNode(e,t)}catch(e){return e.errno}var o=yt.nodePermissions(e,"wx");if(o)return o;if(r){if(!yt.isDir(n.mode))return 54;if(yt.isRoot(n)||yt.getPath(n)===yt.cwd())return 10}else if(yt.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?yt.isLink(e.mode)?32:yt.isDir(e.mode)&&("r"!==yt.flagsToPermissionString(t)||512&t)?31:yt.nodePermissions(e,yt.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=yt.MAX_OPEN_FDS)=>{for(var r=e;r<=t;r++)if(!yt.streams[r])return r;throw new yt.ErrnoError(33)},getStream:e=>yt.streams[e],createStream:(e,t,r)=>{yt.FSStream||(yt.FSStream=function(){},yt.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}),e=Object.assign(new yt.FSStream,e);var n=yt.nextfd(t,r);return e.fd=n,yt.streams[n]=e,e},closeStream:e=>{yt.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=yt.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new yt.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{yt.devices[e]={stream_ops:t}},getDevice:e=>yt.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),yt.syncFSRequests++,yt.syncFSRequests>1&&T("warning: "+yt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=yt.getMounts(yt.root.mount),n=0;function o(e){return I(yt.syncFSRequests>0),yt.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((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&&yt.root)throw new yt.ErrnoError(10);if(!o&&!i){var a=yt.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,yt.isMountpoint(n))throw new yt.ErrnoError(10);if(!yt.isDir(n.mode))throw new yt.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(s);return c.mount=s,s.root=c,o?yt.root=c:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),c},unmount:e=>{var t=yt.lookupPath(e,{follow_mount:!1});if(!yt.isMountpoint(t.node))throw new yt.ErrnoError(28);var r=t.node,n=r.mounted,o=yt.getMounts(n);Object.keys(yt.nameTable).forEach((e=>{for(var t=yt.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&yt.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);I(-1!==i),r.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,r)=>{var n=yt.lookupPath(e,{parent:!0}).node,o=st.basename(e);if(!o||"."===o||".."===o)throw new yt.ErrnoError(28);var i=yt.mayCreate(n,o);if(i)throw new yt.ErrnoError(i);if(!n.node_ops.mknod)throw new yt.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,yt.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,yt.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{yt.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>(void 0===r&&(r=t,t=438),t|=8192,yt.mknod(e,t,r)),symlink:(e,t)=>{if(!ut.resolve(e))throw new yt.ErrnoError(44);var r=yt.lookupPath(t,{parent:!0}).node;if(!r)throw new yt.ErrnoError(44);var n=st.basename(t),o=yt.mayCreate(r,n);if(o)throw new yt.ErrnoError(o);if(!r.node_ops.symlink)throw new yt.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:(e,t)=>{var r,n,o=st.dirname(e),i=st.dirname(t),a=st.basename(e),s=st.basename(t);if(r=yt.lookupPath(e,{parent:!0}).node,n=yt.lookupPath(t,{parent:!0}).node,!r||!n)throw new yt.ErrnoError(44);if(r.mount!==n.mount)throw new yt.ErrnoError(75);var c,u=yt.lookupNode(r,a),l=ut.relative(e,i);if("."!==l.charAt(0))throw new yt.ErrnoError(28);if("."!==(l=ut.relative(t,o)).charAt(0))throw new yt.ErrnoError(55);try{c=yt.lookupNode(n,s)}catch(e){}if(u!==c){var d=yt.isDir(u.mode),p=yt.mayDelete(r,a,d);if(p)throw new yt.ErrnoError(p);if(p=c?yt.mayDelete(n,s,d):yt.mayCreate(n,s))throw new yt.ErrnoError(p);if(!r.node_ops.rename)throw new yt.ErrnoError(63);if(yt.isMountpoint(u)||c&&yt.isMountpoint(c))throw new yt.ErrnoError(10);if(n!==r&&(p=yt.nodePermissions(r,"w")))throw new yt.ErrnoError(p);yt.hashRemoveNode(u);try{r.node_ops.rename(u,n,s)}catch(e){throw e}finally{yt.hashAddNode(u)}}},rmdir:e=>{var t=yt.lookupPath(e,{parent:!0}).node,r=st.basename(e),n=yt.lookupNode(t,r),o=yt.mayDelete(t,r,!0);if(o)throw new yt.ErrnoError(o);if(!t.node_ops.rmdir)throw new yt.ErrnoError(63);if(yt.isMountpoint(n))throw new yt.ErrnoError(10);t.node_ops.rmdir(t,r),yt.destroyNode(n)},readdir:e=>{var t=yt.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new yt.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=yt.lookupPath(e,{parent:!0}).node;if(!t)throw new yt.ErrnoError(44);var r=st.basename(e),n=yt.lookupNode(t,r),o=yt.mayDelete(t,r,!1);if(o)throw new yt.ErrnoError(o);if(!t.node_ops.unlink)throw new yt.ErrnoError(63);if(yt.isMountpoint(n))throw new yt.ErrnoError(10);t.node_ops.unlink(t,r),yt.destroyNode(n)},readlink:e=>{var t=yt.lookupPath(e).node;if(!t)throw new yt.ErrnoError(44);if(!t.node_ops.readlink)throw new yt.ErrnoError(28);return ut.resolve(yt.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var r=yt.lookupPath(e,{follow:!t}).node;if(!r)throw new yt.ErrnoError(44);if(!r.node_ops.getattr)throw new yt.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>yt.stat(e,!0),chmod:(e,t,r)=>{var n;if(!(n="string"==typeof e?yt.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new yt.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{yt.chmod(e,t,!0)},fchmod:(e,t)=>{var r=yt.getStream(e);if(!r)throw new yt.ErrnoError(8);yt.chmod(r.node,t)},chown:(e,t,r,n)=>{var o;if(!(o="string"==typeof e?yt.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new yt.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,t,r)=>{yt.chown(e,t,r,!0)},fchown:(e,t,r)=>{var n=yt.getStream(e);if(!n)throw new yt.ErrnoError(8);yt.chown(n.node,t,r)},truncate:(e,t)=>{if(t<0)throw new yt.ErrnoError(28);var r;if(!(r="string"==typeof e?yt.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new yt.ErrnoError(63);if(yt.isDir(r.mode))throw new yt.ErrnoError(31);if(!yt.isFile(r.mode))throw new yt.ErrnoError(28);var n=yt.nodePermissions(r,"w");if(n)throw new yt.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var r=yt.getStream(e);if(!r)throw new yt.ErrnoError(8);if(0==(2097155&r.flags))throw new yt.ErrnoError(28);yt.truncate(r.node,t)},utime:(e,t,r)=>{var n=yt.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 yt.ErrnoError(44);var a;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?yt.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)a=e;else{e=st.normalize(e);try{a=yt.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(a){if(128&t)throw new yt.ErrnoError(20)}else a=yt.mknod(e,r,0),s=!0;if(!a)throw new yt.ErrnoError(44);if(yt.isChrdev(a.mode)&&(t&=-513),65536&t&&!yt.isDir(a.mode))throw new yt.ErrnoError(54);if(!s){var c=yt.mayOpen(a,t);if(c)throw new yt.ErrnoError(c)}512&t&&yt.truncate(a,0),t&=-131713;var u=yt.createStream({node:a,path:yt.getPath(a),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||(yt.readFiles||(yt.readFiles={}),e in yt.readFiles||(yt.readFiles[e]=1)),u},close:e=>{if(yt.isClosed(e))throw new yt.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{yt.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,r)=>{if(yt.isClosed(e))throw new yt.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new yt.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new yt.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:(e,t,r,n,o)=>{if(n<0||o<0)throw new yt.ErrnoError(28);if(yt.isClosed(e))throw new yt.ErrnoError(8);if(1==(2097155&e.flags))throw new yt.ErrnoError(8);if(yt.isDir(e.node.mode))throw new yt.ErrnoError(31);if(!e.stream_ops.read)throw new yt.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new yt.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=a),a},write:(e,t,r,n,o,i)=>{if(n<0||o<0)throw new yt.ErrnoError(28);if(yt.isClosed(e))throw new yt.ErrnoError(8);if(0==(2097155&e.flags))throw new yt.ErrnoError(8);if(yt.isDir(e.node.mode))throw new yt.ErrnoError(31);if(!e.stream_ops.write)throw new yt.ErrnoError(28);e.seekable&&1024&e.flags&&yt.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new yt.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,t,r,n,o,i);return a||(e.position+=s),s},allocate:(e,t,r)=>{if(yt.isClosed(e))throw new yt.ErrnoError(8);if(t<0||r<=0)throw new yt.ErrnoError(28);if(0==(2097155&e.flags))throw new yt.ErrnoError(8);if(!yt.isFile(e.node.mode)&&!yt.isDir(e.node.mode))throw new yt.ErrnoError(43);if(!e.stream_ops.allocate)throw new yt.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:(e,t,r,n,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&e.flags))throw new yt.ErrnoError(2);if(1==(2097155&e.flags))throw new yt.ErrnoError(2);if(!e.stream_ops.mmap)throw new yt.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o,i)},msync:(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 yt.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=yt.open(e,t.flags),o=yt.stat(e).size,i=new Uint8Array(o);return yt.read(n,i,0,o,0),"utf8"===t.encoding?r=U(i,0):"binary"===t.encoding&&(r=i),yt.close(n),r},writeFile:(e,t,r={})=>{r.flags=r.flags||577;var n=yt.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(H(t)+1),i=j(t,o,0,o.length);yt.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");yt.write(n,t,0,t.byteLength,void 0,r.canOwn)}yt.close(n)},cwd:()=>yt.currentPath,chdir:e=>{var t=yt.lookupPath(e,{follow:!0});if(null===t.node)throw new yt.ErrnoError(44);if(!yt.isDir(t.node.mode))throw new yt.ErrnoError(54);var r=yt.nodePermissions(t.node,"x");if(r)throw new yt.ErrnoError(r);yt.currentPath=t.path},createDefaultDirectories:()=>{yt.mkdir("/tmp"),yt.mkdir("/home"),yt.mkdir("/home/web_user")},createDefaultDevices:()=>{yt.mkdir("/dev"),yt.registerDevice(yt.makedev(1,3),{read:()=>0,write:(e,t,r,n,o)=>n}),yt.mkdev("/dev/null",yt.makedev(1,3)),lt.register(yt.makedev(5,0),lt.default_tty_ops),lt.register(yt.makedev(6,0),lt.default_tty1_ops),yt.mkdev("/dev/tty",yt.makedev(5,0)),yt.mkdev("/dev/tty1",yt.makedev(6,0));var e=ct();yt.createDevice("/dev","random",e),yt.createDevice("/dev","urandom",e),yt.mkdir("/dev/shm"),yt.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{yt.mkdir("/proc");var e=yt.mkdir("/proc/self");yt.mkdir("/proc/self/fd"),yt.mount({mount:()=>{var t=yt.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var r=+t,n=yt.getStream(r);if(!n)throw new yt.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?yt.createDevice("/dev","stdin",o.stdin):yt.symlink("/dev/tty","/dev/stdin"),o.stdout?yt.createDevice("/dev","stdout",null,o.stdout):yt.symlink("/dev/tty","/dev/stdout"),o.stderr?yt.createDevice("/dev","stderr",null,o.stderr):yt.symlink("/dev/tty1","/dev/stderr");var e=yt.open("/dev/stdin",0),t=yt.open("/dev/stdout",1),r=yt.open("/dev/stderr",1);I(0===e.fd,"invalid handle for stdin ("+e.fd+")"),I(1===t.fd,"invalid handle for stdout ("+t.fd+")"),I(2===r.fd,"invalid handle for stderr ("+r.fd+")")},ensureErrnoError:()=>{yt.ErrnoError||(yt.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,Et)if(Et[t]===e){this.code=t;break}},this.setErrno(e),this.message=ht[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=Ze(this.stack))},yt.ErrnoError.prototype=new Error,yt.ErrnoError.prototype.constructor=yt.ErrnoError,[44].forEach((e=>{yt.genericErrors[e]=new yt.ErrnoError(e),yt.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{yt.ensureErrnoError(),yt.nameTable=new Array(4096),yt.mount(mt,{},"/"),yt.createDefaultDirectories(),yt.createDefaultDevices(),yt.createSpecialDirectories(),yt.filesystems={MEMFS:mt}},init:(e,t,r)=>{I(!yt.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),yt.init.initialized=!0,yt.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=t||o.stdout,o.stderr=r||o.stderr,yt.createStandardStreams()},quit:()=>{yt.init.initialized=!1,Hd();for(var e=0;e<yt.streams.length;e++){var t=yt.streams[e];t&&yt.close(t)}},getMode:(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:(e,t)=>{var r=yt.analyzePath(e,t);return r.exists?r.object:null},analyzePath:(e,t)=>{try{e=(n=yt.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=yt.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=st.basename(e),n=yt.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath:(e,t,r,n)=>{e="string"==typeof e?e:yt.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=st.join2(e,i);try{yt.mkdir(a)}catch(e){}e=a}}return a},createFile:(e,t,r,n,o)=>{var i=st.join2("string"==typeof e?e:yt.getPath(e),t),a=yt.getMode(n,o);return yt.create(i,a)},createDataFile:(e,t,r,n,o,i)=>{var a=t;e&&(e="string"==typeof e?e:yt.getPath(e),a=t?st.join2(e,t):e);var s=yt.getMode(n,o),c=yt.create(a,s);if(r){if("string"==typeof r){for(var u=new Array(r.length),l=0,d=r.length;l<d;++l)u[l]=r.charCodeAt(l);r=u}yt.chmod(c,146|s);var p=yt.open(c,577);yt.write(p,r,0,r.length,0,i),yt.close(p),yt.chmod(c,s)}return c},createDevice:(e,t,r,n)=>{var o=st.join2("string"==typeof e?e:yt.getPath(e),t),i=yt.getMode(!!r,!!n);yt.createDevice.major||(yt.createDevice.major=64);var a=yt.makedev(yt.createDevice.major++,0);return yt.registerDevice(a,{open: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 yt.ErrnoError(29)}if(void 0===c&&0===a)throw new yt.ErrnoError(6);if(null==c)break;a++,t[n+s]=c}return a&&(e.node.timestamp=Date.now()),a},write:(e,t,r,o,i)=>{for(var a=0;a<o;a++)try{n(t[r+a])}catch(e){throw new yt.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),yt.mkdev(o,i,a)},forceLoadFile: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(!h)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=kd(h(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new yt.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||[]):kd(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,w("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(!f)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:r};var c=yt.createFile(e,t,s,n,o);s.contents?c.contents=s.contents:s.url&&(c.contents=null,c.url=s.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(c.stream_ops).forEach((e=>{var t=c.stream_ops[e];u[e]=function(){return yt.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,o)=>{yt.forceLoadFile(c);var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(I(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=Ne("cp "+l);function p(r){function p(r){u&&u(),s||yt.createDataFile(e,t,r,n,o,c),i&&i(),Le(d)}bo.handledByPreloadPlugin(r,l,p,(()=>{a&&a(),Le(d)}))||p(r)}je(d),"string"==typeof r?gt(r,(e=>p(e)),a):p(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=yt.indexedDB();try{var o=n.open(yt.DB_NAME(),yt.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=()=>{w("creating db"),o.result.createObjectStore(yt.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([yt.DB_STORE_NAME],"readwrite"),i=n.objectStore(yt.DB_STORE_NAME),a=0,s=0,c=e.length;function u(){0==s?t():r()}e.forEach((e=>{var t=i.put(yt.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=yt.indexedDB();try{var o=n.open(yt.DB_NAME(),yt.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=r,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([yt.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var a=i.objectStore(yt.DB_STORE_NAME),s=0,c=0,u=e.length;function l(){0==c?t():r()}e.forEach((e=>{var t=a.get(e);t.onsuccess=()=>{yt.analyzePath(e).exists&&yt.unlink(e),yt.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:()=>{He("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:()=>{He("FS.createFolder has been removed; use FS.mkdir instead")},createLink:()=>{He("FS.createLink has been removed; use FS.symlink instead")},joinPath:()=>{He("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:()=>{He("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:()=>{He("FS.standardizePath has been removed; use PATH.normalize instead")}},vt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if("/"===t[0])return t;var n;if(-100===e)n=yt.cwd();else{var o=yt.getStream(e);if(!o)throw new yt.ErrnoError(8);n=o.path}if(0==t.length){if(!r)throw new yt.ErrnoError(44);return n}return 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(yt.getPath(e.node)))return-54;throw e}return W[r>>2]=n.dev,W[r+4>>2]=0,W[r+8>>2]=n.ino,W[r+12>>2]=n.mode,W[r+16>>2]=n.nlink,W[r+20>>2]=n.uid,W[r+24>>2]=n.gid,W[r+28>>2]=n.rdev,W[r+32>>2]=0,Y[r+40>>3]=BigInt(n.size),W[r+48>>2]=4096,W[r+52>>2]=n.blocks,W[r+56>>2]=n.atime.getTime()/1e3|0,W[r+60>>2]=0,W[r+64>>2]=n.mtime.getTime()/1e3|0,W[r+68>>2]=0,W[r+72>>2]=n.ctime.getTime()/1e3|0,W[r+76>>2]=0,Y[r+80>>3]=BigInt(n.ino),0},doMsync:function(e,t,r,n,o){var i=Q.slice(e,e+r);yt.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)),yt.mkdir(e,t,0),0},doMknod:function(e,t,r){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return yt.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-28;var n=yt.readlink(e),o=Math.min(r,H(n)),i=X[t+o];return L(n,t,r+1),X[t+o]=i,o},doAccess:function(e,t){if(-8&t)return-28;var r=yt.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&&yt.nodePermissions(r,n)?-2:0},doDup:function(e,t,r){var n=yt.getStream(r);return n&&yt.close(n),yt.open(e,t,0,r,r).fd},doReadv:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=W[t+8*i>>2],s=W[t+(8*i+4)>>2],c=yt.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=W[t+8*i>>2],s=W[t+(8*i+4)>>2],c=yt.write(e,X,a,s,n);if(c<0)return-1;o+=c}return o},varargs:void 0,get:function(){return I(null!=vt.varargs),vt.varargs+=4,W[vt.varargs-4>>2]},getStr:function(e){return N(e)},getStreamFromFD:function(e){var t=yt.getStream(e);if(!t)throw new yt.ErrnoError(8);return t},get64:function(e,t){return I(e>=0?0===t:-1===t),e}};function _t(e,t,r){vt.varargs=r;try{var n=vt.getStreamFromFD(e);switch(t){case 0:return(o=vt.get())<0?-28:yt.open(n.path,n.flags,0,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=vt.get();return n.flags|=o,0;case 5:return o=vt.get(),G[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return at(28),-1}}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function bt(e,t){try{var r=vt.getStreamFromFD(e);return vt.doStat(yt.stat,r.path,t)}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function wt(e,t,r,n){try{t=vt.getStr(t);var o=256&n,i=4096&n;return I(!(n&=-4353),n),t=vt.calculateAt(e,t,i),vt.doStat(o?yt.lstat:yt.stat,t,r)}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function Tt(e,t,r){try{var n=vt.getStreamFromFD(e);n.getdents||(n.getdents=yt.readdir(n.path));for(var o=280,i=0,a=yt.llseek(n,0,1),s=Math.floor(a/o);s<n.getdents.length&&i+o<=r;){var c,u,l=n.getdents[s];if("."===l)c=n.node.id,u=4;else if(".."===l)c=yt.lookupPath(n.path,{parent:!0}).node.id,u=4;else{var d=yt.lookupNode(n.node,l);c=d.id,u=yt.isChrdev(d.mode)?2:yt.isDir(d.mode)?4:yt.isLink(d.mode)?10:8}I(c),Y[t+i>>3]=BigInt(c),Y[t+i+8>>3]=BigInt((s+1)*o),G[t+i+16>>1]=280,X[t+i+18>>0]=u,L(l,t+i+19,256),i+=o,s+=1}return yt.llseek(n,s*o,0),i}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function Ot(e,t,r){vt.varargs=r;try{var n=vt.getStreamFromFD(e);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=vt.get();return W[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=vt.get(),yt.ioctl(n,t,o);default:He("bad ioctl syscall "+t)}}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function Dt(e,t){try{return e=vt.getStr(e),vt.doStat(yt.lstat,e,t)}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function Pt(e,t,r){vt.varargs=r;try{var n=vt.getStr(e),o=r?vt.get():0;return yt.open(n,t,o).fd}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function xt(e,t){try{return e=vt.getStr(e),vt.doStat(yt.stat,e,t)}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function St(e,t){He("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Rt(e,t){He("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}var Mt={};function Ft(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function At(e){return this.fromWireType(z[e>>2])}var kt={},It={},Ct={},Ut=48,Nt=57;function jt(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Ut&&t<=Nt?"_"+e:e}function Lt(e,t){return e=jt(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Ht(e,t){var r=Lt(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 Bt=void 0;function Xt(e){throw new Bt(e)}function Qt(e,t,r){function n(t){var n=r(t);n.length!==e.length&&Xt("Mismatched type converter count");for(var o=0;o<e.length;++o)Jt(e[o],n[o])}e.forEach((function(e){Ct[e]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(e,t){It.hasOwnProperty(e)?o[t]=It[e]:(i.push(e),kt.hasOwnProperty(e)||(kt[e]=[]),kt[e].push((function(){o[t]=It[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Gt(e){var t=Mt[e];delete Mt[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;Qt([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)),Ft(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:At,destructorFunction:a}]}))}var qt={};function Wt(e){var t=qt[e];delete qt[e];var r=t.rawConstructor,n=t.rawDestructor,o=t.fields;Qt([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)),Ft(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:At,destructorFunction:n}]}))}function zt(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function Vt(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Yt=e}var Yt=void 0;function $t(e){for(var t="",r=e;Q[r];)t+=Yt[Q[r++]];return t}var Kt=void 0;function Zt(e){throw new Kt(e)}function Jt(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'),It.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Zt("Cannot register type '"+n+"' twice")}if(It[e]=t,delete Ct[e],kt.hasOwnProperty(e)){var o=kt[e];delete kt[e],o.forEach((function(e){e()}))}}function er(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 W[e>>2]}:function(e){return z[e>>2]};case 3:return r?function(e){return Y[e>>3]}:function(e){return $[e>>3]};default:throw new TypeError("Unknown integer type: "+e)}}function tr(e,t,r,n,o){t=$t(t);var i=rr(r),a=-1!=t.indexOf("u");a&&(o=(BigInt(1)<<BigInt(64))-BigInt(1)),Jt(e,{name:t,fromWireType:function(e){return e},toWireType:function(e,r){if("bigint"!=typeof r)throw new TypeError('Cannot convert "'+zt(r)+'" to '+this.name);if(r<n||r>o)throw new TypeError('Passing a number "'+zt(r)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!");return r},argPackAdvance:8,readValueFromPointer:er(t,i,!a),destructorFunction:null})}function rr(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 nr(e,t,r,n,o){var i=rr(r);Jt(e,{name:t=$t(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=W}return this.fromWireType(n[e>>i])},destructorFunction:null})}function or(e){if(!(this instanceof Fr))return!1;if(!(e instanceof Fr))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 ir(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function ar(e){Zt(e.$$.ptrType.registeredClass.name+" instance already deleted")}var sr=!1;function cr(e){}function ur(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function lr(e){e.count.value-=1,0===e.count.value&&ur(e)}function dr(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=dr(e,t,r.baseClass);return null===n?null:r.downcast(n)}var pr={};function fr(){return Object.keys(_r).length}function mr(){var e=[];for(var t in _r)_r.hasOwnProperty(t)&&e.push(_r[t]);return e}var gr=[];function hr(){for(;gr.length;){var e=gr.pop();e.$$.deleteScheduled=!1,e.delete()}}var Er=void 0;function yr(e){Er=e,gr.length&&Er&&Er(hr)}function vr(){o.getInheritedInstanceCount=fr,o.getLiveInheritedInstances=mr,o.flushPendingDeletes=hr,o.setDelayFunction=yr}var _r={};function br(e,t){for(void 0===t&&Zt("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function wr(e,t){return t=br(e,t),_r[t]}function Tr(e,t){return t.ptrType&&t.ptr||Xt("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Xt("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Dr(Object.create(e,{$$:{value:t}}))}function Or(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=wr(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?Tr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Tr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=pr[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var c=dr(t,this.registeredClass,i.registeredClass);return null===c?o.call(this):this.isSmartPointer?Tr(i.registeredClass.instancePrototype,{ptrType:i,ptr:c,smartPtrType:this,smartPtr:e}):Tr(i.registeredClass.instancePrototype,{ptrType:i,ptr:c})}function Dr(e){return"undefined"==typeof FinalizationRegistry?(Dr=e=>e,e):(sr=new FinalizationRegistry((e=>{console.warn(e.leakWarning.stack.replace(/^Error: /,"")),lr(e.$$)})),Dr=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,Or),sr.register(e,r,e)}return e},cr=e=>sr.unregister(e),Dr(e))}function Pr(){if(this.$$.ptr||ar(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Dr(Object.create(Object.getPrototypeOf(this),{$$:{value:ir(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function xr(){this.$$.ptr||ar(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Zt("Object already scheduled for deletion"),cr(this),lr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Sr(){return!this.$$.ptr}function Rr(){return this.$$.ptr||ar(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Zt("Object already scheduled for deletion"),gr.push(this),1===gr.length&&Er&&Er(hr),this.$$.deleteScheduled=!0,this}function Mr(){Fr.prototype.isAliasOf=or,Fr.prototype.clone=Pr,Fr.prototype.delete=xr,Fr.prototype.isDeleted=Sr,Fr.prototype.deleteLater=Rr}function Fr(){}function Ar(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 kr(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"),Ar(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 Ir(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 Cr(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 Ur(e,t){if(null===t)return this.isReference&&Zt("null is not a valid "+this.name),0;t.$$||Zt('Cannot pass "'+zt(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 Cr(t.$$.ptr,r,this.registeredClass)}function Nr(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 "'+zt(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=Cr(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,cn.toHandle((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:Zt("Unsupporting sharing policy")}return r}function jr(e,t){if(null===t)return this.isReference&&Zt("null is not a valid "+this.name),0;t.$$||Zt('Cannot pass "'+zt(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 Cr(t.$$.ptr,r,this.registeredClass)}function Lr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Hr(e){this.rawDestructor&&this.rawDestructor(e)}function Br(e){null!==e&&e.delete()}function Xr(){Qr.prototype.getPointee=Lr,Qr.prototype.destructor=Hr,Qr.prototype.argPackAdvance=8,Qr.prototype.readValueFromPointer=At,Qr.prototype.deleteObject=Br,Qr.prototype.fromWireType=Or}function Qr(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=Nr:n?(this.toWireType=Ur,this.destructorFunction=null):(this.toWireType=jr,this.destructorFunction=null)}function Gr(e,t,r){o.hasOwnProperty(e)||Xt("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 qr(e,t){e=$t(e);var r=et(t);return"function"!=typeof r&&Zt("unknown function pointer with signature "+e+": "+t),r}var Wr=void 0;function zr(e){var t=Ld(e),r=$t(t);return Nd(t),r}function Vr(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||It[t]||(Ct[t]?Ct[t].forEach(e):(r.push(t),n[t]=!0))})),new Wr(e+": "+r.map(zr).join([", "]))}function Yr(e,t,r,n,o,i,a,s,c,u,l,d,p){l=$t(l),i=qr(o,i),s&&(s=qr(a,s)),u&&(u=qr(c,u)),p=qr(d,p);var f=jt(l);kr(f,(function(){Vr("Cannot construct "+l+" due to unbound types",[n])})),Qt([e,t,r],n?[n]:[],(function(t){var r,o;t=t[0],o=n?(r=t.registeredClass).instancePrototype:Fr.prototype;var a=Lt(f,(function(){if(Object.getPrototypeOf(this)!==c)throw new Kt("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Kt(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Kt("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 Ir(l,a,c,p,r,i,s,u),m=new Qr(l,d,!0,!1,!1),g=new Qr(l+"*",d,!1,!1,!1),h=new Qr(l+" const*",d,!1,!0,!1);return pr[e]={pointerType:g,constPointerType:h},Gr(f,a),[m,g,h]}))}function $r(e,t){for(var r=[],n=0;n<e;n++)r.push(W[(t>>2)+n]);return r}function Kr(e,t,r,n,o,i){I(t>0);var a=$r(t,r);o=qr(n,o),Qt([],[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 Kt("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]=()=>{Vr("Cannot construct "+e.name+" due to unbound types",a)},Qt([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Jr(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=Lt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,o=e.apply(n,t);return o instanceof Object?o:n}function Jr(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 p="return function "+jt(e)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var f=s?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],g=[Zt,n,o,Ft,t[0],t[1]];for(a&&(p+="var thisWired = classParam.toWireType("+f+", this);\n"),c=0;c<i-2;++c)p+="var arg"+c+"Wired = argType"+c+".toWireType("+f+", arg"+c+"); // "+t[c+2].name+"\n",m.push("argType"+c),g.push(t[c+2]);if(a&&(d="thisWired"+(d.length>0?", ":"")+d),p+=(u?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",s)p+="runDestructors(destructors);\n";else for(c=a?1:2;c<t.length;++c){var h=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(p+=h+"_dtor("+h+"); // "+t[c].name+"\n",m.push(h+"_dtor"),g.push(t[c].destructorFunction))}return u&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",m.push(p),Zr(Function,m).apply(null,g)}function en(e,t,r,n,o,i,a,s){var c=$r(r,n);t=$t(t),i=qr(o,i),Qt([],[e],(function(e){var n=(e=e[0]).name+"."+t;function o(){Vr("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):(Ar(u,t,n),u[t].overloadTable[r-2]=o),Qt([],c,(function(o){var s=Jr(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 tn=[],rn=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function nn(e){e>4&&0==--rn[e].refcount&&(rn[e]=void 0,tn.push(e))}function on(){for(var e=0,t=5;t<rn.length;++t)void 0!==rn[t]&&++e;return e}function an(){for(var e=5;e<rn.length;++e)if(void 0!==rn[e])return rn[e];return null}function sn(){o.count_emval_handles=on,o.get_first_emval=an}var cn={toValue:function(e){return e||Zt("Cannot use deleted val. handle = "+e),rn[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=tn.length?tn.pop():rn.length;return rn[t]={refcount:1,value:e},t}}};function un(e,t){Jt(e,{name:t=$t(t),fromWireType:function(e){var t=cn.toValue(e);return nn(e),t},toWireType:function(e,t){return cn.toHandle(t)},argPackAdvance:8,readValueFromPointer:At,destructorFunction:null})}function ln(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?W:z;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function dn(e,t,r,n){var o=rr(r);function i(){}t=$t(t),i.values={},Jt(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:ln(t,o,n),destructorFunction:null}),kr(t,i)}function pn(e,t){var r=It[e];return void 0===r&&Zt(t+" has unknown type "+zr(e)),r}function fn(e,t,r){var n=pn(e,"enum");t=$t(t);var o=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Lt(n.name+"_"+t,(function(){}))}});o.values[r]=i,o[t]=i}function mn(e,t){switch(t){case 2:return function(e){return this.fromWireType(V[e>>2])};case 3:return function(e){return this.fromWireType(K[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function gn(e,t,r){var n=rr(r);Jt(e,{name:t=$t(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+zt(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:mn(t,n),destructorFunction:null})}function hn(e,t,r,n,o,i){var a=$r(t,r);e=$t(e),o=qr(n,o),kr(e,(function(){Vr("Cannot call "+e+" due to unbound types",a)}),t-1),Qt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return Gr(e,Jr(e,n,null,o,i),t-1),[]}))}function En(e,t,r,n,o){t=$t(t),-1===o&&(o=4294967295);var i=rr(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 "'+zt(e)+'" to '+r);if(e<n||e>o)throw new TypeError('Passing a number "'+zt(e)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!")};Jt(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:er(t,i,0!==n),destructorFunction:null})}function yn(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];function o(e){var t=z,r=t[e>>=2],o=t[e+1];return new n(B,o,r)}Jt(e,{name:r=$t(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function vn(e,t,r,n,o,i,a,s,c,u,l,d){r=$t(r),i=qr(o,i),s=qr(a,s),u=qr(c,u),d=qr(l,d),Qt([e],[t],(function(e){return e=e[0],[new Qr(r,e.registeredClass,!1,!1,!0,e,n,i,s,u,d)]}))}function _n(e,t){var r="std::string"===(t=$t(t));Jt(e,{name:t,fromWireType:function(e){var t,n=z[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=N(o,a-o);void 0===t?t=s:(t+=String.fromCharCode(0),t+=s),o=a+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(Q[e+4+i]);t=c.join("")}return Nd(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=Ud(4+o+1);if(z[i>>2]=o,r&&n)L(t,i+4,o+1);else if(n)for(var a=0;a<o;++a){var s=t.charCodeAt(a);s>255&&(Nd(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(Nd,i),i},argPackAdvance:8,readValueFromPointer:At,destructorFunction:function(e){Nd(e)}})}function bn(e,t,r){var n,o,i,a,s;r=$t(r),2===t?(n=J,o=ee,a=te,i=()=>q,s=1):4===t&&(n=re,o=ne,a=oe,i=()=>z,s=2),Jt(e,{name:r,fromWireType:function(e){for(var r,o=z[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 Nd(e),r},toWireType:function(e,n){"string"!=typeof n&&Zt("Cannot pass non-string to C++ string type "+r);var i=a(n),c=Ud(4+i+t);return z[c>>2]=i>>s,o(n,c+4,i+t),null!==e&&e.push(Nd,c),c},argPackAdvance:8,readValueFromPointer:At,destructorFunction:function(e){Nd(e)}})}function wn(e,t,r,n,o,i){Mt[e]={name:$t(t),rawConstructor:qr(r,n),rawDestructor:qr(o,i),elements:[]}}function Tn(e,t,r,n,o,i,a,s,c){Mt[e].elements.push({getterReturnType:t,getter:qr(r,n),getterContext:o,setterArgumentType:i,setter:qr(a,s),setterContext:c})}function On(e,t,r,n,o,i){qt[e]={name:$t(t),rawConstructor:qr(r,n),rawDestructor:qr(o,i),fields:[]}}function Dn(e,t,r,n,o,i,a,s,c,u){qt[e].fields.push({fieldName:$t(t),getterReturnType:r,getter:qr(n,o),getterContext:i,setterArgumentType:a,setter:qr(s,c),setterContext:u})}function Pn(e,t){Jt(e,{isVoid:!0,name:t=$t(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})}function xn(){throw"longjmp"}function Sn(e,t,r){e=cn.toValue(e),t=pn(t,"emval::as");var n=[],o=cn.toHandle(n);return W[r>>2]=o,t.toWireType(n,e)}function Rn(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=pn(W[(t>>2)+n],"parameter "+n);return r}function Mn(e,t,r,n){e=cn.toValue(e);for(var o=Rn(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 cn.toHandle(c)}function Fn(e){var t=[];return W[e>>2]=cn.toHandle(t),t}var An={};function kn(e){var t=An[e];return void 0===t?$t(e):t}var In=[];function Cn(e,t,r,n,o){return(e=In[e])(t=cn.toValue(t),r=kn(r),Fn(n),o)}function Un(e,t,r,n){(e=In[e])(t=cn.toValue(t),r=kn(r),null,n)}function Nn(){return"object"==typeof globalThis?globalThis:Function("return this")()}function jn(e){return 0===e?cn.toHandle(Nn()):(e=kn(e),cn.toHandle(Nn()[e]))}function Ln(e){var t=In.length;return In.push(e),t}var Hn=[];function Bn(e,t){var r=Rn(e,t),n=r[0],o=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",i=Hn[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 "+jt("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=Ln(Zr(Function,a).apply(null,s)),Hn[o]=i,i}function Xn(e,t){return e=cn.toValue(e),t=cn.toValue(t),cn.toHandle(e[t])}function Qn(e){e>4&&(rn[e].refcount+=1)}function Gn(e,t){return(e=cn.toValue(e))instanceof cn.toValue(t)}function qn(e){return"number"==typeof(e=cn.toValue(e))}function Wn(e){return"string"==typeof(e=cn.toValue(e))}function zn(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)(pn,o,cn.toHandle)}var Vn,Yn={};function $n(e,t,r,n){e=cn.toValue(e);var o=Yn[t];return o||(o=zn(t),Yn[t]=o),o(e,r,n)}function Kn(){return cn.toHandle([])}function Zn(e){return cn.toHandle(kn(e))}function Jn(){return cn.toHandle({})}function eo(e){Ft(cn.toValue(e)),nn(e)}function to(e,t,r){e=cn.toValue(e),t=cn.toValue(t),r=cn.toValue(r),e[t]=r}function ro(e,t){var r=(e=pn(e,"_emval_take_value")).readValueFromPointer(t);return cn.toHandle(r)}function no(e){throw cn.toValue(e)}function oo(e,t){var r=new Date(1e3*W[e>>2]);W[t>>2]=r.getUTCSeconds(),W[t+4>>2]=r.getUTCMinutes(),W[t+8>>2]=r.getUTCHours(),W[t+12>>2]=r.getUTCDate(),W[t+16>>2]=r.getUTCMonth(),W[t+20>>2]=r.getUTCFullYear()-1900,W[t+24>>2]=r.getUTCDay();var n=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),o=(r.getTime()-n)/864e5|0;W[t+28>>2]=o}function io(e,t){var r=new Date(1e3*W[e>>2]);W[t>>2]=r.getSeconds(),W[t+4>>2]=r.getMinutes(),W[t+8>>2]=r.getHours(),W[t+12>>2]=r.getDate(),W[t+16>>2]=r.getMonth(),W[t+20>>2]=r.getFullYear()-1900,W[t+24>>2]=r.getDay();var n=new Date(r.getFullYear(),0,1),o=(r.getTime()-n.getTime())/864e5|0;W[t+28>>2]=o,W[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));W[t+32>>2]=s}function ao(e){var t=new Date(W[e+20>>2]+1900,W[e+16>>2],W[e+12>>2],W[e+8>>2],W[e+4>>2],W[e>>2],0),r=W[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)W[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))}W[e+24>>2]=t.getDay();var l=(t.getTime()-o.getTime())/864e5|0;return W[e+28>>2]=l,W[e>>2]=t.getSeconds(),W[e+4>>2]=t.getMinutes(),W[e+8>>2]=t.getHours(),W[e+12>>2]=t.getDate(),W[e+16>>2]=t.getMonth(),t.getTime()/1e3|0}function so(e,t,r,n,o,i,a,s){try{var c=yt.getStream(o);if(!c)return-8;var u=yt.mmap(c,e,t,i,r,n),l=u.ptr;return W[a>>2]=u.allocated,l}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function co(e,t,r,n,o,i){try{var a=yt.getStream(o);a&&(2&r&&vt.doMsync(e,a,t,n,i),yt.munmap(a))}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function uo(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"}W[e>>2]=60*c,W[t>>2]=Number(a!=s);var l=u(o),d=u(i),p=ie(l),f=ie(d);s<a?(W[r>>2]=p,W[r+4>>2]=f):(W[r>>2]=f,W[r+4>>2]=p)}function lo(e,t,r){lo.called||(lo.called=!0,uo(e,t,r))}function po(){He("native code called abort()")}Vn=()=>performance.now();var fo=!0;function mo(e,t){var r;if(0===e)r=Date.now();else{if(1!==e&&4!==e||!fo)return at(28),-1;r=Vn()}return W[t>>2]=r/1e3|0,W[t+4>>2]=r%1e3*1e3*1e3|0,0}function go(e,t){if(bo.mainLoop.timingMode=e,bo.mainLoop.timingValue=t,!bo.mainLoop.func)return T("emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up."),1;if(bo.mainLoop.running||(bo.mainLoop.running=!0),0==e)bo.mainLoop.scheduler=function(){var e=0|Math.max(0,bo.mainLoop.tickStartTime+t-Vn());setTimeout(bo.mainLoop.runner,e)},bo.mainLoop.method="timeout";else if(1==e)bo.mainLoop.scheduler=function(){bo.requestAnimationFrame(bo.mainLoop.runner)},bo.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),f?(void 0===o.setImmediates&&(o.setImmediates=[]),o.setImmediates.push(e),postMessage({target:n})):postMessage(n,"*")}}bo.mainLoop.scheduler=function(){setImmediate(bo.mainLoop.runner)},bo.mainLoop.method="immediate"}return 0}function ho(e){fp(e)}function Eo(){if(!Oe())try{ho(A)}catch(e){tt(e)}}function yo(e,t,r,n,i){I(!bo.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."),bo.mainLoop.func=e,bo.mainLoop.arg=n;var a=bo.mainLoop.currentlyRunningMainloop;function s(){return!(a<bo.mainLoop.currentlyRunningMainloop&&(Eo(),1))}if(bo.mainLoop.running=!1,bo.mainLoop.runner=function(){if(!k)if(bo.mainLoop.queue.length>0){var t=Date.now(),r=bo.mainLoop.queue.shift();if(r.func(r.arg),bo.mainLoop.remainingBlockers){var n=bo.mainLoop.remainingBlockers,i=n%1==0?n-1:Math.floor(n);r.counted?bo.mainLoop.remainingBlockers=i:(i+=.5,bo.mainLoop.remainingBlockers=(8*n+i)/9)}if(w('main loop blocker "'+r.name+'" took '+(Date.now()-t)+" ms"),bo.mainLoop.updateStatus(),!s())return;setTimeout(bo.mainLoop.runner,0)}else s()&&(bo.mainLoop.currentFrameNumber=bo.mainLoop.currentFrameNumber+1|0,1==bo.mainLoop.timingMode&&bo.mainLoop.timingValue>1&&bo.mainLoop.currentFrameNumber%bo.mainLoop.timingValue!=0?bo.mainLoop.scheduler():(0==bo.mainLoop.timingMode&&(bo.mainLoop.tickStartTime=Vn()),"timeout"===bo.mainLoop.method&&o.ctx&&(O("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!"),bo.mainLoop.method=""),bo.mainLoop.runIter(e),ge(),s()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),bo.mainLoop.scheduler())))},i||(t&&t>0?go(0,1e3/t):go(1,1),bo.mainLoop.scheduler()),r)throw"unwind"}function vo(e,t){if(we||k)T("user callback triggered after runtime exited or application aborted. Ignoring.");else if(t)e();else try{e()}catch(e){tt(e)}}function _o(e,t){return setTimeout((function(){vo(e)}),t)}var bo={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){bo.mainLoop.scheduler=null,bo.mainLoop.currentlyRunningMainloop++},resume:function(){bo.mainLoop.currentlyRunningMainloop++;var e=bo.mainLoop.timingMode,t=bo.mainLoop.timingValue,r=bo.mainLoop.func;bo.mainLoop.func=null,yo(r,0,!1,bo.mainLoop.arg,!0),go(e,t),bo.mainLoop.scheduler()},updateStatus:function(){if(o.setStatus){var e=o.statusMessage||"Please wait...",t=bo.mainLoop.remainingBlockers,r=bo.mainLoop.expectedBlockers;t?t<r?o.setStatus(e+" ("+(r-t)+"/"+r+")"):o.setStatus(e):o.setStatus("")}},runIter:function(e){if(!k){if(o.preMainLoop&&!1===o.preMainLoop())return;vo(e),o.postMainLoop&&o.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(o.preloadPlugins||(o.preloadPlugins=[]),!bo.initted){bo.initted=!0;try{new Blob,bo.hasBlobConstructor=!0}catch(e){bo.hasBlobConstructor=!1,w("warning: no blob constructor, cannot create blobs with mimetypes")}bo.BlobBuilder="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:bo.hasBlobConstructor?null:w("warning: no BlobBuilder"),bo.URLObject="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,o.noImageDecoding||void 0!==bo.URLObject||(w("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(bo.hasBlobConstructor)try{(i=new Blob([e],{type:bo.getMimetype(t)})).size!==e.length&&(i=new Blob([new Uint8Array(e).buffer],{type:bo.getMimetype(t)}))}catch(e){O("Blob constructor present but fails: "+e+"; falling back to blob builder")}if(!i){var a=new bo.BlobBuilder;a.append(new Uint8Array(e).buffer),i=a.getBlob()}var s=bo.URLObject.createObjectURL(i);I("string"==typeof s,"createObjectURL must return a url as a string");var c=new Image;c.onload=()=>{I(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,bo.URLObject.revokeObjectURL(s),r&&r(e)},c.onerror=e=>{w("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(!bo.hasBlobConstructor)return s();try{var c=new Blob([e],{type:bo.getMimetype(t)})}catch(e){return s()}var u=bo.URLObject.createObjectURL(c);I("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||(w("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,_o((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){!bo.pointerLock&&o.canvas.requestPointerLock&&(o.canvas.requestPointerLock(),e.preventDefault())}),!1))}function n(){bo.pointerLock=document.pointerLockElement===o.canvas||document.mozPointerLockElement===o.canvas||document.webkitPointerLockElement===o.canvas||document.msPointerLockElement===o.canvas}},handledByPreloadPlugin:function(e,t,r,n){bo.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!==Mo&&(a=Mo.createContext(e,s))&&(i=Mo.getContext(a).GLctx)}else i=e.getContext("2d");return i?(r&&(t||I(void 0===Pd,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),o.ctx=i,t&&Mo.makeContextCurrent(a),o.useWebGL=t,bo.moduleContextCreatedCallbacks.forEach((function(e){e()})),bo.init()),i):null},destroyContext:function(e,t,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(e,t){bo.lockPointer=e,bo.resizeCanvas=t,void 0===bo.lockPointer&&(bo.lockPointer=!0),void 0===bo.resizeCanvas&&(bo.resizeCanvas=!1);var r=o.canvas;function n(){bo.isFullscreen=!1;var e=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(r.exitFullscreen=bo.exitFullscreen,bo.lockPointer&&r.requestPointerLock(),bo.isFullscreen=!0,bo.resizeCanvas?bo.setFullscreenCanvasSize():bo.updateCanvasDimensions(r)):(e.parentNode.insertBefore(r,e),e.parentNode.removeChild(e),bo.resizeCanvas?bo.setWindowedCanvasSize():bo.updateCanvasDimensions(r)),o.onFullScreen&&o.onFullScreen(bo.isFullscreen),o.onFullscreen&&o.onFullscreen(bo.isFullscreen)}bo.fullscreenHandlersInstalled||(bo.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(){He("Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)")},exitFullscreen:function(){return!!bo.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===bo.nextRAF)bo.nextRAF=t+1e3/60;else for(;t+2>=bo.nextRAF;)bo.nextRAF+=1e3/60;var r=Math.max(bo.nextRAF-t,0);setTimeout(e,r)},requestAnimationFrame:function(e){"function"!=typeof requestAnimationFrame?(0,bo.fakeRequestAnimationFrame)(e):requestAnimationFrame(e)},safeSetTimeout:function(e){return _o(e)},safeRequestAnimationFrame:function(e){return bo.requestAnimationFrame((function(){vo(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(bo.pointerLock)"mousemove"!=e.type&&"mozMovementX"in e?bo.mouseMovementX=bo.mouseMovementY=0:(bo.mouseMovementX=bo.getMovementX(e),bo.mouseMovementY=bo.getMovementY(e)),"undefined"!=typeof SDL?(bo.mouseX=SDL.mouseX+bo.mouseMovementX,bo.mouseY=SDL.mouseY+bo.mouseMovementY):(bo.mouseX+=bo.mouseMovementX,bo.mouseY+=bo.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(I(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)bo.lastTouches[s.identifier]=l,bo.touches[s.identifier]=l;else if("touchend"===e.type||"touchmove"===e.type){var d=bo.touches[s.identifier];d||(d=l),bo.lastTouches[s.identifier]=d,bo.touches[s.identifier]=l}return}var p=e.pageX-(i+t.left),f=e.pageY-(a+t.top);p*=r/t.width,f*=n/t.height,bo.mouseMovementX=p-bo.mouseX,bo.mouseMovementY=f-bo.mouseY,bo.mouseX=p,bo.mouseY=f}},resizeListeners:[],updateResizeListeners:function(){var e=o.canvas;bo.resizeListeners.forEach((function(t){t(e.width,e.height)}))},setCanvasSize:function(e,t,r){var n=o.canvas;bo.updateCanvasDimensions(n,e,t),r||bo.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if("undefined"!=typeof SDL){var e=z[SDL.screen>>2];e|=8388608,W[SDL.screen>>2]=e}bo.updateCanvasDimensions(o.canvas),bo.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var e=z[SDL.screen>>2];e&=-8388609,W[SDL.screen>>2]=e}bo.updateCanvasDimensions(o.canvas),bo.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)}bo.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"))))}},wo={errorCode:12288,defaultDisplayInitialized:!1,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:!1,depth:!1,stencil:!1,antialias:!1},stringCache:{},setErrorCode:function(e){wo.errorCode=e},chooseConfig:function(e,t,r,n,o){if(62e3!=e)return wo.setErrorCode(12296),0;if(t)for(;;){var i=W[t>>2];if(12321==i){var a=W[t+4>>2];wo.contextAttributes.alpha=a>0}else if(12325==i){var s=W[t+4>>2];wo.contextAttributes.depth=s>0}else if(12326==i){var c=W[t+4>>2];wo.contextAttributes.stencil=c>0}else if(12337==i){var u=W[t+4>>2];wo.contextAttributes.antialias=u>0}else if(12338==i)u=W[t+4>>2],wo.contextAttributes.antialias=1==u;else if(12544==i){var l=W[t+4>>2];wo.contextAttributes.lowLatency=12547!=l}else if(12344==i)break;t+=8}return r&&n||o?(o&&(W[o>>2]=1),r&&n>0&&(W[r>>2]=62002),wo.setErrorCode(12288),1):(wo.setErrorCode(12300),0)}};function To(e,t,r,n,o){return wo.chooseConfig(e,t,r,n,o)}function Oo(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 Do(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 Po(e){var t=e.getExtension("WEBGL_draw_buffers");if(t)return e.drawBuffers=function(e,r){t.drawBuffersWEBGL(e,r)},1}function xo(e){return!!(e.dibvbi=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function So(e){return!!(e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))}function Ro(e){return!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw"))}var Mo={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function(e){Mo.lastError||(Mo.lastError=e)},getNewId:function(e){for(var t=Mo.counter++,r=e.length;r<t;r++)e[r]=null;return t},getSource:function(e,t,r,n){for(var o="",i=0;i<t;++i){var a=n?W[n+4*i>>2]:-1;o+=N(W[r+4*i>>2],a<0?void 0:a)}return o},createContext:function(e,t){e.getContextSafariWebGL2Fixed||(e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=function(t,r){var n=e.getContextSafariWebGL2Fixed(t,r);return"webgl"==t==n instanceof WebGLRenderingContext?n:null});var r=t.majorVersion>1?e.getContext("webgl2",t):e.getContext("webgl",t);return r?Mo.registerContext(r,t):0},registerContext:function(e,t){var r=Mo.getNewId(Mo.contexts),n={handle:r,attributes:t,version:t.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),Mo.contexts[r]=n,(void 0===t.enableExtensionsByDefault||t.enableExtensionsByDefault)&&Mo.initExtensions(n),r},makeContextCurrent:function(e){return Mo.currentContext=Mo.contexts[e],o.ctx=Pd=Mo.currentContext&&Mo.currentContext.GLctx,!(e&&!Pd)},getContext:function(e){return Mo.contexts[e]},deleteContext:function(e){Mo.currentContext===Mo.contexts[e]&&(Mo.currentContext=null),"object"==typeof Vl&&Vl.removeAllHandlersOnTarget(Mo.contexts[e].GLctx.canvas),Mo.contexts[e]&&Mo.contexts[e].GLctx.canvas&&(Mo.contexts[e].GLctx.canvas.GLctxObject=void 0),Mo.contexts[e]=null},initExtensions:function(e){if(e||(e=Mo.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var t=e.GLctx;Oo(t),Do(t),Po(t),xo(t),So(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")),Ro(t),(t.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}};function Fo(e,t,r,n){if(62e3!=e)return wo.setErrorCode(12296),0;for(var i=1;;){var a=W[n>>2];if(12440!=a){if(12344==a)break;return wo.setErrorCode(12292),0}i=W[n+4>>2],n+=8}return i<2||i>3?(wo.setErrorCode(12293),0):(wo.contextAttributes.majorVersion=i-1,wo.contextAttributes.minorVersion=0,wo.context=Mo.createContext(o.canvas,wo.contextAttributes),0!=wo.context?(wo.setErrorCode(12288),Mo.makeContextCurrent(wo.context),o.useWebGL=!0,bo.moduleContextCreatedCallbacks.forEach((function(e){e()})),Mo.makeContextCurrent(null),62004):(wo.setErrorCode(12297),0))}function Ao(e,t,r,n){return 62e3!=e?(wo.setErrorCode(12296),0):62002!=t?(wo.setErrorCode(12293),0):(wo.setErrorCode(12288),62006)}function ko(e,t){return 62e3!=e?(wo.setErrorCode(12296),0):62004!=t?(wo.setErrorCode(12294),0):(Mo.deleteContext(wo.context),wo.setErrorCode(12288),wo.currentContext==t&&(wo.currentContext=0),1)}function Io(e,t){return 62e3!=e?(wo.setErrorCode(12296),0):62006!=t?(wo.setErrorCode(12301),1):(wo.currentReadSurface==t&&(wo.currentReadSurface=0),wo.currentDrawSurface==t&&(wo.currentDrawSurface=0),wo.setErrorCode(12288),1)}function Co(e,t,r,n){if(62e3!=e)return wo.setErrorCode(12296),0;if(62002!=t)return wo.setErrorCode(12293),0;if(!n)return wo.setErrorCode(12300),0;switch(wo.setErrorCode(12288),r){case 12320:return W[n>>2]=wo.contextAttributes.alpha?32:24,1;case 12321:return W[n>>2]=wo.contextAttributes.alpha?8:0,1;case 12322:case 12323:case 12324:return W[n>>2]=8,1;case 12325:return W[n>>2]=wo.contextAttributes.depth?24:0,1;case 12326:return W[n>>2]=wo.contextAttributes.stencil?8:0,1;case 12327:case 12335:case 12340:return W[n>>2]=12344,1;case 12328:return W[n>>2]=62002,1;case 12329:case 12333:case 12334:case 12345:case 12346:case 12347:case 12349:case 12350:case 12354:return W[n>>2]=0,1;case 12330:case 12332:return W[n>>2]=4096,1;case 12331:return W[n>>2]=16777216,1;case 12337:return W[n>>2]=wo.contextAttributes.antialias?4:0,1;case 12338:return W[n>>2]=wo.contextAttributes.antialias?1:0,1;case 12339:case 12352:return W[n>>2]=4,1;case 12341:case 12342:case 12343:return W[n>>2]=-1,1;case 12348:return W[n>>2]=1,1;case 12351:return W[n>>2]=12430,1;default:return wo.setErrorCode(12292),0}}function Uo(e){return wo.setErrorCode(12288),62e3}function No(){return wo.errorCode}function jo(e,t,r){return 62e3==e?(t&&(W[t>>2]=1),r&&(W[r>>2]=4),wo.defaultDisplayInitialized=!0,wo.setErrorCode(12288),1):(wo.setErrorCode(12296),0)}function Lo(e,t,r,n){return 62e3!=e?(wo.setErrorCode(12296),0):0!=n&&62004!=n?(wo.setErrorCode(12294),0):0!=r&&62006!=r||0!=t&&62006!=t?(wo.setErrorCode(12301),0):(Mo.makeContextCurrent(n?wo.context:null),wo.currentContext=n,wo.currentDrawSurface=t,wo.currentReadSurface=r,wo.setErrorCode(12288),1)}function Ho(){if(wo.defaultDisplayInitialized)if(o.ctx){if(!o.ctx.isContextLost())return wo.setErrorCode(12288),1;wo.setErrorCode(12302)}else wo.setErrorCode(12290);else wo.setErrorCode(12289);return 0}function Bo(e){return 62e3!=e?(wo.setErrorCode(12296),0):(wo.currentContext=0,wo.currentReadSurface=0,wo.currentDrawSurface=0,wo.defaultDisplayInitialized=!1,wo.setErrorCode(12288),1)}function Xo(e){I("number"==typeof e),console.error(N(e))}function Qo(e){I("number"==typeof e),console.log(N(e))}function Go(e){I("number"==typeof e),console.warn(N(e))}function qo(){}function Wo(){return 2147483648}function zo(e){Pd.activeTexture(e)}function Vo(e,t){Pd.attachShader(Mo.programs[e],Mo.shaders[t])}function Yo(e,t){Pd.beginQuery(e,Mo.queries[t])}function $o(e,t){Pd.disjointTimerQueryExt.beginQueryEXT(e,Mo.queries[t])}function Ko(e){Pd.beginTransformFeedback(e)}function Zo(e,t,r){Pd.bindAttribLocation(Mo.programs[e],t,N(r))}function Jo(e,t){35051==e?Pd.currentPixelPackBufferBinding=t:35052==e&&(Pd.currentPixelUnpackBufferBinding=t),Pd.bindBuffer(e,Mo.buffers[t])}function ei(e,t,r){Pd.bindBufferBase(e,t,Mo.buffers[r])}function ti(e,t,r,n,o){Pd.bindBufferRange(e,t,Mo.buffers[r],n,o)}function ri(e,t){Pd.bindFramebuffer(e,Mo.framebuffers[t])}function ni(e,t){Pd.bindRenderbuffer(e,Mo.renderbuffers[t])}function oi(e,t){Pd.bindSampler(e,Mo.samplers[t])}function ii(e,t){Pd.bindTexture(e,Mo.textures[t])}function ai(e,t){Pd.bindTransformFeedback(e,Mo.transformFeedbacks[t])}function si(e){Pd.bindVertexArray(Mo.vaos[e])}function ci(e){Pd.bindVertexArray(Mo.vaos[e])}function ui(e,t,r,n){Pd.blendColor(e,t,r,n)}function li(e){Pd.blendEquation(e)}function di(e,t){Pd.blendEquationSeparate(e,t)}function pi(e,t){Pd.blendFunc(e,t)}function fi(e,t,r,n){Pd.blendFuncSeparate(e,t,r,n)}function mi(e,t,r,n,o,i,a,s,c,u){Pd.blitFramebuffer(e,t,r,n,o,i,a,s,c,u)}function gi(e,t,r,n){Mo.currentContext.version>=2?r?Pd.bufferData(e,Q,n,r,t):Pd.bufferData(e,t,n):Pd.bufferData(e,r?Q.subarray(r,r+t):t,n)}function hi(e,t,r,n){Mo.currentContext.version>=2?Pd.bufferSubData(e,t,Q,n,r):Pd.bufferSubData(e,t,Q.subarray(n,n+r))}function Ei(e){return Pd.checkFramebufferStatus(e)}function yi(e){Pd.clear(e)}function vi(e,t,r,n){Pd.clearBufferfi(e,t,r,n)}function _i(e,t,r){Pd.clearBufferfv(e,t,V,r>>2)}function bi(e,t,r){Pd.clearBufferiv(e,t,W,r>>2)}function wi(e,t,r){Pd.clearBufferuiv(e,t,z,r>>2)}function Ti(e,t,r,n){Pd.clearColor(e,t,r,n)}function Oi(e){Pd.clearDepth(e)}function Di(e){Pd.clearStencil(e)}function Pi(e,t){return I(t===(0|t)),(e>>>0)+4294967296*t}function xi(e,t,r,n){return Pd.clientWaitSync(Mo.syncs[e],t,Pi(r,n))}function Si(e,t,r,n){Pd.colorMask(!!e,!!t,!!r,!!n)}function Ri(e){Pd.compileShader(Mo.shaders[e])}function Mi(e,t,r,n,o,i,a,s){Mo.currentContext.version>=2?Pd.currentPixelUnpackBufferBinding?Pd.compressedTexImage2D(e,t,r,n,o,i,a,s):Pd.compressedTexImage2D(e,t,r,n,o,i,Q,s,a):Pd.compressedTexImage2D(e,t,r,n,o,i,s?Q.subarray(s,s+a):null)}function Fi(e,t,r,n,o,i,a,s,c){Pd.currentPixelUnpackBufferBinding?Pd.compressedTexImage3D(e,t,r,n,o,i,a,s,c):Pd.compressedTexImage3D(e,t,r,n,o,i,a,Q,c,s)}function Ai(e,t,r,n,o,i,a,s,c){Mo.currentContext.version>=2?Pd.currentPixelUnpackBufferBinding?Pd.compressedTexSubImage2D(e,t,r,n,o,i,a,s,c):Pd.compressedTexSubImage2D(e,t,r,n,o,i,a,Q,c,s):Pd.compressedTexSubImage2D(e,t,r,n,o,i,a,c?Q.subarray(c,c+s):null)}function ki(e,t,r,n,o,i,a,s,c,u,l){Pd.currentPixelUnpackBufferBinding?Pd.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,u,l):Pd.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,Q,l,u)}function Ii(e,t,r,n,o){Pd.copyBufferSubData(e,t,r,n,o)}function Ci(e,t,r,n,o,i,a,s){Pd.copyTexImage2D(e,t,r,n,o,i,a,s)}function Ui(e,t,r,n,o,i,a,s){Pd.copyTexSubImage2D(e,t,r,n,o,i,a,s)}function Ni(e,t,r,n,o,i,a,s,c){Pd.copyTexSubImage3D(e,t,r,n,o,i,a,s,c)}function ji(){var e=Mo.getNewId(Mo.programs),t=Pd.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,Mo.programs[e]=t,e}function Li(e){var t=Mo.getNewId(Mo.shaders);return Mo.shaders[t]=Pd.createShader(e),t}function Hi(e){Pd.cullFace(e)}function Bi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=Mo.buffers[n];o&&(Pd.deleteBuffer(o),o.name=0,Mo.buffers[n]=null,n==Pd.currentPixelPackBufferBinding&&(Pd.currentPixelPackBufferBinding=0),n==Pd.currentPixelUnpackBufferBinding&&(Pd.currentPixelUnpackBufferBinding=0))}}function Xi(e,t){for(var r=0;r<e;++r){var n=W[t+4*r>>2],o=Mo.framebuffers[n];o&&(Pd.deleteFramebuffer(o),o.name=0,Mo.framebuffers[n]=null)}}function Qi(e){if(e){var t=Mo.programs[e];t?(Pd.deleteProgram(t),t.name=0,Mo.programs[e]=null):Mo.recordError(1281)}}function Gi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=Mo.queries[n];o&&(Pd.deleteQuery(o),Mo.queries[n]=null)}}function qi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=Mo.queries[n];o&&(Pd.disjointTimerQueryExt.deleteQueryEXT(o),Mo.queries[n]=null)}}function Wi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=Mo.renderbuffers[n];o&&(Pd.deleteRenderbuffer(o),o.name=0,Mo.renderbuffers[n]=null)}}function zi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=Mo.samplers[n];o&&(Pd.deleteSampler(o),o.name=0,Mo.samplers[n]=null)}}function Vi(e){if(e){var t=Mo.shaders[e];t?(Pd.deleteShader(t),Mo.shaders[e]=null):Mo.recordError(1281)}}function Yi(e){if(e){var t=Mo.syncs[e];t?(Pd.deleteSync(t),t.name=0,Mo.syncs[e]=null):Mo.recordError(1281)}}function $i(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=Mo.textures[n];o&&(Pd.deleteTexture(o),o.name=0,Mo.textures[n]=null)}}function Ki(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=Mo.transformFeedbacks[n];o&&(Pd.deleteTransformFeedback(o),o.name=0,Mo.transformFeedbacks[n]=null)}}function Zi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2];Pd.deleteVertexArray(Mo.vaos[n]),Mo.vaos[n]=null}}function Ji(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2];Pd.deleteVertexArray(Mo.vaos[n]),Mo.vaos[n]=null}}function ea(e){Pd.depthFunc(e)}function ta(e){Pd.depthMask(!!e)}function ra(e,t){Pd.depthRange(e,t)}function na(e,t){Pd.detachShader(Mo.programs[e],Mo.shaders[t])}function oa(e){Pd.disable(e)}function ia(e){Pd.disableVertexAttribArray(e)}function aa(e,t,r){Pd.drawArrays(e,t,r)}function sa(e,t,r,n){Pd.drawArraysInstanced(e,t,r,n)}function ca(e,t,r,n){Pd.drawArraysInstanced(e,t,r,n)}function ua(e,t,r,n){Pd.drawArraysInstanced(e,t,r,n)}function la(e,t,r,n,o){Pd.dibvbi.drawArraysInstancedBaseInstanceWEBGL(e,t,r,n,o)}function da(e,t,r,n){Pd.drawArraysInstanced(e,t,r,n)}function pa(e,t,r,n){Pd.drawArraysInstanced(e,t,r,n)}var fa=[];function ma(e,t){for(var r=fa[e],n=0;n<e;n++)r[n]=W[t+4*n>>2];Pd.drawBuffers(r)}function ga(e,t){for(var r=fa[e],n=0;n<e;n++)r[n]=W[t+4*n>>2];Pd.drawBuffers(r)}function ha(e,t){for(var r=fa[e],n=0;n<e;n++)r[n]=W[t+4*n>>2];Pd.drawBuffers(r)}function Ea(e,t,r,n){Pd.drawElements(e,t,r,n)}function ya(e,t,r,n,o){Pd.drawElementsInstanced(e,t,r,n,o)}function va(e,t,r,n,o){Pd.drawElementsInstanced(e,t,r,n,o)}function _a(e,t,r,n,o){Pd.drawElementsInstanced(e,t,r,n,o)}function ba(e,t,r,n,o,i,a){Pd.dibvbi.drawElementsInstancedBaseVertexBaseInstanceWEBGL(e,t,r,n,o,i,a)}function wa(e,t,r,n,o){Pd.drawElementsInstanced(e,t,r,n,o)}function Ta(e,t,r,n,o){Pd.drawElementsInstanced(e,t,r,n,o)}function Oa(e,t,r,n){Pd.drawElements(e,t,r,n)}function Da(e,t,r,n,o,i){Oa(e,n,o,i)}function Pa(e){Pd.enable(e)}function xa(e){Pd.enableVertexAttribArray(e)}function Sa(e){Pd.endQuery(e)}function Ra(e){Pd.disjointTimerQueryExt.endQueryEXT(e)}function Ma(){Pd.endTransformFeedback()}function Fa(e,t){var r=Pd.fenceSync(e,t);if(r){var n=Mo.getNewId(Mo.syncs);return r.name=n,Mo.syncs[n]=r,n}return 0}function Aa(){Pd.finish()}function ka(){Pd.flush()}function Ia(e,t,r,n){Pd.framebufferRenderbuffer(e,t,r,Mo.renderbuffers[n])}function Ca(e,t,r,n,o){Pd.framebufferTexture2D(e,t,r,Mo.textures[n],o)}function Ua(e,t,r,n,o){Pd.framebufferTextureLayer(e,t,Mo.textures[r],n,o)}function Na(e){Pd.frontFace(e)}function ja(e,t,r,n){for(var o=0;o<e;o++){var i=Pd[r](),a=i&&Mo.getNewId(n);i?(i.name=a,n[a]=i):Mo.recordError(1282),W[t+4*o>>2]=a}}function La(e,t){ja(e,t,"createBuffer",Mo.buffers)}function Ha(e,t){ja(e,t,"createFramebuffer",Mo.framebuffers)}function Ba(e,t){ja(e,t,"createQuery",Mo.queries)}function Xa(e,t){for(var r=0;r<e;r++){var n=Pd.disjointTimerQueryExt.createQueryEXT();if(!n){for(Mo.recordError(1282);r<e;)W[t+4*r++>>2]=0;return}var o=Mo.getNewId(Mo.queries);n.name=o,Mo.queries[o]=n,W[t+4*r>>2]=o}}function Qa(e,t){ja(e,t,"createRenderbuffer",Mo.renderbuffers)}function Ga(e,t){ja(e,t,"createSampler",Mo.samplers)}function qa(e,t){ja(e,t,"createTexture",Mo.textures)}function Wa(e,t){ja(e,t,"createTransformFeedback",Mo.transformFeedbacks)}function za(e,t){ja(e,t,"createVertexArray",Mo.vaos)}function Va(e,t){ja(e,t,"createVertexArray",Mo.vaos)}function Ya(e){Pd.generateMipmap(e)}function $a(e,t,r,n,o,i,a,s){t=Mo.programs[t];var c=Pd[e](t,r);if(c){var u=s&&L(c.name,s,n);o&&(W[o>>2]=u),i&&(W[i>>2]=c.size),a&&(W[a>>2]=c.type)}}function Ka(e,t,r,n,o,i,a){$a("getActiveAttrib",e,t,r,n,o,i,a)}function Za(e,t,r,n,o,i,a){$a("getActiveUniform",e,t,r,n,o,i,a)}function Ja(e,t,r,n,o){e=Mo.programs[e];var i=Pd.getActiveUniformBlockName(e,t);if(i)if(o&&r>0){var a=L(i,o,r);n&&(W[n>>2]=a)}else n&&(W[n>>2]=0)}function es(e,t,r,n){if(n)if(e=Mo.programs[e],35393!=r){var o=Pd.getActiveUniformBlockParameter(e,t,r);if(null!==o)if(35395==r)for(var i=0;i<o.length;i++)W[n+4*i>>2]=o[i];else W[n>>2]=o}else{var a=Pd.getActiveUniformBlockName(e,t);W[n>>2]=a.length+1}else Mo.recordError(1281)}function ts(e,t,r,n,o){if(o)if(t>0&&0==r)Mo.recordError(1281);else{e=Mo.programs[e];for(var i=[],a=0;a<t;a++)i.push(W[r+4*a>>2]);var s=Pd.getActiveUniforms(e,i,n);if(s){var c=s.length;for(a=0;a<c;a++)W[o+4*a>>2]=s[a]}}else Mo.recordError(1281)}function rs(e,t,r,n){var o=Pd.getAttachedShaders(Mo.programs[e]),i=o.length;i>t&&(i=t),W[r>>2]=i;for(var a=0;a<i;++a){var s=Mo.shaders.indexOf(o[a]);W[n+4*a>>2]=s}}function ns(e,t){return Pd.getAttribLocation(Mo.programs[e],N(t))}function os(e){return z[e>>2]+4294967296*W[e+4>>2]}function is(e){return z[e>>2]+4294967296*z[e+4>>2]}function as(e,t){z[e>>2]=t,z[e+4>>2]=(t-z[e>>2])/4294967296;var r=t>=0?is(e):os(e);r!=t&&O("writeI53ToI64() out of range: serialized JS Number "+t+" to Wasm heap as bytes lo=0x"+z[e>>2].toString(16)+", hi=0x"+z[e+4>>2].toString(16)+", which deserializes back to "+r+" instead!")}function ss(e,t,r){if(t){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=r&&1!=r&&Mo.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var o=Pd.getParameter(34467);n=o?o.length:0;break;case 33309:if(Mo.currentContext.version<2)return void Mo.recordError(1282);n=2*(Pd.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(Mo.currentContext.version<2)return void Mo.recordError(1280);n=33307==e?3:0}if(void 0===n){var i=Pd.getParameter(e);switch(typeof i){case"number":n=i;break;case"boolean":n=i?1:0;break;case"string":return void Mo.recordError(1280);case"object":if(null===i)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:n=0;break;default:return void Mo.recordError(1280)}else{if(i instanceof Float32Array||i instanceof Uint32Array||i instanceof Int32Array||i instanceof Array){for(var a=0;a<i.length;++a)switch(r){case 0:W[t+4*a>>2]=i[a];break;case 2:V[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 Mo.recordError(1280),void T("GL_INVALID_ENUM in glGet"+r+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+t+")")}}break;default:return Mo.recordError(1280),void T("GL_INVALID_ENUM in glGet"+r+"v: Native code calling glGet"+r+"v("+e+") and it returns "+i+" of type "+typeof i+"!")}}switch(r){case 1:as(t,n);break;case 0:W[t>>2]=n;break;case 2:V[t>>2]=n;break;case 4:X[t>>0]=n?1:0}}else Mo.recordError(1281)}function cs(e,t){ss(e,t,4)}function us(e,t,r){r?as(r,Pd.getBufferParameter(e,t)):Mo.recordError(1281)}function ls(e,t,r){r?W[r>>2]=Pd.getBufferParameter(e,t):Mo.recordError(1281)}function ds(){var e=Pd.getError()||Mo.lastError;return Mo.lastError=0,e}function ps(e,t){ss(e,t,2)}function fs(e,t){return Pd.getFragDataLocation(Mo.programs[e],N(t))}function ms(e,t,r,n){var o=Pd.getFramebufferAttachmentParameter(e,t,r);(o instanceof WebGLRenderbuffer||o instanceof WebGLTexture)&&(o=0|o.name),W[n>>2]=o}function gs(e,t,r,n){if(r){var o,i=Pd.getIndexedParameter(e,t);switch(typeof i){case"boolean":o=i?1:0;break;case"number":o=i;break;case"object":if(null===i)switch(e){case 35983:case 35368:o=0;break;default:return void Mo.recordError(1280)}else{if(!(i instanceof WebGLBuffer))return void Mo.recordError(1280);o=0|i.name}break;default:return void Mo.recordError(1280)}switch(n){case 1:as(r,o);break;case 0:W[r>>2]=o;break;case 2:V[r>>2]=o;break;case 4:X[r>>0]=o?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+n}}else Mo.recordError(1281)}function hs(e,t,r){gs(e,t,r,1)}function Es(e,t){ss(e,t,1)}function ys(e,t,r){gs(e,t,r,0)}function vs(e,t){ss(e,t,0)}function _s(e,t,r,n,o){if(n<0)Mo.recordError(1281);else if(o){var i=Pd.getInternalformatParameter(e,t,r);if(null!==i)for(var a=0;a<i.length&&a<n;++a)W[o+4*a>>2]=i[a]}else Mo.recordError(1281)}function bs(e,t,r,n,o){Mo.recordError(1282)}function ws(e,t,r,n){var o=Pd.getProgramInfoLog(Mo.programs[e]);null===o&&(o="(unknown error)");var i=t>0&&n?L(o,n,t):0;r&&(W[r>>2]=i)}function Ts(e,t,r){if(r)if(e>=Mo.counter)Mo.recordError(1281);else if(e=Mo.programs[e],35716==t){var n=Pd.getProgramInfoLog(e);null===n&&(n="(unknown error)"),W[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var o=0;o<Pd.getProgramParameter(e,35718);++o)e.maxUniformLength=Math.max(e.maxUniformLength,Pd.getActiveUniform(e,o).name.length+1);W[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(o=0;o<Pd.getProgramParameter(e,35721);++o)e.maxAttributeLength=Math.max(e.maxAttributeLength,Pd.getActiveAttrib(e,o).name.length+1);W[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(o=0;o<Pd.getProgramParameter(e,35382);++o)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,Pd.getActiveUniformBlockName(e,o).length+1);W[r>>2]=e.maxUniformBlockNameLength}else W[r>>2]=Pd.getProgramParameter(e,t);else Mo.recordError(1281)}function Os(e,t,r){if(r){var n,o=Mo.queries[e];as(r,"boolean"==typeof(n=Mo.currentContext.version<2?Pd.disjointTimerQueryExt.getQueryObjectEXT(o,t):Pd.getQueryParameter(o,t))?n?1:0:n)}else Mo.recordError(1281)}function Ds(e,t,r){if(r){var n,o=Mo.queries[e],i=Pd.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,W[r>>2]=n}else Mo.recordError(1281)}function Ps(e,t,r){if(r){var n,o=Mo.queries[e];as(r,"boolean"==typeof(n=Mo.currentContext.version<2?Pd.disjointTimerQueryExt.getQueryObjectEXT(o,t):Pd.getQueryParameter(o,t))?n?1:0:n)}else Mo.recordError(1281)}function xs(e,t,r){if(r){var n,o=Mo.queries[e],i=Pd.getQueryParameter(o,t);n="boolean"==typeof i?i?1:0:i,W[r>>2]=n}else Mo.recordError(1281)}function Ss(e,t,r){if(r){var n,o=Mo.queries[e],i=Pd.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,W[r>>2]=n}else Mo.recordError(1281)}function Rs(e,t,r){r?W[r>>2]=Pd.getQuery(e,t):Mo.recordError(1281)}function Ms(e,t,r){r?W[r>>2]=Pd.disjointTimerQueryExt.getQueryEXT(e,t):Mo.recordError(1281)}function Fs(e,t,r){r?W[r>>2]=Pd.getRenderbufferParameter(e,t):Mo.recordError(1281)}function As(e,t,r){r?V[r>>2]=Pd.getSamplerParameter(Mo.samplers[e],t):Mo.recordError(1281)}function ks(e,t,r){r?W[r>>2]=Pd.getSamplerParameter(Mo.samplers[e],t):Mo.recordError(1281)}function Is(e,t,r,n){var o=Pd.getShaderInfoLog(Mo.shaders[e]);null===o&&(o="(unknown error)");var i=t>0&&n?L(o,n,t):0;r&&(W[r>>2]=i)}function Cs(e,t,r,n){var o=Pd.getShaderPrecisionFormat(e,t);W[r>>2]=o.rangeMin,W[r+4>>2]=o.rangeMax,W[n>>2]=o.precision}function Us(e,t,r,n){var o=Pd.getShaderSource(Mo.shaders[e]);if(o){var i=t>0&&n?L(o,n,t):0;r&&(W[r>>2]=i)}}function Ns(e,t,r){if(r)if(35716==t){var n=Pd.getShaderInfoLog(Mo.shaders[e]);null===n&&(n="(unknown error)");var o=n?n.length+1:0;W[r>>2]=o}else if(35720==t){var i=Pd.getShaderSource(Mo.shaders[e]),a=i?i.length+1:0;W[r>>2]=a}else W[r>>2]=Pd.getShaderParameter(Mo.shaders[e],t);else Mo.recordError(1281)}function js(e){var t=H(e)+1,r=Ud(t);return L(e,r,t),r}function Ls(e){var t=Mo.stringCache[e];if(!t){switch(e){case 7939:var r=Pd.getSupportedExtensions()||[];t=js((r=r.concat(r.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=Pd.getParameter(e);n||Mo.recordError(1280),t=n&&js(n);break;case 7938:var o=Pd.getParameter(7938);t=js(o=Mo.currentContext.version>=2?"OpenGL ES 3.0 ("+o+")":"OpenGL ES 2.0 ("+o+")");break;case 35724:var i=Pd.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=js(i);break;default:Mo.recordError(1280)}Mo.stringCache[e]=t}return t}function Hs(e,t){if(Mo.currentContext.version<2)return Mo.recordError(1282),0;var r=Mo.stringiCache[e];if(r)return t<0||t>=r.length?(Mo.recordError(1281),0):r[t];if(7939===e){var n=Pd.getSupportedExtensions()||[];return n=(n=n.concat(n.map((function(e){return"GL_"+e})))).map((function(e){return js(e)})),r=Mo.stringiCache[e]=n,t<0||t>=r.length?(Mo.recordError(1281),0):r[t]}return Mo.recordError(1280),0}function Bs(e,t,r,n,o){if(r<0)Mo.recordError(1281);else if(o){var i=Pd.getSyncParameter(Mo.syncs[e],t);null!==i&&(W[o>>2]=i,n&&(W[n>>2]=1))}else Mo.recordError(1281)}function Xs(e,t,r){r?V[r>>2]=Pd.getTexParameter(e,t):Mo.recordError(1281)}function Qs(e,t,r){r?W[r>>2]=Pd.getTexParameter(e,t):Mo.recordError(1281)}function Gs(e,t,r,n,o,i,a){e=Mo.programs[e];var s=Pd.getTransformFeedbackVarying(e,t);if(s){if(a&&r>0){var c=L(s.name,a,r);n&&(W[n>>2]=c)}else n&&(W[n>>2]=0);o&&(W[o>>2]=s.size),i&&(W[i>>2]=s.type)}}function qs(e,t){return Pd.getUniformBlockIndex(Mo.programs[e],N(t))}function Ws(e,t,r,n){if(n)if(t>0&&(0==r||0==n))Mo.recordError(1281);else{e=Mo.programs[e];for(var o=[],i=0;i<t;i++)o.push(N(W[r+4*i>>2]));var a=Pd.getUniformIndices(e,o);if(a){var s=a.length;for(i=0;i<s;i++)W[n+4*i>>2]=a[i]}}else Mo.recordError(1281)}function zs(e){return parseInt(e)}function Vs(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function Ys(e){var t,r,n=e.uniformLocsById,o=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},t=0;t<Pd.getProgramParameter(e,35718);++t){var i=Pd.getActiveUniform(e,t),a=i.name,s=i.size,c=Vs(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 $s(e,t){if(t=N(t),e=Mo.programs[e]){Ys(e);var r=e.uniformLocsById,n=0,o=t,i=Vs(t);i>0&&(n=zs(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]||Pd.getUniformLocation(e,t)))return n}else Mo.recordError(1281);return-1}function Ks(e){var t=Pd.currentProgram;if(t){var r=t.uniformLocsById[e];return"number"==typeof r&&(t.uniformLocsById[e]=r=Pd.getUniformLocation(t,t.uniformArrayNamesById[e]+(r>0?"["+r+"]":""))),r}Mo.recordError(1282)}function Zs(e,t,r,n){if(r){Ys(e=Mo.programs[e]);var o=Pd.getUniform(e,Ks(t));if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:W[r>>2]=o;break;case 2:V[r>>2]=o}else for(var i=0;i<o.length;i++)switch(n){case 0:W[r+4*i>>2]=o[i];break;case 2:V[r+4*i>>2]=o[i]}}else Mo.recordError(1281)}function Js(e,t,r){Zs(e,t,r,2)}function ec(e,t,r){Zs(e,t,r,0)}function tc(e,t,r){Zs(e,t,r,0)}function rc(e,t,r,n){if(r){var o=Pd.getVertexAttrib(e,t);if(34975==t)W[r>>2]=o&&o.name;else if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:W[r>>2]=o;break;case 2:V[r>>2]=o;break;case 5:W[r>>2]=Math.fround(o)}else for(var i=0;i<o.length;i++)switch(n){case 0:W[r+4*i>>2]=o[i];break;case 2:V[r+4*i>>2]=o[i];break;case 5:W[r+4*i>>2]=Math.fround(o[i])}}else Mo.recordError(1281)}function nc(e,t,r){rc(e,t,r,0)}function oc(e,t,r){rc(e,t,r,0)}function ic(e,t,r){r?W[r>>2]=Pd.getVertexAttribOffset(e,t):Mo.recordError(1281)}function ac(e,t,r){rc(e,t,r,2)}function sc(e,t,r){rc(e,t,r,5)}function cc(e,t){Pd.hint(e,t)}function uc(e,t,r){for(var n=fa[t],o=0;o<t;o++)n[o]=W[r+4*o>>2];Pd.invalidateFramebuffer(e,n)}function lc(e,t,r,n,o,i,a){for(var s=fa[t],c=0;c<t;c++)s[c]=W[r+4*c>>2];Pd.invalidateSubFramebuffer(e,s,n,o,i,a)}function dc(e){var t=Mo.buffers[e];return t?Pd.isBuffer(t):0}function pc(e){return Pd.isEnabled(e)}function fc(e){var t=Mo.framebuffers[e];return t?Pd.isFramebuffer(t):0}function mc(e){return(e=Mo.programs[e])?Pd.isProgram(e):0}function gc(e){var t=Mo.queries[e];return t?Pd.isQuery(t):0}function hc(e){var t=Mo.queries[e];return t?Pd.disjointTimerQueryExt.isQueryEXT(t):0}function Ec(e){var t=Mo.renderbuffers[e];return t?Pd.isRenderbuffer(t):0}function yc(e){var t=Mo.samplers[e];return t?Pd.isSampler(t):0}function vc(e){var t=Mo.shaders[e];return t?Pd.isShader(t):0}function _c(e){return Pd.isSync(Mo.syncs[e])}function bc(e){var t=Mo.textures[e];return t?Pd.isTexture(t):0}function wc(e){return Pd.isTransformFeedback(Mo.transformFeedbacks[e])}function Tc(e){var t=Mo.vaos[e];return t?Pd.isVertexArray(t):0}function Oc(e){var t=Mo.vaos[e];return t?Pd.isVertexArray(t):0}function Dc(e){Pd.lineWidth(e)}function Pc(e){e=Mo.programs[e],Pd.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function xc(e,t,r,n,o,i){Pd.mdibvbi.multiDrawArraysInstancedBaseInstanceWEBGL(e,W,t>>2,W,r>>2,W,n>>2,z,o>>2,i)}function Sc(e,t,r,n,o,i,a,s){Pd.mdibvbi.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(e,W,t>>2,r,W,n>>2,W,o>>2,W,i>>2,z,a>>2,s)}function Rc(){Pd.pauseTransformFeedback()}function Mc(e,t){3317==e&&(Mo.unpackAlignment=t),Pd.pixelStorei(e,t)}function Fc(e,t){Pd.polygonOffset(e,t)}function Ac(e,t,r,n){Mo.recordError(1280)}function kc(e,t,r){Mo.recordError(1280)}function Ic(e,t){Pd.disjointTimerQueryExt.queryCounterEXT(Mo.queries[e],t)}function Cc(e){Pd.readBuffer(e)}function Uc(e,t,r,n){var o;return t*(e*r+(o=n)-1&-o)}function Nc(e){return{5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[e-6402]||1}function jc(e){return 0==(e-=5120)?X:1==e?Q:2==e?G:4==e?W:6==e?V:5==e||28922==e||28520==e||30779==e||30782==e?z:q}function Lc(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function Hc(e,t,r,n,o,i){var a=jc(e),s=Lc(a),c=1<<s,u=Uc(r,n,Nc(t)*c,Mo.unpackAlignment);return a.subarray(o>>s,o+u>>s)}function Bc(e,t,r,n,o,i,a){if(Mo.currentContext.version>=2)if(Pd.currentPixelPackBufferBinding)Pd.readPixels(e,t,r,n,o,i,a);else{var s=jc(i);Pd.readPixels(e,t,r,n,o,i,s,a>>Lc(s))}else{var c=Hc(i,o,r,n,a);c?Pd.readPixels(e,t,r,n,o,i,c):Mo.recordError(1280)}}function Xc(){}function Qc(e,t,r,n){Pd.renderbufferStorage(e,t,r,n)}function Gc(e,t,r,n,o){Pd.renderbufferStorageMultisample(e,t,r,n,o)}function qc(){Pd.resumeTransformFeedback()}function Wc(e,t){Pd.sampleCoverage(e,!!t)}function zc(e,t,r){Pd.samplerParameterf(Mo.samplers[e],t,r)}function Vc(e,t,r){var n=V[r>>2];Pd.samplerParameterf(Mo.samplers[e],t,n)}function Yc(e,t,r){Pd.samplerParameteri(Mo.samplers[e],t,r)}function $c(e,t,r){var n=W[r>>2];Pd.samplerParameteri(Mo.samplers[e],t,n)}function Kc(e,t,r,n){Pd.scissor(e,t,r,n)}function Zc(){Mo.recordError(1280)}function Jc(e,t,r,n){var o=Mo.getSource(e,t,r,n);if(Mo.currentContext.version>=2&&o.includes("#version 100")){var i="";(o=(o=o.replace(/#extension GL_OES_standard_derivatives : enable/g,"")).replace(/#extension GL_EXT_shader_texture_lod : enable/g,"")).includes("gl_FragColor")&&(i+="out mediump vec4 GL_FragColor;\n",o=o.replace(/gl_FragColor/g,"GL_FragColor")),o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o.includes("attribute")?(o=o.replace(/attribute/g,"in")).replace(/varying/g,"out"):o.replace(/varying/g,"in")).replace(/textureCubeLodEXT/g,"textureCubeLod")).replace(/texture2DLodEXT/g,"texture2DLod")).replace(/texture2DProjLodEXT/g,"texture2DProjLod")).replace(/texture2DGradEXT/g,"texture2DGrad")).replace(/texture2DProjGradEXT/g,"texture2DProjGrad")).replace(/textureCubeGradEXT/g,"textureCubeGrad")).replace(/textureCube/g,"texture")).replace(/texture1D/g,"texture")).replace(/texture2D/g,"texture")).replace(/texture3D/g,"texture")).replace(/#version 100/g,"#version 300 es\n"+i)}Pd.shaderSource(Mo.shaders[e],o)}function eu(e,t,r){Pd.stencilFunc(e,t,r)}function tu(e,t,r,n){Pd.stencilFuncSeparate(e,t,r,n)}function ru(e){Pd.stencilMask(e)}function nu(e,t){Pd.stencilMaskSeparate(e,t)}function ou(e,t,r){Pd.stencilOp(e,t,r)}function iu(e,t,r,n){Pd.stencilOpSeparate(e,t,r,n)}function au(e,t,r,n,o,i,a,s,c){if(Mo.currentContext.version>=2&&(6402==a&&6402==r&&5125==s&&(r=33190),36193==s&&(s=5131,6408==a&&6408==r&&(r=34842)),34041==r&&(r=35056)),Mo.currentContext.version>=2)if(Pd.currentPixelUnpackBufferBinding)Pd.texImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=jc(s);Pd.texImage2D(e,t,r,n,o,i,a,s,u,c>>Lc(u))}else Pd.texImage2D(e,t,r,n,o,i,a,s,null);else Pd.texImage2D(e,t,r,n,o,i,a,s,c?Hc(s,a,n,o,c):null)}function su(e,t,r,n,o,i,a,s,c,u){if(Pd.currentPixelUnpackBufferBinding)Pd.texImage3D(e,t,r,n,o,i,a,s,c,u);else if(u){var l=jc(c);Pd.texImage3D(e,t,r,n,o,i,a,s,c,l,u>>Lc(l))}else Pd.texImage3D(e,t,r,n,o,i,a,s,c,null)}function cu(e,t,r){Pd.texParameterf(e,t,r)}function uu(e,t,r){var n=V[r>>2];Pd.texParameterf(e,t,n)}function lu(e,t,r){Pd.texParameteri(e,t,r)}function du(e,t,r){var n=W[r>>2];Pd.texParameteri(e,t,n)}function pu(e,t,r,n,o){Pd.texStorage2D(e,t,r,n,o)}function fu(e,t,r,n,o,i){Pd.texStorage3D(e,t,r,n,o,i)}function mu(e,t,r,n,o,i,a,s,c){if(Mo.currentContext.version>=2&&36193==s&&(s=5131),Mo.currentContext.version>=2)if(Pd.currentPixelUnpackBufferBinding)Pd.texSubImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=jc(s);Pd.texSubImage2D(e,t,r,n,o,i,a,s,u,c>>Lc(u))}else Pd.texSubImage2D(e,t,r,n,o,i,a,s,null);else{var l=null;c&&(l=Hc(s,a,o,i,c)),Pd.texSubImage2D(e,t,r,n,o,i,a,s,l)}}function gu(e,t,r,n,o,i,a,s,c,u,l){if(Pd.currentPixelUnpackBufferBinding)Pd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,l);else if(l){var d=jc(u);Pd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,d,l>>Lc(d))}else Pd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,null)}function hu(e,t,r,n){e=Mo.programs[e];for(var o=[],i=0;i<t;i++)o.push(N(W[r+4*i>>2]));Pd.transformFeedbackVaryings(e,o,n)}function Eu(e,t){Pd.uniform1f(Ks(e),t)}var yu=[];function vu(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform1fv(Ks(e),V,r>>2,t);else{if(t<=288)for(var n=yu[t-1],o=0;o<t;++o)n[o]=V[r+4*o>>2];else n=V.subarray(r>>2,r+4*t>>2);Pd.uniform1fv(Ks(e),n)}}function _u(e,t){Pd.uniform1i(Ks(e),t)}var bu=[];function wu(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform1iv(Ks(e),W,r>>2,t);else{if(t<=288)for(var n=bu[t-1],o=0;o<t;++o)n[o]=W[r+4*o>>2];else n=W.subarray(r>>2,r+4*t>>2);Pd.uniform1iv(Ks(e),n)}}function Tu(e,t){Pd.uniform1ui(Ks(e),t)}function Ou(e,t,r){Pd.uniform1uiv(Ks(e),z,r>>2,t)}function Du(e,t,r){Pd.uniform2f(Ks(e),t,r)}function Pu(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform2fv(Ks(e),V,r>>2,2*t);else{if(t<=144)for(var n=yu[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);Pd.uniform2fv(Ks(e),n)}}function xu(e,t,r){Pd.uniform2i(Ks(e),t,r)}function Su(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform2iv(Ks(e),W,r>>2,2*t);else{if(t<=144)for(var n=bu[2*t-1],o=0;o<2*t;o+=2)n[o]=W[r+4*o>>2],n[o+1]=W[r+(4*o+4)>>2];else n=W.subarray(r>>2,r+8*t>>2);Pd.uniform2iv(Ks(e),n)}}function Ru(e,t,r){Pd.uniform2ui(Ks(e),t,r)}function Mu(e,t,r){Pd.uniform2uiv(Ks(e),z,r>>2,2*t)}function Fu(e,t,r,n){Pd.uniform3f(Ks(e),t,r,n)}function Au(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform3fv(Ks(e),V,r>>2,3*t);else{if(t<=96)for(var n=yu[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);Pd.uniform3fv(Ks(e),n)}}function ku(e,t,r,n){Pd.uniform3i(Ks(e),t,r,n)}function Iu(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform3iv(Ks(e),W,r>>2,3*t);else{if(t<=96)for(var n=bu[3*t-1],o=0;o<3*t;o+=3)n[o]=W[r+4*o>>2],n[o+1]=W[r+(4*o+4)>>2],n[o+2]=W[r+(4*o+8)>>2];else n=W.subarray(r>>2,r+12*t>>2);Pd.uniform3iv(Ks(e),n)}}function Cu(e,t,r,n){Pd.uniform3ui(Ks(e),t,r,n)}function Uu(e,t,r){Pd.uniform3uiv(Ks(e),z,r>>2,3*t)}function Nu(e,t,r,n,o){Pd.uniform4f(Ks(e),t,r,n,o)}function ju(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform4fv(Ks(e),V,r>>2,4*t);else{if(t<=72){var n=yu[4*t-1],o=V;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=V.subarray(r>>2,r+16*t>>2);Pd.uniform4fv(Ks(e),n)}}function Lu(e,t,r,n,o){Pd.uniform4i(Ks(e),t,r,n,o)}function Hu(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform4iv(Ks(e),W,r>>2,4*t);else{if(t<=72)for(var n=bu[4*t-1],o=0;o<4*t;o+=4)n[o]=W[r+4*o>>2],n[o+1]=W[r+(4*o+4)>>2],n[o+2]=W[r+(4*o+8)>>2],n[o+3]=W[r+(4*o+12)>>2];else n=W.subarray(r>>2,r+16*t>>2);Pd.uniform4iv(Ks(e),n)}}function Bu(e,t,r,n,o){Pd.uniform4ui(Ks(e),t,r,n,o)}function Xu(e,t,r){Pd.uniform4uiv(Ks(e),z,r>>2,4*t)}function Qu(e,t,r){e=Mo.programs[e],Pd.uniformBlockBinding(e,t,r)}function Gu(e,t,r,n){if(Mo.currentContext.version>=2)Pd.uniformMatrix2fv(Ks(e),!!r,V,n>>2,4*t);else{if(t<=72)for(var o=yu[4*t-1],i=0;i<4*t;i+=4)o[i]=V[n+4*i>>2],o[i+1]=V[n+(4*i+4)>>2],o[i+2]=V[n+(4*i+8)>>2],o[i+3]=V[n+(4*i+12)>>2];else o=V.subarray(n>>2,n+16*t>>2);Pd.uniformMatrix2fv(Ks(e),!!r,o)}}function qu(e,t,r,n){Pd.uniformMatrix2x3fv(Ks(e),!!r,V,n>>2,6*t)}function Wu(e,t,r,n){Pd.uniformMatrix2x4fv(Ks(e),!!r,V,n>>2,8*t)}function zu(e,t,r,n){if(Mo.currentContext.version>=2)Pd.uniformMatrix3fv(Ks(e),!!r,V,n>>2,9*t);else{if(t<=32)for(var o=yu[9*t-1],i=0;i<9*t;i+=9)o[i]=V[n+4*i>>2],o[i+1]=V[n+(4*i+4)>>2],o[i+2]=V[n+(4*i+8)>>2],o[i+3]=V[n+(4*i+12)>>2],o[i+4]=V[n+(4*i+16)>>2],o[i+5]=V[n+(4*i+20)>>2],o[i+6]=V[n+(4*i+24)>>2],o[i+7]=V[n+(4*i+28)>>2],o[i+8]=V[n+(4*i+32)>>2];else o=V.subarray(n>>2,n+36*t>>2);Pd.uniformMatrix3fv(Ks(e),!!r,o)}}function Vu(e,t,r,n){Pd.uniformMatrix3x2fv(Ks(e),!!r,V,n>>2,6*t)}function Yu(e,t,r,n){Pd.uniformMatrix3x4fv(Ks(e),!!r,V,n>>2,12*t)}function $u(e,t,r,n){if(Mo.currentContext.version>=2)Pd.uniformMatrix4fv(Ks(e),!!r,V,n>>2,16*t);else{if(t<=18){var o=yu[16*t-1],i=V;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=V.subarray(n>>2,n+64*t>>2);Pd.uniformMatrix4fv(Ks(e),!!r,o)}}function Ku(e,t,r,n){Pd.uniformMatrix4x2fv(Ks(e),!!r,V,n>>2,8*t)}function Zu(e,t,r,n){Pd.uniformMatrix4x3fv(Ks(e),!!r,V,n>>2,12*t)}function Ju(e){e=Mo.programs[e],Pd.useProgram(e),Pd.currentProgram=e}function el(e){Pd.validateProgram(Mo.programs[e])}function tl(e,t){Pd.vertexAttrib1f(e,t)}function rl(e,t){Pd.vertexAttrib1f(e,V[t>>2])}function nl(e,t,r){Pd.vertexAttrib2f(e,t,r)}function ol(e,t){Pd.vertexAttrib2f(e,V[t>>2],V[t+4>>2])}function il(e,t,r,n){Pd.vertexAttrib3f(e,t,r,n)}function al(e,t){Pd.vertexAttrib3f(e,V[t>>2],V[t+4>>2],V[t+8>>2])}function sl(e,t,r,n,o){Pd.vertexAttrib4f(e,t,r,n,o)}function cl(e,t){Pd.vertexAttrib4f(e,V[t>>2],V[t+4>>2],V[t+8>>2],V[t+12>>2])}function ul(e,t){Pd.vertexAttribDivisor(e,t)}function ll(e,t){Pd.vertexAttribDivisor(e,t)}function dl(e,t){Pd.vertexAttribDivisor(e,t)}function pl(e,t){Pd.vertexAttribDivisor(e,t)}function fl(e,t){Pd.vertexAttribDivisor(e,t)}function ml(e,t,r,n,o){Pd.vertexAttribI4i(e,t,r,n,o)}function gl(e,t){Pd.vertexAttribI4i(e,W[t>>2],W[t+4>>2],W[t+8>>2],W[t+12>>2])}function hl(e,t,r,n,o){Pd.vertexAttribI4ui(e,t,r,n,o)}function El(e,t){Pd.vertexAttribI4ui(e,z[t>>2],z[t+4>>2],z[t+8>>2],z[t+12>>2])}function yl(e,t,r,n,o){Pd.vertexAttribIPointer(e,t,r,n,o)}function vl(e,t,r,n,o,i){Pd.vertexAttribPointer(e,t,r,!!n,o,i)}function _l(e,t,r,n){Pd.viewport(e,t,r,n)}function bl(e,t,r,n){Pd.waitSync(Mo.syncs[e],t,Pi(r,n))}function wl(e,t,r){Q.copyWithin(e,t,t+r)}function Tl(e){try{return R.grow(e-B.byteLength+65535>>>16),le(R.buffer),1}catch(t){T("emscripten_realloc_buffer: Attempted to grow heap from "+B.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function Ol(e){var t=Q.length;I((e>>>=0)>t);var r=2147483648;if(e>r)return T("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147483648 bytes!"),!1;for(var n=1;n<=4;n*=2){var o=t*(1+.2/n);o=Math.min(o,e+100663296);var i=Math.min(r,ue(Math.max(e,o),65536));if(Tl(i))return!0}return T("Failed to grow the heap from "+t+" bytes to "+i+" bytes, not enough memory!"),!1}function Dl(e,t,r,n,i,a,s,c,u){const l=o.UTF8ToString(e,e+t),d=o.HEAPU8.subarray(a,a+s),p=o.HEAPU32.subarray(c/4,c/4+u),f=o.emscripten_ubq_codec_decoderNextHandle++,m=[];for(let e=0;e<u;e++)m[e]=Mo.textures[p[e]];const g={codec:l,codedWidth:r,codedHeight:n,description:new Uint8Array(d)};try{const e=o.emscripten_ubq_codec_createVideoDecoder(m);e.configure(g),e.numberOfFrames=i,o.emscripten_ubq_codec_decoders.set(f,{videoDecoder:e,decoderConfig:g,textures:m})}catch{return 0}return f}function Pl(e,t,r,n,i){const a=o.UTF8ToString(e,e+t),s=o.emscripten_ubq_codec_encoderNextHandle++,c=o.specialHTMLTargets["!canvas"];c.width=r,c.height=n;const u={codec:a,width:r,height:n,avc:{format:"annexb"},fps:i};try{const e=new VideoEncoder({output:e=>{const t=o._malloc(e.byteLength),r=o.HEAPU8.subarray(t,t+e.byteLength);e.copyTo(r),o.emscripten_ubq_codec_muxChunk(s,t,e.byteLength),o._free(t)},error:e=>console.error(e)});e.configure(u),o.emscripten_ubq_codec_encoders.set(s,{videoEncoder:e,encoderConfig:u,groupOfPictures:150,frameIndex:0})}catch{return 0}return s}function xl(e,t,r,n,i,a){const s=o.emscripten_ubq_codec_decoders.get(e);"closed"===s.videoDecoder.state&&(s.videoDecoder=o.emscripten_ubq_codec_createVideoDecoder(s.texture),s.videoDecoder.configure(s.decoderConfig));const c=s.videoDecoder,u=o.HEAPU8.subarray(i,i+a),l=new EncodedVideoChunk({type:t?"key":"delta",timestamp:r,duration:n,data:u});try{c.decode(l)}catch(e){return console.error(e),!1}return!0}function Sl(e){o.emscripten_ubq_codec_decoders.get(e).videoDecoder.close(),o.emscripten_ubq_codec_decoders.delete(e)}function Rl(e){o.emscripten_ubq_codec_encoders.get(e).videoEncoder.close(),o.emscripten_ubq_codec_encoders.delete(e)}function Ml(e,t,r){const n=o.emscripten_ubq_codec_encoders.get(e),i=1e6*n.frameIndex/n.encoderConfig.fps,a=n.frameIndex%n.groupOfPictures==0,s=o.specialHTMLTargets["!canvas"],c=new VideoFrame(s,{timestamp:i});n.videoEncoder.encode(c,{keyFrame:a}),c.close(),n.frameIndex++}async function Fl(e){var t=o.emscripten_ubq_codec_getOnFinalizedEncodingCallback();const r=o.emscripten_ubq_codec_encoders.get(e);await r.videoEncoder.flush(),t.invoke()}async function Al(e){const t=o.emscripten_ubq_codec_decoders.get(e).videoDecoder;await t.flush(),t.decodedFrames=0}function kl(e){return o.emscripten_ubq_codec_decoders.get(e).videoDecoder.decodedFrames}function Il(){return"undefined"!=typeof VideoFrame&&"undefined"!=typeof VideoDecoder&&"undefined"!=typeof VideoEncoder}function Cl(e){const t=o.emscripten_ubq_codec_decoders.get(e).videoDecoder;t.decodedFrames=0,t.probing=!0}function Ul(e){const t=o.emscripten_ubq_codec_decoders.get(e).videoDecoder;t.probing=!1,t.decodedFrames=0}function Nl(e){const t=o.emscripten_ubq_codec_decoders.get(e),r=!0===t.videoDecoder.textureUploadFlag;return t.videoDecoder.textureUploadFlag=!1,r}function jl(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 Ll(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 Hl(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 p=o.UTF8ToString(t,r),f=o.UTF8ToString(l,d),m=o.emscripten_ubq_asyncFetchNextHandle++;o.emscripten_ubq_asyncFetchStates.set(m,{state:a.PENDING});let g={};for(let e=0;e<i;e++){const t=o.getValue(n+4*e,"i32"),r=o.emscripten_ubq_asyncFetchHeaders.get(t);g[r.key]=r.value}const h=s[e];let E;return"GET"!==h&&"HEAD"!==h&&(E=new Uint8Array(o.HEAPU8.buffer,c,u)),fetch(p,{method:h,headers:g,body:E,mode:"cors",credentials:f}).then((e=>{if(e.status>=200&&e.status<=209){let t=0;return e.headers.has("Content-Length")&&(t=+e.headers.get("Content-Length")),o.emscripten_ubq_asyncFetchTotalBytes.set(m,t),async function(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(m,n)}let a=new Uint8Array(n),s=0;for(let e of i)a.set(e,s),s+=e.length;return a}(e.body)}return Promise.reject(e.statusText)})).then((e=>{o.emscripten_ubq_asyncFetchStates.set(m,{state:a.FINISHED,result:e})})).catch((e=>{o.emscripten_ubq_asyncFetchStates.set(m,{state:a.ERROR,error:e})})),m}function Xl(e){return!!o.emscripten_ubq_asyncFetchStates.has(e)&&(o.emscripten_ubq_asyncFetchStates.delete(e),!0)}function Ql(e){return o.emscripten_ubq_asyncFetchCompletedBytes.has(e)?o.emscripten_ubq_asyncFetchCompletedBytes.get(e):0}function Gl(e){if(o.emscripten_ubq_asyncFetchStates.has(e)){const t=o.emscripten_ubq_asyncFetchStates.get(e);if(t.state==a.ALLOCATED)return t.resultAddress}return-1}function ql(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 Wl(e){return o.emscripten_ubq_asyncFetchStates.has(e)?o.emscripten_ubq_asyncFetchStates.get(e).state:-1}function zl(e){return o.emscripten_ubq_asyncFetchTotalBytes.has(e)?o.emscripten_ubq_asyncFetchTotalBytes.get(e):0}var Vl={inEventHandler:0,removeAllEventListeners:function(){for(var e=Vl.eventHandlers.length-1;e>=0;--e)Vl._removeHandler(e);Vl.eventHandlers=[],Vl.deferredCalls=[]},registerRemoveEventListeners:function(){Vl.removeEventListenersRegistered||(ve.push(Vl.removeAllEventListeners),Vl.removeEventListenersRegistered=!0)},deferredCalls:[],deferCall:function(e,t,r){function n(e,t){if(e.length!=t.length)return!1;for(var r in e)if(e[r]!=t[r])return!1;return!0}for(var o in Vl.deferredCalls){var i=Vl.deferredCalls[o];if(i.targetFunction==e&&n(i.argsList,r))return}Vl.deferredCalls.push({targetFunction:e,precedence:t,argsList:r}),Vl.deferredCalls.sort((function(e,t){return e.precedence<t.precedence}))},removeDeferredCalls:function(e){for(var t=0;t<Vl.deferredCalls.length;++t)Vl.deferredCalls[t].targetFunction==e&&(Vl.deferredCalls.splice(t,1),--t)},canPerformEventHandlerRequests:function(){return Vl.inEventHandler&&Vl.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(Vl.canPerformEventHandlerRequests())for(var e=0;e<Vl.deferredCalls.length;++e){var t=Vl.deferredCalls[e];Vl.deferredCalls.splice(e,1),--e,t.targetFunction.apply(null,t.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(e,t){for(var r=0;r<Vl.eventHandlers.length;++r)Vl.eventHandlers[r].target!=e||t&&t!=Vl.eventHandlers[r].eventTypeString||Vl._removeHandler(r--)},_removeHandler:function(e){var t=Vl.eventHandlers[e];t.target.removeEventListener(t.eventTypeString,t.eventListenerFunc,t.useCapture),Vl.eventHandlers.splice(e,1)},registerOrRemoveHandler:function(e){var t=function(t){++Vl.inEventHandler,Vl.currentEventHandler=e,Vl.runDeferredCalls(),e.handlerFunc(t),Vl.runDeferredCalls(),--Vl.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=t,e.target.addEventListener(e.eventTypeString,t,e.useCapture),Vl.eventHandlers.push(e),Vl.registerRemoveEventListeners();else for(var r=0;r<Vl.eventHandlers.length;++r)Vl.eventHandlers[r].target==e.target&&Vl.eventHandlers[r].eventTypeString==e.eventTypeString&&Vl._removeHandler(r--)},getNodeNameForTarget:function(e){return e?e==window?"#window":e==screen?"#screen":e&&e.nodeName?e.nodeName:"":""},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}},Yl=["default","low-power","high-performance"];function $l(e){return e>2?N(e):e}var Kl=[0,"undefined"!=typeof document?document:0,"undefined"!=typeof window?window:0];function Zl(e){return e=$l(e),Kl[e]||("undefined"!=typeof document?document.querySelector(e):void 0)}function Jl(e){return Zl(e)}function ed(e,t){I(t);var r=t>>2,n=W[r+6],o={alpha:!!W[r+0],depth:!!W[r+1],stencil:!!W[r+2],antialias:!!W[r+3],premultipliedAlpha:!!W[r+4],preserveDrawingBuffer:!!W[r+5],powerPreference:Yl[n],failIfMajorPerformanceCaveat:!!W[r+7],majorVersion:W[r+8],minorVersion:W[r+9],enableExtensionsByDefault:W[r+10],explicitSwapControl:W[r+11],proxyContextToMainThread:W[r+12],renderViaOffscreenBackBuffer:W[r+13]},i=Jl(e);return i?o.explicitSwapControl?0:Mo.createContext(i,o):0}function td(e,t){return ed(e,t)}function rd(e){Mo.currentContext==e&&(Mo.currentContext=0),Mo.deleteContext(e)}function nd(e){I(e);for(var t=e>>2,r=0;r<14;++r)W[t+r]=0;W[t+0]=W[t+1]=W[t+3]=W[t+4]=W[t+8]=W[t+10]=1}function od(e){return Mo.makeContextCurrent(e)?0:-5}var id={};function ad(){return l||"./this.program"}function sd(){if(!sd.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",_:ad()};for(var t in id)void 0===id[t]?delete e[t]:e[t]=id[t];var r=[];for(var t in e)r.push(t+"="+e[t]);sd.strings=r}return sd.strings}function cd(e,t){var r=0;return sd().forEach((function(n,o){var i=t+r;W[e+4*o>>2]=i,ce(n,i),r+=n.length+1})),0}function ud(e,t){var r=sd();W[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),W[t>>2]=n,0}function ld(e){try{var t=vt.getStreamFromFD(e);return yt.close(t),0}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return e.errno}}function dd(e,t,r,n,o){try{var i=0|Number(n&BigInt(4294967295));I(!(0|Number(n>>BigInt(32))),"offsets over 2^32 not yet supported");var a=vt.getStreamFromFD(e),s=vt.doReadv(a,t,r,i);return W[o>>2]=s,0}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return e.errno}}function pd(e,t,r,n){try{var o=vt.getStreamFromFD(e),i=vt.doReadv(o,t,r);return W[n>>2]=i,0}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return e.errno}}function fd(e,t,r,n){try{var o=0|Number(t&BigInt(4294967295)),i=0|Number(t>>BigInt(32)),a=vt.getStreamFromFD(e),s=4294967296*i+(o>>>0),c=9007199254740992;return s<=-c||s>=c?-61:(yt.llseek(a,s,r),Y[n>>3]=BigInt(a.position),a.getdents&&0===s&&0===r&&(a.getdents=null),0)}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return e.errno}}function md(e,t,r,n){try{var o=vt.getStreamFromFD(e),i=vt.doWritev(o,t,r);return W[n>>2]=i,0}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return e.errno}}function gd(){return S()}function hd(e){var t=Date.now();return W[e>>2]=t/1e3|0,W[e+4>>2]=t%1e3*1e3|0,0}function Ed(e){x(e)}function yd(e){return e%4==0&&(e%100!=0||e%400==0)}function vd(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var _d=[31,29,31,30,31,30,31,31,30,31,30,31],bd=[31,28,31,30,31,30,31,31,30,31,30,31];function wd(e,t){for(var r=new Date(e.getTime());t>0;){var n=yd(r.getFullYear()),o=r.getMonth(),i=(n?_d:bd)[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 Td(e,t,r,n){var o=W[n+40>>2],i={tm_sec:W[n>>2],tm_min:W[n+4>>2],tm_hour:W[n+8>>2],tm_mday:W[n+12>>2],tm_mon:W[n+16>>2],tm_year:W[n+20>>2],tm_wday:W[n+24>>2],tm_yday:W[n+28>>2],tm_isdst:W[n+32>>2],tm_gmtoff:W[n+36>>2],tm_zone:o?N(o):""},a=N(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in s)a=a.replace(new RegExp(c,"g"),s[c]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function p(e,t){return d(e,t,"0")}function f(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 m(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 g(e){var t=wd(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=m(r),i=m(n);return f(o,t)<=0?f(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var h={"%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 p((e.tm_year+1900)/100|0,2)},"%d":function(e){return p(e.tm_mday,2)},"%e":function(e){return d(e.tm_mday,2," ")},"%g":function(e){return g(e).toString().substring(2)},"%G":function(e){return g(e)},"%H":function(e){return p(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),p(t,2)},"%j":function(e){return p(e.tm_mday+vd(yd(e.tm_year+1900)?_d:bd,e.tm_mon-1),3)},"%m":function(e){return p(e.tm_mon+1,2)},"%M":function(e){return p(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 p(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:wd(t,7-t.getDay()),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(f(r,n)<0){var o=vd(yd(n.getFullYear())?_d:bd,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return p(Math.ceil(i/7),2)}return 0===f(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=m(r),i=m(n),a=wd(new Date(e.tm_year+1900,0,1),e.tm_yday);return f(a,o)<0?"53":f(i,a)<=0?"01":(t=o.getFullYear()<e.tm_year+1900?e.tm_yday+32-o.getDate():e.tm_yday+1-o.getDate(),p(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:wd(t,0===t.getDay()?1:7-t.getDay()+1),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(f(r,n)<0){var o=vd(yd(n.getFullYear())?_d:bd,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return p(Math.ceil(i/7),2)}return 0===f(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"),h)a.includes(c)&&(a=a.replace(new RegExp(c,"g"),h[c](i)));var E=kd(a=a.replace(/\0\0/g,"%"),!1);return E.length>t?0:(se(E,e),E.length-1)}function Od(e,t,r,n){return Td(e,t,r,n)}function Dd(e){var t=Date.now()/1e3|0;return e&&(W[e>>2]=t),t}var Pd,xd=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=yt.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},Sd=365,Rd=146;Object.defineProperties(xd.prototype,{read:{get:function(){return(this.mode&Sd)===Sd},set:function(e){e?this.mode|=Sd:this.mode&=~Sd}},write:{get:function(){return(this.mode&Rd)===Rd},set:function(e){e?this.mode|=Rd:this.mode&=~Rd}},isFolder:{get:function(){return yt.isDir(this.mode)}},isDevice:{get:function(){return yt.isChrdev(this.mode)}}}),yt.FSNode=xd,yt.staticInit(),o.FS_createPath=yt.createPath,o.FS_createDataFile=yt.createDataFile,o.FS_createPreloadedFile=yt.createPreloadedFile,o.FS_createLazyFile=yt.createLazyFile,o.FS_createDevice=yt.createDevice,o.FS_unlink=yt.unlink,Et={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},Bt=o.InternalError=Ht(Error,"InternalError"),Vt(),Kt=o.BindingError=Ht(Error,"BindingError"),Mr(),vr(),Xr(),Wr=o.UnboundTypeError=Ht(Error,"UnboundTypeError"),sn(),o.requestFullscreen=function(e,t){bo.requestFullscreen(e,t)},o.requestFullScreen=function(){bo.requestFullScreen()},o.requestAnimationFrame=function(e){bo.requestAnimationFrame(e)},o.setCanvasSize=function(e,t,r){bo.setCanvasSize(e,t,r)},o.pauseMainLoop=function(){bo.mainLoop.pause()},o.resumeMainLoop=function(){bo.mainLoop.resume()},o.getUserMedia=function(){bo.getUserMedia()},o.createContext=function(e,t,r,n){return bo.createContext(e,t,r,n)};for(var Md=0;Md<32;++Md)fa.push(new Array(Md));var Fd=new Float32Array(288);for(Md=0;Md<288;++Md)yu[Md]=Fd.subarray(0,Md+1);var Ad=new Int32Array(288);for(Md=0;Md<288;++Md)bu[Md]=Ad.subarray(0,Md+1);function kd(e,t,r){var n=r>0?r:H(e)+1,o=new Array(n),i=j(e,o,0,o.length);return t&&(o.length=i),o}"function"==typeof atob&&atob;var Id,Cd={__assert_fail:rt,__cxa_allocate_exception:nt,__cxa_throw:it,__syscall_fcntl64:_t,__syscall_fstat64:bt,__syscall_fstatat64:wt,__syscall_getdents64:Tt,__syscall_ioctl:Ot,__syscall_lstat64:Dt,__syscall_open:Pt,__syscall_stat64:xt,_dlopen_js:St,_dlsym_js:Rt,_embind_finalize_value_array:Gt,_embind_finalize_value_object:Wt,_embind_register_bigint:tr,_embind_register_bool:nr,_embind_register_class:Yr,_embind_register_class_constructor:Kr,_embind_register_class_function:en,_embind_register_emval:un,_embind_register_enum:dn,_embind_register_enum_value:fn,_embind_register_float:gn,_embind_register_function:hn,_embind_register_integer:En,_embind_register_memory_view:yn,_embind_register_smart_ptr:vn,_embind_register_std_string:_n,_embind_register_std_wstring:bn,_embind_register_value_array:wn,_embind_register_value_array_element:Tn,_embind_register_value_object:On,_embind_register_value_object_field:Dn,_embind_register_void:Pn,_emscripten_throw_longjmp:xn,_emval_as:Sn,_emval_call:Mn,_emval_call_method:Cn,_emval_call_void_method:Un,_emval_decref:nn,_emval_get_global:jn,_emval_get_method_caller:Bn,_emval_get_property:Xn,_emval_incref:Qn,_emval_instanceof:Gn,_emval_is_number:qn,_emval_is_string:Wn,_emval_new:$n,_emval_new_array:Kn,_emval_new_cstring:Zn,_emval_new_object:Jn,_emval_run_destructors:eo,_emval_set_property:to,_emval_take_value:ro,_emval_throw:no,_gmtime_js:oo,_localtime_js:io,_mktime_js:ao,_mmap_js:so,_munmap_js:co,_tzset_js:lo,abort:po,clock_gettime:mo,eglChooseConfig:To,eglCreateContext:Fo,eglCreateWindowSurface:Ao,eglDestroyContext:ko,eglDestroySurface:Io,eglGetConfigAttrib:Co,eglGetDisplay:Uo,eglGetError:No,eglInitialize:jo,eglMakeCurrent:Lo,eglSwapBuffers:Ho,eglTerminate:Bo,emscripten_console_error:Xo,emscripten_console_log:Qo,emscripten_console_warn:Go,emscripten_debugger:qo,emscripten_get_heap_max:Wo,emscripten_get_now:Vn,emscripten_glActiveTexture:zo,emscripten_glAttachShader:Vo,emscripten_glBeginQuery:Yo,emscripten_glBeginQueryEXT:$o,emscripten_glBeginTransformFeedback:Ko,emscripten_glBindAttribLocation:Zo,emscripten_glBindBuffer:Jo,emscripten_glBindBufferBase:ei,emscripten_glBindBufferRange:ti,emscripten_glBindFramebuffer:ri,emscripten_glBindRenderbuffer:ni,emscripten_glBindSampler:oi,emscripten_glBindTexture:ii,emscripten_glBindTransformFeedback:ai,emscripten_glBindVertexArray:si,emscripten_glBindVertexArrayOES:ci,emscripten_glBlendColor:ui,emscripten_glBlendEquation:li,emscripten_glBlendEquationSeparate:di,emscripten_glBlendFunc:pi,emscripten_glBlendFuncSeparate:fi,emscripten_glBlitFramebuffer:mi,emscripten_glBufferData:gi,emscripten_glBufferSubData:hi,emscripten_glCheckFramebufferStatus:Ei,emscripten_glClear:yi,emscripten_glClearBufferfi:vi,emscripten_glClearBufferfv:_i,emscripten_glClearBufferiv:bi,emscripten_glClearBufferuiv:wi,emscripten_glClearColor:Ti,emscripten_glClearDepthf:Oi,emscripten_glClearStencil:Di,emscripten_glClientWaitSync:xi,emscripten_glColorMask:Si,emscripten_glCompileShader:Ri,emscripten_glCompressedTexImage2D:Mi,emscripten_glCompressedTexImage3D:Fi,emscripten_glCompressedTexSubImage2D:Ai,emscripten_glCompressedTexSubImage3D:ki,emscripten_glCopyBufferSubData:Ii,emscripten_glCopyTexImage2D:Ci,emscripten_glCopyTexSubImage2D:Ui,emscripten_glCopyTexSubImage3D:Ni,emscripten_glCreateProgram:ji,emscripten_glCreateShader:Li,emscripten_glCullFace:Hi,emscripten_glDeleteBuffers:Bi,emscripten_glDeleteFramebuffers:Xi,emscripten_glDeleteProgram:Qi,emscripten_glDeleteQueries:Gi,emscripten_glDeleteQueriesEXT:qi,emscripten_glDeleteRenderbuffers:Wi,emscripten_glDeleteSamplers:zi,emscripten_glDeleteShader:Vi,emscripten_glDeleteSync:Yi,emscripten_glDeleteTextures:$i,emscripten_glDeleteTransformFeedbacks:Ki,emscripten_glDeleteVertexArrays:Zi,emscripten_glDeleteVertexArraysOES:Ji,emscripten_glDepthFunc:ea,emscripten_glDepthMask:ta,emscripten_glDepthRangef:ra,emscripten_glDetachShader:na,emscripten_glDisable:oa,emscripten_glDisableVertexAttribArray:ia,emscripten_glDrawArrays:aa,emscripten_glDrawArraysInstanced:sa,emscripten_glDrawArraysInstancedANGLE:ca,emscripten_glDrawArraysInstancedARB:ua,emscripten_glDrawArraysInstancedBaseInstanceWEBGL:la,emscripten_glDrawArraysInstancedEXT:da,emscripten_glDrawArraysInstancedNV:pa,emscripten_glDrawBuffers:ma,emscripten_glDrawBuffersEXT:ga,emscripten_glDrawBuffersWEBGL:ha,emscripten_glDrawElements:Ea,emscripten_glDrawElementsInstanced:ya,emscripten_glDrawElementsInstancedANGLE:va,emscripten_glDrawElementsInstancedARB:_a,emscripten_glDrawElementsInstancedBaseVertexBaseInstanceWEBGL:ba,emscripten_glDrawElementsInstancedEXT:wa,emscripten_glDrawElementsInstancedNV:Ta,emscripten_glDrawRangeElements:Da,emscripten_glEnable:Pa,emscripten_glEnableVertexAttribArray:xa,emscripten_glEndQuery:Sa,emscripten_glEndQueryEXT:Ra,emscripten_glEndTransformFeedback:Ma,emscripten_glFenceSync:Fa,emscripten_glFinish:Aa,emscripten_glFlush:ka,emscripten_glFramebufferRenderbuffer:Ia,emscripten_glFramebufferTexture2D:Ca,emscripten_glFramebufferTextureLayer:Ua,emscripten_glFrontFace:Na,emscripten_glGenBuffers:La,emscripten_glGenFramebuffers:Ha,emscripten_glGenQueries:Ba,emscripten_glGenQueriesEXT:Xa,emscripten_glGenRenderbuffers:Qa,emscripten_glGenSamplers:Ga,emscripten_glGenTextures:qa,emscripten_glGenTransformFeedbacks:Wa,emscripten_glGenVertexArrays:za,emscripten_glGenVertexArraysOES:Va,emscripten_glGenerateMipmap:Ya,emscripten_glGetActiveAttrib:Ka,emscripten_glGetActiveUniform:Za,emscripten_glGetActiveUniformBlockName:Ja,emscripten_glGetActiveUniformBlockiv:es,emscripten_glGetActiveUniformsiv:ts,emscripten_glGetAttachedShaders:rs,emscripten_glGetAttribLocation:ns,emscripten_glGetBooleanv:cs,emscripten_glGetBufferParameteri64v:us,emscripten_glGetBufferParameteriv:ls,emscripten_glGetError:ds,emscripten_glGetFloatv:ps,emscripten_glGetFragDataLocation:fs,emscripten_glGetFramebufferAttachmentParameteriv:ms,emscripten_glGetInteger64i_v:hs,emscripten_glGetInteger64v:Es,emscripten_glGetIntegeri_v:ys,emscripten_glGetIntegerv:vs,emscripten_glGetInternalformativ:_s,emscripten_glGetProgramBinary:bs,emscripten_glGetProgramInfoLog:ws,emscripten_glGetProgramiv:Ts,emscripten_glGetQueryObjecti64vEXT:Os,emscripten_glGetQueryObjectivEXT:Ds,emscripten_glGetQueryObjectui64vEXT:Ps,emscripten_glGetQueryObjectuiv:xs,emscripten_glGetQueryObjectuivEXT:Ss,emscripten_glGetQueryiv:Rs,emscripten_glGetQueryivEXT:Ms,emscripten_glGetRenderbufferParameteriv:Fs,emscripten_glGetSamplerParameterfv:As,emscripten_glGetSamplerParameteriv:ks,emscripten_glGetShaderInfoLog:Is,emscripten_glGetShaderPrecisionFormat:Cs,emscripten_glGetShaderSource:Us,emscripten_glGetShaderiv:Ns,emscripten_glGetString:Ls,emscripten_glGetStringi:Hs,emscripten_glGetSynciv:Bs,emscripten_glGetTexParameterfv:Xs,emscripten_glGetTexParameteriv:Qs,emscripten_glGetTransformFeedbackVarying:Gs,emscripten_glGetUniformBlockIndex:qs,emscripten_glGetUniformIndices:Ws,emscripten_glGetUniformLocation:$s,emscripten_glGetUniformfv:Js,emscripten_glGetUniformiv:ec,emscripten_glGetUniformuiv:tc,emscripten_glGetVertexAttribIiv:nc,emscripten_glGetVertexAttribIuiv:oc,emscripten_glGetVertexAttribPointerv:ic,emscripten_glGetVertexAttribfv:ac,emscripten_glGetVertexAttribiv:sc,emscripten_glHint:cc,emscripten_glInvalidateFramebuffer:uc,emscripten_glInvalidateSubFramebuffer:lc,emscripten_glIsBuffer:dc,emscripten_glIsEnabled:pc,emscripten_glIsFramebuffer:fc,emscripten_glIsProgram:mc,emscripten_glIsQuery:gc,emscripten_glIsQueryEXT:hc,emscripten_glIsRenderbuffer:Ec,emscripten_glIsSampler:yc,emscripten_glIsShader:vc,emscripten_glIsSync:_c,emscripten_glIsTexture:bc,emscripten_glIsTransformFeedback:wc,emscripten_glIsVertexArray:Tc,emscripten_glIsVertexArrayOES:Oc,emscripten_glLineWidth:Dc,emscripten_glLinkProgram:Pc,emscripten_glMultiDrawArraysInstancedBaseInstanceWEBGL:xc,emscripten_glMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL:Sc,emscripten_glPauseTransformFeedback:Rc,emscripten_glPixelStorei:Mc,emscripten_glPolygonOffset:Fc,emscripten_glProgramBinary:Ac,emscripten_glProgramParameteri:kc,emscripten_glQueryCounterEXT:Ic,emscripten_glReadBuffer:Cc,emscripten_glReadPixels:Bc,emscripten_glReleaseShaderCompiler:Xc,emscripten_glRenderbufferStorage:Qc,emscripten_glRenderbufferStorageMultisample:Gc,emscripten_glResumeTransformFeedback:qc,emscripten_glSampleCoverage:Wc,emscripten_glSamplerParameterf:zc,emscripten_glSamplerParameterfv:Vc,emscripten_glSamplerParameteri:Yc,emscripten_glSamplerParameteriv:$c,emscripten_glScissor:Kc,emscripten_glShaderBinary:Zc,emscripten_glShaderSource:Jc,emscripten_glStencilFunc:eu,emscripten_glStencilFuncSeparate:tu,emscripten_glStencilMask:ru,emscripten_glStencilMaskSeparate:nu,emscripten_glStencilOp:ou,emscripten_glStencilOpSeparate:iu,emscripten_glTexImage2D:au,emscripten_glTexImage3D:su,emscripten_glTexParameterf:cu,emscripten_glTexParameterfv:uu,emscripten_glTexParameteri:lu,emscripten_glTexParameteriv:du,emscripten_glTexStorage2D:pu,emscripten_glTexStorage3D:fu,emscripten_glTexSubImage2D:mu,emscripten_glTexSubImage3D:gu,emscripten_glTransformFeedbackVaryings:hu,emscripten_glUniform1f:Eu,emscripten_glUniform1fv:vu,emscripten_glUniform1i:_u,emscripten_glUniform1iv:wu,emscripten_glUniform1ui:Tu,emscripten_glUniform1uiv:Ou,emscripten_glUniform2f:Du,emscripten_glUniform2fv:Pu,emscripten_glUniform2i:xu,emscripten_glUniform2iv:Su,emscripten_glUniform2ui:Ru,emscripten_glUniform2uiv:Mu,emscripten_glUniform3f:Fu,emscripten_glUniform3fv:Au,emscripten_glUniform3i:ku,emscripten_glUniform3iv:Iu,emscripten_glUniform3ui:Cu,emscripten_glUniform3uiv:Uu,emscripten_glUniform4f:Nu,emscripten_glUniform4fv:ju,emscripten_glUniform4i:Lu,emscripten_glUniform4iv:Hu,emscripten_glUniform4ui:Bu,emscripten_glUniform4uiv:Xu,emscripten_glUniformBlockBinding:Qu,emscripten_glUniformMatrix2fv:Gu,emscripten_glUniformMatrix2x3fv:qu,emscripten_glUniformMatrix2x4fv:Wu,emscripten_glUniformMatrix3fv:zu,emscripten_glUniformMatrix3x2fv:Vu,emscripten_glUniformMatrix3x4fv:Yu,emscripten_glUniformMatrix4fv:$u,emscripten_glUniformMatrix4x2fv:Ku,emscripten_glUniformMatrix4x3fv:Zu,emscripten_glUseProgram:Ju,emscripten_glValidateProgram:el,emscripten_glVertexAttrib1f:tl,emscripten_glVertexAttrib1fv:rl,emscripten_glVertexAttrib2f:nl,emscripten_glVertexAttrib2fv:ol,emscripten_glVertexAttrib3f:il,emscripten_glVertexAttrib3fv:al,emscripten_glVertexAttrib4f:sl,emscripten_glVertexAttrib4fv:cl,emscripten_glVertexAttribDivisor:ul,emscripten_glVertexAttribDivisorANGLE:ll,emscripten_glVertexAttribDivisorARB:dl,emscripten_glVertexAttribDivisorEXT:pl,emscripten_glVertexAttribDivisorNV:fl,emscripten_glVertexAttribI4i:ml,emscripten_glVertexAttribI4iv:gl,emscripten_glVertexAttribI4ui:hl,emscripten_glVertexAttribI4uiv:El,emscripten_glVertexAttribIPointer:yl,emscripten_glVertexAttribPointer:vl,emscripten_glViewport:_l,emscripten_glWaitSync:bl,emscripten_memcpy_big:wl,emscripten_resize_heap:Ol,emscripten_ubq_codec_createDecoder:Dl,emscripten_ubq_codec_createEncoder:Pl,emscripten_ubq_codec_decodeSample:xl,emscripten_ubq_codec_destroyDecoder:Sl,emscripten_ubq_codec_destroyEncoder:Rl,emscripten_ubq_codec_encodeFrame:Ml,emscripten_ubq_codec_finalizeEncoding:Fl,emscripten_ubq_codec_flushDecoder:Al,emscripten_ubq_codec_getNumberOfDecodedFrames:kl,emscripten_ubq_codec_isSupported:Il,emscripten_ubq_codec_startProbing:Cl,emscripten_ubq_codec_stopProbing:Ul,emscripten_ubq_codec_testAndClearTextureUpdateFlag:Nl,emscripten_ubq_fetch_allocateFetchResult:jl,emscripten_ubq_fetch_createHeader:Ll,emscripten_ubq_fetch_deleteHeader:Hl,emscripten_ubq_fetch_dispatchAsyncFetch:Bl,emscripten_ubq_fetch_freeFetchResult:Xl,emscripten_ubq_fetch_getFetchCompletedBytes:Ql,emscripten_ubq_fetch_getFetchResultAddress:Gl,emscripten_ubq_fetch_getFetchResultLength:ql,emscripten_ubq_fetch_getFetchState:Wl,emscripten_ubq_fetch_getFetchTotalBytes:zl,emscripten_webgl_create_context:td,emscripten_webgl_destroy_context:rd,emscripten_webgl_init_context_attributes:nd,emscripten_webgl_make_context_current:od,environ_get:cd,environ_sizes_get:ud,exit:ho,fd_close:ld,fd_pread:dd,fd_read:pd,fd_seek:fd,fd_write:md,getTempRet0:gd,gettimeofday:hd,invoke_ii:Vd,invoke_iii:Yd,invoke_iiii:Kd,invoke_iiiii:np,invoke_iiiiii:ep,invoke_iiiiiii:rp,invoke_v:ap,invoke_vi:Zd,invoke_vii:Jd,invoke_viii:$d,invoke_viiii:tp,invoke_viiiii:op,invoke_viiiiii:sp,invoke_viiiiiiiii:ip,setTempRet0:Ed,strftime_l:Od,time:Dd},Ud=(Ye(),o.___wasm_call_ctors=We("__wasm_call_ctors"),o._malloc=We("malloc")),Nd=(o._main=We("main"),o._free=We("free")),jd=o.___errno_location=We("__errno_location"),Ld=(o._saveSetjmp=We("saveSetjmp"),o.___getTypeName=We("__getTypeName")),Hd=(o.___embind_register_native_and_builtin_types=We("__embind_register_native_and_builtin_types"),o.___stdio_exit=We("__stdio_exit")),Bd=(o.___dl_seterr=We("__dl_seterr"),o._emscripten_main_thread_process_queued_calls=We("emscripten_main_thread_process_queued_calls"),o._emscripten_builtin_memalign=We("emscripten_builtin_memalign")),Xd=o._setThrew=We("setThrew"),Qd=o._emscripten_stack_init=function(){return(Qd=o._emscripten_stack_init=o.asm.emscripten_stack_init).apply(null,arguments)},Gd=(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(Gd=o._emscripten_stack_get_end=o.asm.emscripten_stack_get_end).apply(null,arguments)}),qd=o.stackSave=We("stackSave"),Wd=o.stackRestore=We("stackRestore"),zd=o.stackAlloc=We("stackAlloc");function Vd(e,t){var r=qd();try{return et(e)(t)}catch(e){if(Wd(r),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function Yd(e,t,r){var n=qd();try{return et(e)(t,r)}catch(e){if(Wd(n),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function $d(e,t,r,n){var o=qd();try{et(e)(t,r,n)}catch(e){if(Wd(o),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function Kd(e,t,r,n){var o=qd();try{return et(e)(t,r,n)}catch(e){if(Wd(o),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function Zd(e,t){var r=qd();try{et(e)(t)}catch(e){if(Wd(r),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function Jd(e,t,r){var n=qd();try{et(e)(t,r)}catch(e){if(Wd(n),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function ep(e,t,r,n,o,i){var a=qd();try{return et(e)(t,r,n,o,i)}catch(e){if(Wd(a),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function tp(e,t,r,n,o){var i=qd();try{et(e)(t,r,n,o)}catch(e){if(Wd(i),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function rp(e,t,r,n,o,i,a){var s=qd();try{return et(e)(t,r,n,o,i,a)}catch(e){if(Wd(s),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function np(e,t,r,n,o){var i=qd();try{return et(e)(t,r,n,o)}catch(e){if(Wd(i),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function op(e,t,r,n,o,i){var a=qd();try{et(e)(t,r,n,o,i)}catch(e){if(Wd(a),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function ip(e,t,r,n,o,i,a,s,c,u){var l=qd();try{et(e)(t,r,n,o,i,a,s,c,u)}catch(e){if(Wd(l),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function ap(e){var t=qd();try{et(e)()}catch(e){if(Wd(t),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function sp(e,t,r,n,o,i,a){var s=qd();try{et(e)(t,r,n,o,i,a)}catch(e){if(Wd(s),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function cp(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function up(e){I(0==ke,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),I(0==he.length,"cannot call main when preRun functions remain to be called");var t=o._main,r=(e=e||[]).length+1,n=zd(4*(r+1));W[n>>2]=ae(l);for(var i=1;i<r;i++)W[(n>>2)+i]=ae(e[i-1]);W[(n>>2)+r]=0;try{var a=t(r,n);return fp(a,!0),a}catch(e){return tt(e)}}function lp(){Qd(),me()}function dp(e){function r(){Id||(Id=!0,o.calledRun=!0,k||(Pe(),xe(),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),gp&&up(e),Re()))}e=e||u,ke>0||(lp(),De(),ke>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),r()}),1)):r(),ge()))}function pp(){var e=w,t=T,r=!1;w=T=e=>{r=!0};try{Hd(),["stdout","stderr"].forEach((function(e){var t=yt.analyzePath("/dev/"+e);if(t){var n=t.object.rdev,o=lt.ttys[n];o&&o.output&&o.output.length&&(r=!0)}}))}catch(e){}w=e,T=t,r&&O("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 fp(e,t){if(A=e,Te||pp(),Oe()){if(!t){var r="program exited (with status: "+e+"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)";n(r),T(r)}}else Se();mp(e)}function mp(e){A=e,Oe()||(o.onExit&&o.onExit(e),k=!0),d(e,new cp(e))}if(Object.getOwnPropertyDescriptor(o,"intArrayFromString")||(o.intArrayFromString=()=>He("'intArrayFromString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"intArrayToString")||(o.intArrayToString=()=>He("'intArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ccall")||(o.ccall=()=>He("'ccall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"cwrap")||(o.cwrap=()=>He("'cwrap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setValue")||(o.setValue=()=>He("'setValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.getValue=F,Object.getOwnPropertyDescriptor(o,"allocate")||(o.allocate=()=>He("'allocate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UTF8ArrayToString")||(o.UTF8ArrayToString=()=>He("'UTF8ArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.UTF8ToString=N,Object.getOwnPropertyDescriptor(o,"stringToUTF8Array")||(o.stringToUTF8Array=()=>He("'stringToUTF8Array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToUTF8")||(o.stringToUTF8=()=>He("'stringToUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF8")||(o.lengthBytesUTF8=()=>He("'lengthBytesUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackTrace")||(o.stackTrace=()=>He("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnPreRun")||(o.addOnPreRun=()=>He("'addOnPreRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnInit")||(o.addOnInit=()=>He("'addOnInit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnPreMain")||(o.addOnPreMain=()=>He("'addOnPreMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnExit")||(o.addOnExit=()=>He("'addOnExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnPostRun")||(o.addOnPostRun=()=>He("'addOnPostRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeStringToMemory")||(o.writeStringToMemory=()=>He("'writeStringToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeArrayToMemory")||(o.writeArrayToMemory=()=>He("'writeArrayToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeAsciiToMemory")||(o.writeAsciiToMemory=()=>He("'writeAsciiToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.addRunDependency=je,o.removeRunDependency=Le,Object.getOwnPropertyDescriptor(o,"FS_createFolder")||(o.FS_createFolder=()=>He("'FS_createFolder' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.FS_createPath=yt.createPath,o.FS_createDataFile=yt.createDataFile,o.FS_createPreloadedFile=yt.createPreloadedFile,o.FS_createLazyFile=yt.createLazyFile,Object.getOwnPropertyDescriptor(o,"FS_createLink")||(o.FS_createLink=()=>He("'FS_createLink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.FS_createDevice=yt.createDevice,o.FS_unlink=yt.unlink,Object.getOwnPropertyDescriptor(o,"getLEB")||(o.getLEB=()=>He("'getLEB' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getFunctionTables")||(o.getFunctionTables=()=>He("'getFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"alignFunctionTables")||(o.alignFunctionTables=()=>He("'alignFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerFunctions")||(o.registerFunctions=()=>He("'registerFunctions' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addFunction")||(o.addFunction=()=>He("'addFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"removeFunction")||(o.removeFunction=()=>He("'removeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getFuncWrapper")||(o.getFuncWrapper=()=>He("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"prettyPrint")||(o.prettyPrint=()=>He("'prettyPrint' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"dynCall")||(o.dynCall=()=>He("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getCompilerSetting")||(o.getCompilerSetting=()=>He("'getCompilerSetting' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"print")||(o.print=()=>He("'print' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"printErr")||(o.printErr=()=>He("'printErr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getTempRet0")||(o.getTempRet0=()=>He("'getTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setTempRet0")||(o.setTempRet0=()=>He("'setTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"callMain")||(o.callMain=()=>He("'callMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"abort")||(o.abort=()=>He("'abort' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"keepRuntimeAlive")||(o.keepRuntimeAlive=()=>He("'keepRuntimeAlive' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"zeroMemory")||(o.zeroMemory=()=>He("'zeroMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToNewUTF8")||(o.stringToNewUTF8=()=>He("'stringToNewUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscripten_realloc_buffer")||(o.emscripten_realloc_buffer=()=>He("'emscripten_realloc_buffer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ENV")||(o.ENV=()=>He("'ENV' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"withStackSave")||(o.withStackSave=()=>He("'withStackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ERRNO_CODES")||(o.ERRNO_CODES=()=>He("'ERRNO_CODES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ERRNO_MESSAGES")||(o.ERRNO_MESSAGES=()=>He("'ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setErrNo")||(o.setErrNo=()=>He("'setErrNo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetPton4")||(o.inetPton4=()=>He("'inetPton4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetNtop4")||(o.inetNtop4=()=>He("'inetNtop4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetPton6")||(o.inetPton6=()=>He("'inetPton6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetNtop6")||(o.inetNtop6=()=>He("'inetNtop6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readSockaddr")||(o.readSockaddr=()=>He("'readSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeSockaddr")||(o.writeSockaddr=()=>He("'writeSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"DNS")||(o.DNS=()=>He("'DNS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getHostByName")||(o.getHostByName=()=>He("'getHostByName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Protocols")||(o.Protocols=()=>He("'Protocols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Sockets")||(o.Sockets=()=>He("'Sockets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getRandomDevice")||(o.getRandomDevice=()=>He("'getRandomDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"traverseStack")||(o.traverseStack=()=>He("'traverseStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertFrameToPC")||(o.convertFrameToPC=()=>He("'convertFrameToPC' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UNWIND_CACHE")||(o.UNWIND_CACHE=()=>He("'UNWIND_CACHE' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"saveInUnwindCache")||(o.saveInUnwindCache=()=>He("'saveInUnwindCache' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertPCtoSourceLocation")||(o.convertPCtoSourceLocation=()=>He("'convertPCtoSourceLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readAsmConstArgsArray")||(o.readAsmConstArgsArray=()=>He("'readAsmConstArgsArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readAsmConstArgs")||(o.readAsmConstArgs=()=>He("'readAsmConstArgs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"mainThreadEM_ASM")||(o.mainThreadEM_ASM=()=>He("'mainThreadEM_ASM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"jstoi_q")||(o.jstoi_q=()=>He("'jstoi_q' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"jstoi_s")||(o.jstoi_s=()=>He("'jstoi_s' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getExecutableName")||(o.getExecutableName=()=>He("'getExecutableName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"listenOnce")||(o.listenOnce=()=>He("'listenOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"autoResumeAudioContext")||(o.autoResumeAudioContext=()=>He("'autoResumeAudioContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"dynCall")||(o.dynCall=()=>He("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"callRuntimeCallbacks")||(o.callRuntimeCallbacks=()=>He("'callRuntimeCallbacks' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"wasmTableMirror")||(o.wasmTableMirror=()=>He("'wasmTableMirror' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setWasmTableEntry")||(o.setWasmTableEntry=()=>He("'setWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getWasmTableEntry")||(o.getWasmTableEntry=()=>He("'getWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"handleException")||(o.handleException=()=>He("'handleException' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runtimeKeepalivePush")||(o.runtimeKeepalivePush=()=>He("'runtimeKeepalivePush' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runtimeKeepalivePop")||(o.runtimeKeepalivePop=()=>He("'runtimeKeepalivePop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"callUserCallback")||(o.callUserCallback=()=>He("'callUserCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"maybeExit")||(o.maybeExit=()=>He("'maybeExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"safeSetTimeout")||(o.safeSetTimeout=()=>He("'safeSetTimeout' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"asmjsMangle")||(o.asmjsMangle=()=>He("'asmjsMangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"asyncLoad")||(o.asyncLoad=()=>He("'asyncLoad' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"alignMemory")||(o.alignMemory=()=>He("'alignMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"mmapAlloc")||(o.mmapAlloc=()=>He("'mmapAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"reallyNegative")||(o.reallyNegative=()=>He("'reallyNegative' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"unSign")||(o.unSign=()=>He("'unSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"reSign")||(o.reSign=()=>He("'reSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"formatString")||(o.formatString=()=>He("'formatString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PATH")||(o.PATH=()=>He("'PATH' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PATH_FS")||(o.PATH_FS=()=>He("'PATH_FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SYSCALLS")||(o.SYSCALLS=()=>He("'SYSCALLS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getSocketFromFD")||(o.getSocketFromFD=()=>He("'getSocketFromFD' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getSocketAddress")||(o.getSocketAddress=()=>He("'getSocketAddress' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"JSEvents")||(o.JSEvents=()=>He("'JSEvents' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerKeyEventCallback")||(o.registerKeyEventCallback=()=>He("'registerKeyEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.specialHTMLTargets=Kl,Object.getOwnPropertyDescriptor(o,"maybeCStringToJsString")||(o.maybeCStringToJsString=()=>He("'maybeCStringToJsString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"findEventTarget")||(o.findEventTarget=()=>He("'findEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"findCanvasEventTarget")||(o.findCanvasEventTarget=()=>He("'findCanvasEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getBoundingClientRect")||(o.getBoundingClientRect=()=>He("'getBoundingClientRect' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillMouseEventData")||(o.fillMouseEventData=()=>He("'fillMouseEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerMouseEventCallback")||(o.registerMouseEventCallback=()=>He("'registerMouseEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerWheelEventCallback")||(o.registerWheelEventCallback=()=>He("'registerWheelEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerUiEventCallback")||(o.registerUiEventCallback=()=>He("'registerUiEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerFocusEventCallback")||(o.registerFocusEventCallback=()=>He("'registerFocusEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillDeviceOrientationEventData")||(o.fillDeviceOrientationEventData=()=>He("'fillDeviceOrientationEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerDeviceOrientationEventCallback")||(o.registerDeviceOrientationEventCallback=()=>He("'registerDeviceOrientationEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillDeviceMotionEventData")||(o.fillDeviceMotionEventData=()=>He("'fillDeviceMotionEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerDeviceMotionEventCallback")||(o.registerDeviceMotionEventCallback=()=>He("'registerDeviceMotionEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"screenOrientation")||(o.screenOrientation=()=>He("'screenOrientation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillOrientationChangeEventData")||(o.fillOrientationChangeEventData=()=>He("'fillOrientationChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerOrientationChangeEventCallback")||(o.registerOrientationChangeEventCallback=()=>He("'registerOrientationChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillFullscreenChangeEventData")||(o.fillFullscreenChangeEventData=()=>He("'fillFullscreenChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerFullscreenChangeEventCallback")||(o.registerFullscreenChangeEventCallback=()=>He("'registerFullscreenChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerRestoreOldStyle")||(o.registerRestoreOldStyle=()=>He("'registerRestoreOldStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"hideEverythingExceptGivenElement")||(o.hideEverythingExceptGivenElement=()=>He("'hideEverythingExceptGivenElement' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"restoreHiddenElements")||(o.restoreHiddenElements=()=>He("'restoreHiddenElements' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setLetterbox")||(o.setLetterbox=()=>He("'setLetterbox' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"currentFullscreenStrategy")||(o.currentFullscreenStrategy=()=>He("'currentFullscreenStrategy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"restoreOldWindowedStyle")||(o.restoreOldWindowedStyle=()=>He("'restoreOldWindowedStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"softFullscreenResizeWebGLRenderTarget")||(o.softFullscreenResizeWebGLRenderTarget=()=>He("'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"doRequestFullscreen")||(o.doRequestFullscreen=()=>He("'doRequestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillPointerlockChangeEventData")||(o.fillPointerlockChangeEventData=()=>He("'fillPointerlockChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerPointerlockChangeEventCallback")||(o.registerPointerlockChangeEventCallback=()=>He("'registerPointerlockChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerPointerlockErrorEventCallback")||(o.registerPointerlockErrorEventCallback=()=>He("'registerPointerlockErrorEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"requestPointerLock")||(o.requestPointerLock=()=>He("'requestPointerLock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillVisibilityChangeEventData")||(o.fillVisibilityChangeEventData=()=>He("'fillVisibilityChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerVisibilityChangeEventCallback")||(o.registerVisibilityChangeEventCallback=()=>He("'registerVisibilityChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerTouchEventCallback")||(o.registerTouchEventCallback=()=>He("'registerTouchEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillGamepadEventData")||(o.fillGamepadEventData=()=>He("'fillGamepadEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerGamepadEventCallback")||(o.registerGamepadEventCallback=()=>He("'registerGamepadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerBeforeUnloadEventCallback")||(o.registerBeforeUnloadEventCallback=()=>He("'registerBeforeUnloadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillBatteryEventData")||(o.fillBatteryEventData=()=>He("'fillBatteryEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"battery")||(o.battery=()=>He("'battery' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerBatteryEventCallback")||(o.registerBatteryEventCallback=()=>He("'registerBatteryEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setCanvasElementSize")||(o.setCanvasElementSize=()=>He("'setCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getCanvasElementSize")||(o.getCanvasElementSize=()=>He("'getCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"demangle")||(o.demangle=()=>He("'demangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"demangleAll")||(o.demangleAll=()=>He("'demangleAll' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"jsStackTrace")||(o.jsStackTrace=()=>He("'jsStackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackTrace")||(o.stackTrace=()=>He("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getEnvStrings")||(o.getEnvStrings=()=>He("'getEnvStrings' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"checkWasiClock")||(o.checkWasiClock=()=>He("'checkWasiClock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToI64")||(o.writeI53ToI64=()=>He("'writeI53ToI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToI64Clamped")||(o.writeI53ToI64Clamped=()=>He("'writeI53ToI64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToI64Signaling")||(o.writeI53ToI64Signaling=()=>He("'writeI53ToI64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToU64Clamped")||(o.writeI53ToU64Clamped=()=>He("'writeI53ToU64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToU64Signaling")||(o.writeI53ToU64Signaling=()=>He("'writeI53ToU64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readI53FromI64")||(o.readI53FromI64=()=>He("'readI53FromI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readI53FromU64")||(o.readI53FromU64=()=>He("'readI53FromU64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertI32PairToI53")||(o.convertI32PairToI53=()=>He("'convertI32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertU32PairToI53")||(o.convertU32PairToI53=()=>He("'convertU32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setImmediateWrapped")||(o.setImmediateWrapped=()=>He("'setImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"clearImmediateWrapped")||(o.clearImmediateWrapped=()=>He("'clearImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"polyfillSetImmediate")||(o.polyfillSetImmediate=()=>He("'polyfillSetImmediate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"uncaughtExceptionCount")||(o.uncaughtExceptionCount=()=>He("'uncaughtExceptionCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exceptionLast")||(o.exceptionLast=()=>He("'exceptionLast' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exceptionCaught")||(o.exceptionCaught=()=>He("'exceptionCaught' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ExceptionInfo")||(o.ExceptionInfo=()=>He("'ExceptionInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"CatchInfo")||(o.CatchInfo=()=>He("'CatchInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exception_addRef")||(o.exception_addRef=()=>He("'exception_addRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exception_decRef")||(o.exception_decRef=()=>He("'exception_decRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Browser")||(o.Browser=()=>He("'Browser' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"funcWrappers")||(o.funcWrappers=()=>He("'funcWrappers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getFuncWrapper")||(o.getFuncWrapper=()=>He("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setMainLoop")||(o.setMainLoop=()=>He("'setMainLoop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"wget")||(o.wget=()=>He("'wget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"FS")||(o.FS=()=>He("'FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"MEMFS")||(o.MEMFS=()=>He("'MEMFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"TTY")||(o.TTY=()=>He("'TTY' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PIPEFS")||(o.PIPEFS=()=>He("'PIPEFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SOCKFS")||(o.SOCKFS=()=>He("'SOCKFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"_setNetworkCallback")||(o._setNetworkCallback=()=>He("'_setNetworkCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"tempFixedLengthArray")||(o.tempFixedLengthArray=()=>He("'tempFixedLengthArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"miniTempWebGLFloatBuffers")||(o.miniTempWebGLFloatBuffers=()=>He("'miniTempWebGLFloatBuffers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"heapObjectForWebGLType")||(o.heapObjectForWebGLType=()=>He("'heapObjectForWebGLType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"heapAccessShiftForWebGLHeap")||(o.heapAccessShiftForWebGLHeap=()=>He("'heapAccessShiftForWebGLHeap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GL")||(o.GL=()=>He("'GL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGet")||(o.emscriptenWebGLGet=()=>He("'emscriptenWebGLGet' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"computeUnpackAlignedImageSize")||(o.computeUnpackAlignedImageSize=()=>He("'computeUnpackAlignedImageSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetTexPixelData")||(o.emscriptenWebGLGetTexPixelData=()=>He("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetUniform")||(o.emscriptenWebGLGetUniform=()=>He("'emscriptenWebGLGetUniform' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"webglGetUniformLocation")||(o.webglGetUniformLocation=()=>He("'webglGetUniformLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"webglPrepareUniformLocationsBeforeFirstUse")||(o.webglPrepareUniformLocationsBeforeFirstUse=()=>He("'webglPrepareUniformLocationsBeforeFirstUse' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"webglGetLeftBracePos")||(o.webglGetLeftBracePos=()=>He("'webglGetLeftBracePos' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetVertexAttrib")||(o.emscriptenWebGLGetVertexAttrib=()=>He("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeGLArray")||(o.writeGLArray=()=>He("'writeGLArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"AL")||(o.AL=()=>He("'AL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_unicode")||(o.SDL_unicode=()=>He("'SDL_unicode' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_ttfContext")||(o.SDL_ttfContext=()=>He("'SDL_ttfContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_audio")||(o.SDL_audio=()=>He("'SDL_audio' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL")||(o.SDL=()=>He("'SDL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_gfx")||(o.SDL_gfx=()=>He("'SDL_gfx' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLUT")||(o.GLUT=()=>He("'GLUT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"EGL")||(o.EGL=()=>He("'EGL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLFW_Window")||(o.GLFW_Window=()=>He("'GLFW_Window' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLFW")||(o.GLFW=()=>He("'GLFW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLEW")||(o.GLEW=()=>He("'GLEW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"IDBStore")||(o.IDBStore=()=>He("'IDBStore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runAndAbortIfError")||(o.runAndAbortIfError=()=>He("'runAndAbortIfError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetIndexed")||(o.emscriptenWebGLGetIndexed=()=>He("'emscriptenWebGLGetIndexed' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"InternalError")||(o.InternalError=()=>He("'InternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"BindingError")||(o.BindingError=()=>He("'BindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UnboundTypeError")||(o.UnboundTypeError=()=>He("'UnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PureVirtualError")||(o.PureVirtualError=()=>He("'PureVirtualError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_embind")||(o.init_embind=()=>He("'init_embind' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwInternalError")||(o.throwInternalError=()=>He("'throwInternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwBindingError")||(o.throwBindingError=()=>He("'throwBindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwUnboundTypeError")||(o.throwUnboundTypeError=()=>He("'throwUnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ensureOverloadTable")||(o.ensureOverloadTable=()=>He("'ensureOverloadTable' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exposePublicSymbol")||(o.exposePublicSymbol=()=>He("'exposePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"replacePublicSymbol")||(o.replacePublicSymbol=()=>He("'replacePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"extendError")||(o.extendError=()=>He("'extendError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"createNamedFunction")||(o.createNamedFunction=()=>He("'createNamedFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registeredInstances")||(o.registeredInstances=()=>He("'registeredInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getBasestPointer")||(o.getBasestPointer=()=>He("'getBasestPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerInheritedInstance")||(o.registerInheritedInstance=()=>He("'registerInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"unregisterInheritedInstance")||(o.unregisterInheritedInstance=()=>He("'unregisterInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getInheritedInstance")||(o.getInheritedInstance=()=>He("'getInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getInheritedInstanceCount")||(o.getInheritedInstanceCount=()=>He("'getInheritedInstanceCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getLiveInheritedInstances")||(o.getLiveInheritedInstances=()=>He("'getLiveInheritedInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registeredTypes")||(o.registeredTypes=()=>He("'registeredTypes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"awaitingDependencies")||(o.awaitingDependencies=()=>He("'awaitingDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"typeDependencies")||(o.typeDependencies=()=>He("'typeDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registeredPointers")||(o.registeredPointers=()=>He("'registeredPointers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerType")||(o.registerType=()=>He("'registerType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"whenDependentTypesAreResolved")||(o.whenDependentTypesAreResolved=()=>He("'whenDependentTypesAreResolved' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"embind_charCodes")||(o.embind_charCodes=()=>He("'embind_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"embind_init_charCodes")||(o.embind_init_charCodes=()=>He("'embind_init_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readLatin1String")||(o.readLatin1String=()=>He("'readLatin1String' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getTypeName")||(o.getTypeName=()=>He("'getTypeName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"heap32VectorToArray")||(o.heap32VectorToArray=()=>He("'heap32VectorToArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"requireRegisteredType")||(o.requireRegisteredType=()=>He("'requireRegisteredType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getShiftFromSize")||(o.getShiftFromSize=()=>He("'getShiftFromSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"integerReadValueFromPointer")||(o.integerReadValueFromPointer=()=>He("'integerReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"enumReadValueFromPointer")||(o.enumReadValueFromPointer=()=>He("'enumReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"floatReadValueFromPointer")||(o.floatReadValueFromPointer=()=>He("'floatReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"simpleReadValueFromPointer")||(o.simpleReadValueFromPointer=()=>He("'simpleReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runDestructors")||(o.runDestructors=()=>He("'runDestructors' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"new_")||(o.new_=()=>He("'new_' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"craftInvokerFunction")||(o.craftInvokerFunction=()=>He("'craftInvokerFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"embind__requireFunction")||(o.embind__requireFunction=()=>He("'embind__requireFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"tupleRegistrations")||(o.tupleRegistrations=()=>He("'tupleRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"structRegistrations")||(o.structRegistrations=()=>He("'structRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"genericPointerToWireType")||(o.genericPointerToWireType=()=>He("'genericPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"constNoSmartPtrRawPointerToWireType")||(o.constNoSmartPtrRawPointerToWireType=()=>He("'constNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"nonConstNoSmartPtrRawPointerToWireType")||(o.nonConstNoSmartPtrRawPointerToWireType=()=>He("'nonConstNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_RegisteredPointer")||(o.init_RegisteredPointer=()=>He("'init_RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer")||(o.RegisteredPointer=()=>He("'RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_getPointee")||(o.RegisteredPointer_getPointee=()=>He("'RegisteredPointer_getPointee' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_destructor")||(o.RegisteredPointer_destructor=()=>He("'RegisteredPointer_destructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_deleteObject")||(o.RegisteredPointer_deleteObject=()=>He("'RegisteredPointer_deleteObject' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_fromWireType")||(o.RegisteredPointer_fromWireType=()=>He("'RegisteredPointer_fromWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runDestructor")||(o.runDestructor=()=>He("'runDestructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"releaseClassHandle")||(o.releaseClassHandle=()=>He("'releaseClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"finalizationRegistry")||(o.finalizationRegistry=()=>He("'finalizationRegistry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"detachFinalizer_deps")||(o.detachFinalizer_deps=()=>He("'detachFinalizer_deps' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"detachFinalizer")||(o.detachFinalizer=()=>He("'detachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"attachFinalizer")||(o.attachFinalizer=()=>He("'attachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"makeClassHandle")||(o.makeClassHandle=()=>He("'makeClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_ClassHandle")||(o.init_ClassHandle=()=>He("'init_ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle")||(o.ClassHandle=()=>He("'ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_isAliasOf")||(o.ClassHandle_isAliasOf=()=>He("'ClassHandle_isAliasOf' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwInstanceAlreadyDeleted")||(o.throwInstanceAlreadyDeleted=()=>He("'throwInstanceAlreadyDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_clone")||(o.ClassHandle_clone=()=>He("'ClassHandle_clone' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_delete")||(o.ClassHandle_delete=()=>He("'ClassHandle_delete' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"deletionQueue")||(o.deletionQueue=()=>He("'deletionQueue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_isDeleted")||(o.ClassHandle_isDeleted=()=>He("'ClassHandle_isDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_deleteLater")||(o.ClassHandle_deleteLater=()=>He("'ClassHandle_deleteLater' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"flushPendingDeletes")||(o.flushPendingDeletes=()=>He("'flushPendingDeletes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"delayFunction")||(o.delayFunction=()=>He("'delayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setDelayFunction")||(o.setDelayFunction=()=>He("'setDelayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredClass")||(o.RegisteredClass=()=>He("'RegisteredClass' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"shallowCopyInternalPointer")||(o.shallowCopyInternalPointer=()=>He("'shallowCopyInternalPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"downcastPointer")||(o.downcastPointer=()=>He("'downcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"upcastPointer")||(o.upcastPointer=()=>He("'upcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"validateThis")||(o.validateThis=()=>He("'validateThis' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"char_0")||(o.char_0=()=>He("'char_0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"char_9")||(o.char_9=()=>He("'char_9' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"makeLegalFunctionName")||(o.makeLegalFunctionName=()=>He("'makeLegalFunctionName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_handle_array")||(o.emval_handle_array=()=>He("'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=()=>He("'emval_free_list' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_symbols")||(o.emval_symbols=()=>He("'emval_symbols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_emval")||(o.init_emval=()=>He("'init_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"count_emval_handles")||(o.count_emval_handles=()=>He("'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=()=>He("'get_first_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getStringOrSymbol")||(o.getStringOrSymbol=()=>He("'getStringOrSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Emval")||(o.Emval=()=>He("'Emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_newers")||(o.emval_newers=()=>He("'emval_newers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"craftEmvalAllocator")||(o.craftEmvalAllocator=()=>He("'craftEmvalAllocator' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_get_global")||(o.emval_get_global=()=>He("'emval_get_global' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_methodCallers")||(o.emval_methodCallers=()=>He("'emval_methodCallers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_registeredMethods")||(o.emval_registeredMethods=()=>He("'emval_registeredMethods' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"warnOnce")||(o.warnOnce=()=>He("'warnOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackSave")||(o.stackSave=()=>He("'stackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackRestore")||(o.stackRestore=()=>He("'stackRestore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackAlloc")||(o.stackAlloc=()=>He("'stackAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"AsciiToString")||(o.AsciiToString=()=>He("'AsciiToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToAscii")||(o.stringToAscii=()=>He("'stringToAscii' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UTF16ToString")||(o.UTF16ToString=()=>He("'UTF16ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToUTF16")||(o.stringToUTF16=()=>He("'stringToUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF16")||(o.lengthBytesUTF16=()=>He("'lengthBytesUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UTF32ToString")||(o.UTF32ToString=()=>He("'UTF32ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToUTF32")||(o.stringToUTF32=()=>He("'stringToUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF32")||(o.lengthBytesUTF32=()=>He("'lengthBytesUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"allocateUTF8")||(o.allocateUTF8=()=>He("'allocateUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"allocateUTF8OnStack")||(o.allocateUTF8OnStack=()=>He("'allocateUTF8OnStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.writeStackCookie=me,o.checkStackCookie=ge,Object.getOwnPropertyDescriptor(o,"ALLOC_NORMAL")||Object.defineProperty(o,"ALLOC_NORMAL",{configurable:!0,get:function(){He("'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(){He("'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Ce=function e(){Id||dp(),Id||(Ce=e)},o.run=dp,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();var gp=!0;return o.noInitialRun&&(gp=!1),dp(),e.ready});const qe=Ge;var We=r(2934),ze=r(7984);const Ve=qe,Ye=(e,t)=>null!=t?[t,e.split("/").pop()].join(""):new URL(e,window.location.origin);var $e,Ke,Ze=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},Je=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 et{constructor(e){$e.set(this,void 0),Ke.set(this,void 0),Ze(this,$e,e,"f"),Ze(this,Ke,new C(e),"f")}async loadFromString(e){return ue("sceneContent",e,ie()),new Promise((t=>{Je(this,$e,"f").loadSceneFromString(e,(e=>{const r=U(e);t(r)}))}))}async loadFromURL(e){return ue("url",e,ie()),new Promise((t=>{Je(this,$e,"f").loadSceneFromURL(e,(e=>{const r=U(e);t(r)}))}))}async saveToString(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):Je(this,$e,"f").saveSceneToString(r,(t=>{const r=U(t);e(r)}))}))}async saveToArchive(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):Je(this,$e,"f").saveSceneToArchive(r,(r=>{"error"in r?t(r.error):e(new Blob([r],{type:pe.Zip}))}))}))}create(){return U(Je(this,$e,"f").createScene({layout:g.Free}))}createFromImage(e,t=300,r=1){return ue("url",e,ie()),ue("dpi",t,ae(oe(),0)),ue("pixelScaleFactor",r,ae(oe(),0)),new Promise((n=>{Je(this,$e,"f").createSceneFromImage(e,t,r,g.Free,0,!1,(e=>{const t=U(e);n(t)}))}))}get(){const e=U(Je(this,$e,"f").findByType(O.Scene)),t=ge(e);return t.length>0?t[0]:null}async applyTemplateFromString(e){return ue("content",e,ie()),new Promise((t=>{Je(this,$e,"f").applyTemplateFromString(e,(e=>{U(e),t()}))}))}async applyTemplateFromURL(e){return ue("url",e,ie()),new Promise((t=>{Je(this,$e,"f").applyTemplateFromURL(e,(e=>{U(e),t()}))}))}unstable_setDesignUnit(e){ue("designUnit",e,ie()),U(Je(this,$e,"f").unstable_setDesignUnit(R.fromDesignUnit(e)))}unstable_getDesignUnit(){return R.toDesignUnit(U(Je(this,$e,"f").unstable_getDesignUnit()))}}function tt(e,t){var r,n;const o=null==e?void 0:e.getBoundingClientRect(),i=null!==(r=null==o?void 0:o.top)&&void 0!==r?r:0,a=null!==(n=null==o?void 0:o.left)&&void 0!==n?n:0,s=function(e){return"undefined"!=typeof TouchEvent&&e instanceof TouchEvent}(t),c=s?t.changedTouches[0].clientX:t.clientX,u=s?t.changedTouches[0].clientY:t.clientY;return{position:{x:(c-a)*window.devicePixelRatio,y:(u-i)*window.devicePixelRatio},isOverUIElement:!1,isTouch:s,timestamp:Date.now()}}$e=new WeakMap,Ke=new WeakMap;var rt,nt=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 ot{constructor(e){rt.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,rt,e,"f")}findAll(){return ge(nt(this,rt,"f").findAllVariables())}setString(e,t){return ue("key",e,ie()),ue("value",t,ie()),U(nt(this,rt,"f").setVariableString(e,t))}getString(e){return ue("key",e,ie()),U(nt(this,rt,"f").getVariableString(e))}remove(e){return ue("key",e,ie()),U(nt(this,rt,"f").removeVariable(e))}}rt=new WeakMap;var it,at,st,ct,ut,lt,dt,pt,ft,mt,gt=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},ht=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 Et{constructor(e,r,n){it.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}),Object.defineProperty(this,"editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"unstable_assetRegistry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),at.set(this,void 0),st.set(this,void 0),ct.set(this,void 0),ut.set(this,(()=>{const e=this.block.findByType(O.Camera)[0];if(!e)return;if(void 0===ht(this,st,"f"))return;const{width:t,height:r}=ht(this,st,"f"),n=ht(this,at,"f").getValue(e,me.Camera,"resolution");I(n.width,t,1e-4)&&I(n.height,r,1e-4)||ht(this,at,"f").setValue(e,me.Camera,"resolution",{width:t,height:r}),"undefined"!=typeof window&&(I(ht(this,at,"f").getValue(e,me.Camera,"pixelRatio"),window.devicePixelRatio,1e-4)||ht(this,at,"f").setValue(e,me.Camera,"pixelRatio",window.devicePixelRatio))})),lt.set(this,void 0),dt.set(this,void 0),gt(this,ct,e,"f"),gt(this,at,new C(e),"f"),gt(this,st,r,"f"),this.block=new _e(e),this.scene=new et(e),this.variable=new ot(e),this.editor=new Le(e),this.event=new Xe(e),this.unstable_assetRegistry=new class{constructor(){Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:"ly.img.AssetRegistry"}),Object.defineProperty(this,"assetSources",{enumerable:!0,configurable:!0,writable:!0,value:[]})}async getGroups(e){return(await Promise.all(this.assetSources.map((t=>t.getGroups(e))))).reduce(((e,t)=>(e.push(...t),e)),[])}getTypes(){return this.assetSources.reduce(((e,t)=>{const r=t.getTypes();return e.push(...r),e}),[])}hasType(e){return this.assetSources.some((t=>t.hasType(e)))}getSources(e){return e?this.assetSources.filter((t=>t.hasType(e))):this.assetSources}getSource(e){return this.assetSources.find((t=>t.id===e))}addSource(e){this.assetSources.push(e)}removeSource(e){const t=this.assetSources.findIndex((t=>t.id===e));return t>=0&&(this.assetSources.splice(t,1),!0)}},this.unstable_assetRegistry.addSource(new class{constructor(e,t,r={}){var n,o,i,a;N.add(this),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"canManageAssets",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"helper",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),j.set(this,void 0),L.set(this,void 0),H.set(this,void 0),B.set(this,void 0),this.id=e,this.helper=new C(t),this.canManageAssets=null!==(n=r.canManageAssets)&&void 0!==n&&n,G(this,j,null!==(o=r.hasType)&&void 0!==o?o:()=>!1,"f"),G(this,L,null!==(i=r.getLabel)&&void 0!==i?i:(e,t)=>t,"f"),G(this,H,null!==(a=r.getTags)&&void 0!==a?a:()=>[],"f"),G(this,B,r.defaultFont,"f")}getAsset(){throw new Error("Method not implemented.")}addAsset(){throw new Error("Method not implemented.")}updateAsset(){throw new Error("Method not implemented.")}removeAsset(){throw new Error("Method not implemented.")}getTypes(){throw new Error("Method not implemented")}async findAssets(e,t){const r=await this.getAssets(e,t),n=this.filterAssets(r,t),o=n.length,i=t.page,a=this.sliceAssets(n,t);return{assets:a,total:o,currentPage:i,nextPage:(t.page-1)*t.perPage+a.length<o?i+1:void 0}}getGroups(e){return this.helper.execute("ubq/assets/getRegisteredCategoryIDsForType",e)}hasType(e){return"ly.img.text"===e||"ly.img.video"===e||q(this,j,"f").call(this,e)}async getAssetIds(e,{groups:t,excludeGroups:r}){let n=[];if(t&&Array.isArray(t)&&t.length>0)n=await this.getAssetIdsForGroups(e,t,r);else{const t=await this.helper.execute("ubq/assets/getRegisteredAssetIDsForType",e),o=await this.getGroups(e);n=await(o.length>0?this.getAssetIdsForGroups(e,o,r,t):t)}return n}async getAssets(e,t){if("ly.img.text"===e)return async function(e,t,r,n=(e=>e)){return async function(e,t,r){var n,o;let i=[];const a=null!==(n=Object.values(await async function(){const e={},r=await t.execute("ubq/assets/getRegisteredAssetIDsForType","ly.img.font");return await Promise.all(r.map((async r=>{var n;const o=await t.execute("ubq/assets/getMetadata",[r,"fontFamily"]);(null!==(n=e[o])&&void 0!==n?n:e[o]=[]).push({assetId:r})}))),e}()).find((e=>(e.length>i.length&&(i=e),e.some((e=>e.assetId===r))))))&&void 0!==n?n:i,s=null!==(o=a.find((e=>e.assetId===r)))&&void 0!==o?o:a[0];if(void 0===s)return e;await async function(e){await Promise.all([...e.map((e=>t.execute("ubq/assets/getMetadata",[e.assetId,"fontWeight"]).then((t=>{e.fontWeight=t})))),...e.map((e=>t.execute("ubq/assets/getMetadata",[e.assetId,"fontStyle"]).then((t=>{e.fontStyle=t}))))])}(a);const c=a.filter((e=>e.fontStyle===s.fontStyle));if(0===c.length)return e;const u=await Promise.all(e.map((async e=>{var r,n,o;const i=null===(o=(Array.isArray(null===(r=e.meta)||void 0===r?void 0:r.fontWeight)?null===(n=e.meta)||void 0===n?void 0:n.fontWeight:[]).map((e=>c.find((t=>t.fontWeight===e)))).filter(Boolean)[0])||void 0===o?void 0:o.assetId,a=null!=i?i:null==s?void 0:s.assetId,u=await t.execute("ubq/assets/getMetadata",[a,"fontFileUri"]);return Object.assign(Object.assign({},e),{meta:Object.assign(Object.assign({},e.meta),{fontId:a,uri:u})})})));return u}([{id:"title",type:"ly.img.text",label:n("title"),thumbUri:"",size:{width:1,height:1},meta:{fontScale:2,fontWeight:[700,800,900,600,500]},context:t},{id:"headline",type:"ly.img.text",label:n("headline"),thumbUri:"",size:{width:1,height:1},meta:{fontScale:1.4,fontWeight:[500,600,700]},context:t},{id:"paragraph",type:"ly.img.text",label:n("paragraph"),thumbUri:"",size:{width:1,height:1},meta:{fontScale:1,fontWeight:[400,300,500]},context:t}],e,r)}(this.helper,{sourceId:this.id},q(this,B,"f"),(e=>q(this,L,"f").call(this,"ly.img.text",e)));if("ly.img.vectorpath"===e){let r=[];t.groups&&t.groups.includes("//ly.img.cesdk.vectorpaths/category/vectorpaths")&&(r=await async function(e,t=(e=>e)){return[O.RectShape,O.LineShape,O.StarShape,O.PolygonShape,O.EllipseShape].map((r=>({id:r,type:"ly.img.vectorpath",label:t(r),thumbUri:"",size:{width:1,height:1},context:e})))}({sourceId:this.id},(e=>q(this,L,"f").call(this,"ly.img.vectorpath",e))));const n=await this.getGenericAssets(e,t);return[...r,...n]}return this.getGenericAssets(e,t)}async getGenericAssets(e,t){const{groups:r,locale:n}=t,o=await this.getAssetIds(e,t);return await Promise.all(o.map((async t=>{const{thumbUri:o,size:i,meta:a}=await this.getAssetMetaData(t,e),s=q(this,L,"f").call(this,e,t),c=q(this,H,"f").call(this,e,t);return{id:t,type:e,groups:r,thumbUri:o,size:i,meta:a,locale:n,label:s,tags:c,context:{sourceId:this.id}}})))}async getAssetMetaData(e,t){const[r,n,o,i,a,s,c]=await Promise.all([q(this,N,"m",X).call(this,e,"thumbPath"),q(this,N,"m",X).call(this,e,"width"),q(this,N,"m",X).call(this,e,"height"),"ly.img.vectorpath"===t?q(this,N,"m",X).call(this,e,"vectorPath"):Promise.resolve(""),"ly.img.image"===t?q(this,N,"m",X).call(this,e,"imagePath"):Promise.resolve(void 0),"ly.img.video"===t?q(this,N,"m",X).call(this,e,"videoPath"):Promise.resolve(void 0),"ly.img.sticker"===t?q(this,N,"m",X).call(this,e,"imageUri"):Promise.resolve(void 0)]),u=U(this.helper.ubq.getAbsoluteURI(r));return i?{thumbUri:u,size:{width:n,height:o},meta:{vectorPath:i}}:{thumbUri:u,size:{width:n,height:o},meta:{uri:a||c||s}}}filterAssets(e,t){const{query:r}=t;if(!r)return e;const n=_()(r.toLowerCase());return r?e.filter((e=>{if(e.label||e.tags){const t=[e.label||"",e.tags||""].join(",").toLowerCase();return n.every((e=>t.match(e)))}if(e.id){const t=e.id.toLowerCase();return n.every((e=>t.match(e)))}return!0})):e}sliceAssets(e,{page:t,perPage:r}){const n=((null!=t?t:1)-1)*r;return e.slice(n,n+r)}async getAssetIdsForGroups(e,t,r=[],n=[]){const o={},i={},a=await Promise.all(t.map((async t=>{const n=await q(this,N,"m",Q).call(this,t,e);return r.includes(t)?(n.forEach((e=>{i[e]=!0})),[]):n.filter((e=>!o[e]&&!i[e]&&(o[e]=!0,!0)))}))),s=n.filter((e=>!o[e]&&!i[e])),c=w()(...a,s);return y()(c).filter(Boolean)}}("local",e,{defaultFont:n.defaultFont})),function(e){const r={assets:[],total:0,currentPage:1,nextPage:void 0};return Object.entries(e).map((([e,n])=>{const o=n.types||["ly.img.image"];if(!n.findAssets)throw new Error("New asset source needs to define `findAssets` at least");return Object.assign(Object.assign(Object.assign({id:e},t),n),{findAssets:async(e,t)=>o.includes(e)&&await n.findAssets(e,t)||Promise.resolve(r),hasType:e=>o.includes(e)})}))}(n.assetSources).forEach((e=>this.unstable_assetRegistry.addSource(e))),ht(this,at,"f").useInternalAPI((e=>{e.setPreUpdateCallback(ht(this,ut,"f"))})),ht(this,it,"m",pt).call(this),"undefined"!=typeof window&&window.Cypress&&(this.config=n,this.helper=ht(this,at,"f"),this.onPostUpdate=e=>{ht(this,at,"f").useInternalAPI((t=>{t.setPostUpdateCallback(e)}))})}dispose(){ht(this,it,"m",ft).call(this),ht(this,at,"f").useInternalAPI((e=>{e.setPreUpdateCallback(null)})),gt(this,st,null,"f"),gt(this,at,null,"f"),this.block=null,this.scene=null,this.variable=null,ht(this,ct,"f").delete(),gt(this,ct,null,"f")}static async init(e,t){console.log("[CreativeEngine] Revision 8871b65173361c4e624a82732b22a57a71bdcfb4"),"undefined"==typeof document||t||(t=document.createElement("canvas"));const r=Ie(e);return new this(await function(e,t){const r=Ie(t),{core:n}=r,o=null!==(s=null===(a=null==(i=r)?void 0:i.callbacks)||void 0===a?void 0:a.log)&&void 0!==s?s:Pe;var i,a,s;return new Promise(((t,i)=>{let a,s;return Ve({locateFile:(e,t)=>{if(e.endsWith(".wasm")){const e=Ye(We,n.baseURL).toString();return a=e,e}if(e.endsWith(".data")){const e=Ye(ze,n.baseURL).toString();return s=e,e}return t+e},print:e=>{e&&"undefined"!==e&&o(e,be.Info)},printErr:e=>{e&&"undefined"!==e&&o(e,be.Error)},onRuntimeInitialized:()=>{o("Engine has been initialized.",be.Info)},logReadFiles:!1,printWithColors:!0}).then((n=>{let o="";"string"==typeof e?o=e:void 0!==e&&(n.specialHTMLTargets["!canvas"]=e,o="!canvas");const a=n.createEngine(o);if(a.isValid()){const e=a.value();!function(e,t){var r;const n=new C(e);function o(e,t){return n.execute("ubq/settings/set",[e,t])}o("ubq://license",t.license||""),o("ubq://role",x[t.role]),o("ubq://basePath",t.baseURL),o("ubq://touchScrollingEnabled",!(null===(r=t.featureFlags)||void 0===r?void 0:r.preventScrolling)),Object.entries(t.presets.images||{}).forEach((([e,t])=>{n.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((r=>{const o=`${e}_${r.weight}_${r.style}`;n.execute("ubq/assets/registerFont",[o,r.fontURL,t.family,r.weight,r.style])}))})),function(){const{imageMattingOnly:e,singlePageMode:r}=t.featureFlags||{};"undefined"!=typeof window&&("VideoFrame"in window&&"VideoDecoder"in window&&"VideoEncoder"in window||o("ubq://features/videosEnabled",!1)),o("ubq://features/singlePageModeEnabled",r),o("cesdk://trackActivePage",!r),o("ubq://features/effectsEnabled",!0)}(),o("ubq://page/title/fontFileUri",t.page.title.fontFileUri),o("ubq://page/title/show",t.page.title.show),o("ubq://page/dimOutOfPageAreas",t.page.dimOutOfPageAreas),function(){if(void 0!==t.scene.maskSpotColor){const{rgbApproximation:e}=t.scene.maskSpotColor,r=M.fromRGBA(Object.assign(Object.assign({},e),{a:1}));n.execute("cesdk/setSpecialSpotColor",r)}}(),function(){var e;const r=null!==(e=t.extensions)&&void 0!==e?e:[];r.entries.forEach((e=>{n.execute("ubq/extension/register",`${r.baseURL+e}`)}))}(),function(){var r;const n=null!==(r=t.variables)&&void 0!==r?r:{};Object.entries(n).forEach((([t,r])=>{U(e.setVariableString(t,r.value.toString()))}))}()}(e,r),t(e)}else{const e=a.error();i(new Error(e.publicMessage())),e.delete()}a.delete()})).catch((e=>{e instanceof Error&&(e.wasmPath=a,e.dataPath=s),i(e)}))}))}(t,r),t,r)}}at=new WeakMap,st=new WeakMap,ct=new WeakMap,ut=new WeakMap,lt=new WeakMap,dt=new WeakMap,it=new WeakSet,pt=function(e=!0){if(ht(this,lt,"f"))return;if("undefined"!=typeof HTMLCanvasElement&&ht(this,st,"f")instanceof HTMLCanvasElement){const e=function(e,t){const r=r=>{const n=tt(e,r);n.isTouch&&r.preventDefault(),t.execute("ubq/inputs/mousemove",n)},n=r=>{const n=Object.assign(Object.assign({},tt(e,r)),{button:T(r instanceof MouseEvent?r.button:c.Left),state:u.Up,shiftIsHeld:r.shiftKey});t.execute("ubq/inputs/mousebutton",n)},o=r=>{const n=Object.assign(Object.assign({},tt(e,r)),{button:T(r instanceof MouseEvent?r.button:c.Left),state:u.Down,shiftIsHeld:r.shiftKey});t.execute("ubq/inputs/mousebutton",n)};return e.addEventListener("mousemove",r),e.addEventListener("mousedown",o),e.addEventListener("mouseup",n),e.addEventListener("touchmove",r),e.addEventListener("touchstart",o),e.addEventListener("touchend",n),e.addEventListener("touchcancel",n),()=>{e.removeEventListener("mousemove",r),e.removeEventListener("mousedown",o),e.removeEventListener("mouseup",n),e.removeEventListener("touchmove",r),e.removeEventListener("touchstart",o),e.removeEventListener("touchend",n),e.removeEventListener("touchcancel",n)}}(ht(this,st,"f"),ht(this,at,"f")),t=function(e,t){let r=null;const n=t.useInternalAPI((n=>n.addEventCallback("EditorStateUpdatedEvent",(async()=>{const{editMode:n}=await t.getEditorState();n!==F.Text||r?n!==F.Text&&r&&(r(),r=null):r=function(){var r;let n=!1;const o=document.createElement("textarea");return o.id="ubq_internal-inline_text_editing_html_representation",o.autocapitalize="none",o.spellcheck=!1,o.cols=4096,o.style.contain="strict",o.style.opacity="0",o.style.pointerEvents="none",o.style.zIndex="-1",o.style.position="absolute",o.style.width="1px",o.style.height="1px",o.style.padding="0",o.style.margin="-1px",o.style.overflow="hidden",o.style.clip="rect(0, 0, 0, 0)",o.style.whiteSpace="nowrap",o.style.border="0",o.addEventListener("input",a),o.addEventListener("keydown",s),o.addEventListener("copy",i),o.addEventListener("compositionstart",c),o.addEventListener("compositionupdate",u),o.addEventListener("compositionend",d),null===(r=null==e?void 0:e.parentElement)||void 0===r||r.appendChild(o),o.focus(),()=>{var t;o.removeEventListener("input",a),o.removeEventListener("keydown",s),o.removeEventListener("copy",i),o.removeEventListener("compositionstart",c),o.removeEventListener("compositionupdate",u),o.removeEventListener("compositionend",d),null===(t=null==e?void 0:e.parentElement)||void 0===t||t.removeChild(o)};function i(e){try{t.useInternalAPI((t=>{const r=U(t.getSelectedText());""!==r&&e.clipboardData&&(e.clipboardData.setData("text/plain",r),e.preventDefault())}))}catch(e){console.error(e)}}function a(e){var r,o;const i=e.target,{value:a}=i;let s=a.length;if(n){s=null!==(o=null!==(r=i.selectionEnd)&&void 0!==r?r:i.selectionStart)&&void 0!==o?o:0;const e=[...a];for(let t=0;t<e.length;t+=1)t<s&&(s-=e[t].length-1);t.execute("ubq/text/compositionUpdate",{value:a,cursorPosition:s})}else if(a.length>0){if("\n"!==a[0]){const e={key:l.Unknown,characters:a,shiftIsHeld:!1,commandIsHeld:!1,optionIsHeld:!1,timestamp:Date.now()};t.execute("ubq/inputs/keyboardkey",e)}i.value=""}}async function s(e){if("a"===e.key&&(e.metaKey||e.ctrlKey))return n&&(await t.execute("ubq/text/compositionEnd"),n=!1,e.currentTarget&&(o.value="")),void await t.execute("ubq/text/selectAllText");if("Escape"===e.key)return void async function(){const e=await t.getEditorState();t.setEditorState(Object.assign(Object.assign({},e),{editMode:F.Transform}))}();if("Backspace"!==e.key&&"Delete"!==e.key&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key&&"ArrowUp"!==e.key&&"ArrowDown"!==e.key&&"Enter"!==e.key)return;const r=function(e){const t={key:l.Unknown,characters:e.key,shiftIsHeld:e.shiftKey,commandIsHeld:e.metaKey||e.ctrlKey,optionIsHeld:e.altKey,timestamp:Date.now()};switch(e.key.toUpperCase()){case"0":t.key=l.Key0;break;case"1":t.key=l.Key1;break;case"2":t.key=l.Key2;break;case"3":t.key=l.Key3;break;case"4":t.key=l.Key4;break;case"5":t.key=l.Key5;break;case"6":t.key=l.Key6;break;case"7":t.key=l.Key7;break;case"8":t.key=l.Key8;break;case"9":t.key=l.Key9;break;case"A":t.key=l.A;break;case"B":t.key=l.B;break;case"C":t.key=l.C;break;case"D":t.key=l.D;break;case"E":t.key=l.E;break;case"F":t.key=l.F;break;case"G":t.key=l.G;break;case"H":t.key=l.H;break;case"I":t.key=l.I;break;case"J":t.key=l.J;break;case"K":t.key=l.K;break;case"L":t.key=l.L;break;case"M":t.key=l.M;break;case"N":t.key=l.N;break;case"O":t.key=l.O;break;case"P":t.key=l.P;break;case"Q":t.key=l.Q;break;case"R":t.key=l.R;break;case"S":t.key=l.S;break;case"T":t.key=l.T;break;case"U":t.key=l.U;break;case"V":t.key=l.V;break;case"W":t.key=l.W;break;case"X":t.key=l.X;break;case"Y":t.key=l.Y;break;case"Z":t.key=l.Z;break;case" ":t.key=l.Space;break;case"ESCAPE":t.key=l.Escape,t.characters="";break;case"BACKSPACE":t.key=l.Backspace,t.characters="";break;case"DELETE":t.key=l.Delete,t.characters="";break;case"ENTER":t.key=l.Enter,t.characters="\n";break;case"CONTROL":t.key=l.Control,t.characters="";break;case"ALT":t.key=l.Option,t.characters="";break;case"SHIFT":t.key=l.Shift,t.characters="";break;case"ARROWLEFT":t.key=l.ArrowLeft,t.characters="";break;case"ARROWRIGHT":t.key=l.ArrowRight,t.characters="";break;case"ARROWUP":t.key=l.ArrowUp,t.characters="";break;case"ARROWDOWN":t.key=l.ArrowDown,t.characters="";break;case"DEAD":t.key=l.Unknown,t.characters=""}return t}(e);await t.execute("ubq/inputs/keyboardkey",r),e.currentTarget&&(o.value="")}async function c(){n=!0,await t.execute("ubq/text/compositionStart")}function u(){n=!0}async function d(){n=!1,await t.execute("ubq/text/compositionEnd"),o.value=""}}()}))));return()=>{null==r||r(),n.dispose(),n.delete()}}(ht(this,st,"f"),ht(this,at,"f"));gt(this,dt,(()=>{e(),t()}),"f")}const t=()=>{ht(this,it,"m",mt).call(this,e),gt(this,lt,requestAnimationFrame(t),"f")};gt(this,lt,requestAnimationFrame(t),"f")},ft=function(){var e;null===(e=ht(this,dt,"f"))||void 0===e||e.call(this),gt(this,dt,void 0,"f"),ht(this,lt,"f")&&(cancelAnimationFrame(ht(this,lt,"f")),gt(this,lt,0,"f"))},mt=function(e=!0){e&&void 0!==ht(this,st,"f")&&1===this.block.findByType(O.Scene).length&&ht(this,at,"f").execute("ubq/render",{displayWidth:ht(this,st,"f").width,displayHeight:ht(this,st,"f").height}),ht(this,ct,"f").update()}})();var o=n.Il,i=n.yQ,a=n.Ju,s=n.in,c=n.HY,u=n.uU,l=n.ZP;export{o as Color,i as ConfigTypes,a as DesignBlockType,s as LogLevel,c as MimeType,u as Role,l as default};
|
|
1
|
+
var e={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},4691:(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)}},7554:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}},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),p=!r&&!l&&!d&&c(e),f=r||l||d||p,m=f?n(e.length,String):[],g=m.length;for(var h in e)!t&&!u.call(e,h)||f&&("length"==h||d&&("offset"==h||"parent"==h)||p&&("buffer"==h||"byteLength"==h||"byteOffset"==h)||s(h,g))||m.push(h);return m}},3675:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}},4656:e=>{e.exports=function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}},8247:e=>{var t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;e.exports=function(e){return e.match(t)||[]}},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},8288:(e,t,r)=>{var n=r(4656),o=r(1813);e.exports=function e(t,r,i,a,s){var c=-1,u=t.length;for(i||(i=o),s||(s=[]);++c<u;){var l=t[c];r>0&&i(l)?r>1?e(l,r-1,i,a,s):n(s,l):a||(s[s.length]=l)}return s}},3153:(e,t,r)=>{var n=r(7572)();e.exports=n},2759:(e,t,r)=>{var n=r(9652),o=r(5135),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,p=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?p: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(4691),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,p){t!==r&&i(r,(function(i,c){if(p||(p=new n),s(i))a(t,r,c,l,e,d,p);else{var f=d?d(u(t,c),i,c+"",t,r,p):void 0;void 0===f&&(f=i),o(t,c,f)}}),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),p=r(830),f=r(4820),m=r(1969),g=r(1859),h=r(7700),E=r(2963);e.exports=function(e,t,r,y,v,_,b){var w=h(e,r),T=h(t,r),O=b.get(T);if(O)n(e,r,O);else{var D=_?_(w,T,r+"",e,t,b):void 0,P=void 0===D;if(P){var x=u(T),S=!x&&d(T),R=!x&&!S&&g(T);D=T,x||S||R?u(w)?D=w:l(w)?D=a(w):S?(P=!1,D=o(T,!0)):R?(P=!1,D=i(T,!0)):D=[]:m(T)||c(T)?(D=w,c(w)?D=E(w):f(w)&&!p(w)||(D=s(T))):P=!1}P&&(b.set(T,D),v(D,T,y,_,b),b.delete(T)),n(e,r,D)}}},1445:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},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}},5208:(e,t,r)=>{var n=r(9652),o=r(3675),i=r(5860),a=r(1918),s=n?n.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return c?c.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},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},5135:(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]}},4530:e=>{var t=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;e.exports=function(e){return t.test(e)}},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))}},1813:(e,t,r)=>{var n=r(9652),o=r(5664),i=r(5860),a=n?n.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},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""}},5153:e=>{var t="a-z\\xdf-\\xf6\\xf8-\\xff",r="A-Z\\xc0-\\xd6\\xd8-\\xde",n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",o="["+n+"]",i="\\d+",a="["+t+"]",s="[^\\ud800-\\udfff"+n+i+"\\u2700-\\u27bf"+t+r+"]",c="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",l="["+r+"]",d="(?:"+a+"|"+s+")",p="(?:"+l+"|"+s+")",f="(?:['’](?:d|ll|m|re|s|t|ve))?",m="(?:['’](?:D|LL|M|RE|S|T|VE))?",g="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",h="[\\ufe0e\\ufe0f]?",E=h+g+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",c,u].join("|")+")"+h+g+")*",y="(?:"+["[\\u2700-\\u27bf]",c,u].join("|")+")"+E,v=RegExp([l+"?"+a+"+"+f+"(?="+[o,l,"$"].join("|")+")",p+"+"+m+"(?="+[o,l+d,"$"].join("|")+")",l+"?"+d+"+"+f,l+"+"+m,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",i,y].join("|"),"g");e.exports=function(e){return e.match(v)||[]}},7477:e=>{e.exports=function(e){return function(){return e}}},3355:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},9423:(e,t,r)=>{var n=r(8288);e.exports=function(e){return null!=e&&e.length?n(e,1):[]}},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}},1918:(e,t,r)=>{var n=r(2759),o=r(1408);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==n(e)}},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))}},8395:(e,t,r)=>{var n=r(5208);e.exports=function(e){return null==e?"":n(e)}},5377:(e,t,r)=>{var n=r(7554),o=r(3675),i=r(1445),a=r(1453),s=r(5274),c=Math.max;e.exports=function(e){if(!e||!e.length)return[];var t=0;return e=n(e,(function(e){if(s(e))return t=c(e.length,t),!0})),a(t,(function(t){return o(e,i(t))}))}},582:(e,t,r)=>{var n=r(8247),o=r(4530),i=r(8395),a=r(5153);e.exports=function(e,t,r){return e=i(e),void 0===(t=r?void 0:t)?o(e)?a(e):n(e):e.match(t)||[]}},3145:(e,t,r)=>{var n=r(5757)(r(5377));e.exports=n},7984:(e,t,r)=>{e.exports=r.p+"assets/core/cesdk.data"},2934:(e,t,r)=>{e.exports=r.p+"assets/core/cesdk.wasm"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n](i,i.exports,r),i.loaded=!0,i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.p="";var n={};(()=>{r.d(n,{Il:()=>M,yQ:()=>e,Ju:()=>O,in:()=>be,HY:()=>pe,uU:()=>x,ZP:()=>Et});var e={};r.r(e);const t={canManageAssets:!1,getGroups:()=>Promise.resolve([]),findAssets(){throw new Error("Implementation required")},getAsset(){throw new Error("Implementation required")},updateAsset(){throw new Error("Implementation required")},addAsset(){throw new Error("Implementation required")},removeAsset(){throw new Error("Implementation required")},getTypes(){throw new Error("Implementation required")},hasType(){throw new Error("Implementation required")}};var o,i,a,s,c,u,l,d,p,f,m,g,h,E=r(9423),y=r.n(E),v=r(582),_=r.n(v),b=r(3145),w=r.n(b);function T(e){switch(e){case 0:return c.Left;case 1:return c.Middle;case 2:return c.Right;default:return c.Unknown}}!function(e){e[e.Pending=0]="Pending",e[e.Ready=1]="Ready",e[e.Error=2]="Error"}(o||(o={})),function(e){e.Added="DesignBlockAddedEvent",e.Updated="DesignBlockUpdatedEvent",e.Removed="DesignBlockRemovedEvent"}(i||(i={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Center=2]="Center"}(a||(a={})),function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom",e[e.Center=2]="Center"}(s||(s={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Middle=2]="Middle",e[e.Unknown=255]="Unknown"}(c||(c={})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(u||(u={})),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"}(l||(l={})),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"}(d||(d={})),function(e){e[e.Normal=0]="Normal",e[e.Italic=1]="Italic"}(p||(p={})),function(e){e.Bold="bold",e.Italic="italic"}(f||(f={})),function(e){e[e.Undefined=0]="Undefined",e[e.DesignUnit=1]="DesignUnit",e[e.Percent=2]="Percent",e[e.Auto=3]="Auto"}(m||(m={})),function(e){e[e.Free=0]="Free",e[e.VerticalStack=1]="VerticalStack",e[e.HorizontalStack=2]="HorizontalStack"}(g||(g={})),function(e){e.Scene="//ly.img.ubq/scene",e.Stack="//ly.img.ubq/stack",e.Camera="//ly.img.ubq/camera",e.Page="//ly.img.ubq/page",e.Image="//ly.img.ubq/image",e.Video="//ly.img.ubq/video",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",e.Group="//ly.img.ubq/group"}(h||(h={}));const O=h;var D,P;!function(e){e[e.Information=0]="Information",e[e.Warning=1]="Warning",e[e.Error=2]="Error"}(D||(D={})),function(e){e[e.Creator=0]="Creator",e[e.Adopter=1]="Adopter",e[e.Viewer=2]="Viewer",e[e.Presenter=3]="Presenter"}(P||(P={}));const x=P;var S,R,M,F,A;!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"}(S||(S={})),function(e){e[e.Pixel=0]="Pixel",e[e.Millimeter=1]="Millimeter",e[e.Inch=2]="Inch"}(R||(R={})),function(e){e.toDesignUnit=function(t){return t===e.Pixel?"px":t===e.Millimeter?"mm":t===e.Inch?"in":void 0},e.fromDesignUnit=function(t){return"px"===t?e.Pixel:"mm"===t?e.Millimeter:"in"===t?e.Inch:void 0},e.getLabel=function(t){switch(t){case e.Pixel:return"px";case e.Millimeter:return"mm";case e.Inch:return"in";default:return""}},e.convertToPoints=function(t,r,n){switch(r){case e.Pixel:return t/n*72;case e.Inch:return 72*t;case e.Millimeter:return 72*t/25.4;default:throw new Error("Unknown design unit!")}}}(R||(R={})),function(e){let t;!function(e){e[e.sRGB=0]="sRGB",e[e.CMYK=1]="CMYK",e[e.SpotColor=2]="SpotColor"}(t=e.ColorSpace||(e.ColorSpace={})),e.fromRGBA=function(e){return{colorSpace:t.sRGB,components:{x:e.r,y:e.g,z:e.b,w:e.a},spotColor:{name:"",rgbApproximation:e,cmykApproximation:{c:.75,m:.68,y:.67,k:.9}}}},e.toRGBA=function(e){switch(e.colorSpace){case t.sRGB:return{r:e.components.x,g:e.components.y,b:e.components.z,a:e.components.w};case t.SpotColor:return e.spotColor.rgbApproximation;case t.CMYK:throw new Error("CMYK to RGBA conversion not supported!");default:throw new Error("Unknown color space!")}}}(M||(M={})),function(e){e.Transform="ubq/editMode/transform",e.Crop="ubq/editMode/crop",e.Text="ubq/editMode/text"}(F||(F={})),function(e){e[e.Arrow=0]="Arrow",e[e.Move=1]="Move",e[e.MoveNotPermitted=2]="MoveNotPermitted",e[e.Resize=3]="Resize",e[e.Rotate=4]="Rotate",e[e.Text=5]="Text"}(A||(A={}));const k=(e,t)=>({x:e.x*t,y:e.y*t});function I(e,t,r=Number.EPSILON){return Math.abs(e-t)<r}class C{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=U(this.ubq.getLastFrameWidth(t)),i=U(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 k(t,r>n?e.y/t.y:e.x/t.x)})(e,t),o=k(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=>U(o.setValue(e,t,r,n))))}getValue(e,t,r){return this.useInternalAPI((n=>U(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=U(e);r(t)})))).delete()}))}}function U(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)}}var N,j,L,H,B,X,Q,G=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},q=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)};j=new WeakMap,L=new WeakMap,H=new WeakMap,B=new WeakMap,N=new WeakSet,X=async function(e,t){return this.helper.execute("ubq/assets/getMetadata",[e,t])},Q=async function(e,t){const r=await this.helper.execute("ubq/assets/getRegisteredCategoryIDsForType",t),n=[];return await Promise.all(r.map((async t=>{if(t.endsWith(e)){const e=await this.helper.execute("ubq/assets/getAssetsInCategory",t);n.splice(n.length-1,0,...e)}}))),n};class W 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 z(e){return"object"==typeof e&&null!=e}function V(e){return"string"==typeof e?JSON.stringify(e):""+e}function Y(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: `"+V(n)+"`"}=e;return{value:n,type:a,refinement:s,key:o[o.length-1],path:o,branch:i,...e,message:c}}function*$(e,t,r,n){var o;z(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const o of e){const e=Y(o,t,r,n);e&&(yield e)}}function*K(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&&z(t.schema)&&z(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=K(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):z(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 Z{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)=>$(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>$(o(e,t),t,this,e):()=>[]}assert(e){return function(e,t){const r=J(e,t);if(r[0])throw r[0]}(e,this)}create(e){return function(e,t){const r=J(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}(e,this)}is(e){return function(e,t){return!J(e,t)[0]}(e,this)}mask(e){return function(e,t){const r=J(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}(e,this)}validate(e,t={}){return J(e,this,t)}}function J(e,t,r={}){const n=K(e,t,r),o=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(n);return o[0]?[new W(o[0],(function*(){for(const e of n)e[0]&&(yield e[0])})),void 0]:[void 0,o[1]]}function ee(e,t){return new Z({type:e,schema:null,validator:t})}function te(e){return new Z({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: "+V(e)})}function re(){return ee("boolean",(e=>"boolean"==typeof e))}function ne(){return ee("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||"Expected an integer, but received: "+V(e)))}function oe(){return ee("number",(e=>"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+V(e)))}function ie(){return ee("string",(e=>"string"==typeof e||"Expected a string, but received: "+V(e)))}function ae(e,t,r={}){const{exclusive:n}=r;return ce(e,"min",(r=>n?r>t:r>=t||"Expected a "+e.type+" greater than "+(n?"":"or equal to ")+t+" but received `"+r+"`"))}function se(e){return ce(e,"nonempty",(t=>function(e){return e instanceof Map||e instanceof Set?e.size:e.length}(t)>0||"Expected a nonempty "+e.type+" but received an empty one"))}function ce(e,t,r){return new Z({...e,*refiner(n,o){yield*e.refiner(n,o);const i=$(r(n,o),o,e,n);for(const e of i)yield{...e,refinement:t}}})}function ue(e,t,r){const[n]=J(t,r);if(n)throw n.message=`Error in argument '${e}': ${n.message}`,n}function le(){const e=/image\/(png|jpeg|x-tga)|video\/mp4|application\/octet-stream|application\/pdf/;return ee("MimeType",(t=>!("string"!=typeof t||!e.test(t))||{message:`expected one of "image/png", "image/jpeg", "image/x-tga", "video/mp4", "application/pdf" or "application/octet-stream", but got "${t}"`}))}var de;!function(e){e.Png="image/png",e.Jpeg="image/jpeg",e.Tga="image/x-tga",e.Mp4="video/mp4",e.Binary="application/octet-stream",e.Pdf="application/pdf",e.Zip="application/zip"}(de||(de={}));const pe=de;var fe;!function(e){e.Scene="ubq/designblocks/SceneProps",e.Camera="ubq/designblocks/Camera",e.Common="ubq/designblocks/CommonDesignBlockProps",e.Page="ubq/designblocks/Page",e.Image="ubq/designblocks/Image",e.Video="ubq/designblocks/Video",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.Fill="ubq/types/Fill",e.BackgroundColor="ubq/types/BackgroundColor",e.Stroke="ubq/types/Stroke",e.Group="ubq/designblocks/Group",e.VectorPath="ubq/designblocks/VectorPath",e.PendingState="ubq/designblocks/PendingState",e.ErrorState="ubq/designblocks/ErrorState"}(fe||(fe={}));const me=fe,ge=(e,t=!0)=>{const r=[];for(let t=0;t<e.size();t+=1)r.push(e.get(t));return t&&e.delete(),r};var he,Ee,ye=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},ve=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 _e{constructor(e){he.set(this,void 0),Ee.set(this,void 0),ye(this,he,e,"f"),ye(this,Ee,new C(e),"f")}async export(e,t=pe.Png){return ue("handle",e,oe()),ue("mimeType",t,le()),new Promise(((r,n)=>{ve(this,he,"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 unstable_exportVideo(e,t,r,n=pe.Mp4,o,i,a,s){return ue("handle",e,oe()),ue("mimeType",n,le()),ue("resolutionWidth",o,ne()),ue("resolutionHeight",i,ne()),ue("framerate",a,oe()),new Promise(((c,u)=>{ve(this,he,"f").exportVideoToBuffer(e,t,r,n,s,(e=>{"error"in e?u(e.error):c(new Blob([e],{type:n}))}),{h264Profile:77,h264Level:52,framerate:a,useTargetSize:!0,targetWidth:o,targetHeight:i})}))}async loadFromString(e){return ue("content",e,ie()),new Promise((t=>{ve(this,he,"f").loadBlocksFromString(e,(e=>{const r=U(e);t(ge(r))}))}))}async saveToString(e){return ue("blocks",e,te(oe())),new Promise((t=>{ve(this,he,"f").saveBlocksToString(e,(e=>{const r=U(e);t(r)}))}))}create(e){return ue("type",e,ie()),U(ve(this,he,"f").create(e))}unstable_createFromAsset(e,t,r,n){return ue("id",e,ie()),ue("type",t,ie()),ue("mimeType",r,ie()),new Promise(((o,i)=>{ve(this,he,"f").createFromAsset(e,t,r,n,(e=>{try{o(U(e))}catch(e){i(e)}}))}))}getType(e){return ue("id",e,ne()),U(ve(this,he,"f").getType(e))}setSelected(e,t){return ue("id",e,ne()),ue("selected",t,re()),U(ve(this,he,"f").setSelected(e,t))}isSelected(e){return ue("id",e,ne()),U(ve(this,he,"f").isSelected(e))}findAllSelected(){return ge(ve(this,he,"f").findAllSelected())}isGroupable(e){return ue("ids",e,se(te(oe()))),U(ve(this,he,"f").isGroupable(e))}group(e){return ue("ids",e,se(te(oe()))),U(ve(this,he,"f").group(e))}ungroup(e){return ue("id",e,oe()),U(ve(this,he,"f").ungroup(e))}enterGroup(e){return ue("id",e,oe()),U(ve(this,he,"f").enterGroup(e))}exitGroup(e){return ue("id",e,oe()),U(ve(this,he,"f").exitGroup(e))}setName(e,t){return ue("id",e,ne()),ue("name",t,ie()),ve(this,Ee,"f").setValue(e,me.Common,"name",t)}getName(e){return ue("id",e,ne()),ve(this,Ee,"f").getValue(e,me.Common,"name")}findByName(e){ue("name",e,ie());const t=ve(this,he,"f").findByName(e);return ge(t)}findByType(e){ue("type",e,ie());const t=U(ve(this,he,"f").findByType(e));return ge(t)}findAll(){return ge(ve(this,he,"f").findAll())}findAllPlaceholders(){return ge(ve(this,he,"f").findAllPlaceholders())}isVisible(e){return ue("id",e,ne()),U(ve(this,he,"f").isVisible(e))}setVisible(e,t){return ue("id",e,ne()),ue("visible",t,re()),U(ve(this,he,"f").setVisible(e,t))}isClipped(e){return ue("id",e,ne()),U(ve(this,he,"f").isClipped(e))}setClipped(e,t){return ue("id",e,ne()),ue("clipped",t,re()),U(ve(this,he,"f").setClipped(e,t))}getPositionX(e){return ue("id",e,ne()),U(ve(this,he,"f").getPositionX(e))}getPositionXMode(e){return ue("id",e,ne()),U(ve(this,he,"f").getPositionXMode(e))}getPositionY(e){return ue("id",e,ne()),U(ve(this,he,"f").getPositionY(e))}getPositionYMode(e){return ue("id",e,ne()),U(ve(this,he,"f").getPositionYMode(e))}setPositionX(e,t){return ue("id",e,ne()),ue("value",t,oe()),U(ve(this,he,"f").setPositionX(e,t))}setPositionXMode(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setPositionXMode(e,t))}setPositionY(e,t){return ue("id",e,ne()),ue("value",t,oe()),U(ve(this,he,"f").setPositionY(e,t))}setPositionYMode(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setPositionYMode(e,t))}getRotation(e){return ue("id",e,ne()),U(ve(this,he,"f").getRotation(e))}setRotation(e,t){return ue("id",e,ne()),ue("radians",t,oe()),U(ve(this,he,"f").setRotation(e,t))}getFlipHorizontal(e){return ue("id",e,ne()),U(ve(this,he,"f").getFlip(e)).horizontal}getFlipVertical(e){return ue("id",e,ne()),U(ve(this,he,"f").getFlip(e)).vertical}setFlipHorizontal(e,t){return ue("id",e,ne()),ue("flip",t,re()),U(ve(this,he,"f").setFlipHorizontal(e,t))}setFlipVertical(e,t){return ue("id",e,ne()),ue("flip",t,re()),U(ve(this,he,"f").setFlipVertical(e,t))}getWidth(e){return ue("id",e,ne()),U(ve(this,he,"f").getWidth(e))}getWidthMode(e){return ue("id",e,ne()),U(ve(this,he,"f").getWidthMode(e))}getHeight(e){return ue("id",e,ne()),U(ve(this,he,"f").getHeight(e))}getHeightMode(e){return ue("id",e,ne()),U(ve(this,he,"f").getHeightMode(e))}getContentFillMode(e){return ue("id",e,ne()),U(ve(this,he,"f").getContentFillMode(e))}setWidth(e,t){return ue("id",e,ne()),ue("value",t,oe()),U(ve(this,he,"f").setWidth(e,t))}setWidthMode(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setWidthMode(e,t))}setHeight(e,t){return ue("id",e,ne()),ue("value",t,oe()),U(ve(this,he,"f").setHeight(e,t))}setHeightMode(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setHeightMode(e,t))}setContentFillMode(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setContentFillMode(e,t))}getFrameWidth(e){return ue("id",e,ne()),U(ve(this,he,"f").getLastFrameWidth(e))}getFrameHeight(e){return ue("id",e,ne()),U(ve(this,he,"f").getLastFrameHeight(e))}duplicate(e){return ue("id",e,ne()),U(ve(this,he,"f").duplicate(e))}destroy(e){return ue("id",e,ne()),U(ve(this,he,"f").destroy(e))}isValid(e){return ue("id",e,ne()),ve(this,he,"f").isValid(e)}getParent(e){return ue("id",e,ne()),U(ve(this,he,"f").getParent(e))}getChildren(e){ue("id",e,ne());const t=U(ve(this,he,"f").getChildren(e));return ge(t)}insertChild(e,t,r){return ue("parent",e,oe()),ue("child",t,oe()),ue("index",r,ae(oe(),0)),U(ve(this,he,"f").insertChild(e,t,r))}appendChild(e,t){return ue("parent",e,oe()),ue("child",t,oe()),U(ve(this,he,"f").appendChild(e,t))}referencesAnyVariables(e){return ue("id",e,ne()),U(ve(this,he,"f").referencesAnyVariables(e))}getGlobalBoundingBoxX(e){return ue("id",e,ne()),U(ve(this,he,"f").getGlobalBoundingBoxX(e))}getGlobalBoundingBoxY(e){return ue("id",e,ne()),U(ve(this,he,"f").getGlobalBoundingBoxY(e))}getGlobalBoundingBoxWidth(e){return ue("id",e,ne()),U(ve(this,he,"f").getGlobalBoundingBoxWidth(e))}getGlobalBoundingBoxHeight(e){return ue("id",e,ne()),U(ve(this,he,"f").getGlobalBoundingBoxHeight(e))}scale(e,t,r=0,n=0){return ue("id",e,ne()),U(ve(this,he,"f").scale(e,t,r,n))}findAllProperties(e){return ue("id",e,ne()),ge(U(ve(this,he,"f").findAllProperties(e)))}getPropertyType(e){return ue("property",e,ie()),U(ve(this,he,"f").getPropertyType(e))}getEnumValues(e){return ue("enumProperty",e,ie()),ge(U(ve(this,he,"f").getEnumValues(e)))}setBool(e,t,r){return ue("id",e,ne()),ue("property",t,ie()),ue("value",r,re()),U(ve(this,he,"f").setBool(e,t,r))}getBool(e,t){return ue("id",e,ne()),ue("property",t,ie()),U(ve(this,he,"f").getBool(e,t))}setInt(e,t,r){return ue("id",e,ne()),ue("property",t,ie()),ue("value",r,ne()),U(ve(this,he,"f").setInt(e,t,r))}getInt(e,t){return ue("id",e,ne()),ue("property",t,ie()),U(ve(this,he,"f").getInt(e,t))}setFloat(e,t,r){return ue("id",e,ne()),ue("property",t,ie()),ue("value",r,oe()),U(ve(this,he,"f").setFloat(e,t,r))}getFloat(e,t){return ue("id",e,ne()),ue("property",t,ie()),U(ve(this,he,"f").getFloat(e,t))}setString(e,t,r){return ue("id",e,ne()),ue("property",t,ie()),ue("value",r,ie()),U(ve(this,he,"f").setString(e,t,r))}getString(e,t){return ue("id",e,ne()),ue("property",t,ie()),U(ve(this,he,"f").getString(e,t))}setColorRGBA(e,t,r,n,o,i){return ue("id",e,ne()),ue("property",t,ie()),ue("r",r,oe()),ue("g",n,oe()),ue("b",o,oe()),ue("a",i,oe()),U(ve(this,he,"f").setColorRGBA(e,t,r,n,o,i))}getColorRGBA(e,t){return ue("id",e,ne()),ue("property",t,ie()),U(ve(this,he,"f").getColorRGBA(e,t))}setEnum(e,t,r){return ue("id",e,ne()),ue("property",t,ie()),ue("value",r,ie()),U(ve(this,he,"f").setEnum(e,t,r))}getEnum(e,t){return ue("id",e,ne()),ue("property",t,ie()),U(ve(this,he,"f").getEnum(e,t))}hasCrop(e){return ue("id",e,ne()),U(ve(this,he,"f").hasCrop(e))}setCropScaleX(e,t){return ue("id",e,ne()),ue("scaleX",t,oe()),U(ve(this,he,"f").setCropScaleX(e,t))}setCropScaleY(e,t){return ue("id",e,ne()),ue("scaleY",t,oe()),U(ve(this,he,"f").setCropScaleY(e,t))}setCropRotation(e,t){return ue("id",e,ne()),ue("rotation",t,oe()),U(ve(this,he,"f").setCropRotation(e,t))}setCropTranslationX(e,t){return ue("id",e,ne()),ue("translationX",t,oe()),U(ve(this,he,"f").setCropTranslationX(e,t))}setCropTranslationY(e,t){return ue("id",e,ne()),ue("translationY",t,oe()),U(ve(this,he,"f").setCropTranslationY(e,t))}resetCrop(e){return ue("id",e,ne()),U(ve(this,he,"f").resetCrop(e))}getCropScaleX(e){return ue("id",e,ne()),U(ve(this,he,"f").getCropScaleX(e))}getCropScaleY(e){return ue("id",e,ne()),U(ve(this,he,"f").getCropScaleY(e))}getCropRotation(e){return ue("id",e,ne()),U(ve(this,he,"f").getCropRotation(e))}getCropTranslationX(e){return ue("id",e,ne()),U(ve(this,he,"f").getCropTranslationX(e))}getCropTranslationY(e){return ue("id",e,ne()),U(ve(this,he,"f").getCropTranslationY(e))}hasOpacity(e){return ue("id",e,ne()),U(ve(this,he,"f").hasOpacity(e))}setOpacity(e,t){return ue("id",e,ne()),ue("opacity",t,oe()),U(ve(this,he,"f").setOpacity(e,t))}getOpacity(e){return ue("id",e,ne()),U(ve(this,he,"f").getOpacity(e))}setBlendMode(e,t){return ue("id",e,ne()),ue("blendMode",t,ie()),U(ve(this,he,"f").setBlendMode(e,t))}getBlendMode(e){return ue("id",e,ne()),U(ve(this,he,"f").getBlendMode(e))}hasFillColor(e){return ue("id",e,ne()),U(ve(this,he,"f").hasFillColor(e))}setFillColorRGBA(e,t,r,n,o){return ue("id",e,ne()),ue("r",t,oe()),ue("g",r,oe()),ue("b",n,oe()),ue("a",o,oe()),U(ve(this,he,"f").setFillColorRGBA(e,t,r,n,o))}getFillColorRGBA(e){return ue("id",e,ne()),U(ve(this,he,"f").getFillColorRGBA(e))}setFillColorEnabled(e,t){return ue("id",e,ne()),ue("enabled",t,re()),U(ve(this,he,"f").setFillColorEnabled(e,t))}isFillColorEnabled(e){return ue("id",e,ne()),U(ve(this,he,"f").isFillColorEnabled(e))}hasBackgroundColor(e){return ue("id",e,ne()),U(ve(this,he,"f").hasBackgroundColor(e))}setBackgroundColorRGBA(e,t,r,n,o){return ue("id",e,ne()),ue("r",t,oe()),ue("g",r,oe()),ue("b",n,oe()),ue("a",o,oe()),U(ve(this,he,"f").setBackgroundColorRGBA(e,t,r,n,o))}getBackgroundColorRGBA(e){return ue("id",e,ne()),U(ve(this,he,"f").getBackgroundColorRGBA(e))}setBackgroundColorEnabled(e,t){return ue("id",e,ne()),ue("enabled",t,re()),U(ve(this,he,"f").setBackgroundColorEnabled(e,t))}isBackgroundColorEnabled(e){return ue("id",e,ne()),U(ve(this,he,"f").isBackgroundColorEnabled(e))}hasStroke(e){return ue("id",e,ne()),U(ve(this,he,"f").hasStroke(e))}setStrokeEnabled(e,t){return ue("id",e,ne()),ue("enabled",t,re()),U(ve(this,he,"f").setStrokeEnabled(e,t))}isStrokeEnabled(e){return ue("id",e,ne()),U(ve(this,he,"f").isStrokeEnabled(e))}setStrokeColorRGBA(e,t,r,n,o){return ue("id",e,ne()),ue("r",t,oe()),ue("g",r,oe()),ue("b",n,oe()),ue("a",o,oe()),U(ve(this,he,"f").setStrokeColorRGBA(e,t,r,n,o))}getStrokeColorRGBA(e){return ue("id",e,ne()),U(ve(this,he,"f").getStrokeColorRGBA(e))}setStrokeWidth(e,t){return ue("id",e,ne()),ue("width",t,oe()),U(ve(this,he,"f").setStrokeWidth(e,t))}getStrokeWidth(e){return ue("id",e,ne()),U(ve(this,he,"f").getStrokeWidth(e))}setStrokeStyle(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setStrokeStyle(e,t))}getStrokeStyle(e){return ue("id",e,ne()),U(ve(this,he,"f").getStrokeStyle(e))}setStrokePosition(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setStrokePosition(e,t))}getStrokePosition(e){return ue("id",e,ne()),U(ve(this,he,"f").getStrokePosition(e))}setStrokeCornerGeometry(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setStrokeCornerGeometry(e,t))}getStrokeCornerGeometry(e){return ue("id",e,ne()),U(ve(this,he,"f").getStrokeCornerGeometry(e))}hasOutline(e){return ue("id",e,ne()),this.hasStroke(e)}setOutlineColorRGBA(e,t,r,n,o){return ue("id",e,ne()),ue("r",t,oe()),ue("g",r,oe()),ue("b",n,oe()),ue("a",o,oe()),this.setStrokeColorRGBA(e,t,r,n,o)}getOutlineColorRGBA(e){return ue("id",e,ne()),this.getStrokeColorRGBA(e)}setOutlineEnabled(e,t){return ue("id",e,ne()),ue("enabled",t,re()),this.setStrokeEnabled(e,t)}isOutlineEnabled(e){return ue("id",e,ne()),this.isStrokeEnabled(e)}setOutlineWidth(e,t){return ue("id",e,ne()),ue("width",t,oe()),this.setStrokeWidth(e,t)}getOutlineWidth(e){return ue("id",e,ne()),this.getStrokeWidth(e)}hasFill(e){return ue("id",e,ne()),U(ve(this,he,"f").hasFill(e))}isFillEnabled(e){return ue("id",e,ne()),U(ve(this,he,"f").isFillEnabled(e))}setFillEnabled(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setFillEnabled(e,t))}setFillType(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setFillType(e,t))}getFillType(e){return ue("id",e,ne()),U(ve(this,he,"f").getFillType(e))}setFillSolidColor(e,t,r,n,o){ue("id",e,ne()),U(ve(this,he,"f").setFillSolidColor(e,t,n,r,o))}getFillSolidColor(e){return ue("id",e,ne()),U(ve(this,he,"f").getFillSolidColor(e))}setFillGradientType(e,t){ue("id",e,ne()),U(ve(this,he,"f").setFillGradientType(e,t))}getFillGradientType(e){return ue("id",e,ne()),U(ve(this,he,"f").getFillGradientType(e))}addFillGradientColorStop(e,t,r,n,o,i){ue("id",e,ne()),U(ve(this,he,"f").addFillGradientColorStop(e,t,r,n,o,i))}removeFillGradientColorStop(e,t){ue("id",e,ne()),U(ve(this,he,"f").removeFillGradientColorStop(e,t))}getFillGradientColorStops(e){return ue("id",e,ne()),ge(ve(this,he,"f").getFillGradientColorStops(e))}setFillGradientColorStops(e,t){ue("id",e,ne()),U(ve(this,he,"f").setFillGradientColorStops(e,t))}setFillGradientControlPoint(e,t,r,n){return ue("id",e,ne()),U(ve(this,he,"f").setFillGradientControlPoint(e,t,r,n))}getFillGradientControlPointX(e,t){return ue("id",e,ne()),U(ve(this,he,"f").getFillGradientControlPointX(e,t))}getFillGradientControlPointY(e,t){return ue("id",e,ne()),U(ve(this,he,"f").getFillGradientControlPointY(e,t))}setFillGradientRadius(e,t){return ue("id",e,ne()),U(ve(this,he,"f").setFillGradientRadius(e,t))}getFillGradientRadius(e){return ue("id",e,ne()),U(ve(this,he,"f").getFillGradientRadius(e))}}he=new WeakMap,Ee=new WeakMap;var be,we=r(7168),Te=r.n(we);!function(e){e.Info="Info",e.Warning="Warning",e.Error="Error"}(be||(be={}));const Oe={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.vectorpaths.abstract","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"]},De={company_name:{value:"img.ly"},first_name:{value:"Charly"},last_name:{value:"Williams"},address:{value:"742 Evergreen Terrace"},city:{value:"Springfield"}},Pe=(e,t)=>{const r=`[UBQ] ${e}`;switch(t){case be.Warning:console.warn(r);break;case be.Error:console.error(r);break;case be.Info:default:console.log(r)}},xe={log:Pe},Se={colorPalettes:{primary:{meta:{default:!0},entries:["#FFFFFF","#000000","#6686FF","#66CCFF","#54FFEA","#E75050","#F28855","#FFF763"]}},pageFormats:{"din-a0":{width:1189,height:841,unit:"mm"},"din-a1":{width:841,height:594,unit:"mm"},"din-a2":{width:594,height:420,unit:"mm"},"din-a3":{width:420,height:297,unit:"mm"},"din-a4":{width:297,height:210,unit:"mm"},"din-a5":{width:210,height:148,unit:"mm"},"din-a6":{meta:{default:!0},width:148,height:105,unit:"mm"},"din-a65":{width:210,height:105,unit:"mm"},"din-b5":{width:250,height:176,unit:"mm"},square:{width:105,height:105,unit:"mm"},"twitter-profile":{width:400,height:400,unit:"px"},"twitter-image":{width:1024,height:512,unit:"px"},"twitter-header":{width:1500,height:500,unit:"px"},"instagram-profile":{width:180,height:180,unit:"px"},"instagram-photo":{width:1080,height:1080,unit:"px"},"instagram-story":{width:1080,height:1920,unit:"px"},"american-letter":{width:8.5,height:11,unit:"in"},"american-legal":{width:8.5,height:14,unit:"in"},"16:10":{width:1600,height:1e3,unit:"px"},"16:9":{width:1600,height:900,unit:"px"},"16:10@2400p":{width:3840,height:2400,unit:"px"},"16:9@2160p":{width:3840,height:2160,unit:"px"},"business-card":{width:85,height:55,unit:"mm"}}},Re={baseURL:"core/"},Me={maskSpotColor:void 0,dpi:300,pixelScaleFactor:1},Fe={title:{fontFileUri:"bundle://ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",show:!0},dimOutOfPageAreas:!0};function Ae(e,t=("undefined"==typeof window?"":window.location.href)){return new URL(e,""===t?void 0:t).toString()}function ke(e){return"/"!==e[e.length-1]?`${e}/`:e}function Ie(e={}){var t,r,n,o,i,a,s,c,u,l,d,p,f,m,g;const h={license:e.license,role:null!==(t=e.role)&&void 0!==t?t:"Creator",featureFlags:null!==(r=e.featureFlags)&&void 0!==r?r:{},baseURL:null!==(n=e.baseURL)&&void 0!==n?n:"https://cdn.img.ly/packages/imgly/cesdk-engine/1.6.2/assets",core:null!==(o=e.core)&&void 0!==o?o:Object.assign({},Re),extensions:null!==(i=e.extensions)&&void 0!==i?i:Object.assign({},Oe),callbacks:null!==(a=e.callbacks)&&void 0!==a?a:Object.assign({},xe),variables:null!==(s=e.variables)&&void 0!==s?s:Object.assign({},De),presets:null!==(c=e.presets)&&void 0!==c?c:Object.assign({},Se),scene:null!==(u=e.scene)&&void 0!==u?u:Object.assign({},Me),page:Te()({},Fe,null!==(l=e.page)&&void 0!==l?l:{}),assetSources:Te()({},e.assetSources),defaultFont:null!==(d=e.defaultFont)&&void 0!==d?d:void 0};return null!==(p=(m=h.extensions).baseURL)&&void 0!==p||(m.baseURL=Oe.baseURL),null!==(f=(g=h.extensions).entries)&&void 0!==f||(g.entries=Object.assign({},Oe.entries)),Object.entries(Se).forEach((([e,t])=>{var r;h.presets[e]=null!==(r=h.presets[e])&&void 0!==r?r:Object.assign({},t)})),h.baseURL=Ae(h.baseURL),h.baseURL=ke(h.baseURL),h.core.baseURL=Ae(h.core.baseURL,h.baseURL),h.core.baseURL=ke(h.core.baseURL),h.extensions.baseURL=ke(h.extensions.baseURL),h.extensions.entries=h.extensions.entries.map((e=>ke(e))),h}var Ce,Ue,Ne=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},je=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 Le{constructor(e){Ce.set(this,void 0),Ue.set(this,void 0),Ne(this,Ce,e,"f"),Ne(this,Ue,new C(e),"f")}onStateChanged(e){const t=je(this,Ce,"f").subscribeToEditorState(e);return()=>{U(je(this,Ce,"f").unsubscribe(t))}}setEditMode(e){ue("keypath",e,ie()),je(this,Ce,"f").setEditMode(e)}getEditMode(){return je(this,Ce,"f").getEditMode()}getCursorType(){return je(this,Ce,"f").getCursorType()}getCursorRotation(){return je(this,Ce,"f").getCursorRotation()}getTextCursorPositionInScreenSpaceX(){return je(this,Ce,"f").getTextCursorPositionInScreenSpaceX()}getTextCursorPositionInScreenSpaceY(){return je(this,Ce,"f").getTextCursorPositionInScreenSpaceY()}setZoomLevel(e=1){ue("zoomLevel",e,ae(oe(),0)),je(this,Ce,"f").setZoomLevel(e)}getZoomLevel(){return U(je(this,Ce,"f").getZoomLevel())}addUndoStep(){U(je(this,Ce,"f").addUndoStep())}undo(){U(je(this,Ce,"f").undo())}redo(){U(je(this,Ce,"f").redo())}canUndo(){return U(je(this,Ce,"f").canUndo())}canRedo(){return U(je(this,Ce,"f").canRedo())}setSettingBool(e,t){return ue("keypath",e,ie()),ue("value",t,re()),U(je(this,Ce,"f").setSettingBool(e,t))}getSettingBool(e){return ue("keypath",e,ie()),U(je(this,Ce,"f").getSettingBool(e))}setSettingInt(e,t){return ue("keypath",e,ie()),ue("value",t,ne()),U(je(this,Ce,"f").setSettingFloat(e,t))}getSettingInt(e){return ue("keypath",e,ie()),U(je(this,Ce,"f").getSettingFloat(e))}setSettingFloat(e,t){return ue("keypath",e,ie()),ue("value",t,oe()),U(je(this,Ce,"f").setSettingFloat(e,t))}getSettingFloat(e){return ue("keypath",e,ie()),U(je(this,Ce,"f").getSettingFloat(e))}setSettingString(e,t){return ue("keypath",e,ie()),ue("value",t,ie()),U(je(this,Ce,"f").setSettingString(e,t))}getSettingString(e){return ue("keypath",e,ie()),U(je(this,Ce,"f").getSettingString(e))}setSettingColorRGBA(e,t,r,n,o){return ue("keypath",e,ie()),ue("r",t,oe()),ue("g",r,oe()),ue("b",n,oe()),ue("a",o,oe()),U(je(this,Ce,"f").setSettingColorRGBA(e,t,r,n,o))}getSettingColorRGBA(e){return ue("keypath",e,ie()),U(je(this,Ce,"f").getSettingColorRGBA(e))}setSettingEnum(e,t){return ue("keypath",e,ie()),ue("value",t,ie()),U(je(this,Ce,"f").setSettingEnum(e,t))}getSettingEnum(e){return ue("keypath",e,ie()),U(je(this,Ce,"f").getSettingEnum(e))}}Ce=new WeakMap,Ue=new WeakMap;var He,Be=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class Xe{constructor(e){He.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,He,e,"f")}subscribe(e,t){ue("blocks",e,te());const r=Be(this,He,"f").subscribe(e,(e=>{try{t(ge(e,!0))}catch(e){console.error(e)}}));return()=>{U(Be(this,He,"f").unsubscribe(r))}}}He=new WeakMap;var Qe,Ge=(Qe="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(){He("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(){He("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(){He("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(){He("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(){He("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(){He("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(){He("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(){He("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(){He("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(){He("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,T("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)"));var r,n,i,a,s=o.locateFile?o.locateFile(t,""):t,c=e.remote_package_size,u=null,l=o.getPreloadedPackage?o.getPreloadedPackage(s,c):null;function 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","shaders",!0,!0),o.FS_createPath("/ly.img.cesdk/shaders","common",!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/shaders/liquid.sksl",start:96295,end:96777},{filename:"/ly.img.cesdk/shaders/mirror.sksl",start:96777,end:97231},{filename:"/ly.img.cesdk/shaders/outliner.sksl",start:97231,end:98868},{filename:"/ly.img.cesdk/shaders/tv_glitch.sksl",start:98868,end:99586},{filename:"/ly.img.cesdk/shaders/mask_color.sksl",start:99586,end:100088},{filename:"/ly.img.cesdk/shaders/lut_filter.sksl",start:100088,end:102951},{filename:"/ly.img.cesdk/shaders/vignette.sksl",start:102951,end:103323},{filename:"/ly.img.cesdk/shaders/sharpie.sksl",start:103323,end:105628},{filename:"/ly.img.cesdk/shaders/hsp_selective_adjustments.sksl",start:105628,end:119228},{filename:"/ly.img.cesdk/shaders/half_tone.sksl",start:119228,end:119722},{filename:"/ly.img.cesdk/shaders/tiltshift.sksl",start:119722,end:120304},{filename:"/ly.img.cesdk/shaders/pixelize.sksl",start:120304,end:120604},{filename:"/ly.img.cesdk/shaders/linocut.sksl",start:120604,end:121389},{filename:"/ly.img.cesdk/shaders/glow.sksl",start:121389,end:122356},{filename:"/ly.img.cesdk/shaders/radial_pixel.sksl",start:122356,end:122919},{filename:"/ly.img.cesdk/shaders/black_and_white_color_mixer.sksl",start:122919,end:129236},{filename:"/ly.img.cesdk/shaders/shifter.sksl",start:129236,end:129920},{filename:"/ly.img.cesdk/shaders/posterize.sksl",start:129920,end:130132},{filename:"/ly.img.cesdk/shaders/dot_pattern.sksl",start:130132,end:130647},{filename:"/ly.img.cesdk/shaders/adjustments.sksl",start:130647,end:134536},{filename:"/ly.img.cesdk/shaders/extrude_blur.sksl",start:134536,end:136653},{filename:"/ly.img.cesdk/shaders/duotone_filter.sksl",start:136653,end:137617},{filename:"/ly.img.cesdk/shaders/cross_cut.sksl",start:137617,end:138564},{filename:"/ly.img.cesdk/shaders/placeholder_overlay_lines.sksl",start:138564,end:139145},{filename:"/ly.img.cesdk/shaders/common/ubq_constants.sksl",start:139145,end:139635},{filename:"/ly.img.cesdk/shaders/common/ubq_adjustments.sksl",start:139635,end:144198},{filename:"/ly.img.cesdk/shaders/common/ubq_color_conversions.sksl",start:144198,end:154183},{filename:"/ly.img.cesdk/shaders/common/ubq_hue_constants.sksl",start:154183,end:157350},{filename:"/ly.img.cesdk/shaders/common/ubq_noise.sksl",start:157350,end:159988},{filename:"/ly.img.cesdk/presets/.keep",start:159988,end:159988},{filename:"/ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",start:159988,end:430748}],remote_package_size:430748,package_uuid:"53438ce9-7bf2-4841-83fe-6cb3d1d1aea2"}),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.emscripten_ubq_codec_decoders=new Map,o.emscripten_ubq_codec_encoders=new Map,o.emscripten_ubq_codec_decoderNextHandle=1,o.emscripten_ubq_codec_encoderNextHandle=1,o.emscripten_ubq_codec_createVideoDecoder=function(e){const t=new VideoDecoder({output:r=>{if(t.decodedFrames%=t.numberOfFrames,t.decodedFrames++,t.probing&&1===t.decodedFrames)return(n=o.ctx).bindTexture(n.TEXTURE_2D,e[0]),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),void r.close();if(t.decodeQueueSize>0||t.probing)return void r.close();var n=o.ctx;const i=(t.decodedFrames-1)%e.length;n.bindTexture(n.TEXTURE_2D,e[i]),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,r),r.close(),t.textureUploadFlag=!0},error:e=>console.error(e)});return t.decodedFrames=0,t},!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},p="object"==typeof window,f="function"==typeof importScripts,m="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,g=!p&&!m&&!f;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 h,E,y,v="";function _(e){return o.locateFile?o.locateFile(e,v):v+e}function b(e){if(e instanceof cp)return;let t=e;e&&"object"==typeof e&&e.stack&&(t=[e,e.stack]),T("exiting due to exception: "+t)}if(g){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&&(h=function(e){return read(e)}),y=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),I("object"==typeof t),t)},E=function(e,t,r){setTimeout((()=>t(y(e))),0)},"undefined"!=typeof scriptArgs?u=scriptArgs:void 0!==arguments&&(u=arguments),"function"==typeof quit&&(d=(e,t)=>{b(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!p&&!f)throw new Error("environment detection error");if(f?v=self.location.href:"undefined"!=typeof document&&document.currentScript&&(v=document.currentScript.src),Qe&&(v=Qe),v=0!==v.indexOf("blob:")?v.substr(0,v.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?)");h=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},f&&(y=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),E=(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 w=o.print||console.log.bind(console),T=o.printErr||console.warn.bind(console);function O(e){O.shown||(O.shown={}),O.shown[e]||(O.shown[e]=1,T(e))}Object.assign(o,c),c=null,o.arguments&&(u=o.arguments),Object.getOwnPropertyDescriptor(o,"arguments")||Object.defineProperty(o,"arguments",{configurable:!0,get:function(){He("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(){He("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(){He("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)")}}),I(void 0===o.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),I(void 0===o.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),I(void 0===o.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),I(void 0===o.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),I(void 0===o.read,"Module.read option was removed (modify read_ in JS)"),I(void 0===o.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),I(void 0===o.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),I(void 0===o.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),I(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(){He("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(){He("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(){He("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(){He("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)")}}),I(!m,"node environment detected but not enabled at build time. Add 'node' to `-s ENVIRONMENT` to enable."),I(!g,"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(){He("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 R,M=o.noExitRuntime||!0;function F(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":return W[e>>2];case"i64":return Number(Y[e>>3]);case"float":return V[e>>2];case"double":return Number(K[e>>3]);default:He("invalid type for getValue: "+t)}return null}Object.getOwnPropertyDescriptor(o,"noExitRuntime")||Object.defineProperty(o,"noExitRuntime",{configurable:!0,get:function(){He("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&&He("no native wasm support detected");var A,k=!1;function I(e,t){e||He("Assertion failed"+(t?": "+t:""))}var C="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function U(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&C)return C.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)&&O("Invalid UTF-8 leading byte 0x"+a.toString(16)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),a=(7&a)<<18|s<<12|c<<6|63&e[t++]),a<65536)i+=String.fromCharCode(a);else{var u=a-65536;i+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function N(e,t){return e?U(Q,e,t):""}function j(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&&O("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 L(e,t,r){return I("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),j(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,W,z,V,Y,$,K,Z="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function J(e,t){I(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&&Z)return Z.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 ee(e,t,r){if(I(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),I("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 te(e){return 2*e.length}function re(e,t){I(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(r>=t/4);){var o=W[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 ne(e,t,r){if(I(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),I("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)),W[t>>2]=a,(t+=4)+4>o)break}return W[t>>2]=0,t-n}function oe(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 ie(e){var t=H(e)+1,r=Ud(t);return r&&j(e,X,r,t),r}function ae(e){var t=H(e)+1,r=zd(t);return j(e,X,r,t),r}function se(e,t){I(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),X.set(e,t)}function ce(e,t,r){for(var n=0;n<e.length;++n)I(e.charCodeAt(n)===(255&e.charCodeAt(n))),X[t++>>0]=e.charCodeAt(n);r||(X[t>>0]=0)}function ue(e,t){return e%t>0&&(e+=t-e%t),e}function le(e){B=e,o.HEAP8=X=new Int8Array(e),o.HEAP16=G=new Int16Array(e),o.HEAP32=W=new Int32Array(e),o.HEAPU8=Q=new Uint8Array(e),o.HEAPU16=q=new Uint16Array(e),o.HEAPU32=z=new Uint32Array(e),o.HEAPF32=V=new Float32Array(e),o.HEAPF64=K=new Float64Array(e),o.HEAP64=Y=new BigInt64Array(e),o.HEAPU64=$=new BigUint64Array(e)}var de=5242880;o.TOTAL_STACK&&I(de===o.TOTAL_STACK,"the stack size can no longer be determined at runtime");var pe,fe=o.INITIAL_MEMORY||268435456;function me(){var e=Gd();I(0==(3&e)),W[e+4>>2]=34821223,W[e+8>>2]=2310721022,W[0]=1668509029}function ge(){if(!k){var e=Gd(),t=z[e+4>>2],r=z[e+8>>2];34821223==t&&2310721022==r||He("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" 0x"+t.toString(16)),1668509029!==W[0]&&He("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(){He("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)")}}),I(fe>=de,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+fe+"! (TOTAL_STACK="+de+")"),I("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),I(!o.wasmMemory,"Use of `wasmMemory` detected. Use -s IMPORTED_MEMORY to define wasmMemory externally"),I(268435456==fe,"Detected runtime INITIAL_MEMORY setting. Use -s IMPORTED_MEMORY to define wasmMemory dynamically"),function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian! (Run with -s SUPPORT_BIG_ENDIAN=1 to bypass)"}();var he=[],Ee=[],ye=[],ve=[],_e=[],be=!1,we=!1,Te=0;function Oe(){return M||Te>0}function De(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)Me(o.preRun.shift());$e(he)}function Pe(){ge(),I(!be),be=!0,o.noFSInit||yt.init.initialized||yt.init(),yt.ignorePermissions=!1,lt.init(),$e(Ee)}function xe(){ge(),$e(ye)}function Se(){ge(),we=!0}function Re(){if(ge(),o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)Ae(o.postRun.shift());$e(_e)}function Me(e){he.unshift(e)}function Fe(e){Ee.unshift(e)}function Ae(e){_e.unshift(e)}I(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),I(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),I(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),I(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,Ie=null,Ce=null,Ue={};function Ne(e){for(var t=e;;){if(!Ue[e])return e;e=t+Math.random()}}function je(e){ke++,o.monitorRunDependencies&&o.monitorRunDependencies(ke),e?(I(!Ue[e]),Ue[e]=1,null===Ie&&"undefined"!=typeof setInterval&&(Ie=setInterval((function(){if(k)return clearInterval(Ie),void(Ie=null);var e=!1;for(var t in Ue)e||(e=!0,T("still waiting on run dependencies:")),T("dependency: "+t);e&&T("(end of list)")}),1e4))):T("warning: run dependency added without ID")}function Le(e){if(ke--,o.monitorRunDependencies&&o.monitorRunDependencies(ke),e?(I(Ue[e]),delete Ue[e]):T("warning: run dependency removed without ID"),0==ke&&(null!==Ie&&(clearInterval(Ie),Ie=null),Ce)){var t=Ce;Ce=null,t()}}function He(e){o.onAbort&&o.onAbort(e),T(e="Aborted("+e+")"),k=!0,A=1;var t=new WebAssembly.RuntimeError(e);throw n(t),t}o.preloadedImages={},o.preloadedAudios={};var Be,Xe="data:application/octet-stream;base64,";function Ge(e){return e.startsWith(Xe)}function qe(e){return e.startsWith("file://")}function We(e,t){return function(){var r=e,n=t;return t||(n=o.asm),I(be,"native function `"+r+"` called before runtime initialization"),I(!we,"native function `"+r+"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n[e]||I(n[e],"exported native function `"+r+"` not found"),n[e].apply(null,arguments)}}function ze(e){try{if(e==Be&&D)return new Uint8Array(D);if(y)return y(e);throw"both async and sync fetching of the wasm failed"}catch(e){He(e)}}function Ve(){return D||!p&&!f||"function"!=typeof fetch?Promise.resolve().then((function(){return ze(Be)})):fetch(Be,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+Be+"'";return e.arrayBuffer()})).catch((function(){return ze(Be)}))}function Ye(){var e={env:Cd,wasi_snapshot_preview1:Cd};function t(e,t){var r=e.exports;o.asm=r,I(R=o.asm.memory,"memory not found in wasm exports"),le(R.buffer),I(pe=o.asm.__indirect_function_table,"table not found in wasm exports"),Fe(o.asm.__wasm_call_ctors),Le("wasm-instantiate")}je("wasm-instantiate");var r=o;function i(e){I(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 Ve().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){T("failed to asynchronously prepare wasm: "+e),qe(Be)&&T("warning: Loading from a file URI ("+Be+") 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"),He(e)}))}if(o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(e){return T("Module.instantiateWasm callback failed with error: "+e),!1}return(D||"function"!=typeof WebAssembly.instantiateStreaming||Ge(Be)||"function"!=typeof fetch?a(i):fetch(Be,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(i,(function(e){return T("wasm streaming compile failed: "+e),T("falling back to ArrayBuffer instantiation"),a(i)}))}))).catch(n),{}}function $e(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?et(r)():et(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(o)}}function Ke(e){return O("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function Ze(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t=Ke(e);return e===t?e:t+" ["+e+"]"}))}Ge(Be="cesdk.wasm")||(Be=_(Be));var Je=[];function et(e){var t=Je[e];return t||(e>=Je.length&&(Je.length=e+1),Je[e]=t=pe.get(e)),I(pe.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}function tt(e){if(e instanceof cp||"unwind"==e)return A;d(1,e)}function rt(e,t,r,n){He("Assertion failed: "+N(e)+", at: "+[t?N(t):"unknown filename",r,n?N(n):"unknown function"])}function nt(e){return Ud(e+16)+16}function ot(e){this.excPtr=e,this.ptr=e-16,this.set_type=function(e){W[this.ptr+4>>2]=e},this.get_type=function(){return W[this.ptr+4>>2]},this.set_destructor=function(e){W[this.ptr+8>>2]=e},this.get_destructor=function(){return W[this.ptr+8>>2]},this.set_refcount=function(e){W[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=W[this.ptr>>2];W[this.ptr>>2]=e+1},this.release_ref=function(){var e=W[this.ptr>>2];return W[this.ptr>>2]=e-1,I(e>0),1===e}}function it(e,t,r){throw new ot(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 at(e){return W[jd()>>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(){He("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]:yt.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t="/"===n.charAt(0)}return(t?"/":"")+(e=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},yt.registerDevice(e,lt.stream_ops)},stream_ops:{open:function(e){var t=lt.ttys[e.node.rdev];if(!t)throw new yt.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new yt.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new yt.ErrnoError(29)}if(void 0===s&&0===i)throw new yt.ErrnoError(6);if(null==s)break;i++,t[r+a]=s}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.put_char)throw new yt.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new yt.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;e.input=kd(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(w(U(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(w(U(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(T(U(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(T(U(e.output,0)),e.output=[])}}};function dt(e,t){Q.fill(0,e,e+t)}function pt(e,t){return I(t,"alignment argument is required"),Math.ceil(e/t)*t}function ft(e){e=pt(e,65536);var t=Bd(65536,e);return t?(dt(t,e),t):0}var mt={ops_table:null,mount:function(e){return mt.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(yt.isBlkdev(r)||yt.isFIFO(r))throw new yt.ErrnoError(63);mt.ops_table||(mt.ops_table={dir:{node:{getattr:mt.node_ops.getattr,setattr:mt.node_ops.setattr,lookup:mt.node_ops.lookup,mknod:mt.node_ops.mknod,rename:mt.node_ops.rename,unlink:mt.node_ops.unlink,rmdir:mt.node_ops.rmdir,readdir:mt.node_ops.readdir,symlink:mt.node_ops.symlink},stream:{llseek:mt.stream_ops.llseek}},file:{node:{getattr:mt.node_ops.getattr,setattr:mt.node_ops.setattr},stream:{llseek:mt.stream_ops.llseek,read:mt.stream_ops.read,write:mt.stream_ops.write,allocate:mt.stream_ops.allocate,mmap:mt.stream_ops.mmap,msync:mt.stream_ops.msync}},link:{node:{getattr:mt.node_ops.getattr,setattr:mt.node_ops.setattr,readlink:mt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:mt.node_ops.getattr,setattr:mt.node_ops.setattr},stream:yt.chrdev_stream_ops}});var o=yt.createNode(e,t,r,n);return yt.isDir(o.mode)?(o.node_ops=mt.ops_table.dir.node,o.stream_ops=mt.ops_table.dir.stream,o.contents={}):yt.isFile(o.mode)?(o.node_ops=mt.ops_table.file.node,o.stream_ops=mt.ops_table.file.stream,o.usedBytes=0,o.contents=null):yt.isLink(o.mode)?(o.node_ops=mt.ops_table.link.node,o.stream_ops=mt.ops_table.link.stream):yt.isChrdev(o.mode)&&(o.node_ops=mt.ops_table.chrdev.node,o.stream_ops=mt.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=yt.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,yt.isDir(e.mode)?t.size=4096:yt.isFile(e.mode)?t.size=e.usedBytes:yt.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&mt.resizeFileStorage(e,t.size)},lookup:function(e,t){throw yt.genericErrors[44]},mknod:function(e,t,r,n){return mt.createNode(e,t,r,n)},rename:function(e,t,r){if(yt.isDir(e.mode)){var n;try{n=yt.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new yt.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=yt.lookupNode(e,t);for(var n in r.contents)throw new yt.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=mt.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!yt.isLink(e.mode))throw new yt.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(I(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(I(!(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 I(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(mt.expandFileStorage(a,o+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&yt.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new yt.ErrnoError(28);return n},allocate:function(e,t,r){mt.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,n,o,i){if(0!==t)throw new yt.ErrnoError(28);if(!yt.isFile(e.node.mode))throw new yt.ErrnoError(43);var a,s,c=e.node.contents;if(2&i||c.buffer!==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=ft(r)))throw new yt.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(!yt.isFile(e.node.mode))throw new yt.ErrnoError(43);return 2&o||mt.stream_ops.write(e,t,0,n,r,!1),0}}};function gt(e,t,r,n){var o=n?"":Ne("al "+e);E(e,(function(r){I(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),o&&Le(o)}),(function(t){if(!r)throw'Loading data file "'+e+'" failed.';r()})),o&&je(o)}var ht={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"},Et={},yt={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(yt.cwd(),e)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var n in r)void 0===t[n]&&(t[n]=r[n]);if(t.recurse_count>8)throw new yt.ErrnoError(32);for(var o=st.normalizeArray(e.split("/").filter((e=>!!e)),!1),i=yt.root,a="/",s=0;s<o.length;s++){var c=s===o.length-1;if(c&&t.parent)break;if(i=yt.lookupNode(i,o[s]),a=st.join2(a,o[s]),yt.isMountpoint(i)&&(!c||c&&t.follow_mount)&&(i=i.mounted.root),!c||t.follow)for(var u=0;yt.isLink(i.mode);){var l=yt.readlink(a);if(a=ut.resolve(st.dirname(a),l),i=yt.lookupPath(a,{recurse_count:t.recurse_count}).node,u++>40)throw new yt.ErrnoError(32)}}return{path:a,node:i}},getPath:e=>{for(var t;;){if(yt.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%yt.nameTable.length},hashAddNode:e=>{var t=yt.hashName(e.parent.id,e.name);e.name_next=yt.nameTable[t],yt.nameTable[t]=e},hashRemoveNode:e=>{var t=yt.hashName(e.parent.id,e.name);if(yt.nameTable[t]===e)yt.nameTable[t]=e.name_next;else for(var r=yt.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:(e,t)=>{var r=yt.mayLookup(e);if(r)throw new yt.ErrnoError(r,e);for(var n=yt.hashName(e.id,t),o=yt.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return yt.lookup(e,t)},createNode:(e,t,r,n)=>{I("object"==typeof e);var o=new yt.FSNode(e,t,r,n);return yt.hashAddNode(o),o},destroyNode:e=>{yt.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=yt.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)=>yt.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>yt.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,t)=>{try{return yt.lookupNode(e,t),20}catch(e){}return yt.nodePermissions(e,"wx")},mayDelete:(e,t,r)=>{var n;try{n=yt.lookupNode(e,t)}catch(e){return e.errno}var o=yt.nodePermissions(e,"wx");if(o)return o;if(r){if(!yt.isDir(n.mode))return 54;if(yt.isRoot(n)||yt.getPath(n)===yt.cwd())return 10}else if(yt.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?yt.isLink(e.mode)?32:yt.isDir(e.mode)&&("r"!==yt.flagsToPermissionString(t)||512&t)?31:yt.nodePermissions(e,yt.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=yt.MAX_OPEN_FDS)=>{for(var r=e;r<=t;r++)if(!yt.streams[r])return r;throw new yt.ErrnoError(33)},getStream:e=>yt.streams[e],createStream:(e,t,r)=>{yt.FSStream||(yt.FSStream=function(){},yt.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}),e=Object.assign(new yt.FSStream,e);var n=yt.nextfd(t,r);return e.fd=n,yt.streams[n]=e,e},closeStream:e=>{yt.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=yt.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new yt.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{yt.devices[e]={stream_ops:t}},getDevice:e=>yt.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),yt.syncFSRequests++,yt.syncFSRequests>1&&T("warning: "+yt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=yt.getMounts(yt.root.mount),n=0;function o(e){return I(yt.syncFSRequests>0),yt.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((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&&yt.root)throw new yt.ErrnoError(10);if(!o&&!i){var a=yt.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,yt.isMountpoint(n))throw new yt.ErrnoError(10);if(!yt.isDir(n.mode))throw new yt.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(s);return c.mount=s,s.root=c,o?yt.root=c:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),c},unmount:e=>{var t=yt.lookupPath(e,{follow_mount:!1});if(!yt.isMountpoint(t.node))throw new yt.ErrnoError(28);var r=t.node,n=r.mounted,o=yt.getMounts(n);Object.keys(yt.nameTable).forEach((e=>{for(var t=yt.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&yt.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);I(-1!==i),r.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,r)=>{var n=yt.lookupPath(e,{parent:!0}).node,o=st.basename(e);if(!o||"."===o||".."===o)throw new yt.ErrnoError(28);var i=yt.mayCreate(n,o);if(i)throw new yt.ErrnoError(i);if(!n.node_ops.mknod)throw new yt.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,yt.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,yt.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{yt.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>(void 0===r&&(r=t,t=438),t|=8192,yt.mknod(e,t,r)),symlink:(e,t)=>{if(!ut.resolve(e))throw new yt.ErrnoError(44);var r=yt.lookupPath(t,{parent:!0}).node;if(!r)throw new yt.ErrnoError(44);var n=st.basename(t),o=yt.mayCreate(r,n);if(o)throw new yt.ErrnoError(o);if(!r.node_ops.symlink)throw new yt.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:(e,t)=>{var r,n,o=st.dirname(e),i=st.dirname(t),a=st.basename(e),s=st.basename(t);if(r=yt.lookupPath(e,{parent:!0}).node,n=yt.lookupPath(t,{parent:!0}).node,!r||!n)throw new yt.ErrnoError(44);if(r.mount!==n.mount)throw new yt.ErrnoError(75);var c,u=yt.lookupNode(r,a),l=ut.relative(e,i);if("."!==l.charAt(0))throw new yt.ErrnoError(28);if("."!==(l=ut.relative(t,o)).charAt(0))throw new yt.ErrnoError(55);try{c=yt.lookupNode(n,s)}catch(e){}if(u!==c){var d=yt.isDir(u.mode),p=yt.mayDelete(r,a,d);if(p)throw new yt.ErrnoError(p);if(p=c?yt.mayDelete(n,s,d):yt.mayCreate(n,s))throw new yt.ErrnoError(p);if(!r.node_ops.rename)throw new yt.ErrnoError(63);if(yt.isMountpoint(u)||c&&yt.isMountpoint(c))throw new yt.ErrnoError(10);if(n!==r&&(p=yt.nodePermissions(r,"w")))throw new yt.ErrnoError(p);yt.hashRemoveNode(u);try{r.node_ops.rename(u,n,s)}catch(e){throw e}finally{yt.hashAddNode(u)}}},rmdir:e=>{var t=yt.lookupPath(e,{parent:!0}).node,r=st.basename(e),n=yt.lookupNode(t,r),o=yt.mayDelete(t,r,!0);if(o)throw new yt.ErrnoError(o);if(!t.node_ops.rmdir)throw new yt.ErrnoError(63);if(yt.isMountpoint(n))throw new yt.ErrnoError(10);t.node_ops.rmdir(t,r),yt.destroyNode(n)},readdir:e=>{var t=yt.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new yt.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=yt.lookupPath(e,{parent:!0}).node;if(!t)throw new yt.ErrnoError(44);var r=st.basename(e),n=yt.lookupNode(t,r),o=yt.mayDelete(t,r,!1);if(o)throw new yt.ErrnoError(o);if(!t.node_ops.unlink)throw new yt.ErrnoError(63);if(yt.isMountpoint(n))throw new yt.ErrnoError(10);t.node_ops.unlink(t,r),yt.destroyNode(n)},readlink:e=>{var t=yt.lookupPath(e).node;if(!t)throw new yt.ErrnoError(44);if(!t.node_ops.readlink)throw new yt.ErrnoError(28);return ut.resolve(yt.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var r=yt.lookupPath(e,{follow:!t}).node;if(!r)throw new yt.ErrnoError(44);if(!r.node_ops.getattr)throw new yt.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>yt.stat(e,!0),chmod:(e,t,r)=>{var n;if(!(n="string"==typeof e?yt.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new yt.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{yt.chmod(e,t,!0)},fchmod:(e,t)=>{var r=yt.getStream(e);if(!r)throw new yt.ErrnoError(8);yt.chmod(r.node,t)},chown:(e,t,r,n)=>{var o;if(!(o="string"==typeof e?yt.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new yt.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,t,r)=>{yt.chown(e,t,r,!0)},fchown:(e,t,r)=>{var n=yt.getStream(e);if(!n)throw new yt.ErrnoError(8);yt.chown(n.node,t,r)},truncate:(e,t)=>{if(t<0)throw new yt.ErrnoError(28);var r;if(!(r="string"==typeof e?yt.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new yt.ErrnoError(63);if(yt.isDir(r.mode))throw new yt.ErrnoError(31);if(!yt.isFile(r.mode))throw new yt.ErrnoError(28);var n=yt.nodePermissions(r,"w");if(n)throw new yt.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var r=yt.getStream(e);if(!r)throw new yt.ErrnoError(8);if(0==(2097155&r.flags))throw new yt.ErrnoError(28);yt.truncate(r.node,t)},utime:(e,t,r)=>{var n=yt.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 yt.ErrnoError(44);var a;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?yt.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)a=e;else{e=st.normalize(e);try{a=yt.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(a){if(128&t)throw new yt.ErrnoError(20)}else a=yt.mknod(e,r,0),s=!0;if(!a)throw new yt.ErrnoError(44);if(yt.isChrdev(a.mode)&&(t&=-513),65536&t&&!yt.isDir(a.mode))throw new yt.ErrnoError(54);if(!s){var c=yt.mayOpen(a,t);if(c)throw new yt.ErrnoError(c)}512&t&&yt.truncate(a,0),t&=-131713;var u=yt.createStream({node:a,path:yt.getPath(a),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||(yt.readFiles||(yt.readFiles={}),e in yt.readFiles||(yt.readFiles[e]=1)),u},close:e=>{if(yt.isClosed(e))throw new yt.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{yt.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,r)=>{if(yt.isClosed(e))throw new yt.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new yt.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new yt.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:(e,t,r,n,o)=>{if(n<0||o<0)throw new yt.ErrnoError(28);if(yt.isClosed(e))throw new yt.ErrnoError(8);if(1==(2097155&e.flags))throw new yt.ErrnoError(8);if(yt.isDir(e.node.mode))throw new yt.ErrnoError(31);if(!e.stream_ops.read)throw new yt.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new yt.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=a),a},write:(e,t,r,n,o,i)=>{if(n<0||o<0)throw new yt.ErrnoError(28);if(yt.isClosed(e))throw new yt.ErrnoError(8);if(0==(2097155&e.flags))throw new yt.ErrnoError(8);if(yt.isDir(e.node.mode))throw new yt.ErrnoError(31);if(!e.stream_ops.write)throw new yt.ErrnoError(28);e.seekable&&1024&e.flags&&yt.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new yt.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,t,r,n,o,i);return a||(e.position+=s),s},allocate:(e,t,r)=>{if(yt.isClosed(e))throw new yt.ErrnoError(8);if(t<0||r<=0)throw new yt.ErrnoError(28);if(0==(2097155&e.flags))throw new yt.ErrnoError(8);if(!yt.isFile(e.node.mode)&&!yt.isDir(e.node.mode))throw new yt.ErrnoError(43);if(!e.stream_ops.allocate)throw new yt.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:(e,t,r,n,o,i)=>{if(0!=(2&o)&&0==(2&i)&&2!=(2097155&e.flags))throw new yt.ErrnoError(2);if(1==(2097155&e.flags))throw new yt.ErrnoError(2);if(!e.stream_ops.mmap)throw new yt.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o,i)},msync:(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 yt.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=yt.open(e,t.flags),o=yt.stat(e).size,i=new Uint8Array(o);return yt.read(n,i,0,o,0),"utf8"===t.encoding?r=U(i,0):"binary"===t.encoding&&(r=i),yt.close(n),r},writeFile:(e,t,r={})=>{r.flags=r.flags||577;var n=yt.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(H(t)+1),i=j(t,o,0,o.length);yt.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");yt.write(n,t,0,t.byteLength,void 0,r.canOwn)}yt.close(n)},cwd:()=>yt.currentPath,chdir:e=>{var t=yt.lookupPath(e,{follow:!0});if(null===t.node)throw new yt.ErrnoError(44);if(!yt.isDir(t.node.mode))throw new yt.ErrnoError(54);var r=yt.nodePermissions(t.node,"x");if(r)throw new yt.ErrnoError(r);yt.currentPath=t.path},createDefaultDirectories:()=>{yt.mkdir("/tmp"),yt.mkdir("/home"),yt.mkdir("/home/web_user")},createDefaultDevices:()=>{yt.mkdir("/dev"),yt.registerDevice(yt.makedev(1,3),{read:()=>0,write:(e,t,r,n,o)=>n}),yt.mkdev("/dev/null",yt.makedev(1,3)),lt.register(yt.makedev(5,0),lt.default_tty_ops),lt.register(yt.makedev(6,0),lt.default_tty1_ops),yt.mkdev("/dev/tty",yt.makedev(5,0)),yt.mkdev("/dev/tty1",yt.makedev(6,0));var e=ct();yt.createDevice("/dev","random",e),yt.createDevice("/dev","urandom",e),yt.mkdir("/dev/shm"),yt.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{yt.mkdir("/proc");var e=yt.mkdir("/proc/self");yt.mkdir("/proc/self/fd"),yt.mount({mount:()=>{var t=yt.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var r=+t,n=yt.getStream(r);if(!n)throw new yt.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?yt.createDevice("/dev","stdin",o.stdin):yt.symlink("/dev/tty","/dev/stdin"),o.stdout?yt.createDevice("/dev","stdout",null,o.stdout):yt.symlink("/dev/tty","/dev/stdout"),o.stderr?yt.createDevice("/dev","stderr",null,o.stderr):yt.symlink("/dev/tty1","/dev/stderr");var e=yt.open("/dev/stdin",0),t=yt.open("/dev/stdout",1),r=yt.open("/dev/stderr",1);I(0===e.fd,"invalid handle for stdin ("+e.fd+")"),I(1===t.fd,"invalid handle for stdout ("+t.fd+")"),I(2===r.fd,"invalid handle for stderr ("+r.fd+")")},ensureErrnoError:()=>{yt.ErrnoError||(yt.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,Et)if(Et[t]===e){this.code=t;break}},this.setErrno(e),this.message=ht[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=Ze(this.stack))},yt.ErrnoError.prototype=new Error,yt.ErrnoError.prototype.constructor=yt.ErrnoError,[44].forEach((e=>{yt.genericErrors[e]=new yt.ErrnoError(e),yt.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{yt.ensureErrnoError(),yt.nameTable=new Array(4096),yt.mount(mt,{},"/"),yt.createDefaultDirectories(),yt.createDefaultDevices(),yt.createSpecialDirectories(),yt.filesystems={MEMFS:mt}},init:(e,t,r)=>{I(!yt.init.initialized,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)"),yt.init.initialized=!0,yt.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=t||o.stdout,o.stderr=r||o.stderr,yt.createStandardStreams()},quit:()=>{yt.init.initialized=!1,Hd();for(var e=0;e<yt.streams.length;e++){var t=yt.streams[e];t&&yt.close(t)}},getMode:(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:(e,t)=>{var r=yt.analyzePath(e,t);return r.exists?r.object:null},analyzePath:(e,t)=>{try{e=(n=yt.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=yt.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=st.basename(e),n=yt.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath:(e,t,r,n)=>{e="string"==typeof e?e:yt.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=st.join2(e,i);try{yt.mkdir(a)}catch(e){}e=a}}return a},createFile:(e,t,r,n,o)=>{var i=st.join2("string"==typeof e?e:yt.getPath(e),t),a=yt.getMode(n,o);return yt.create(i,a)},createDataFile:(e,t,r,n,o,i)=>{var a=t;e&&(e="string"==typeof e?e:yt.getPath(e),a=t?st.join2(e,t):e);var s=yt.getMode(n,o),c=yt.create(a,s);if(r){if("string"==typeof r){for(var u=new Array(r.length),l=0,d=r.length;l<d;++l)u[l]=r.charCodeAt(l);r=u}yt.chmod(c,146|s);var p=yt.open(c,577);yt.write(p,r,0,r.length,0,i),yt.close(p),yt.chmod(c,s)}return c},createDevice:(e,t,r,n)=>{var o=st.join2("string"==typeof e?e:yt.getPath(e),t),i=yt.getMode(!!r,!!n);yt.createDevice.major||(yt.createDevice.major=64);var a=yt.makedev(yt.createDevice.major++,0);return yt.registerDevice(a,{open: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 yt.ErrnoError(29)}if(void 0===c&&0===a)throw new yt.ErrnoError(6);if(null==c)break;a++,t[n+s]=c}return a&&(e.node.timestamp=Date.now()),a},write:(e,t,r,o,i)=>{for(var a=0;a<o;a++)try{n(t[r+a])}catch(e){throw new yt.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),yt.mkdev(o,i,a)},forceLoadFile: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(!h)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=kd(h(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new yt.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||[]):kd(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,w("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(!f)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:r};var c=yt.createFile(e,t,s,n,o);s.contents?c.contents=s.contents:s.url&&(c.contents=null,c.url=s.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var u={};return Object.keys(c.stream_ops).forEach((e=>{var t=c.stream_ops[e];u[e]=function(){return yt.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,o)=>{yt.forceLoadFile(c);var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(I(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=Ne("cp "+l);function p(r){function p(r){u&&u(),s||yt.createDataFile(e,t,r,n,o,c),i&&i(),Le(d)}bo.handledByPreloadPlugin(r,l,p,(()=>{a&&a(),Le(d)}))||p(r)}je(d),"string"==typeof r?gt(r,(e=>p(e)),a):p(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=yt.indexedDB();try{var o=n.open(yt.DB_NAME(),yt.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=()=>{w("creating db"),o.result.createObjectStore(yt.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([yt.DB_STORE_NAME],"readwrite"),i=n.objectStore(yt.DB_STORE_NAME),a=0,s=0,c=e.length;function u(){0==s?t():r()}e.forEach((e=>{var t=i.put(yt.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=yt.indexedDB();try{var o=n.open(yt.DB_NAME(),yt.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=r,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([yt.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var a=i.objectStore(yt.DB_STORE_NAME),s=0,c=0,u=e.length;function l(){0==c?t():r()}e.forEach((e=>{var t=a.get(e);t.onsuccess=()=>{yt.analyzePath(e).exists&&yt.unlink(e),yt.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:()=>{He("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:()=>{He("FS.createFolder has been removed; use FS.mkdir instead")},createLink:()=>{He("FS.createLink has been removed; use FS.symlink instead")},joinPath:()=>{He("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:()=>{He("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:()=>{He("FS.standardizePath has been removed; use PATH.normalize instead")}},vt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if("/"===t[0])return t;var n;if(-100===e)n=yt.cwd();else{var o=yt.getStream(e);if(!o)throw new yt.ErrnoError(8);n=o.path}if(0==t.length){if(!r)throw new yt.ErrnoError(44);return n}return 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(yt.getPath(e.node)))return-54;throw e}return W[r>>2]=n.dev,W[r+4>>2]=0,W[r+8>>2]=n.ino,W[r+12>>2]=n.mode,W[r+16>>2]=n.nlink,W[r+20>>2]=n.uid,W[r+24>>2]=n.gid,W[r+28>>2]=n.rdev,W[r+32>>2]=0,Y[r+40>>3]=BigInt(n.size),W[r+48>>2]=4096,W[r+52>>2]=n.blocks,W[r+56>>2]=n.atime.getTime()/1e3|0,W[r+60>>2]=0,W[r+64>>2]=n.mtime.getTime()/1e3|0,W[r+68>>2]=0,W[r+72>>2]=n.ctime.getTime()/1e3|0,W[r+76>>2]=0,Y[r+80>>3]=BigInt(n.ino),0},doMsync:function(e,t,r,n,o){var i=Q.slice(e,e+r);yt.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)),yt.mkdir(e,t,0),0},doMknod:function(e,t,r){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return yt.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-28;var n=yt.readlink(e),o=Math.min(r,H(n)),i=X[t+o];return L(n,t,r+1),X[t+o]=i,o},doAccess:function(e,t){if(-8&t)return-28;var r=yt.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&&yt.nodePermissions(r,n)?-2:0},doDup:function(e,t,r){var n=yt.getStream(r);return n&&yt.close(n),yt.open(e,t,0,r,r).fd},doReadv:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=W[t+8*i>>2],s=W[t+(8*i+4)>>2],c=yt.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=W[t+8*i>>2],s=W[t+(8*i+4)>>2],c=yt.write(e,X,a,s,n);if(c<0)return-1;o+=c}return o},varargs:void 0,get:function(){return I(null!=vt.varargs),vt.varargs+=4,W[vt.varargs-4>>2]},getStr:function(e){return N(e)},getStreamFromFD:function(e){var t=yt.getStream(e);if(!t)throw new yt.ErrnoError(8);return t},get64:function(e,t){return I(e>=0?0===t:-1===t),e}};function _t(e,t,r){vt.varargs=r;try{var n=vt.getStreamFromFD(e);switch(t){case 0:return(o=vt.get())<0?-28:yt.open(n.path,n.flags,0,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=vt.get();return n.flags|=o,0;case 5:return o=vt.get(),G[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return at(28),-1}}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function bt(e,t){try{var r=vt.getStreamFromFD(e);return vt.doStat(yt.stat,r.path,t)}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function wt(e,t,r,n){try{t=vt.getStr(t);var o=256&n,i=4096&n;return I(!(n&=-4353),n),t=vt.calculateAt(e,t,i),vt.doStat(o?yt.lstat:yt.stat,t,r)}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function Tt(e,t,r){try{var n=vt.getStreamFromFD(e);n.getdents||(n.getdents=yt.readdir(n.path));for(var o=280,i=0,a=yt.llseek(n,0,1),s=Math.floor(a/o);s<n.getdents.length&&i+o<=r;){var c,u,l=n.getdents[s];if("."===l)c=n.node.id,u=4;else if(".."===l)c=yt.lookupPath(n.path,{parent:!0}).node.id,u=4;else{var d=yt.lookupNode(n.node,l);c=d.id,u=yt.isChrdev(d.mode)?2:yt.isDir(d.mode)?4:yt.isLink(d.mode)?10:8}I(c),Y[t+i>>3]=BigInt(c),Y[t+i+8>>3]=BigInt((s+1)*o),G[t+i+16>>1]=280,X[t+i+18>>0]=u,L(l,t+i+19,256),i+=o,s+=1}return yt.llseek(n,s*o,0),i}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function Ot(e,t,r){vt.varargs=r;try{var n=vt.getStreamFromFD(e);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=vt.get();return W[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=vt.get(),yt.ioctl(n,t,o);default:He("bad ioctl syscall "+t)}}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function Dt(e,t){try{return e=vt.getStr(e),vt.doStat(yt.lstat,e,t)}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function Pt(e,t,r){vt.varargs=r;try{var n=vt.getStr(e),o=r?vt.get():0;return yt.open(n,t,o).fd}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function xt(e,t){try{return e=vt.getStr(e),vt.doStat(yt.stat,e,t)}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function St(e,t){He("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function Rt(e,t){He("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}var Mt={};function Ft(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function At(e){return this.fromWireType(z[e>>2])}var kt={},It={},Ct={},Ut=48,Nt=57;function jt(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=Ut&&t<=Nt?"_"+e:e}function Lt(e,t){return e=jt(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Ht(e,t){var r=Lt(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 Bt=void 0;function Xt(e){throw new Bt(e)}function Qt(e,t,r){function n(t){var n=r(t);n.length!==e.length&&Xt("Mismatched type converter count");for(var o=0;o<e.length;++o)Jt(e[o],n[o])}e.forEach((function(e){Ct[e]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(e,t){It.hasOwnProperty(e)?o[t]=It[e]:(i.push(e),kt.hasOwnProperty(e)||(kt[e]=[]),kt[e].push((function(){o[t]=It[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Gt(e){var t=Mt[e];delete Mt[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;Qt([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)),Ft(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:At,destructorFunction:a}]}))}var qt={};function Wt(e){var t=qt[e];delete qt[e];var r=t.rawConstructor,n=t.rawDestructor,o=t.fields;Qt([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)),Ft(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:At,destructorFunction:n}]}))}function zt(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function Vt(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Yt=e}var Yt=void 0;function $t(e){for(var t="",r=e;Q[r];)t+=Yt[Q[r++]];return t}var Kt=void 0;function Zt(e){throw new Kt(e)}function Jt(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'),It.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;Zt("Cannot register type '"+n+"' twice")}if(It[e]=t,delete Ct[e],kt.hasOwnProperty(e)){var o=kt[e];delete kt[e],o.forEach((function(e){e()}))}}function er(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 W[e>>2]}:function(e){return z[e>>2]};case 3:return r?function(e){return Y[e>>3]}:function(e){return $[e>>3]};default:throw new TypeError("Unknown integer type: "+e)}}function tr(e,t,r,n,o){t=$t(t);var i=rr(r),a=-1!=t.indexOf("u");a&&(o=(BigInt(1)<<BigInt(64))-BigInt(1)),Jt(e,{name:t,fromWireType:function(e){return e},toWireType:function(e,r){if("bigint"!=typeof r)throw new TypeError('Cannot convert "'+zt(r)+'" to '+this.name);if(r<n||r>o)throw new TypeError('Passing a number "'+zt(r)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!");return r},argPackAdvance:8,readValueFromPointer:er(t,i,!a),destructorFunction:null})}function rr(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 nr(e,t,r,n,o){var i=rr(r);Jt(e,{name:t=$t(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=W}return this.fromWireType(n[e>>i])},destructorFunction:null})}function or(e){if(!(this instanceof Fr))return!1;if(!(e instanceof Fr))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 ir(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function ar(e){Zt(e.$$.ptrType.registeredClass.name+" instance already deleted")}var sr=!1;function cr(e){}function ur(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function lr(e){e.count.value-=1,0===e.count.value&&ur(e)}function dr(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=dr(e,t,r.baseClass);return null===n?null:r.downcast(n)}var pr={};function fr(){return Object.keys(_r).length}function mr(){var e=[];for(var t in _r)_r.hasOwnProperty(t)&&e.push(_r[t]);return e}var gr=[];function hr(){for(;gr.length;){var e=gr.pop();e.$$.deleteScheduled=!1,e.delete()}}var Er=void 0;function yr(e){Er=e,gr.length&&Er&&Er(hr)}function vr(){o.getInheritedInstanceCount=fr,o.getLiveInheritedInstances=mr,o.flushPendingDeletes=hr,o.setDelayFunction=yr}var _r={};function br(e,t){for(void 0===t&&Zt("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function wr(e,t){return t=br(e,t),_r[t]}function Tr(e,t){return t.ptrType&&t.ptr||Xt("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Xt("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Dr(Object.create(e,{$$:{value:t}}))}function Or(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=wr(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?Tr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Tr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=pr[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var c=dr(t,this.registeredClass,i.registeredClass);return null===c?o.call(this):this.isSmartPointer?Tr(i.registeredClass.instancePrototype,{ptrType:i,ptr:c,smartPtrType:this,smartPtr:e}):Tr(i.registeredClass.instancePrototype,{ptrType:i,ptr:c})}function Dr(e){return"undefined"==typeof FinalizationRegistry?(Dr=e=>e,e):(sr=new FinalizationRegistry((e=>{console.warn(e.leakWarning.stack.replace(/^Error: /,"")),lr(e.$$)})),Dr=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,Or),sr.register(e,r,e)}return e},cr=e=>sr.unregister(e),Dr(e))}function Pr(){if(this.$$.ptr||ar(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Dr(Object.create(Object.getPrototypeOf(this),{$$:{value:ir(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function xr(){this.$$.ptr||ar(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Zt("Object already scheduled for deletion"),cr(this),lr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Sr(){return!this.$$.ptr}function Rr(){return this.$$.ptr||ar(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Zt("Object already scheduled for deletion"),gr.push(this),1===gr.length&&Er&&Er(hr),this.$$.deleteScheduled=!0,this}function Mr(){Fr.prototype.isAliasOf=or,Fr.prototype.clone=Pr,Fr.prototype.delete=xr,Fr.prototype.isDeleted=Sr,Fr.prototype.deleteLater=Rr}function Fr(){}function Ar(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 kr(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"),Ar(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 Ir(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 Cr(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 Ur(e,t){if(null===t)return this.isReference&&Zt("null is not a valid "+this.name),0;t.$$||Zt('Cannot pass "'+zt(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 Cr(t.$$.ptr,r,this.registeredClass)}function Nr(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 "'+zt(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=Cr(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,cn.toHandle((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:Zt("Unsupporting sharing policy")}return r}function jr(e,t){if(null===t)return this.isReference&&Zt("null is not a valid "+this.name),0;t.$$||Zt('Cannot pass "'+zt(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 Cr(t.$$.ptr,r,this.registeredClass)}function Lr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Hr(e){this.rawDestructor&&this.rawDestructor(e)}function Br(e){null!==e&&e.delete()}function Xr(){Qr.prototype.getPointee=Lr,Qr.prototype.destructor=Hr,Qr.prototype.argPackAdvance=8,Qr.prototype.readValueFromPointer=At,Qr.prototype.deleteObject=Br,Qr.prototype.fromWireType=Or}function Qr(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=Nr:n?(this.toWireType=Ur,this.destructorFunction=null):(this.toWireType=jr,this.destructorFunction=null)}function Gr(e,t,r){o.hasOwnProperty(e)||Xt("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 qr(e,t){e=$t(e);var r=et(t);return"function"!=typeof r&&Zt("unknown function pointer with signature "+e+": "+t),r}var Wr=void 0;function zr(e){var t=Ld(e),r=$t(t);return Nd(t),r}function Vr(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||It[t]||(Ct[t]?Ct[t].forEach(e):(r.push(t),n[t]=!0))})),new Wr(e+": "+r.map(zr).join([", "]))}function Yr(e,t,r,n,o,i,a,s,c,u,l,d,p){l=$t(l),i=qr(o,i),s&&(s=qr(a,s)),u&&(u=qr(c,u)),p=qr(d,p);var f=jt(l);kr(f,(function(){Vr("Cannot construct "+l+" due to unbound types",[n])})),Qt([e,t,r],n?[n]:[],(function(t){var r,o;t=t[0],o=n?(r=t.registeredClass).instancePrototype:Fr.prototype;var a=Lt(f,(function(){if(Object.getPrototypeOf(this)!==c)throw new Kt("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new Kt(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new Kt("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 Ir(l,a,c,p,r,i,s,u),m=new Qr(l,d,!0,!1,!1),g=new Qr(l+"*",d,!1,!1,!1),h=new Qr(l+" const*",d,!1,!0,!1);return pr[e]={pointerType:g,constPointerType:h},Gr(f,a),[m,g,h]}))}function $r(e,t){for(var r=[],n=0;n<e;n++)r.push(W[(t>>2)+n]);return r}function Kr(e,t,r,n,o,i){I(t>0);var a=$r(t,r);o=qr(n,o),Qt([],[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 Kt("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]=()=>{Vr("Cannot construct "+e.name+" due to unbound types",a)},Qt([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=Jr(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=Lt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,o=e.apply(n,t);return o instanceof Object?o:n}function Jr(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 p="return function "+jt(e)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(p+="var destructors = [];\n");var f=s?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],g=[Zt,n,o,Ft,t[0],t[1]];for(a&&(p+="var thisWired = classParam.toWireType("+f+", this);\n"),c=0;c<i-2;++c)p+="var arg"+c+"Wired = argType"+c+".toWireType("+f+", arg"+c+"); // "+t[c+2].name+"\n",m.push("argType"+c),g.push(t[c+2]);if(a&&(d="thisWired"+(d.length>0?", ":"")+d),p+=(u?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",s)p+="runDestructors(destructors);\n";else for(c=a?1:2;c<t.length;++c){var h=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(p+=h+"_dtor("+h+"); // "+t[c].name+"\n",m.push(h+"_dtor"),g.push(t[c].destructorFunction))}return u&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",m.push(p),Zr(Function,m).apply(null,g)}function en(e,t,r,n,o,i,a,s){var c=$r(r,n);t=$t(t),i=qr(o,i),Qt([],[e],(function(e){var n=(e=e[0]).name+"."+t;function o(){Vr("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):(Ar(u,t,n),u[t].overloadTable[r-2]=o),Qt([],c,(function(o){var s=Jr(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 tn=[],rn=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function nn(e){e>4&&0==--rn[e].refcount&&(rn[e]=void 0,tn.push(e))}function on(){for(var e=0,t=5;t<rn.length;++t)void 0!==rn[t]&&++e;return e}function an(){for(var e=5;e<rn.length;++e)if(void 0!==rn[e])return rn[e];return null}function sn(){o.count_emval_handles=on,o.get_first_emval=an}var cn={toValue:function(e){return e||Zt("Cannot use deleted val. handle = "+e),rn[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=tn.length?tn.pop():rn.length;return rn[t]={refcount:1,value:e},t}}};function un(e,t){Jt(e,{name:t=$t(t),fromWireType:function(e){var t=cn.toValue(e);return nn(e),t},toWireType:function(e,t){return cn.toHandle(t)},argPackAdvance:8,readValueFromPointer:At,destructorFunction:null})}function ln(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?W:z;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function dn(e,t,r,n){var o=rr(r);function i(){}t=$t(t),i.values={},Jt(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:ln(t,o,n),destructorFunction:null}),kr(t,i)}function pn(e,t){var r=It[e];return void 0===r&&Zt(t+" has unknown type "+zr(e)),r}function fn(e,t,r){var n=pn(e,"enum");t=$t(t);var o=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Lt(n.name+"_"+t,(function(){}))}});o.values[r]=i,o[t]=i}function mn(e,t){switch(t){case 2:return function(e){return this.fromWireType(V[e>>2])};case 3:return function(e){return this.fromWireType(K[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function gn(e,t,r){var n=rr(r);Jt(e,{name:t=$t(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+zt(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:mn(t,n),destructorFunction:null})}function hn(e,t,r,n,o,i){var a=$r(t,r);e=$t(e),o=qr(n,o),kr(e,(function(){Vr("Cannot call "+e+" due to unbound types",a)}),t-1),Qt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return Gr(e,Jr(e,n,null,o,i),t-1),[]}))}function En(e,t,r,n,o){t=$t(t),-1===o&&(o=4294967295);var i=rr(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 "'+zt(e)+'" to '+r);if(e<n||e>o)throw new TypeError('Passing a number "'+zt(e)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!")};Jt(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:er(t,i,0!==n),destructorFunction:null})}function yn(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];function o(e){var t=z,r=t[e>>=2],o=t[e+1];return new n(B,o,r)}Jt(e,{name:r=$t(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function vn(e,t,r,n,o,i,a,s,c,u,l,d){r=$t(r),i=qr(o,i),s=qr(a,s),u=qr(c,u),d=qr(l,d),Qt([e],[t],(function(e){return e=e[0],[new Qr(r,e.registeredClass,!1,!1,!0,e,n,i,s,u,d)]}))}function _n(e,t){var r="std::string"===(t=$t(t));Jt(e,{name:t,fromWireType:function(e){var t,n=z[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=N(o,a-o);void 0===t?t=s:(t+=String.fromCharCode(0),t+=s),o=a+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(Q[e+4+i]);t=c.join("")}return Nd(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=Ud(4+o+1);if(z[i>>2]=o,r&&n)L(t,i+4,o+1);else if(n)for(var a=0;a<o;++a){var s=t.charCodeAt(a);s>255&&(Nd(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(Nd,i),i},argPackAdvance:8,readValueFromPointer:At,destructorFunction:function(e){Nd(e)}})}function bn(e,t,r){var n,o,i,a,s;r=$t(r),2===t?(n=J,o=ee,a=te,i=()=>q,s=1):4===t&&(n=re,o=ne,a=oe,i=()=>z,s=2),Jt(e,{name:r,fromWireType:function(e){for(var r,o=z[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 Nd(e),r},toWireType:function(e,n){"string"!=typeof n&&Zt("Cannot pass non-string to C++ string type "+r);var i=a(n),c=Ud(4+i+t);return z[c>>2]=i>>s,o(n,c+4,i+t),null!==e&&e.push(Nd,c),c},argPackAdvance:8,readValueFromPointer:At,destructorFunction:function(e){Nd(e)}})}function wn(e,t,r,n,o,i){Mt[e]={name:$t(t),rawConstructor:qr(r,n),rawDestructor:qr(o,i),elements:[]}}function Tn(e,t,r,n,o,i,a,s,c){Mt[e].elements.push({getterReturnType:t,getter:qr(r,n),getterContext:o,setterArgumentType:i,setter:qr(a,s),setterContext:c})}function On(e,t,r,n,o,i){qt[e]={name:$t(t),rawConstructor:qr(r,n),rawDestructor:qr(o,i),fields:[]}}function Dn(e,t,r,n,o,i,a,s,c,u){qt[e].fields.push({fieldName:$t(t),getterReturnType:r,getter:qr(n,o),getterContext:i,setterArgumentType:a,setter:qr(s,c),setterContext:u})}function Pn(e,t){Jt(e,{isVoid:!0,name:t=$t(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})}function xn(){throw"longjmp"}function Sn(e,t,r){e=cn.toValue(e),t=pn(t,"emval::as");var n=[],o=cn.toHandle(n);return W[r>>2]=o,t.toWireType(n,e)}function Rn(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=pn(W[(t>>2)+n],"parameter "+n);return r}function Mn(e,t,r,n){e=cn.toValue(e);for(var o=Rn(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 cn.toHandle(c)}function Fn(e){var t=[];return W[e>>2]=cn.toHandle(t),t}var An={};function kn(e){var t=An[e];return void 0===t?$t(e):t}var In=[];function Cn(e,t,r,n,o){return(e=In[e])(t=cn.toValue(t),r=kn(r),Fn(n),o)}function Un(e,t,r,n){(e=In[e])(t=cn.toValue(t),r=kn(r),null,n)}function Nn(){return"object"==typeof globalThis?globalThis:Function("return this")()}function jn(e){return 0===e?cn.toHandle(Nn()):(e=kn(e),cn.toHandle(Nn()[e]))}function Ln(e){var t=In.length;return In.push(e),t}var Hn=[];function Bn(e,t){var r=Rn(e,t),n=r[0],o=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",i=Hn[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 "+jt("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=Ln(Zr(Function,a).apply(null,s)),Hn[o]=i,i}function Xn(e,t){return e=cn.toValue(e),t=cn.toValue(t),cn.toHandle(e[t])}function Qn(e){e>4&&(rn[e].refcount+=1)}function Gn(e,t){return(e=cn.toValue(e))instanceof cn.toValue(t)}function qn(e){return"number"==typeof(e=cn.toValue(e))}function Wn(e){return"string"==typeof(e=cn.toValue(e))}function zn(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)(pn,o,cn.toHandle)}var Vn,Yn={};function $n(e,t,r,n){e=cn.toValue(e);var o=Yn[t];return o||(o=zn(t),Yn[t]=o),o(e,r,n)}function Kn(){return cn.toHandle([])}function Zn(e){return cn.toHandle(kn(e))}function Jn(){return cn.toHandle({})}function eo(e){Ft(cn.toValue(e)),nn(e)}function to(e,t,r){e=cn.toValue(e),t=cn.toValue(t),r=cn.toValue(r),e[t]=r}function ro(e,t){var r=(e=pn(e,"_emval_take_value")).readValueFromPointer(t);return cn.toHandle(r)}function no(e){throw cn.toValue(e)}function oo(e,t){var r=new Date(1e3*W[e>>2]);W[t>>2]=r.getUTCSeconds(),W[t+4>>2]=r.getUTCMinutes(),W[t+8>>2]=r.getUTCHours(),W[t+12>>2]=r.getUTCDate(),W[t+16>>2]=r.getUTCMonth(),W[t+20>>2]=r.getUTCFullYear()-1900,W[t+24>>2]=r.getUTCDay();var n=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),o=(r.getTime()-n)/864e5|0;W[t+28>>2]=o}function io(e,t){var r=new Date(1e3*W[e>>2]);W[t>>2]=r.getSeconds(),W[t+4>>2]=r.getMinutes(),W[t+8>>2]=r.getHours(),W[t+12>>2]=r.getDate(),W[t+16>>2]=r.getMonth(),W[t+20>>2]=r.getFullYear()-1900,W[t+24>>2]=r.getDay();var n=new Date(r.getFullYear(),0,1),o=(r.getTime()-n.getTime())/864e5|0;W[t+28>>2]=o,W[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));W[t+32>>2]=s}function ao(e){var t=new Date(W[e+20>>2]+1900,W[e+16>>2],W[e+12>>2],W[e+8>>2],W[e+4>>2],W[e>>2],0),r=W[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)W[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))}W[e+24>>2]=t.getDay();var l=(t.getTime()-o.getTime())/864e5|0;return W[e+28>>2]=l,W[e>>2]=t.getSeconds(),W[e+4>>2]=t.getMinutes(),W[e+8>>2]=t.getHours(),W[e+12>>2]=t.getDate(),W[e+16>>2]=t.getMonth(),t.getTime()/1e3|0}function so(e,t,r,n,o,i,a,s){try{var c=yt.getStream(o);if(!c)return-8;var u=yt.mmap(c,e,t,i,r,n),l=u.ptr;return W[a>>2]=u.allocated,l}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function co(e,t,r,n,o,i){try{var a=yt.getStream(o);a&&(2&r&&vt.doMsync(e,a,t,n,i),yt.munmap(a))}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return-e.errno}}function uo(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"}W[e>>2]=60*c,W[t>>2]=Number(a!=s);var l=u(o),d=u(i),p=ie(l),f=ie(d);s<a?(W[r>>2]=p,W[r+4>>2]=f):(W[r>>2]=f,W[r+4>>2]=p)}function lo(e,t,r){lo.called||(lo.called=!0,uo(e,t,r))}function po(){He("native code called abort()")}Vn=()=>performance.now();var fo=!0;function mo(e,t){var r;if(0===e)r=Date.now();else{if(1!==e&&4!==e||!fo)return at(28),-1;r=Vn()}return W[t>>2]=r/1e3|0,W[t+4>>2]=r%1e3*1e3*1e3|0,0}function go(e,t){if(bo.mainLoop.timingMode=e,bo.mainLoop.timingValue=t,!bo.mainLoop.func)return T("emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up."),1;if(bo.mainLoop.running||(bo.mainLoop.running=!0),0==e)bo.mainLoop.scheduler=function(){var e=0|Math.max(0,bo.mainLoop.tickStartTime+t-Vn());setTimeout(bo.mainLoop.runner,e)},bo.mainLoop.method="timeout";else if(1==e)bo.mainLoop.scheduler=function(){bo.requestAnimationFrame(bo.mainLoop.runner)},bo.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),f?(void 0===o.setImmediates&&(o.setImmediates=[]),o.setImmediates.push(e),postMessage({target:n})):postMessage(n,"*")}}bo.mainLoop.scheduler=function(){setImmediate(bo.mainLoop.runner)},bo.mainLoop.method="immediate"}return 0}function ho(e){fp(e)}function Eo(){if(!Oe())try{ho(A)}catch(e){tt(e)}}function yo(e,t,r,n,i){I(!bo.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."),bo.mainLoop.func=e,bo.mainLoop.arg=n;var a=bo.mainLoop.currentlyRunningMainloop;function s(){return!(a<bo.mainLoop.currentlyRunningMainloop&&(Eo(),1))}if(bo.mainLoop.running=!1,bo.mainLoop.runner=function(){if(!k)if(bo.mainLoop.queue.length>0){var t=Date.now(),r=bo.mainLoop.queue.shift();if(r.func(r.arg),bo.mainLoop.remainingBlockers){var n=bo.mainLoop.remainingBlockers,i=n%1==0?n-1:Math.floor(n);r.counted?bo.mainLoop.remainingBlockers=i:(i+=.5,bo.mainLoop.remainingBlockers=(8*n+i)/9)}if(w('main loop blocker "'+r.name+'" took '+(Date.now()-t)+" ms"),bo.mainLoop.updateStatus(),!s())return;setTimeout(bo.mainLoop.runner,0)}else s()&&(bo.mainLoop.currentFrameNumber=bo.mainLoop.currentFrameNumber+1|0,1==bo.mainLoop.timingMode&&bo.mainLoop.timingValue>1&&bo.mainLoop.currentFrameNumber%bo.mainLoop.timingValue!=0?bo.mainLoop.scheduler():(0==bo.mainLoop.timingMode&&(bo.mainLoop.tickStartTime=Vn()),"timeout"===bo.mainLoop.method&&o.ctx&&(O("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!"),bo.mainLoop.method=""),bo.mainLoop.runIter(e),ge(),s()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),bo.mainLoop.scheduler())))},i||(t&&t>0?go(0,1e3/t):go(1,1),bo.mainLoop.scheduler()),r)throw"unwind"}function vo(e,t){if(we||k)T("user callback triggered after runtime exited or application aborted. Ignoring.");else if(t)e();else try{e()}catch(e){tt(e)}}function _o(e,t){return setTimeout((function(){vo(e)}),t)}var bo={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){bo.mainLoop.scheduler=null,bo.mainLoop.currentlyRunningMainloop++},resume:function(){bo.mainLoop.currentlyRunningMainloop++;var e=bo.mainLoop.timingMode,t=bo.mainLoop.timingValue,r=bo.mainLoop.func;bo.mainLoop.func=null,yo(r,0,!1,bo.mainLoop.arg,!0),go(e,t),bo.mainLoop.scheduler()},updateStatus:function(){if(o.setStatus){var e=o.statusMessage||"Please wait...",t=bo.mainLoop.remainingBlockers,r=bo.mainLoop.expectedBlockers;t?t<r?o.setStatus(e+" ("+(r-t)+"/"+r+")"):o.setStatus(e):o.setStatus("")}},runIter:function(e){if(!k){if(o.preMainLoop&&!1===o.preMainLoop())return;vo(e),o.postMainLoop&&o.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(o.preloadPlugins||(o.preloadPlugins=[]),!bo.initted){bo.initted=!0;try{new Blob,bo.hasBlobConstructor=!0}catch(e){bo.hasBlobConstructor=!1,w("warning: no blob constructor, cannot create blobs with mimetypes")}bo.BlobBuilder="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:bo.hasBlobConstructor?null:w("warning: no BlobBuilder"),bo.URLObject="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,o.noImageDecoding||void 0!==bo.URLObject||(w("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(bo.hasBlobConstructor)try{(i=new Blob([e],{type:bo.getMimetype(t)})).size!==e.length&&(i=new Blob([new Uint8Array(e).buffer],{type:bo.getMimetype(t)}))}catch(e){O("Blob constructor present but fails: "+e+"; falling back to blob builder")}if(!i){var a=new bo.BlobBuilder;a.append(new Uint8Array(e).buffer),i=a.getBlob()}var s=bo.URLObject.createObjectURL(i);I("string"==typeof s,"createObjectURL must return a url as a string");var c=new Image;c.onload=()=>{I(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,bo.URLObject.revokeObjectURL(s),r&&r(e)},c.onerror=e=>{w("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(!bo.hasBlobConstructor)return s();try{var c=new Blob([e],{type:bo.getMimetype(t)})}catch(e){return s()}var u=bo.URLObject.createObjectURL(c);I("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||(w("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,_o((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){!bo.pointerLock&&o.canvas.requestPointerLock&&(o.canvas.requestPointerLock(),e.preventDefault())}),!1))}function n(){bo.pointerLock=document.pointerLockElement===o.canvas||document.mozPointerLockElement===o.canvas||document.webkitPointerLockElement===o.canvas||document.msPointerLockElement===o.canvas}},handledByPreloadPlugin:function(e,t,r,n){bo.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!==Mo&&(a=Mo.createContext(e,s))&&(i=Mo.getContext(a).GLctx)}else i=e.getContext("2d");return i?(r&&(t||I(void 0===Pd,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),o.ctx=i,t&&Mo.makeContextCurrent(a),o.useWebGL=t,bo.moduleContextCreatedCallbacks.forEach((function(e){e()})),bo.init()),i):null},destroyContext:function(e,t,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(e,t){bo.lockPointer=e,bo.resizeCanvas=t,void 0===bo.lockPointer&&(bo.lockPointer=!0),void 0===bo.resizeCanvas&&(bo.resizeCanvas=!1);var r=o.canvas;function n(){bo.isFullscreen=!1;var e=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(r.exitFullscreen=bo.exitFullscreen,bo.lockPointer&&r.requestPointerLock(),bo.isFullscreen=!0,bo.resizeCanvas?bo.setFullscreenCanvasSize():bo.updateCanvasDimensions(r)):(e.parentNode.insertBefore(r,e),e.parentNode.removeChild(e),bo.resizeCanvas?bo.setWindowedCanvasSize():bo.updateCanvasDimensions(r)),o.onFullScreen&&o.onFullScreen(bo.isFullscreen),o.onFullscreen&&o.onFullscreen(bo.isFullscreen)}bo.fullscreenHandlersInstalled||(bo.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(){He("Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)")},exitFullscreen:function(){return!!bo.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===bo.nextRAF)bo.nextRAF=t+1e3/60;else for(;t+2>=bo.nextRAF;)bo.nextRAF+=1e3/60;var r=Math.max(bo.nextRAF-t,0);setTimeout(e,r)},requestAnimationFrame:function(e){"function"!=typeof requestAnimationFrame?(0,bo.fakeRequestAnimationFrame)(e):requestAnimationFrame(e)},safeSetTimeout:function(e){return _o(e)},safeRequestAnimationFrame:function(e){return bo.requestAnimationFrame((function(){vo(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(bo.pointerLock)"mousemove"!=e.type&&"mozMovementX"in e?bo.mouseMovementX=bo.mouseMovementY=0:(bo.mouseMovementX=bo.getMovementX(e),bo.mouseMovementY=bo.getMovementY(e)),"undefined"!=typeof SDL?(bo.mouseX=SDL.mouseX+bo.mouseMovementX,bo.mouseY=SDL.mouseY+bo.mouseMovementY):(bo.mouseX+=bo.mouseMovementX,bo.mouseY+=bo.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(I(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)bo.lastTouches[s.identifier]=l,bo.touches[s.identifier]=l;else if("touchend"===e.type||"touchmove"===e.type){var d=bo.touches[s.identifier];d||(d=l),bo.lastTouches[s.identifier]=d,bo.touches[s.identifier]=l}return}var p=e.pageX-(i+t.left),f=e.pageY-(a+t.top);p*=r/t.width,f*=n/t.height,bo.mouseMovementX=p-bo.mouseX,bo.mouseMovementY=f-bo.mouseY,bo.mouseX=p,bo.mouseY=f}},resizeListeners:[],updateResizeListeners:function(){var e=o.canvas;bo.resizeListeners.forEach((function(t){t(e.width,e.height)}))},setCanvasSize:function(e,t,r){var n=o.canvas;bo.updateCanvasDimensions(n,e,t),r||bo.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if("undefined"!=typeof SDL){var e=z[SDL.screen>>2];e|=8388608,W[SDL.screen>>2]=e}bo.updateCanvasDimensions(o.canvas),bo.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var e=z[SDL.screen>>2];e&=-8388609,W[SDL.screen>>2]=e}bo.updateCanvasDimensions(o.canvas),bo.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)}bo.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"))))}},wo={errorCode:12288,defaultDisplayInitialized:!1,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:!1,depth:!1,stencil:!1,antialias:!1},stringCache:{},setErrorCode:function(e){wo.errorCode=e},chooseConfig:function(e,t,r,n,o){if(62e3!=e)return wo.setErrorCode(12296),0;if(t)for(;;){var i=W[t>>2];if(12321==i){var a=W[t+4>>2];wo.contextAttributes.alpha=a>0}else if(12325==i){var s=W[t+4>>2];wo.contextAttributes.depth=s>0}else if(12326==i){var c=W[t+4>>2];wo.contextAttributes.stencil=c>0}else if(12337==i){var u=W[t+4>>2];wo.contextAttributes.antialias=u>0}else if(12338==i)u=W[t+4>>2],wo.contextAttributes.antialias=1==u;else if(12544==i){var l=W[t+4>>2];wo.contextAttributes.lowLatency=12547!=l}else if(12344==i)break;t+=8}return r&&n||o?(o&&(W[o>>2]=1),r&&n>0&&(W[r>>2]=62002),wo.setErrorCode(12288),1):(wo.setErrorCode(12300),0)}};function To(e,t,r,n,o){return wo.chooseConfig(e,t,r,n,o)}function Oo(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 Do(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 Po(e){var t=e.getExtension("WEBGL_draw_buffers");if(t)return e.drawBuffers=function(e,r){t.drawBuffersWEBGL(e,r)},1}function xo(e){return!!(e.dibvbi=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function So(e){return!!(e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))}function Ro(e){return!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw"))}var Mo={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function(e){Mo.lastError||(Mo.lastError=e)},getNewId:function(e){for(var t=Mo.counter++,r=e.length;r<t;r++)e[r]=null;return t},getSource:function(e,t,r,n){for(var o="",i=0;i<t;++i){var a=n?W[n+4*i>>2]:-1;o+=N(W[r+4*i>>2],a<0?void 0:a)}return o},createContext:function(e,t){e.getContextSafariWebGL2Fixed||(e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=function(t,r){var n=e.getContextSafariWebGL2Fixed(t,r);return"webgl"==t==n instanceof WebGLRenderingContext?n:null});var r=t.majorVersion>1?e.getContext("webgl2",t):e.getContext("webgl",t);return r?Mo.registerContext(r,t):0},registerContext:function(e,t){var r=Mo.getNewId(Mo.contexts),n={handle:r,attributes:t,version:t.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),Mo.contexts[r]=n,(void 0===t.enableExtensionsByDefault||t.enableExtensionsByDefault)&&Mo.initExtensions(n),r},makeContextCurrent:function(e){return Mo.currentContext=Mo.contexts[e],o.ctx=Pd=Mo.currentContext&&Mo.currentContext.GLctx,!(e&&!Pd)},getContext:function(e){return Mo.contexts[e]},deleteContext:function(e){Mo.currentContext===Mo.contexts[e]&&(Mo.currentContext=null),"object"==typeof Vl&&Vl.removeAllHandlersOnTarget(Mo.contexts[e].GLctx.canvas),Mo.contexts[e]&&Mo.contexts[e].GLctx.canvas&&(Mo.contexts[e].GLctx.canvas.GLctxObject=void 0),Mo.contexts[e]=null},initExtensions:function(e){if(e||(e=Mo.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var t=e.GLctx;Oo(t),Do(t),Po(t),xo(t),So(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")),Ro(t),(t.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}};function Fo(e,t,r,n){if(62e3!=e)return wo.setErrorCode(12296),0;for(var i=1;;){var a=W[n>>2];if(12440!=a){if(12344==a)break;return wo.setErrorCode(12292),0}i=W[n+4>>2],n+=8}return i<2||i>3?(wo.setErrorCode(12293),0):(wo.contextAttributes.majorVersion=i-1,wo.contextAttributes.minorVersion=0,wo.context=Mo.createContext(o.canvas,wo.contextAttributes),0!=wo.context?(wo.setErrorCode(12288),Mo.makeContextCurrent(wo.context),o.useWebGL=!0,bo.moduleContextCreatedCallbacks.forEach((function(e){e()})),Mo.makeContextCurrent(null),62004):(wo.setErrorCode(12297),0))}function Ao(e,t,r,n){return 62e3!=e?(wo.setErrorCode(12296),0):62002!=t?(wo.setErrorCode(12293),0):(wo.setErrorCode(12288),62006)}function ko(e,t){return 62e3!=e?(wo.setErrorCode(12296),0):62004!=t?(wo.setErrorCode(12294),0):(Mo.deleteContext(wo.context),wo.setErrorCode(12288),wo.currentContext==t&&(wo.currentContext=0),1)}function Io(e,t){return 62e3!=e?(wo.setErrorCode(12296),0):62006!=t?(wo.setErrorCode(12301),1):(wo.currentReadSurface==t&&(wo.currentReadSurface=0),wo.currentDrawSurface==t&&(wo.currentDrawSurface=0),wo.setErrorCode(12288),1)}function Co(e,t,r,n){if(62e3!=e)return wo.setErrorCode(12296),0;if(62002!=t)return wo.setErrorCode(12293),0;if(!n)return wo.setErrorCode(12300),0;switch(wo.setErrorCode(12288),r){case 12320:return W[n>>2]=wo.contextAttributes.alpha?32:24,1;case 12321:return W[n>>2]=wo.contextAttributes.alpha?8:0,1;case 12322:case 12323:case 12324:return W[n>>2]=8,1;case 12325:return W[n>>2]=wo.contextAttributes.depth?24:0,1;case 12326:return W[n>>2]=wo.contextAttributes.stencil?8:0,1;case 12327:case 12335:case 12340:return W[n>>2]=12344,1;case 12328:return W[n>>2]=62002,1;case 12329:case 12333:case 12334:case 12345:case 12346:case 12347:case 12349:case 12350:case 12354:return W[n>>2]=0,1;case 12330:case 12332:return W[n>>2]=4096,1;case 12331:return W[n>>2]=16777216,1;case 12337:return W[n>>2]=wo.contextAttributes.antialias?4:0,1;case 12338:return W[n>>2]=wo.contextAttributes.antialias?1:0,1;case 12339:case 12352:return W[n>>2]=4,1;case 12341:case 12342:case 12343:return W[n>>2]=-1,1;case 12348:return W[n>>2]=1,1;case 12351:return W[n>>2]=12430,1;default:return wo.setErrorCode(12292),0}}function Uo(e){return wo.setErrorCode(12288),62e3}function No(){return wo.errorCode}function jo(e,t,r){return 62e3==e?(t&&(W[t>>2]=1),r&&(W[r>>2]=4),wo.defaultDisplayInitialized=!0,wo.setErrorCode(12288),1):(wo.setErrorCode(12296),0)}function Lo(e,t,r,n){return 62e3!=e?(wo.setErrorCode(12296),0):0!=n&&62004!=n?(wo.setErrorCode(12294),0):0!=r&&62006!=r||0!=t&&62006!=t?(wo.setErrorCode(12301),0):(Mo.makeContextCurrent(n?wo.context:null),wo.currentContext=n,wo.currentDrawSurface=t,wo.currentReadSurface=r,wo.setErrorCode(12288),1)}function Ho(){if(wo.defaultDisplayInitialized)if(o.ctx){if(!o.ctx.isContextLost())return wo.setErrorCode(12288),1;wo.setErrorCode(12302)}else wo.setErrorCode(12290);else wo.setErrorCode(12289);return 0}function Bo(e){return 62e3!=e?(wo.setErrorCode(12296),0):(wo.currentContext=0,wo.currentReadSurface=0,wo.currentDrawSurface=0,wo.defaultDisplayInitialized=!1,wo.setErrorCode(12288),1)}function Xo(e){I("number"==typeof e),console.error(N(e))}function Qo(e){I("number"==typeof e),console.log(N(e))}function Go(e){I("number"==typeof e),console.warn(N(e))}function qo(){}function Wo(){return 2147483648}function zo(e){Pd.activeTexture(e)}function Vo(e,t){Pd.attachShader(Mo.programs[e],Mo.shaders[t])}function Yo(e,t){Pd.beginQuery(e,Mo.queries[t])}function $o(e,t){Pd.disjointTimerQueryExt.beginQueryEXT(e,Mo.queries[t])}function Ko(e){Pd.beginTransformFeedback(e)}function Zo(e,t,r){Pd.bindAttribLocation(Mo.programs[e],t,N(r))}function Jo(e,t){35051==e?Pd.currentPixelPackBufferBinding=t:35052==e&&(Pd.currentPixelUnpackBufferBinding=t),Pd.bindBuffer(e,Mo.buffers[t])}function ei(e,t,r){Pd.bindBufferBase(e,t,Mo.buffers[r])}function ti(e,t,r,n,o){Pd.bindBufferRange(e,t,Mo.buffers[r],n,o)}function ri(e,t){Pd.bindFramebuffer(e,Mo.framebuffers[t])}function ni(e,t){Pd.bindRenderbuffer(e,Mo.renderbuffers[t])}function oi(e,t){Pd.bindSampler(e,Mo.samplers[t])}function ii(e,t){Pd.bindTexture(e,Mo.textures[t])}function ai(e,t){Pd.bindTransformFeedback(e,Mo.transformFeedbacks[t])}function si(e){Pd.bindVertexArray(Mo.vaos[e])}function ci(e){Pd.bindVertexArray(Mo.vaos[e])}function ui(e,t,r,n){Pd.blendColor(e,t,r,n)}function li(e){Pd.blendEquation(e)}function di(e,t){Pd.blendEquationSeparate(e,t)}function pi(e,t){Pd.blendFunc(e,t)}function fi(e,t,r,n){Pd.blendFuncSeparate(e,t,r,n)}function mi(e,t,r,n,o,i,a,s,c,u){Pd.blitFramebuffer(e,t,r,n,o,i,a,s,c,u)}function gi(e,t,r,n){Mo.currentContext.version>=2?r?Pd.bufferData(e,Q,n,r,t):Pd.bufferData(e,t,n):Pd.bufferData(e,r?Q.subarray(r,r+t):t,n)}function hi(e,t,r,n){Mo.currentContext.version>=2?Pd.bufferSubData(e,t,Q,n,r):Pd.bufferSubData(e,t,Q.subarray(n,n+r))}function Ei(e){return Pd.checkFramebufferStatus(e)}function yi(e){Pd.clear(e)}function vi(e,t,r,n){Pd.clearBufferfi(e,t,r,n)}function _i(e,t,r){Pd.clearBufferfv(e,t,V,r>>2)}function bi(e,t,r){Pd.clearBufferiv(e,t,W,r>>2)}function wi(e,t,r){Pd.clearBufferuiv(e,t,z,r>>2)}function Ti(e,t,r,n){Pd.clearColor(e,t,r,n)}function Oi(e){Pd.clearDepth(e)}function Di(e){Pd.clearStencil(e)}function Pi(e,t){return I(t===(0|t)),(e>>>0)+4294967296*t}function xi(e,t,r,n){return Pd.clientWaitSync(Mo.syncs[e],t,Pi(r,n))}function Si(e,t,r,n){Pd.colorMask(!!e,!!t,!!r,!!n)}function Ri(e){Pd.compileShader(Mo.shaders[e])}function Mi(e,t,r,n,o,i,a,s){Mo.currentContext.version>=2?Pd.currentPixelUnpackBufferBinding?Pd.compressedTexImage2D(e,t,r,n,o,i,a,s):Pd.compressedTexImage2D(e,t,r,n,o,i,Q,s,a):Pd.compressedTexImage2D(e,t,r,n,o,i,s?Q.subarray(s,s+a):null)}function Fi(e,t,r,n,o,i,a,s,c){Pd.currentPixelUnpackBufferBinding?Pd.compressedTexImage3D(e,t,r,n,o,i,a,s,c):Pd.compressedTexImage3D(e,t,r,n,o,i,a,Q,c,s)}function Ai(e,t,r,n,o,i,a,s,c){Mo.currentContext.version>=2?Pd.currentPixelUnpackBufferBinding?Pd.compressedTexSubImage2D(e,t,r,n,o,i,a,s,c):Pd.compressedTexSubImage2D(e,t,r,n,o,i,a,Q,c,s):Pd.compressedTexSubImage2D(e,t,r,n,o,i,a,c?Q.subarray(c,c+s):null)}function ki(e,t,r,n,o,i,a,s,c,u,l){Pd.currentPixelUnpackBufferBinding?Pd.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,u,l):Pd.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,Q,l,u)}function Ii(e,t,r,n,o){Pd.copyBufferSubData(e,t,r,n,o)}function Ci(e,t,r,n,o,i,a,s){Pd.copyTexImage2D(e,t,r,n,o,i,a,s)}function Ui(e,t,r,n,o,i,a,s){Pd.copyTexSubImage2D(e,t,r,n,o,i,a,s)}function Ni(e,t,r,n,o,i,a,s,c){Pd.copyTexSubImage3D(e,t,r,n,o,i,a,s,c)}function ji(){var e=Mo.getNewId(Mo.programs),t=Pd.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,Mo.programs[e]=t,e}function Li(e){var t=Mo.getNewId(Mo.shaders);return Mo.shaders[t]=Pd.createShader(e),t}function Hi(e){Pd.cullFace(e)}function Bi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=Mo.buffers[n];o&&(Pd.deleteBuffer(o),o.name=0,Mo.buffers[n]=null,n==Pd.currentPixelPackBufferBinding&&(Pd.currentPixelPackBufferBinding=0),n==Pd.currentPixelUnpackBufferBinding&&(Pd.currentPixelUnpackBufferBinding=0))}}function Xi(e,t){for(var r=0;r<e;++r){var n=W[t+4*r>>2],o=Mo.framebuffers[n];o&&(Pd.deleteFramebuffer(o),o.name=0,Mo.framebuffers[n]=null)}}function Qi(e){if(e){var t=Mo.programs[e];t?(Pd.deleteProgram(t),t.name=0,Mo.programs[e]=null):Mo.recordError(1281)}}function Gi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=Mo.queries[n];o&&(Pd.deleteQuery(o),Mo.queries[n]=null)}}function qi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=Mo.queries[n];o&&(Pd.disjointTimerQueryExt.deleteQueryEXT(o),Mo.queries[n]=null)}}function Wi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=Mo.renderbuffers[n];o&&(Pd.deleteRenderbuffer(o),o.name=0,Mo.renderbuffers[n]=null)}}function zi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=Mo.samplers[n];o&&(Pd.deleteSampler(o),o.name=0,Mo.samplers[n]=null)}}function Vi(e){if(e){var t=Mo.shaders[e];t?(Pd.deleteShader(t),Mo.shaders[e]=null):Mo.recordError(1281)}}function Yi(e){if(e){var t=Mo.syncs[e];t?(Pd.deleteSync(t),t.name=0,Mo.syncs[e]=null):Mo.recordError(1281)}}function $i(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=Mo.textures[n];o&&(Pd.deleteTexture(o),o.name=0,Mo.textures[n]=null)}}function Ki(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2],o=Mo.transformFeedbacks[n];o&&(Pd.deleteTransformFeedback(o),o.name=0,Mo.transformFeedbacks[n]=null)}}function Zi(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2];Pd.deleteVertexArray(Mo.vaos[n]),Mo.vaos[n]=null}}function Ji(e,t){for(var r=0;r<e;r++){var n=W[t+4*r>>2];Pd.deleteVertexArray(Mo.vaos[n]),Mo.vaos[n]=null}}function ea(e){Pd.depthFunc(e)}function ta(e){Pd.depthMask(!!e)}function ra(e,t){Pd.depthRange(e,t)}function na(e,t){Pd.detachShader(Mo.programs[e],Mo.shaders[t])}function oa(e){Pd.disable(e)}function ia(e){Pd.disableVertexAttribArray(e)}function aa(e,t,r){Pd.drawArrays(e,t,r)}function sa(e,t,r,n){Pd.drawArraysInstanced(e,t,r,n)}function ca(e,t,r,n){Pd.drawArraysInstanced(e,t,r,n)}function ua(e,t,r,n){Pd.drawArraysInstanced(e,t,r,n)}function la(e,t,r,n,o){Pd.dibvbi.drawArraysInstancedBaseInstanceWEBGL(e,t,r,n,o)}function da(e,t,r,n){Pd.drawArraysInstanced(e,t,r,n)}function pa(e,t,r,n){Pd.drawArraysInstanced(e,t,r,n)}var fa=[];function ma(e,t){for(var r=fa[e],n=0;n<e;n++)r[n]=W[t+4*n>>2];Pd.drawBuffers(r)}function ga(e,t){for(var r=fa[e],n=0;n<e;n++)r[n]=W[t+4*n>>2];Pd.drawBuffers(r)}function ha(e,t){for(var r=fa[e],n=0;n<e;n++)r[n]=W[t+4*n>>2];Pd.drawBuffers(r)}function Ea(e,t,r,n){Pd.drawElements(e,t,r,n)}function ya(e,t,r,n,o){Pd.drawElementsInstanced(e,t,r,n,o)}function va(e,t,r,n,o){Pd.drawElementsInstanced(e,t,r,n,o)}function _a(e,t,r,n,o){Pd.drawElementsInstanced(e,t,r,n,o)}function ba(e,t,r,n,o,i,a){Pd.dibvbi.drawElementsInstancedBaseVertexBaseInstanceWEBGL(e,t,r,n,o,i,a)}function wa(e,t,r,n,o){Pd.drawElementsInstanced(e,t,r,n,o)}function Ta(e,t,r,n,o){Pd.drawElementsInstanced(e,t,r,n,o)}function Oa(e,t,r,n){Pd.drawElements(e,t,r,n)}function Da(e,t,r,n,o,i){Oa(e,n,o,i)}function Pa(e){Pd.enable(e)}function xa(e){Pd.enableVertexAttribArray(e)}function Sa(e){Pd.endQuery(e)}function Ra(e){Pd.disjointTimerQueryExt.endQueryEXT(e)}function Ma(){Pd.endTransformFeedback()}function Fa(e,t){var r=Pd.fenceSync(e,t);if(r){var n=Mo.getNewId(Mo.syncs);return r.name=n,Mo.syncs[n]=r,n}return 0}function Aa(){Pd.finish()}function ka(){Pd.flush()}function Ia(e,t,r,n){Pd.framebufferRenderbuffer(e,t,r,Mo.renderbuffers[n])}function Ca(e,t,r,n,o){Pd.framebufferTexture2D(e,t,r,Mo.textures[n],o)}function Ua(e,t,r,n,o){Pd.framebufferTextureLayer(e,t,Mo.textures[r],n,o)}function Na(e){Pd.frontFace(e)}function ja(e,t,r,n){for(var o=0;o<e;o++){var i=Pd[r](),a=i&&Mo.getNewId(n);i?(i.name=a,n[a]=i):Mo.recordError(1282),W[t+4*o>>2]=a}}function La(e,t){ja(e,t,"createBuffer",Mo.buffers)}function Ha(e,t){ja(e,t,"createFramebuffer",Mo.framebuffers)}function Ba(e,t){ja(e,t,"createQuery",Mo.queries)}function Xa(e,t){for(var r=0;r<e;r++){var n=Pd.disjointTimerQueryExt.createQueryEXT();if(!n){for(Mo.recordError(1282);r<e;)W[t+4*r++>>2]=0;return}var o=Mo.getNewId(Mo.queries);n.name=o,Mo.queries[o]=n,W[t+4*r>>2]=o}}function Qa(e,t){ja(e,t,"createRenderbuffer",Mo.renderbuffers)}function Ga(e,t){ja(e,t,"createSampler",Mo.samplers)}function qa(e,t){ja(e,t,"createTexture",Mo.textures)}function Wa(e,t){ja(e,t,"createTransformFeedback",Mo.transformFeedbacks)}function za(e,t){ja(e,t,"createVertexArray",Mo.vaos)}function Va(e,t){ja(e,t,"createVertexArray",Mo.vaos)}function Ya(e){Pd.generateMipmap(e)}function $a(e,t,r,n,o,i,a,s){t=Mo.programs[t];var c=Pd[e](t,r);if(c){var u=s&&L(c.name,s,n);o&&(W[o>>2]=u),i&&(W[i>>2]=c.size),a&&(W[a>>2]=c.type)}}function Ka(e,t,r,n,o,i,a){$a("getActiveAttrib",e,t,r,n,o,i,a)}function Za(e,t,r,n,o,i,a){$a("getActiveUniform",e,t,r,n,o,i,a)}function Ja(e,t,r,n,o){e=Mo.programs[e];var i=Pd.getActiveUniformBlockName(e,t);if(i)if(o&&r>0){var a=L(i,o,r);n&&(W[n>>2]=a)}else n&&(W[n>>2]=0)}function es(e,t,r,n){if(n)if(e=Mo.programs[e],35393!=r){var o=Pd.getActiveUniformBlockParameter(e,t,r);if(null!==o)if(35395==r)for(var i=0;i<o.length;i++)W[n+4*i>>2]=o[i];else W[n>>2]=o}else{var a=Pd.getActiveUniformBlockName(e,t);W[n>>2]=a.length+1}else Mo.recordError(1281)}function ts(e,t,r,n,o){if(o)if(t>0&&0==r)Mo.recordError(1281);else{e=Mo.programs[e];for(var i=[],a=0;a<t;a++)i.push(W[r+4*a>>2]);var s=Pd.getActiveUniforms(e,i,n);if(s){var c=s.length;for(a=0;a<c;a++)W[o+4*a>>2]=s[a]}}else Mo.recordError(1281)}function rs(e,t,r,n){var o=Pd.getAttachedShaders(Mo.programs[e]),i=o.length;i>t&&(i=t),W[r>>2]=i;for(var a=0;a<i;++a){var s=Mo.shaders.indexOf(o[a]);W[n+4*a>>2]=s}}function ns(e,t){return Pd.getAttribLocation(Mo.programs[e],N(t))}function os(e){return z[e>>2]+4294967296*W[e+4>>2]}function is(e){return z[e>>2]+4294967296*z[e+4>>2]}function as(e,t){z[e>>2]=t,z[e+4>>2]=(t-z[e>>2])/4294967296;var r=t>=0?is(e):os(e);r!=t&&O("writeI53ToI64() out of range: serialized JS Number "+t+" to Wasm heap as bytes lo=0x"+z[e>>2].toString(16)+", hi=0x"+z[e+4>>2].toString(16)+", which deserializes back to "+r+" instead!")}function ss(e,t,r){if(t){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=r&&1!=r&&Mo.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var o=Pd.getParameter(34467);n=o?o.length:0;break;case 33309:if(Mo.currentContext.version<2)return void Mo.recordError(1282);n=2*(Pd.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(Mo.currentContext.version<2)return void Mo.recordError(1280);n=33307==e?3:0}if(void 0===n){var i=Pd.getParameter(e);switch(typeof i){case"number":n=i;break;case"boolean":n=i?1:0;break;case"string":return void Mo.recordError(1280);case"object":if(null===i)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:n=0;break;default:return void Mo.recordError(1280)}else{if(i instanceof Float32Array||i instanceof Uint32Array||i instanceof Int32Array||i instanceof Array){for(var a=0;a<i.length;++a)switch(r){case 0:W[t+4*a>>2]=i[a];break;case 2:V[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 Mo.recordError(1280),void T("GL_INVALID_ENUM in glGet"+r+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+t+")")}}break;default:return Mo.recordError(1280),void T("GL_INVALID_ENUM in glGet"+r+"v: Native code calling glGet"+r+"v("+e+") and it returns "+i+" of type "+typeof i+"!")}}switch(r){case 1:as(t,n);break;case 0:W[t>>2]=n;break;case 2:V[t>>2]=n;break;case 4:X[t>>0]=n?1:0}}else Mo.recordError(1281)}function cs(e,t){ss(e,t,4)}function us(e,t,r){r?as(r,Pd.getBufferParameter(e,t)):Mo.recordError(1281)}function ls(e,t,r){r?W[r>>2]=Pd.getBufferParameter(e,t):Mo.recordError(1281)}function ds(){var e=Pd.getError()||Mo.lastError;return Mo.lastError=0,e}function ps(e,t){ss(e,t,2)}function fs(e,t){return Pd.getFragDataLocation(Mo.programs[e],N(t))}function ms(e,t,r,n){var o=Pd.getFramebufferAttachmentParameter(e,t,r);(o instanceof WebGLRenderbuffer||o instanceof WebGLTexture)&&(o=0|o.name),W[n>>2]=o}function gs(e,t,r,n){if(r){var o,i=Pd.getIndexedParameter(e,t);switch(typeof i){case"boolean":o=i?1:0;break;case"number":o=i;break;case"object":if(null===i)switch(e){case 35983:case 35368:o=0;break;default:return void Mo.recordError(1280)}else{if(!(i instanceof WebGLBuffer))return void Mo.recordError(1280);o=0|i.name}break;default:return void Mo.recordError(1280)}switch(n){case 1:as(r,o);break;case 0:W[r>>2]=o;break;case 2:V[r>>2]=o;break;case 4:X[r>>0]=o?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+n}}else Mo.recordError(1281)}function hs(e,t,r){gs(e,t,r,1)}function Es(e,t){ss(e,t,1)}function ys(e,t,r){gs(e,t,r,0)}function vs(e,t){ss(e,t,0)}function _s(e,t,r,n,o){if(n<0)Mo.recordError(1281);else if(o){var i=Pd.getInternalformatParameter(e,t,r);if(null!==i)for(var a=0;a<i.length&&a<n;++a)W[o+4*a>>2]=i[a]}else Mo.recordError(1281)}function bs(e,t,r,n,o){Mo.recordError(1282)}function ws(e,t,r,n){var o=Pd.getProgramInfoLog(Mo.programs[e]);null===o&&(o="(unknown error)");var i=t>0&&n?L(o,n,t):0;r&&(W[r>>2]=i)}function Ts(e,t,r){if(r)if(e>=Mo.counter)Mo.recordError(1281);else if(e=Mo.programs[e],35716==t){var n=Pd.getProgramInfoLog(e);null===n&&(n="(unknown error)"),W[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var o=0;o<Pd.getProgramParameter(e,35718);++o)e.maxUniformLength=Math.max(e.maxUniformLength,Pd.getActiveUniform(e,o).name.length+1);W[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(o=0;o<Pd.getProgramParameter(e,35721);++o)e.maxAttributeLength=Math.max(e.maxAttributeLength,Pd.getActiveAttrib(e,o).name.length+1);W[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(o=0;o<Pd.getProgramParameter(e,35382);++o)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,Pd.getActiveUniformBlockName(e,o).length+1);W[r>>2]=e.maxUniformBlockNameLength}else W[r>>2]=Pd.getProgramParameter(e,t);else Mo.recordError(1281)}function Os(e,t,r){if(r){var n,o=Mo.queries[e];as(r,"boolean"==typeof(n=Mo.currentContext.version<2?Pd.disjointTimerQueryExt.getQueryObjectEXT(o,t):Pd.getQueryParameter(o,t))?n?1:0:n)}else Mo.recordError(1281)}function Ds(e,t,r){if(r){var n,o=Mo.queries[e],i=Pd.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,W[r>>2]=n}else Mo.recordError(1281)}function Ps(e,t,r){if(r){var n,o=Mo.queries[e];as(r,"boolean"==typeof(n=Mo.currentContext.version<2?Pd.disjointTimerQueryExt.getQueryObjectEXT(o,t):Pd.getQueryParameter(o,t))?n?1:0:n)}else Mo.recordError(1281)}function xs(e,t,r){if(r){var n,o=Mo.queries[e],i=Pd.getQueryParameter(o,t);n="boolean"==typeof i?i?1:0:i,W[r>>2]=n}else Mo.recordError(1281)}function Ss(e,t,r){if(r){var n,o=Mo.queries[e],i=Pd.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,W[r>>2]=n}else Mo.recordError(1281)}function Rs(e,t,r){r?W[r>>2]=Pd.getQuery(e,t):Mo.recordError(1281)}function Ms(e,t,r){r?W[r>>2]=Pd.disjointTimerQueryExt.getQueryEXT(e,t):Mo.recordError(1281)}function Fs(e,t,r){r?W[r>>2]=Pd.getRenderbufferParameter(e,t):Mo.recordError(1281)}function As(e,t,r){r?V[r>>2]=Pd.getSamplerParameter(Mo.samplers[e],t):Mo.recordError(1281)}function ks(e,t,r){r?W[r>>2]=Pd.getSamplerParameter(Mo.samplers[e],t):Mo.recordError(1281)}function Is(e,t,r,n){var o=Pd.getShaderInfoLog(Mo.shaders[e]);null===o&&(o="(unknown error)");var i=t>0&&n?L(o,n,t):0;r&&(W[r>>2]=i)}function Cs(e,t,r,n){var o=Pd.getShaderPrecisionFormat(e,t);W[r>>2]=o.rangeMin,W[r+4>>2]=o.rangeMax,W[n>>2]=o.precision}function Us(e,t,r,n){var o=Pd.getShaderSource(Mo.shaders[e]);if(o){var i=t>0&&n?L(o,n,t):0;r&&(W[r>>2]=i)}}function Ns(e,t,r){if(r)if(35716==t){var n=Pd.getShaderInfoLog(Mo.shaders[e]);null===n&&(n="(unknown error)");var o=n?n.length+1:0;W[r>>2]=o}else if(35720==t){var i=Pd.getShaderSource(Mo.shaders[e]),a=i?i.length+1:0;W[r>>2]=a}else W[r>>2]=Pd.getShaderParameter(Mo.shaders[e],t);else Mo.recordError(1281)}function js(e){var t=H(e)+1,r=Ud(t);return L(e,r,t),r}function Ls(e){var t=Mo.stringCache[e];if(!t){switch(e){case 7939:var r=Pd.getSupportedExtensions()||[];t=js((r=r.concat(r.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=Pd.getParameter(e);n||Mo.recordError(1280),t=n&&js(n);break;case 7938:var o=Pd.getParameter(7938);t=js(o=Mo.currentContext.version>=2?"OpenGL ES 3.0 ("+o+")":"OpenGL ES 2.0 ("+o+")");break;case 35724:var i=Pd.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=js(i);break;default:Mo.recordError(1280)}Mo.stringCache[e]=t}return t}function Hs(e,t){if(Mo.currentContext.version<2)return Mo.recordError(1282),0;var r=Mo.stringiCache[e];if(r)return t<0||t>=r.length?(Mo.recordError(1281),0):r[t];if(7939===e){var n=Pd.getSupportedExtensions()||[];return n=(n=n.concat(n.map((function(e){return"GL_"+e})))).map((function(e){return js(e)})),r=Mo.stringiCache[e]=n,t<0||t>=r.length?(Mo.recordError(1281),0):r[t]}return Mo.recordError(1280),0}function Bs(e,t,r,n,o){if(r<0)Mo.recordError(1281);else if(o){var i=Pd.getSyncParameter(Mo.syncs[e],t);null!==i&&(W[o>>2]=i,n&&(W[n>>2]=1))}else Mo.recordError(1281)}function Xs(e,t,r){r?V[r>>2]=Pd.getTexParameter(e,t):Mo.recordError(1281)}function Qs(e,t,r){r?W[r>>2]=Pd.getTexParameter(e,t):Mo.recordError(1281)}function Gs(e,t,r,n,o,i,a){e=Mo.programs[e];var s=Pd.getTransformFeedbackVarying(e,t);if(s){if(a&&r>0){var c=L(s.name,a,r);n&&(W[n>>2]=c)}else n&&(W[n>>2]=0);o&&(W[o>>2]=s.size),i&&(W[i>>2]=s.type)}}function qs(e,t){return Pd.getUniformBlockIndex(Mo.programs[e],N(t))}function Ws(e,t,r,n){if(n)if(t>0&&(0==r||0==n))Mo.recordError(1281);else{e=Mo.programs[e];for(var o=[],i=0;i<t;i++)o.push(N(W[r+4*i>>2]));var a=Pd.getUniformIndices(e,o);if(a){var s=a.length;for(i=0;i<s;i++)W[n+4*i>>2]=a[i]}}else Mo.recordError(1281)}function zs(e){return parseInt(e)}function Vs(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function Ys(e){var t,r,n=e.uniformLocsById,o=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},t=0;t<Pd.getProgramParameter(e,35718);++t){var i=Pd.getActiveUniform(e,t),a=i.name,s=i.size,c=Vs(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 $s(e,t){if(t=N(t),e=Mo.programs[e]){Ys(e);var r=e.uniformLocsById,n=0,o=t,i=Vs(t);i>0&&(n=zs(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]||Pd.getUniformLocation(e,t)))return n}else Mo.recordError(1281);return-1}function Ks(e){var t=Pd.currentProgram;if(t){var r=t.uniformLocsById[e];return"number"==typeof r&&(t.uniformLocsById[e]=r=Pd.getUniformLocation(t,t.uniformArrayNamesById[e]+(r>0?"["+r+"]":""))),r}Mo.recordError(1282)}function Zs(e,t,r,n){if(r){Ys(e=Mo.programs[e]);var o=Pd.getUniform(e,Ks(t));if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:W[r>>2]=o;break;case 2:V[r>>2]=o}else for(var i=0;i<o.length;i++)switch(n){case 0:W[r+4*i>>2]=o[i];break;case 2:V[r+4*i>>2]=o[i]}}else Mo.recordError(1281)}function Js(e,t,r){Zs(e,t,r,2)}function ec(e,t,r){Zs(e,t,r,0)}function tc(e,t,r){Zs(e,t,r,0)}function rc(e,t,r,n){if(r){var o=Pd.getVertexAttrib(e,t);if(34975==t)W[r>>2]=o&&o.name;else if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:W[r>>2]=o;break;case 2:V[r>>2]=o;break;case 5:W[r>>2]=Math.fround(o)}else for(var i=0;i<o.length;i++)switch(n){case 0:W[r+4*i>>2]=o[i];break;case 2:V[r+4*i>>2]=o[i];break;case 5:W[r+4*i>>2]=Math.fround(o[i])}}else Mo.recordError(1281)}function nc(e,t,r){rc(e,t,r,0)}function oc(e,t,r){rc(e,t,r,0)}function ic(e,t,r){r?W[r>>2]=Pd.getVertexAttribOffset(e,t):Mo.recordError(1281)}function ac(e,t,r){rc(e,t,r,2)}function sc(e,t,r){rc(e,t,r,5)}function cc(e,t){Pd.hint(e,t)}function uc(e,t,r){for(var n=fa[t],o=0;o<t;o++)n[o]=W[r+4*o>>2];Pd.invalidateFramebuffer(e,n)}function lc(e,t,r,n,o,i,a){for(var s=fa[t],c=0;c<t;c++)s[c]=W[r+4*c>>2];Pd.invalidateSubFramebuffer(e,s,n,o,i,a)}function dc(e){var t=Mo.buffers[e];return t?Pd.isBuffer(t):0}function pc(e){return Pd.isEnabled(e)}function fc(e){var t=Mo.framebuffers[e];return t?Pd.isFramebuffer(t):0}function mc(e){return(e=Mo.programs[e])?Pd.isProgram(e):0}function gc(e){var t=Mo.queries[e];return t?Pd.isQuery(t):0}function hc(e){var t=Mo.queries[e];return t?Pd.disjointTimerQueryExt.isQueryEXT(t):0}function Ec(e){var t=Mo.renderbuffers[e];return t?Pd.isRenderbuffer(t):0}function yc(e){var t=Mo.samplers[e];return t?Pd.isSampler(t):0}function vc(e){var t=Mo.shaders[e];return t?Pd.isShader(t):0}function _c(e){return Pd.isSync(Mo.syncs[e])}function bc(e){var t=Mo.textures[e];return t?Pd.isTexture(t):0}function wc(e){return Pd.isTransformFeedback(Mo.transformFeedbacks[e])}function Tc(e){var t=Mo.vaos[e];return t?Pd.isVertexArray(t):0}function Oc(e){var t=Mo.vaos[e];return t?Pd.isVertexArray(t):0}function Dc(e){Pd.lineWidth(e)}function Pc(e){e=Mo.programs[e],Pd.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function xc(e,t,r,n,o,i){Pd.mdibvbi.multiDrawArraysInstancedBaseInstanceWEBGL(e,W,t>>2,W,r>>2,W,n>>2,z,o>>2,i)}function Sc(e,t,r,n,o,i,a,s){Pd.mdibvbi.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(e,W,t>>2,r,W,n>>2,W,o>>2,W,i>>2,z,a>>2,s)}function Rc(){Pd.pauseTransformFeedback()}function Mc(e,t){3317==e&&(Mo.unpackAlignment=t),Pd.pixelStorei(e,t)}function Fc(e,t){Pd.polygonOffset(e,t)}function Ac(e,t,r,n){Mo.recordError(1280)}function kc(e,t,r){Mo.recordError(1280)}function Ic(e,t){Pd.disjointTimerQueryExt.queryCounterEXT(Mo.queries[e],t)}function Cc(e){Pd.readBuffer(e)}function Uc(e,t,r,n){var o;return t*(e*r+(o=n)-1&-o)}function Nc(e){return{5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[e-6402]||1}function jc(e){return 0==(e-=5120)?X:1==e?Q:2==e?G:4==e?W:6==e?V:5==e||28922==e||28520==e||30779==e||30782==e?z:q}function Lc(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function Hc(e,t,r,n,o,i){var a=jc(e),s=Lc(a),c=1<<s,u=Uc(r,n,Nc(t)*c,Mo.unpackAlignment);return a.subarray(o>>s,o+u>>s)}function Bc(e,t,r,n,o,i,a){if(Mo.currentContext.version>=2)if(Pd.currentPixelPackBufferBinding)Pd.readPixels(e,t,r,n,o,i,a);else{var s=jc(i);Pd.readPixels(e,t,r,n,o,i,s,a>>Lc(s))}else{var c=Hc(i,o,r,n,a);c?Pd.readPixels(e,t,r,n,o,i,c):Mo.recordError(1280)}}function Xc(){}function Qc(e,t,r,n){Pd.renderbufferStorage(e,t,r,n)}function Gc(e,t,r,n,o){Pd.renderbufferStorageMultisample(e,t,r,n,o)}function qc(){Pd.resumeTransformFeedback()}function Wc(e,t){Pd.sampleCoverage(e,!!t)}function zc(e,t,r){Pd.samplerParameterf(Mo.samplers[e],t,r)}function Vc(e,t,r){var n=V[r>>2];Pd.samplerParameterf(Mo.samplers[e],t,n)}function Yc(e,t,r){Pd.samplerParameteri(Mo.samplers[e],t,r)}function $c(e,t,r){var n=W[r>>2];Pd.samplerParameteri(Mo.samplers[e],t,n)}function Kc(e,t,r,n){Pd.scissor(e,t,r,n)}function Zc(){Mo.recordError(1280)}function Jc(e,t,r,n){var o=Mo.getSource(e,t,r,n);if(Mo.currentContext.version>=2&&o.includes("#version 100")){var i="";(o=(o=o.replace(/#extension GL_OES_standard_derivatives : enable/g,"")).replace(/#extension GL_EXT_shader_texture_lod : enable/g,"")).includes("gl_FragColor")&&(i+="out mediump vec4 GL_FragColor;\n",o=o.replace(/gl_FragColor/g,"GL_FragColor")),o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o.includes("attribute")?(o=o.replace(/attribute/g,"in")).replace(/varying/g,"out"):o.replace(/varying/g,"in")).replace(/textureCubeLodEXT/g,"textureCubeLod")).replace(/texture2DLodEXT/g,"texture2DLod")).replace(/texture2DProjLodEXT/g,"texture2DProjLod")).replace(/texture2DGradEXT/g,"texture2DGrad")).replace(/texture2DProjGradEXT/g,"texture2DProjGrad")).replace(/textureCubeGradEXT/g,"textureCubeGrad")).replace(/textureCube/g,"texture")).replace(/texture1D/g,"texture")).replace(/texture2D/g,"texture")).replace(/texture3D/g,"texture")).replace(/#version 100/g,"#version 300 es\n"+i)}Pd.shaderSource(Mo.shaders[e],o)}function eu(e,t,r){Pd.stencilFunc(e,t,r)}function tu(e,t,r,n){Pd.stencilFuncSeparate(e,t,r,n)}function ru(e){Pd.stencilMask(e)}function nu(e,t){Pd.stencilMaskSeparate(e,t)}function ou(e,t,r){Pd.stencilOp(e,t,r)}function iu(e,t,r,n){Pd.stencilOpSeparate(e,t,r,n)}function au(e,t,r,n,o,i,a,s,c){if(Mo.currentContext.version>=2&&(6402==a&&6402==r&&5125==s&&(r=33190),36193==s&&(s=5131,6408==a&&6408==r&&(r=34842)),34041==r&&(r=35056)),Mo.currentContext.version>=2)if(Pd.currentPixelUnpackBufferBinding)Pd.texImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=jc(s);Pd.texImage2D(e,t,r,n,o,i,a,s,u,c>>Lc(u))}else Pd.texImage2D(e,t,r,n,o,i,a,s,null);else Pd.texImage2D(e,t,r,n,o,i,a,s,c?Hc(s,a,n,o,c):null)}function su(e,t,r,n,o,i,a,s,c,u){if(Pd.currentPixelUnpackBufferBinding)Pd.texImage3D(e,t,r,n,o,i,a,s,c,u);else if(u){var l=jc(c);Pd.texImage3D(e,t,r,n,o,i,a,s,c,l,u>>Lc(l))}else Pd.texImage3D(e,t,r,n,o,i,a,s,c,null)}function cu(e,t,r){Pd.texParameterf(e,t,r)}function uu(e,t,r){var n=V[r>>2];Pd.texParameterf(e,t,n)}function lu(e,t,r){Pd.texParameteri(e,t,r)}function du(e,t,r){var n=W[r>>2];Pd.texParameteri(e,t,n)}function pu(e,t,r,n,o){Pd.texStorage2D(e,t,r,n,o)}function fu(e,t,r,n,o,i){Pd.texStorage3D(e,t,r,n,o,i)}function mu(e,t,r,n,o,i,a,s,c){if(Mo.currentContext.version>=2&&36193==s&&(s=5131),Mo.currentContext.version>=2)if(Pd.currentPixelUnpackBufferBinding)Pd.texSubImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=jc(s);Pd.texSubImage2D(e,t,r,n,o,i,a,s,u,c>>Lc(u))}else Pd.texSubImage2D(e,t,r,n,o,i,a,s,null);else{var l=null;c&&(l=Hc(s,a,o,i,c)),Pd.texSubImage2D(e,t,r,n,o,i,a,s,l)}}function gu(e,t,r,n,o,i,a,s,c,u,l){if(Pd.currentPixelUnpackBufferBinding)Pd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,l);else if(l){var d=jc(u);Pd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,d,l>>Lc(d))}else Pd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,null)}function hu(e,t,r,n){e=Mo.programs[e];for(var o=[],i=0;i<t;i++)o.push(N(W[r+4*i>>2]));Pd.transformFeedbackVaryings(e,o,n)}function Eu(e,t){Pd.uniform1f(Ks(e),t)}var yu=[];function vu(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform1fv(Ks(e),V,r>>2,t);else{if(t<=288)for(var n=yu[t-1],o=0;o<t;++o)n[o]=V[r+4*o>>2];else n=V.subarray(r>>2,r+4*t>>2);Pd.uniform1fv(Ks(e),n)}}function _u(e,t){Pd.uniform1i(Ks(e),t)}var bu=[];function wu(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform1iv(Ks(e),W,r>>2,t);else{if(t<=288)for(var n=bu[t-1],o=0;o<t;++o)n[o]=W[r+4*o>>2];else n=W.subarray(r>>2,r+4*t>>2);Pd.uniform1iv(Ks(e),n)}}function Tu(e,t){Pd.uniform1ui(Ks(e),t)}function Ou(e,t,r){Pd.uniform1uiv(Ks(e),z,r>>2,t)}function Du(e,t,r){Pd.uniform2f(Ks(e),t,r)}function Pu(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform2fv(Ks(e),V,r>>2,2*t);else{if(t<=144)for(var n=yu[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);Pd.uniform2fv(Ks(e),n)}}function xu(e,t,r){Pd.uniform2i(Ks(e),t,r)}function Su(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform2iv(Ks(e),W,r>>2,2*t);else{if(t<=144)for(var n=bu[2*t-1],o=0;o<2*t;o+=2)n[o]=W[r+4*o>>2],n[o+1]=W[r+(4*o+4)>>2];else n=W.subarray(r>>2,r+8*t>>2);Pd.uniform2iv(Ks(e),n)}}function Ru(e,t,r){Pd.uniform2ui(Ks(e),t,r)}function Mu(e,t,r){Pd.uniform2uiv(Ks(e),z,r>>2,2*t)}function Fu(e,t,r,n){Pd.uniform3f(Ks(e),t,r,n)}function Au(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform3fv(Ks(e),V,r>>2,3*t);else{if(t<=96)for(var n=yu[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);Pd.uniform3fv(Ks(e),n)}}function ku(e,t,r,n){Pd.uniform3i(Ks(e),t,r,n)}function Iu(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform3iv(Ks(e),W,r>>2,3*t);else{if(t<=96)for(var n=bu[3*t-1],o=0;o<3*t;o+=3)n[o]=W[r+4*o>>2],n[o+1]=W[r+(4*o+4)>>2],n[o+2]=W[r+(4*o+8)>>2];else n=W.subarray(r>>2,r+12*t>>2);Pd.uniform3iv(Ks(e),n)}}function Cu(e,t,r,n){Pd.uniform3ui(Ks(e),t,r,n)}function Uu(e,t,r){Pd.uniform3uiv(Ks(e),z,r>>2,3*t)}function Nu(e,t,r,n,o){Pd.uniform4f(Ks(e),t,r,n,o)}function ju(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform4fv(Ks(e),V,r>>2,4*t);else{if(t<=72){var n=yu[4*t-1],o=V;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=V.subarray(r>>2,r+16*t>>2);Pd.uniform4fv(Ks(e),n)}}function Lu(e,t,r,n,o){Pd.uniform4i(Ks(e),t,r,n,o)}function Hu(e,t,r){if(Mo.currentContext.version>=2)Pd.uniform4iv(Ks(e),W,r>>2,4*t);else{if(t<=72)for(var n=bu[4*t-1],o=0;o<4*t;o+=4)n[o]=W[r+4*o>>2],n[o+1]=W[r+(4*o+4)>>2],n[o+2]=W[r+(4*o+8)>>2],n[o+3]=W[r+(4*o+12)>>2];else n=W.subarray(r>>2,r+16*t>>2);Pd.uniform4iv(Ks(e),n)}}function Bu(e,t,r,n,o){Pd.uniform4ui(Ks(e),t,r,n,o)}function Xu(e,t,r){Pd.uniform4uiv(Ks(e),z,r>>2,4*t)}function Qu(e,t,r){e=Mo.programs[e],Pd.uniformBlockBinding(e,t,r)}function Gu(e,t,r,n){if(Mo.currentContext.version>=2)Pd.uniformMatrix2fv(Ks(e),!!r,V,n>>2,4*t);else{if(t<=72)for(var o=yu[4*t-1],i=0;i<4*t;i+=4)o[i]=V[n+4*i>>2],o[i+1]=V[n+(4*i+4)>>2],o[i+2]=V[n+(4*i+8)>>2],o[i+3]=V[n+(4*i+12)>>2];else o=V.subarray(n>>2,n+16*t>>2);Pd.uniformMatrix2fv(Ks(e),!!r,o)}}function qu(e,t,r,n){Pd.uniformMatrix2x3fv(Ks(e),!!r,V,n>>2,6*t)}function Wu(e,t,r,n){Pd.uniformMatrix2x4fv(Ks(e),!!r,V,n>>2,8*t)}function zu(e,t,r,n){if(Mo.currentContext.version>=2)Pd.uniformMatrix3fv(Ks(e),!!r,V,n>>2,9*t);else{if(t<=32)for(var o=yu[9*t-1],i=0;i<9*t;i+=9)o[i]=V[n+4*i>>2],o[i+1]=V[n+(4*i+4)>>2],o[i+2]=V[n+(4*i+8)>>2],o[i+3]=V[n+(4*i+12)>>2],o[i+4]=V[n+(4*i+16)>>2],o[i+5]=V[n+(4*i+20)>>2],o[i+6]=V[n+(4*i+24)>>2],o[i+7]=V[n+(4*i+28)>>2],o[i+8]=V[n+(4*i+32)>>2];else o=V.subarray(n>>2,n+36*t>>2);Pd.uniformMatrix3fv(Ks(e),!!r,o)}}function Vu(e,t,r,n){Pd.uniformMatrix3x2fv(Ks(e),!!r,V,n>>2,6*t)}function Yu(e,t,r,n){Pd.uniformMatrix3x4fv(Ks(e),!!r,V,n>>2,12*t)}function $u(e,t,r,n){if(Mo.currentContext.version>=2)Pd.uniformMatrix4fv(Ks(e),!!r,V,n>>2,16*t);else{if(t<=18){var o=yu[16*t-1],i=V;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=V.subarray(n>>2,n+64*t>>2);Pd.uniformMatrix4fv(Ks(e),!!r,o)}}function Ku(e,t,r,n){Pd.uniformMatrix4x2fv(Ks(e),!!r,V,n>>2,8*t)}function Zu(e,t,r,n){Pd.uniformMatrix4x3fv(Ks(e),!!r,V,n>>2,12*t)}function Ju(e){e=Mo.programs[e],Pd.useProgram(e),Pd.currentProgram=e}function el(e){Pd.validateProgram(Mo.programs[e])}function tl(e,t){Pd.vertexAttrib1f(e,t)}function rl(e,t){Pd.vertexAttrib1f(e,V[t>>2])}function nl(e,t,r){Pd.vertexAttrib2f(e,t,r)}function ol(e,t){Pd.vertexAttrib2f(e,V[t>>2],V[t+4>>2])}function il(e,t,r,n){Pd.vertexAttrib3f(e,t,r,n)}function al(e,t){Pd.vertexAttrib3f(e,V[t>>2],V[t+4>>2],V[t+8>>2])}function sl(e,t,r,n,o){Pd.vertexAttrib4f(e,t,r,n,o)}function cl(e,t){Pd.vertexAttrib4f(e,V[t>>2],V[t+4>>2],V[t+8>>2],V[t+12>>2])}function ul(e,t){Pd.vertexAttribDivisor(e,t)}function ll(e,t){Pd.vertexAttribDivisor(e,t)}function dl(e,t){Pd.vertexAttribDivisor(e,t)}function pl(e,t){Pd.vertexAttribDivisor(e,t)}function fl(e,t){Pd.vertexAttribDivisor(e,t)}function ml(e,t,r,n,o){Pd.vertexAttribI4i(e,t,r,n,o)}function gl(e,t){Pd.vertexAttribI4i(e,W[t>>2],W[t+4>>2],W[t+8>>2],W[t+12>>2])}function hl(e,t,r,n,o){Pd.vertexAttribI4ui(e,t,r,n,o)}function El(e,t){Pd.vertexAttribI4ui(e,z[t>>2],z[t+4>>2],z[t+8>>2],z[t+12>>2])}function yl(e,t,r,n,o){Pd.vertexAttribIPointer(e,t,r,n,o)}function vl(e,t,r,n,o,i){Pd.vertexAttribPointer(e,t,r,!!n,o,i)}function _l(e,t,r,n){Pd.viewport(e,t,r,n)}function bl(e,t,r,n){Pd.waitSync(Mo.syncs[e],t,Pi(r,n))}function wl(e,t,r){Q.copyWithin(e,t,t+r)}function Tl(e){try{return R.grow(e-B.byteLength+65535>>>16),le(R.buffer),1}catch(t){T("emscripten_realloc_buffer: Attempted to grow heap from "+B.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function Ol(e){var t=Q.length;I((e>>>=0)>t);var r=2147483648;if(e>r)return T("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147483648 bytes!"),!1;for(var n=1;n<=4;n*=2){var o=t*(1+.2/n);o=Math.min(o,e+100663296);var i=Math.min(r,ue(Math.max(e,o),65536));if(Tl(i))return!0}return T("Failed to grow the heap from "+t+" bytes to "+i+" bytes, not enough memory!"),!1}function Dl(e,t,r,n,i,a,s,c,u){const l=o.UTF8ToString(e,e+t),d=o.HEAPU8.subarray(a,a+s),p=o.HEAPU32.subarray(c/4,c/4+u),f=o.emscripten_ubq_codec_decoderNextHandle++,m=[];for(let e=0;e<u;e++)m[e]=Mo.textures[p[e]];const g={codec:l,codedWidth:r,codedHeight:n,description:new Uint8Array(d)};try{const e=o.emscripten_ubq_codec_createVideoDecoder(m);e.configure(g),e.numberOfFrames=i,o.emscripten_ubq_codec_decoders.set(f,{videoDecoder:e,decoderConfig:g,textures:m})}catch{return 0}return f}function Pl(e,t,r,n,i){const a=o.UTF8ToString(e,e+t),s=o.emscripten_ubq_codec_encoderNextHandle++,c=o.specialHTMLTargets["!canvas"];c.width=r,c.height=n;const u={codec:a,width:r,height:n,avc:{format:"annexb"},fps:i};try{const e=new VideoEncoder({output:e=>{const t=o._malloc(e.byteLength),r=o.HEAPU8.subarray(t,t+e.byteLength);e.copyTo(r),o.emscripten_ubq_codec_muxChunk(s,t,e.byteLength),o._free(t)},error:e=>console.error(e)});e.configure(u),o.emscripten_ubq_codec_encoders.set(s,{videoEncoder:e,encoderConfig:u,groupOfPictures:150,frameIndex:0})}catch{return 0}return s}function xl(e,t,r,n,i,a){const s=o.emscripten_ubq_codec_decoders.get(e);"closed"===s.videoDecoder.state&&(s.videoDecoder=o.emscripten_ubq_codec_createVideoDecoder(s.texture),s.videoDecoder.configure(s.decoderConfig));const c=s.videoDecoder,u=o.HEAPU8.subarray(i,i+a),l=new EncodedVideoChunk({type:t?"key":"delta",timestamp:r,duration:n,data:u});try{c.decode(l)}catch(e){return console.error(e),!1}return!0}function Sl(e){o.emscripten_ubq_codec_decoders.get(e).videoDecoder.close(),o.emscripten_ubq_codec_decoders.delete(e)}function Rl(e){o.emscripten_ubq_codec_encoders.get(e).videoEncoder.close(),o.emscripten_ubq_codec_encoders.delete(e)}function Ml(e,t,r){const n=o.emscripten_ubq_codec_encoders.get(e),i=1e6*n.frameIndex/n.encoderConfig.fps,a=n.frameIndex%n.groupOfPictures==0,s=o.specialHTMLTargets["!canvas"],c=new VideoFrame(s,{timestamp:i});n.videoEncoder.encode(c,{keyFrame:a}),c.close(),n.frameIndex++}async function Fl(e){var t=o.emscripten_ubq_codec_getOnFinalizedEncodingCallback();const r=o.emscripten_ubq_codec_encoders.get(e);await r.videoEncoder.flush(),t.invoke()}async function Al(e){const t=o.emscripten_ubq_codec_decoders.get(e).videoDecoder;await t.flush(),t.decodedFrames=0}function kl(e){return o.emscripten_ubq_codec_decoders.get(e).videoDecoder.decodedFrames}function Il(){return"undefined"!=typeof VideoFrame&&"undefined"!=typeof VideoDecoder&&"undefined"!=typeof VideoEncoder}function Cl(e){const t=o.emscripten_ubq_codec_decoders.get(e).videoDecoder;t.decodedFrames=0,t.probing=!0}function Ul(e){const t=o.emscripten_ubq_codec_decoders.get(e).videoDecoder;t.probing=!1,t.decodedFrames=0}function Nl(e){const t=o.emscripten_ubq_codec_decoders.get(e),r=!0===t.videoDecoder.textureUploadFlag;return t.videoDecoder.textureUploadFlag=!1,r}function jl(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 Ll(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 Hl(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 p=o.UTF8ToString(t,r),f=o.UTF8ToString(l,d),m=o.emscripten_ubq_asyncFetchNextHandle++;o.emscripten_ubq_asyncFetchStates.set(m,{state:a.PENDING});let g={};for(let e=0;e<i;e++){const t=o.getValue(n+4*e,"i32"),r=o.emscripten_ubq_asyncFetchHeaders.get(t);g[r.key]=r.value}const h=s[e];let E;return"GET"!==h&&"HEAD"!==h&&(E=new Uint8Array(o.HEAPU8.buffer,c,u)),fetch(p,{method:h,headers:g,body:E,mode:"cors",credentials:f}).then((e=>{if(e.status>=200&&e.status<=209){let t=0;return e.headers.has("Content-Length")&&(t=+e.headers.get("Content-Length")),o.emscripten_ubq_asyncFetchTotalBytes.set(m,t),async function(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(m,n)}let a=new Uint8Array(n),s=0;for(let e of i)a.set(e,s),s+=e.length;return a}(e.body)}return Promise.reject(e.statusText)})).then((e=>{o.emscripten_ubq_asyncFetchStates.set(m,{state:a.FINISHED,result:e})})).catch((e=>{o.emscripten_ubq_asyncFetchStates.set(m,{state:a.ERROR,error:e})})),m}function Xl(e){return!!o.emscripten_ubq_asyncFetchStates.has(e)&&(o.emscripten_ubq_asyncFetchStates.delete(e),!0)}function Ql(e){return o.emscripten_ubq_asyncFetchCompletedBytes.has(e)?o.emscripten_ubq_asyncFetchCompletedBytes.get(e):0}function Gl(e){if(o.emscripten_ubq_asyncFetchStates.has(e)){const t=o.emscripten_ubq_asyncFetchStates.get(e);if(t.state==a.ALLOCATED)return t.resultAddress}return-1}function ql(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 Wl(e){return o.emscripten_ubq_asyncFetchStates.has(e)?o.emscripten_ubq_asyncFetchStates.get(e).state:-1}function zl(e){return o.emscripten_ubq_asyncFetchTotalBytes.has(e)?o.emscripten_ubq_asyncFetchTotalBytes.get(e):0}var Vl={inEventHandler:0,removeAllEventListeners:function(){for(var e=Vl.eventHandlers.length-1;e>=0;--e)Vl._removeHandler(e);Vl.eventHandlers=[],Vl.deferredCalls=[]},registerRemoveEventListeners:function(){Vl.removeEventListenersRegistered||(ve.push(Vl.removeAllEventListeners),Vl.removeEventListenersRegistered=!0)},deferredCalls:[],deferCall:function(e,t,r){function n(e,t){if(e.length!=t.length)return!1;for(var r in e)if(e[r]!=t[r])return!1;return!0}for(var o in Vl.deferredCalls){var i=Vl.deferredCalls[o];if(i.targetFunction==e&&n(i.argsList,r))return}Vl.deferredCalls.push({targetFunction:e,precedence:t,argsList:r}),Vl.deferredCalls.sort((function(e,t){return e.precedence<t.precedence}))},removeDeferredCalls:function(e){for(var t=0;t<Vl.deferredCalls.length;++t)Vl.deferredCalls[t].targetFunction==e&&(Vl.deferredCalls.splice(t,1),--t)},canPerformEventHandlerRequests:function(){return Vl.inEventHandler&&Vl.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(Vl.canPerformEventHandlerRequests())for(var e=0;e<Vl.deferredCalls.length;++e){var t=Vl.deferredCalls[e];Vl.deferredCalls.splice(e,1),--e,t.targetFunction.apply(null,t.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(e,t){for(var r=0;r<Vl.eventHandlers.length;++r)Vl.eventHandlers[r].target!=e||t&&t!=Vl.eventHandlers[r].eventTypeString||Vl._removeHandler(r--)},_removeHandler:function(e){var t=Vl.eventHandlers[e];t.target.removeEventListener(t.eventTypeString,t.eventListenerFunc,t.useCapture),Vl.eventHandlers.splice(e,1)},registerOrRemoveHandler:function(e){var t=function(t){++Vl.inEventHandler,Vl.currentEventHandler=e,Vl.runDeferredCalls(),e.handlerFunc(t),Vl.runDeferredCalls(),--Vl.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=t,e.target.addEventListener(e.eventTypeString,t,e.useCapture),Vl.eventHandlers.push(e),Vl.registerRemoveEventListeners();else for(var r=0;r<Vl.eventHandlers.length;++r)Vl.eventHandlers[r].target==e.target&&Vl.eventHandlers[r].eventTypeString==e.eventTypeString&&Vl._removeHandler(r--)},getNodeNameForTarget:function(e){return e?e==window?"#window":e==screen?"#screen":e&&e.nodeName?e.nodeName:"":""},fullscreenEnabled:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled}},Yl=["default","low-power","high-performance"];function $l(e){return e>2?N(e):e}var Kl=[0,"undefined"!=typeof document?document:0,"undefined"!=typeof window?window:0];function Zl(e){return e=$l(e),Kl[e]||("undefined"!=typeof document?document.querySelector(e):void 0)}function Jl(e){return Zl(e)}function ed(e,t){I(t);var r=t>>2,n=W[r+6],o={alpha:!!W[r+0],depth:!!W[r+1],stencil:!!W[r+2],antialias:!!W[r+3],premultipliedAlpha:!!W[r+4],preserveDrawingBuffer:!!W[r+5],powerPreference:Yl[n],failIfMajorPerformanceCaveat:!!W[r+7],majorVersion:W[r+8],minorVersion:W[r+9],enableExtensionsByDefault:W[r+10],explicitSwapControl:W[r+11],proxyContextToMainThread:W[r+12],renderViaOffscreenBackBuffer:W[r+13]},i=Jl(e);return i?o.explicitSwapControl?0:Mo.createContext(i,o):0}function td(e,t){return ed(e,t)}function rd(e){Mo.currentContext==e&&(Mo.currentContext=0),Mo.deleteContext(e)}function nd(e){I(e);for(var t=e>>2,r=0;r<14;++r)W[t+r]=0;W[t+0]=W[t+1]=W[t+3]=W[t+4]=W[t+8]=W[t+10]=1}function od(e){return Mo.makeContextCurrent(e)?0:-5}var id={};function ad(){return l||"./this.program"}function sd(){if(!sd.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",_:ad()};for(var t in id)void 0===id[t]?delete e[t]:e[t]=id[t];var r=[];for(var t in e)r.push(t+"="+e[t]);sd.strings=r}return sd.strings}function cd(e,t){var r=0;return sd().forEach((function(n,o){var i=t+r;W[e+4*o>>2]=i,ce(n,i),r+=n.length+1})),0}function ud(e,t){var r=sd();W[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),W[t>>2]=n,0}function ld(e){try{var t=vt.getStreamFromFD(e);return yt.close(t),0}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return e.errno}}function dd(e,t,r,n,o){try{var i=0|Number(n&BigInt(4294967295));I(!(0|Number(n>>BigInt(32))),"offsets over 2^32 not yet supported");var a=vt.getStreamFromFD(e),s=vt.doReadv(a,t,r,i);return W[o>>2]=s,0}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return e.errno}}function pd(e,t,r,n){try{var o=vt.getStreamFromFD(e),i=vt.doReadv(o,t,r);return W[n>>2]=i,0}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return e.errno}}function fd(e,t,r,n){try{var o=0|Number(t&BigInt(4294967295)),i=0|Number(t>>BigInt(32)),a=vt.getStreamFromFD(e),s=4294967296*i+(o>>>0),c=9007199254740992;return s<=-c||s>=c?-61:(yt.llseek(a,s,r),Y[n>>3]=BigInt(a.position),a.getdents&&0===s&&0===r&&(a.getdents=null),0)}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return e.errno}}function md(e,t,r,n){try{var o=vt.getStreamFromFD(e),i=vt.doWritev(o,t,r);return W[n>>2]=i,0}catch(e){if(void 0===yt||!(e instanceof yt.ErrnoError))throw e;return e.errno}}function gd(){return S()}function hd(e){var t=Date.now();return W[e>>2]=t/1e3|0,W[e+4>>2]=t%1e3*1e3|0,0}function Ed(e){x(e)}function yd(e){return e%4==0&&(e%100!=0||e%400==0)}function vd(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var _d=[31,29,31,30,31,30,31,31,30,31,30,31],bd=[31,28,31,30,31,30,31,31,30,31,30,31];function wd(e,t){for(var r=new Date(e.getTime());t>0;){var n=yd(r.getFullYear()),o=r.getMonth(),i=(n?_d:bd)[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 Td(e,t,r,n){var o=W[n+40>>2],i={tm_sec:W[n>>2],tm_min:W[n+4>>2],tm_hour:W[n+8>>2],tm_mday:W[n+12>>2],tm_mon:W[n+16>>2],tm_year:W[n+20>>2],tm_wday:W[n+24>>2],tm_yday:W[n+28>>2],tm_isdst:W[n+32>>2],tm_gmtoff:W[n+36>>2],tm_zone:o?N(o):""},a=N(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in s)a=a.replace(new RegExp(c,"g"),s[c]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function p(e,t){return d(e,t,"0")}function f(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 m(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 g(e){var t=wd(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=m(r),i=m(n);return f(o,t)<=0?f(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var h={"%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 p((e.tm_year+1900)/100|0,2)},"%d":function(e){return p(e.tm_mday,2)},"%e":function(e){return d(e.tm_mday,2," ")},"%g":function(e){return g(e).toString().substring(2)},"%G":function(e){return g(e)},"%H":function(e){return p(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),p(t,2)},"%j":function(e){return p(e.tm_mday+vd(yd(e.tm_year+1900)?_d:bd,e.tm_mon-1),3)},"%m":function(e){return p(e.tm_mon+1,2)},"%M":function(e){return p(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 p(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:wd(t,7-t.getDay()),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(f(r,n)<0){var o=vd(yd(n.getFullYear())?_d:bd,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return p(Math.ceil(i/7),2)}return 0===f(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=m(r),i=m(n),a=wd(new Date(e.tm_year+1900,0,1),e.tm_yday);return f(a,o)<0?"53":f(i,a)<=0?"01":(t=o.getFullYear()<e.tm_year+1900?e.tm_yday+32-o.getDate():e.tm_yday+1-o.getDate(),p(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:wd(t,0===t.getDay()?1:7-t.getDay()+1),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(f(r,n)<0){var o=vd(yd(n.getFullYear())?_d:bd,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return p(Math.ceil(i/7),2)}return 0===f(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"),h)a.includes(c)&&(a=a.replace(new RegExp(c,"g"),h[c](i)));var E=kd(a=a.replace(/\0\0/g,"%"),!1);return E.length>t?0:(se(E,e),E.length-1)}function Od(e,t,r,n){return Td(e,t,r,n)}function Dd(e){var t=Date.now()/1e3|0;return e&&(W[e>>2]=t),t}var Pd,xd=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=yt.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},Sd=365,Rd=146;Object.defineProperties(xd.prototype,{read:{get:function(){return(this.mode&Sd)===Sd},set:function(e){e?this.mode|=Sd:this.mode&=~Sd}},write:{get:function(){return(this.mode&Rd)===Rd},set:function(e){e?this.mode|=Rd:this.mode&=~Rd}},isFolder:{get:function(){return yt.isDir(this.mode)}},isDevice:{get:function(){return yt.isChrdev(this.mode)}}}),yt.FSNode=xd,yt.staticInit(),o.FS_createPath=yt.createPath,o.FS_createDataFile=yt.createDataFile,o.FS_createPreloadedFile=yt.createPreloadedFile,o.FS_createLazyFile=yt.createLazyFile,o.FS_createDevice=yt.createDevice,o.FS_unlink=yt.unlink,Et={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},Bt=o.InternalError=Ht(Error,"InternalError"),Vt(),Kt=o.BindingError=Ht(Error,"BindingError"),Mr(),vr(),Xr(),Wr=o.UnboundTypeError=Ht(Error,"UnboundTypeError"),sn(),o.requestFullscreen=function(e,t){bo.requestFullscreen(e,t)},o.requestFullScreen=function(){bo.requestFullScreen()},o.requestAnimationFrame=function(e){bo.requestAnimationFrame(e)},o.setCanvasSize=function(e,t,r){bo.setCanvasSize(e,t,r)},o.pauseMainLoop=function(){bo.mainLoop.pause()},o.resumeMainLoop=function(){bo.mainLoop.resume()},o.getUserMedia=function(){bo.getUserMedia()},o.createContext=function(e,t,r,n){return bo.createContext(e,t,r,n)};for(var Md=0;Md<32;++Md)fa.push(new Array(Md));var Fd=new Float32Array(288);for(Md=0;Md<288;++Md)yu[Md]=Fd.subarray(0,Md+1);var Ad=new Int32Array(288);for(Md=0;Md<288;++Md)bu[Md]=Ad.subarray(0,Md+1);function kd(e,t,r){var n=r>0?r:H(e)+1,o=new Array(n),i=j(e,o,0,o.length);return t&&(o.length=i),o}"function"==typeof atob&&atob;var Id,Cd={__assert_fail:rt,__cxa_allocate_exception:nt,__cxa_throw:it,__syscall_fcntl64:_t,__syscall_fstat64:bt,__syscall_fstatat64:wt,__syscall_getdents64:Tt,__syscall_ioctl:Ot,__syscall_lstat64:Dt,__syscall_open:Pt,__syscall_stat64:xt,_dlopen_js:St,_dlsym_js:Rt,_embind_finalize_value_array:Gt,_embind_finalize_value_object:Wt,_embind_register_bigint:tr,_embind_register_bool:nr,_embind_register_class:Yr,_embind_register_class_constructor:Kr,_embind_register_class_function:en,_embind_register_emval:un,_embind_register_enum:dn,_embind_register_enum_value:fn,_embind_register_float:gn,_embind_register_function:hn,_embind_register_integer:En,_embind_register_memory_view:yn,_embind_register_smart_ptr:vn,_embind_register_std_string:_n,_embind_register_std_wstring:bn,_embind_register_value_array:wn,_embind_register_value_array_element:Tn,_embind_register_value_object:On,_embind_register_value_object_field:Dn,_embind_register_void:Pn,_emscripten_throw_longjmp:xn,_emval_as:Sn,_emval_call:Mn,_emval_call_method:Cn,_emval_call_void_method:Un,_emval_decref:nn,_emval_get_global:jn,_emval_get_method_caller:Bn,_emval_get_property:Xn,_emval_incref:Qn,_emval_instanceof:Gn,_emval_is_number:qn,_emval_is_string:Wn,_emval_new:$n,_emval_new_array:Kn,_emval_new_cstring:Zn,_emval_new_object:Jn,_emval_run_destructors:eo,_emval_set_property:to,_emval_take_value:ro,_emval_throw:no,_gmtime_js:oo,_localtime_js:io,_mktime_js:ao,_mmap_js:so,_munmap_js:co,_tzset_js:lo,abort:po,clock_gettime:mo,eglChooseConfig:To,eglCreateContext:Fo,eglCreateWindowSurface:Ao,eglDestroyContext:ko,eglDestroySurface:Io,eglGetConfigAttrib:Co,eglGetDisplay:Uo,eglGetError:No,eglInitialize:jo,eglMakeCurrent:Lo,eglSwapBuffers:Ho,eglTerminate:Bo,emscripten_console_error:Xo,emscripten_console_log:Qo,emscripten_console_warn:Go,emscripten_debugger:qo,emscripten_get_heap_max:Wo,emscripten_get_now:Vn,emscripten_glActiveTexture:zo,emscripten_glAttachShader:Vo,emscripten_glBeginQuery:Yo,emscripten_glBeginQueryEXT:$o,emscripten_glBeginTransformFeedback:Ko,emscripten_glBindAttribLocation:Zo,emscripten_glBindBuffer:Jo,emscripten_glBindBufferBase:ei,emscripten_glBindBufferRange:ti,emscripten_glBindFramebuffer:ri,emscripten_glBindRenderbuffer:ni,emscripten_glBindSampler:oi,emscripten_glBindTexture:ii,emscripten_glBindTransformFeedback:ai,emscripten_glBindVertexArray:si,emscripten_glBindVertexArrayOES:ci,emscripten_glBlendColor:ui,emscripten_glBlendEquation:li,emscripten_glBlendEquationSeparate:di,emscripten_glBlendFunc:pi,emscripten_glBlendFuncSeparate:fi,emscripten_glBlitFramebuffer:mi,emscripten_glBufferData:gi,emscripten_glBufferSubData:hi,emscripten_glCheckFramebufferStatus:Ei,emscripten_glClear:yi,emscripten_glClearBufferfi:vi,emscripten_glClearBufferfv:_i,emscripten_glClearBufferiv:bi,emscripten_glClearBufferuiv:wi,emscripten_glClearColor:Ti,emscripten_glClearDepthf:Oi,emscripten_glClearStencil:Di,emscripten_glClientWaitSync:xi,emscripten_glColorMask:Si,emscripten_glCompileShader:Ri,emscripten_glCompressedTexImage2D:Mi,emscripten_glCompressedTexImage3D:Fi,emscripten_glCompressedTexSubImage2D:Ai,emscripten_glCompressedTexSubImage3D:ki,emscripten_glCopyBufferSubData:Ii,emscripten_glCopyTexImage2D:Ci,emscripten_glCopyTexSubImage2D:Ui,emscripten_glCopyTexSubImage3D:Ni,emscripten_glCreateProgram:ji,emscripten_glCreateShader:Li,emscripten_glCullFace:Hi,emscripten_glDeleteBuffers:Bi,emscripten_glDeleteFramebuffers:Xi,emscripten_glDeleteProgram:Qi,emscripten_glDeleteQueries:Gi,emscripten_glDeleteQueriesEXT:qi,emscripten_glDeleteRenderbuffers:Wi,emscripten_glDeleteSamplers:zi,emscripten_glDeleteShader:Vi,emscripten_glDeleteSync:Yi,emscripten_glDeleteTextures:$i,emscripten_glDeleteTransformFeedbacks:Ki,emscripten_glDeleteVertexArrays:Zi,emscripten_glDeleteVertexArraysOES:Ji,emscripten_glDepthFunc:ea,emscripten_glDepthMask:ta,emscripten_glDepthRangef:ra,emscripten_glDetachShader:na,emscripten_glDisable:oa,emscripten_glDisableVertexAttribArray:ia,emscripten_glDrawArrays:aa,emscripten_glDrawArraysInstanced:sa,emscripten_glDrawArraysInstancedANGLE:ca,emscripten_glDrawArraysInstancedARB:ua,emscripten_glDrawArraysInstancedBaseInstanceWEBGL:la,emscripten_glDrawArraysInstancedEXT:da,emscripten_glDrawArraysInstancedNV:pa,emscripten_glDrawBuffers:ma,emscripten_glDrawBuffersEXT:ga,emscripten_glDrawBuffersWEBGL:ha,emscripten_glDrawElements:Ea,emscripten_glDrawElementsInstanced:ya,emscripten_glDrawElementsInstancedANGLE:va,emscripten_glDrawElementsInstancedARB:_a,emscripten_glDrawElementsInstancedBaseVertexBaseInstanceWEBGL:ba,emscripten_glDrawElementsInstancedEXT:wa,emscripten_glDrawElementsInstancedNV:Ta,emscripten_glDrawRangeElements:Da,emscripten_glEnable:Pa,emscripten_glEnableVertexAttribArray:xa,emscripten_glEndQuery:Sa,emscripten_glEndQueryEXT:Ra,emscripten_glEndTransformFeedback:Ma,emscripten_glFenceSync:Fa,emscripten_glFinish:Aa,emscripten_glFlush:ka,emscripten_glFramebufferRenderbuffer:Ia,emscripten_glFramebufferTexture2D:Ca,emscripten_glFramebufferTextureLayer:Ua,emscripten_glFrontFace:Na,emscripten_glGenBuffers:La,emscripten_glGenFramebuffers:Ha,emscripten_glGenQueries:Ba,emscripten_glGenQueriesEXT:Xa,emscripten_glGenRenderbuffers:Qa,emscripten_glGenSamplers:Ga,emscripten_glGenTextures:qa,emscripten_glGenTransformFeedbacks:Wa,emscripten_glGenVertexArrays:za,emscripten_glGenVertexArraysOES:Va,emscripten_glGenerateMipmap:Ya,emscripten_glGetActiveAttrib:Ka,emscripten_glGetActiveUniform:Za,emscripten_glGetActiveUniformBlockName:Ja,emscripten_glGetActiveUniformBlockiv:es,emscripten_glGetActiveUniformsiv:ts,emscripten_glGetAttachedShaders:rs,emscripten_glGetAttribLocation:ns,emscripten_glGetBooleanv:cs,emscripten_glGetBufferParameteri64v:us,emscripten_glGetBufferParameteriv:ls,emscripten_glGetError:ds,emscripten_glGetFloatv:ps,emscripten_glGetFragDataLocation:fs,emscripten_glGetFramebufferAttachmentParameteriv:ms,emscripten_glGetInteger64i_v:hs,emscripten_glGetInteger64v:Es,emscripten_glGetIntegeri_v:ys,emscripten_glGetIntegerv:vs,emscripten_glGetInternalformativ:_s,emscripten_glGetProgramBinary:bs,emscripten_glGetProgramInfoLog:ws,emscripten_glGetProgramiv:Ts,emscripten_glGetQueryObjecti64vEXT:Os,emscripten_glGetQueryObjectivEXT:Ds,emscripten_glGetQueryObjectui64vEXT:Ps,emscripten_glGetQueryObjectuiv:xs,emscripten_glGetQueryObjectuivEXT:Ss,emscripten_glGetQueryiv:Rs,emscripten_glGetQueryivEXT:Ms,emscripten_glGetRenderbufferParameteriv:Fs,emscripten_glGetSamplerParameterfv:As,emscripten_glGetSamplerParameteriv:ks,emscripten_glGetShaderInfoLog:Is,emscripten_glGetShaderPrecisionFormat:Cs,emscripten_glGetShaderSource:Us,emscripten_glGetShaderiv:Ns,emscripten_glGetString:Ls,emscripten_glGetStringi:Hs,emscripten_glGetSynciv:Bs,emscripten_glGetTexParameterfv:Xs,emscripten_glGetTexParameteriv:Qs,emscripten_glGetTransformFeedbackVarying:Gs,emscripten_glGetUniformBlockIndex:qs,emscripten_glGetUniformIndices:Ws,emscripten_glGetUniformLocation:$s,emscripten_glGetUniformfv:Js,emscripten_glGetUniformiv:ec,emscripten_glGetUniformuiv:tc,emscripten_glGetVertexAttribIiv:nc,emscripten_glGetVertexAttribIuiv:oc,emscripten_glGetVertexAttribPointerv:ic,emscripten_glGetVertexAttribfv:ac,emscripten_glGetVertexAttribiv:sc,emscripten_glHint:cc,emscripten_glInvalidateFramebuffer:uc,emscripten_glInvalidateSubFramebuffer:lc,emscripten_glIsBuffer:dc,emscripten_glIsEnabled:pc,emscripten_glIsFramebuffer:fc,emscripten_glIsProgram:mc,emscripten_glIsQuery:gc,emscripten_glIsQueryEXT:hc,emscripten_glIsRenderbuffer:Ec,emscripten_glIsSampler:yc,emscripten_glIsShader:vc,emscripten_glIsSync:_c,emscripten_glIsTexture:bc,emscripten_glIsTransformFeedback:wc,emscripten_glIsVertexArray:Tc,emscripten_glIsVertexArrayOES:Oc,emscripten_glLineWidth:Dc,emscripten_glLinkProgram:Pc,emscripten_glMultiDrawArraysInstancedBaseInstanceWEBGL:xc,emscripten_glMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL:Sc,emscripten_glPauseTransformFeedback:Rc,emscripten_glPixelStorei:Mc,emscripten_glPolygonOffset:Fc,emscripten_glProgramBinary:Ac,emscripten_glProgramParameteri:kc,emscripten_glQueryCounterEXT:Ic,emscripten_glReadBuffer:Cc,emscripten_glReadPixels:Bc,emscripten_glReleaseShaderCompiler:Xc,emscripten_glRenderbufferStorage:Qc,emscripten_glRenderbufferStorageMultisample:Gc,emscripten_glResumeTransformFeedback:qc,emscripten_glSampleCoverage:Wc,emscripten_glSamplerParameterf:zc,emscripten_glSamplerParameterfv:Vc,emscripten_glSamplerParameteri:Yc,emscripten_glSamplerParameteriv:$c,emscripten_glScissor:Kc,emscripten_glShaderBinary:Zc,emscripten_glShaderSource:Jc,emscripten_glStencilFunc:eu,emscripten_glStencilFuncSeparate:tu,emscripten_glStencilMask:ru,emscripten_glStencilMaskSeparate:nu,emscripten_glStencilOp:ou,emscripten_glStencilOpSeparate:iu,emscripten_glTexImage2D:au,emscripten_glTexImage3D:su,emscripten_glTexParameterf:cu,emscripten_glTexParameterfv:uu,emscripten_glTexParameteri:lu,emscripten_glTexParameteriv:du,emscripten_glTexStorage2D:pu,emscripten_glTexStorage3D:fu,emscripten_glTexSubImage2D:mu,emscripten_glTexSubImage3D:gu,emscripten_glTransformFeedbackVaryings:hu,emscripten_glUniform1f:Eu,emscripten_glUniform1fv:vu,emscripten_glUniform1i:_u,emscripten_glUniform1iv:wu,emscripten_glUniform1ui:Tu,emscripten_glUniform1uiv:Ou,emscripten_glUniform2f:Du,emscripten_glUniform2fv:Pu,emscripten_glUniform2i:xu,emscripten_glUniform2iv:Su,emscripten_glUniform2ui:Ru,emscripten_glUniform2uiv:Mu,emscripten_glUniform3f:Fu,emscripten_glUniform3fv:Au,emscripten_glUniform3i:ku,emscripten_glUniform3iv:Iu,emscripten_glUniform3ui:Cu,emscripten_glUniform3uiv:Uu,emscripten_glUniform4f:Nu,emscripten_glUniform4fv:ju,emscripten_glUniform4i:Lu,emscripten_glUniform4iv:Hu,emscripten_glUniform4ui:Bu,emscripten_glUniform4uiv:Xu,emscripten_glUniformBlockBinding:Qu,emscripten_glUniformMatrix2fv:Gu,emscripten_glUniformMatrix2x3fv:qu,emscripten_glUniformMatrix2x4fv:Wu,emscripten_glUniformMatrix3fv:zu,emscripten_glUniformMatrix3x2fv:Vu,emscripten_glUniformMatrix3x4fv:Yu,emscripten_glUniformMatrix4fv:$u,emscripten_glUniformMatrix4x2fv:Ku,emscripten_glUniformMatrix4x3fv:Zu,emscripten_glUseProgram:Ju,emscripten_glValidateProgram:el,emscripten_glVertexAttrib1f:tl,emscripten_glVertexAttrib1fv:rl,emscripten_glVertexAttrib2f:nl,emscripten_glVertexAttrib2fv:ol,emscripten_glVertexAttrib3f:il,emscripten_glVertexAttrib3fv:al,emscripten_glVertexAttrib4f:sl,emscripten_glVertexAttrib4fv:cl,emscripten_glVertexAttribDivisor:ul,emscripten_glVertexAttribDivisorANGLE:ll,emscripten_glVertexAttribDivisorARB:dl,emscripten_glVertexAttribDivisorEXT:pl,emscripten_glVertexAttribDivisorNV:fl,emscripten_glVertexAttribI4i:ml,emscripten_glVertexAttribI4iv:gl,emscripten_glVertexAttribI4ui:hl,emscripten_glVertexAttribI4uiv:El,emscripten_glVertexAttribIPointer:yl,emscripten_glVertexAttribPointer:vl,emscripten_glViewport:_l,emscripten_glWaitSync:bl,emscripten_memcpy_big:wl,emscripten_resize_heap:Ol,emscripten_ubq_codec_createDecoder:Dl,emscripten_ubq_codec_createEncoder:Pl,emscripten_ubq_codec_decodeSample:xl,emscripten_ubq_codec_destroyDecoder:Sl,emscripten_ubq_codec_destroyEncoder:Rl,emscripten_ubq_codec_encodeFrame:Ml,emscripten_ubq_codec_finalizeEncoding:Fl,emscripten_ubq_codec_flushDecoder:Al,emscripten_ubq_codec_getNumberOfDecodedFrames:kl,emscripten_ubq_codec_isSupported:Il,emscripten_ubq_codec_startProbing:Cl,emscripten_ubq_codec_stopProbing:Ul,emscripten_ubq_codec_testAndClearTextureUpdateFlag:Nl,emscripten_ubq_fetch_allocateFetchResult:jl,emscripten_ubq_fetch_createHeader:Ll,emscripten_ubq_fetch_deleteHeader:Hl,emscripten_ubq_fetch_dispatchAsyncFetch:Bl,emscripten_ubq_fetch_freeFetchResult:Xl,emscripten_ubq_fetch_getFetchCompletedBytes:Ql,emscripten_ubq_fetch_getFetchResultAddress:Gl,emscripten_ubq_fetch_getFetchResultLength:ql,emscripten_ubq_fetch_getFetchState:Wl,emscripten_ubq_fetch_getFetchTotalBytes:zl,emscripten_webgl_create_context:td,emscripten_webgl_destroy_context:rd,emscripten_webgl_init_context_attributes:nd,emscripten_webgl_make_context_current:od,environ_get:cd,environ_sizes_get:ud,exit:ho,fd_close:ld,fd_pread:dd,fd_read:pd,fd_seek:fd,fd_write:md,getTempRet0:gd,gettimeofday:hd,invoke_ii:Vd,invoke_iii:Yd,invoke_iiii:Kd,invoke_iiiii:np,invoke_iiiiii:ep,invoke_iiiiiii:rp,invoke_v:ap,invoke_vi:Zd,invoke_vii:Jd,invoke_viii:$d,invoke_viiii:tp,invoke_viiiii:op,invoke_viiiiii:sp,invoke_viiiiiiiii:ip,setTempRet0:Ed,strftime_l:Od,time:Dd},Ud=(Ye(),o.___wasm_call_ctors=We("__wasm_call_ctors"),o._malloc=We("malloc")),Nd=(o._main=We("main"),o._free=We("free")),jd=o.___errno_location=We("__errno_location"),Ld=(o._saveSetjmp=We("saveSetjmp"),o.___getTypeName=We("__getTypeName")),Hd=(o.___embind_register_native_and_builtin_types=We("__embind_register_native_and_builtin_types"),o.___stdio_exit=We("__stdio_exit")),Bd=(o.___dl_seterr=We("__dl_seterr"),o._emscripten_main_thread_process_queued_calls=We("emscripten_main_thread_process_queued_calls"),o._emscripten_builtin_memalign=We("emscripten_builtin_memalign")),Xd=o._setThrew=We("setThrew"),Qd=o._emscripten_stack_init=function(){return(Qd=o._emscripten_stack_init=o.asm.emscripten_stack_init).apply(null,arguments)},Gd=(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(Gd=o._emscripten_stack_get_end=o.asm.emscripten_stack_get_end).apply(null,arguments)}),qd=o.stackSave=We("stackSave"),Wd=o.stackRestore=We("stackRestore"),zd=o.stackAlloc=We("stackAlloc");function Vd(e,t){var r=qd();try{return et(e)(t)}catch(e){if(Wd(r),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function Yd(e,t,r){var n=qd();try{return et(e)(t,r)}catch(e){if(Wd(n),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function $d(e,t,r,n){var o=qd();try{et(e)(t,r,n)}catch(e){if(Wd(o),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function Kd(e,t,r,n){var o=qd();try{return et(e)(t,r,n)}catch(e){if(Wd(o),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function Zd(e,t){var r=qd();try{et(e)(t)}catch(e){if(Wd(r),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function Jd(e,t,r){var n=qd();try{et(e)(t,r)}catch(e){if(Wd(n),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function ep(e,t,r,n,o,i){var a=qd();try{return et(e)(t,r,n,o,i)}catch(e){if(Wd(a),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function tp(e,t,r,n,o){var i=qd();try{et(e)(t,r,n,o)}catch(e){if(Wd(i),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function rp(e,t,r,n,o,i,a){var s=qd();try{return et(e)(t,r,n,o,i,a)}catch(e){if(Wd(s),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function np(e,t,r,n,o){var i=qd();try{return et(e)(t,r,n,o)}catch(e){if(Wd(i),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function op(e,t,r,n,o,i){var a=qd();try{et(e)(t,r,n,o,i)}catch(e){if(Wd(a),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function ip(e,t,r,n,o,i,a,s,c,u){var l=qd();try{et(e)(t,r,n,o,i,a,s,c,u)}catch(e){if(Wd(l),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function ap(e){var t=qd();try{et(e)()}catch(e){if(Wd(t),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function sp(e,t,r,n,o,i,a){var s=qd();try{et(e)(t,r,n,o,i,a)}catch(e){if(Wd(s),e!==e+0&&"longjmp"!==e)throw e;Xd(1,0)}}function cp(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function up(e){I(0==ke,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),I(0==he.length,"cannot call main when preRun functions remain to be called");var t=o._main,r=(e=e||[]).length+1,n=zd(4*(r+1));W[n>>2]=ae(l);for(var i=1;i<r;i++)W[(n>>2)+i]=ae(e[i-1]);W[(n>>2)+r]=0;try{var a=t(r,n);return fp(a,!0),a}catch(e){return tt(e)}}function lp(){Qd(),me()}function dp(e){function r(){Id||(Id=!0,o.calledRun=!0,k||(Pe(),xe(),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),gp&&up(e),Re()))}e=e||u,ke>0||(lp(),De(),ke>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),r()}),1)):r(),ge()))}function pp(){var e=w,t=T,r=!1;w=T=e=>{r=!0};try{Hd(),["stdout","stderr"].forEach((function(e){var t=yt.analyzePath("/dev/"+e);if(t){var n=t.object.rdev,o=lt.ttys[n];o&&o.output&&o.output.length&&(r=!0)}}))}catch(e){}w=e,T=t,r&&O("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 fp(e,t){if(A=e,Te||pp(),Oe()){if(!t){var r="program exited (with status: "+e+"), but EXIT_RUNTIME is not set, so halting execution but not exiting the runtime or preventing further async execution (build with EXIT_RUNTIME=1, if you want a true shutdown)";n(r),T(r)}}else Se();mp(e)}function mp(e){A=e,Oe()||(o.onExit&&o.onExit(e),k=!0),d(e,new cp(e))}if(Object.getOwnPropertyDescriptor(o,"intArrayFromString")||(o.intArrayFromString=()=>He("'intArrayFromString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"intArrayToString")||(o.intArrayToString=()=>He("'intArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ccall")||(o.ccall=()=>He("'ccall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"cwrap")||(o.cwrap=()=>He("'cwrap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setValue")||(o.setValue=()=>He("'setValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.getValue=F,Object.getOwnPropertyDescriptor(o,"allocate")||(o.allocate=()=>He("'allocate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UTF8ArrayToString")||(o.UTF8ArrayToString=()=>He("'UTF8ArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.UTF8ToString=N,Object.getOwnPropertyDescriptor(o,"stringToUTF8Array")||(o.stringToUTF8Array=()=>He("'stringToUTF8Array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToUTF8")||(o.stringToUTF8=()=>He("'stringToUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF8")||(o.lengthBytesUTF8=()=>He("'lengthBytesUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackTrace")||(o.stackTrace=()=>He("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnPreRun")||(o.addOnPreRun=()=>He("'addOnPreRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnInit")||(o.addOnInit=()=>He("'addOnInit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnPreMain")||(o.addOnPreMain=()=>He("'addOnPreMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnExit")||(o.addOnExit=()=>He("'addOnExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addOnPostRun")||(o.addOnPostRun=()=>He("'addOnPostRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeStringToMemory")||(o.writeStringToMemory=()=>He("'writeStringToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeArrayToMemory")||(o.writeArrayToMemory=()=>He("'writeArrayToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeAsciiToMemory")||(o.writeAsciiToMemory=()=>He("'writeAsciiToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.addRunDependency=je,o.removeRunDependency=Le,Object.getOwnPropertyDescriptor(o,"FS_createFolder")||(o.FS_createFolder=()=>He("'FS_createFolder' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.FS_createPath=yt.createPath,o.FS_createDataFile=yt.createDataFile,o.FS_createPreloadedFile=yt.createPreloadedFile,o.FS_createLazyFile=yt.createLazyFile,Object.getOwnPropertyDescriptor(o,"FS_createLink")||(o.FS_createLink=()=>He("'FS_createLink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.FS_createDevice=yt.createDevice,o.FS_unlink=yt.unlink,Object.getOwnPropertyDescriptor(o,"getLEB")||(o.getLEB=()=>He("'getLEB' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getFunctionTables")||(o.getFunctionTables=()=>He("'getFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"alignFunctionTables")||(o.alignFunctionTables=()=>He("'alignFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerFunctions")||(o.registerFunctions=()=>He("'registerFunctions' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"addFunction")||(o.addFunction=()=>He("'addFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"removeFunction")||(o.removeFunction=()=>He("'removeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getFuncWrapper")||(o.getFuncWrapper=()=>He("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"prettyPrint")||(o.prettyPrint=()=>He("'prettyPrint' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"dynCall")||(o.dynCall=()=>He("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getCompilerSetting")||(o.getCompilerSetting=()=>He("'getCompilerSetting' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"print")||(o.print=()=>He("'print' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"printErr")||(o.printErr=()=>He("'printErr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getTempRet0")||(o.getTempRet0=()=>He("'getTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setTempRet0")||(o.setTempRet0=()=>He("'setTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"callMain")||(o.callMain=()=>He("'callMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"abort")||(o.abort=()=>He("'abort' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"keepRuntimeAlive")||(o.keepRuntimeAlive=()=>He("'keepRuntimeAlive' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"zeroMemory")||(o.zeroMemory=()=>He("'zeroMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToNewUTF8")||(o.stringToNewUTF8=()=>He("'stringToNewUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscripten_realloc_buffer")||(o.emscripten_realloc_buffer=()=>He("'emscripten_realloc_buffer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ENV")||(o.ENV=()=>He("'ENV' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"withStackSave")||(o.withStackSave=()=>He("'withStackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ERRNO_CODES")||(o.ERRNO_CODES=()=>He("'ERRNO_CODES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ERRNO_MESSAGES")||(o.ERRNO_MESSAGES=()=>He("'ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setErrNo")||(o.setErrNo=()=>He("'setErrNo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetPton4")||(o.inetPton4=()=>He("'inetPton4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetNtop4")||(o.inetNtop4=()=>He("'inetNtop4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetPton6")||(o.inetPton6=()=>He("'inetPton6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"inetNtop6")||(o.inetNtop6=()=>He("'inetNtop6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readSockaddr")||(o.readSockaddr=()=>He("'readSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeSockaddr")||(o.writeSockaddr=()=>He("'writeSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"DNS")||(o.DNS=()=>He("'DNS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getHostByName")||(o.getHostByName=()=>He("'getHostByName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Protocols")||(o.Protocols=()=>He("'Protocols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Sockets")||(o.Sockets=()=>He("'Sockets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getRandomDevice")||(o.getRandomDevice=()=>He("'getRandomDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"traverseStack")||(o.traverseStack=()=>He("'traverseStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertFrameToPC")||(o.convertFrameToPC=()=>He("'convertFrameToPC' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UNWIND_CACHE")||(o.UNWIND_CACHE=()=>He("'UNWIND_CACHE' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"saveInUnwindCache")||(o.saveInUnwindCache=()=>He("'saveInUnwindCache' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertPCtoSourceLocation")||(o.convertPCtoSourceLocation=()=>He("'convertPCtoSourceLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readAsmConstArgsArray")||(o.readAsmConstArgsArray=()=>He("'readAsmConstArgsArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readAsmConstArgs")||(o.readAsmConstArgs=()=>He("'readAsmConstArgs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"mainThreadEM_ASM")||(o.mainThreadEM_ASM=()=>He("'mainThreadEM_ASM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"jstoi_q")||(o.jstoi_q=()=>He("'jstoi_q' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"jstoi_s")||(o.jstoi_s=()=>He("'jstoi_s' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getExecutableName")||(o.getExecutableName=()=>He("'getExecutableName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"listenOnce")||(o.listenOnce=()=>He("'listenOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"autoResumeAudioContext")||(o.autoResumeAudioContext=()=>He("'autoResumeAudioContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"dynCall")||(o.dynCall=()=>He("'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"callRuntimeCallbacks")||(o.callRuntimeCallbacks=()=>He("'callRuntimeCallbacks' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"wasmTableMirror")||(o.wasmTableMirror=()=>He("'wasmTableMirror' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setWasmTableEntry")||(o.setWasmTableEntry=()=>He("'setWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getWasmTableEntry")||(o.getWasmTableEntry=()=>He("'getWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"handleException")||(o.handleException=()=>He("'handleException' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runtimeKeepalivePush")||(o.runtimeKeepalivePush=()=>He("'runtimeKeepalivePush' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runtimeKeepalivePop")||(o.runtimeKeepalivePop=()=>He("'runtimeKeepalivePop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"callUserCallback")||(o.callUserCallback=()=>He("'callUserCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"maybeExit")||(o.maybeExit=()=>He("'maybeExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"safeSetTimeout")||(o.safeSetTimeout=()=>He("'safeSetTimeout' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"asmjsMangle")||(o.asmjsMangle=()=>He("'asmjsMangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"asyncLoad")||(o.asyncLoad=()=>He("'asyncLoad' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"alignMemory")||(o.alignMemory=()=>He("'alignMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"mmapAlloc")||(o.mmapAlloc=()=>He("'mmapAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"reallyNegative")||(o.reallyNegative=()=>He("'reallyNegative' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"unSign")||(o.unSign=()=>He("'unSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"reSign")||(o.reSign=()=>He("'reSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"formatString")||(o.formatString=()=>He("'formatString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PATH")||(o.PATH=()=>He("'PATH' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PATH_FS")||(o.PATH_FS=()=>He("'PATH_FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SYSCALLS")||(o.SYSCALLS=()=>He("'SYSCALLS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getSocketFromFD")||(o.getSocketFromFD=()=>He("'getSocketFromFD' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getSocketAddress")||(o.getSocketAddress=()=>He("'getSocketAddress' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"JSEvents")||(o.JSEvents=()=>He("'JSEvents' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerKeyEventCallback")||(o.registerKeyEventCallback=()=>He("'registerKeyEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.specialHTMLTargets=Kl,Object.getOwnPropertyDescriptor(o,"maybeCStringToJsString")||(o.maybeCStringToJsString=()=>He("'maybeCStringToJsString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"findEventTarget")||(o.findEventTarget=()=>He("'findEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"findCanvasEventTarget")||(o.findCanvasEventTarget=()=>He("'findCanvasEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getBoundingClientRect")||(o.getBoundingClientRect=()=>He("'getBoundingClientRect' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillMouseEventData")||(o.fillMouseEventData=()=>He("'fillMouseEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerMouseEventCallback")||(o.registerMouseEventCallback=()=>He("'registerMouseEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerWheelEventCallback")||(o.registerWheelEventCallback=()=>He("'registerWheelEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerUiEventCallback")||(o.registerUiEventCallback=()=>He("'registerUiEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerFocusEventCallback")||(o.registerFocusEventCallback=()=>He("'registerFocusEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillDeviceOrientationEventData")||(o.fillDeviceOrientationEventData=()=>He("'fillDeviceOrientationEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerDeviceOrientationEventCallback")||(o.registerDeviceOrientationEventCallback=()=>He("'registerDeviceOrientationEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillDeviceMotionEventData")||(o.fillDeviceMotionEventData=()=>He("'fillDeviceMotionEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerDeviceMotionEventCallback")||(o.registerDeviceMotionEventCallback=()=>He("'registerDeviceMotionEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"screenOrientation")||(o.screenOrientation=()=>He("'screenOrientation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillOrientationChangeEventData")||(o.fillOrientationChangeEventData=()=>He("'fillOrientationChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerOrientationChangeEventCallback")||(o.registerOrientationChangeEventCallback=()=>He("'registerOrientationChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillFullscreenChangeEventData")||(o.fillFullscreenChangeEventData=()=>He("'fillFullscreenChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerFullscreenChangeEventCallback")||(o.registerFullscreenChangeEventCallback=()=>He("'registerFullscreenChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerRestoreOldStyle")||(o.registerRestoreOldStyle=()=>He("'registerRestoreOldStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"hideEverythingExceptGivenElement")||(o.hideEverythingExceptGivenElement=()=>He("'hideEverythingExceptGivenElement' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"restoreHiddenElements")||(o.restoreHiddenElements=()=>He("'restoreHiddenElements' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setLetterbox")||(o.setLetterbox=()=>He("'setLetterbox' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"currentFullscreenStrategy")||(o.currentFullscreenStrategy=()=>He("'currentFullscreenStrategy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"restoreOldWindowedStyle")||(o.restoreOldWindowedStyle=()=>He("'restoreOldWindowedStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"softFullscreenResizeWebGLRenderTarget")||(o.softFullscreenResizeWebGLRenderTarget=()=>He("'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"doRequestFullscreen")||(o.doRequestFullscreen=()=>He("'doRequestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillPointerlockChangeEventData")||(o.fillPointerlockChangeEventData=()=>He("'fillPointerlockChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerPointerlockChangeEventCallback")||(o.registerPointerlockChangeEventCallback=()=>He("'registerPointerlockChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerPointerlockErrorEventCallback")||(o.registerPointerlockErrorEventCallback=()=>He("'registerPointerlockErrorEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"requestPointerLock")||(o.requestPointerLock=()=>He("'requestPointerLock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillVisibilityChangeEventData")||(o.fillVisibilityChangeEventData=()=>He("'fillVisibilityChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerVisibilityChangeEventCallback")||(o.registerVisibilityChangeEventCallback=()=>He("'registerVisibilityChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerTouchEventCallback")||(o.registerTouchEventCallback=()=>He("'registerTouchEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillGamepadEventData")||(o.fillGamepadEventData=()=>He("'fillGamepadEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerGamepadEventCallback")||(o.registerGamepadEventCallback=()=>He("'registerGamepadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerBeforeUnloadEventCallback")||(o.registerBeforeUnloadEventCallback=()=>He("'registerBeforeUnloadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"fillBatteryEventData")||(o.fillBatteryEventData=()=>He("'fillBatteryEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"battery")||(o.battery=()=>He("'battery' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerBatteryEventCallback")||(o.registerBatteryEventCallback=()=>He("'registerBatteryEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setCanvasElementSize")||(o.setCanvasElementSize=()=>He("'setCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getCanvasElementSize")||(o.getCanvasElementSize=()=>He("'getCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"demangle")||(o.demangle=()=>He("'demangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"demangleAll")||(o.demangleAll=()=>He("'demangleAll' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"jsStackTrace")||(o.jsStackTrace=()=>He("'jsStackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackTrace")||(o.stackTrace=()=>He("'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getEnvStrings")||(o.getEnvStrings=()=>He("'getEnvStrings' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"checkWasiClock")||(o.checkWasiClock=()=>He("'checkWasiClock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToI64")||(o.writeI53ToI64=()=>He("'writeI53ToI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToI64Clamped")||(o.writeI53ToI64Clamped=()=>He("'writeI53ToI64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToI64Signaling")||(o.writeI53ToI64Signaling=()=>He("'writeI53ToI64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToU64Clamped")||(o.writeI53ToU64Clamped=()=>He("'writeI53ToU64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeI53ToU64Signaling")||(o.writeI53ToU64Signaling=()=>He("'writeI53ToU64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readI53FromI64")||(o.readI53FromI64=()=>He("'readI53FromI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readI53FromU64")||(o.readI53FromU64=()=>He("'readI53FromU64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertI32PairToI53")||(o.convertI32PairToI53=()=>He("'convertI32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"convertU32PairToI53")||(o.convertU32PairToI53=()=>He("'convertU32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setImmediateWrapped")||(o.setImmediateWrapped=()=>He("'setImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"clearImmediateWrapped")||(o.clearImmediateWrapped=()=>He("'clearImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"polyfillSetImmediate")||(o.polyfillSetImmediate=()=>He("'polyfillSetImmediate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"uncaughtExceptionCount")||(o.uncaughtExceptionCount=()=>He("'uncaughtExceptionCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exceptionLast")||(o.exceptionLast=()=>He("'exceptionLast' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exceptionCaught")||(o.exceptionCaught=()=>He("'exceptionCaught' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ExceptionInfo")||(o.ExceptionInfo=()=>He("'ExceptionInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"CatchInfo")||(o.CatchInfo=()=>He("'CatchInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exception_addRef")||(o.exception_addRef=()=>He("'exception_addRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exception_decRef")||(o.exception_decRef=()=>He("'exception_decRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Browser")||(o.Browser=()=>He("'Browser' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"funcWrappers")||(o.funcWrappers=()=>He("'funcWrappers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getFuncWrapper")||(o.getFuncWrapper=()=>He("'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setMainLoop")||(o.setMainLoop=()=>He("'setMainLoop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"wget")||(o.wget=()=>He("'wget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"FS")||(o.FS=()=>He("'FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"MEMFS")||(o.MEMFS=()=>He("'MEMFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"TTY")||(o.TTY=()=>He("'TTY' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PIPEFS")||(o.PIPEFS=()=>He("'PIPEFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SOCKFS")||(o.SOCKFS=()=>He("'SOCKFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"_setNetworkCallback")||(o._setNetworkCallback=()=>He("'_setNetworkCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"tempFixedLengthArray")||(o.tempFixedLengthArray=()=>He("'tempFixedLengthArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"miniTempWebGLFloatBuffers")||(o.miniTempWebGLFloatBuffers=()=>He("'miniTempWebGLFloatBuffers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"heapObjectForWebGLType")||(o.heapObjectForWebGLType=()=>He("'heapObjectForWebGLType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"heapAccessShiftForWebGLHeap")||(o.heapAccessShiftForWebGLHeap=()=>He("'heapAccessShiftForWebGLHeap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GL")||(o.GL=()=>He("'GL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGet")||(o.emscriptenWebGLGet=()=>He("'emscriptenWebGLGet' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"computeUnpackAlignedImageSize")||(o.computeUnpackAlignedImageSize=()=>He("'computeUnpackAlignedImageSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetTexPixelData")||(o.emscriptenWebGLGetTexPixelData=()=>He("'emscriptenWebGLGetTexPixelData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetUniform")||(o.emscriptenWebGLGetUniform=()=>He("'emscriptenWebGLGetUniform' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"webglGetUniformLocation")||(o.webglGetUniformLocation=()=>He("'webglGetUniformLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"webglPrepareUniformLocationsBeforeFirstUse")||(o.webglPrepareUniformLocationsBeforeFirstUse=()=>He("'webglPrepareUniformLocationsBeforeFirstUse' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"webglGetLeftBracePos")||(o.webglGetLeftBracePos=()=>He("'webglGetLeftBracePos' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetVertexAttrib")||(o.emscriptenWebGLGetVertexAttrib=()=>He("'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"writeGLArray")||(o.writeGLArray=()=>He("'writeGLArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"AL")||(o.AL=()=>He("'AL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_unicode")||(o.SDL_unicode=()=>He("'SDL_unicode' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_ttfContext")||(o.SDL_ttfContext=()=>He("'SDL_ttfContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_audio")||(o.SDL_audio=()=>He("'SDL_audio' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL")||(o.SDL=()=>He("'SDL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"SDL_gfx")||(o.SDL_gfx=()=>He("'SDL_gfx' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLUT")||(o.GLUT=()=>He("'GLUT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"EGL")||(o.EGL=()=>He("'EGL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLFW_Window")||(o.GLFW_Window=()=>He("'GLFW_Window' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLFW")||(o.GLFW=()=>He("'GLFW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"GLEW")||(o.GLEW=()=>He("'GLEW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"IDBStore")||(o.IDBStore=()=>He("'IDBStore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runAndAbortIfError")||(o.runAndAbortIfError=()=>He("'runAndAbortIfError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emscriptenWebGLGetIndexed")||(o.emscriptenWebGLGetIndexed=()=>He("'emscriptenWebGLGetIndexed' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"InternalError")||(o.InternalError=()=>He("'InternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"BindingError")||(o.BindingError=()=>He("'BindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UnboundTypeError")||(o.UnboundTypeError=()=>He("'UnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"PureVirtualError")||(o.PureVirtualError=()=>He("'PureVirtualError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_embind")||(o.init_embind=()=>He("'init_embind' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwInternalError")||(o.throwInternalError=()=>He("'throwInternalError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwBindingError")||(o.throwBindingError=()=>He("'throwBindingError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwUnboundTypeError")||(o.throwUnboundTypeError=()=>He("'throwUnboundTypeError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ensureOverloadTable")||(o.ensureOverloadTable=()=>He("'ensureOverloadTable' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"exposePublicSymbol")||(o.exposePublicSymbol=()=>He("'exposePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"replacePublicSymbol")||(o.replacePublicSymbol=()=>He("'replacePublicSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"extendError")||(o.extendError=()=>He("'extendError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"createNamedFunction")||(o.createNamedFunction=()=>He("'createNamedFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registeredInstances")||(o.registeredInstances=()=>He("'registeredInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getBasestPointer")||(o.getBasestPointer=()=>He("'getBasestPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerInheritedInstance")||(o.registerInheritedInstance=()=>He("'registerInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"unregisterInheritedInstance")||(o.unregisterInheritedInstance=()=>He("'unregisterInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getInheritedInstance")||(o.getInheritedInstance=()=>He("'getInheritedInstance' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getInheritedInstanceCount")||(o.getInheritedInstanceCount=()=>He("'getInheritedInstanceCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getLiveInheritedInstances")||(o.getLiveInheritedInstances=()=>He("'getLiveInheritedInstances' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registeredTypes")||(o.registeredTypes=()=>He("'registeredTypes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"awaitingDependencies")||(o.awaitingDependencies=()=>He("'awaitingDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"typeDependencies")||(o.typeDependencies=()=>He("'typeDependencies' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registeredPointers")||(o.registeredPointers=()=>He("'registeredPointers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"registerType")||(o.registerType=()=>He("'registerType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"whenDependentTypesAreResolved")||(o.whenDependentTypesAreResolved=()=>He("'whenDependentTypesAreResolved' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"embind_charCodes")||(o.embind_charCodes=()=>He("'embind_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"embind_init_charCodes")||(o.embind_init_charCodes=()=>He("'embind_init_charCodes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"readLatin1String")||(o.readLatin1String=()=>He("'readLatin1String' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getTypeName")||(o.getTypeName=()=>He("'getTypeName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"heap32VectorToArray")||(o.heap32VectorToArray=()=>He("'heap32VectorToArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"requireRegisteredType")||(o.requireRegisteredType=()=>He("'requireRegisteredType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getShiftFromSize")||(o.getShiftFromSize=()=>He("'getShiftFromSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"integerReadValueFromPointer")||(o.integerReadValueFromPointer=()=>He("'integerReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"enumReadValueFromPointer")||(o.enumReadValueFromPointer=()=>He("'enumReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"floatReadValueFromPointer")||(o.floatReadValueFromPointer=()=>He("'floatReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"simpleReadValueFromPointer")||(o.simpleReadValueFromPointer=()=>He("'simpleReadValueFromPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runDestructors")||(o.runDestructors=()=>He("'runDestructors' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"new_")||(o.new_=()=>He("'new_' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"craftInvokerFunction")||(o.craftInvokerFunction=()=>He("'craftInvokerFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"embind__requireFunction")||(o.embind__requireFunction=()=>He("'embind__requireFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"tupleRegistrations")||(o.tupleRegistrations=()=>He("'tupleRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"structRegistrations")||(o.structRegistrations=()=>He("'structRegistrations' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"genericPointerToWireType")||(o.genericPointerToWireType=()=>He("'genericPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"constNoSmartPtrRawPointerToWireType")||(o.constNoSmartPtrRawPointerToWireType=()=>He("'constNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"nonConstNoSmartPtrRawPointerToWireType")||(o.nonConstNoSmartPtrRawPointerToWireType=()=>He("'nonConstNoSmartPtrRawPointerToWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_RegisteredPointer")||(o.init_RegisteredPointer=()=>He("'init_RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer")||(o.RegisteredPointer=()=>He("'RegisteredPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_getPointee")||(o.RegisteredPointer_getPointee=()=>He("'RegisteredPointer_getPointee' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_destructor")||(o.RegisteredPointer_destructor=()=>He("'RegisteredPointer_destructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_deleteObject")||(o.RegisteredPointer_deleteObject=()=>He("'RegisteredPointer_deleteObject' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredPointer_fromWireType")||(o.RegisteredPointer_fromWireType=()=>He("'RegisteredPointer_fromWireType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"runDestructor")||(o.runDestructor=()=>He("'runDestructor' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"releaseClassHandle")||(o.releaseClassHandle=()=>He("'releaseClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"finalizationRegistry")||(o.finalizationRegistry=()=>He("'finalizationRegistry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"detachFinalizer_deps")||(o.detachFinalizer_deps=()=>He("'detachFinalizer_deps' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"detachFinalizer")||(o.detachFinalizer=()=>He("'detachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"attachFinalizer")||(o.attachFinalizer=()=>He("'attachFinalizer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"makeClassHandle")||(o.makeClassHandle=()=>He("'makeClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_ClassHandle")||(o.init_ClassHandle=()=>He("'init_ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle")||(o.ClassHandle=()=>He("'ClassHandle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_isAliasOf")||(o.ClassHandle_isAliasOf=()=>He("'ClassHandle_isAliasOf' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"throwInstanceAlreadyDeleted")||(o.throwInstanceAlreadyDeleted=()=>He("'throwInstanceAlreadyDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_clone")||(o.ClassHandle_clone=()=>He("'ClassHandle_clone' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_delete")||(o.ClassHandle_delete=()=>He("'ClassHandle_delete' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"deletionQueue")||(o.deletionQueue=()=>He("'deletionQueue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_isDeleted")||(o.ClassHandle_isDeleted=()=>He("'ClassHandle_isDeleted' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"ClassHandle_deleteLater")||(o.ClassHandle_deleteLater=()=>He("'ClassHandle_deleteLater' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"flushPendingDeletes")||(o.flushPendingDeletes=()=>He("'flushPendingDeletes' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"delayFunction")||(o.delayFunction=()=>He("'delayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"setDelayFunction")||(o.setDelayFunction=()=>He("'setDelayFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"RegisteredClass")||(o.RegisteredClass=()=>He("'RegisteredClass' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"shallowCopyInternalPointer")||(o.shallowCopyInternalPointer=()=>He("'shallowCopyInternalPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"downcastPointer")||(o.downcastPointer=()=>He("'downcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"upcastPointer")||(o.upcastPointer=()=>He("'upcastPointer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"validateThis")||(o.validateThis=()=>He("'validateThis' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"char_0")||(o.char_0=()=>He("'char_0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"char_9")||(o.char_9=()=>He("'char_9' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"makeLegalFunctionName")||(o.makeLegalFunctionName=()=>He("'makeLegalFunctionName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_handle_array")||(o.emval_handle_array=()=>He("'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=()=>He("'emval_free_list' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_symbols")||(o.emval_symbols=()=>He("'emval_symbols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"init_emval")||(o.init_emval=()=>He("'init_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"count_emval_handles")||(o.count_emval_handles=()=>He("'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=()=>He("'get_first_emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"getStringOrSymbol")||(o.getStringOrSymbol=()=>He("'getStringOrSymbol' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"Emval")||(o.Emval=()=>He("'Emval' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_newers")||(o.emval_newers=()=>He("'emval_newers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"craftEmvalAllocator")||(o.craftEmvalAllocator=()=>He("'craftEmvalAllocator' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_get_global")||(o.emval_get_global=()=>He("'emval_get_global' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_methodCallers")||(o.emval_methodCallers=()=>He("'emval_methodCallers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"emval_registeredMethods")||(o.emval_registeredMethods=()=>He("'emval_registeredMethods' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"warnOnce")||(o.warnOnce=()=>He("'warnOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackSave")||(o.stackSave=()=>He("'stackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackRestore")||(o.stackRestore=()=>He("'stackRestore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stackAlloc")||(o.stackAlloc=()=>He("'stackAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"AsciiToString")||(o.AsciiToString=()=>He("'AsciiToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToAscii")||(o.stringToAscii=()=>He("'stringToAscii' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UTF16ToString")||(o.UTF16ToString=()=>He("'UTF16ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToUTF16")||(o.stringToUTF16=()=>He("'stringToUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF16")||(o.lengthBytesUTF16=()=>He("'lengthBytesUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"UTF32ToString")||(o.UTF32ToString=()=>He("'UTF32ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"stringToUTF32")||(o.stringToUTF32=()=>He("'stringToUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"lengthBytesUTF32")||(o.lengthBytesUTF32=()=>He("'lengthBytesUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"allocateUTF8")||(o.allocateUTF8=()=>He("'allocateUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),Object.getOwnPropertyDescriptor(o,"allocateUTF8OnStack")||(o.allocateUTF8OnStack=()=>He("'allocateUTF8OnStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")),o.writeStackCookie=me,o.checkStackCookie=ge,Object.getOwnPropertyDescriptor(o,"ALLOC_NORMAL")||Object.defineProperty(o,"ALLOC_NORMAL",{configurable:!0,get:function(){He("'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(){He("'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)")}}),Ce=function e(){Id||dp(),Id||(Ce=e)},o.run=dp,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();var gp=!0;return o.noInitialRun&&(gp=!1),dp(),e.ready});const qe=Ge;var We=r(2934),ze=r(7984);const Ve=qe,Ye=(e,t)=>null!=t?[t,e.split("/").pop()].join(""):new URL(e,window.location.origin);var $e,Ke,Ze=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},Je=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 et{constructor(e){$e.set(this,void 0),Ke.set(this,void 0),Ze(this,$e,e,"f"),Ze(this,Ke,new C(e),"f")}async loadFromString(e){return ue("sceneContent",e,ie()),new Promise((t=>{Je(this,$e,"f").loadSceneFromString(e,(e=>{const r=U(e);t(r)}))}))}async loadFromURL(e){return ue("url",e,ie()),new Promise((t=>{Je(this,$e,"f").loadSceneFromURL(e,(e=>{const r=U(e);t(r)}))}))}async saveToString(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):Je(this,$e,"f").saveSceneToString(r,(t=>{const r=U(t);e(r)}))}))}async saveToArchive(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):Je(this,$e,"f").saveSceneToArchive(r,(r=>{"error"in r?t(r.error):e(new Blob([r],{type:pe.Zip}))}))}))}create(){return U(Je(this,$e,"f").createScene({layout:g.Free}))}createFromImage(e,t=300,r=1){return ue("url",e,ie()),ue("dpi",t,ae(oe(),0)),ue("pixelScaleFactor",r,ae(oe(),0)),new Promise((n=>{Je(this,$e,"f").createSceneFromImage(e,t,r,g.Free,0,!1,(e=>{const t=U(e);n(t)}))}))}get(){const e=U(Je(this,$e,"f").findByType(O.Scene)),t=ge(e);return t.length>0?t[0]:null}async applyTemplateFromString(e){return ue("content",e,ie()),new Promise((t=>{Je(this,$e,"f").applyTemplateFromString(e,(e=>{U(e),t()}))}))}async applyTemplateFromURL(e){return ue("url",e,ie()),new Promise((t=>{Je(this,$e,"f").applyTemplateFromURL(e,(e=>{U(e),t()}))}))}unstable_setDesignUnit(e){ue("designUnit",e,ie()),U(Je(this,$e,"f").unstable_setDesignUnit(R.fromDesignUnit(e)))}unstable_getDesignUnit(){return R.toDesignUnit(U(Je(this,$e,"f").unstable_getDesignUnit()))}}function tt(e,t){var r,n;const o=null==e?void 0:e.getBoundingClientRect(),i=null!==(r=null==o?void 0:o.top)&&void 0!==r?r:0,a=null!==(n=null==o?void 0:o.left)&&void 0!==n?n:0,s=function(e){return"undefined"!=typeof TouchEvent&&e instanceof TouchEvent}(t),c=s?t.changedTouches[0].clientX:t.clientX,u=s?t.changedTouches[0].clientY:t.clientY;return{position:{x:(c-a)*window.devicePixelRatio,y:(u-i)*window.devicePixelRatio},isOverUIElement:!1,isTouch:s,timestamp:Date.now()}}$e=new WeakMap,Ke=new WeakMap;var rt,nt=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 ot{constructor(e){rt.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,rt,e,"f")}findAll(){return ge(nt(this,rt,"f").findAllVariables())}setString(e,t){return ue("key",e,ie()),ue("value",t,ie()),U(nt(this,rt,"f").setVariableString(e,t))}getString(e){return ue("key",e,ie()),U(nt(this,rt,"f").getVariableString(e))}remove(e){return ue("key",e,ie()),U(nt(this,rt,"f").removeVariable(e))}}rt=new WeakMap;var it,at,st,ct,ut,lt,dt,pt,ft,mt,gt=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},ht=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 Et{constructor(e,r,n){it.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}),Object.defineProperty(this,"editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"unstable_assetRegistry",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"event",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),at.set(this,void 0),st.set(this,void 0),ct.set(this,void 0),ut.set(this,(()=>{const e=this.block.findByType(O.Camera)[0];if(!e)return;if(void 0===ht(this,st,"f"))return;const{width:t,height:r}=ht(this,st,"f"),n=ht(this,at,"f").getValue(e,me.Camera,"resolution");I(n.width,t,1e-4)&&I(n.height,r,1e-4)||ht(this,at,"f").setValue(e,me.Camera,"resolution",{width:t,height:r}),"undefined"!=typeof window&&(I(ht(this,at,"f").getValue(e,me.Camera,"pixelRatio"),window.devicePixelRatio,1e-4)||ht(this,at,"f").setValue(e,me.Camera,"pixelRatio",window.devicePixelRatio))})),lt.set(this,void 0),dt.set(this,void 0),gt(this,ct,e,"f"),gt(this,at,new C(e),"f"),gt(this,st,r,"f"),this.block=new _e(e),this.scene=new et(e),this.variable=new ot(e),this.editor=new Le(e),this.event=new Xe(e),this.unstable_assetRegistry=new class{constructor(){Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:"ly.img.AssetRegistry"}),Object.defineProperty(this,"assetSources",{enumerable:!0,configurable:!0,writable:!0,value:[]})}async getGroups(e){return(await Promise.all(this.assetSources.map((t=>t.getGroups(e))))).reduce(((e,t)=>(e.push(...t),e)),[])}getTypes(){return this.assetSources.reduce(((e,t)=>{const r=t.getTypes();return e.push(...r),e}),[])}hasType(e){return this.assetSources.some((t=>t.hasType(e)))}getSources(e){return e?this.assetSources.filter((t=>t.hasType(e))):this.assetSources}getSource(e){return this.assetSources.find((t=>t.id===e))}addSource(e){this.assetSources.push(e)}removeSource(e){const t=this.assetSources.findIndex((t=>t.id===e));return t>=0&&(this.assetSources.splice(t,1),!0)}},this.unstable_assetRegistry.addSource(new class{constructor(e,t,r={}){var n,o,i,a;N.add(this),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"canManageAssets",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"helper",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),j.set(this,void 0),L.set(this,void 0),H.set(this,void 0),B.set(this,void 0),this.id=e,this.helper=new C(t),this.canManageAssets=null!==(n=r.canManageAssets)&&void 0!==n&&n,G(this,j,null!==(o=r.hasType)&&void 0!==o?o:()=>!1,"f"),G(this,L,null!==(i=r.getLabel)&&void 0!==i?i:(e,t)=>t,"f"),G(this,H,null!==(a=r.getTags)&&void 0!==a?a:()=>[],"f"),G(this,B,r.defaultFont,"f")}getAsset(){throw new Error("Method not implemented.")}addAsset(){throw new Error("Method not implemented.")}updateAsset(){throw new Error("Method not implemented.")}removeAsset(){throw new Error("Method not implemented.")}getTypes(){throw new Error("Method not implemented")}async findAssets(e,t){const r=await this.getAssets(e,t),n=this.filterAssets(r,t),o=n.length,i=t.page,a=this.sliceAssets(n,t);return{assets:a,total:o,currentPage:i,nextPage:(t.page-1)*t.perPage+a.length<o?i+1:void 0}}getGroups(e){return this.helper.execute("ubq/assets/getRegisteredCategoryIDsForType",e)}hasType(e){return"ly.img.text"===e||"ly.img.video"===e||q(this,j,"f").call(this,e)}async getAssetIds(e,{groups:t,excludeGroups:r}){let n=[];if(t&&Array.isArray(t)&&t.length>0)n=await this.getAssetIdsForGroups(e,t,r);else{const t=await this.helper.execute("ubq/assets/getRegisteredAssetIDsForType",e),o=await this.getGroups(e);n=await(o.length>0?this.getAssetIdsForGroups(e,o,r,t):t)}return n}async getAssets(e,t){if("ly.img.text"===e)return async function(e,t,r,n=(e=>e)){return async function(e,t,r){var n,o;let i=[];const a=null!==(n=Object.values(await async function(){const e={},r=await t.execute("ubq/assets/getRegisteredAssetIDsForType","ly.img.font");return await Promise.all(r.map((async r=>{var n;const o=await t.execute("ubq/assets/getMetadata",[r,"fontFamily"]);(null!==(n=e[o])&&void 0!==n?n:e[o]=[]).push({assetId:r})}))),e}()).find((e=>(e.length>i.length&&(i=e),e.some((e=>e.assetId===r))))))&&void 0!==n?n:i,s=null!==(o=a.find((e=>e.assetId===r)))&&void 0!==o?o:a[0];if(void 0===s)return e;await async function(e){await Promise.all([...e.map((e=>t.execute("ubq/assets/getMetadata",[e.assetId,"fontWeight"]).then((t=>{e.fontWeight=t})))),...e.map((e=>t.execute("ubq/assets/getMetadata",[e.assetId,"fontStyle"]).then((t=>{e.fontStyle=t}))))])}(a);const c=a.filter((e=>e.fontStyle===s.fontStyle));if(0===c.length)return e;const u=await Promise.all(e.map((async e=>{var r,n,o;const i=null===(o=(Array.isArray(null===(r=e.meta)||void 0===r?void 0:r.fontWeight)?null===(n=e.meta)||void 0===n?void 0:n.fontWeight:[]).map((e=>c.find((t=>t.fontWeight===e)))).filter(Boolean)[0])||void 0===o?void 0:o.assetId,a=null!=i?i:null==s?void 0:s.assetId,u=await t.execute("ubq/assets/getMetadata",[a,"fontFileUri"]);return Object.assign(Object.assign({},e),{meta:Object.assign(Object.assign({},e.meta),{fontId:a,uri:u})})})));return u}([{id:"title",type:"ly.img.text",label:n("title"),thumbUri:"",size:{width:1,height:1},meta:{fontScale:2,fontWeight:[700,800,900,600,500]},context:t},{id:"headline",type:"ly.img.text",label:n("headline"),thumbUri:"",size:{width:1,height:1},meta:{fontScale:1.4,fontWeight:[500,600,700]},context:t},{id:"paragraph",type:"ly.img.text",label:n("paragraph"),thumbUri:"",size:{width:1,height:1},meta:{fontScale:1,fontWeight:[400,300,500]},context:t}],e,r)}(this.helper,{sourceId:this.id},q(this,B,"f"),(e=>q(this,L,"f").call(this,"ly.img.text",e)));if("ly.img.vectorpath"===e){let r=[];t.groups&&t.groups.includes("//ly.img.cesdk.vectorpaths/category/vectorpaths")&&(r=await async function(e,t=(e=>e)){return[O.RectShape,O.LineShape,O.StarShape,O.PolygonShape,O.EllipseShape].map((r=>({id:r,type:"ly.img.vectorpath",label:t(r),thumbUri:"",size:{width:1,height:1},context:e})))}({sourceId:this.id},(e=>q(this,L,"f").call(this,"ly.img.vectorpath",e))));const n=await this.getGenericAssets(e,t);return[...r,...n]}return this.getGenericAssets(e,t)}async getGenericAssets(e,t){const{groups:r,locale:n}=t,o=await this.getAssetIds(e,t);return await Promise.all(o.map((async t=>{const{thumbUri:o,size:i,meta:a}=await this.getAssetMetaData(t,e),s=q(this,L,"f").call(this,e,t),c=q(this,H,"f").call(this,e,t);return{id:t,type:e,groups:r,thumbUri:o,size:i,meta:a,locale:n,label:s,tags:c,context:{sourceId:this.id}}})))}async getAssetMetaData(e,t){const[r,n,o,i,a,s,c]=await Promise.all([q(this,N,"m",X).call(this,e,"thumbPath"),q(this,N,"m",X).call(this,e,"width"),q(this,N,"m",X).call(this,e,"height"),"ly.img.vectorpath"===t?q(this,N,"m",X).call(this,e,"vectorPath"):Promise.resolve(""),"ly.img.image"===t?q(this,N,"m",X).call(this,e,"imagePath"):Promise.resolve(void 0),"ly.img.video"===t?q(this,N,"m",X).call(this,e,"videoPath"):Promise.resolve(void 0),"ly.img.sticker"===t?q(this,N,"m",X).call(this,e,"imageUri"):Promise.resolve(void 0)]),u=U(this.helper.ubq.getAbsoluteURI(r));return i?{thumbUri:u,size:{width:n,height:o},meta:{vectorPath:i}}:{thumbUri:u,size:{width:n,height:o},meta:{uri:a||c||s}}}filterAssets(e,t){const{query:r}=t;if(!r)return e;const n=_()(r.toLowerCase());return r?e.filter((e=>{if(e.label||e.tags){const t=[e.label||"",e.tags||""].join(",").toLowerCase();return n.every((e=>t.match(e)))}if(e.id){const t=e.id.toLowerCase();return n.every((e=>t.match(e)))}return!0})):e}sliceAssets(e,{page:t,perPage:r}){const n=((null!=t?t:1)-1)*r;return e.slice(n,n+r)}async getAssetIdsForGroups(e,t,r=[],n=[]){const o={},i={},a=await Promise.all(t.map((async t=>{const n=await q(this,N,"m",Q).call(this,t,e);return r.includes(t)?(n.forEach((e=>{i[e]=!0})),[]):n.filter((e=>!o[e]&&!i[e]&&(o[e]=!0,!0)))}))),s=n.filter((e=>!o[e]&&!i[e])),c=w()(...a,s);return y()(c).filter(Boolean)}}("local",e,{defaultFont:n.defaultFont})),function(e){const r={assets:[],total:0,currentPage:1,nextPage:void 0};return Object.entries(e).map((([e,n])=>{const o=n.types||["ly.img.image"];if(!n.findAssets)throw new Error("New asset source needs to define `findAssets` at least");return Object.assign(Object.assign(Object.assign({id:e},t),n),{findAssets:async(e,t)=>o.includes(e)&&await n.findAssets(e,t)||Promise.resolve(r),hasType:e=>o.includes(e)})}))}(n.assetSources).forEach((e=>this.unstable_assetRegistry.addSource(e))),ht(this,at,"f").useInternalAPI((e=>{e.setPreUpdateCallback(ht(this,ut,"f"))})),ht(this,it,"m",pt).call(this),"undefined"!=typeof window&&window.Cypress&&(this.config=n,this.helper=ht(this,at,"f"),this.onPostUpdate=e=>{ht(this,at,"f").useInternalAPI((t=>{t.setPostUpdateCallback(e)}))})}dispose(){ht(this,it,"m",ft).call(this),ht(this,at,"f").useInternalAPI((e=>{e.setPreUpdateCallback(null)})),gt(this,st,null,"f"),gt(this,at,null,"f"),this.block=null,this.scene=null,this.variable=null,ht(this,ct,"f").delete(),gt(this,ct,null,"f")}static async init(e,t){console.log("[CreativeEngine] Revision 76f1e9d700a841ecbbe6244919d1300f2b543a54"),"undefined"==typeof document||t||(t=document.createElement("canvas"));const r=Ie(e);return new this(await function(e,t){const r=Ie(t),{core:n}=r,o=null!==(s=null===(a=null==(i=r)?void 0:i.callbacks)||void 0===a?void 0:a.log)&&void 0!==s?s:Pe;var i,a,s;return new Promise(((t,i)=>{let a,s;return Ve({locateFile:(e,t)=>{if(e.endsWith(".wasm")){const e=Ye(We,n.baseURL).toString();return a=e,e}if(e.endsWith(".data")){const e=Ye(ze,n.baseURL).toString();return s=e,e}return t+e},print:e=>{e&&"undefined"!==e&&o(e,be.Info)},printErr:e=>{e&&"undefined"!==e&&o(e,be.Error)},onRuntimeInitialized:()=>{o("Engine has been initialized.",be.Info)},logReadFiles:!1,printWithColors:!0}).then((n=>{let o="";"string"==typeof e?o=e:void 0!==e&&(n.specialHTMLTargets["!canvas"]=e,o="!canvas");const a=n.createEngine(o);if(a.isValid()){const e=a.value();!function(e,t){var r;const n=new C(e);function o(e,t){return n.execute("ubq/settings/set",[e,t])}o("ubq://license",t.license||""),o("ubq://role",x[t.role]),o("ubq://basePath",t.baseURL),o("ubq://touchScrollingEnabled",!(null===(r=t.featureFlags)||void 0===r?void 0:r.preventScrolling)),Object.entries(t.presets.images||{}).forEach((([e,t])=>{n.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((r=>{const o=`${e}_${r.weight}_${r.style}`;n.execute("ubq/assets/registerFont",[o,r.fontURL,t.family,r.weight,r.style])}))})),function(){const{imageMattingOnly:e,singlePageMode:r}=t.featureFlags||{};"undefined"!=typeof window&&("VideoFrame"in window&&"VideoDecoder"in window&&"VideoEncoder"in window||o("ubq://features/videosEnabled",!1)),o("ubq://features/singlePageModeEnabled",r),o("cesdk://trackActivePage",!r),o("ubq://features/effectsEnabled",!0)}(),o("ubq://page/title/fontFileUri",t.page.title.fontFileUri),o("ubq://page/title/show",t.page.title.show),o("ubq://page/dimOutOfPageAreas",t.page.dimOutOfPageAreas),function(){if(void 0!==t.scene.maskSpotColor){const{rgbApproximation:e}=t.scene.maskSpotColor,r=M.fromRGBA(Object.assign(Object.assign({},e),{a:1}));n.execute("cesdk/setSpecialSpotColor",r)}}(),function(){var e;const r=null!==(e=t.extensions)&&void 0!==e?e:[];r.entries.forEach((e=>{n.execute("ubq/extension/register",`${r.baseURL+e}`)}))}(),function(){var r;const n=null!==(r=t.variables)&&void 0!==r?r:{};Object.entries(n).forEach((([t,r])=>{U(e.setVariableString(t,r.value.toString()))}))}()}(e,r),t(e)}else{const e=a.error();i(new Error(e.publicMessage())),e.delete()}a.delete()})).catch((e=>{e instanceof Error&&(e.wasmPath=a,e.dataPath=s),i(e)}))}))}(t,r),t,r)}}at=new WeakMap,st=new WeakMap,ct=new WeakMap,ut=new WeakMap,lt=new WeakMap,dt=new WeakMap,it=new WeakSet,pt=function(e=!0){if(ht(this,lt,"f"))return;if("undefined"!=typeof HTMLCanvasElement&&ht(this,st,"f")instanceof HTMLCanvasElement){const e=function(e,t){const r=r=>{const n=tt(e,r);n.isTouch&&r.preventDefault(),t.execute("ubq/inputs/mousemove",n)},n=r=>{const n=Object.assign(Object.assign({},tt(e,r)),{button:T(r instanceof MouseEvent?r.button:c.Left),state:u.Up,shiftIsHeld:r.shiftKey});t.execute("ubq/inputs/mousebutton",n)},o=r=>{const n=Object.assign(Object.assign({},tt(e,r)),{button:T(r instanceof MouseEvent?r.button:c.Left),state:u.Down,shiftIsHeld:r.shiftKey});t.execute("ubq/inputs/mousebutton",n)};return e.addEventListener("mousemove",r),e.addEventListener("mousedown",o),e.addEventListener("mouseup",n),e.addEventListener("touchmove",r),e.addEventListener("touchstart",o),e.addEventListener("touchend",n),e.addEventListener("touchcancel",n),()=>{e.removeEventListener("mousemove",r),e.removeEventListener("mousedown",o),e.removeEventListener("mouseup",n),e.removeEventListener("touchmove",r),e.removeEventListener("touchstart",o),e.removeEventListener("touchend",n),e.removeEventListener("touchcancel",n)}}(ht(this,st,"f"),ht(this,at,"f")),t=function(e,t){let r=null;const n=t.useInternalAPI((n=>n.addEventCallback("EditorStateUpdatedEvent",(async()=>{const{editMode:n}=await t.getEditorState();n!==F.Text||r?n!==F.Text&&r&&(r(),r=null):r=function(){var r;let n=!1;const o=document.createElement("textarea");return o.id="ubq_internal-inline_text_editing_html_representation",o.autocapitalize="none",o.spellcheck=!1,o.cols=4096,o.style.contain="strict",o.style.opacity="0",o.style.pointerEvents="none",o.style.zIndex="-1",o.style.position="absolute",o.style.width="1px",o.style.height="1px",o.style.padding="0",o.style.margin="-1px",o.style.overflow="hidden",o.style.clip="rect(0, 0, 0, 0)",o.style.whiteSpace="nowrap",o.style.border="0",o.addEventListener("input",a),o.addEventListener("keydown",s),o.addEventListener("copy",i),o.addEventListener("compositionstart",c),o.addEventListener("compositionupdate",u),o.addEventListener("compositionend",d),null===(r=null==e?void 0:e.parentElement)||void 0===r||r.appendChild(o),o.focus(),()=>{var t;o.removeEventListener("input",a),o.removeEventListener("keydown",s),o.removeEventListener("copy",i),o.removeEventListener("compositionstart",c),o.removeEventListener("compositionupdate",u),o.removeEventListener("compositionend",d),null===(t=null==e?void 0:e.parentElement)||void 0===t||t.removeChild(o)};function i(e){try{t.useInternalAPI((t=>{const r=U(t.getSelectedText());""!==r&&e.clipboardData&&(e.clipboardData.setData("text/plain",r),e.preventDefault())}))}catch(e){console.error(e)}}function a(e){var r,o;const i=e.target,{value:a}=i;let s=a.length;if(n){s=null!==(o=null!==(r=i.selectionEnd)&&void 0!==r?r:i.selectionStart)&&void 0!==o?o:0;const e=[...a];for(let t=0;t<e.length;t+=1)t<s&&(s-=e[t].length-1);t.execute("ubq/text/compositionUpdate",{value:a,cursorPosition:s})}else if(a.length>0){if("\n"!==a[0]){const e={key:l.Unknown,characters:a,shiftIsHeld:!1,commandIsHeld:!1,optionIsHeld:!1,timestamp:Date.now()};t.execute("ubq/inputs/keyboardkey",e)}i.value=""}}async function s(e){if("a"===e.key&&(e.metaKey||e.ctrlKey))return n&&(await t.execute("ubq/text/compositionEnd"),n=!1,e.currentTarget&&(o.value="")),void await t.execute("ubq/text/selectAllText");if("Escape"===e.key)return void async function(){const e=await t.getEditorState();t.setEditorState(Object.assign(Object.assign({},e),{editMode:F.Transform}))}();if("Backspace"!==e.key&&"Delete"!==e.key&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key&&"ArrowUp"!==e.key&&"ArrowDown"!==e.key&&"Enter"!==e.key)return;const r=function(e){const t={key:l.Unknown,characters:e.key,shiftIsHeld:e.shiftKey,commandIsHeld:e.metaKey||e.ctrlKey,optionIsHeld:e.altKey,timestamp:Date.now()};switch(e.key.toUpperCase()){case"0":t.key=l.Key0;break;case"1":t.key=l.Key1;break;case"2":t.key=l.Key2;break;case"3":t.key=l.Key3;break;case"4":t.key=l.Key4;break;case"5":t.key=l.Key5;break;case"6":t.key=l.Key6;break;case"7":t.key=l.Key7;break;case"8":t.key=l.Key8;break;case"9":t.key=l.Key9;break;case"A":t.key=l.A;break;case"B":t.key=l.B;break;case"C":t.key=l.C;break;case"D":t.key=l.D;break;case"E":t.key=l.E;break;case"F":t.key=l.F;break;case"G":t.key=l.G;break;case"H":t.key=l.H;break;case"I":t.key=l.I;break;case"J":t.key=l.J;break;case"K":t.key=l.K;break;case"L":t.key=l.L;break;case"M":t.key=l.M;break;case"N":t.key=l.N;break;case"O":t.key=l.O;break;case"P":t.key=l.P;break;case"Q":t.key=l.Q;break;case"R":t.key=l.R;break;case"S":t.key=l.S;break;case"T":t.key=l.T;break;case"U":t.key=l.U;break;case"V":t.key=l.V;break;case"W":t.key=l.W;break;case"X":t.key=l.X;break;case"Y":t.key=l.Y;break;case"Z":t.key=l.Z;break;case" ":t.key=l.Space;break;case"ESCAPE":t.key=l.Escape,t.characters="";break;case"BACKSPACE":t.key=l.Backspace,t.characters="";break;case"DELETE":t.key=l.Delete,t.characters="";break;case"ENTER":t.key=l.Enter,t.characters="\n";break;case"CONTROL":t.key=l.Control,t.characters="";break;case"ALT":t.key=l.Option,t.characters="";break;case"SHIFT":t.key=l.Shift,t.characters="";break;case"ARROWLEFT":t.key=l.ArrowLeft,t.characters="";break;case"ARROWRIGHT":t.key=l.ArrowRight,t.characters="";break;case"ARROWUP":t.key=l.ArrowUp,t.characters="";break;case"ARROWDOWN":t.key=l.ArrowDown,t.characters="";break;case"DEAD":t.key=l.Unknown,t.characters=""}return t}(e);await t.execute("ubq/inputs/keyboardkey",r),e.currentTarget&&(o.value="")}async function c(){n=!0,await t.execute("ubq/text/compositionStart")}function u(){n=!0}async function d(){n=!1,await t.execute("ubq/text/compositionEnd"),o.value=""}}()}))));return()=>{null==r||r(),n.dispose(),n.delete()}}(ht(this,st,"f"),ht(this,at,"f"));gt(this,dt,(()=>{e(),t()}),"f")}const t=()=>{ht(this,it,"m",mt).call(this,e),gt(this,lt,requestAnimationFrame(t),"f")};gt(this,lt,requestAnimationFrame(t),"f")},ft=function(){var e;null===(e=ht(this,dt,"f"))||void 0===e||e.call(this),gt(this,dt,void 0,"f"),ht(this,lt,"f")&&(cancelAnimationFrame(ht(this,lt,"f")),gt(this,lt,0,"f"))},mt=function(e=!0){e&&void 0!==ht(this,st,"f")&&1===this.block.findByType(O.Scene).length&&ht(this,at,"f").execute("ubq/render",{displayWidth:ht(this,st,"f").width,displayHeight:ht(this,st,"f").height}),ht(this,ct,"f").update()}})();var o=n.Il,i=n.yQ,a=n.Ju,s=n.in,c=n.HY,u=n.uU,l=n.ZP;export{o as Color,i as ConfigTypes,a as DesignBlockType,s as LogLevel,c as MimeType,u as Role,l as default};
|