@cesdk/engine 1.7.0-alpha.0 → 1.7.0-alpha.1

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/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),f=!r&&!l&&!d&&c(e),m=r||l||d||f,p=m?n(e.length,String):[],h=p.length;for(var g in e)!t&&!u.call(e,g)||m&&("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,h))||p.push(g);return p}},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,f=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?f:s).test(a(e))}},9920:(e,t,r)=>{var n=r(2759),o=r(7906),i=r(1408),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},3339:(e,t,r)=>{var n=r(4820),o=r(7839),i=r(3003),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},7604:(e,t,r)=>{var n=r(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,f){t!==r&&i(r,(function(i,c){if(f||(f=new n),s(i))a(t,r,c,l,e,d,f);else{var m=d?d(u(t,c),i,c+"",t,r,f):void 0;void 0===m&&(m=i),o(t,c,m)}}),c)}},480:(e,t,r)=>{var n=r(1612),o=r(8192),i=r(9947),a=r(6581),s=r(1172),c=r(5664),u=r(5860),l=r(5274),d=r(9571),f=r(830),m=r(4820),p=r(1969),h=r(1859),g=r(7700),v=r(2963);e.exports=function(e,t,r,y,b,_,w){var E=g(e,r),x=g(t,r),k=w.get(x);if(k)n(e,r,k);else{var S=_?_(E,x,r+"",e,t,w):void 0,T=void 0===S;if(T){var C=u(x),P=!C&&d(x),A=!C&&!P&&h(x);S=x,C||P||A?u(E)?S=E:l(E)?S=a(E):P?(T=!1,S=o(x,!0)):A?(T=!1,S=i(x,!0)):S=[]:p(x)||c(x)?(S=E,c(E)?S=v(E):m(E)&&!f(E)||(S=s(x))):T=!1}T&&(w.set(x,S),b(S,x,y,_,w),w.delete(x)),n(e,r,S)}}},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+")",f="(?:"+l+"|"+s+")",m="(?:['’](?:d|ll|m|re|s|t|ve))?",p="(?:['’](?:D|LL|M|RE|S|T|VE))?",h="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",g="[\\ufe0e\\ufe0f]?",v=g+h+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",c,u].join("|")+")"+g+h+")*",y="(?:"+["[\\u2700-\\u27bf]",c,u].join("|")+")"+v,b=RegExp([l+"?"+a+"+"+m+"(?="+[o,l,"$"].join("|")+")",f+"+"+p+"(?="+[o,l+d,"$"].join("|")+")",l+"?"+d+"+"+m,l+"+"+p,"\\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(b)||[]}},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:()=>F,yQ:()=>e,Ju:()=>d,in:()=>Ee,HY:()=>me,uU:()=>P,ZP:()=>vt});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=r(9423),a=r.n(i),s=r(582),c=r.n(s),u=r(3145),l=r.n(u);!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"}(o||(o={}));const d=o;var f,m,p,h,g,v,y,b,_,w,E,x,k,S,T;function C(e){switch(e){case 0:return v.Left;case 1:return v.Middle;case 2:return v.Right;default:return v.Unknown}}!function(e){e[e.Pixel=0]="Pixel",e[e.Millimeter=1]="Millimeter",e[e.Inch=2]="Inch"}(f||(f={})),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!")}}}(f||(f={})),function(e){e[e.Pending=0]="Pending",e[e.Ready=1]="Ready",e[e.Error=2]="Error"}(m||(m={})),function(e){e.Added="DesignBlockAddedEvent",e.Updated="DesignBlockUpdatedEvent",e.Removed="DesignBlockRemovedEvent"}(p||(p={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Center=2]="Center"}(h||(h={})),function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom",e[e.Center=2]="Center"}(g||(g={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Middle=2]="Middle",e[e.Unknown=255]="Unknown"}(v||(v={})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(y||(y={})),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"}(b||(b={})),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"}(_||(_={})),function(e){e[e.Normal=0]="Normal",e[e.Italic=1]="Italic"}(w||(w={})),function(e){e.Bold="bold",e.Italic="italic"}(E||(E={})),function(e){e[e.Undefined=0]="Undefined",e[e.DesignUnit=1]="DesignUnit",e[e.Percent=2]="Percent",e[e.Auto=3]="Auto"}(x||(x={})),function(e){e[e.Free=0]="Free",e[e.VerticalStack=1]="VerticalStack",e[e.HorizontalStack=2]="HorizontalStack"}(k||(k={})),function(e){e[e.Information=0]="Information",e[e.Warning=1]="Warning",e[e.Error=2]="Error"}(S||(S={})),function(e){e[e.Creator=0]="Creator",e[e.Adopter=1]="Adopter",e[e.Viewer=2]="Viewer",e[e.Presenter=3]="Presenter"}(T||(T={}));const P=T;var A,F,D,L;!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"}(A||(A={})),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!")}}}(F||(F={})),function(e){e.Transform="ubq/editMode/transform",e.Crop="ubq/editMode/crop",e.Text="ubq/editMode/text"}(D||(D={})),function(e){e[e.Arrow=0]="Arrow",e[e.Move=1]="Move",e[e.MoveNotPermitted=2]="MoveNotPermitted",e[e.Resize=3]="Resize",e[e.Rotate=4]="Rotate",e[e.Text=5]="Text"}(L||(L={}));const I=(e,t)=>({x:e.x*t,y:e.y*t});function M(e,t,r=Number.EPSILON){return Math.abs(e-t)<r}class R{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=O(this.ubq.getLastFrameWidth(t)),i=O(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 I(t,r>n?e.y/t.y:e.x/t.x)})(e,t),o=I(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=>O(o.setValue(e,t,r,n))))}getValue(e,t,r){return this.useInternalAPI((n=>O(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=O(e);r(t)})))).delete()}))}}function O(e){if(e.isValid()){const t=e.value();return e.delete(),t}{const t=e.error(),r=t.publicMessage();throw t.delete(),e.delete(),new Error(r)}}const B=[d.RectShape,d.LineShape,d.StarShape,d.PolygonShape,d.EllipseShape];var U,N,j,q,G,W,z,V=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},H=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)};N=new WeakMap,j=new WeakMap,q=new WeakMap,G=new WeakMap,U=new WeakSet,W=async function(e,t){return this.helper.execute("ubq/assets/getMetadata",[e,t])},z=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 $ 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 Y(e){return"object"==typeof e&&null!=e}function X(e){return"string"==typeof e?JSON.stringify(e):""+e}function K(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: `"+X(n)+"`"}=e;return{value:n,type:a,refinement:s,key:o[o.length-1],path:o,branch:i,...e,message:c}}function*Q(e,t,r,n){var o;Y(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const o of e){const e=K(o,t,r,n);e&&(yield e)}}function*Z(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&&Y(t.schema)&&Y(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=Z(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):Y(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 J{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)=>Q(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>Q(o(e,t),t,this,e):()=>[]}assert(e){return function(e,t){const r=ee(e,t);if(r[0])throw r[0]}(e,this)}create(e){return function(e,t){const r=ee(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}(e,this)}is(e){return function(e,t){return!ee(e,t)[0]}(e,this)}mask(e){return function(e,t){const r=ee(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}(e,this)}validate(e,t={}){return ee(e,this,t)}}function ee(e,t,r={}){const n=Z(e,t,r),o=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(n);return o[0]?[new $(o[0],(function*(){for(const e of n)e[0]&&(yield e[0])})),void 0]:[void 0,o[1]]}function te(e,t){return new J({type:e,schema:null,validator:t})}function re(e){return new J({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: "+X(e)})}function ne(){return te("boolean",(e=>"boolean"==typeof e))}function oe(){return te("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||"Expected an integer, but received: "+X(e)))}function ie(){return te("number",(e=>"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+X(e)))}function ae(){return te("string",(e=>"string"==typeof e||"Expected a string, but received: "+X(e)))}function se(e,t,r={}){const{exclusive:n}=r;return ue(e,"min",(r=>n?r>t:r>=t||"Expected a "+e.type+" greater than "+(n?"":"or equal to ")+t+" but received `"+r+"`"))}function ce(e){return ue(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 ue(e,t,r){return new J({...e,*refiner(n,o){yield*e.refiner(n,o);const i=Q(r(n,o),o,e,n);for(const e of i)yield{...e,refinement:t}}})}function le(e,t,r){const[n]=ee(t,r);if(n)throw n.message=`Error in argument '${e}': ${n.message}`,n}function de(){const e=/image\/(png|jpeg|x-tga)|video\/mp4|application\/octet-stream|application\/pdf/;return te("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 fe;!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"}(fe||(fe={}));const me=fe;var pe;!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"}(pe||(pe={}));const he=pe,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 ve,ye,be=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},_e=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class we{constructor(e){ve.set(this,void 0),ye.set(this,void 0),be(this,ve,e,"f"),be(this,ye,new R(e),"f")}async export(e,t=me.Png){return le("handle",e,ie()),le("mimeType",t,de()),new Promise(((r,n)=>{_e(this,ve,"f").exportToBuffer(e,t,(e=>{"error"in e?n(e.error):r(new Blob([e],{type:t}))}),{jpegQuality:.9,pngCompressionLevel:5,useTargetSize:!1,targetWidth:0,targetHeight:0})}))}async unstable_exportVideo(e,t,r,n=me.Mp4,o,i,a,s){return le("handle",e,ie()),le("mimeType",n,de()),le("resolutionWidth",o,oe()),le("resolutionHeight",i,oe()),le("framerate",a,ie()),new Promise(((c,u)=>{_e(this,ve,"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 le("content",e,ae()),new Promise((t=>{_e(this,ve,"f").loadBlocksFromString(e,(e=>{const r=O(e);t(ge(r))}))}))}async saveToString(e){return le("blocks",e,re(ie())),new Promise((t=>{_e(this,ve,"f").saveBlocksToString(e,(e=>{const r=O(e);t(r)}))}))}create(e){return le("type",e,ae()),O(_e(this,ve,"f").create(e))}unstable_createFromAsset(e,t,r,n){return le("id",e,ae()),le("type",t,ae()),le("mimeType",r,ae()),new Promise(((o,i)=>{_e(this,ve,"f").createFromAsset(e,t,r,n,(e=>{try{o(O(e))}catch(e){i(e)}}))}))}getType(e){return le("id",e,oe()),O(_e(this,ve,"f").getType(e))}setSelected(e,t){return le("id",e,oe()),le("selected",t,ne()),O(_e(this,ve,"f").setSelected(e,t))}isSelected(e){return le("id",e,oe()),O(_e(this,ve,"f").isSelected(e))}findAllSelected(){return ge(_e(this,ve,"f").findAllSelected())}isGroupable(e){return le("ids",e,ce(re(ie()))),O(_e(this,ve,"f").isGroupable(e))}group(e){return le("ids",e,ce(re(ie()))),O(_e(this,ve,"f").group(e))}ungroup(e){return le("id",e,ie()),O(_e(this,ve,"f").ungroup(e))}enterGroup(e){return le("id",e,ie()),O(_e(this,ve,"f").enterGroup(e))}exitGroup(e){return le("id",e,ie()),O(_e(this,ve,"f").exitGroup(e))}setName(e,t){return le("id",e,oe()),le("name",t,ae()),_e(this,ye,"f").setValue(e,he.Common,"name",t)}getName(e){return le("id",e,oe()),_e(this,ye,"f").getValue(e,he.Common,"name")}findByName(e){le("name",e,ae());const t=_e(this,ve,"f").findByName(e);return ge(t)}findByType(e){le("type",e,ae());const t=O(_e(this,ve,"f").findByType(e));return ge(t)}findAll(){return ge(_e(this,ve,"f").findAll())}findAllPlaceholders(){return ge(_e(this,ve,"f").findAllPlaceholders())}isVisible(e){return le("id",e,oe()),O(_e(this,ve,"f").isVisible(e))}setVisible(e,t){return le("id",e,oe()),le("visible",t,ne()),O(_e(this,ve,"f").setVisible(e,t))}isClipped(e){return le("id",e,oe()),O(_e(this,ve,"f").isClipped(e))}setClipped(e,t){return le("id",e,oe()),le("clipped",t,ne()),O(_e(this,ve,"f").setClipped(e,t))}getPositionX(e){return le("id",e,oe()),O(_e(this,ve,"f").getPositionX(e))}getPositionXMode(e){return le("id",e,oe()),O(_e(this,ve,"f").getPositionXMode(e))}getPositionY(e){return le("id",e,oe()),O(_e(this,ve,"f").getPositionY(e))}getPositionYMode(e){return le("id",e,oe()),O(_e(this,ve,"f").getPositionYMode(e))}setPositionX(e,t){return le("id",e,oe()),le("value",t,ie()),O(_e(this,ve,"f").setPositionX(e,t))}setPositionXMode(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setPositionXMode(e,t))}setPositionY(e,t){return le("id",e,oe()),le("value",t,ie()),O(_e(this,ve,"f").setPositionY(e,t))}setPositionYMode(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setPositionYMode(e,t))}getRotation(e){return le("id",e,oe()),O(_e(this,ve,"f").getRotation(e))}setRotation(e,t){return le("id",e,oe()),le("radians",t,ie()),O(_e(this,ve,"f").setRotation(e,t))}getFlipHorizontal(e){return le("id",e,oe()),O(_e(this,ve,"f").getFlip(e)).horizontal}getFlipVertical(e){return le("id",e,oe()),O(_e(this,ve,"f").getFlip(e)).vertical}setFlipHorizontal(e,t){return le("id",e,oe()),le("flip",t,ne()),O(_e(this,ve,"f").setFlipHorizontal(e,t))}setFlipVertical(e,t){return le("id",e,oe()),le("flip",t,ne()),O(_e(this,ve,"f").setFlipVertical(e,t))}hasContentFillMode(e){return le("id",e,oe()),O(_e(this,ve,"f").hasContentFillMode(e))}hasPlaceholderContent(e){return le("id",e,oe()),O(_e(this,ve,"f").hasPlaceholderContent(e))}getWidth(e){return le("id",e,oe()),O(_e(this,ve,"f").getWidth(e))}getWidthMode(e){return le("id",e,oe()),O(_e(this,ve,"f").getWidthMode(e))}getHeight(e){return le("id",e,oe()),O(_e(this,ve,"f").getHeight(e))}getHeightMode(e){return le("id",e,oe()),O(_e(this,ve,"f").getHeightMode(e))}getContentFillMode(e){return le("id",e,oe()),O(_e(this,ve,"f").getContentFillMode(e))}setWidth(e,t){return le("id",e,oe()),le("value",t,ie()),O(_e(this,ve,"f").setWidth(e,t))}setWidthMode(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setWidthMode(e,t))}setHeight(e,t){return le("id",e,oe()),le("value",t,ie()),O(_e(this,ve,"f").setHeight(e,t))}setHeightMode(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setHeightMode(e,t))}setContentFillMode(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setContentFillMode(e,t))}getFrameWidth(e){return le("id",e,oe()),O(_e(this,ve,"f").getLastFrameWidth(e))}getFrameHeight(e){return le("id",e,oe()),O(_e(this,ve,"f").getLastFrameHeight(e))}duplicate(e){return le("id",e,oe()),O(_e(this,ve,"f").duplicate(e))}destroy(e){return le("id",e,oe()),O(_e(this,ve,"f").destroy(e))}isValid(e){return le("id",e,oe()),_e(this,ve,"f").isValid(e)}getParent(e){return le("id",e,oe()),O(_e(this,ve,"f").hasParent(e))?O(_e(this,ve,"f").getParent(e)):null}getChildren(e){le("id",e,oe());const t=O(_e(this,ve,"f").getChildren(e));return ge(t)}insertChild(e,t,r){return le("parent",e,ie()),le("child",t,ie()),le("index",r,se(ie(),0)),O(_e(this,ve,"f").insertChild(e,t,r))}appendChild(e,t){return le("parent",e,ie()),le("child",t,ie()),O(_e(this,ve,"f").appendChild(e,t))}referencesAnyVariables(e){return le("id",e,oe()),O(_e(this,ve,"f").referencesAnyVariables(e))}getGlobalBoundingBoxX(e){return le("id",e,oe()),O(_e(this,ve,"f").getGlobalBoundingBoxX(e))}getGlobalBoundingBoxY(e){return le("id",e,oe()),O(_e(this,ve,"f").getGlobalBoundingBoxY(e))}getGlobalBoundingBoxWidth(e){return le("id",e,oe()),O(_e(this,ve,"f").getGlobalBoundingBoxWidth(e))}getGlobalBoundingBoxHeight(e){return le("id",e,oe()),O(_e(this,ve,"f").getGlobalBoundingBoxHeight(e))}scale(e,t,r=0,n=0){return le("id",e,oe()),O(_e(this,ve,"f").scale(e,t,r,n))}findAllProperties(e){return le("id",e,oe()),ge(O(_e(this,ve,"f").findAllProperties(e)))}getPropertyType(e){return le("property",e,ae()),O(_e(this,ve,"f").getPropertyType(e))}getEnumValues(e){return le("enumProperty",e,ae()),ge(O(_e(this,ve,"f").getEnumValues(e)))}setBool(e,t,r){return le("id",e,oe()),le("property",t,ae()),le("value",r,ne()),O(_e(this,ve,"f").setBool(e,t,r))}getBool(e,t){return le("id",e,oe()),le("property",t,ae()),O(_e(this,ve,"f").getBool(e,t))}setInt(e,t,r){return le("id",e,oe()),le("property",t,ae()),le("value",r,oe()),O(_e(this,ve,"f").setInt(e,t,r))}getInt(e,t){return le("id",e,oe()),le("property",t,ae()),O(_e(this,ve,"f").getInt(e,t))}setFloat(e,t,r){return le("id",e,oe()),le("property",t,ae()),le("value",r,ie()),O(_e(this,ve,"f").setFloat(e,t,r))}getFloat(e,t){return le("id",e,oe()),le("property",t,ae()),O(_e(this,ve,"f").getFloat(e,t))}setString(e,t,r){return le("id",e,oe()),le("property",t,ae()),le("value",r,ae()),O(_e(this,ve,"f").setString(e,t,r))}getString(e,t){return le("id",e,oe()),le("property",t,ae()),O(_e(this,ve,"f").getString(e,t))}setColorRGBA(e,t,r,n,o,i=1){return le("id",e,oe()),le("property",t,ae()),le("r",r,ie()),le("g",n,ie()),le("b",o,ie()),le("a",i,ie()),O(_e(this,ve,"f").setColorRGBA(e,t,r,n,o,i))}getColorRGBA(e,t){return le("id",e,oe()),le("property",t,ae()),O(_e(this,ve,"f").getColorRGBA(e,t))}setEnum(e,t,r){return le("id",e,oe()),le("property",t,ae()),le("value",r,ae()),O(_e(this,ve,"f").setEnum(e,t,r))}getEnum(e,t){return le("id",e,oe()),le("property",t,ae()),O(_e(this,ve,"f").getEnum(e,t))}hasCrop(e){return le("id",e,oe()),O(_e(this,ve,"f").hasCrop(e))}setCropScaleX(e,t){return le("id",e,oe()),le("scaleX",t,ie()),O(_e(this,ve,"f").setCropScaleX(e,t))}setCropScaleY(e,t){return le("id",e,oe()),le("scaleY",t,ie()),O(_e(this,ve,"f").setCropScaleY(e,t))}setCropRotation(e,t){return le("id",e,oe()),le("rotation",t,ie()),O(_e(this,ve,"f").setCropRotation(e,t))}setCropTranslationX(e,t){return le("id",e,oe()),le("translationX",t,ie()),O(_e(this,ve,"f").setCropTranslationX(e,t))}setCropTranslationY(e,t){return le("id",e,oe()),le("translationY",t,ie()),O(_e(this,ve,"f").setCropTranslationY(e,t))}resetCrop(e){return le("id",e,oe()),O(_e(this,ve,"f").resetCrop(e))}getCropScaleX(e){return le("id",e,oe()),O(_e(this,ve,"f").getCropScaleX(e))}getCropScaleY(e){return le("id",e,oe()),O(_e(this,ve,"f").getCropScaleY(e))}getCropRotation(e){return le("id",e,oe()),O(_e(this,ve,"f").getCropRotation(e))}getCropTranslationX(e){return le("id",e,oe()),O(_e(this,ve,"f").getCropTranslationX(e))}getCropTranslationY(e){return le("id",e,oe()),O(_e(this,ve,"f").getCropTranslationY(e))}hasOpacity(e){return le("id",e,oe()),O(_e(this,ve,"f").hasOpacity(e))}setOpacity(e,t){return le("id",e,oe()),le("opacity",t,ie()),O(_e(this,ve,"f").setOpacity(e,t))}getOpacity(e){return le("id",e,oe()),O(_e(this,ve,"f").getOpacity(e))}hasBlendMode(e){return le("id",e,oe()),O(_e(this,ve,"f").hasBlendMode(e))}setBlendMode(e,t){return le("id",e,oe()),le("blendMode",t,ae()),O(_e(this,ve,"f").setBlendMode(e,t))}getBlendMode(e){return le("id",e,oe()),O(_e(this,ve,"f").getBlendMode(e))}hasFillColor(e){return le("id",e,oe()),O(_e(this,ve,"f").hasFillColor(e))}setFillColorRGBA(e,t,r,n,o=1){return le("id",e,oe()),le("r",t,ie()),le("g",r,ie()),le("b",n,ie()),le("a",o,ie()),O(_e(this,ve,"f").setFillColorRGBA(e,t,r,n,o))}getFillColorRGBA(e){return le("id",e,oe()),O(_e(this,ve,"f").getFillColorRGBA(e))}setFillColorEnabled(e,t){return le("id",e,oe()),le("enabled",t,ne()),O(_e(this,ve,"f").setFillColorEnabled(e,t))}isFillColorEnabled(e){return le("id",e,oe()),O(_e(this,ve,"f").isFillColorEnabled(e))}hasBackgroundColor(e){return le("id",e,oe()),O(_e(this,ve,"f").hasBackgroundColor(e))}setBackgroundColorRGBA(e,t,r,n,o=1){return le("id",e,oe()),le("r",t,ie()),le("g",r,ie()),le("b",n,ie()),le("a",o,ie()),O(_e(this,ve,"f").setBackgroundColorRGBA(e,t,r,n,o))}getBackgroundColorRGBA(e){return le("id",e,oe()),O(_e(this,ve,"f").getBackgroundColorRGBA(e))}setBackgroundColorEnabled(e,t){return le("id",e,oe()),le("enabled",t,ne()),O(_e(this,ve,"f").setBackgroundColorEnabled(e,t))}isBackgroundColorEnabled(e){return le("id",e,oe()),O(_e(this,ve,"f").isBackgroundColorEnabled(e))}hasStroke(e){return le("id",e,oe()),O(_e(this,ve,"f").hasStroke(e))}setStrokeEnabled(e,t){return le("id",e,oe()),le("enabled",t,ne()),O(_e(this,ve,"f").setStrokeEnabled(e,t))}isStrokeEnabled(e){return le("id",e,oe()),O(_e(this,ve,"f").isStrokeEnabled(e))}setStrokeColorRGBA(e,t,r,n,o=1){return le("id",e,oe()),le("r",t,ie()),le("g",r,ie()),le("b",n,ie()),le("a",o,ie()),O(_e(this,ve,"f").setStrokeColorRGBA(e,t,r,n,o))}getStrokeColorRGBA(e){return le("id",e,oe()),O(_e(this,ve,"f").getStrokeColorRGBA(e))}setStrokeWidth(e,t){return le("id",e,oe()),le("width",t,ie()),O(_e(this,ve,"f").setStrokeWidth(e,t))}getStrokeWidth(e){return le("id",e,oe()),O(_e(this,ve,"f").getStrokeWidth(e))}setStrokeStyle(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setStrokeStyle(e,t))}getStrokeStyle(e){return le("id",e,oe()),O(_e(this,ve,"f").getStrokeStyle(e))}setStrokePosition(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setStrokePosition(e,t))}getStrokePosition(e){return le("id",e,oe()),O(_e(this,ve,"f").getStrokePosition(e))}setStrokeCornerGeometry(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setStrokeCornerGeometry(e,t))}getStrokeCornerGeometry(e){return le("id",e,oe()),O(_e(this,ve,"f").getStrokeCornerGeometry(e))}hasOutline(e){return le("id",e,oe()),this.hasStroke(e)}setOutlineColorRGBA(e,t,r,n,o=1){return le("id",e,oe()),le("r",t,ie()),le("g",r,ie()),le("b",n,ie()),le("a",o,ie()),this.setStrokeColorRGBA(e,t,r,n,o)}getOutlineColorRGBA(e){return le("id",e,oe()),this.getStrokeColorRGBA(e)}setOutlineEnabled(e,t){return le("id",e,oe()),le("enabled",t,ne()),this.setStrokeEnabled(e,t)}isOutlineEnabled(e){return le("id",e,oe()),this.isStrokeEnabled(e)}setOutlineWidth(e,t){return le("id",e,oe()),le("width",t,ie()),this.setStrokeWidth(e,t)}getOutlineWidth(e){return le("id",e,oe()),this.getStrokeWidth(e)}hasFill(e){return le("id",e,oe()),O(_e(this,ve,"f").hasFill(e))}isFillEnabled(e){return le("id",e,oe()),O(_e(this,ve,"f").isFillEnabled(e))}setFillEnabled(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setFillEnabled(e,t))}setFillType(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setFillType(e,t))}getFillType(e){return le("id",e,oe()),O(_e(this,ve,"f").getFillType(e))}setFillSolidColor(e,t,r,n,o=1){le("id",e,oe()),O(_e(this,ve,"f").setFillSolidColor(e,t,r,n,o))}getFillSolidColor(e){return le("id",e,oe()),O(_e(this,ve,"f").getFillSolidColor(e))}setFillGradientType(e,t){le("id",e,oe()),O(_e(this,ve,"f").setFillGradientType(e,t))}getFillGradientType(e){return le("id",e,oe()),O(_e(this,ve,"f").getFillGradientType(e))}addFillGradientColorStop(e,t,r,n,o,i=1){le("id",e,oe()),O(_e(this,ve,"f").addFillGradientColorStop(e,t,r,n,o,i))}removeFillGradientColorStop(e,t){le("id",e,oe()),O(_e(this,ve,"f").removeFillGradientColorStop(e,t))}getFillGradientColorStops(e){return le("id",e,oe()),ge(_e(this,ve,"f").getFillGradientColorStops(e))}setFillGradientColorStops(e,t){le("id",e,oe()),O(_e(this,ve,"f").setFillGradientColorStops(e,t))}setFillGradientControlPoint(e,t,r,n){return le("id",e,oe()),O(_e(this,ve,"f").setFillGradientControlPoint(e,t,r,n))}getFillGradientControlPointX(e,t){return le("id",e,oe()),O(_e(this,ve,"f").getFillGradientControlPointX(e,t))}getFillGradientControlPointY(e,t){return le("id",e,oe()),O(_e(this,ve,"f").getFillGradientControlPointY(e,t))}setFillGradientRadius(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setFillGradientRadius(e,t))}getFillGradientRadius(e){return le("id",e,oe()),O(_e(this,ve,"f").getFillGradientRadius(e))}}ve=new WeakMap,ye=new WeakMap;var Ee,xe=r(7168),ke=r.n(xe);!function(e){e.Info="Info",e.Warning="Warning",e.Error="Error"}(Ee||(Ee={}));const Se={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"]},Te={company_name:{value:"img.ly"},first_name:{value:"Charly"},last_name:{value:"Williams"},address:{value:"742 Evergreen Terrace"},city:{value:"Springfield"}},Ce=(e,t)=>{const r=`[UBQ] ${e}`;switch(t){case Ee.Warning:console.warn(r);break;case Ee.Error:console.error(r);break;case Ee.Info:default:console.log(r)}},Pe={log:Ce},Ae={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"}}},Fe={baseURL:"core/"},De={maskSpotColor:void 0,dpi:300,pixelScaleFactor:1},Le={title:{fontFileUri:"bundle://ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",show:!0},dimOutOfPageAreas:!0};function Ie(e,t=("undefined"==typeof window?"":window.location.href)){return new URL(e,""===t?void 0:t).toString()}function Me(e){return"/"!==e[e.length-1]?`${e}/`:e}function Re(e={}){var t,r,n,o,i,a,s,c,u,l,d,f,m,p,h;const g={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.7.0-alpha.0/assets",core:null!==(o=e.core)&&void 0!==o?o:Object.assign({},Fe),extensions:null!==(i=e.extensions)&&void 0!==i?i:Object.assign({},Se),callbacks:null!==(a=e.callbacks)&&void 0!==a?a:Object.assign({},Pe),variables:null!==(s=e.variables)&&void 0!==s?s:Object.assign({},Te),presets:null!==(c=e.presets)&&void 0!==c?c:Object.assign({},Ae),scene:null!==(u=e.scene)&&void 0!==u?u:Object.assign({},De),page:ke()({},Le,null!==(l=e.page)&&void 0!==l?l:{}),assetSources:ke()({},e.assetSources),defaultFont:null!==(d=e.defaultFont)&&void 0!==d?d:void 0};return null!==(f=(p=g.extensions).baseURL)&&void 0!==f||(p.baseURL=Se.baseURL),null!==(m=(h=g.extensions).entries)&&void 0!==m||(h.entries=Object.assign({},Se.entries)),Object.entries(Ae).forEach((([e,t])=>{var r;g.presets[e]=null!==(r=g.presets[e])&&void 0!==r?r:Object.assign({},t)})),g.baseURL=Ie(g.baseURL),g.baseURL=Me(g.baseURL),g.core.baseURL=Ie(g.core.baseURL,g.baseURL),g.core.baseURL=Me(g.core.baseURL),g.extensions.baseURL=Me(g.extensions.baseURL),g.extensions.entries=g.extensions.entries.map((e=>Me(e))),g}var Oe,Be,Ue=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},Ne=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 je{constructor(e){Oe.set(this,void 0),Be.set(this,void 0),Ue(this,Oe,e,"f"),Ue(this,Be,new R(e),"f")}onStateChanged(e){const t=Ne(this,Oe,"f").subscribeToEditorState(e);return()=>{O(Ne(this,Oe,"f").unsubscribe(t))}}setEditMode(e){le("keypath",e,ae()),Ne(this,Oe,"f").setEditMode(e)}getEditMode(){return Ne(this,Oe,"f").getEditMode()}getCursorType(){return Ne(this,Oe,"f").getCursorType()}getCursorRotation(){return Ne(this,Oe,"f").getCursorRotation()}getTextCursorPositionInScreenSpaceX(){return Ne(this,Oe,"f").getTextCursorPositionInScreenSpaceX()}getTextCursorPositionInScreenSpaceY(){return Ne(this,Oe,"f").getTextCursorPositionInScreenSpaceY()}setZoomLevel(e=1){le("zoomLevel",e,se(ie(),0)),Ne(this,Oe,"f").setZoomLevel(e)}getZoomLevel(){return O(Ne(this,Oe,"f").getZoomLevel())}addUndoStep(){O(Ne(this,Oe,"f").addUndoStep())}undo(){O(Ne(this,Oe,"f").undo())}redo(){O(Ne(this,Oe,"f").redo())}canUndo(){return O(Ne(this,Oe,"f").canUndo())}canRedo(){return O(Ne(this,Oe,"f").canRedo())}setSettingBool(e,t){return le("keypath",e,ae()),le("value",t,ne()),O(Ne(this,Oe,"f").setSettingBool(e,t))}getSettingBool(e){return le("keypath",e,ae()),O(Ne(this,Oe,"f").getSettingBool(e))}setSettingInt(e,t){return le("keypath",e,ae()),le("value",t,oe()),O(Ne(this,Oe,"f").setSettingFloat(e,t))}getSettingInt(e){return le("keypath",e,ae()),O(Ne(this,Oe,"f").getSettingFloat(e))}setSettingFloat(e,t){return le("keypath",e,ae()),le("value",t,ie()),O(Ne(this,Oe,"f").setSettingFloat(e,t))}getSettingFloat(e){return le("keypath",e,ae()),O(Ne(this,Oe,"f").getSettingFloat(e))}setSettingString(e,t){return le("keypath",e,ae()),le("value",t,ae()),O(Ne(this,Oe,"f").setSettingString(e,t))}getSettingString(e){return le("keypath",e,ae()),O(Ne(this,Oe,"f").getSettingString(e))}setSettingColorRGBA(e,t,r,n,o=1){return le("keypath",e,ae()),le("r",t,ie()),le("g",r,ie()),le("b",n,ie()),le("a",o,ie()),O(Ne(this,Oe,"f").setSettingColorRGBA(e,t,r,n,o))}getSettingColorRGBA(e){return le("keypath",e,ae()),O(Ne(this,Oe,"f").getSettingColorRGBA(e))}setSettingEnum(e,t){return le("keypath",e,ae()),le("value",t,ae()),O(Ne(this,Oe,"f").setSettingEnum(e,t))}getSettingEnum(e){return le("keypath",e,ae()),O(Ne(this,Oe,"f").getSettingEnum(e))}}Oe=new WeakMap,Be=new WeakMap;var qe,Ge=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class We{constructor(e){qe.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,qe,e,"f")}subscribe(e,t){le("blocks",e,re());const r=Ge(this,qe,"f").subscribe(e,(e=>{try{t(ge(e,!0))}catch(e){console.error(e)}}));return()=>{O(Ge(this,qe,"f").unsubscribe(r))}}}qe=new WeakMap;var ze,Ve=(ze="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(){Ve("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(){Ve("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(){Ve("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(){Ve("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(){Ve("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(){Ve("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(){Ve("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(){Ve("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(){Ve("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(){Ve("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,x("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:"5df75271-a1af-4f12-b732-fadabcd1fe1d"}),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},f="object"==typeof window,m="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h=!f&&!p&&!m;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 g,v,y,b="";function _(e){return o.locateFile?o.locateFile(e,b):b+e}function w(e){if(e instanceof pf)return;let t=e;e&&"object"==typeof e&&e.stack&&(t=[e,e.stack]),x("exiting due to exception: "+t)}if(h){if("object"==typeof process||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(g=function(e){return read(e)}),y=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),N("object"==typeof t),t)},v=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)=>{if(Ce)throw t;w(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!f&&!m)throw new Error("environment detection error");if(m?b=self.location.href:"undefined"!=typeof document&&document.currentScript&&(b=document.currentScript.src),ze&&(b=ze),b=0!==b.indexOf("blob:")?b.substr(0,b.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?)");g=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},m&&(y=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),v=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}}var E=o.print||console.log.bind(console),x=o.printErr||console.warn.bind(console);function k(e){k.shown||(k.shown={}),k.shown[e]||(k.shown[e]=1,x(e))}function S(e,t){Object.getOwnPropertyDescriptor(o,e)||Object.defineProperty(o,e,{configurable:!0,get:function(){Ve("Module."+e+" has been replaced with plain "+t+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}function T(e){Object.getOwnPropertyDescriptor(o,e)&&Ve("`Module."+e+"` was supplied but `"+e+"` not included in INCOMING_MODULE_JS_API")}function C(e,t){var r="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";return t&&(r+=". Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"),r}function P(e,t){Object.getOwnPropertyDescriptor(o,e)||Object.defineProperty(o,e,{configurable:!0,get:function(){Ve(C(e,t))}})}function A(e,t){Object.getOwnPropertyDescriptor(o,e)||(o[e]=()=>Ve(C(e,t)))}Object.assign(o,c),c=null,Ud(),o.arguments&&(u=o.arguments),S("arguments","arguments_"),o.thisProgram&&(l=o.thisProgram),S("thisProgram","thisProgram"),o.quit&&(d=o.quit),S("quit","quit_"),N(void 0===o.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),N(void 0===o.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),N(void 0===o.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),N(void 0===o.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),N(void 0===o.read,"Module.read option was removed (modify read_ in JS)"),N(void 0===o.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),N(void 0===o.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),N(void 0===o.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),N(void 0===o.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),S("read","read_"),S("readAsync","readAsync"),S("readBinary","readBinary"),S("setWindowTitle","setWindowTitle"),N(!p,"node environment detected but not enabled at build time. Add 'node' to `-s ENVIRONMENT` to enable."),N(!h,"shell environment detected but not enabled at build time. Add 'shell' to `-s ENVIRONMENT` to enable.");var F,D=0,L=e=>{D=e},I=()=>D;o.wasmBinary&&(F=o.wasmBinary),S("wasmBinary","wasmBinary");var M,R=o.noExitRuntime||!0;function O(e,t="i8",r){switch("*"===t.charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return $[e>>0];case"i16":return X[e>>1];case"i32":return Q[e>>2];case"i64":return Number(ee[e>>3]);case"float":return J[e>>2];case"double":return Number(re[e>>3]);default:Ve("invalid type for getValue: "+t)}return null}S("noExitRuntime","noExitRuntime"),"object"!=typeof WebAssembly&&Ve("no native wasm support detected");var B,U=!1;function N(e,t){e||Ve("Assertion failed"+(t?": "+t:""))}var j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function q(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&j)return j.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var c=63&e[t++];if(224==(240&a)?a=(15&a)<<12|s<<6|c:(240!=(248&a)&&k("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 G(e,t){return e?q(Y,e,t):""}function W(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&&k("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 z(e,t,r){return N("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),W(e,Y,t,r)}function V(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 H,$,Y,X,K,Q,Z,J,ee,te,re,ne="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function oe(e,t){N(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)&&K[n];)++n;if((r=n<<1)-e>32&&ne)return ne.decode(Y.subarray(e,r));for(var i="",a=0;!(a>=t/2);++a){var s=X[e+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function ie(e,t,r){if(N(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),N("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);X[t>>1]=a,t+=2}return X[t>>1]=0,t-n}function ae(e){return 2*e.length}function se(e,t){N(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(r>=t/4);){var o=Q[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 ce(e,t,r){if(N(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),N("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)),Q[t>>2]=a,(t+=4)+4>o)break}return Q[t>>2]=0,t-n}function ue(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 le(e){var t=V(e)+1,r=qd(t);return r&&W(e,$,r,t),r}function de(e){var t=V(e)+1,r=Zd(t);return W(e,$,r,t),r}function fe(e,t){N(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),$.set(e,t)}function me(e,t,r){for(var n=0;n<e.length;++n)N(e.charCodeAt(n)===(255&e.charCodeAt(n))),$[t++>>0]=e.charCodeAt(n);r||($[t>>0]=0)}function pe(e){H=e,o.HEAP8=$=new Int8Array(e),o.HEAP16=X=new Int16Array(e),o.HEAP32=Q=new Int32Array(e),o.HEAPU8=Y=new Uint8Array(e),o.HEAPU16=K=new Uint16Array(e),o.HEAPU32=Z=new Uint32Array(e),o.HEAPF32=J=new Float32Array(e),o.HEAPF64=re=new Float64Array(e),o.HEAP64=ee=new BigInt64Array(e),o.HEAPU64=te=new BigUint64Array(e)}var he=5242880;o.TOTAL_STACK&&N(he===o.TOTAL_STACK,"the stack size can no longer be determined at runtime");var ge,ve=o.INITIAL_MEMORY||268435456;function ye(){var e=Xd();N(0==(3&e)),Q[e>>2]=34821223,Q[e+4>>2]=2310721022,Q[0]=1668509029}function be(){if(!U){var e=Xd(),t=Z[e>>2],r=Z[e+4>>2];34821223==t&&2310721022==r||Ve("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" 0x"+t.toString(16)),1668509029!==Q[0]&&Ve("Runtime error: The application has corrupted its heap memory area (address zero)!")}}S("INITIAL_MEMORY","INITIAL_MEMORY"),N(ve>=he,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+ve+"! (TOTAL_STACK="+he+")"),N("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),N(!o.wasmMemory,"Use of `wasmMemory` detected. Use -s IMPORTED_MEMORY to define wasmMemory externally"),N(268435456==ve,"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 _e=[],we=[],Ee=[],xe=[],ke=[],Se=!1,Te=!1,Ce=0;function Pe(){return R||Ce>0}function Ae(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)Me(o.preRun.shift());et(_e)}function Fe(){be(),N(!Se),Se=!0,o.noFSInit||Et.init.initialized||Et.init(),Et.ignorePermissions=!1,pt.init(),et(we)}function De(){be(),et(Ee)}function Le(){be(),Te=!0}function Ie(){if(be(),o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)Oe(o.postRun.shift());et(ke)}function Me(e){_e.unshift(e)}function Re(e){we.unshift(e)}function Oe(e){ke.unshift(e)}N(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),N(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),N(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),N(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 Be=0,Ue=null,Ne=null,je={};function qe(e){for(var t=e;;){if(!je[e])return e;e=t+Math.random()}}function Ge(e){Be++,o.monitorRunDependencies&&o.monitorRunDependencies(Be),e?(N(!je[e]),je[e]=1,null===Ue&&"undefined"!=typeof setInterval&&(Ue=setInterval((function(){if(U)return clearInterval(Ue),void(Ue=null);var e=!1;for(var t in je)e||(e=!0,x("still waiting on run dependencies:")),x("dependency: "+t);e&&x("(end of list)")}),1e4))):x("warning: run dependency added without ID")}function We(e){if(Be--,o.monitorRunDependencies&&o.monitorRunDependencies(Be),e?(N(je[e]),delete je[e]):x("warning: run dependency removed without ID"),0==Be&&(null!==Ue&&(clearInterval(Ue),Ue=null),Ne)){var t=Ne;Ne=null,t()}}function Ve(e){o.onAbort&&o.onAbort(e),x(e="Aborted("+e+")"),U=!0,B=1;var t=new WebAssembly.RuntimeError(e);throw n(t),t}o.preloadedImages={},o.preloadedAudios={};var He,$e="data:application/octet-stream;base64,";function Ye(e){return e.startsWith($e)}function Xe(e){return e.startsWith("file://")}function Ke(e,t){return function(){var r=e,n=t;return t||(n=o.asm),N(Se,"native function `"+r+"` called before runtime initialization"),N(!Te,"native function `"+r+"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n[e]||N(n[e],"exported native function `"+r+"` not found"),n[e].apply(null,arguments)}}function Qe(e){try{if(e==He&&F)return new Uint8Array(F);if(y)return y(e);throw"both async and sync fetching of the wasm failed"}catch(e){Ve(e)}}function Ze(){return F||!f&&!m||"function"!=typeof fetch?Promise.resolve().then((function(){return Qe(He)})):fetch(He,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+He+"'";return e.arrayBuffer()})).catch((function(){return Qe(He)}))}function Je(){var e={env:jd,wasi_snapshot_preview1:jd};function t(e,t){var r=e.exports;o.asm=r,N(M=o.asm.memory,"memory not found in wasm exports"),pe(M.buffer),N(ge=o.asm.__indirect_function_table,"table not found in wasm exports"),Re(o.asm.__wasm_call_ctors),We("wasm-instantiate")}Ge("wasm-instantiate");var r=o;function i(e){N(o===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,t(e.instance)}function a(t){return Ze().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){x("failed to asynchronously prepare wasm: "+e),Xe(He)&&x("warning: Loading from a file URI ("+He+") 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"),Ve(e)}))}if(o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(e){return x("Module.instantiateWasm callback failed with error: "+e),!1}return(F||"function"!=typeof WebAssembly.instantiateStreaming||Ye(He)||"function"!=typeof fetch?a(i):fetch(He,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(i,(function(e){return x("wasm streaming compile failed: "+e),x("falling back to ArrayBuffer instantiation"),a(i)}))}))).catch(n),{}}function et(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?ot(r)():ot(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(o)}}function tt(e){return k("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function rt(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t=tt(e);return e===t?e:t+" ["+e+"]"}))}Ye(He="cesdk.wasm")||(He=_(He));var nt=[];function ot(e){var t=nt[e];return t||(e>=nt.length&&(nt.length=e+1),nt[e]=t=ge.get(e)),N(ge.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}function it(e){if(e instanceof pf||"unwind"==e)return B;d(1,e)}function at(e,t,r,n){Ve("Assertion failed: "+G(e)+", at: "+[t?G(t):"unknown filename",r,n?G(n):"unknown function"])}function st(e){return qd(e+16)+16}function ct(e){this.excPtr=e,this.ptr=e-16,this.set_type=function(e){Q[this.ptr+4>>2]=e},this.get_type=function(){return Q[this.ptr+4>>2]},this.set_destructor=function(e){Q[this.ptr+8>>2]=e},this.get_destructor=function(){return Q[this.ptr+8>>2]},this.set_refcount=function(e){Q[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,$[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=$[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,$[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=$[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=Q[this.ptr>>2];Q[this.ptr>>2]=e+1},this.release_ref=function(){var e=Q[this.ptr>>2];return Q[this.ptr>>2]=e-1,N(e>0),1===e}}function ut(e,t,r){throw new ct(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 lt(e){return Q[Wd()>>2]=e,e}var dt={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=dt.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=dt.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=dt.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return dt.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return dt.normalize(e.join("/"))},join2:function(e,t){return dt.normalize(e+"/"+t)}};function ft(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}return function(){Ve("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 mt={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:Et.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=dt.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=mt.resolve(e).substr(1),t=mt.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("/")}},pt={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){pt.ttys[e]={input:[],output:[],ops:t},Et.registerDevice(e,pt.stream_ops)},stream_ops:{open:function(e){var t=pt.ttys[e.node.rdev];if(!t)throw new Et.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 Et.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 Et.ErrnoError(29)}if(void 0===s&&0===i)throw new Et.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 Et.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new Et.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;e.input=Bd(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(E(q(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(E(q(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(x(q(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(x(q(e.output,0)),e.output=[])}}};function ht(e,t){Y.fill(0,e,e+t)}function gt(e,t){return N(t,"alignment argument is required"),Math.ceil(e/t)*t}function vt(e){e=gt(e,65536);var t=Hd(65536,e);return t?(ht(t,e),t):0}var yt={ops_table:null,mount:function(e){return yt.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(Et.isBlkdev(r)||Et.isFIFO(r))throw new Et.ErrnoError(63);yt.ops_table||(yt.ops_table={dir:{node:{getattr:yt.node_ops.getattr,setattr:yt.node_ops.setattr,lookup:yt.node_ops.lookup,mknod:yt.node_ops.mknod,rename:yt.node_ops.rename,unlink:yt.node_ops.unlink,rmdir:yt.node_ops.rmdir,readdir:yt.node_ops.readdir,symlink:yt.node_ops.symlink},stream:{llseek:yt.stream_ops.llseek}},file:{node:{getattr:yt.node_ops.getattr,setattr:yt.node_ops.setattr},stream:{llseek:yt.stream_ops.llseek,read:yt.stream_ops.read,write:yt.stream_ops.write,allocate:yt.stream_ops.allocate,mmap:yt.stream_ops.mmap,msync:yt.stream_ops.msync}},link:{node:{getattr:yt.node_ops.getattr,setattr:yt.node_ops.setattr,readlink:yt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:yt.node_ops.getattr,setattr:yt.node_ops.setattr},stream:Et.chrdev_stream_ops}});var o=Et.createNode(e,t,r,n);return Et.isDir(o.mode)?(o.node_ops=yt.ops_table.dir.node,o.stream_ops=yt.ops_table.dir.stream,o.contents={}):Et.isFile(o.mode)?(o.node_ops=yt.ops_table.file.node,o.stream_ops=yt.ops_table.file.stream,o.usedBytes=0,o.contents=null):Et.isLink(o.mode)?(o.node_ops=yt.ops_table.link.node,o.stream_ops=yt.ops_table.link.stream):Et.isChrdev(o.mode)&&(o.node_ops=yt.ops_table.chrdev.node,o.stream_ops=yt.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=Et.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,Et.isDir(e.mode)?t.size=4096:Et.isFile(e.mode)?t.size=e.usedBytes:Et.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&&yt.resizeFileStorage(e,t.size)},lookup:function(e,t){throw Et.genericErrors[44]},mknod:function(e,t,r,n){return yt.createNode(e,t,r,n)},rename:function(e,t,r){if(Et.isDir(e.mode)){var n;try{n=Et.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new Et.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=Et.lookupNode(e,t);for(var n in r.contents)throw new Et.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=yt.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!Et.isLink(e.mode))throw new Et.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(N(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(N(!(t instanceof ArrayBuffer)),t.buffer===$.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 N(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(yt.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&&Et.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Et.ErrnoError(28);return n},allocate:function(e,t,r){yt.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 Et.ErrnoError(28);if(!Et.isFile(e.node.mode))throw new Et.ErrnoError(43);var a,s,c=e.node.contents;if(2&i||c.buffer!==H){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=vt(r)))throw new Et.ErrnoError(48);$.set(c,a)}else s=!1,a=c.byteOffset;return{ptr:a,allocated:s}},msync:function(e,t,r,n,o){if(!Et.isFile(e.node.mode))throw new Et.ErrnoError(43);return 2&o||yt.stream_ops.write(e,t,0,n,r,!1),0}}};function bt(e,t,r,n){var o=n?"":qe("al "+e);v(e,(function(r){N(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),o&&We(o)}),(function(t){if(!r)throw'Loading data file "'+e+'" failed.';r()})),o&&Ge(o)}var _t={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"},wt={},Et={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=mt.resolve(Et.cwd(),e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new Et.ErrnoError(32);for(var r=dt.normalizeArray(e.split("/").filter((e=>!!e)),!1),n=Et.root,o="/",i=0;i<r.length;i++){var a=i===r.length-1;if(a&&t.parent)break;if(n=Et.lookupNode(n,r[i]),o=dt.join2(o,r[i]),Et.isMountpoint(n)&&(!a||a&&t.follow_mount)&&(n=n.mounted.root),!a||t.follow)for(var s=0;Et.isLink(n.mode);){var c=Et.readlink(o);if(o=mt.resolve(dt.dirname(o),c),n=Et.lookupPath(o,{recurse_count:t.recurse_count+1}).node,s++>40)throw new Et.ErrnoError(32)}}return{path:o,node:n}},getPath:e=>{for(var t;;){if(Et.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)%Et.nameTable.length},hashAddNode:e=>{var t=Et.hashName(e.parent.id,e.name);e.name_next=Et.nameTable[t],Et.nameTable[t]=e},hashRemoveNode:e=>{var t=Et.hashName(e.parent.id,e.name);if(Et.nameTable[t]===e)Et.nameTable[t]=e.name_next;else for(var r=Et.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:(e,t)=>{var r=Et.mayLookup(e);if(r)throw new Et.ErrnoError(r,e);for(var n=Et.hashName(e.id,t),o=Et.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return Et.lookup(e,t)},createNode:(e,t,r,n)=>{N("object"==typeof e);var o=new Et.FSNode(e,t,r,n);return Et.hashAddNode(o),o},destroyNode:e=>{Et.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=Et.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)=>Et.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>Et.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,t)=>{try{return Et.lookupNode(e,t),20}catch(e){}return Et.nodePermissions(e,"wx")},mayDelete:(e,t,r)=>{var n;try{n=Et.lookupNode(e,t)}catch(e){return e.errno}var o=Et.nodePermissions(e,"wx");if(o)return o;if(r){if(!Et.isDir(n.mode))return 54;if(Et.isRoot(n)||Et.getPath(n)===Et.cwd())return 10}else if(Et.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?Et.isLink(e.mode)?32:Et.isDir(e.mode)&&("r"!==Et.flagsToPermissionString(t)||512&t)?31:Et.nodePermissions(e,Et.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=Et.MAX_OPEN_FDS)=>{for(var r=e;r<=t;r++)if(!Et.streams[r])return r;throw new Et.ErrnoError(33)},getStream:e=>Et.streams[e],createStream:(e,t,r)=>{Et.FSStream||(Et.FSStream=function(){},Et.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 Et.FSStream,e);var n=Et.nextfd(t,r);return e.fd=n,Et.streams[n]=e,e},closeStream:e=>{Et.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=Et.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new Et.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{Et.devices[e]={stream_ops:t}},getDevice:e=>Et.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),Et.syncFSRequests++,Et.syncFSRequests>1&&x("warning: "+Et.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=Et.getMounts(Et.root.mount),n=0;function o(e){return N(Et.syncFSRequests>0),Et.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&&Et.root)throw new Et.ErrnoError(10);if(!o&&!i){var a=Et.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,Et.isMountpoint(n))throw new Et.ErrnoError(10);if(!Et.isDir(n.mode))throw new Et.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(s);return c.mount=s,s.root=c,o?Et.root=c:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),c},unmount:e=>{var t=Et.lookupPath(e,{follow_mount:!1});if(!Et.isMountpoint(t.node))throw new Et.ErrnoError(28);var r=t.node,n=r.mounted,o=Et.getMounts(n);Object.keys(Et.nameTable).forEach((e=>{for(var t=Et.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&Et.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);N(-1!==i),r.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,r)=>{var n=Et.lookupPath(e,{parent:!0}).node,o=dt.basename(e);if(!o||"."===o||".."===o)throw new Et.ErrnoError(28);var i=Et.mayCreate(n,o);if(i)throw new Et.ErrnoError(i);if(!n.node_ops.mknod)throw new Et.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Et.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Et.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{Et.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>(void 0===r&&(r=t,t=438),t|=8192,Et.mknod(e,t,r)),symlink:(e,t)=>{if(!mt.resolve(e))throw new Et.ErrnoError(44);var r=Et.lookupPath(t,{parent:!0}).node;if(!r)throw new Et.ErrnoError(44);var n=dt.basename(t),o=Et.mayCreate(r,n);if(o)throw new Et.ErrnoError(o);if(!r.node_ops.symlink)throw new Et.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:(e,t)=>{var r,n,o=dt.dirname(e),i=dt.dirname(t),a=dt.basename(e),s=dt.basename(t);if(r=Et.lookupPath(e,{parent:!0}).node,n=Et.lookupPath(t,{parent:!0}).node,!r||!n)throw new Et.ErrnoError(44);if(r.mount!==n.mount)throw new Et.ErrnoError(75);var c,u=Et.lookupNode(r,a),l=mt.relative(e,i);if("."!==l.charAt(0))throw new Et.ErrnoError(28);if("."!==(l=mt.relative(t,o)).charAt(0))throw new Et.ErrnoError(55);try{c=Et.lookupNode(n,s)}catch(e){}if(u!==c){var d=Et.isDir(u.mode),f=Et.mayDelete(r,a,d);if(f)throw new Et.ErrnoError(f);if(f=c?Et.mayDelete(n,s,d):Et.mayCreate(n,s))throw new Et.ErrnoError(f);if(!r.node_ops.rename)throw new Et.ErrnoError(63);if(Et.isMountpoint(u)||c&&Et.isMountpoint(c))throw new Et.ErrnoError(10);if(n!==r&&(f=Et.nodePermissions(r,"w")))throw new Et.ErrnoError(f);Et.hashRemoveNode(u);try{r.node_ops.rename(u,n,s)}catch(e){throw e}finally{Et.hashAddNode(u)}}},rmdir:e=>{var t=Et.lookupPath(e,{parent:!0}).node,r=dt.basename(e),n=Et.lookupNode(t,r),o=Et.mayDelete(t,r,!0);if(o)throw new Et.ErrnoError(o);if(!t.node_ops.rmdir)throw new Et.ErrnoError(63);if(Et.isMountpoint(n))throw new Et.ErrnoError(10);t.node_ops.rmdir(t,r),Et.destroyNode(n)},readdir:e=>{var t=Et.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Et.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=Et.lookupPath(e,{parent:!0}).node;if(!t)throw new Et.ErrnoError(44);var r=dt.basename(e),n=Et.lookupNode(t,r),o=Et.mayDelete(t,r,!1);if(o)throw new Et.ErrnoError(o);if(!t.node_ops.unlink)throw new Et.ErrnoError(63);if(Et.isMountpoint(n))throw new Et.ErrnoError(10);t.node_ops.unlink(t,r),Et.destroyNode(n)},readlink:e=>{var t=Et.lookupPath(e).node;if(!t)throw new Et.ErrnoError(44);if(!t.node_ops.readlink)throw new Et.ErrnoError(28);return mt.resolve(Et.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var r=Et.lookupPath(e,{follow:!t}).node;if(!r)throw new Et.ErrnoError(44);if(!r.node_ops.getattr)throw new Et.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Et.stat(e,!0),chmod:(e,t,r)=>{var n;if(!(n="string"==typeof e?Et.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new Et.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{Et.chmod(e,t,!0)},fchmod:(e,t)=>{var r=Et.getStream(e);if(!r)throw new Et.ErrnoError(8);Et.chmod(r.node,t)},chown:(e,t,r,n)=>{var o;if(!(o="string"==typeof e?Et.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Et.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,t,r)=>{Et.chown(e,t,r,!0)},fchown:(e,t,r)=>{var n=Et.getStream(e);if(!n)throw new Et.ErrnoError(8);Et.chown(n.node,t,r)},truncate:(e,t)=>{if(t<0)throw new Et.ErrnoError(28);var r;if(!(r="string"==typeof e?Et.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Et.ErrnoError(63);if(Et.isDir(r.mode))throw new Et.ErrnoError(31);if(!Et.isFile(r.mode))throw new Et.ErrnoError(28);var n=Et.nodePermissions(r,"w");if(n)throw new Et.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var r=Et.getStream(e);if(!r)throw new Et.ErrnoError(8);if(0==(2097155&r.flags))throw new Et.ErrnoError(28);Et.truncate(r.node,t)},utime:(e,t,r)=>{var n=Et.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 Et.ErrnoError(44);var a;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Et.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)a=e;else{e=dt.normalize(e);try{a=Et.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(a){if(128&t)throw new Et.ErrnoError(20)}else a=Et.mknod(e,r,0),s=!0;if(!a)throw new Et.ErrnoError(44);if(Et.isChrdev(a.mode)&&(t&=-513),65536&t&&!Et.isDir(a.mode))throw new Et.ErrnoError(54);if(!s){var c=Et.mayOpen(a,t);if(c)throw new Et.ErrnoError(c)}512&t&&Et.truncate(a,0),t&=-131713;var u=Et.createStream({node:a,path:Et.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||(Et.readFiles||(Et.readFiles={}),e in Et.readFiles||(Et.readFiles[e]=1)),u},close:e=>{if(Et.isClosed(e))throw new Et.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Et.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,r)=>{if(Et.isClosed(e))throw new Et.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Et.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Et.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 Et.ErrnoError(28);if(Et.isClosed(e))throw new Et.ErrnoError(8);if(1==(2097155&e.flags))throw new Et.ErrnoError(8);if(Et.isDir(e.node.mode))throw new Et.ErrnoError(31);if(!e.stream_ops.read)throw new Et.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new Et.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 Et.ErrnoError(28);if(Et.isClosed(e))throw new Et.ErrnoError(8);if(0==(2097155&e.flags))throw new Et.ErrnoError(8);if(Et.isDir(e.node.mode))throw new Et.ErrnoError(31);if(!e.stream_ops.write)throw new Et.ErrnoError(28);e.seekable&&1024&e.flags&&Et.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new Et.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(Et.isClosed(e))throw new Et.ErrnoError(8);if(t<0||r<=0)throw new Et.ErrnoError(28);if(0==(2097155&e.flags))throw new Et.ErrnoError(8);if(!Et.isFile(e.node.mode)&&!Et.isDir(e.node.mode))throw new Et.ErrnoError(43);if(!e.stream_ops.allocate)throw new Et.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 Et.ErrnoError(2);if(1==(2097155&e.flags))throw new Et.ErrnoError(2);if(!e.stream_ops.mmap)throw new Et.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 Et.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=Et.open(e,t.flags),o=Et.stat(e).size,i=new Uint8Array(o);return Et.read(n,i,0,o,0),"utf8"===t.encoding?r=q(i,0):"binary"===t.encoding&&(r=i),Et.close(n),r},writeFile:(e,t,r={})=>{r.flags=r.flags||577;var n=Et.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(V(t)+1),i=W(t,o,0,o.length);Et.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Et.write(n,t,0,t.byteLength,void 0,r.canOwn)}Et.close(n)},cwd:()=>Et.currentPath,chdir:e=>{var t=Et.lookupPath(e,{follow:!0});if(null===t.node)throw new Et.ErrnoError(44);if(!Et.isDir(t.node.mode))throw new Et.ErrnoError(54);var r=Et.nodePermissions(t.node,"x");if(r)throw new Et.ErrnoError(r);Et.currentPath=t.path},createDefaultDirectories:()=>{Et.mkdir("/tmp"),Et.mkdir("/home"),Et.mkdir("/home/web_user")},createDefaultDevices:()=>{Et.mkdir("/dev"),Et.registerDevice(Et.makedev(1,3),{read:()=>0,write:(e,t,r,n,o)=>n}),Et.mkdev("/dev/null",Et.makedev(1,3)),pt.register(Et.makedev(5,0),pt.default_tty_ops),pt.register(Et.makedev(6,0),pt.default_tty1_ops),Et.mkdev("/dev/tty",Et.makedev(5,0)),Et.mkdev("/dev/tty1",Et.makedev(6,0));var e=ft();Et.createDevice("/dev","random",e),Et.createDevice("/dev","urandom",e),Et.mkdir("/dev/shm"),Et.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Et.mkdir("/proc");var e=Et.mkdir("/proc/self");Et.mkdir("/proc/self/fd"),Et.mount({mount:()=>{var t=Et.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var r=+t,n=Et.getStream(r);if(!n)throw new Et.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?Et.createDevice("/dev","stdin",o.stdin):Et.symlink("/dev/tty","/dev/stdin"),o.stdout?Et.createDevice("/dev","stdout",null,o.stdout):Et.symlink("/dev/tty","/dev/stdout"),o.stderr?Et.createDevice("/dev","stderr",null,o.stderr):Et.symlink("/dev/tty1","/dev/stderr");var e=Et.open("/dev/stdin",0),t=Et.open("/dev/stdout",1),r=Et.open("/dev/stderr",1);N(0===e.fd,"invalid handle for stdin ("+e.fd+")"),N(1===t.fd,"invalid handle for stdout ("+t.fd+")"),N(2===r.fd,"invalid handle for stderr ("+r.fd+")")},ensureErrnoError:()=>{Et.ErrnoError||(Et.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,wt)if(wt[t]===e){this.code=t;break}},this.setErrno(e),this.message=_t[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=rt(this.stack))},Et.ErrnoError.prototype=new Error,Et.ErrnoError.prototype.constructor=Et.ErrnoError,[44].forEach((e=>{Et.genericErrors[e]=new Et.ErrnoError(e),Et.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{Et.ensureErrnoError(),Et.nameTable=new Array(4096),Et.mount(yt,{},"/"),Et.createDefaultDirectories(),Et.createDefaultDevices(),Et.createSpecialDirectories(),Et.filesystems={MEMFS:yt}},init:(e,t,r)=>{N(!Et.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)"),Et.init.initialized=!0,Et.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=t||o.stdout,o.stderr=r||o.stderr,Et.createStandardStreams()},quit:()=>{Et.init.initialized=!1,Vd();for(var e=0;e<Et.streams.length;e++){var t=Et.streams[e];t&&Et.close(t)}},getMode:(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:(e,t)=>{var r=Et.analyzePath(e,t);return r.exists?r.object:null},analyzePath:(e,t)=>{try{e=(n=Et.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=Et.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=dt.basename(e),n=Et.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:Et.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=dt.join2(e,i);try{Et.mkdir(a)}catch(e){}e=a}}return a},createFile:(e,t,r,n,o)=>{var i=dt.join2("string"==typeof e?e:Et.getPath(e),t),a=Et.getMode(n,o);return Et.create(i,a)},createDataFile:(e,t,r,n,o,i)=>{var a=t;e&&(e="string"==typeof e?e:Et.getPath(e),a=t?dt.join2(e,t):e);var s=Et.getMode(n,o),c=Et.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}Et.chmod(c,146|s);var f=Et.open(c,577);Et.write(f,r,0,r.length,0,i),Et.close(f),Et.chmod(c,s)}return c},createDevice:(e,t,r,n)=>{var o=dt.join2("string"==typeof e?e:Et.getPath(e),t),i=Et.getMode(!!r,!!n);Et.createDevice.major||(Et.createDevice.major=64);var a=Et.makedev(Et.createDevice.major++,0);return Et.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 Et.ErrnoError(29)}if(void 0===c&&0===a)throw new Et.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 Et.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),Et.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(!g)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=Bd(g(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new Et.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||[]):Bd(o.responseText||"",!0)})(t,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,E("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(!m)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=Et.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 Et.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,o)=>{Et.forceLoadFile(c);var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(N(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?mt.resolve(dt.join2(e,t)):e,d=qe("cp "+l);function f(r){function f(r){u&&u(),s||Et.createDataFile(e,t,r,n,o,c),i&&i(),We(d)}So.handledByPreloadPlugin(r,l,f,(()=>{a&&a(),We(d)}))||f(r)}Ge(d),"string"==typeof r?bt(r,(e=>f(e)),a):f(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=Et.indexedDB();try{var o=n.open(Et.DB_NAME(),Et.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=()=>{E("creating db"),o.result.createObjectStore(Et.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([Et.DB_STORE_NAME],"readwrite"),i=n.objectStore(Et.DB_STORE_NAME),a=0,s=0,c=e.length;function u(){0==s?t():r()}e.forEach((e=>{var t=i.put(Et.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=Et.indexedDB();try{var o=n.open(Et.DB_NAME(),Et.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=r,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([Et.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var a=i.objectStore(Et.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=()=>{Et.analyzePath(e).exists&&Et.unlink(e),Et.createDataFile(dt.dirname(e),dt.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:()=>{Ve("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:()=>{Ve("FS.createFolder has been removed; use FS.mkdir instead")},createLink:()=>{Ve("FS.createLink has been removed; use FS.symlink instead")},joinPath:()=>{Ve("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:()=>{Ve("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:()=>{Ve("FS.standardizePath has been removed; use PATH.normalize instead")}},xt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if("/"===t[0])return t;var n;if(-100===e)n=Et.cwd();else{var o=Et.getStream(e);if(!o)throw new Et.ErrnoError(8);n=o.path}if(0==t.length){if(!r)throw new Et.ErrnoError(44);return n}return dt.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&dt.normalize(t)!==dt.normalize(Et.getPath(e.node)))return-54;throw e}return Q[r>>2]=n.dev,Q[r+4>>2]=0,Q[r+8>>2]=n.ino,Q[r+12>>2]=n.mode,Q[r+16>>2]=n.nlink,Q[r+20>>2]=n.uid,Q[r+24>>2]=n.gid,Q[r+28>>2]=n.rdev,Q[r+32>>2]=0,ee[r+40>>3]=BigInt(n.size),Q[r+48>>2]=4096,Q[r+52>>2]=n.blocks,Q[r+56>>2]=n.atime.getTime()/1e3|0,Q[r+60>>2]=0,Q[r+64>>2]=n.mtime.getTime()/1e3|0,Q[r+68>>2]=0,Q[r+72>>2]=n.ctime.getTime()/1e3|0,Q[r+76>>2]=0,ee[r+80>>3]=BigInt(n.ino),0},doMsync:function(e,t,r,n,o){var i=Y.slice(e,e+r);Et.msync(t,i,o,r,n)},doMkdir:function(e,t){return"/"===(e=dt.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),Et.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 Et.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-28;var n=Et.readlink(e),o=Math.min(r,V(n)),i=$[t+o];return z(n,t,r+1),$[t+o]=i,o},doAccess:function(e,t){if(-8&t)return-28;var r=Et.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&&Et.nodePermissions(r,n)?-2:0},doDup:function(e,t,r){var n=Et.getStream(r);return n&&Et.close(n),Et.open(e,t,0,r,r).fd},doReadv:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=Q[t+8*i>>2],s=Q[t+(8*i+4)>>2],c=Et.read(e,$,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=Q[t+8*i>>2],s=Q[t+(8*i+4)>>2],c=Et.write(e,$,a,s,n);if(c<0)return-1;o+=c}return o},varargs:void 0,get:function(){return N(null!=xt.varargs),xt.varargs+=4,Q[xt.varargs-4>>2]},getStr:function(e){return G(e)},getStreamFromFD:function(e){var t=Et.getStream(e);if(!t)throw new Et.ErrnoError(8);return t},get64:function(e,t){return N(e>=0?0===t:-1===t),e}};function kt(e,t,r){xt.varargs=r;try{var n=xt.getStreamFromFD(e);switch(t){case 0:return(o=xt.get())<0?-28:Et.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=xt.get();return n.flags|=o,0;case 5:return o=xt.get(),X[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return lt(28),-1}}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function St(e,t){try{var r=xt.getStreamFromFD(e);return xt.doStat(Et.stat,r.path,t)}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function Tt(e,t,r,n){try{t=xt.getStr(t);var o=256&n,i=4096&n;return N(!(n&=-4353),n),t=xt.calculateAt(e,t,i),xt.doStat(o?Et.lstat:Et.stat,t,r)}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function Ct(e,t,r){try{var n=xt.getStreamFromFD(e);n.getdents||(n.getdents=Et.readdir(n.path));for(var o=280,i=0,a=Et.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=Et.lookupPath(n.path,{parent:!0}).node.id,u=4;else{var d=Et.lookupNode(n.node,l);c=d.id,u=Et.isChrdev(d.mode)?2:Et.isDir(d.mode)?4:Et.isLink(d.mode)?10:8}N(c),ee[t+i>>3]=BigInt(c),ee[t+i+8>>3]=BigInt((s+1)*o),X[t+i+16>>1]=280,$[t+i+18>>0]=u,z(l,t+i+19,256),i+=o,s+=1}return Et.llseek(n,s*o,0),i}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function Pt(e,t,r){xt.varargs=r;try{var n=xt.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=xt.get();return Q[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=xt.get(),Et.ioctl(n,t,o);default:Ve("bad ioctl syscall "+t)}}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function At(e,t){try{return e=xt.getStr(e),xt.doStat(Et.lstat,e,t)}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function Ft(e,t,r){xt.varargs=r;try{var n=xt.getStr(e),o=r?xt.get():0;return Et.open(n,t,o).fd}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function Dt(e,t){try{return e=xt.getStr(e),xt.doStat(Et.stat,e,t)}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function Lt(e,t){Ve("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function It(e,t){Ve("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}var Mt={};function Rt(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Ot(e){return this.fromWireType(Z[e>>2])}var Bt={},Ut={},Nt={},jt=48,qt=57;function Gt(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=jt&&t<=qt?"_"+e:e}function Wt(e,t){return e=Gt(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function zt(e,t){var r=Wt(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 Vt=void 0;function Ht(e){throw new Vt(e)}function $t(e,t,r){function n(t){var n=r(t);n.length!==e.length&&Ht("Mismatched type converter count");for(var o=0;o<e.length;++o)nr(e[o],n[o])}e.forEach((function(e){Nt[e]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(e,t){Ut.hasOwnProperty(e)?o[t]=Ut[e]:(i.push(e),Bt.hasOwnProperty(e)||(Bt[e]=[]),Bt[e].push((function(){o[t]=Ut[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Yt(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;$t([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)),Rt(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:Ot,destructorFunction:a}]}))}var Xt={};function Kt(e){var t=Xt[e];delete Xt[e];var r=t.rawConstructor,n=t.rawDestructor,o=t.fields;$t([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)),Rt(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:Ot,destructorFunction:n}]}))}function Qt(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function Zt(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Jt=e}var Jt=void 0;function er(e){for(var t="",r=e;Y[r];)t+=Jt[Y[r++]];return t}var tr=void 0;function rr(e){throw new tr(e)}function nr(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||rr('type "'+n+'" must have a positive integer typeid pointer'),Ut.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;rr("Cannot register type '"+n+"' twice")}if(Ut[e]=t,delete Nt[e],Bt.hasOwnProperty(e)){var o=Bt[e];delete Bt[e],o.forEach((function(e){e()}))}}function or(e,t,r){switch(t){case 0:return r?function(e){return $[e]}:function(e){return Y[e]};case 1:return r?function(e){return X[e>>1]}:function(e){return K[e>>1]};case 2:return r?function(e){return Q[e>>2]}:function(e){return Z[e>>2]};case 3:return r?function(e){return ee[e>>3]}:function(e){return te[e>>3]};default:throw new TypeError("Unknown integer type: "+e)}}function ir(e,t,r,n,o){t=er(t);var i=ar(r),a=-1!=t.indexOf("u");a&&(o=(BigInt(1)<<BigInt(64))-BigInt(1)),nr(e,{name:t,fromWireType:function(e){return e},toWireType:function(e,r){if("bigint"!=typeof r)throw new TypeError('Cannot convert "'+Qt(r)+'" to '+this.name);if(r<n||r>o)throw new TypeError('Passing a number "'+Qt(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:or(t,i,!a),destructorFunction:null})}function ar(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 sr(e,t,r,n,o){var i=ar(r);nr(e,{name:t=er(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=$;else if(2===r)n=X;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=Q}return this.fromWireType(n[e>>i])},destructorFunction:null})}function cr(e){if(!(this instanceof Rr))return!1;if(!(e instanceof Rr))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 ur(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function lr(e){rr(e.$$.ptrType.registeredClass.name+" instance already deleted")}var dr=!1;function fr(e){}function mr(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function pr(e){e.count.value-=1,0===e.count.value&&mr(e)}function hr(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=hr(e,t,r.baseClass);return null===n?null:r.downcast(n)}var gr={};function vr(){return Object.keys(kr).length}function yr(){var e=[];for(var t in kr)kr.hasOwnProperty(t)&&e.push(kr[t]);return e}var br=[];function _r(){for(;br.length;){var e=br.pop();e.$$.deleteScheduled=!1,e.delete()}}var wr=void 0;function Er(e){wr=e,br.length&&wr&&wr(_r)}function xr(){o.getInheritedInstanceCount=vr,o.getLiveInheritedInstances=yr,o.flushPendingDeletes=_r,o.setDelayFunction=Er}var kr={};function Sr(e,t){for(void 0===t&&rr("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function Tr(e,t){return t=Sr(e,t),kr[t]}function Cr(e,t){return t.ptrType&&t.ptr||Ht("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Ht("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ar(Object.create(e,{$$:{value:t}}))}function Pr(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Tr(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?Cr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Cr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=gr[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var c=hr(t,this.registeredClass,i.registeredClass);return null===c?o.call(this):this.isSmartPointer?Cr(i.registeredClass.instancePrototype,{ptrType:i,ptr:c,smartPtrType:this,smartPtr:e}):Cr(i.registeredClass.instancePrototype,{ptrType:i,ptr:c})}function Ar(e){return"undefined"==typeof FinalizationRegistry?(Ar=e=>e,e):(dr=new FinalizationRegistry((e=>{console.warn(e.leakWarning.stack.replace(/^Error: /,"")),pr(e.$$)})),Ar=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,Pr),dr.register(e,r,e)}return e},fr=e=>dr.unregister(e),Ar(e))}function Fr(){if(this.$$.ptr||lr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Ar(Object.create(Object.getPrototypeOf(this),{$$:{value:ur(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Dr(){this.$$.ptr||lr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&rr("Object already scheduled for deletion"),fr(this),pr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Lr(){return!this.$$.ptr}function Ir(){return this.$$.ptr||lr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&rr("Object already scheduled for deletion"),br.push(this),1===br.length&&wr&&wr(_r),this.$$.deleteScheduled=!0,this}function Mr(){Rr.prototype.isAliasOf=cr,Rr.prototype.clone=Fr,Rr.prototype.delete=Dr,Rr.prototype.isDeleted=Lr,Rr.prototype.deleteLater=Ir}function Rr(){}function Or(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||rr("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 Br(e,t,r){o.hasOwnProperty(e)?((void 0===r||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[r])&&rr("Cannot register public name '"+e+"' twice"),Or(o,e,e),o.hasOwnProperty(r)&&rr("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 Ur(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 Nr(e,t,r){for(;t!==r;)t.upcast||rr("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function jr(e,t){if(null===t)return this.isReference&&rr("null is not a valid "+this.name),0;t.$$||rr('Cannot pass "'+Qt(t)+'" as a '+this.name),t.$$.ptr||rr("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return Nr(t.$$.ptr,r,this.registeredClass)}function qr(e,t){var r;if(null===t)return this.isReference&&rr("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||rr('Cannot pass "'+Qt(t)+'" as a '+this.name),t.$$.ptr||rr("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&rr("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=Nr(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&rr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:rr("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,fn.toHandle((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:rr("Unsupporting sharing policy")}return r}function Gr(e,t){if(null===t)return this.isReference&&rr("null is not a valid "+this.name),0;t.$$||rr('Cannot pass "'+Qt(t)+'" as a '+this.name),t.$$.ptr||rr("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&rr("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return Nr(t.$$.ptr,r,this.registeredClass)}function Wr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function zr(e){this.rawDestructor&&this.rawDestructor(e)}function Vr(e){null!==e&&e.delete()}function Hr(){$r.prototype.getPointee=Wr,$r.prototype.destructor=zr,$r.prototype.argPackAdvance=8,$r.prototype.readValueFromPointer=Ot,$r.prototype.deleteObject=Vr,$r.prototype.fromWireType=Pr}function $r(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=qr:n?(this.toWireType=jr,this.destructorFunction=null):(this.toWireType=Gr,this.destructorFunction=null)}function Yr(e,t,r){o.hasOwnProperty(e)||Ht("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 Xr(e,t){e=er(e);var r=ot(t);return"function"!=typeof r&&rr("unknown function pointer with signature "+e+": "+t),r}var Kr=void 0;function Qr(e){var t=zd(e),r=er(t);return Gd(t),r}function Zr(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||Ut[t]||(Nt[t]?Nt[t].forEach(e):(r.push(t),n[t]=!0))})),new Kr(e+": "+r.map(Qr).join([", "]))}function Jr(e,t,r,n,o,i,a,s,c,u,l,d,f){l=er(l),i=Xr(o,i),s&&(s=Xr(a,s)),u&&(u=Xr(c,u)),f=Xr(d,f);var m=Gt(l);Br(m,(function(){Zr("Cannot construct "+l+" due to unbound types",[n])})),$t([e,t,r],n?[n]:[],(function(t){var r,o;t=t[0],o=n?(r=t.registeredClass).instancePrototype:Rr.prototype;var a=Wt(m,(function(){if(Object.getPrototypeOf(this)!==c)throw new tr("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new tr(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new tr("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 Ur(l,a,c,f,r,i,s,u),p=new $r(l,d,!0,!1,!1),h=new $r(l+"*",d,!1,!1,!1),g=new $r(l+" const*",d,!1,!0,!1);return gr[e]={pointerType:h,constPointerType:g},Yr(m,a),[p,h,g]}))}function en(e,t){for(var r=[],n=0;n<e;n++)r.push(Q[(t>>2)+n]);return r}function tn(e,t,r,n,o,i){N(t>0);var a=en(t,r);o=Xr(n,o),$t([],[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 tr("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]=()=>{Zr("Cannot construct "+e.name+" due to unbound types",a)},$t([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=nn(r,n,null,o,i),[]})),[]}))}function rn(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=Wt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,o=e.apply(n,t);return o instanceof Object?o:n}function nn(e,t,r,n,o){var i=t.length;i<2&&rr("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,s=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){s=!0;break}var u="void"!==t[0].name,l="",d="";for(c=0;c<i-2;++c)l+=(0!==c?", ":"")+"arg"+c,d+=(0!==c?", ":"")+"arg"+c+"Wired";var f="return function "+Gt(e)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(f+="var destructors = [];\n");var m=s?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],h=[rr,n,o,Rt,t[0],t[1]];for(a&&(f+="var thisWired = classParam.toWireType("+m+", this);\n"),c=0;c<i-2;++c)f+="var arg"+c+"Wired = argType"+c+".toWireType("+m+", arg"+c+"); // "+t[c+2].name+"\n",p.push("argType"+c),h.push(t[c+2]);if(a&&(d="thisWired"+(d.length>0?", ":"")+d),f+=(u?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",s)f+="runDestructors(destructors);\n";else for(c=a?1:2;c<t.length;++c){var g=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(f+=g+"_dtor("+g+"); // "+t[c].name+"\n",p.push(g+"_dtor"),h.push(t[c].destructorFunction))}return u&&(f+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),f+="}\n",p.push(f),rn(Function,p).apply(null,h)}function on(e,t,r,n,o,i,a,s){var c=en(r,n);t=er(t),i=Xr(o,i),$t([],[e],(function(e){var n=(e=e[0]).name+"."+t;function o(){Zr("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):(Or(u,t,n),u[t].overloadTable[r-2]=o),$t([],c,(function(o){var s=nn(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 an=[],sn=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function cn(e){e>4&&0==--sn[e].refcount&&(sn[e]=void 0,an.push(e))}function un(){for(var e=0,t=5;t<sn.length;++t)void 0!==sn[t]&&++e;return e}function ln(){for(var e=5;e<sn.length;++e)if(void 0!==sn[e])return sn[e];return null}function dn(){o.count_emval_handles=un,o.get_first_emval=ln}var fn={toValue:function(e){return e||rr("Cannot use deleted val. handle = "+e),sn[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=an.length?an.pop():sn.length;return sn[t]={refcount:1,value:e},t}}};function mn(e,t){nr(e,{name:t=er(t),fromWireType:function(e){var t=fn.toValue(e);return cn(e),t},toWireType:function(e,t){return fn.toHandle(t)},argPackAdvance:8,readValueFromPointer:Ot,destructorFunction:null})}function pn(e,t,r){switch(t){case 0:return function(e){var t=r?$:Y;return this.fromWireType(t[e])};case 1:return function(e){var t=r?X:K;return this.fromWireType(t[e>>1])};case 2:return function(e){var t=r?Q:Z;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function hn(e,t,r,n){var o=ar(r);function i(){}t=er(t),i.values={},nr(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:pn(t,o,n),destructorFunction:null}),Br(t,i)}function gn(e,t){var r=Ut[e];return void 0===r&&rr(t+" has unknown type "+Qr(e)),r}function vn(e,t,r){var n=gn(e,"enum");t=er(t);var o=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Wt(n.name+"_"+t,(function(){}))}});o.values[r]=i,o[t]=i}function yn(e,t){switch(t){case 2:return function(e){return this.fromWireType(J[e>>2])};case 3:return function(e){return this.fromWireType(re[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function bn(e,t,r){var n=ar(r);nr(e,{name:t=er(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+Qt(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:yn(t,n),destructorFunction:null})}function _n(e,t,r,n,o,i){var a=en(t,r);e=er(e),o=Xr(n,o),Br(e,(function(){Zr("Cannot call "+e+" due to unbound types",a)}),t-1),$t([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return Yr(e,nn(e,n,null,o,i),t-1),[]}))}function wn(e,t,r,n,o){t=er(t),-1===o&&(o=4294967295);var i=ar(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 "'+Qt(e)+'" to '+r);if(e<n||e>o)throw new TypeError('Passing a number "'+Qt(e)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!")};nr(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:or(t,i,0!==n),destructorFunction:null})}function En(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(H,o,r)}nr(e,{name:r=er(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function xn(e,t,r,n,o,i,a,s,c,u,l,d){r=er(r),i=Xr(o,i),s=Xr(a,s),u=Xr(c,u),d=Xr(l,d),$t([e],[t],(function(e){return e=e[0],[new $r(r,e.registeredClass,!1,!1,!0,e,n,i,s,u,d)]}))}function kn(e,t){var r="std::string"===(t=er(t));nr(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==Y[a]){var s=G(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(Y[e+4+i]);t=c.join("")}return Gd(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||rr("Cannot pass non-string to std::string");var o=(r&&n?()=>V(t):()=>t.length)(),i=qd(4+o+1);if(Z[i>>2]=o,r&&n)z(t,i+4,o+1);else if(n)for(var a=0;a<o;++a){var s=t.charCodeAt(a);s>255&&(Gd(i),rr("String has UTF-16 code units that do not fit in 8 bits")),Y[i+4+a]=s}else for(a=0;a<o;++a)Y[i+4+a]=t[a];return null!==e&&e.push(Gd,i),i},argPackAdvance:8,readValueFromPointer:Ot,destructorFunction:function(e){Gd(e)}})}function Sn(e,t,r){var n,o,i,a,s;r=er(r),2===t?(n=oe,o=ie,a=ae,i=()=>K,s=1):4===t&&(n=se,o=ce,a=ue,i=()=>Z,s=2),nr(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 Gd(e),r},toWireType:function(e,n){"string"!=typeof n&&rr("Cannot pass non-string to C++ string type "+r);var i=a(n),c=qd(4+i+t);return Z[c>>2]=i>>s,o(n,c+4,i+t),null!==e&&e.push(Gd,c),c},argPackAdvance:8,readValueFromPointer:Ot,destructorFunction:function(e){Gd(e)}})}function Tn(e,t,r,n,o,i){Mt[e]={name:er(t),rawConstructor:Xr(r,n),rawDestructor:Xr(o,i),elements:[]}}function Cn(e,t,r,n,o,i,a,s,c){Mt[e].elements.push({getterReturnType:t,getter:Xr(r,n),getterContext:o,setterArgumentType:i,setter:Xr(a,s),setterContext:c})}function Pn(e,t,r,n,o,i){Xt[e]={name:er(t),rawConstructor:Xr(r,n),rawDestructor:Xr(o,i),fields:[]}}function An(e,t,r,n,o,i,a,s,c,u){Xt[e].fields.push({fieldName:er(t),getterReturnType:r,getter:Xr(n,o),getterContext:i,setterArgumentType:a,setter:Xr(s,c),setterContext:u})}function Fn(e,t){nr(e,{isVoid:!0,name:t=er(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})}function Dn(){throw 1/0}function Ln(e,t,r){e=fn.toValue(e),t=gn(t,"emval::as");var n=[],o=fn.toHandle(n);return Q[r>>2]=o,t.toWireType(n,e)}function In(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=gn(Q[(t>>2)+n],"parameter "+n);return r}function Mn(e,t,r,n){e=fn.toValue(e);for(var o=In(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 fn.toHandle(c)}function Rn(e){var t=[];return Q[e>>2]=fn.toHandle(t),t}var On={};function Bn(e){var t=On[e];return void 0===t?er(e):t}var Un=[];function Nn(e,t,r,n,o){return(e=Un[e])(t=fn.toValue(t),r=Bn(r),Rn(n),o)}function jn(e,t,r,n){(e=Un[e])(t=fn.toValue(t),r=Bn(r),null,n)}function qn(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Gn(e){return 0===e?fn.toHandle(qn()):(e=Bn(e),fn.toHandle(qn()[e]))}function Wn(e){var t=Un.length;return Un.push(e),t}var zn=[];function Vn(e,t){var r=In(e,t),n=r[0],o=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",i=zn[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 "+Gt("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=Wn(rn(Function,a).apply(null,s)),zn[o]=i,i}function Hn(e,t){return e=fn.toValue(e),t=fn.toValue(t),fn.toHandle(e[t])}function $n(e){e>4&&(sn[e].refcount+=1)}function Yn(e,t){return(e=fn.toValue(e))instanceof fn.toValue(t)}function Xn(e){return"number"==typeof(e=fn.toValue(e))}function Kn(e){return"string"==typeof(e=fn.toValue(e))}function Qn(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)(gn,o,fn.toHandle)}var Zn,Jn={};function eo(e,t,r,n){e=fn.toValue(e);var o=Jn[t];return o||(o=Qn(t),Jn[t]=o),o(e,r,n)}function to(){return fn.toHandle([])}function ro(e){return fn.toHandle(Bn(e))}function no(){return fn.toHandle({})}function oo(e){Rt(fn.toValue(e)),cn(e)}function io(e,t,r){e=fn.toValue(e),t=fn.toValue(t),r=fn.toValue(r),e[t]=r}function ao(e,t){var r=(e=gn(e,"_emval_take_value")).readValueFromPointer(t);return fn.toHandle(r)}function so(e){throw fn.toValue(e)}function co(e,t){var r=new Date(1e3*Q[e>>2]);Q[t>>2]=r.getUTCSeconds(),Q[t+4>>2]=r.getUTCMinutes(),Q[t+8>>2]=r.getUTCHours(),Q[t+12>>2]=r.getUTCDate(),Q[t+16>>2]=r.getUTCMonth(),Q[t+20>>2]=r.getUTCFullYear()-1900,Q[t+24>>2]=r.getUTCDay();var n=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),o=(r.getTime()-n)/864e5|0;Q[t+28>>2]=o}function uo(e,t){var r=new Date(1e3*Q[e>>2]);Q[t>>2]=r.getSeconds(),Q[t+4>>2]=r.getMinutes(),Q[t+8>>2]=r.getHours(),Q[t+12>>2]=r.getDate(),Q[t+16>>2]=r.getMonth(),Q[t+20>>2]=r.getFullYear()-1900,Q[t+24>>2]=r.getDay();var n=new Date(r.getFullYear(),0,1),o=(r.getTime()-n.getTime())/864e5|0;Q[t+28>>2]=o,Q[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));Q[t+32>>2]=s}function lo(e){var t=new Date(Q[e+20>>2]+1900,Q[e+16>>2],Q[e+12>>2],Q[e+8>>2],Q[e+4>>2],Q[e>>2],0),r=Q[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)Q[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))}Q[e+24>>2]=t.getDay();var l=(t.getTime()-o.getTime())/864e5|0;return Q[e+28>>2]=l,Q[e>>2]=t.getSeconds(),Q[e+4>>2]=t.getMinutes(),Q[e+8>>2]=t.getHours(),Q[e+12>>2]=t.getDate(),Q[e+16>>2]=t.getMonth(),t.getTime()/1e3|0}function fo(e,t,r,n,o,i,a,s){try{var c=Et.getStream(o);if(!c)return-8;var u=Et.mmap(c,e,t,i,r,n),l=u.ptr;return Q[a>>2]=u.allocated,l}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function mo(e,t,r,n,o,i){try{var a=Et.getStream(o);a&&(2&r&&xt.doMsync(e,a,t,n,i),Et.munmap(a))}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function po(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"}Q[e>>2]=60*c,Q[t>>2]=Number(a!=s);var l=u(o),d=u(i),f=le(l),m=le(d);s<a?(Q[r>>2]=f,Q[r+4>>2]=m):(Q[r>>2]=m,Q[r+4>>2]=f)}function ho(e,t,r){ho.called||(ho.called=!0,po(e,t,r))}function go(){Ve("native code called abort()")}Zn=()=>performance.now();var vo=!0;function yo(e,t){var r;if(0===e)r=Date.now();else{if(1!==e&&4!==e||!vo)return lt(28),-1;r=Zn()}return Q[t>>2]=r/1e3|0,Q[t+4>>2]=r%1e3*1e3*1e3|0,0}function bo(e,t){if(So.mainLoop.timingMode=e,So.mainLoop.timingValue=t,!So.mainLoop.func)return x("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(So.mainLoop.running||(So.mainLoop.running=!0),0==e)So.mainLoop.scheduler=function(){var e=0|Math.max(0,So.mainLoop.tickStartTime+t-Zn());setTimeout(So.mainLoop.runner,e)},So.mainLoop.method="timeout";else if(1==e)So.mainLoop.scheduler=function(){So.requestAnimationFrame(So.mainLoop.runner)},So.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),m?(void 0===o.setImmediates&&(o.setImmediates=[]),o.setImmediates.push(e),postMessage({target:n})):postMessage(n,"*")}}So.mainLoop.scheduler=function(){setImmediate(So.mainLoop.runner)},So.mainLoop.method="immediate"}return 0}function _o(e){bf(e)}function wo(){if(!Pe())try{_o(B)}catch(e){it(e)}}function Eo(e,t,r,n,i){N(!So.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."),So.mainLoop.func=e,So.mainLoop.arg=n;var a=So.mainLoop.currentlyRunningMainloop;function s(){return!(a<So.mainLoop.currentlyRunningMainloop&&(wo(),1))}if(So.mainLoop.running=!1,So.mainLoop.runner=function(){if(!U)if(So.mainLoop.queue.length>0){var t=Date.now(),r=So.mainLoop.queue.shift();if(r.func(r.arg),So.mainLoop.remainingBlockers){var n=So.mainLoop.remainingBlockers,i=n%1==0?n-1:Math.floor(n);r.counted?So.mainLoop.remainingBlockers=i:(i+=.5,So.mainLoop.remainingBlockers=(8*n+i)/9)}if(E('main loop blocker "'+r.name+'" took '+(Date.now()-t)+" ms"),So.mainLoop.updateStatus(),!s())return;setTimeout(So.mainLoop.runner,0)}else s()&&(So.mainLoop.currentFrameNumber=So.mainLoop.currentFrameNumber+1|0,1==So.mainLoop.timingMode&&So.mainLoop.timingValue>1&&So.mainLoop.currentFrameNumber%So.mainLoop.timingValue!=0?So.mainLoop.scheduler():(0==So.mainLoop.timingMode&&(So.mainLoop.tickStartTime=Zn()),"timeout"===So.mainLoop.method&&o.ctx&&(k("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!"),So.mainLoop.method=""),So.mainLoop.runIter(e),be(),s()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),So.mainLoop.scheduler())))},i||(t&&t>0?bo(0,1e3/t):bo(1,1),So.mainLoop.scheduler()),r)throw"unwind"}function xo(e,t){if(Te||U)x("user callback triggered after runtime exited or application aborted. Ignoring.");else if(t)e();else try{e()}catch(e){it(e)}}function ko(e,t){return setTimeout((function(){xo(e)}),t)}var So={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){So.mainLoop.scheduler=null,So.mainLoop.currentlyRunningMainloop++},resume:function(){So.mainLoop.currentlyRunningMainloop++;var e=So.mainLoop.timingMode,t=So.mainLoop.timingValue,r=So.mainLoop.func;So.mainLoop.func=null,Eo(r,0,!1,So.mainLoop.arg,!0),bo(e,t),So.mainLoop.scheduler()},updateStatus:function(){if(o.setStatus){var e=o.statusMessage||"Please wait...",t=So.mainLoop.remainingBlockers,r=So.mainLoop.expectedBlockers;t?t<r?o.setStatus(e+" ("+(r-t)+"/"+r+")"):o.setStatus(e):o.setStatus("")}},runIter:function(e){if(!U){if(o.preMainLoop&&!1===o.preMainLoop())return;xo(e),o.postMainLoop&&o.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(o.preloadPlugins||(o.preloadPlugins=[]),!So.initted){So.initted=!0;try{new Blob,So.hasBlobConstructor=!0}catch(e){So.hasBlobConstructor=!1,E("warning: no blob constructor, cannot create blobs with mimetypes")}So.BlobBuilder="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:So.hasBlobConstructor?null:E("warning: no BlobBuilder"),So.URLObject="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,o.noImageDecoding||void 0!==So.URLObject||(E("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(So.hasBlobConstructor)try{(i=new Blob([e],{type:So.getMimetype(t)})).size!==e.length&&(i=new Blob([new Uint8Array(e).buffer],{type:So.getMimetype(t)}))}catch(e){k("Blob constructor present but fails: "+e+"; falling back to blob builder")}if(!i){var a=new So.BlobBuilder;a.append(new Uint8Array(e).buffer),i=a.getBlob()}var s=So.URLObject.createObjectURL(i);N("string"==typeof s,"createObjectURL must return a url as a string");var c=new Image;c.onload=()=>{N(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,So.URLObject.revokeObjectURL(s),r&&r(e)},c.onerror=e=>{E("Image "+s+" could not be decoded"),n&&n()},c.src=s}};o.preloadPlugins.push(e);var t={canHandle:function(e){return!o.noAudioDecoding&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(e,t,r,n){var i=!1;function a(n){i||(i=!0,o.preloadedAudios[t]=n,r&&r(e))}function s(){i||(i=!0,o.preloadedAudios[t]=new Audio,n&&n())}if(!So.hasBlobConstructor)return s();try{var c=new Blob([e],{type:So.getMimetype(t)})}catch(e){return s()}var u=So.URLObject.createObjectURL(c);N("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||(E("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,ko((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){!So.pointerLock&&o.canvas.requestPointerLock&&(o.canvas.requestPointerLock(),e.preventDefault())}),!1))}function n(){So.pointerLock=document.pointerLockElement===o.canvas||document.mozPointerLockElement===o.canvas||document.webkitPointerLockElement===o.canvas||document.msPointerLockElement===o.canvas}},handledByPreloadPlugin:function(e,t,r,n){So.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||N(void 0===Fd,"cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),o.ctx=i,t&&Mo.makeContextCurrent(a),o.useWebGL=t,So.moduleContextCreatedCallbacks.forEach((function(e){e()})),So.init()),i):null},destroyContext:function(e,t,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(e,t){So.lockPointer=e,So.resizeCanvas=t,void 0===So.lockPointer&&(So.lockPointer=!0),void 0===So.resizeCanvas&&(So.resizeCanvas=!1);var r=o.canvas;function n(){So.isFullscreen=!1;var e=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(r.exitFullscreen=So.exitFullscreen,So.lockPointer&&r.requestPointerLock(),So.isFullscreen=!0,So.resizeCanvas?So.setFullscreenCanvasSize():So.updateCanvasDimensions(r)):(e.parentNode.insertBefore(r,e),e.parentNode.removeChild(e),So.resizeCanvas?So.setWindowedCanvasSize():So.updateCanvasDimensions(r)),o.onFullScreen&&o.onFullScreen(So.isFullscreen),o.onFullscreen&&o.onFullscreen(So.isFullscreen)}So.fullscreenHandlersInstalled||(So.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(){Ve("Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)")},exitFullscreen:function(){return!!So.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===So.nextRAF)So.nextRAF=t+1e3/60;else for(;t+2>=So.nextRAF;)So.nextRAF+=1e3/60;var r=Math.max(So.nextRAF-t,0);setTimeout(e,r)},requestAnimationFrame:function(e){"function"!=typeof requestAnimationFrame?(0,So.fakeRequestAnimationFrame)(e):requestAnimationFrame(e)},safeSetTimeout:function(e){return ko(e)},safeRequestAnimationFrame:function(e){return So.requestAnimationFrame((function(){xo(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(So.pointerLock)"mousemove"!=e.type&&"mozMovementX"in e?So.mouseMovementX=So.mouseMovementY=0:(So.mouseMovementX=So.getMovementX(e),So.mouseMovementY=So.getMovementY(e)),"undefined"!=typeof SDL?(So.mouseX=SDL.mouseX+So.mouseMovementX,So.mouseY=SDL.mouseY+So.mouseMovementY):(So.mouseX+=So.mouseMovementX,So.mouseY+=So.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(N(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)So.lastTouches[s.identifier]=l,So.touches[s.identifier]=l;else if("touchend"===e.type||"touchmove"===e.type){var d=So.touches[s.identifier];d||(d=l),So.lastTouches[s.identifier]=d,So.touches[s.identifier]=l}return}var f=e.pageX-(i+t.left),m=e.pageY-(a+t.top);f*=r/t.width,m*=n/t.height,So.mouseMovementX=f-So.mouseX,So.mouseMovementY=m-So.mouseY,So.mouseX=f,So.mouseY=m}},resizeListeners:[],updateResizeListeners:function(){var e=o.canvas;So.resizeListeners.forEach((function(t){t(e.width,e.height)}))},setCanvasSize:function(e,t,r){var n=o.canvas;So.updateCanvasDimensions(n,e,t),r||So.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if("undefined"!=typeof SDL){var e=Z[SDL.screen>>2];e|=8388608,Q[SDL.screen>>2]=e}So.updateCanvasDimensions(o.canvas),So.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var e=Z[SDL.screen>>2];e&=-8388609,Q[SDL.screen>>2]=e}So.updateCanvasDimensions(o.canvas),So.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)}So.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"))))}},To={errorCode:12288,defaultDisplayInitialized:!1,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:!1,depth:!1,stencil:!1,antialias:!1},stringCache:{},setErrorCode:function(e){To.errorCode=e},chooseConfig:function(e,t,r,n,o){if(62e3!=e)return To.setErrorCode(12296),0;if(t)for(;;){var i=Q[t>>2];if(12321==i){var a=Q[t+4>>2];To.contextAttributes.alpha=a>0}else if(12325==i){var s=Q[t+4>>2];To.contextAttributes.depth=s>0}else if(12326==i){var c=Q[t+4>>2];To.contextAttributes.stencil=c>0}else if(12337==i){var u=Q[t+4>>2];To.contextAttributes.antialias=u>0}else if(12338==i)u=Q[t+4>>2],To.contextAttributes.antialias=1==u;else if(12544==i){var l=Q[t+4>>2];To.contextAttributes.lowLatency=12547!=l}else if(12344==i)break;t+=8}return r&&n||o?(o&&(Q[o>>2]=1),r&&n>0&&(Q[r>>2]=62002),To.setErrorCode(12288),1):(To.setErrorCode(12300),0)}};function Co(e,t,r,n,o){return To.chooseConfig(e,t,r,n,o)}function Po(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 Ao(e){var t=e.getExtension("OES_vertex_array_object");if(t)return e.createVertexArray=function(){return t.createVertexArrayOES()},e.deleteVertexArray=function(e){t.deleteVertexArrayOES(e)},e.bindVertexArray=function(e){t.bindVertexArrayOES(e)},e.isVertexArray=function(e){return t.isVertexArrayOES(e)},1}function Fo(e){var t=e.getExtension("WEBGL_draw_buffers");if(t)return e.drawBuffers=function(e,r){t.drawBuffersWEBGL(e,r)},1}function Do(e){return!!(e.dibvbi=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function Lo(e){return!!(e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"))}function Io(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?Q[n+4*i>>2]:-1;o+=G(Q[r+4*i>>2],a<0?void 0:a)}return o},createContext:function(e,t){e.getContextSafariWebGL2Fixed||(e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=function(t,r){var n=e.getContextSafariWebGL2Fixed(t,r);return"webgl"==t==n instanceof WebGLRenderingContext?n:null});var r=t.majorVersion>1?e.getContext("webgl2",t):e.getContext("webgl",t);return r?Mo.registerContext(r,t):0},registerContext:function(e,t){var r=Mo.getNewId(Mo.contexts),n={handle:r,attributes:t,version:t.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),Mo.contexts[r]=n,(void 0===t.enableExtensionsByDefault||t.enableExtensionsByDefault)&&Mo.initExtensions(n),r},makeContextCurrent:function(e){return Mo.currentContext=Mo.contexts[e],o.ctx=Fd=Mo.currentContext&&Mo.currentContext.GLctx,!(e&&!Fd)},getContext:function(e){return Mo.contexts[e]},deleteContext:function(e){Mo.currentContext===Mo.contexts[e]&&(Mo.currentContext=null),"object"==typeof Zl&&Zl.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;Po(t),Ao(t),Fo(t),Do(t),Lo(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")),Io(t),(t.getSupportedExtensions()||[]).forEach((function(e){e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}};function Ro(e,t,r,n){if(62e3!=e)return To.setErrorCode(12296),0;for(var i=1;;){var a=Q[n>>2];if(12440!=a){if(12344==a)break;return To.setErrorCode(12292),0}i=Q[n+4>>2],n+=8}return i<2||i>3?(To.setErrorCode(12293),0):(To.contextAttributes.majorVersion=i-1,To.contextAttributes.minorVersion=0,To.context=Mo.createContext(o.canvas,To.contextAttributes),0!=To.context?(To.setErrorCode(12288),Mo.makeContextCurrent(To.context),o.useWebGL=!0,So.moduleContextCreatedCallbacks.forEach((function(e){e()})),Mo.makeContextCurrent(null),62004):(To.setErrorCode(12297),0))}function Oo(e,t,r,n){return 62e3!=e?(To.setErrorCode(12296),0):62002!=t?(To.setErrorCode(12293),0):(To.setErrorCode(12288),62006)}function Bo(e,t){return 62e3!=e?(To.setErrorCode(12296),0):62004!=t?(To.setErrorCode(12294),0):(Mo.deleteContext(To.context),To.setErrorCode(12288),To.currentContext==t&&(To.currentContext=0),1)}function Uo(e,t){return 62e3!=e?(To.setErrorCode(12296),0):62006!=t?(To.setErrorCode(12301),1):(To.currentReadSurface==t&&(To.currentReadSurface=0),To.currentDrawSurface==t&&(To.currentDrawSurface=0),To.setErrorCode(12288),1)}function No(e,t,r,n){if(62e3!=e)return To.setErrorCode(12296),0;if(62002!=t)return To.setErrorCode(12293),0;if(!n)return To.setErrorCode(12300),0;switch(To.setErrorCode(12288),r){case 12320:return Q[n>>2]=To.contextAttributes.alpha?32:24,1;case 12321:return Q[n>>2]=To.contextAttributes.alpha?8:0,1;case 12322:case 12323:case 12324:return Q[n>>2]=8,1;case 12325:return Q[n>>2]=To.contextAttributes.depth?24:0,1;case 12326:return Q[n>>2]=To.contextAttributes.stencil?8:0,1;case 12327:case 12335:case 12340:return Q[n>>2]=12344,1;case 12328:return Q[n>>2]=62002,1;case 12329:case 12333:case 12334:case 12345:case 12346:case 12347:case 12349:case 12350:case 12354:return Q[n>>2]=0,1;case 12330:case 12332:return Q[n>>2]=4096,1;case 12331:return Q[n>>2]=16777216,1;case 12337:return Q[n>>2]=To.contextAttributes.antialias?4:0,1;case 12338:return Q[n>>2]=To.contextAttributes.antialias?1:0,1;case 12339:case 12352:return Q[n>>2]=4,1;case 12341:case 12342:case 12343:return Q[n>>2]=-1,1;case 12348:return Q[n>>2]=1,1;case 12351:return Q[n>>2]=12430,1;default:return To.setErrorCode(12292),0}}function jo(e){return To.setErrorCode(12288),62e3}function qo(){return To.errorCode}function Go(e,t,r){return 62e3==e?(t&&(Q[t>>2]=1),r&&(Q[r>>2]=4),To.defaultDisplayInitialized=!0,To.setErrorCode(12288),1):(To.setErrorCode(12296),0)}function Wo(e,t,r,n){return 62e3!=e?(To.setErrorCode(12296),0):0!=n&&62004!=n?(To.setErrorCode(12294),0):0!=r&&62006!=r||0!=t&&62006!=t?(To.setErrorCode(12301),0):(Mo.makeContextCurrent(n?To.context:null),To.currentContext=n,To.currentDrawSurface=t,To.currentReadSurface=r,To.setErrorCode(12288),1)}function zo(){if(To.defaultDisplayInitialized)if(o.ctx){if(!o.ctx.isContextLost())return To.setErrorCode(12288),1;To.setErrorCode(12302)}else To.setErrorCode(12290);else To.setErrorCode(12289);return 0}function Vo(e){return 62e3!=e?(To.setErrorCode(12296),0):(To.currentContext=0,To.currentReadSurface=0,To.currentDrawSurface=0,To.defaultDisplayInitialized=!1,To.setErrorCode(12288),1)}function Ho(e){N("number"==typeof e),console.error(G(e))}function $o(e){N("number"==typeof e),console.log(G(e))}function Yo(e){N("number"==typeof e),console.warn(G(e))}function Xo(){}function Ko(){return 2147483648}function Qo(e){Fd.activeTexture(e)}function Zo(e,t){Fd.attachShader(Mo.programs[e],Mo.shaders[t])}function Jo(e,t){Fd.beginQuery(e,Mo.queries[t])}function ei(e,t){Fd.disjointTimerQueryExt.beginQueryEXT(e,Mo.queries[t])}function ti(e){Fd.beginTransformFeedback(e)}function ri(e,t,r){Fd.bindAttribLocation(Mo.programs[e],t,G(r))}function ni(e,t){35051==e?Fd.currentPixelPackBufferBinding=t:35052==e&&(Fd.currentPixelUnpackBufferBinding=t),Fd.bindBuffer(e,Mo.buffers[t])}function oi(e,t,r){Fd.bindBufferBase(e,t,Mo.buffers[r])}function ii(e,t,r,n,o){Fd.bindBufferRange(e,t,Mo.buffers[r],n,o)}function ai(e,t){Fd.bindFramebuffer(e,Mo.framebuffers[t])}function si(e,t){Fd.bindRenderbuffer(e,Mo.renderbuffers[t])}function ci(e,t){Fd.bindSampler(e,Mo.samplers[t])}function ui(e,t){Fd.bindTexture(e,Mo.textures[t])}function li(e,t){Fd.bindTransformFeedback(e,Mo.transformFeedbacks[t])}function di(e){Fd.bindVertexArray(Mo.vaos[e])}function fi(e){Fd.bindVertexArray(Mo.vaos[e])}function mi(e,t,r,n){Fd.blendColor(e,t,r,n)}function pi(e){Fd.blendEquation(e)}function hi(e,t){Fd.blendEquationSeparate(e,t)}function gi(e,t){Fd.blendFunc(e,t)}function vi(e,t,r,n){Fd.blendFuncSeparate(e,t,r,n)}function yi(e,t,r,n,o,i,a,s,c,u){Fd.blitFramebuffer(e,t,r,n,o,i,a,s,c,u)}function bi(e,t,r,n){Mo.currentContext.version>=2?r?Fd.bufferData(e,Y,n,r,t):Fd.bufferData(e,t,n):Fd.bufferData(e,r?Y.subarray(r,r+t):t,n)}function _i(e,t,r,n){Mo.currentContext.version>=2?Fd.bufferSubData(e,t,Y,n,r):Fd.bufferSubData(e,t,Y.subarray(n,n+r))}function wi(e){return Fd.checkFramebufferStatus(e)}function Ei(e){Fd.clear(e)}function xi(e,t,r,n){Fd.clearBufferfi(e,t,r,n)}function ki(e,t,r){Fd.clearBufferfv(e,t,J,r>>2)}function Si(e,t,r){Fd.clearBufferiv(e,t,Q,r>>2)}function Ti(e,t,r){Fd.clearBufferuiv(e,t,Z,r>>2)}function Ci(e,t,r,n){Fd.clearColor(e,t,r,n)}function Pi(e){Fd.clearDepth(e)}function Ai(e){Fd.clearStencil(e)}function Fi(e,t){return N(t===(0|t)),(e>>>0)+4294967296*t}function Di(e,t,r,n){return Fd.clientWaitSync(Mo.syncs[e],t,Fi(r,n))}function Li(e,t,r,n){Fd.colorMask(!!e,!!t,!!r,!!n)}function Ii(e){Fd.compileShader(Mo.shaders[e])}function Mi(e,t,r,n,o,i,a,s){Mo.currentContext.version>=2?Fd.currentPixelUnpackBufferBinding?Fd.compressedTexImage2D(e,t,r,n,o,i,a,s):Fd.compressedTexImage2D(e,t,r,n,o,i,Y,s,a):Fd.compressedTexImage2D(e,t,r,n,o,i,s?Y.subarray(s,s+a):null)}function Ri(e,t,r,n,o,i,a,s,c){Fd.currentPixelUnpackBufferBinding?Fd.compressedTexImage3D(e,t,r,n,o,i,a,s,c):Fd.compressedTexImage3D(e,t,r,n,o,i,a,Y,c,s)}function Oi(e,t,r,n,o,i,a,s,c){Mo.currentContext.version>=2?Fd.currentPixelUnpackBufferBinding?Fd.compressedTexSubImage2D(e,t,r,n,o,i,a,s,c):Fd.compressedTexSubImage2D(e,t,r,n,o,i,a,Y,c,s):Fd.compressedTexSubImage2D(e,t,r,n,o,i,a,c?Y.subarray(c,c+s):null)}function Bi(e,t,r,n,o,i,a,s,c,u,l){Fd.currentPixelUnpackBufferBinding?Fd.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,u,l):Fd.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,Y,l,u)}function Ui(e,t,r,n,o){Fd.copyBufferSubData(e,t,r,n,o)}function Ni(e,t,r,n,o,i,a,s){Fd.copyTexImage2D(e,t,r,n,o,i,a,s)}function ji(e,t,r,n,o,i,a,s){Fd.copyTexSubImage2D(e,t,r,n,o,i,a,s)}function qi(e,t,r,n,o,i,a,s,c){Fd.copyTexSubImage3D(e,t,r,n,o,i,a,s,c)}function Gi(){var e=Mo.getNewId(Mo.programs),t=Fd.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,Mo.programs[e]=t,e}function Wi(e){var t=Mo.getNewId(Mo.shaders);return Mo.shaders[t]=Fd.createShader(e),t}function zi(e){Fd.cullFace(e)}function Vi(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2],o=Mo.buffers[n];o&&(Fd.deleteBuffer(o),o.name=0,Mo.buffers[n]=null,n==Fd.currentPixelPackBufferBinding&&(Fd.currentPixelPackBufferBinding=0),n==Fd.currentPixelUnpackBufferBinding&&(Fd.currentPixelUnpackBufferBinding=0))}}function Hi(e,t){for(var r=0;r<e;++r){var n=Q[t+4*r>>2],o=Mo.framebuffers[n];o&&(Fd.deleteFramebuffer(o),o.name=0,Mo.framebuffers[n]=null)}}function $i(e){if(e){var t=Mo.programs[e];t?(Fd.deleteProgram(t),t.name=0,Mo.programs[e]=null):Mo.recordError(1281)}}function Yi(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2],o=Mo.queries[n];o&&(Fd.deleteQuery(o),Mo.queries[n]=null)}}function Xi(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2],o=Mo.queries[n];o&&(Fd.disjointTimerQueryExt.deleteQueryEXT(o),Mo.queries[n]=null)}}function Ki(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2],o=Mo.renderbuffers[n];o&&(Fd.deleteRenderbuffer(o),o.name=0,Mo.renderbuffers[n]=null)}}function Qi(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2],o=Mo.samplers[n];o&&(Fd.deleteSampler(o),o.name=0,Mo.samplers[n]=null)}}function Zi(e){if(e){var t=Mo.shaders[e];t?(Fd.deleteShader(t),Mo.shaders[e]=null):Mo.recordError(1281)}}function Ji(e){if(e){var t=Mo.syncs[e];t?(Fd.deleteSync(t),t.name=0,Mo.syncs[e]=null):Mo.recordError(1281)}}function ea(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2],o=Mo.textures[n];o&&(Fd.deleteTexture(o),o.name=0,Mo.textures[n]=null)}}function ta(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2],o=Mo.transformFeedbacks[n];o&&(Fd.deleteTransformFeedback(o),o.name=0,Mo.transformFeedbacks[n]=null)}}function ra(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2];Fd.deleteVertexArray(Mo.vaos[n]),Mo.vaos[n]=null}}function na(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2];Fd.deleteVertexArray(Mo.vaos[n]),Mo.vaos[n]=null}}function oa(e){Fd.depthFunc(e)}function ia(e){Fd.depthMask(!!e)}function aa(e,t){Fd.depthRange(e,t)}function sa(e,t){Fd.detachShader(Mo.programs[e],Mo.shaders[t])}function ca(e){Fd.disable(e)}function ua(e){Fd.disableVertexAttribArray(e)}function la(e,t,r){Fd.drawArrays(e,t,r)}function da(e,t,r,n){Fd.drawArraysInstanced(e,t,r,n)}function fa(e,t,r,n){Fd.drawArraysInstanced(e,t,r,n)}function ma(e,t,r,n){Fd.drawArraysInstanced(e,t,r,n)}function pa(e,t,r,n,o){Fd.dibvbi.drawArraysInstancedBaseInstanceWEBGL(e,t,r,n,o)}function ha(e,t,r,n){Fd.drawArraysInstanced(e,t,r,n)}function ga(e,t,r,n){Fd.drawArraysInstanced(e,t,r,n)}var va=[];function ya(e,t){for(var r=va[e],n=0;n<e;n++)r[n]=Q[t+4*n>>2];Fd.drawBuffers(r)}function ba(e,t){for(var r=va[e],n=0;n<e;n++)r[n]=Q[t+4*n>>2];Fd.drawBuffers(r)}function _a(e,t){for(var r=va[e],n=0;n<e;n++)r[n]=Q[t+4*n>>2];Fd.drawBuffers(r)}function wa(e,t,r,n){Fd.drawElements(e,t,r,n)}function Ea(e,t,r,n,o){Fd.drawElementsInstanced(e,t,r,n,o)}function xa(e,t,r,n,o){Fd.drawElementsInstanced(e,t,r,n,o)}function ka(e,t,r,n,o){Fd.drawElementsInstanced(e,t,r,n,o)}function Sa(e,t,r,n,o,i,a){Fd.dibvbi.drawElementsInstancedBaseVertexBaseInstanceWEBGL(e,t,r,n,o,i,a)}function Ta(e,t,r,n,o){Fd.drawElementsInstanced(e,t,r,n,o)}function Ca(e,t,r,n,o){Fd.drawElementsInstanced(e,t,r,n,o)}function Pa(e,t,r,n){Fd.drawElements(e,t,r,n)}function Aa(e,t,r,n,o,i){Pa(e,n,o,i)}function Fa(e){Fd.enable(e)}function Da(e){Fd.enableVertexAttribArray(e)}function La(e){Fd.endQuery(e)}function Ia(e){Fd.disjointTimerQueryExt.endQueryEXT(e)}function Ma(){Fd.endTransformFeedback()}function Ra(e,t){var r=Fd.fenceSync(e,t);if(r){var n=Mo.getNewId(Mo.syncs);return r.name=n,Mo.syncs[n]=r,n}return 0}function Oa(){Fd.finish()}function Ba(){Fd.flush()}function Ua(e,t,r,n){Fd.framebufferRenderbuffer(e,t,r,Mo.renderbuffers[n])}function Na(e,t,r,n,o){Fd.framebufferTexture2D(e,t,r,Mo.textures[n],o)}function ja(e,t,r,n,o){Fd.framebufferTextureLayer(e,t,Mo.textures[r],n,o)}function qa(e){Fd.frontFace(e)}function Ga(e,t,r,n){for(var o=0;o<e;o++){var i=Fd[r](),a=i&&Mo.getNewId(n);i?(i.name=a,n[a]=i):Mo.recordError(1282),Q[t+4*o>>2]=a}}function Wa(e,t){Ga(e,t,"createBuffer",Mo.buffers)}function za(e,t){Ga(e,t,"createFramebuffer",Mo.framebuffers)}function Va(e,t){Ga(e,t,"createQuery",Mo.queries)}function Ha(e,t){for(var r=0;r<e;r++){var n=Fd.disjointTimerQueryExt.createQueryEXT();if(!n){for(Mo.recordError(1282);r<e;)Q[t+4*r++>>2]=0;return}var o=Mo.getNewId(Mo.queries);n.name=o,Mo.queries[o]=n,Q[t+4*r>>2]=o}}function $a(e,t){Ga(e,t,"createRenderbuffer",Mo.renderbuffers)}function Ya(e,t){Ga(e,t,"createSampler",Mo.samplers)}function Xa(e,t){Ga(e,t,"createTexture",Mo.textures)}function Ka(e,t){Ga(e,t,"createTransformFeedback",Mo.transformFeedbacks)}function Qa(e,t){Ga(e,t,"createVertexArray",Mo.vaos)}function Za(e,t){Ga(e,t,"createVertexArray",Mo.vaos)}function Ja(e){Fd.generateMipmap(e)}function es(e,t,r,n,o,i,a,s){t=Mo.programs[t];var c=Fd[e](t,r);if(c){var u=s&&z(c.name,s,n);o&&(Q[o>>2]=u),i&&(Q[i>>2]=c.size),a&&(Q[a>>2]=c.type)}}function ts(e,t,r,n,o,i,a){es("getActiveAttrib",e,t,r,n,o,i,a)}function rs(e,t,r,n,o,i,a){es("getActiveUniform",e,t,r,n,o,i,a)}function ns(e,t,r,n,o){e=Mo.programs[e];var i=Fd.getActiveUniformBlockName(e,t);if(i)if(o&&r>0){var a=z(i,o,r);n&&(Q[n>>2]=a)}else n&&(Q[n>>2]=0)}function os(e,t,r,n){if(n)if(e=Mo.programs[e],35393!=r){var o=Fd.getActiveUniformBlockParameter(e,t,r);if(null!==o)if(35395==r)for(var i=0;i<o.length;i++)Q[n+4*i>>2]=o[i];else Q[n>>2]=o}else{var a=Fd.getActiveUniformBlockName(e,t);Q[n>>2]=a.length+1}else Mo.recordError(1281)}function is(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(Q[r+4*a>>2]);var s=Fd.getActiveUniforms(e,i,n);if(s){var c=s.length;for(a=0;a<c;a++)Q[o+4*a>>2]=s[a]}}else Mo.recordError(1281)}function as(e,t,r,n){var o=Fd.getAttachedShaders(Mo.programs[e]),i=o.length;i>t&&(i=t),Q[r>>2]=i;for(var a=0;a<i;++a){var s=Mo.shaders.indexOf(o[a]);Q[n+4*a>>2]=s}}function ss(e,t){return Fd.getAttribLocation(Mo.programs[e],G(t))}function cs(e){return Z[e>>2]+4294967296*Q[e+4>>2]}function us(e){return Z[e>>2]+4294967296*Z[e+4>>2]}function ls(e,t){Z[e>>2]=t,Z[e+4>>2]=(t-Z[e>>2])/4294967296;var r=t>=0?us(e):cs(e);r!=t&&k("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 ds(e,t,r){if(t){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=r&&1!=r&&Mo.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var o=Fd.getParameter(34467);n=o?o.length:0;break;case 33309:if(Mo.currentContext.version<2)return void Mo.recordError(1282);n=2*(Fd.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(Mo.currentContext.version<2)return void Mo.recordError(1280);n=33307==e?3:0}if(void 0===n){var i=Fd.getParameter(e);switch(typeof i){case"number":n=i;break;case"boolean":n=i?1:0;break;case"string":return void Mo.recordError(1280);case"object":if(null===i)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:n=0;break;default:return void Mo.recordError(1280)}else{if(i instanceof Float32Array||i instanceof Uint32Array||i instanceof Int32Array||i instanceof Array){for(var a=0;a<i.length;++a)switch(r){case 0:Q[t+4*a>>2]=i[a];break;case 2:J[t+4*a>>2]=i[a];break;case 4:$[t+a>>0]=i[a]?1:0}return}try{n=0|i.name}catch(t){return Mo.recordError(1280),void x("GL_INVALID_ENUM in glGet"+r+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+t+")")}}break;default:return Mo.recordError(1280),void x("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:ls(t,n);break;case 0:Q[t>>2]=n;break;case 2:J[t>>2]=n;break;case 4:$[t>>0]=n?1:0}}else Mo.recordError(1281)}function fs(e,t){ds(e,t,4)}function ms(e,t,r){r?ls(r,Fd.getBufferParameter(e,t)):Mo.recordError(1281)}function ps(e,t,r){r?Q[r>>2]=Fd.getBufferParameter(e,t):Mo.recordError(1281)}function hs(){var e=Fd.getError()||Mo.lastError;return Mo.lastError=0,e}function gs(e,t){ds(e,t,2)}function vs(e,t){return Fd.getFragDataLocation(Mo.programs[e],G(t))}function ys(e,t,r,n){var o=Fd.getFramebufferAttachmentParameter(e,t,r);(o instanceof WebGLRenderbuffer||o instanceof WebGLTexture)&&(o=0|o.name),Q[n>>2]=o}function bs(e,t,r,n){if(r){var o,i=Fd.getIndexedParameter(e,t);switch(typeof i){case"boolean":o=i?1:0;break;case"number":o=i;break;case"object":if(null===i)switch(e){case 35983:case 35368:o=0;break;default:return void Mo.recordError(1280)}else{if(!(i instanceof WebGLBuffer))return void Mo.recordError(1280);o=0|i.name}break;default:return void Mo.recordError(1280)}switch(n){case 1:ls(r,o);break;case 0:Q[r>>2]=o;break;case 2:J[r>>2]=o;break;case 4:$[r>>0]=o?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+n}}else Mo.recordError(1281)}function _s(e,t,r){bs(e,t,r,1)}function ws(e,t){ds(e,t,1)}function Es(e,t,r){bs(e,t,r,0)}function xs(e,t){ds(e,t,0)}function ks(e,t,r,n,o){if(n<0)Mo.recordError(1281);else if(o){var i=Fd.getInternalformatParameter(e,t,r);if(null!==i)for(var a=0;a<i.length&&a<n;++a)Q[o+4*a>>2]=i[a]}else Mo.recordError(1281)}function Ss(e,t,r,n,o){Mo.recordError(1282)}function Ts(e,t,r,n){var o=Fd.getProgramInfoLog(Mo.programs[e]);null===o&&(o="(unknown error)");var i=t>0&&n?z(o,n,t):0;r&&(Q[r>>2]=i)}function Cs(e,t,r){if(r)if(e>=Mo.counter)Mo.recordError(1281);else if(e=Mo.programs[e],35716==t){var n=Fd.getProgramInfoLog(e);null===n&&(n="(unknown error)"),Q[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var o=0;o<Fd.getProgramParameter(e,35718);++o)e.maxUniformLength=Math.max(e.maxUniformLength,Fd.getActiveUniform(e,o).name.length+1);Q[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(o=0;o<Fd.getProgramParameter(e,35721);++o)e.maxAttributeLength=Math.max(e.maxAttributeLength,Fd.getActiveAttrib(e,o).name.length+1);Q[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(o=0;o<Fd.getProgramParameter(e,35382);++o)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,Fd.getActiveUniformBlockName(e,o).length+1);Q[r>>2]=e.maxUniformBlockNameLength}else Q[r>>2]=Fd.getProgramParameter(e,t);else Mo.recordError(1281)}function Ps(e,t,r){if(r){var n,o=Mo.queries[e];ls(r,"boolean"==typeof(n=Mo.currentContext.version<2?Fd.disjointTimerQueryExt.getQueryObjectEXT(o,t):Fd.getQueryParameter(o,t))?n?1:0:n)}else Mo.recordError(1281)}function As(e,t,r){if(r){var n,o=Mo.queries[e],i=Fd.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,Q[r>>2]=n}else Mo.recordError(1281)}function Fs(e,t,r){if(r){var n,o=Mo.queries[e];ls(r,"boolean"==typeof(n=Mo.currentContext.version<2?Fd.disjointTimerQueryExt.getQueryObjectEXT(o,t):Fd.getQueryParameter(o,t))?n?1:0:n)}else Mo.recordError(1281)}function Ds(e,t,r){if(r){var n,o=Mo.queries[e],i=Fd.getQueryParameter(o,t);n="boolean"==typeof i?i?1:0:i,Q[r>>2]=n}else Mo.recordError(1281)}function Ls(e,t,r){if(r){var n,o=Mo.queries[e],i=Fd.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,Q[r>>2]=n}else Mo.recordError(1281)}function Is(e,t,r){r?Q[r>>2]=Fd.getQuery(e,t):Mo.recordError(1281)}function Ms(e,t,r){r?Q[r>>2]=Fd.disjointTimerQueryExt.getQueryEXT(e,t):Mo.recordError(1281)}function Rs(e,t,r){r?Q[r>>2]=Fd.getRenderbufferParameter(e,t):Mo.recordError(1281)}function Os(e,t,r){r?J[r>>2]=Fd.getSamplerParameter(Mo.samplers[e],t):Mo.recordError(1281)}function Bs(e,t,r){r?Q[r>>2]=Fd.getSamplerParameter(Mo.samplers[e],t):Mo.recordError(1281)}function Us(e,t,r,n){var o=Fd.getShaderInfoLog(Mo.shaders[e]);null===o&&(o="(unknown error)");var i=t>0&&n?z(o,n,t):0;r&&(Q[r>>2]=i)}function Ns(e,t,r,n){var o=Fd.getShaderPrecisionFormat(e,t);Q[r>>2]=o.rangeMin,Q[r+4>>2]=o.rangeMax,Q[n>>2]=o.precision}function js(e,t,r,n){var o=Fd.getShaderSource(Mo.shaders[e]);if(o){var i=t>0&&n?z(o,n,t):0;r&&(Q[r>>2]=i)}}function qs(e,t,r){if(r)if(35716==t){var n=Fd.getShaderInfoLog(Mo.shaders[e]);null===n&&(n="(unknown error)");var o=n?n.length+1:0;Q[r>>2]=o}else if(35720==t){var i=Fd.getShaderSource(Mo.shaders[e]),a=i?i.length+1:0;Q[r>>2]=a}else Q[r>>2]=Fd.getShaderParameter(Mo.shaders[e],t);else Mo.recordError(1281)}function Gs(e){var t=V(e)+1,r=qd(t);return z(e,r,t),r}function Ws(e){var t=Mo.stringCache[e];if(!t){switch(e){case 7939:var r=Fd.getSupportedExtensions()||[];t=Gs((r=r.concat(r.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=Fd.getParameter(e);n||Mo.recordError(1280),t=n&&Gs(n);break;case 7938:var o=Fd.getParameter(7938);t=Gs(o=Mo.currentContext.version>=2?"OpenGL ES 3.0 ("+o+")":"OpenGL ES 2.0 ("+o+")");break;case 35724:var i=Fd.getParameter(35724),a=i.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==a&&(3==a[1].length&&(a[1]=a[1]+"0"),i="OpenGL ES GLSL ES "+a[1]+" ("+i+")"),t=Gs(i);break;default:Mo.recordError(1280)}Mo.stringCache[e]=t}return t}function zs(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=Fd.getSupportedExtensions()||[];return n=(n=n.concat(n.map((function(e){return"GL_"+e})))).map((function(e){return Gs(e)})),r=Mo.stringiCache[e]=n,t<0||t>=r.length?(Mo.recordError(1281),0):r[t]}return Mo.recordError(1280),0}function Vs(e,t,r,n,o){if(r<0)Mo.recordError(1281);else if(o){var i=Fd.getSyncParameter(Mo.syncs[e],t);null!==i&&(Q[o>>2]=i,n&&(Q[n>>2]=1))}else Mo.recordError(1281)}function Hs(e,t,r){r?J[r>>2]=Fd.getTexParameter(e,t):Mo.recordError(1281)}function $s(e,t,r){r?Q[r>>2]=Fd.getTexParameter(e,t):Mo.recordError(1281)}function Ys(e,t,r,n,o,i,a){e=Mo.programs[e];var s=Fd.getTransformFeedbackVarying(e,t);if(s){if(a&&r>0){var c=z(s.name,a,r);n&&(Q[n>>2]=c)}else n&&(Q[n>>2]=0);o&&(Q[o>>2]=s.size),i&&(Q[i>>2]=s.type)}}function Xs(e,t){return Fd.getUniformBlockIndex(Mo.programs[e],G(t))}function Ks(e,t,r,n){if(n)if(t>0&&(0==r||0==n))Mo.recordError(1281);else{e=Mo.programs[e];for(var o=[],i=0;i<t;i++)o.push(G(Q[r+4*i>>2]));var a=Fd.getUniformIndices(e,o);if(a){var s=a.length;for(i=0;i<s;i++)Q[n+4*i>>2]=a[i]}}else Mo.recordError(1281)}function Qs(e){return parseInt(e)}function Zs(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function Js(e){var t,r,n=e.uniformLocsById,o=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},t=0;t<Fd.getProgramParameter(e,35718);++t){var i=Fd.getActiveUniform(e,t),a=i.name,s=i.size,c=Zs(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 ec(e,t){if(t=G(t),e=Mo.programs[e]){Js(e);var r=e.uniformLocsById,n=0,o=t,i=Zs(t);i>0&&(n=Qs(t.slice(i+1))>>>0,o=t.slice(0,i));var a=e.uniformSizeAndIdsByName[o];if(a&&n<a[0]&&(r[n+=a[1]]=r[n]||Fd.getUniformLocation(e,t)))return n}else Mo.recordError(1281);return-1}function tc(e){var t=Fd.currentProgram;if(t){var r=t.uniformLocsById[e];return"number"==typeof r&&(t.uniformLocsById[e]=r=Fd.getUniformLocation(t,t.uniformArrayNamesById[e]+(r>0?"["+r+"]":""))),r}Mo.recordError(1282)}function rc(e,t,r,n){if(r){Js(e=Mo.programs[e]);var o=Fd.getUniform(e,tc(t));if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:Q[r>>2]=o;break;case 2:J[r>>2]=o}else for(var i=0;i<o.length;i++)switch(n){case 0:Q[r+4*i>>2]=o[i];break;case 2:J[r+4*i>>2]=o[i]}}else Mo.recordError(1281)}function nc(e,t,r){rc(e,t,r,2)}function oc(e,t,r){rc(e,t,r,0)}function ic(e,t,r){rc(e,t,r,0)}function ac(e,t,r,n){if(r){var o=Fd.getVertexAttrib(e,t);if(34975==t)Q[r>>2]=o&&o.name;else if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:Q[r>>2]=o;break;case 2:J[r>>2]=o;break;case 5:Q[r>>2]=Math.fround(o)}else for(var i=0;i<o.length;i++)switch(n){case 0:Q[r+4*i>>2]=o[i];break;case 2:J[r+4*i>>2]=o[i];break;case 5:Q[r+4*i>>2]=Math.fround(o[i])}}else Mo.recordError(1281)}function sc(e,t,r){ac(e,t,r,0)}function cc(e,t,r){ac(e,t,r,0)}function uc(e,t,r){r?Q[r>>2]=Fd.getVertexAttribOffset(e,t):Mo.recordError(1281)}function lc(e,t,r){ac(e,t,r,2)}function dc(e,t,r){ac(e,t,r,5)}function fc(e,t){Fd.hint(e,t)}function mc(e,t,r){for(var n=va[t],o=0;o<t;o++)n[o]=Q[r+4*o>>2];Fd.invalidateFramebuffer(e,n)}function pc(e,t,r,n,o,i,a){for(var s=va[t],c=0;c<t;c++)s[c]=Q[r+4*c>>2];Fd.invalidateSubFramebuffer(e,s,n,o,i,a)}function hc(e){var t=Mo.buffers[e];return t?Fd.isBuffer(t):0}function gc(e){return Fd.isEnabled(e)}function vc(e){var t=Mo.framebuffers[e];return t?Fd.isFramebuffer(t):0}function yc(e){return(e=Mo.programs[e])?Fd.isProgram(e):0}function bc(e){var t=Mo.queries[e];return t?Fd.isQuery(t):0}function _c(e){var t=Mo.queries[e];return t?Fd.disjointTimerQueryExt.isQueryEXT(t):0}function wc(e){var t=Mo.renderbuffers[e];return t?Fd.isRenderbuffer(t):0}function Ec(e){var t=Mo.samplers[e];return t?Fd.isSampler(t):0}function xc(e){var t=Mo.shaders[e];return t?Fd.isShader(t):0}function kc(e){return Fd.isSync(Mo.syncs[e])}function Sc(e){var t=Mo.textures[e];return t?Fd.isTexture(t):0}function Tc(e){return Fd.isTransformFeedback(Mo.transformFeedbacks[e])}function Cc(e){var t=Mo.vaos[e];return t?Fd.isVertexArray(t):0}function Pc(e){var t=Mo.vaos[e];return t?Fd.isVertexArray(t):0}function Ac(e){Fd.lineWidth(e)}function Fc(e){e=Mo.programs[e],Fd.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function Dc(e,t,r,n,o,i){Fd.mdibvbi.multiDrawArraysInstancedBaseInstanceWEBGL(e,Q,t>>2,Q,r>>2,Q,n>>2,Z,o>>2,i)}function Lc(e,t,r,n,o,i,a,s){Fd.mdibvbi.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(e,Q,t>>2,r,Q,n>>2,Q,o>>2,Q,i>>2,Z,a>>2,s)}function Ic(){Fd.pauseTransformFeedback()}function Mc(e,t){3317==e&&(Mo.unpackAlignment=t),Fd.pixelStorei(e,t)}function Rc(e,t){Fd.polygonOffset(e,t)}function Oc(e,t,r,n){Mo.recordError(1280)}function Bc(e,t,r){Mo.recordError(1280)}function Uc(e,t){Fd.disjointTimerQueryExt.queryCounterEXT(Mo.queries[e],t)}function Nc(e){Fd.readBuffer(e)}function jc(e,t,r,n){var o;return t*(e*r+(o=n)-1&-o)}function qc(e){return{5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[e-6402]||1}function Gc(e){return 0==(e-=5120)?$:1==e?Y:2==e?X:4==e?Q:6==e?J:5==e||28922==e||28520==e||30779==e||30782==e?Z:K}function Wc(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function zc(e,t,r,n,o,i){var a=Gc(e),s=Wc(a),c=1<<s,u=jc(r,n,qc(t)*c,Mo.unpackAlignment);return a.subarray(o>>s,o+u>>s)}function Vc(e,t,r,n,o,i,a){if(Mo.currentContext.version>=2)if(Fd.currentPixelPackBufferBinding)Fd.readPixels(e,t,r,n,o,i,a);else{var s=Gc(i);Fd.readPixels(e,t,r,n,o,i,s,a>>Wc(s))}else{var c=zc(i,o,r,n,a);c?Fd.readPixels(e,t,r,n,o,i,c):Mo.recordError(1280)}}function Hc(){}function $c(e,t,r,n){Fd.renderbufferStorage(e,t,r,n)}function Yc(e,t,r,n,o){Fd.renderbufferStorageMultisample(e,t,r,n,o)}function Xc(){Fd.resumeTransformFeedback()}function Kc(e,t){Fd.sampleCoverage(e,!!t)}function Qc(e,t,r){Fd.samplerParameterf(Mo.samplers[e],t,r)}function Zc(e,t,r){var n=J[r>>2];Fd.samplerParameterf(Mo.samplers[e],t,n)}function Jc(e,t,r){Fd.samplerParameteri(Mo.samplers[e],t,r)}function eu(e,t,r){var n=Q[r>>2];Fd.samplerParameteri(Mo.samplers[e],t,n)}function tu(e,t,r,n){Fd.scissor(e,t,r,n)}function ru(){Mo.recordError(1280)}function nu(e,t,r,n){var o=Mo.getSource(e,t,r,n);if(Mo.currentContext.version>=2&&o.includes("#version 100")){var i="";(o=(o=o.replace(/#extension GL_OES_standard_derivatives : enable/g,"")).replace(/#extension GL_EXT_shader_texture_lod : enable/g,"")).includes("gl_FragColor")&&(i+="out mediump vec4 GL_FragColor;\n",o=o.replace(/gl_FragColor/g,"GL_FragColor")),o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=(o=o.includes("attribute")?(o=o.replace(/attribute/g,"in")).replace(/varying/g,"out"):o.replace(/varying/g,"in")).replace(/textureCubeLodEXT/g,"textureCubeLod")).replace(/texture2DLodEXT/g,"texture2DLod")).replace(/texture2DProjLodEXT/g,"texture2DProjLod")).replace(/texture2DGradEXT/g,"texture2DGrad")).replace(/texture2DProjGradEXT/g,"texture2DProjGrad")).replace(/textureCubeGradEXT/g,"textureCubeGrad")).replace(/textureCube/g,"texture")).replace(/texture1D/g,"texture")).replace(/texture2D/g,"texture")).replace(/texture3D/g,"texture")).replace(/#version 100/g,"#version 300 es\n"+i)}Fd.shaderSource(Mo.shaders[e],o)}function ou(e,t,r){Fd.stencilFunc(e,t,r)}function iu(e,t,r,n){Fd.stencilFuncSeparate(e,t,r,n)}function au(e){Fd.stencilMask(e)}function su(e,t){Fd.stencilMaskSeparate(e,t)}function cu(e,t,r){Fd.stencilOp(e,t,r)}function uu(e,t,r,n){Fd.stencilOpSeparate(e,t,r,n)}function lu(e,t,r,n,o,i,a,s,c){if(Mo.currentContext.version>=2&&(6402==a&&6402==r&&5125==s&&(r=33190),36193==s&&(s=5131,6408==a&&6408==r&&(r=34842)),34041==r&&(r=35056)),Mo.currentContext.version>=2)if(Fd.currentPixelUnpackBufferBinding)Fd.texImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Gc(s);Fd.texImage2D(e,t,r,n,o,i,a,s,u,c>>Wc(u))}else Fd.texImage2D(e,t,r,n,o,i,a,s,null);else Fd.texImage2D(e,t,r,n,o,i,a,s,c?zc(s,a,n,o,c):null)}function du(e,t,r,n,o,i,a,s,c,u){if(Fd.currentPixelUnpackBufferBinding)Fd.texImage3D(e,t,r,n,o,i,a,s,c,u);else if(u){var l=Gc(c);Fd.texImage3D(e,t,r,n,o,i,a,s,c,l,u>>Wc(l))}else Fd.texImage3D(e,t,r,n,o,i,a,s,c,null)}function fu(e,t,r){Fd.texParameterf(e,t,r)}function mu(e,t,r){var n=J[r>>2];Fd.texParameterf(e,t,n)}function pu(e,t,r){Fd.texParameteri(e,t,r)}function hu(e,t,r){var n=Q[r>>2];Fd.texParameteri(e,t,n)}function gu(e,t,r,n,o){Fd.texStorage2D(e,t,r,n,o)}function vu(e,t,r,n,o,i){Fd.texStorage3D(e,t,r,n,o,i)}function yu(e,t,r,n,o,i,a,s,c){if(Mo.currentContext.version>=2&&36193==s&&(s=5131),Mo.currentContext.version>=2)if(Fd.currentPixelUnpackBufferBinding)Fd.texSubImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Gc(s);Fd.texSubImage2D(e,t,r,n,o,i,a,s,u,c>>Wc(u))}else Fd.texSubImage2D(e,t,r,n,o,i,a,s,null);else{var l=null;c&&(l=zc(s,a,o,i,c)),Fd.texSubImage2D(e,t,r,n,o,i,a,s,l)}}function bu(e,t,r,n,o,i,a,s,c,u,l){if(Fd.currentPixelUnpackBufferBinding)Fd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,l);else if(l){var d=Gc(u);Fd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,d,l>>Wc(d))}else Fd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,null)}function _u(e,t,r,n){e=Mo.programs[e];for(var o=[],i=0;i<t;i++)o.push(G(Q[r+4*i>>2]));Fd.transformFeedbackVaryings(e,o,n)}function wu(e,t){Fd.uniform1f(tc(e),t)}var Eu=[];function xu(e,t,r){if(Mo.currentContext.version>=2)Fd.uniform1fv(tc(e),J,r>>2,t);else{if(t<=288)for(var n=Eu[t-1],o=0;o<t;++o)n[o]=J[r+4*o>>2];else n=J.subarray(r>>2,r+4*t>>2);Fd.uniform1fv(tc(e),n)}}function ku(e,t){Fd.uniform1i(tc(e),t)}var Su=[];function Tu(e,t,r){if(Mo.currentContext.version>=2)Fd.uniform1iv(tc(e),Q,r>>2,t);else{if(t<=288)for(var n=Su[t-1],o=0;o<t;++o)n[o]=Q[r+4*o>>2];else n=Q.subarray(r>>2,r+4*t>>2);Fd.uniform1iv(tc(e),n)}}function Cu(e,t){Fd.uniform1ui(tc(e),t)}function Pu(e,t,r){Fd.uniform1uiv(tc(e),Z,r>>2,t)}function Au(e,t,r){Fd.uniform2f(tc(e),t,r)}function Fu(e,t,r){if(Mo.currentContext.version>=2)Fd.uniform2fv(tc(e),J,r>>2,2*t);else{if(t<=144)for(var n=Eu[2*t-1],o=0;o<2*t;o+=2)n[o]=J[r+4*o>>2],n[o+1]=J[r+(4*o+4)>>2];else n=J.subarray(r>>2,r+8*t>>2);Fd.uniform2fv(tc(e),n)}}function Du(e,t,r){Fd.uniform2i(tc(e),t,r)}function Lu(e,t,r){if(Mo.currentContext.version>=2)Fd.uniform2iv(tc(e),Q,r>>2,2*t);else{if(t<=144)for(var n=Su[2*t-1],o=0;o<2*t;o+=2)n[o]=Q[r+4*o>>2],n[o+1]=Q[r+(4*o+4)>>2];else n=Q.subarray(r>>2,r+8*t>>2);Fd.uniform2iv(tc(e),n)}}function Iu(e,t,r){Fd.uniform2ui(tc(e),t,r)}function Mu(e,t,r){Fd.uniform2uiv(tc(e),Z,r>>2,2*t)}function Ru(e,t,r,n){Fd.uniform3f(tc(e),t,r,n)}function Ou(e,t,r){if(Mo.currentContext.version>=2)Fd.uniform3fv(tc(e),J,r>>2,3*t);else{if(t<=96)for(var n=Eu[3*t-1],o=0;o<3*t;o+=3)n[o]=J[r+4*o>>2],n[o+1]=J[r+(4*o+4)>>2],n[o+2]=J[r+(4*o+8)>>2];else n=J.subarray(r>>2,r+12*t>>2);Fd.uniform3fv(tc(e),n)}}function Bu(e,t,r,n){Fd.uniform3i(tc(e),t,r,n)}function Uu(e,t,r){if(Mo.currentContext.version>=2)Fd.uniform3iv(tc(e),Q,r>>2,3*t);else{if(t<=96)for(var n=Su[3*t-1],o=0;o<3*t;o+=3)n[o]=Q[r+4*o>>2],n[o+1]=Q[r+(4*o+4)>>2],n[o+2]=Q[r+(4*o+8)>>2];else n=Q.subarray(r>>2,r+12*t>>2);Fd.uniform3iv(tc(e),n)}}function Nu(e,t,r,n){Fd.uniform3ui(tc(e),t,r,n)}function ju(e,t,r){Fd.uniform3uiv(tc(e),Z,r>>2,3*t)}function qu(e,t,r,n,o){Fd.uniform4f(tc(e),t,r,n,o)}function Gu(e,t,r){if(Mo.currentContext.version>=2)Fd.uniform4fv(tc(e),J,r>>2,4*t);else{if(t<=72){var n=Eu[4*t-1],o=J;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=J.subarray(r>>2,r+16*t>>2);Fd.uniform4fv(tc(e),n)}}function Wu(e,t,r,n,o){Fd.uniform4i(tc(e),t,r,n,o)}function zu(e,t,r){if(Mo.currentContext.version>=2)Fd.uniform4iv(tc(e),Q,r>>2,4*t);else{if(t<=72)for(var n=Su[4*t-1],o=0;o<4*t;o+=4)n[o]=Q[r+4*o>>2],n[o+1]=Q[r+(4*o+4)>>2],n[o+2]=Q[r+(4*o+8)>>2],n[o+3]=Q[r+(4*o+12)>>2];else n=Q.subarray(r>>2,r+16*t>>2);Fd.uniform4iv(tc(e),n)}}function Vu(e,t,r,n,o){Fd.uniform4ui(tc(e),t,r,n,o)}function Hu(e,t,r){Fd.uniform4uiv(tc(e),Z,r>>2,4*t)}function $u(e,t,r){e=Mo.programs[e],Fd.uniformBlockBinding(e,t,r)}function Yu(e,t,r,n){if(Mo.currentContext.version>=2)Fd.uniformMatrix2fv(tc(e),!!r,J,n>>2,4*t);else{if(t<=72)for(var o=Eu[4*t-1],i=0;i<4*t;i+=4)o[i]=J[n+4*i>>2],o[i+1]=J[n+(4*i+4)>>2],o[i+2]=J[n+(4*i+8)>>2],o[i+3]=J[n+(4*i+12)>>2];else o=J.subarray(n>>2,n+16*t>>2);Fd.uniformMatrix2fv(tc(e),!!r,o)}}function Xu(e,t,r,n){Fd.uniformMatrix2x3fv(tc(e),!!r,J,n>>2,6*t)}function Ku(e,t,r,n){Fd.uniformMatrix2x4fv(tc(e),!!r,J,n>>2,8*t)}function Qu(e,t,r,n){if(Mo.currentContext.version>=2)Fd.uniformMatrix3fv(tc(e),!!r,J,n>>2,9*t);else{if(t<=32)for(var o=Eu[9*t-1],i=0;i<9*t;i+=9)o[i]=J[n+4*i>>2],o[i+1]=J[n+(4*i+4)>>2],o[i+2]=J[n+(4*i+8)>>2],o[i+3]=J[n+(4*i+12)>>2],o[i+4]=J[n+(4*i+16)>>2],o[i+5]=J[n+(4*i+20)>>2],o[i+6]=J[n+(4*i+24)>>2],o[i+7]=J[n+(4*i+28)>>2],o[i+8]=J[n+(4*i+32)>>2];else o=J.subarray(n>>2,n+36*t>>2);Fd.uniformMatrix3fv(tc(e),!!r,o)}}function Zu(e,t,r,n){Fd.uniformMatrix3x2fv(tc(e),!!r,J,n>>2,6*t)}function Ju(e,t,r,n){Fd.uniformMatrix3x4fv(tc(e),!!r,J,n>>2,12*t)}function el(e,t,r,n){if(Mo.currentContext.version>=2)Fd.uniformMatrix4fv(tc(e),!!r,J,n>>2,16*t);else{if(t<=18){var o=Eu[16*t-1],i=J;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=J.subarray(n>>2,n+64*t>>2);Fd.uniformMatrix4fv(tc(e),!!r,o)}}function tl(e,t,r,n){Fd.uniformMatrix4x2fv(tc(e),!!r,J,n>>2,8*t)}function rl(e,t,r,n){Fd.uniformMatrix4x3fv(tc(e),!!r,J,n>>2,12*t)}function nl(e){e=Mo.programs[e],Fd.useProgram(e),Fd.currentProgram=e}function ol(e){Fd.validateProgram(Mo.programs[e])}function il(e,t){Fd.vertexAttrib1f(e,t)}function al(e,t){Fd.vertexAttrib1f(e,J[t>>2])}function sl(e,t,r){Fd.vertexAttrib2f(e,t,r)}function cl(e,t){Fd.vertexAttrib2f(e,J[t>>2],J[t+4>>2])}function ul(e,t,r,n){Fd.vertexAttrib3f(e,t,r,n)}function ll(e,t){Fd.vertexAttrib3f(e,J[t>>2],J[t+4>>2],J[t+8>>2])}function dl(e,t,r,n,o){Fd.vertexAttrib4f(e,t,r,n,o)}function fl(e,t){Fd.vertexAttrib4f(e,J[t>>2],J[t+4>>2],J[t+8>>2],J[t+12>>2])}function ml(e,t){Fd.vertexAttribDivisor(e,t)}function pl(e,t){Fd.vertexAttribDivisor(e,t)}function hl(e,t){Fd.vertexAttribDivisor(e,t)}function gl(e,t){Fd.vertexAttribDivisor(e,t)}function vl(e,t){Fd.vertexAttribDivisor(e,t)}function yl(e,t,r,n,o){Fd.vertexAttribI4i(e,t,r,n,o)}function bl(e,t){Fd.vertexAttribI4i(e,Q[t>>2],Q[t+4>>2],Q[t+8>>2],Q[t+12>>2])}function _l(e,t,r,n,o){Fd.vertexAttribI4ui(e,t,r,n,o)}function wl(e,t){Fd.vertexAttribI4ui(e,Z[t>>2],Z[t+4>>2],Z[t+8>>2],Z[t+12>>2])}function El(e,t,r,n,o){Fd.vertexAttribIPointer(e,t,r,n,o)}function xl(e,t,r,n,o,i){Fd.vertexAttribPointer(e,t,r,!!n,o,i)}function kl(e,t,r,n){Fd.viewport(e,t,r,n)}function Sl(e,t,r,n){Fd.waitSync(Mo.syncs[e],t,Fi(r,n))}function Tl(e,t,r){Y.copyWithin(e,t,t+r)}function Cl(e){try{return M.grow(e-H.byteLength+65535>>>16),pe(M.buffer),1}catch(t){x("emscripten_realloc_buffer: Attempted to grow heap from "+H.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function Pl(e){var t=Y.length;N((e>>>=0)>t);var r,n=2147483648;if(e>n)return x("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147483648 bytes!"),!1;for(var o=1;o<=4;o*=2){var i=t*(1+.2/o);i=Math.min(i,e+100663296);var a=Math.min(n,(r=Math.max(e,i))+(65536-r%65536)%65536);if(Cl(a))return!0}return x("Failed to grow the heap from "+t+" bytes to "+a+" bytes, not enough memory!"),!1}function Al(e,t,r,n,i,a,s,c,u){const l=o.UTF8ToString(e,e+t),d=o.HEAPU8.subarray(a,a+s),f=o.HEAPU32.subarray(c/4,c/4+u),m=o.emscripten_ubq_codec_decoderNextHandle++,p=[];for(let e=0;e<u;e++)p[e]=Mo.textures[f[e]];const h={codec:l,codedWidth:r,codedHeight:n,description:new Uint8Array(d)};try{const e=o.emscripten_ubq_codec_createVideoDecoder(p);e.configure(h),e.numberOfFrames=i,o.emscripten_ubq_codec_decoders.set(m,{videoDecoder:e,decoderConfig:h,textures:p})}catch{return 0}return m}function Fl(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 Dl(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 Ll(e){o.emscripten_ubq_codec_decoders.get(e).videoDecoder.close(),o.emscripten_ubq_codec_decoders.delete(e)}function Il(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 Rl(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 Ol(e){const t=o.emscripten_ubq_codec_decoders.get(e).videoDecoder;await t.flush(),t.decodedFrames=0}function Bl(e){return o.emscripten_ubq_codec_decoders.get(e).videoDecoder.decodedFrames}function Ul(){return"undefined"!=typeof VideoFrame&&"undefined"!=typeof VideoDecoder&&"undefined"!=typeof VideoEncoder}function Nl(e){const t=o.emscripten_ubq_codec_decoders.get(e).videoDecoder;t.decodedFrames=0,t.probing=!0}function jl(e){const t=o.emscripten_ubq_codec_decoders.get(e).videoDecoder;t.probing=!1,t.decodedFrames=0}function ql(e){const t=o.emscripten_ubq_codec_decoders.get(e),r=!0===t.videoDecoder.textureUploadFlag;return t.videoDecoder.textureUploadFlag=!1,r}function Gl(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 Wl(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 zl(e){return o.emscripten_ubq_asyncFetchHeaders.has(e)?o.emscripten_ubq_asyncFetchHeaders.get(e):0}function Vl(e,t,r,n,i,c,u,l,d){let f=o.UTF8ToString(t,r),m=o.UTF8ToString(l,d),p=o.emscripten_ubq_asyncFetchNextHandle++;o.emscripten_ubq_asyncFetchStates.set(p,{state:a.PENDING});let h={};for(let e=0;e<i;e++){const t=o.getValue(n+4*e,"i32"),r=o.emscripten_ubq_asyncFetchHeaders.get(t);h[r.key]=r.value}const g=s[e];let v;return"GET"!==g&&"HEAD"!==g&&(v=new Uint8Array(o.HEAPU8.buffer,c,u)),fetch(f,{method:g,headers:h,body:v,mode:"cors",credentials:m}).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(p,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(p,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(p,{state:a.FINISHED,result:e})})).catch((e=>{o.emscripten_ubq_asyncFetchStates.set(p,{state:a.ERROR,error:e})})),p}function Hl(e){return!!o.emscripten_ubq_asyncFetchStates.has(e)&&(o.emscripten_ubq_asyncFetchStates.delete(e),!0)}function $l(e){return o.emscripten_ubq_asyncFetchCompletedBytes.has(e)?o.emscripten_ubq_asyncFetchCompletedBytes.get(e):0}function Yl(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 Xl(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 Kl(e){return o.emscripten_ubq_asyncFetchStates.has(e)?o.emscripten_ubq_asyncFetchStates.get(e).state:-1}function Ql(e){return o.emscripten_ubq_asyncFetchTotalBytes.has(e)?o.emscripten_ubq_asyncFetchTotalBytes.get(e):0}var Zl={inEventHandler:0,removeAllEventListeners:function(){for(var e=Zl.eventHandlers.length-1;e>=0;--e)Zl._removeHandler(e);Zl.eventHandlers=[],Zl.deferredCalls=[]},registerRemoveEventListeners:function(){Zl.removeEventListenersRegistered||(xe.push(Zl.removeAllEventListeners),Zl.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 Zl.deferredCalls){var i=Zl.deferredCalls[o];if(i.targetFunction==e&&n(i.argsList,r))return}Zl.deferredCalls.push({targetFunction:e,precedence:t,argsList:r}),Zl.deferredCalls.sort((function(e,t){return e.precedence<t.precedence}))},removeDeferredCalls:function(e){for(var t=0;t<Zl.deferredCalls.length;++t)Zl.deferredCalls[t].targetFunction==e&&(Zl.deferredCalls.splice(t,1),--t)},canPerformEventHandlerRequests:function(){return Zl.inEventHandler&&Zl.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(Zl.canPerformEventHandlerRequests())for(var e=0;e<Zl.deferredCalls.length;++e){var t=Zl.deferredCalls[e];Zl.deferredCalls.splice(e,1),--e,t.targetFunction.apply(null,t.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(e,t){for(var r=0;r<Zl.eventHandlers.length;++r)Zl.eventHandlers[r].target!=e||t&&t!=Zl.eventHandlers[r].eventTypeString||Zl._removeHandler(r--)},_removeHandler:function(e){var t=Zl.eventHandlers[e];t.target.removeEventListener(t.eventTypeString,t.eventListenerFunc,t.useCapture),Zl.eventHandlers.splice(e,1)},registerOrRemoveHandler:function(e){var t=function(t){++Zl.inEventHandler,Zl.currentEventHandler=e,Zl.runDeferredCalls(),e.handlerFunc(t),Zl.runDeferredCalls(),--Zl.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=t,e.target.addEventListener(e.eventTypeString,t,e.useCapture),Zl.eventHandlers.push(e),Zl.registerRemoveEventListeners();else for(var r=0;r<Zl.eventHandlers.length;++r)Zl.eventHandlers[r].target==e.target&&Zl.eventHandlers[r].eventTypeString==e.eventTypeString&&Zl._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}},Jl=["default","low-power","high-performance"];function ed(e){return e>2?G(e):e}var td=[0,"undefined"!=typeof document?document:0,"undefined"!=typeof window?window:0];function rd(e){return e=ed(e),td[e]||("undefined"!=typeof document?document.querySelector(e):void 0)}function nd(e){return rd(e)}function od(e,t){N(t);var r=t>>2,n=Q[r+6],o={alpha:!!Q[r+0],depth:!!Q[r+1],stencil:!!Q[r+2],antialias:!!Q[r+3],premultipliedAlpha:!!Q[r+4],preserveDrawingBuffer:!!Q[r+5],powerPreference:Jl[n],failIfMajorPerformanceCaveat:!!Q[r+7],majorVersion:Q[r+8],minorVersion:Q[r+9],enableExtensionsByDefault:Q[r+10],explicitSwapControl:Q[r+11],proxyContextToMainThread:Q[r+12],renderViaOffscreenBackBuffer:Q[r+13]},i=nd(e);return i?o.explicitSwapControl?0:Mo.createContext(i,o):0}function id(e,t){return od(e,t)}function ad(e){Mo.currentContext==e&&(Mo.currentContext=0),Mo.deleteContext(e)}function sd(e){N(e);for(var t=e>>2,r=0;r<14;++r)Q[t+r]=0;Q[t+0]=Q[t+1]=Q[t+3]=Q[t+4]=Q[t+8]=Q[t+10]=1}function cd(e){return Mo.makeContextCurrent(e)?0:-5}var ud={};function ld(){return l||"./this.program"}function dd(){if(!dd.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",_:ld()};for(var t in ud)void 0===ud[t]?delete e[t]:e[t]=ud[t];var r=[];for(var t in e)r.push(t+"="+e[t]);dd.strings=r}return dd.strings}function fd(e,t){var r=0;return dd().forEach((function(n,o){var i=t+r;Q[e+4*o>>2]=i,me(n,i),r+=n.length+1})),0}function md(e,t){var r=dd();Q[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),Q[t>>2]=n,0}function pd(e){try{var t=xt.getStreamFromFD(e);return Et.close(t),0}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return e.errno}}function hd(e,t,r,n,o){try{var i=0|Number(n&BigInt(4294967295));N(!(0|Number(n>>BigInt(32))),"offsets over 2^32 not yet supported");var a=xt.getStreamFromFD(e),s=xt.doReadv(a,t,r,i);return Q[o>>2]=s,0}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return e.errno}}function gd(e,t,r,n){try{var o=xt.getStreamFromFD(e),i=xt.doReadv(o,t,r);return Q[n>>2]=i,0}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return e.errno}}function vd(e,t,r,n){try{var o=0|Number(t&BigInt(4294967295)),i=0|Number(t>>BigInt(32)),a=xt.getStreamFromFD(e),s=4294967296*i+(o>>>0),c=9007199254740992;return s<=-c||s>=c?-61:(Et.llseek(a,s,r),ee[n>>3]=BigInt(a.position),a.getdents&&0===s&&0===r&&(a.getdents=null),0)}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return e.errno}}function yd(e,t,r,n){try{var o=xt.getStreamFromFD(e),i=xt.doWritev(o,t,r);return Q[n>>2]=i,0}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return e.errno}}function bd(){return I()}function _d(e){var t=Date.now();return Q[e>>2]=t/1e3|0,Q[e+4>>2]=t%1e3*1e3|0,0}function wd(e){L(e)}function Ed(e){return e%4==0&&(e%100!=0||e%400==0)}function xd(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var kd=[31,29,31,30,31,30,31,31,30,31,30,31],Sd=[31,28,31,30,31,30,31,31,30,31,30,31];function Td(e,t){for(var r=new Date(e.getTime());t>0;){var n=Ed(r.getFullYear()),o=r.getMonth(),i=(n?kd:Sd)[o];if(!(t>i-r.getDate()))return r.setDate(r.getDate()+t),r;t-=i-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}function Cd(e,t,r,n){var o=Q[n+40>>2],i={tm_sec:Q[n>>2],tm_min:Q[n+4>>2],tm_hour:Q[n+8>>2],tm_mday:Q[n+12>>2],tm_mon:Q[n+16>>2],tm_year:Q[n+20>>2],tm_wday:Q[n+24>>2],tm_yday:Q[n+28>>2],tm_isdst:Q[n+32>>2],tm_gmtoff:Q[n+36>>2],tm_zone:o?G(o):""},a=G(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in s)a=a.replace(new RegExp(c,"g"),s[c]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function f(e,t){return d(e,t,"0")}function m(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 p(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function h(e){var t=Td(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=p(r),i=p(n);return m(o,t)<=0?m(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var g={"%a":function(e){return u[e.tm_wday].substring(0,3)},"%A":function(e){return u[e.tm_wday]},"%b":function(e){return l[e.tm_mon].substring(0,3)},"%B":function(e){return l[e.tm_mon]},"%C":function(e){return f((e.tm_year+1900)/100|0,2)},"%d":function(e){return f(e.tm_mday,2)},"%e":function(e){return d(e.tm_mday,2," ")},"%g":function(e){return h(e).toString().substring(2)},"%G":function(e){return h(e)},"%H":function(e){return f(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),f(t,2)},"%j":function(e){return f(e.tm_mday+xd(Ed(e.tm_year+1900)?kd:Sd,e.tm_mon-1),3)},"%m":function(e){return f(e.tm_mon+1,2)},"%M":function(e){return f(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return f(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),r=0===t.getDay()?t:Td(t,7-t.getDay()),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(m(r,n)<0){var o=xd(Ed(n.getFullYear())?kd:Sd,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return f(Math.ceil(i/7),2)}return 0===m(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=p(r),i=p(n),a=Td(new Date(e.tm_year+1900,0,1),e.tm_yday);return m(a,o)<0?"53":m(i,a)<=0?"01":(t=o.getFullYear()<e.tm_year+1900?e.tm_yday+32-o.getDate():e.tm_yday+1-o.getDate(),f(Math.ceil(t/7),2))},"%w":function(e){return e.tm_wday},"%W":function(e){var t=new Date(e.tm_year,0,1),r=1===t.getDay()?t:Td(t,0===t.getDay()?1:7-t.getDay()+1),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(m(r,n)<0){var o=xd(Ed(n.getFullYear())?kd:Sd,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return f(Math.ceil(i/7),2)}return 0===m(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"),g)a.includes(c)&&(a=a.replace(new RegExp(c,"g"),g[c](i)));var v=Bd(a=a.replace(/\0\0/g,"%"),!1);return v.length>t?0:(fe(v,e),v.length-1)}function Pd(e,t,r,n){return Cd(e,t,r,n)}function Ad(e){var t=Date.now()/1e3|0;return e&&(Q[e>>2]=t),t}var Fd,Dd=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Et.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},Ld=365,Id=146;Object.defineProperties(Dd.prototype,{read:{get:function(){return(this.mode&Ld)===Ld},set:function(e){e?this.mode|=Ld:this.mode&=~Ld}},write:{get:function(){return(this.mode&Id)===Id},set:function(e){e?this.mode|=Id:this.mode&=~Id}},isFolder:{get:function(){return Et.isDir(this.mode)}},isDevice:{get:function(){return Et.isChrdev(this.mode)}}}),Et.FSNode=Dd,Et.staticInit(),o.FS_createPath=Et.createPath,o.FS_createDataFile=Et.createDataFile,o.FS_createPreloadedFile=Et.createPreloadedFile,o.FS_createLazyFile=Et.createLazyFile,o.FS_createDevice=Et.createDevice,o.FS_unlink=Et.unlink,wt={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},Vt=o.InternalError=zt(Error,"InternalError"),Zt(),tr=o.BindingError=zt(Error,"BindingError"),Mr(),xr(),Hr(),Kr=o.UnboundTypeError=zt(Error,"UnboundTypeError"),dn(),o.requestFullscreen=function(e,t){So.requestFullscreen(e,t)},o.requestFullScreen=function(){So.requestFullScreen()},o.requestAnimationFrame=function(e){So.requestAnimationFrame(e)},o.setCanvasSize=function(e,t,r){So.setCanvasSize(e,t,r)},o.pauseMainLoop=function(){So.mainLoop.pause()},o.resumeMainLoop=function(){So.mainLoop.resume()},o.getUserMedia=function(){So.getUserMedia()},o.createContext=function(e,t,r,n){return So.createContext(e,t,r,n)};for(var Md=0;Md<32;++Md)va.push(new Array(Md));var Rd=new Float32Array(288);for(Md=0;Md<288;++Md)Eu[Md]=Rd.subarray(0,Md+1);var Od=new Int32Array(288);for(Md=0;Md<288;++Md)Su[Md]=Od.subarray(0,Md+1);function Bd(e,t,r){var n=r>0?r:V(e)+1,o=new Array(n),i=W(e,o,0,o.length);return t&&(o.length=i),o}function Ud(){T("fetchSettings")}"function"==typeof atob&&atob;var Nd,jd={__assert_fail:at,__cxa_allocate_exception:st,__cxa_throw:ut,__syscall_fcntl64:kt,__syscall_fstat64:St,__syscall_fstatat64:Tt,__syscall_getdents64:Ct,__syscall_ioctl:Pt,__syscall_lstat64:At,__syscall_open:Ft,__syscall_stat64:Dt,_dlopen_js:Lt,_dlsym_js:It,_embind_finalize_value_array:Yt,_embind_finalize_value_object:Kt,_embind_register_bigint:ir,_embind_register_bool:sr,_embind_register_class:Jr,_embind_register_class_constructor:tn,_embind_register_class_function:on,_embind_register_emval:mn,_embind_register_enum:hn,_embind_register_enum_value:vn,_embind_register_float:bn,_embind_register_function:_n,_embind_register_integer:wn,_embind_register_memory_view:En,_embind_register_smart_ptr:xn,_embind_register_std_string:kn,_embind_register_std_wstring:Sn,_embind_register_value_array:Tn,_embind_register_value_array_element:Cn,_embind_register_value_object:Pn,_embind_register_value_object_field:An,_embind_register_void:Fn,_emscripten_throw_longjmp:Dn,_emval_as:Ln,_emval_call:Mn,_emval_call_method:Nn,_emval_call_void_method:jn,_emval_decref:cn,_emval_get_global:Gn,_emval_get_method_caller:Vn,_emval_get_property:Hn,_emval_incref:$n,_emval_instanceof:Yn,_emval_is_number:Xn,_emval_is_string:Kn,_emval_new:eo,_emval_new_array:to,_emval_new_cstring:ro,_emval_new_object:no,_emval_run_destructors:oo,_emval_set_property:io,_emval_take_value:ao,_emval_throw:so,_gmtime_js:co,_localtime_js:uo,_mktime_js:lo,_mmap_js:fo,_munmap_js:mo,_tzset_js:ho,abort:go,clock_gettime:yo,eglChooseConfig:Co,eglCreateContext:Ro,eglCreateWindowSurface:Oo,eglDestroyContext:Bo,eglDestroySurface:Uo,eglGetConfigAttrib:No,eglGetDisplay:jo,eglGetError:qo,eglInitialize:Go,eglMakeCurrent:Wo,eglSwapBuffers:zo,eglTerminate:Vo,emscripten_console_error:Ho,emscripten_console_log:$o,emscripten_console_warn:Yo,emscripten_debugger:Xo,emscripten_get_heap_max:Ko,emscripten_get_now:Zn,emscripten_glActiveTexture:Qo,emscripten_glAttachShader:Zo,emscripten_glBeginQuery:Jo,emscripten_glBeginQueryEXT:ei,emscripten_glBeginTransformFeedback:ti,emscripten_glBindAttribLocation:ri,emscripten_glBindBuffer:ni,emscripten_glBindBufferBase:oi,emscripten_glBindBufferRange:ii,emscripten_glBindFramebuffer:ai,emscripten_glBindRenderbuffer:si,emscripten_glBindSampler:ci,emscripten_glBindTexture:ui,emscripten_glBindTransformFeedback:li,emscripten_glBindVertexArray:di,emscripten_glBindVertexArrayOES:fi,emscripten_glBlendColor:mi,emscripten_glBlendEquation:pi,emscripten_glBlendEquationSeparate:hi,emscripten_glBlendFunc:gi,emscripten_glBlendFuncSeparate:vi,emscripten_glBlitFramebuffer:yi,emscripten_glBufferData:bi,emscripten_glBufferSubData:_i,emscripten_glCheckFramebufferStatus:wi,emscripten_glClear:Ei,emscripten_glClearBufferfi:xi,emscripten_glClearBufferfv:ki,emscripten_glClearBufferiv:Si,emscripten_glClearBufferuiv:Ti,emscripten_glClearColor:Ci,emscripten_glClearDepthf:Pi,emscripten_glClearStencil:Ai,emscripten_glClientWaitSync:Di,emscripten_glColorMask:Li,emscripten_glCompileShader:Ii,emscripten_glCompressedTexImage2D:Mi,emscripten_glCompressedTexImage3D:Ri,emscripten_glCompressedTexSubImage2D:Oi,emscripten_glCompressedTexSubImage3D:Bi,emscripten_glCopyBufferSubData:Ui,emscripten_glCopyTexImage2D:Ni,emscripten_glCopyTexSubImage2D:ji,emscripten_glCopyTexSubImage3D:qi,emscripten_glCreateProgram:Gi,emscripten_glCreateShader:Wi,emscripten_glCullFace:zi,emscripten_glDeleteBuffers:Vi,emscripten_glDeleteFramebuffers:Hi,emscripten_glDeleteProgram:$i,emscripten_glDeleteQueries:Yi,emscripten_glDeleteQueriesEXT:Xi,emscripten_glDeleteRenderbuffers:Ki,emscripten_glDeleteSamplers:Qi,emscripten_glDeleteShader:Zi,emscripten_glDeleteSync:Ji,emscripten_glDeleteTextures:ea,emscripten_glDeleteTransformFeedbacks:ta,emscripten_glDeleteVertexArrays:ra,emscripten_glDeleteVertexArraysOES:na,emscripten_glDepthFunc:oa,emscripten_glDepthMask:ia,emscripten_glDepthRangef:aa,emscripten_glDetachShader:sa,emscripten_glDisable:ca,emscripten_glDisableVertexAttribArray:ua,emscripten_glDrawArrays:la,emscripten_glDrawArraysInstanced:da,emscripten_glDrawArraysInstancedANGLE:fa,emscripten_glDrawArraysInstancedARB:ma,emscripten_glDrawArraysInstancedBaseInstanceWEBGL:pa,emscripten_glDrawArraysInstancedEXT:ha,emscripten_glDrawArraysInstancedNV:ga,emscripten_glDrawBuffers:ya,emscripten_glDrawBuffersEXT:ba,emscripten_glDrawBuffersWEBGL:_a,emscripten_glDrawElements:wa,emscripten_glDrawElementsInstanced:Ea,emscripten_glDrawElementsInstancedANGLE:xa,emscripten_glDrawElementsInstancedARB:ka,emscripten_glDrawElementsInstancedBaseVertexBaseInstanceWEBGL:Sa,emscripten_glDrawElementsInstancedEXT:Ta,emscripten_glDrawElementsInstancedNV:Ca,emscripten_glDrawRangeElements:Aa,emscripten_glEnable:Fa,emscripten_glEnableVertexAttribArray:Da,emscripten_glEndQuery:La,emscripten_glEndQueryEXT:Ia,emscripten_glEndTransformFeedback:Ma,emscripten_glFenceSync:Ra,emscripten_glFinish:Oa,emscripten_glFlush:Ba,emscripten_glFramebufferRenderbuffer:Ua,emscripten_glFramebufferTexture2D:Na,emscripten_glFramebufferTextureLayer:ja,emscripten_glFrontFace:qa,emscripten_glGenBuffers:Wa,emscripten_glGenFramebuffers:za,emscripten_glGenQueries:Va,emscripten_glGenQueriesEXT:Ha,emscripten_glGenRenderbuffers:$a,emscripten_glGenSamplers:Ya,emscripten_glGenTextures:Xa,emscripten_glGenTransformFeedbacks:Ka,emscripten_glGenVertexArrays:Qa,emscripten_glGenVertexArraysOES:Za,emscripten_glGenerateMipmap:Ja,emscripten_glGetActiveAttrib:ts,emscripten_glGetActiveUniform:rs,emscripten_glGetActiveUniformBlockName:ns,emscripten_glGetActiveUniformBlockiv:os,emscripten_glGetActiveUniformsiv:is,emscripten_glGetAttachedShaders:as,emscripten_glGetAttribLocation:ss,emscripten_glGetBooleanv:fs,emscripten_glGetBufferParameteri64v:ms,emscripten_glGetBufferParameteriv:ps,emscripten_glGetError:hs,emscripten_glGetFloatv:gs,emscripten_glGetFragDataLocation:vs,emscripten_glGetFramebufferAttachmentParameteriv:ys,emscripten_glGetInteger64i_v:_s,emscripten_glGetInteger64v:ws,emscripten_glGetIntegeri_v:Es,emscripten_glGetIntegerv:xs,emscripten_glGetInternalformativ:ks,emscripten_glGetProgramBinary:Ss,emscripten_glGetProgramInfoLog:Ts,emscripten_glGetProgramiv:Cs,emscripten_glGetQueryObjecti64vEXT:Ps,emscripten_glGetQueryObjectivEXT:As,emscripten_glGetQueryObjectui64vEXT:Fs,emscripten_glGetQueryObjectuiv:Ds,emscripten_glGetQueryObjectuivEXT:Ls,emscripten_glGetQueryiv:Is,emscripten_glGetQueryivEXT:Ms,emscripten_glGetRenderbufferParameteriv:Rs,emscripten_glGetSamplerParameterfv:Os,emscripten_glGetSamplerParameteriv:Bs,emscripten_glGetShaderInfoLog:Us,emscripten_glGetShaderPrecisionFormat:Ns,emscripten_glGetShaderSource:js,emscripten_glGetShaderiv:qs,emscripten_glGetString:Ws,emscripten_glGetStringi:zs,emscripten_glGetSynciv:Vs,emscripten_glGetTexParameterfv:Hs,emscripten_glGetTexParameteriv:$s,emscripten_glGetTransformFeedbackVarying:Ys,emscripten_glGetUniformBlockIndex:Xs,emscripten_glGetUniformIndices:Ks,emscripten_glGetUniformLocation:ec,emscripten_glGetUniformfv:nc,emscripten_glGetUniformiv:oc,emscripten_glGetUniformuiv:ic,emscripten_glGetVertexAttribIiv:sc,emscripten_glGetVertexAttribIuiv:cc,emscripten_glGetVertexAttribPointerv:uc,emscripten_glGetVertexAttribfv:lc,emscripten_glGetVertexAttribiv:dc,emscripten_glHint:fc,emscripten_glInvalidateFramebuffer:mc,emscripten_glInvalidateSubFramebuffer:pc,emscripten_glIsBuffer:hc,emscripten_glIsEnabled:gc,emscripten_glIsFramebuffer:vc,emscripten_glIsProgram:yc,emscripten_glIsQuery:bc,emscripten_glIsQueryEXT:_c,emscripten_glIsRenderbuffer:wc,emscripten_glIsSampler:Ec,emscripten_glIsShader:xc,emscripten_glIsSync:kc,emscripten_glIsTexture:Sc,emscripten_glIsTransformFeedback:Tc,emscripten_glIsVertexArray:Cc,emscripten_glIsVertexArrayOES:Pc,emscripten_glLineWidth:Ac,emscripten_glLinkProgram:Fc,emscripten_glMultiDrawArraysInstancedBaseInstanceWEBGL:Dc,emscripten_glMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL:Lc,emscripten_glPauseTransformFeedback:Ic,emscripten_glPixelStorei:Mc,emscripten_glPolygonOffset:Rc,emscripten_glProgramBinary:Oc,emscripten_glProgramParameteri:Bc,emscripten_glQueryCounterEXT:Uc,emscripten_glReadBuffer:Nc,emscripten_glReadPixels:Vc,emscripten_glReleaseShaderCompiler:Hc,emscripten_glRenderbufferStorage:$c,emscripten_glRenderbufferStorageMultisample:Yc,emscripten_glResumeTransformFeedback:Xc,emscripten_glSampleCoverage:Kc,emscripten_glSamplerParameterf:Qc,emscripten_glSamplerParameterfv:Zc,emscripten_glSamplerParameteri:Jc,emscripten_glSamplerParameteriv:eu,emscripten_glScissor:tu,emscripten_glShaderBinary:ru,emscripten_glShaderSource:nu,emscripten_glStencilFunc:ou,emscripten_glStencilFuncSeparate:iu,emscripten_glStencilMask:au,emscripten_glStencilMaskSeparate:su,emscripten_glStencilOp:cu,emscripten_glStencilOpSeparate:uu,emscripten_glTexImage2D:lu,emscripten_glTexImage3D:du,emscripten_glTexParameterf:fu,emscripten_glTexParameterfv:mu,emscripten_glTexParameteri:pu,emscripten_glTexParameteriv:hu,emscripten_glTexStorage2D:gu,emscripten_glTexStorage3D:vu,emscripten_glTexSubImage2D:yu,emscripten_glTexSubImage3D:bu,emscripten_glTransformFeedbackVaryings:_u,emscripten_glUniform1f:wu,emscripten_glUniform1fv:xu,emscripten_glUniform1i:ku,emscripten_glUniform1iv:Tu,emscripten_glUniform1ui:Cu,emscripten_glUniform1uiv:Pu,emscripten_glUniform2f:Au,emscripten_glUniform2fv:Fu,emscripten_glUniform2i:Du,emscripten_glUniform2iv:Lu,emscripten_glUniform2ui:Iu,emscripten_glUniform2uiv:Mu,emscripten_glUniform3f:Ru,emscripten_glUniform3fv:Ou,emscripten_glUniform3i:Bu,emscripten_glUniform3iv:Uu,emscripten_glUniform3ui:Nu,emscripten_glUniform3uiv:ju,emscripten_glUniform4f:qu,emscripten_glUniform4fv:Gu,emscripten_glUniform4i:Wu,emscripten_glUniform4iv:zu,emscripten_glUniform4ui:Vu,emscripten_glUniform4uiv:Hu,emscripten_glUniformBlockBinding:$u,emscripten_glUniformMatrix2fv:Yu,emscripten_glUniformMatrix2x3fv:Xu,emscripten_glUniformMatrix2x4fv:Ku,emscripten_glUniformMatrix3fv:Qu,emscripten_glUniformMatrix3x2fv:Zu,emscripten_glUniformMatrix3x4fv:Ju,emscripten_glUniformMatrix4fv:el,emscripten_glUniformMatrix4x2fv:tl,emscripten_glUniformMatrix4x3fv:rl,emscripten_glUseProgram:nl,emscripten_glValidateProgram:ol,emscripten_glVertexAttrib1f:il,emscripten_glVertexAttrib1fv:al,emscripten_glVertexAttrib2f:sl,emscripten_glVertexAttrib2fv:cl,emscripten_glVertexAttrib3f:ul,emscripten_glVertexAttrib3fv:ll,emscripten_glVertexAttrib4f:dl,emscripten_glVertexAttrib4fv:fl,emscripten_glVertexAttribDivisor:ml,emscripten_glVertexAttribDivisorANGLE:pl,emscripten_glVertexAttribDivisorARB:hl,emscripten_glVertexAttribDivisorEXT:gl,emscripten_glVertexAttribDivisorNV:vl,emscripten_glVertexAttribI4i:yl,emscripten_glVertexAttribI4iv:bl,emscripten_glVertexAttribI4ui:_l,emscripten_glVertexAttribI4uiv:wl,emscripten_glVertexAttribIPointer:El,emscripten_glVertexAttribPointer:xl,emscripten_glViewport:kl,emscripten_glWaitSync:Sl,emscripten_memcpy_big:Tl,emscripten_resize_heap:Pl,emscripten_ubq_codec_createDecoder:Al,emscripten_ubq_codec_createEncoder:Fl,emscripten_ubq_codec_decodeSample:Dl,emscripten_ubq_codec_destroyDecoder:Ll,emscripten_ubq_codec_destroyEncoder:Il,emscripten_ubq_codec_encodeFrame:Ml,emscripten_ubq_codec_finalizeEncoding:Rl,emscripten_ubq_codec_flushDecoder:Ol,emscripten_ubq_codec_getNumberOfDecodedFrames:Bl,emscripten_ubq_codec_isSupported:Ul,emscripten_ubq_codec_startProbing:Nl,emscripten_ubq_codec_stopProbing:jl,emscripten_ubq_codec_testAndClearTextureUpdateFlag:ql,emscripten_ubq_fetch_allocateFetchResult:Gl,emscripten_ubq_fetch_createHeader:Wl,emscripten_ubq_fetch_deleteHeader:zl,emscripten_ubq_fetch_dispatchAsyncFetch:Vl,emscripten_ubq_fetch_freeFetchResult:Hl,emscripten_ubq_fetch_getFetchCompletedBytes:$l,emscripten_ubq_fetch_getFetchResultAddress:Yl,emscripten_ubq_fetch_getFetchResultLength:Xl,emscripten_ubq_fetch_getFetchState:Kl,emscripten_ubq_fetch_getFetchTotalBytes:Ql,emscripten_webgl_create_context:id,emscripten_webgl_destroy_context:ad,emscripten_webgl_init_context_attributes:sd,emscripten_webgl_make_context_current:cd,environ_get:fd,environ_sizes_get:md,exit:_o,fd_close:pd,fd_pread:hd,fd_read:gd,fd_seek:vd,fd_write:yd,getTempRet0:bd,gettimeofday:_d,invoke_ii:Jd,invoke_iii:ef,invoke_iiii:rf,invoke_iiiii:uf,invoke_iiiiii:af,invoke_iiiiiii:cf,invoke_v:ff,invoke_vi:nf,invoke_vii:of,invoke_viii:tf,invoke_viiii:sf,invoke_viiiii:lf,invoke_viiiiii:mf,invoke_viiiiiiiii:df,setTempRet0:wd,strftime_l:Pd,time:Ad},qd=(Je(),o.___wasm_call_ctors=Ke("__wasm_call_ctors"),o._malloc=Ke("malloc")),Gd=(o._main=Ke("main"),o._free=Ke("free")),Wd=o.___errno_location=Ke("__errno_location"),zd=(o._saveSetjmp=Ke("saveSetjmp"),o.___getTypeName=Ke("__getTypeName")),Vd=(o.___embind_register_native_and_builtin_types=Ke("__embind_register_native_and_builtin_types"),o.___stdio_exit=Ke("__stdio_exit")),Hd=(o.___dl_seterr=Ke("__dl_seterr"),o._emscripten_main_thread_process_queued_calls=Ke("emscripten_main_thread_process_queued_calls"),o._emscripten_builtin_memalign=Ke("emscripten_builtin_memalign")),$d=o._setThrew=Ke("setThrew"),Yd=o._emscripten_stack_init=function(){return(Yd=o._emscripten_stack_init=o.asm.emscripten_stack_init).apply(null,arguments)},Xd=(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(Xd=o._emscripten_stack_get_end=o.asm.emscripten_stack_get_end).apply(null,arguments)}),Kd=o.stackSave=Ke("stackSave"),Qd=o.stackRestore=Ke("stackRestore"),Zd=o.stackAlloc=Ke("stackAlloc");function Jd(e,t){var r=Kd();try{return ot(e)(t)}catch(e){if(Qd(r),e!==e+0)throw e;$d(1,0)}}function ef(e,t,r){var n=Kd();try{return ot(e)(t,r)}catch(e){if(Qd(n),e!==e+0)throw e;$d(1,0)}}function tf(e,t,r,n){var o=Kd();try{ot(e)(t,r,n)}catch(e){if(Qd(o),e!==e+0)throw e;$d(1,0)}}function rf(e,t,r,n){var o=Kd();try{return ot(e)(t,r,n)}catch(e){if(Qd(o),e!==e+0)throw e;$d(1,0)}}function nf(e,t){var r=Kd();try{ot(e)(t)}catch(e){if(Qd(r),e!==e+0)throw e;$d(1,0)}}function of(e,t,r){var n=Kd();try{ot(e)(t,r)}catch(e){if(Qd(n),e!==e+0)throw e;$d(1,0)}}function af(e,t,r,n,o,i){var a=Kd();try{return ot(e)(t,r,n,o,i)}catch(e){if(Qd(a),e!==e+0)throw e;$d(1,0)}}function sf(e,t,r,n,o){var i=Kd();try{ot(e)(t,r,n,o)}catch(e){if(Qd(i),e!==e+0)throw e;$d(1,0)}}function cf(e,t,r,n,o,i,a){var s=Kd();try{return ot(e)(t,r,n,o,i,a)}catch(e){if(Qd(s),e!==e+0)throw e;$d(1,0)}}function uf(e,t,r,n,o){var i=Kd();try{return ot(e)(t,r,n,o)}catch(e){if(Qd(i),e!==e+0)throw e;$d(1,0)}}function lf(e,t,r,n,o,i){var a=Kd();try{ot(e)(t,r,n,o,i)}catch(e){if(Qd(a),e!==e+0)throw e;$d(1,0)}}function df(e,t,r,n,o,i,a,s,c,u){var l=Kd();try{ot(e)(t,r,n,o,i,a,s,c,u)}catch(e){if(Qd(l),e!==e+0)throw e;$d(1,0)}}function ff(e){var t=Kd();try{ot(e)()}catch(e){if(Qd(t),e!==e+0)throw e;$d(1,0)}}function mf(e,t,r,n,o,i,a){var s=Kd();try{ot(e)(t,r,n,o,i,a)}catch(e){if(Qd(s),e!==e+0)throw e;$d(1,0)}}function pf(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function hf(e){N(0==Be,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),N(0==_e.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));Q[n>>2]=de(l);for(var i=1;i<r;i++)Q[(n>>2)+i]=de(e[i-1]);Q[(n>>2)+r]=0;try{var a=t(r,n);return bf(a,!0),a}catch(e){return it(e)}}function gf(){Yd(),ye()}function vf(e){function r(){Nd||(Nd=!0,o.calledRun=!0,U||(Fe(),De(),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),wf&&hf(e),Ie()))}e=e||u,Be>0||(gf(),Ae(),Be>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),r()}),1)):r(),be()))}function yf(){var e=E,t=x,r=!1;E=x=e=>{r=!0};try{Vd(),["stdout","stderr"].forEach((function(e){var t=Et.analyzePath("/dev/"+e);if(t){var n=t.object.rdev,o=pt.ttys[n];o&&o.output&&o.output.length&&(r=!0)}}))}catch(e){}E=e,x=t,r&&k("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 bf(e,t){if(B=e,Ce||yf(),Pe()){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),x(r)}}else Le();_f(e)}function _f(e){B=e,Pe()||(o.onExit&&o.onExit(e),U=!0),d(e,new pf(e))}if(A("intArrayFromString",!1),A("intArrayToString",!1),A("ccall",!1),A("cwrap",!1),A("setValue",!1),o.getValue=O,A("allocate",!1),A("UTF8ArrayToString",!1),o.UTF8ToString=G,A("stringToUTF8Array",!1),A("stringToUTF8",!1),A("lengthBytesUTF8",!1),A("stackTrace",!1),A("addOnPreRun",!1),A("addOnInit",!1),A("addOnPreMain",!1),A("addOnExit",!1),A("addOnPostRun",!1),A("writeStringToMemory",!1),A("writeArrayToMemory",!1),A("writeAsciiToMemory",!1),o.addRunDependency=Ge,o.removeRunDependency=We,A("FS_createFolder",!1),o.FS_createPath=Et.createPath,o.FS_createDataFile=Et.createDataFile,o.FS_createPreloadedFile=Et.createPreloadedFile,o.FS_createLazyFile=Et.createLazyFile,A("FS_createLink",!1),o.FS_createDevice=Et.createDevice,o.FS_unlink=Et.unlink,A("getLEB",!1),A("getFunctionTables",!1),A("alignFunctionTables",!1),A("registerFunctions",!1),A("addFunction",!1),A("removeFunction",!1),A("getFuncWrapper",!1),A("prettyPrint",!1),A("dynCall",!1),A("getCompilerSetting",!1),A("print",!1),A("printErr",!1),A("getTempRet0",!1),A("setTempRet0",!1),A("callMain",!1),A("abort",!1),A("keepRuntimeAlive",!1),A("zeroMemory",!1),A("stringToNewUTF8",!1),A("emscripten_realloc_buffer",!1),A("ENV",!1),A("withStackSave",!1),A("ERRNO_CODES",!1),A("ERRNO_MESSAGES",!1),A("setErrNo",!1),A("inetPton4",!1),A("inetNtop4",!1),A("inetPton6",!1),A("inetNtop6",!1),A("readSockaddr",!1),A("writeSockaddr",!1),A("DNS",!1),A("getHostByName",!1),A("Protocols",!1),A("Sockets",!1),A("getRandomDevice",!1),A("traverseStack",!1),A("convertFrameToPC",!1),A("UNWIND_CACHE",!1),A("saveInUnwindCache",!1),A("convertPCtoSourceLocation",!1),A("readAsmConstArgsArray",!1),A("readAsmConstArgs",!1),A("mainThreadEM_ASM",!1),A("jstoi_q",!1),A("jstoi_s",!1),A("getExecutableName",!1),A("listenOnce",!1),A("autoResumeAudioContext",!1),A("dynCall",!1),A("callRuntimeCallbacks",!1),A("wasmTableMirror",!1),A("setWasmTableEntry",!1),A("getWasmTableEntry",!1),A("handleException",!1),A("runtimeKeepalivePush",!1),A("runtimeKeepalivePop",!1),A("callUserCallback",!1),A("maybeExit",!1),A("safeSetTimeout",!1),A("asmjsMangle",!1),A("asyncLoad",!1),A("alignMemory",!1),A("mmapAlloc",!1),A("reallyNegative",!1),A("unSign",!1),A("reSign",!1),A("formatString",!1),A("PATH",!1),A("PATH_FS",!1),A("SYSCALLS",!1),A("getSocketFromFD",!1),A("getSocketAddress",!1),A("JSEvents",!1),A("registerKeyEventCallback",!1),o.specialHTMLTargets=td,A("maybeCStringToJsString",!1),A("findEventTarget",!1),A("findCanvasEventTarget",!1),A("getBoundingClientRect",!1),A("fillMouseEventData",!1),A("registerMouseEventCallback",!1),A("registerWheelEventCallback",!1),A("registerUiEventCallback",!1),A("registerFocusEventCallback",!1),A("fillDeviceOrientationEventData",!1),A("registerDeviceOrientationEventCallback",!1),A("fillDeviceMotionEventData",!1),A("registerDeviceMotionEventCallback",!1),A("screenOrientation",!1),A("fillOrientationChangeEventData",!1),A("registerOrientationChangeEventCallback",!1),A("fillFullscreenChangeEventData",!1),A("registerFullscreenChangeEventCallback",!1),A("registerRestoreOldStyle",!1),A("hideEverythingExceptGivenElement",!1),A("restoreHiddenElements",!1),A("setLetterbox",!1),A("currentFullscreenStrategy",!1),A("restoreOldWindowedStyle",!1),A("softFullscreenResizeWebGLRenderTarget",!1),A("doRequestFullscreen",!1),A("fillPointerlockChangeEventData",!1),A("registerPointerlockChangeEventCallback",!1),A("registerPointerlockErrorEventCallback",!1),A("requestPointerLock",!1),A("fillVisibilityChangeEventData",!1),A("registerVisibilityChangeEventCallback",!1),A("registerTouchEventCallback",!1),A("fillGamepadEventData",!1),A("registerGamepadEventCallback",!1),A("registerBeforeUnloadEventCallback",!1),A("fillBatteryEventData",!1),A("battery",!1),A("registerBatteryEventCallback",!1),A("setCanvasElementSize",!1),A("getCanvasElementSize",!1),A("demangle",!1),A("demangleAll",!1),A("jsStackTrace",!1),A("stackTrace",!1),A("getEnvStrings",!1),A("checkWasiClock",!1),A("writeI53ToI64",!1),A("writeI53ToI64Clamped",!1),A("writeI53ToI64Signaling",!1),A("writeI53ToU64Clamped",!1),A("writeI53ToU64Signaling",!1),A("readI53FromI64",!1),A("readI53FromU64",!1),A("convertI32PairToI53",!1),A("convertU32PairToI53",!1),A("setImmediateWrapped",!1),A("clearImmediateWrapped",!1),A("polyfillSetImmediate",!1),A("uncaughtExceptionCount",!1),A("exceptionLast",!1),A("exceptionCaught",!1),A("ExceptionInfo",!1),A("CatchInfo",!1),A("exception_addRef",!1),A("exception_decRef",!1),A("Browser",!1),A("funcWrappers",!1),A("getFuncWrapper",!1),A("setMainLoop",!1),A("wget",!1),A("FS",!1),A("MEMFS",!1),A("TTY",!1),A("PIPEFS",!1),A("SOCKFS",!1),A("_setNetworkCallback",!1),A("tempFixedLengthArray",!1),A("miniTempWebGLFloatBuffers",!1),A("heapObjectForWebGLType",!1),A("heapAccessShiftForWebGLHeap",!1),A("GL",!1),A("emscriptenWebGLGet",!1),A("computeUnpackAlignedImageSize",!1),A("emscriptenWebGLGetTexPixelData",!1),A("emscriptenWebGLGetUniform",!1),A("webglGetUniformLocation",!1),A("webglPrepareUniformLocationsBeforeFirstUse",!1),A("webglGetLeftBracePos",!1),A("emscriptenWebGLGetVertexAttrib",!1),A("writeGLArray",!1),A("AL",!1),A("SDL_unicode",!1),A("SDL_ttfContext",!1),A("SDL_audio",!1),A("SDL",!1),A("SDL_gfx",!1),A("GLUT",!1),A("EGL",!1),A("GLFW_Window",!1),A("GLFW",!1),A("GLEW",!1),A("IDBStore",!1),A("runAndAbortIfError",!1),A("emscriptenWebGLGetIndexed",!1),A("InternalError",!1),A("BindingError",!1),A("UnboundTypeError",!1),A("PureVirtualError",!1),A("init_embind",!1),A("throwInternalError",!1),A("throwBindingError",!1),A("throwUnboundTypeError",!1),A("ensureOverloadTable",!1),A("exposePublicSymbol",!1),A("replacePublicSymbol",!1),A("extendError",!1),A("createNamedFunction",!1),A("registeredInstances",!1),A("getBasestPointer",!1),A("registerInheritedInstance",!1),A("unregisterInheritedInstance",!1),A("getInheritedInstance",!1),A("getInheritedInstanceCount",!1),A("getLiveInheritedInstances",!1),A("registeredTypes",!1),A("awaitingDependencies",!1),A("typeDependencies",!1),A("registeredPointers",!1),A("registerType",!1),A("whenDependentTypesAreResolved",!1),A("embind_charCodes",!1),A("embind_init_charCodes",!1),A("readLatin1String",!1),A("getTypeName",!1),A("heap32VectorToArray",!1),A("requireRegisteredType",!1),A("getShiftFromSize",!1),A("integerReadValueFromPointer",!1),A("enumReadValueFromPointer",!1),A("floatReadValueFromPointer",!1),A("simpleReadValueFromPointer",!1),A("runDestructors",!1),A("new_",!1),A("craftInvokerFunction",!1),A("embind__requireFunction",!1),A("tupleRegistrations",!1),A("structRegistrations",!1),A("genericPointerToWireType",!1),A("constNoSmartPtrRawPointerToWireType",!1),A("nonConstNoSmartPtrRawPointerToWireType",!1),A("init_RegisteredPointer",!1),A("RegisteredPointer",!1),A("RegisteredPointer_getPointee",!1),A("RegisteredPointer_destructor",!1),A("RegisteredPointer_deleteObject",!1),A("RegisteredPointer_fromWireType",!1),A("runDestructor",!1),A("releaseClassHandle",!1),A("finalizationRegistry",!1),A("detachFinalizer_deps",!1),A("detachFinalizer",!1),A("attachFinalizer",!1),A("makeClassHandle",!1),A("init_ClassHandle",!1),A("ClassHandle",!1),A("ClassHandle_isAliasOf",!1),A("throwInstanceAlreadyDeleted",!1),A("ClassHandle_clone",!1),A("ClassHandle_delete",!1),A("deletionQueue",!1),A("ClassHandle_isDeleted",!1),A("ClassHandle_deleteLater",!1),A("flushPendingDeletes",!1),A("delayFunction",!1),A("setDelayFunction",!1),A("RegisteredClass",!1),A("shallowCopyInternalPointer",!1),A("downcastPointer",!1),A("upcastPointer",!1),A("validateThis",!1),A("char_0",!1),A("char_9",!1),A("makeLegalFunctionName",!1),A("emval_handle_array",!1),A("emval_free_list",!1),A("emval_symbols",!1),A("init_emval",!1),A("count_emval_handles",!1),A("get_first_emval",!1),A("getStringOrSymbol",!1),A("Emval",!1),A("emval_newers",!1),A("craftEmvalAllocator",!1),A("emval_get_global",!1),A("emval_methodCallers",!1),A("emval_registeredMethods",!1),A("warnOnce",!1),A("stackSave",!1),A("stackRestore",!1),A("stackAlloc",!1),A("AsciiToString",!1),A("stringToAscii",!1),A("UTF16ToString",!1),A("stringToUTF16",!1),A("lengthBytesUTF16",!1),A("UTF32ToString",!1),A("stringToUTF32",!1),A("lengthBytesUTF32",!1),A("allocateUTF8",!1),A("allocateUTF8OnStack",!1),o.writeStackCookie=ye,o.checkStackCookie=be,P("ALLOC_NORMAL",!1),P("ALLOC_STACK",!1),Ne=function e(){Nd||vf(),Nd||(Ne=e)},o.run=vf,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();var wf=!0;return o.noInitialRun&&(wf=!1),vf(),e.ready});const He=Ve;var $e=r(7984),Ye=r(2934);const Xe=He,Ke=(e,t)=>null!=t?[t,e.split("/").pop()].join(""):new URL(e,window.location.origin);var Qe,Ze,Je=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},et=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 tt{constructor(e){Qe.set(this,void 0),Ze.set(this,void 0),Je(this,Qe,e,"f"),Je(this,Ze,new R(e),"f")}async loadFromString(e){return le("sceneContent",e,ae()),new Promise((t=>{et(this,Qe,"f").loadSceneFromString(e,(e=>{const r=O(e);t(r)}))}))}async loadFromURL(e){return le("url",e,ae()),new Promise((t=>{et(this,Qe,"f").loadSceneFromURL(e,(e=>{const r=O(e);t(r)}))}))}async saveToString(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):et(this,Qe,"f").saveSceneToString(r,(t=>{const r=O(t);e(r)}))}))}async saveToArchive(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):et(this,Qe,"f").saveSceneToArchive(r,(r=>{"error"in r?t(r.error):e(new Blob([r],{type:me.Zip}))}))}))}create(){return O(et(this,Qe,"f").createScene({layout:k.Free}))}createFromImage(e,t=300,r=1){return le("url",e,ae()),le("dpi",t,se(ie(),0)),le("pixelScaleFactor",r,se(ie(),0)),new Promise((n=>{et(this,Qe,"f").createSceneFromImage(e,t,r,k.Free,0,!1,(e=>{const t=O(e);n(t)}))}))}get(){const e=O(et(this,Qe,"f").findByType(d.Scene)),t=ge(e);return t.length>0?t[0]:null}async applyTemplateFromString(e){return le("content",e,ae()),new Promise((t=>{et(this,Qe,"f").applyTemplateFromString(e,(e=>{O(e),t()}))}))}async applyTemplateFromURL(e){return le("url",e,ae()),new Promise((t=>{et(this,Qe,"f").applyTemplateFromURL(e,(e=>{O(e),t()}))}))}unstable_setDesignUnit(e){le("designUnit",e,ae()),O(et(this,Qe,"f").unstable_setDesignUnit(f.fromDesignUnit(e)))}unstable_getDesignUnit(){return f.toDesignUnit(O(et(this,Qe,"f").unstable_getDesignUnit()))}}Qe=new WeakMap,Ze=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 le("key",e,ae()),le("value",t,ae()),O(nt(this,rt,"f").setVariableString(e,t))}getString(e){return le("key",e,ae()),O(nt(this,rt,"f").getVariableString(e))}remove(e){return le("key",e,ae()),O(nt(this,rt,"f").removeVariable(e))}}rt=new WeakMap;var it,at,st,ct,ut,lt,dt,ft,mt,pt,ht=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},gt=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class vt{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(d.Camera)[0];if(!e)return;if(void 0===gt(this,st,"f"))return;const{width:t,height:r}=gt(this,st,"f"),n=gt(this,at,"f").getValue(e,he.Camera,"resolution");M(n.width,t,1e-4)&&M(n.height,r,1e-4)||gt(this,at,"f").setValue(e,he.Camera,"resolution",{width:t,height:r}),"undefined"!=typeof window&&(M(gt(this,at,"f").getValue(e,he.Camera,"pixelRatio"),window.devicePixelRatio,1e-4)||gt(this,at,"f").setValue(e,he.Camera,"pixelRatio",window.devicePixelRatio))})),lt.set(this,void 0),dt.set(this,void 0),ht(this,ct,e,"f"),ht(this,at,new R(e),"f"),ht(this,st,r,"f"),this.block=new we(e),this.scene=new tt(e),this.variable=new ot(e),this.editor=new je(e),this.event=new We(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;U.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}),N.set(this,void 0),j.set(this,void 0),q.set(this,void 0),G.set(this,void 0),this.id=e,this.helper=new R(t),this.canManageAssets=null!==(n=r.canManageAssets)&&void 0!==n&&n,V(this,N,null!==(o=r.hasType)&&void 0!==o?o:()=>!1,"f"),V(this,j,null!==(i=r.getLabel)&&void 0!==i?i:(e,t)=>t,"f"),V(this,q,null!==(a=r.getTags)&&void 0!==a?a:()=>[],"f"),V(this,G,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||H(this,N,"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},H(this,G,"f"),(e=>H(this,j,"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 B.map((r=>({id:r,type:"ly.img.vectorpath",label:t(r),thumbUri:"",size:{width:1,height:1},context:e})))}({sourceId:this.id},(e=>H(this,j,"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=H(this,j,"f").call(this,e,t),c=H(this,q,"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([H(this,U,"m",W).call(this,e,"thumbPath"),H(this,U,"m",W).call(this,e,"width"),H(this,U,"m",W).call(this,e,"height"),"ly.img.vectorpath"===t?H(this,U,"m",W).call(this,e,"vectorPath"):Promise.resolve(""),"ly.img.image"===t?H(this,U,"m",W).call(this,e,"imagePath"):Promise.resolve(void 0),"ly.img.video"===t?H(this,U,"m",W).call(this,e,"videoPath"):Promise.resolve(void 0),"ly.img.sticker"===t?H(this,U,"m",W).call(this,e,"imageUri"):Promise.resolve(void 0)]),u=O(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=c()(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={},s=await Promise.all(t.map((async t=>{const n=await H(this,U,"m",z).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)))}))),c=n.filter((e=>!o[e]&&!i[e])),u=l()(...s,c);return a()(u).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))),gt(this,at,"f").useInternalAPI((e=>{e.setPreUpdateCallback(gt(this,ut,"f"))})),gt(this,it,"m",ft).call(this),"undefined"!=typeof window&&window.Cypress&&(this.config=n,this.helper=gt(this,at,"f"),this.onPostUpdate=e=>{gt(this,at,"f").useInternalAPI((t=>{t.setPostUpdateCallback(e)}))})}dispose(){gt(this,it,"m",mt).call(this),gt(this,at,"f").useInternalAPI((e=>{e.setPreUpdateCallback(null)})),ht(this,st,null,"f"),ht(this,at,null,"f"),this.block=null,this.scene=null,this.variable=null,gt(this,ct,"f").delete(),ht(this,ct,null,"f")}static async init(e,t){console.log("[CreativeEngine] Revision 6ae356d54f5ff703ad9bd49d47ec4c2751f6e1bd"),"undefined"==typeof document||t||(t=document.createElement("canvas"));const r=Re(e);return new this(await function(e,t){const r=Re(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:Ce;var i,a,s;return new Promise(((t,i)=>{let a,s;return Xe({locateFile:(e,t)=>{if(e.endsWith(".wasm")){const e=Ke(Ye,n.baseURL).toString();return a=e,e}if(e.endsWith(".data")){const e=Ke($e,n.baseURL).toString();return s=e,e}return t+e},print:e=>{e&&"undefined"!==e&&o(e,Ee.Info)},printErr:e=>{e&&"undefined"!==e&&o(e,Ee.Error)},onRuntimeInitialized:()=>{o("Engine has been initialized.",Ee.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 R(e);function o(e,t){return n.execute("ubq/settings/set",[e,t])}o("ubq://license",t.license||""),o("ubq://role",P[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,forceVideoDisabled:n}=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=F.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])=>{O(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,ft=function(e=!0){if(gt(this,lt,"f"))return;if("undefined"!=typeof HTMLCanvasElement&&gt(this,st,"f")instanceof HTMLCanvasElement){const e=function(e,t,r){const n=t=>{var n,o;const i=e.getBoundingClientRect(),a=null!==(n=null==i?void 0:i.top)&&void 0!==n?n:0,s=null!==(o=null==i?void 0:i.left)&&void 0!==o?o:0,c=function(e){return"undefined"!=typeof TouchEvent&&e instanceof TouchEvent}(t),u=c?t.changedTouches[0].clientX:t.clientX,l=c?t.changedTouches[0].clientY:t.clientY;return c&&t.target===e&&t.cancelable&&"Text"!==r.getEditMode()&&t.preventDefault(),{position:{x:(u-s)*window.devicePixelRatio,y:(l-a)*window.devicePixelRatio},isOverUIElement:t.target!==e,isTouch:c,timestamp:Date.now()}},o=e=>{const r=n(e);r.isTouch&&e.preventDefault(),t.execute("ubq/inputs/mousemove",r)},i=e=>{const r=Object.assign(Object.assign({},n(e)),{button:C(e instanceof MouseEvent?e.button:v.Left),state:y.Up,shiftIsHeld:e.shiftKey});t.execute("ubq/inputs/mousebutton",r),t.ubq.update()},a=e=>{const r=Object.assign(Object.assign({},n(e)),{button:C(e instanceof MouseEvent?e.button:v.Left),state:y.Down,shiftIsHeld:e.shiftKey});t.execute("ubq/inputs/mousebutton",r)};return document.addEventListener("mousemove",o),document.addEventListener("mousedown",a),document.addEventListener("mouseup",i),document.addEventListener("touchmove",o),document.addEventListener("touchstart",a),document.addEventListener("touchend",i),document.addEventListener("touchcancel",i),()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mousedown",a),document.removeEventListener("mouseup",i),document.removeEventListener("touchmove",o),document.removeEventListener("touchstart",a),document.removeEventListener("touchend",i),document.removeEventListener("touchcancel",i)}}(gt(this,st,"f"),gt(this,at,"f"),this.editor),t=function(e,t,r){let n,o=null;const i=r.onStateChanged((()=>{n=r.getEditMode(),"Text"!==n||o?"Text"!==n&&o&&(o(),o=null):o=function(){var n;let o=!1;const i=document.createElement("textarea");i.id="ubq_internal-inline_text_editing_html_representation",i.autocapitalize="none",i.spellcheck=!1,i.cols=4096,i.style.contain="strict",i.style.opacity="0",i.style.pointerEvents="none",i.style.zIndex="-1",i.style.position="absolute",i.style.width="1px",i.style.height="1px",i.style.padding="0",i.style.margin="-1px",i.style.overflow="hidden",i.style.clip="rect(0, 0, 0, 0)",i.style.whiteSpace="nowrap",i.style.border="0";const a=()=>{const e=r.getTextCursorPositionInScreenSpaceX(),t=r.getTextCursorPositionInScreenSpaceY();i.style.left=`${e}px`,i.style.top=`${t}px`};a(),i.addEventListener("input",u),i.addEventListener("keydown",l),i.addEventListener("copy",c),i.addEventListener("compositionstart",d),i.addEventListener("compositionupdate",f),i.addEventListener("compositionend",m),document.addEventListener("touchend",p),document.addEventListener("mousedown",p),document.addEventListener("mouseup",p),document.addEventListener("click",p);const s=r.onStateChanged(a);return null===(n=null==e?void 0:e.parentElement)||void 0===n||n.appendChild(i),i.focus(),()=>{var t;i.removeEventListener("input",u),i.removeEventListener("keydown",l),i.removeEventListener("copy",c),i.removeEventListener("compositionstart",d),i.removeEventListener("compositionupdate",f),i.removeEventListener("compositionend",m),document.removeEventListener("click",p),document.removeEventListener("mousedown",p),document.removeEventListener("mouseup",p),document.removeEventListener("touchend",p),s(),null===(t=null==e?void 0:e.parentElement)||void 0===t||t.removeChild(i)};function c(e){try{t.useInternalAPI((t=>{const r=O(t.getSelectedText());""!==r&&e.clipboardData&&(e.clipboardData.setData("text/plain",r),e.preventDefault())}))}catch(e){console.error(e)}}function u(e){var r,n;const i=e.target,{value:a}=i;let s=a.length;if(o){s=null!==(n=null!==(r=i.selectionEnd)&&void 0!==r?r:i.selectionStart)&&void 0!==n?n: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:b.Unknown,characters:a,shiftIsHeld:!1,commandIsHeld:!1,optionIsHeld:!1,timestamp:Date.now()};t.execute("ubq/inputs/keyboardkey",e)}i.value=""}}async function l(e){if("a"===e.key&&(e.metaKey||e.ctrlKey))return o&&(await t.execute("ubq/text/compositionEnd"),o=!1,e.currentTarget&&(i.value="")),void await t.execute("ubq/text/selectAllText");if("Escape"===e.key)return void async function(){r.setEditMode("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 n=function(e){const t={key:b.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=b.Key0;break;case"1":t.key=b.Key1;break;case"2":t.key=b.Key2;break;case"3":t.key=b.Key3;break;case"4":t.key=b.Key4;break;case"5":t.key=b.Key5;break;case"6":t.key=b.Key6;break;case"7":t.key=b.Key7;break;case"8":t.key=b.Key8;break;case"9":t.key=b.Key9;break;case"A":t.key=b.A;break;case"B":t.key=b.B;break;case"C":t.key=b.C;break;case"D":t.key=b.D;break;case"E":t.key=b.E;break;case"F":t.key=b.F;break;case"G":t.key=b.G;break;case"H":t.key=b.H;break;case"I":t.key=b.I;break;case"J":t.key=b.J;break;case"K":t.key=b.K;break;case"L":t.key=b.L;break;case"M":t.key=b.M;break;case"N":t.key=b.N;break;case"O":t.key=b.O;break;case"P":t.key=b.P;break;case"Q":t.key=b.Q;break;case"R":t.key=b.R;break;case"S":t.key=b.S;break;case"T":t.key=b.T;break;case"U":t.key=b.U;break;case"V":t.key=b.V;break;case"W":t.key=b.W;break;case"X":t.key=b.X;break;case"Y":t.key=b.Y;break;case"Z":t.key=b.Z;break;case" ":t.key=b.Space;break;case"ESCAPE":t.key=b.Escape,t.characters="";break;case"BACKSPACE":t.key=b.Backspace,t.characters="";break;case"DELETE":t.key=b.Delete,t.characters="";break;case"ENTER":t.key=b.Enter,t.characters="\n";break;case"CONTROL":t.key=b.Control,t.characters="";break;case"ALT":t.key=b.Option,t.characters="";break;case"SHIFT":t.key=b.Shift,t.characters="";break;case"ARROWLEFT":t.key=b.ArrowLeft,t.characters="";break;case"ARROWRIGHT":t.key=b.ArrowRight,t.characters="";break;case"ARROWUP":t.key=b.ArrowUp,t.characters="";break;case"ARROWDOWN":t.key=b.ArrowDown,t.characters="";break;case"DEAD":t.key=b.Unknown,t.characters=""}return t}(e);await t.execute("ubq/inputs/keyboardkey",n),e.currentTarget&&(i.value="")}async function d(){o=!0,await t.execute("ubq/text/compositionStart")}function f(){o=!0}async function m(){o=!1,await t.execute("ubq/text/compositionEnd"),i.value=""}function p(t){t.target===e?"Text"===r.getEditMode()&&(i.focus(),t instanceof TouchEvent&&t.cancelable&&t.preventDefault()):r.setEditMode("Transform")}}()}));return()=>{null==o||o(),i()}}(gt(this,st,"f"),gt(this,at,"f"),this.editor);ht(this,dt,(()=>{e(),t()}),"f")}const t=()=>{gt(this,it,"m",pt).call(this,e),ht(this,lt,requestAnimationFrame(t),"f")};ht(this,lt,requestAnimationFrame(t),"f")},mt=function(){var e;null===(e=gt(this,dt,"f"))||void 0===e||e.call(this),ht(this,dt,void 0,"f"),gt(this,lt,"f")&&(cancelAnimationFrame(gt(this,lt,"f")),ht(this,lt,0,"f"))},pt=function(e=!0){e&&void 0!==gt(this,st,"f")&&1===this.block.findByType(d.Scene).length&&gt(this,at,"f").execute("ubq/render",{displayWidth:gt(this,st,"f").width,displayHeight:gt(this,st,"f").height}),gt(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),f=!r&&!l&&!d&&c(e),m=r||l||d||f,p=m?n(e.length,String):[],h=p.length;for(var g in e)!t&&!u.call(e,g)||m&&("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,h))||p.push(g);return p}},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,f=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(n(e)?f:s).test(a(e))}},9920:(e,t,r)=>{var n=r(2759),o=r(7906),i=r(1408),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[n(e)]}},3339:(e,t,r)=>{var n=r(4820),o=r(7839),i=r(3003),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!n(e))return i(e);var t=o(e),r=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&r.push(s);return r}},7604:(e,t,r)=>{var n=r(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,f){t!==r&&i(r,(function(i,c){if(f||(f=new n),s(i))a(t,r,c,l,e,d,f);else{var m=d?d(u(t,c),i,c+"",t,r,f):void 0;void 0===m&&(m=i),o(t,c,m)}}),c)}},480:(e,t,r)=>{var n=r(1612),o=r(8192),i=r(9947),a=r(6581),s=r(1172),c=r(5664),u=r(5860),l=r(5274),d=r(9571),f=r(830),m=r(4820),p=r(1969),h=r(1859),g=r(7700),v=r(2963);e.exports=function(e,t,r,y,b,_,w){var E=g(e,r),x=g(t,r),k=w.get(x);if(k)n(e,r,k);else{var S=_?_(E,x,r+"",e,t,w):void 0,T=void 0===S;if(T){var C=u(x),P=!C&&d(x),A=!C&&!P&&h(x);S=x,C||P||A?u(E)?S=E:l(E)?S=a(E):P?(T=!1,S=o(x,!0)):A?(T=!1,S=i(x,!0)):S=[]:p(x)||c(x)?(S=E,c(E)?S=v(E):m(E)&&!f(E)||(S=s(x))):T=!1}T&&(w.set(x,S),b(S,x,y,_,w),w.delete(x)),n(e,r,S)}}},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+")",f="(?:"+l+"|"+s+")",m="(?:['’](?:d|ll|m|re|s|t|ve))?",p="(?:['’](?:D|LL|M|RE|S|T|VE))?",h="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",g="[\\ufe0e\\ufe0f]?",v=g+h+"(?:\\u200d(?:"+["[^\\ud800-\\udfff]",c,u].join("|")+")"+g+h+")*",y="(?:"+["[\\u2700-\\u27bf]",c,u].join("|")+")"+v,b=RegExp([l+"?"+a+"+"+m+"(?="+[o,l,"$"].join("|")+")",f+"+"+p+"(?="+[o,l+d,"$"].join("|")+")",l+"?"+d+"+"+m,l+"+"+p,"\\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(b)||[]}},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:()=>F,yQ:()=>e,Ju:()=>d,in:()=>Ee,HY:()=>me,uU:()=>P,ZP:()=>vt});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=r(9423),a=r.n(i),s=r(582),c=r.n(s),u=r(3145),l=r.n(u);!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"}(o||(o={}));const d=o;var f,m,p,h,g,v,y,b,_,w,E,x,k,S,T;function C(e){switch(e){case 0:return v.Left;case 1:return v.Middle;case 2:return v.Right;default:return v.Unknown}}!function(e){e[e.Pixel=0]="Pixel",e[e.Millimeter=1]="Millimeter",e[e.Inch=2]="Inch"}(f||(f={})),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!")}}}(f||(f={})),function(e){e[e.Pending=0]="Pending",e[e.Ready=1]="Ready",e[e.Error=2]="Error"}(m||(m={})),function(e){e.Added="DesignBlockAddedEvent",e.Updated="DesignBlockUpdatedEvent",e.Removed="DesignBlockRemovedEvent"}(p||(p={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Center=2]="Center"}(h||(h={})),function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom",e[e.Center=2]="Center"}(g||(g={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right",e[e.Middle=2]="Middle",e[e.Unknown=255]="Unknown"}(v||(v={})),function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(y||(y={})),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"}(b||(b={})),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"}(_||(_={})),function(e){e[e.Normal=0]="Normal",e[e.Italic=1]="Italic"}(w||(w={})),function(e){e.Bold="bold",e.Italic="italic"}(E||(E={})),function(e){e[e.Undefined=0]="Undefined",e[e.DesignUnit=1]="DesignUnit",e[e.Percent=2]="Percent",e[e.Auto=3]="Auto"}(x||(x={})),function(e){e[e.Free=0]="Free",e[e.VerticalStack=1]="VerticalStack",e[e.HorizontalStack=2]="HorizontalStack"}(k||(k={})),function(e){e[e.Information=0]="Information",e[e.Warning=1]="Warning",e[e.Error=2]="Error"}(S||(S={})),function(e){e[e.Creator=0]="Creator",e[e.Adopter=1]="Adopter",e[e.Viewer=2]="Viewer",e[e.Presenter=3]="Presenter"}(T||(T={}));const P=T;var A,F,D,L;!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"}(A||(A={})),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!")}}}(F||(F={})),function(e){e.Transform="ubq/editMode/transform",e.Crop="ubq/editMode/crop",e.Text="ubq/editMode/text"}(D||(D={})),function(e){e[e.Arrow=0]="Arrow",e[e.Move=1]="Move",e[e.MoveNotPermitted=2]="MoveNotPermitted",e[e.Resize=3]="Resize",e[e.Rotate=4]="Rotate",e[e.Text=5]="Text"}(L||(L={}));const I=(e,t)=>({x:e.x*t,y:e.y*t});function R(e,t,r=Number.EPSILON){return Math.abs(e-t)<r}class M{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=O(this.ubq.getLastFrameWidth(t)),i=O(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 I(t,r>n?e.y/t.y:e.x/t.x)})(e,t),o=I(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=>O(o.setValue(e,t,r,n))))}getValue(e,t,r){return this.useInternalAPI((n=>O(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=O(e);r(t)})))).delete()}))}}function O(e){if(e.isValid()){const t=e.value();return e.delete(),t}{const t=e.error(),r=t.publicMessage();throw t.delete(),e.delete(),new Error(r)}}const B=[d.RectShape,d.LineShape,d.StarShape,d.PolygonShape,d.EllipseShape];var U,N,j,q,G,W,V,z=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},H=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)};N=new WeakMap,j=new WeakMap,q=new WeakMap,G=new WeakMap,U=new WeakSet,W=async function(e,t){return this.helper.execute("ubq/assets/getMetadata",[e,t])},V=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 $ 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 Y(e){return"object"==typeof e&&null!=e}function X(e){return"string"==typeof e?JSON.stringify(e):""+e}function K(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: `"+X(n)+"`"}=e;return{value:n,type:a,refinement:s,key:o[o.length-1],path:o,branch:i,...e,message:c}}function*Q(e,t,r,n){var o;Y(o=e)&&"function"==typeof o[Symbol.iterator]||(e=[e]);for(const o of e){const e=K(o,t,r,n);e&&(yield e)}}function*Z(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&&Y(t.schema)&&Y(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=Z(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):Y(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 J{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)=>Q(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>Q(o(e,t),t,this,e):()=>[]}assert(e){return function(e,t){const r=ee(e,t);if(r[0])throw r[0]}(e,this)}create(e){return function(e,t){const r=ee(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}(e,this)}is(e){return function(e,t){return!ee(e,t)[0]}(e,this)}mask(e){return function(e,t){const r=ee(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}(e,this)}validate(e,t={}){return ee(e,this,t)}}function ee(e,t,r={}){const n=Z(e,t,r),o=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(n);return o[0]?[new $(o[0],(function*(){for(const e of n)e[0]&&(yield e[0])})),void 0]:[void 0,o[1]]}function te(e,t){return new J({type:e,schema:null,validator:t})}function re(e){return new J({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: "+X(e)})}function ne(){return te("boolean",(e=>"boolean"==typeof e))}function oe(){return te("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||"Expected an integer, but received: "+X(e)))}function ie(){return te("number",(e=>"number"==typeof e&&!isNaN(e)||"Expected a number, but received: "+X(e)))}function ae(){return te("string",(e=>"string"==typeof e||"Expected a string, but received: "+X(e)))}function se(e,t,r={}){const{exclusive:n}=r;return ue(e,"min",(r=>n?r>t:r>=t||"Expected a "+e.type+" greater than "+(n?"":"or equal to ")+t+" but received `"+r+"`"))}function ce(e){return ue(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 ue(e,t,r){return new J({...e,*refiner(n,o){yield*e.refiner(n,o);const i=Q(r(n,o),o,e,n);for(const e of i)yield{...e,refinement:t}}})}function le(e,t,r){const[n]=ee(t,r);if(n)throw n.message=`Error in argument '${e}': ${n.message}`,n}function de(){const e=/image\/(png|jpeg|x-tga)|video\/mp4|application\/octet-stream|application\/pdf/;return te("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 fe;!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"}(fe||(fe={}));const me=fe;var pe;!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"}(pe||(pe={}));const he=pe,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 ve,ye,be=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},_e=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class we{constructor(e){ve.set(this,void 0),ye.set(this,void 0),be(this,ve,e,"f"),be(this,ye,new M(e),"f")}async export(e,t=me.Png){return le("handle",e,ie()),le("mimeType",t,de()),new Promise(((r,n)=>{_e(this,ve,"f").exportToBuffer(e,t,(e=>{"error"in e?n(e.error):r(new Blob([e],{type:t}))}),{jpegQuality:.9,pngCompressionLevel:5,useTargetSize:!1,targetWidth:0,targetHeight:0})}))}async unstable_exportVideo(e,t,r,n=me.Mp4,o,i,a,s){return le("handle",e,ie()),le("mimeType",n,de()),le("resolutionWidth",o,oe()),le("resolutionHeight",i,oe()),le("framerate",a,ie()),new Promise(((c,u)=>{_e(this,ve,"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 le("content",e,ae()),new Promise((t=>{_e(this,ve,"f").loadBlocksFromString(e,(e=>{const r=O(e);t(ge(r))}))}))}async saveToString(e){return le("blocks",e,re(ie())),new Promise((t=>{_e(this,ve,"f").saveBlocksToString(e,(e=>{const r=O(e);t(r)}))}))}create(e){return le("type",e,ae()),O(_e(this,ve,"f").create(e))}unstable_createFromAsset(e,t,r,n){return le("id",e,ae()),le("type",t,ae()),le("mimeType",r,ae()),new Promise(((o,i)=>{_e(this,ve,"f").createFromAsset(e,t,r,n,(e=>{try{o(O(e))}catch(e){i(e)}}))}))}getType(e){return le("id",e,oe()),O(_e(this,ve,"f").getType(e))}setSelected(e,t){return le("id",e,oe()),le("selected",t,ne()),O(_e(this,ve,"f").setSelected(e,t))}isSelected(e){return le("id",e,oe()),O(_e(this,ve,"f").isSelected(e))}findAllSelected(){return ge(_e(this,ve,"f").findAllSelected())}isGroupable(e){return le("ids",e,ce(re(ie()))),O(_e(this,ve,"f").isGroupable(e))}group(e){return le("ids",e,ce(re(ie()))),O(_e(this,ve,"f").group(e))}ungroup(e){return le("id",e,ie()),O(_e(this,ve,"f").ungroup(e))}enterGroup(e){return le("id",e,ie()),O(_e(this,ve,"f").enterGroup(e))}exitGroup(e){return le("id",e,ie()),O(_e(this,ve,"f").exitGroup(e))}setName(e,t){return le("id",e,oe()),le("name",t,ae()),_e(this,ye,"f").setValue(e,he.Common,"name",t)}getName(e){return le("id",e,oe()),_e(this,ye,"f").getValue(e,he.Common,"name")}findByName(e){le("name",e,ae());const t=_e(this,ve,"f").findByName(e);return ge(t)}findByType(e){le("type",e,ae());const t=O(_e(this,ve,"f").findByType(e));return ge(t)}findAll(){return ge(_e(this,ve,"f").findAll())}findAllPlaceholders(){return ge(_e(this,ve,"f").findAllPlaceholders())}isVisible(e){return le("id",e,oe()),O(_e(this,ve,"f").isVisible(e))}setVisible(e,t){return le("id",e,oe()),le("visible",t,ne()),O(_e(this,ve,"f").setVisible(e,t))}isClipped(e){return le("id",e,oe()),O(_e(this,ve,"f").isClipped(e))}setClipped(e,t){return le("id",e,oe()),le("clipped",t,ne()),O(_e(this,ve,"f").setClipped(e,t))}getPositionX(e){return le("id",e,oe()),O(_e(this,ve,"f").getPositionX(e))}getPositionXMode(e){return le("id",e,oe()),O(_e(this,ve,"f").getPositionXMode(e))}getPositionY(e){return le("id",e,oe()),O(_e(this,ve,"f").getPositionY(e))}getPositionYMode(e){return le("id",e,oe()),O(_e(this,ve,"f").getPositionYMode(e))}setPositionX(e,t){return le("id",e,oe()),le("value",t,ie()),O(_e(this,ve,"f").setPositionX(e,t))}setPositionXMode(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setPositionXMode(e,t))}setPositionY(e,t){return le("id",e,oe()),le("value",t,ie()),O(_e(this,ve,"f").setPositionY(e,t))}setPositionYMode(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setPositionYMode(e,t))}getRotation(e){return le("id",e,oe()),O(_e(this,ve,"f").getRotation(e))}setRotation(e,t){return le("id",e,oe()),le("radians",t,ie()),O(_e(this,ve,"f").setRotation(e,t))}getFlipHorizontal(e){return le("id",e,oe()),O(_e(this,ve,"f").getFlip(e)).horizontal}getFlipVertical(e){return le("id",e,oe()),O(_e(this,ve,"f").getFlip(e)).vertical}setFlipHorizontal(e,t){return le("id",e,oe()),le("flip",t,ne()),O(_e(this,ve,"f").setFlipHorizontal(e,t))}setFlipVertical(e,t){return le("id",e,oe()),le("flip",t,ne()),O(_e(this,ve,"f").setFlipVertical(e,t))}hasContentFillMode(e){return le("id",e,oe()),O(_e(this,ve,"f").hasContentFillMode(e))}hasPlaceholderContent(e){return le("id",e,oe()),O(_e(this,ve,"f").hasPlaceholderContent(e))}getWidth(e){return le("id",e,oe()),O(_e(this,ve,"f").getWidth(e))}getWidthMode(e){return le("id",e,oe()),O(_e(this,ve,"f").getWidthMode(e))}getHeight(e){return le("id",e,oe()),O(_e(this,ve,"f").getHeight(e))}getHeightMode(e){return le("id",e,oe()),O(_e(this,ve,"f").getHeightMode(e))}getContentFillMode(e){return le("id",e,oe()),O(_e(this,ve,"f").getContentFillMode(e))}setWidth(e,t){return le("id",e,oe()),le("value",t,ie()),O(_e(this,ve,"f").setWidth(e,t))}setWidthMode(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setWidthMode(e,t))}setHeight(e,t){return le("id",e,oe()),le("value",t,ie()),O(_e(this,ve,"f").setHeight(e,t))}setHeightMode(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setHeightMode(e,t))}setContentFillMode(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setContentFillMode(e,t))}getFrameWidth(e){return le("id",e,oe()),O(_e(this,ve,"f").getLastFrameWidth(e))}getFrameHeight(e){return le("id",e,oe()),O(_e(this,ve,"f").getLastFrameHeight(e))}duplicate(e){return le("id",e,oe()),O(_e(this,ve,"f").duplicate(e))}destroy(e){return le("id",e,oe()),O(_e(this,ve,"f").destroy(e))}isValid(e){return le("id",e,oe()),_e(this,ve,"f").isValid(e)}getParent(e){return le("id",e,oe()),O(_e(this,ve,"f").hasParent(e))?O(_e(this,ve,"f").getParent(e)):null}getChildren(e){le("id",e,oe());const t=O(_e(this,ve,"f").getChildren(e));return ge(t)}insertChild(e,t,r){return le("parent",e,ie()),le("child",t,ie()),le("index",r,se(ie(),0)),O(_e(this,ve,"f").insertChild(e,t,r))}appendChild(e,t){return le("parent",e,ie()),le("child",t,ie()),O(_e(this,ve,"f").appendChild(e,t))}referencesAnyVariables(e){return le("id",e,oe()),O(_e(this,ve,"f").referencesAnyVariables(e))}getGlobalBoundingBoxX(e){return le("id",e,oe()),O(_e(this,ve,"f").getGlobalBoundingBoxX(e))}getGlobalBoundingBoxY(e){return le("id",e,oe()),O(_e(this,ve,"f").getGlobalBoundingBoxY(e))}getGlobalBoundingBoxWidth(e){return le("id",e,oe()),O(_e(this,ve,"f").getGlobalBoundingBoxWidth(e))}getGlobalBoundingBoxHeight(e){return le("id",e,oe()),O(_e(this,ve,"f").getGlobalBoundingBoxHeight(e))}scale(e,t,r=0,n=0){return le("id",e,oe()),O(_e(this,ve,"f").scale(e,t,r,n))}findAllProperties(e){return le("id",e,oe()),ge(O(_e(this,ve,"f").findAllProperties(e)))}getPropertyType(e){return le("property",e,ae()),O(_e(this,ve,"f").getPropertyType(e))}getEnumValues(e){return le("enumProperty",e,ae()),ge(O(_e(this,ve,"f").getEnumValues(e)))}setBool(e,t,r){return le("id",e,oe()),le("property",t,ae()),le("value",r,ne()),O(_e(this,ve,"f").setBool(e,t,r))}getBool(e,t){return le("id",e,oe()),le("property",t,ae()),O(_e(this,ve,"f").getBool(e,t))}setInt(e,t,r){return le("id",e,oe()),le("property",t,ae()),le("value",r,oe()),O(_e(this,ve,"f").setInt(e,t,r))}getInt(e,t){return le("id",e,oe()),le("property",t,ae()),O(_e(this,ve,"f").getInt(e,t))}setFloat(e,t,r){return le("id",e,oe()),le("property",t,ae()),le("value",r,ie()),O(_e(this,ve,"f").setFloat(e,t,r))}getFloat(e,t){return le("id",e,oe()),le("property",t,ae()),O(_e(this,ve,"f").getFloat(e,t))}setString(e,t,r){return le("id",e,oe()),le("property",t,ae()),le("value",r,ae()),O(_e(this,ve,"f").setString(e,t,r))}getString(e,t){return le("id",e,oe()),le("property",t,ae()),O(_e(this,ve,"f").getString(e,t))}setColorRGBA(e,t,r,n,o,i=1){return le("id",e,oe()),le("property",t,ae()),le("r",r,ie()),le("g",n,ie()),le("b",o,ie()),le("a",i,ie()),O(_e(this,ve,"f").setColorRGBA(e,t,r,n,o,i))}getColorRGBA(e,t){return le("id",e,oe()),le("property",t,ae()),O(_e(this,ve,"f").getColorRGBA(e,t))}setEnum(e,t,r){return le("id",e,oe()),le("property",t,ae()),le("value",r,ae()),O(_e(this,ve,"f").setEnum(e,t,r))}getEnum(e,t){return le("id",e,oe()),le("property",t,ae()),O(_e(this,ve,"f").getEnum(e,t))}hasCrop(e){return le("id",e,oe()),O(_e(this,ve,"f").hasCrop(e))}setCropScaleX(e,t){return le("id",e,oe()),le("scaleX",t,ie()),O(_e(this,ve,"f").setCropScaleX(e,t))}setCropScaleY(e,t){return le("id",e,oe()),le("scaleY",t,ie()),O(_e(this,ve,"f").setCropScaleY(e,t))}setCropRotation(e,t){return le("id",e,oe()),le("rotation",t,ie()),O(_e(this,ve,"f").setCropRotation(e,t))}setCropTranslationX(e,t){return le("id",e,oe()),le("translationX",t,ie()),O(_e(this,ve,"f").setCropTranslationX(e,t))}setCropTranslationY(e,t){return le("id",e,oe()),le("translationY",t,ie()),O(_e(this,ve,"f").setCropTranslationY(e,t))}resetCrop(e){return le("id",e,oe()),O(_e(this,ve,"f").resetCrop(e))}getCropScaleX(e){return le("id",e,oe()),O(_e(this,ve,"f").getCropScaleX(e))}getCropScaleY(e){return le("id",e,oe()),O(_e(this,ve,"f").getCropScaleY(e))}getCropRotation(e){return le("id",e,oe()),O(_e(this,ve,"f").getCropRotation(e))}getCropTranslationX(e){return le("id",e,oe()),O(_e(this,ve,"f").getCropTranslationX(e))}getCropTranslationY(e){return le("id",e,oe()),O(_e(this,ve,"f").getCropTranslationY(e))}hasOpacity(e){return le("id",e,oe()),O(_e(this,ve,"f").hasOpacity(e))}setOpacity(e,t){return le("id",e,oe()),le("opacity",t,ie()),O(_e(this,ve,"f").setOpacity(e,t))}getOpacity(e){return le("id",e,oe()),O(_e(this,ve,"f").getOpacity(e))}hasBlendMode(e){return le("id",e,oe()),O(_e(this,ve,"f").hasBlendMode(e))}setBlendMode(e,t){return le("id",e,oe()),le("blendMode",t,ae()),O(_e(this,ve,"f").setBlendMode(e,t))}getBlendMode(e){return le("id",e,oe()),O(_e(this,ve,"f").getBlendMode(e))}hasFillColor(e){return le("id",e,oe()),O(_e(this,ve,"f").hasFillColor(e))}setFillColorRGBA(e,t,r,n,o=1){return le("id",e,oe()),le("r",t,ie()),le("g",r,ie()),le("b",n,ie()),le("a",o,ie()),O(_e(this,ve,"f").setFillColorRGBA(e,t,r,n,o))}getFillColorRGBA(e){return le("id",e,oe()),O(_e(this,ve,"f").getFillColorRGBA(e))}setFillColorEnabled(e,t){return le("id",e,oe()),le("enabled",t,ne()),O(_e(this,ve,"f").setFillColorEnabled(e,t))}isFillColorEnabled(e){return le("id",e,oe()),O(_e(this,ve,"f").isFillColorEnabled(e))}hasBackgroundColor(e){return le("id",e,oe()),O(_e(this,ve,"f").hasBackgroundColor(e))}setBackgroundColorRGBA(e,t,r,n,o=1){return le("id",e,oe()),le("r",t,ie()),le("g",r,ie()),le("b",n,ie()),le("a",o,ie()),O(_e(this,ve,"f").setBackgroundColorRGBA(e,t,r,n,o))}getBackgroundColorRGBA(e){return le("id",e,oe()),O(_e(this,ve,"f").getBackgroundColorRGBA(e))}setBackgroundColorEnabled(e,t){return le("id",e,oe()),le("enabled",t,ne()),O(_e(this,ve,"f").setBackgroundColorEnabled(e,t))}isBackgroundColorEnabled(e){return le("id",e,oe()),O(_e(this,ve,"f").isBackgroundColorEnabled(e))}hasStroke(e){return le("id",e,oe()),O(_e(this,ve,"f").hasStroke(e))}setStrokeEnabled(e,t){return le("id",e,oe()),le("enabled",t,ne()),O(_e(this,ve,"f").setStrokeEnabled(e,t))}isStrokeEnabled(e){return le("id",e,oe()),O(_e(this,ve,"f").isStrokeEnabled(e))}setStrokeColorRGBA(e,t,r,n,o=1){return le("id",e,oe()),le("r",t,ie()),le("g",r,ie()),le("b",n,ie()),le("a",o,ie()),O(_e(this,ve,"f").setStrokeColorRGBA(e,t,r,n,o))}getStrokeColorRGBA(e){return le("id",e,oe()),O(_e(this,ve,"f").getStrokeColorRGBA(e))}setStrokeWidth(e,t){return le("id",e,oe()),le("width",t,ie()),O(_e(this,ve,"f").setStrokeWidth(e,t))}getStrokeWidth(e){return le("id",e,oe()),O(_e(this,ve,"f").getStrokeWidth(e))}setStrokeStyle(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setStrokeStyle(e,t))}getStrokeStyle(e){return le("id",e,oe()),O(_e(this,ve,"f").getStrokeStyle(e))}setStrokePosition(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setStrokePosition(e,t))}getStrokePosition(e){return le("id",e,oe()),O(_e(this,ve,"f").getStrokePosition(e))}setStrokeCornerGeometry(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setStrokeCornerGeometry(e,t))}getStrokeCornerGeometry(e){return le("id",e,oe()),O(_e(this,ve,"f").getStrokeCornerGeometry(e))}hasOutline(e){return le("id",e,oe()),this.hasStroke(e)}setOutlineColorRGBA(e,t,r,n,o=1){return le("id",e,oe()),le("r",t,ie()),le("g",r,ie()),le("b",n,ie()),le("a",o,ie()),this.setStrokeColorRGBA(e,t,r,n,o)}getOutlineColorRGBA(e){return le("id",e,oe()),this.getStrokeColorRGBA(e)}setOutlineEnabled(e,t){return le("id",e,oe()),le("enabled",t,ne()),this.setStrokeEnabled(e,t)}isOutlineEnabled(e){return le("id",e,oe()),this.isStrokeEnabled(e)}setOutlineWidth(e,t){return le("id",e,oe()),le("width",t,ie()),this.setStrokeWidth(e,t)}getOutlineWidth(e){return le("id",e,oe()),this.getStrokeWidth(e)}hasFill(e){return le("id",e,oe()),O(_e(this,ve,"f").hasFill(e))}isFillEnabled(e){return le("id",e,oe()),O(_e(this,ve,"f").isFillEnabled(e))}setFillEnabled(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setFillEnabled(e,t))}setFillType(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setFillType(e,t))}getFillType(e){return le("id",e,oe()),O(_e(this,ve,"f").getFillType(e))}setFillSolidColor(e,t,r,n,o=1){le("id",e,oe()),O(_e(this,ve,"f").setFillSolidColor(e,t,r,n,o))}getFillSolidColor(e){return le("id",e,oe()),O(_e(this,ve,"f").getFillSolidColor(e))}setFillGradientType(e,t){le("id",e,oe()),O(_e(this,ve,"f").setFillGradientType(e,t))}getFillGradientType(e){return le("id",e,oe()),O(_e(this,ve,"f").getFillGradientType(e))}addFillGradientColorStop(e,t,r,n,o,i=1){le("id",e,oe()),O(_e(this,ve,"f").addFillGradientColorStop(e,t,r,n,o,i))}removeFillGradientColorStop(e,t){le("id",e,oe()),O(_e(this,ve,"f").removeFillGradientColorStop(e,t))}getFillGradientColorStops(e){return le("id",e,oe()),ge(_e(this,ve,"f").getFillGradientColorStops(e))}setFillGradientColorStops(e,t){le("id",e,oe()),O(_e(this,ve,"f").setFillGradientColorStops(e,t))}setFillGradientControlPoint(e,t,r,n){return le("id",e,oe()),O(_e(this,ve,"f").setFillGradientControlPoint(e,t,r,n))}getFillGradientControlPointX(e,t){return le("id",e,oe()),O(_e(this,ve,"f").getFillGradientControlPointX(e,t))}getFillGradientControlPointY(e,t){return le("id",e,oe()),O(_e(this,ve,"f").getFillGradientControlPointY(e,t))}setFillGradientRadius(e,t){return le("id",e,oe()),O(_e(this,ve,"f").setFillGradientRadius(e,t))}getFillGradientRadius(e){return le("id",e,oe()),O(_e(this,ve,"f").getFillGradientRadius(e))}}ve=new WeakMap,ye=new WeakMap;var Ee,xe=r(7168),ke=r.n(xe);!function(e){e.Info="Info",e.Warning="Warning",e.Error="Error"}(Ee||(Ee={}));const Se={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"]},Te={company_name:{value:"img.ly"},first_name:{value:"Charly"},last_name:{value:"Williams"},address:{value:"742 Evergreen Terrace"},city:{value:"Springfield"}},Ce=(e,t)=>{const r=`[UBQ] ${e}`;switch(t){case Ee.Warning:console.warn(r);break;case Ee.Error:console.error(r);break;case Ee.Info:default:console.log(r)}},Pe={log:Ce},Ae={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"}}},Fe={baseURL:"core/"},De={maskSpotColor:void 0,dpi:300,pixelScaleFactor:1},Le={title:{fontFileUri:"bundle://ly.img.cesdk/fonts/imgly_font_inter_semibold.otf",show:!0},dimOutOfPageAreas:!0};function Ie(e,t=("undefined"==typeof window?"":window.location.href)){return new URL(e,""===t?void 0:t).toString()}function Re(e){return"/"!==e[e.length-1]?`${e}/`:e}function Me(e={}){var t,r,n,o,i,a,s,c,u,l,d,f,m,p,h;const g={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.7.0-alpha.1/assets",core:null!==(o=e.core)&&void 0!==o?o:Object.assign({},Fe),extensions:null!==(i=e.extensions)&&void 0!==i?i:Object.assign({},Se),callbacks:null!==(a=e.callbacks)&&void 0!==a?a:Object.assign({},Pe),variables:null!==(s=e.variables)&&void 0!==s?s:Object.assign({},Te),presets:null!==(c=e.presets)&&void 0!==c?c:Object.assign({},Ae),scene:null!==(u=e.scene)&&void 0!==u?u:Object.assign({},De),page:ke()({},Le,null!==(l=e.page)&&void 0!==l?l:{}),assetSources:ke()({},e.assetSources),defaultFont:null!==(d=e.defaultFont)&&void 0!==d?d:void 0};return null!==(f=(p=g.extensions).baseURL)&&void 0!==f||(p.baseURL=Se.baseURL),null!==(m=(h=g.extensions).entries)&&void 0!==m||(h.entries=Object.assign({},Se.entries)),Object.entries(Ae).forEach((([e,t])=>{var r;g.presets[e]=null!==(r=g.presets[e])&&void 0!==r?r:Object.assign({},t)})),g.baseURL=Ie(g.baseURL),g.baseURL=Re(g.baseURL),g.core.baseURL=Ie(g.core.baseURL,g.baseURL),g.core.baseURL=Re(g.core.baseURL),g.extensions.baseURL=Re(g.extensions.baseURL),g.extensions.entries=g.extensions.entries.map((e=>Re(e))),g}var Oe,Be,Ue=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},Ne=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 je{constructor(e){Oe.set(this,void 0),Be.set(this,void 0),Ue(this,Oe,e,"f"),Ue(this,Be,new M(e),"f")}onStateChanged(e){const t=Ne(this,Oe,"f").subscribeToEditorState(e);return()=>{O(Ne(this,Oe,"f").unsubscribe(t))}}setEditMode(e){le("keypath",e,ae()),Ne(this,Oe,"f").setEditMode(e)}getEditMode(){return Ne(this,Oe,"f").getEditMode()}getCursorType(){return Ne(this,Oe,"f").getCursorType()}getCursorRotation(){return Ne(this,Oe,"f").getCursorRotation()}getTextCursorPositionInScreenSpaceX(){return Ne(this,Oe,"f").getTextCursorPositionInScreenSpaceX()}getTextCursorPositionInScreenSpaceY(){return Ne(this,Oe,"f").getTextCursorPositionInScreenSpaceY()}setZoomLevel(e=1){le("zoomLevel",e,se(ie(),0)),Ne(this,Oe,"f").setZoomLevel(e)}getZoomLevel(){return O(Ne(this,Oe,"f").getZoomLevel())}addUndoStep(){O(Ne(this,Oe,"f").addUndoStep())}undo(){O(Ne(this,Oe,"f").undo())}redo(){O(Ne(this,Oe,"f").redo())}canUndo(){return O(Ne(this,Oe,"f").canUndo())}canRedo(){return O(Ne(this,Oe,"f").canRedo())}setSettingBool(e,t){return le("keypath",e,ae()),le("value",t,ne()),O(Ne(this,Oe,"f").setSettingBool(e,t))}getSettingBool(e){return le("keypath",e,ae()),O(Ne(this,Oe,"f").getSettingBool(e))}setSettingInt(e,t){return le("keypath",e,ae()),le("value",t,oe()),O(Ne(this,Oe,"f").setSettingFloat(e,t))}getSettingInt(e){return le("keypath",e,ae()),O(Ne(this,Oe,"f").getSettingFloat(e))}setSettingFloat(e,t){return le("keypath",e,ae()),le("value",t,ie()),O(Ne(this,Oe,"f").setSettingFloat(e,t))}getSettingFloat(e){return le("keypath",e,ae()),O(Ne(this,Oe,"f").getSettingFloat(e))}setSettingString(e,t){return le("keypath",e,ae()),le("value",t,ae()),O(Ne(this,Oe,"f").setSettingString(e,t))}getSettingString(e){return le("keypath",e,ae()),O(Ne(this,Oe,"f").getSettingString(e))}setSettingColorRGBA(e,t,r,n,o=1){return le("keypath",e,ae()),le("r",t,ie()),le("g",r,ie()),le("b",n,ie()),le("a",o,ie()),O(Ne(this,Oe,"f").setSettingColorRGBA(e,t,r,n,o))}getSettingColorRGBA(e){return le("keypath",e,ae()),O(Ne(this,Oe,"f").getSettingColorRGBA(e))}setSettingEnum(e,t){return le("keypath",e,ae()),le("value",t,ae()),O(Ne(this,Oe,"f").setSettingEnum(e,t))}getSettingEnum(e){return le("keypath",e,ae()),O(Ne(this,Oe,"f").getSettingEnum(e))}setURIResolver(e){return O(Ne(this,Oe,"f").setURIResolver(e))}getAbsoluteURI(e){return O(Ne(this,Oe,"f").getAbsoluteURI(e))}}Oe=new WeakMap,Be=new WeakMap;var qe,Ge=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class We{constructor(e){qe.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,qe,e,"f")}subscribe(e,t){le("blocks",e,re());const r=Ge(this,qe,"f").subscribe(e,(e=>{try{t(ge(e,!0))}catch(e){console.error(e)}}));return()=>{O(Ge(this,qe,"f").unsubscribe(r))}}}qe=new WeakMap;var Ve,ze=(Ve="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(){ze("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(){ze("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(){ze("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(){ze("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(){ze("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(){ze("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(){ze("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(){ze("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(){ze("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(){ze("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,x("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:"bd09b3fe-4e25-4f84-9091-da990074bd24"}),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},f="object"==typeof window,m="function"==typeof importScripts,p="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h=!f&&!p&&!m;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 g,v,y,b="";function _(e){return o.locateFile?o.locateFile(e,b):b+e}function w(e){if(e instanceof hf)return;let t=e;e&&"object"==typeof e&&e.stack&&(t=[e,e.stack]),x("exiting due to exception: "+t)}if(h){if("object"==typeof process||"object"==typeof window||"function"==typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");"undefined"!=typeof read&&(g=function(e){return read(e)}),y=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),N("object"==typeof t),t)},v=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)=>{if(Ce)throw t;w(t),quit(e)}),"undefined"!=typeof print&&("undefined"==typeof console&&(console={}),console.log=print,console.warn=console.error="undefined"!=typeof printErr?printErr:print)}else{if(!f&&!m)throw new Error("environment detection error");if(m?b=self.location.href:"undefined"!=typeof document&&document.currentScript&&(b=document.currentScript.src),Ve&&(b=Ve),b=0!==b.indexOf("blob:")?b.substr(0,b.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?)");g=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},m&&(y=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),v=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)}}var E=o.print||console.log.bind(console),x=o.printErr||console.warn.bind(console);function k(e){k.shown||(k.shown={}),k.shown[e]||(k.shown[e]=1,x(e))}function S(e,t){Object.getOwnPropertyDescriptor(o,e)||Object.defineProperty(o,e,{configurable:!0,get:function(){ze("Module."+e+" has been replaced with plain "+t+" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}})}function T(e){Object.getOwnPropertyDescriptor(o,e)&&ze("`Module."+e+"` was supplied but `"+e+"` not included in INCOMING_MODULE_JS_API")}function C(e,t){var r="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)";return t&&(r+=". Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"),r}function P(e,t){Object.getOwnPropertyDescriptor(o,e)||Object.defineProperty(o,e,{configurable:!0,get:function(){ze(C(e,t))}})}function A(e,t){Object.getOwnPropertyDescriptor(o,e)||(o[e]=()=>ze(C(e,t)))}Object.assign(o,c),c=null,Nd(),o.arguments&&(u=o.arguments),S("arguments","arguments_"),o.thisProgram&&(l=o.thisProgram),S("thisProgram","thisProgram"),o.quit&&(d=o.quit),S("quit","quit_"),N(void 0===o.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),N(void 0===o.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),N(void 0===o.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),N(void 0===o.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),N(void 0===o.read,"Module.read option was removed (modify read_ in JS)"),N(void 0===o.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),N(void 0===o.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),N(void 0===o.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),N(void 0===o.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),S("read","read_"),S("readAsync","readAsync"),S("readBinary","readBinary"),S("setWindowTitle","setWindowTitle"),N(!p,"node environment detected but not enabled at build time. Add 'node' to `-s ENVIRONMENT` to enable."),N(!h,"shell environment detected but not enabled at build time. Add 'shell' to `-s ENVIRONMENT` to enable.");var F,D=0,L=e=>{D=e},I=()=>D;o.wasmBinary&&(F=o.wasmBinary),S("wasmBinary","wasmBinary");var R,M=o.noExitRuntime||!0;function O(e,t="i8",r){switch("*"===t.charAt(t.length-1)&&(t="i32"),t){case"i1":case"i8":return $[e>>0];case"i16":return X[e>>1];case"i32":return Q[e>>2];case"i64":return Number(ee[e>>3]);case"float":return J[e>>2];case"double":return Number(re[e>>3]);default:ze("invalid type for getValue: "+t)}return null}S("noExitRuntime","noExitRuntime"),"object"!=typeof WebAssembly&&ze("no native wasm support detected");var B,U=!1;function N(e,t){e||ze("Assertion failed"+(t?": "+t:""))}var j="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function q(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&j)return j.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var c=63&e[t++];if(224==(240&a)?a=(15&a)<<12|s<<6|c:(240!=(248&a)&&k("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 G(e,t){return e?q(Y,e,t):""}function W(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&&k("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 V(e,t,r){return N("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),W(e,Y,t,r)}function z(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 H,$,Y,X,K,Q,Z,J,ee,te,re,ne="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function oe(e,t){N(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)&&K[n];)++n;if((r=n<<1)-e>32&&ne)return ne.decode(Y.subarray(e,r));for(var i="",a=0;!(a>=t/2);++a){var s=X[e+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function ie(e,t,r){if(N(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),N("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);X[t>>1]=a,t+=2}return X[t>>1]=0,t-n}function ae(e){return 2*e.length}function se(e,t){N(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(r>=t/4);){var o=Q[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 ce(e,t,r){if(N(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),N("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)),Q[t>>2]=a,(t+=4)+4>o)break}return Q[t>>2]=0,t-n}function ue(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 le(e){var t=z(e)+1,r=Gd(t);return r&&W(e,$,r,t),r}function de(e){var t=z(e)+1,r=Jd(t);return W(e,$,r,t),r}function fe(e,t){N(e.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),$.set(e,t)}function me(e,t,r){for(var n=0;n<e.length;++n)N(e.charCodeAt(n)===(255&e.charCodeAt(n))),$[t++>>0]=e.charCodeAt(n);r||($[t>>0]=0)}function pe(e){H=e,o.HEAP8=$=new Int8Array(e),o.HEAP16=X=new Int16Array(e),o.HEAP32=Q=new Int32Array(e),o.HEAPU8=Y=new Uint8Array(e),o.HEAPU16=K=new Uint16Array(e),o.HEAPU32=Z=new Uint32Array(e),o.HEAPF32=J=new Float32Array(e),o.HEAPF64=re=new Float64Array(e),o.HEAP64=ee=new BigInt64Array(e),o.HEAPU64=te=new BigUint64Array(e)}var he=5242880;o.TOTAL_STACK&&N(he===o.TOTAL_STACK,"the stack size can no longer be determined at runtime");var ge,ve=o.INITIAL_MEMORY||268435456;function ye(){var e=Kd();N(0==(3&e)),Q[e>>2]=34821223,Q[e+4>>2]=2310721022,Q[0]=1668509029}function be(){if(!U){var e=Kd(),t=Z[e>>2],r=Z[e+4>>2];34821223==t&&2310721022==r||ze("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+r.toString(16)+" 0x"+t.toString(16)),1668509029!==Q[0]&&ze("Runtime error: The application has corrupted its heap memory area (address zero)!")}}S("INITIAL_MEMORY","INITIAL_MEMORY"),N(ve>=he,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+ve+"! (TOTAL_STACK="+he+")"),N("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&null!=Int32Array.prototype.subarray&&null!=Int32Array.prototype.set,"JS engine does not provide full typed array support"),N(!o.wasmMemory,"Use of `wasmMemory` detected. Use -s IMPORTED_MEMORY to define wasmMemory externally"),N(268435456==ve,"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 _e=[],we=[],Ee=[],xe=[],ke=[],Se=!1,Te=!1,Ce=0;function Pe(){return M||Ce>0}function Ae(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)Re(o.preRun.shift());et(_e)}function Fe(){be(),N(!Se),Se=!0,o.noFSInit||Et.init.initialized||Et.init(),Et.ignorePermissions=!1,pt.init(),et(we)}function De(){be(),et(Ee)}function Le(){be(),Te=!0}function Ie(){if(be(),o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)Oe(o.postRun.shift());et(ke)}function Re(e){_e.unshift(e)}function Me(e){we.unshift(e)}function Oe(e){ke.unshift(e)}N(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),N(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),N(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),N(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 Be=0,Ue=null,Ne=null,je={};function qe(e){for(var t=e;;){if(!je[e])return e;e=t+Math.random()}}function Ge(e){Be++,o.monitorRunDependencies&&o.monitorRunDependencies(Be),e?(N(!je[e]),je[e]=1,null===Ue&&"undefined"!=typeof setInterval&&(Ue=setInterval((function(){if(U)return clearInterval(Ue),void(Ue=null);var e=!1;for(var t in je)e||(e=!0,x("still waiting on run dependencies:")),x("dependency: "+t);e&&x("(end of list)")}),1e4))):x("warning: run dependency added without ID")}function We(e){if(Be--,o.monitorRunDependencies&&o.monitorRunDependencies(Be),e?(N(je[e]),delete je[e]):x("warning: run dependency removed without ID"),0==Be&&(null!==Ue&&(clearInterval(Ue),Ue=null),Ne)){var t=Ne;Ne=null,t()}}function ze(e){o.onAbort&&o.onAbort(e),x(e="Aborted("+e+")"),U=!0,B=1;var t=new WebAssembly.RuntimeError(e);throw n(t),t}o.preloadedImages={},o.preloadedAudios={};var He,$e="data:application/octet-stream;base64,";function Ye(e){return e.startsWith($e)}function Xe(e){return e.startsWith("file://")}function Ke(e,t){return function(){var r=e,n=t;return t||(n=o.asm),N(Se,"native function `"+r+"` called before runtime initialization"),N(!Te,"native function `"+r+"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),n[e]||N(n[e],"exported native function `"+r+"` not found"),n[e].apply(null,arguments)}}function Qe(e){try{if(e==He&&F)return new Uint8Array(F);if(y)return y(e);throw"both async and sync fetching of the wasm failed"}catch(e){ze(e)}}function Ze(){return F||!f&&!m||"function"!=typeof fetch?Promise.resolve().then((function(){return Qe(He)})):fetch(He,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+He+"'";return e.arrayBuffer()})).catch((function(){return Qe(He)}))}function Je(){var e={env:qd,wasi_snapshot_preview1:qd};function t(e,t){var r=e.exports;o.asm=r,N(R=o.asm.memory,"memory not found in wasm exports"),pe(R.buffer),N(ge=o.asm.__indirect_function_table,"table not found in wasm exports"),Me(o.asm.__wasm_call_ctors),We("wasm-instantiate")}Ge("wasm-instantiate");var r=o;function i(e){N(o===r,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),r=null,t(e.instance)}function a(t){return Ze().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){x("failed to asynchronously prepare wasm: "+e),Xe(He)&&x("warning: Loading from a file URI ("+He+") 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"),ze(e)}))}if(o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(e){return x("Module.instantiateWasm callback failed with error: "+e),!1}return(F||"function"!=typeof WebAssembly.instantiateStreaming||Ye(He)||"function"!=typeof fetch?a(i):fetch(He,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(i,(function(e){return x("wasm streaming compile failed: "+e),x("falling back to ArrayBuffer instantiation"),a(i)}))}))).catch(n),{}}function et(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?ot(r)():ot(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(o)}}function tt(e){return k("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),e}function rt(e){return e.replace(/\b_Z[\w\d_]+/g,(function(e){var t=tt(e);return e===t?e:t+" ["+e+"]"}))}Ye(He="cesdk.wasm")||(He=_(He));var nt=[];function ot(e){var t=nt[e];return t||(e>=nt.length&&(nt.length=e+1),nt[e]=t=ge.get(e)),N(ge.get(e)==t,"JavaScript-side Wasm function table mirror is out of date!"),t}function it(e){if(e instanceof hf||"unwind"==e)return B;d(1,e)}function at(e,t,r,n){ze("Assertion failed: "+G(e)+", at: "+[t?G(t):"unknown filename",r,n?G(n):"unknown function"])}function st(e){return Gd(e+16)+16}function ct(e){this.excPtr=e,this.ptr=e-16,this.set_type=function(e){Q[this.ptr+4>>2]=e},this.get_type=function(){return Q[this.ptr+4>>2]},this.set_destructor=function(e){Q[this.ptr+8>>2]=e},this.get_destructor=function(){return Q[this.ptr+8>>2]},this.set_refcount=function(e){Q[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,$[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=$[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,$[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=$[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=Q[this.ptr>>2];Q[this.ptr>>2]=e+1},this.release_ref=function(){var e=Q[this.ptr>>2];return Q[this.ptr>>2]=e-1,N(e>0),1===e}}function ut(e,t,r){throw new ct(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 lt(e){return Q[Vd()>>2]=e,e}var dt={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=dt.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=dt.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=dt.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return dt.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return dt.normalize(e.join("/"))},join2:function(e,t){return dt.normalize(e+"/"+t)}};function ft(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}return function(){ze("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 mt={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:Et.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=dt.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=mt.resolve(e).substr(1),t=mt.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("/")}},pt={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){pt.ttys[e]={input:[],output:[],ops:t},Et.registerDevice(e,pt.stream_ops)},stream_ops:{open:function(e){var t=pt.ttys[e.node.rdev];if(!t)throw new Et.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 Et.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 Et.ErrnoError(29)}if(void 0===s&&0===i)throw new Et.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 Et.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new Et.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=Ud(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(E(q(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(E(q(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(x(q(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(x(q(e.output,0)),e.output=[])}}};function ht(e,t){Y.fill(0,e,e+t)}function gt(e,t){return N(t,"alignment argument is required"),Math.ceil(e/t)*t}function vt(e){e=gt(e,65536);var t=$d(65536,e);return t?(ht(t,e),t):0}var yt={ops_table:null,mount:function(e){return yt.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(Et.isBlkdev(r)||Et.isFIFO(r))throw new Et.ErrnoError(63);yt.ops_table||(yt.ops_table={dir:{node:{getattr:yt.node_ops.getattr,setattr:yt.node_ops.setattr,lookup:yt.node_ops.lookup,mknod:yt.node_ops.mknod,rename:yt.node_ops.rename,unlink:yt.node_ops.unlink,rmdir:yt.node_ops.rmdir,readdir:yt.node_ops.readdir,symlink:yt.node_ops.symlink},stream:{llseek:yt.stream_ops.llseek}},file:{node:{getattr:yt.node_ops.getattr,setattr:yt.node_ops.setattr},stream:{llseek:yt.stream_ops.llseek,read:yt.stream_ops.read,write:yt.stream_ops.write,allocate:yt.stream_ops.allocate,mmap:yt.stream_ops.mmap,msync:yt.stream_ops.msync}},link:{node:{getattr:yt.node_ops.getattr,setattr:yt.node_ops.setattr,readlink:yt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:yt.node_ops.getattr,setattr:yt.node_ops.setattr},stream:Et.chrdev_stream_ops}});var o=Et.createNode(e,t,r,n);return Et.isDir(o.mode)?(o.node_ops=yt.ops_table.dir.node,o.stream_ops=yt.ops_table.dir.stream,o.contents={}):Et.isFile(o.mode)?(o.node_ops=yt.ops_table.file.node,o.stream_ops=yt.ops_table.file.stream,o.usedBytes=0,o.contents=null):Et.isLink(o.mode)?(o.node_ops=yt.ops_table.link.node,o.stream_ops=yt.ops_table.link.stream):Et.isChrdev(o.mode)&&(o.node_ops=yt.ops_table.chrdev.node,o.stream_ops=yt.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=Et.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,Et.isDir(e.mode)?t.size=4096:Et.isFile(e.mode)?t.size=e.usedBytes:Et.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&&yt.resizeFileStorage(e,t.size)},lookup:function(e,t){throw Et.genericErrors[44]},mknod:function(e,t,r,n){return yt.createNode(e,t,r,n)},rename:function(e,t,r){if(Et.isDir(e.mode)){var n;try{n=Et.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new Et.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=Et.lookupNode(e,t);for(var n in r.contents)throw new Et.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=yt.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!Et.isLink(e.mode))throw new Et.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(N(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(N(!(t instanceof ArrayBuffer)),t.buffer===$.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 N(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(yt.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&&Et.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Et.ErrnoError(28);return n},allocate:function(e,t,r){yt.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 Et.ErrnoError(28);if(!Et.isFile(e.node.mode))throw new Et.ErrnoError(43);var a,s,c=e.node.contents;if(2&i||c.buffer!==H){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=vt(r)))throw new Et.ErrnoError(48);$.set(c,a)}else s=!1,a=c.byteOffset;return{ptr:a,allocated:s}},msync:function(e,t,r,n,o){if(!Et.isFile(e.node.mode))throw new Et.ErrnoError(43);return 2&o||yt.stream_ops.write(e,t,0,n,r,!1),0}}};function bt(e,t,r,n){var o=n?"":qe("al "+e);v(e,(function(r){N(r,'Loading data file "'+e+'" failed (no arrayBuffer).'),t(new Uint8Array(r)),o&&We(o)}),(function(t){if(!r)throw'Loading data file "'+e+'" failed.';r()})),o&&Ge(o)}var _t={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"},wt={},Et={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=mt.resolve(Et.cwd(),e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new Et.ErrnoError(32);for(var r=dt.normalizeArray(e.split("/").filter((e=>!!e)),!1),n=Et.root,o="/",i=0;i<r.length;i++){var a=i===r.length-1;if(a&&t.parent)break;if(n=Et.lookupNode(n,r[i]),o=dt.join2(o,r[i]),Et.isMountpoint(n)&&(!a||a&&t.follow_mount)&&(n=n.mounted.root),!a||t.follow)for(var s=0;Et.isLink(n.mode);){var c=Et.readlink(o);if(o=mt.resolve(dt.dirname(o),c),n=Et.lookupPath(o,{recurse_count:t.recurse_count+1}).node,s++>40)throw new Et.ErrnoError(32)}}return{path:o,node:n}},getPath:e=>{for(var t;;){if(Et.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)%Et.nameTable.length},hashAddNode:e=>{var t=Et.hashName(e.parent.id,e.name);e.name_next=Et.nameTable[t],Et.nameTable[t]=e},hashRemoveNode:e=>{var t=Et.hashName(e.parent.id,e.name);if(Et.nameTable[t]===e)Et.nameTable[t]=e.name_next;else for(var r=Et.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:(e,t)=>{var r=Et.mayLookup(e);if(r)throw new Et.ErrnoError(r,e);for(var n=Et.hashName(e.id,t),o=Et.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return Et.lookup(e,t)},createNode:(e,t,r,n)=>{N("object"==typeof e);var o=new Et.FSNode(e,t,r,n);return Et.hashAddNode(o),o},destroyNode:e=>{Et.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=Et.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)=>Et.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>Et.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,t)=>{try{return Et.lookupNode(e,t),20}catch(e){}return Et.nodePermissions(e,"wx")},mayDelete:(e,t,r)=>{var n;try{n=Et.lookupNode(e,t)}catch(e){return e.errno}var o=Et.nodePermissions(e,"wx");if(o)return o;if(r){if(!Et.isDir(n.mode))return 54;if(Et.isRoot(n)||Et.getPath(n)===Et.cwd())return 10}else if(Et.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?Et.isLink(e.mode)?32:Et.isDir(e.mode)&&("r"!==Et.flagsToPermissionString(t)||512&t)?31:Et.nodePermissions(e,Et.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=Et.MAX_OPEN_FDS)=>{for(var r=e;r<=t;r++)if(!Et.streams[r])return r;throw new Et.ErrnoError(33)},getStream:e=>Et.streams[e],createStream:(e,t,r)=>{Et.FSStream||(Et.FSStream=function(){},Et.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 Et.FSStream,e);var n=Et.nextfd(t,r);return e.fd=n,Et.streams[n]=e,e},closeStream:e=>{Et.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=Et.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new Et.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{Et.devices[e]={stream_ops:t}},getDevice:e=>Et.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),Et.syncFSRequests++,Et.syncFSRequests>1&&x("warning: "+Et.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=Et.getMounts(Et.root.mount),n=0;function o(e){return N(Et.syncFSRequests>0),Et.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&&Et.root)throw new Et.ErrnoError(10);if(!o&&!i){var a=Et.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,Et.isMountpoint(n))throw new Et.ErrnoError(10);if(!Et.isDir(n.mode))throw new Et.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},c=e.mount(s);return c.mount=s,s.root=c,o?Et.root=c:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),c},unmount:e=>{var t=Et.lookupPath(e,{follow_mount:!1});if(!Et.isMountpoint(t.node))throw new Et.ErrnoError(28);var r=t.node,n=r.mounted,o=Et.getMounts(n);Object.keys(Et.nameTable).forEach((e=>{for(var t=Et.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&Et.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);N(-1!==i),r.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,r)=>{var n=Et.lookupPath(e,{parent:!0}).node,o=dt.basename(e);if(!o||"."===o||".."===o)throw new Et.ErrnoError(28);var i=Et.mayCreate(n,o);if(i)throw new Et.ErrnoError(i);if(!n.node_ops.mknod)throw new Et.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Et.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Et.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{Et.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>(void 0===r&&(r=t,t=438),t|=8192,Et.mknod(e,t,r)),symlink:(e,t)=>{if(!mt.resolve(e))throw new Et.ErrnoError(44);var r=Et.lookupPath(t,{parent:!0}).node;if(!r)throw new Et.ErrnoError(44);var n=dt.basename(t),o=Et.mayCreate(r,n);if(o)throw new Et.ErrnoError(o);if(!r.node_ops.symlink)throw new Et.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:(e,t)=>{var r,n,o=dt.dirname(e),i=dt.dirname(t),a=dt.basename(e),s=dt.basename(t);if(r=Et.lookupPath(e,{parent:!0}).node,n=Et.lookupPath(t,{parent:!0}).node,!r||!n)throw new Et.ErrnoError(44);if(r.mount!==n.mount)throw new Et.ErrnoError(75);var c,u=Et.lookupNode(r,a),l=mt.relative(e,i);if("."!==l.charAt(0))throw new Et.ErrnoError(28);if("."!==(l=mt.relative(t,o)).charAt(0))throw new Et.ErrnoError(55);try{c=Et.lookupNode(n,s)}catch(e){}if(u!==c){var d=Et.isDir(u.mode),f=Et.mayDelete(r,a,d);if(f)throw new Et.ErrnoError(f);if(f=c?Et.mayDelete(n,s,d):Et.mayCreate(n,s))throw new Et.ErrnoError(f);if(!r.node_ops.rename)throw new Et.ErrnoError(63);if(Et.isMountpoint(u)||c&&Et.isMountpoint(c))throw new Et.ErrnoError(10);if(n!==r&&(f=Et.nodePermissions(r,"w")))throw new Et.ErrnoError(f);Et.hashRemoveNode(u);try{r.node_ops.rename(u,n,s)}catch(e){throw e}finally{Et.hashAddNode(u)}}},rmdir:e=>{var t=Et.lookupPath(e,{parent:!0}).node,r=dt.basename(e),n=Et.lookupNode(t,r),o=Et.mayDelete(t,r,!0);if(o)throw new Et.ErrnoError(o);if(!t.node_ops.rmdir)throw new Et.ErrnoError(63);if(Et.isMountpoint(n))throw new Et.ErrnoError(10);t.node_ops.rmdir(t,r),Et.destroyNode(n)},readdir:e=>{var t=Et.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Et.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=Et.lookupPath(e,{parent:!0}).node;if(!t)throw new Et.ErrnoError(44);var r=dt.basename(e),n=Et.lookupNode(t,r),o=Et.mayDelete(t,r,!1);if(o)throw new Et.ErrnoError(o);if(!t.node_ops.unlink)throw new Et.ErrnoError(63);if(Et.isMountpoint(n))throw new Et.ErrnoError(10);t.node_ops.unlink(t,r),Et.destroyNode(n)},readlink:e=>{var t=Et.lookupPath(e).node;if(!t)throw new Et.ErrnoError(44);if(!t.node_ops.readlink)throw new Et.ErrnoError(28);return mt.resolve(Et.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var r=Et.lookupPath(e,{follow:!t}).node;if(!r)throw new Et.ErrnoError(44);if(!r.node_ops.getattr)throw new Et.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>Et.stat(e,!0),chmod:(e,t,r)=>{var n;if(!(n="string"==typeof e?Et.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new Et.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{Et.chmod(e,t,!0)},fchmod:(e,t)=>{var r=Et.getStream(e);if(!r)throw new Et.ErrnoError(8);Et.chmod(r.node,t)},chown:(e,t,r,n)=>{var o;if(!(o="string"==typeof e?Et.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Et.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,t,r)=>{Et.chown(e,t,r,!0)},fchown:(e,t,r)=>{var n=Et.getStream(e);if(!n)throw new Et.ErrnoError(8);Et.chown(n.node,t,r)},truncate:(e,t)=>{if(t<0)throw new Et.ErrnoError(28);var r;if(!(r="string"==typeof e?Et.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Et.ErrnoError(63);if(Et.isDir(r.mode))throw new Et.ErrnoError(31);if(!Et.isFile(r.mode))throw new Et.ErrnoError(28);var n=Et.nodePermissions(r,"w");if(n)throw new Et.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var r=Et.getStream(e);if(!r)throw new Et.ErrnoError(8);if(0==(2097155&r.flags))throw new Et.ErrnoError(28);Et.truncate(r.node,t)},utime:(e,t,r)=>{var n=Et.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 Et.ErrnoError(44);var a;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Et.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)a=e;else{e=dt.normalize(e);try{a=Et.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(a){if(128&t)throw new Et.ErrnoError(20)}else a=Et.mknod(e,r,0),s=!0;if(!a)throw new Et.ErrnoError(44);if(Et.isChrdev(a.mode)&&(t&=-513),65536&t&&!Et.isDir(a.mode))throw new Et.ErrnoError(54);if(!s){var c=Et.mayOpen(a,t);if(c)throw new Et.ErrnoError(c)}512&t&&Et.truncate(a,0),t&=-131713;var u=Et.createStream({node:a,path:Et.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||(Et.readFiles||(Et.readFiles={}),e in Et.readFiles||(Et.readFiles[e]=1)),u},close:e=>{if(Et.isClosed(e))throw new Et.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Et.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,r)=>{if(Et.isClosed(e))throw new Et.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Et.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Et.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 Et.ErrnoError(28);if(Et.isClosed(e))throw new Et.ErrnoError(8);if(1==(2097155&e.flags))throw new Et.ErrnoError(8);if(Et.isDir(e.node.mode))throw new Et.ErrnoError(31);if(!e.stream_ops.read)throw new Et.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new Et.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 Et.ErrnoError(28);if(Et.isClosed(e))throw new Et.ErrnoError(8);if(0==(2097155&e.flags))throw new Et.ErrnoError(8);if(Et.isDir(e.node.mode))throw new Et.ErrnoError(31);if(!e.stream_ops.write)throw new Et.ErrnoError(28);e.seekable&&1024&e.flags&&Et.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new Et.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(Et.isClosed(e))throw new Et.ErrnoError(8);if(t<0||r<=0)throw new Et.ErrnoError(28);if(0==(2097155&e.flags))throw new Et.ErrnoError(8);if(!Et.isFile(e.node.mode)&&!Et.isDir(e.node.mode))throw new Et.ErrnoError(43);if(!e.stream_ops.allocate)throw new Et.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 Et.ErrnoError(2);if(1==(2097155&e.flags))throw new Et.ErrnoError(2);if(!e.stream_ops.mmap)throw new Et.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 Et.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=Et.open(e,t.flags),o=Et.stat(e).size,i=new Uint8Array(o);return Et.read(n,i,0,o,0),"utf8"===t.encoding?r=q(i,0):"binary"===t.encoding&&(r=i),Et.close(n),r},writeFile:(e,t,r={})=>{r.flags=r.flags||577;var n=Et.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(z(t)+1),i=W(t,o,0,o.length);Et.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Et.write(n,t,0,t.byteLength,void 0,r.canOwn)}Et.close(n)},cwd:()=>Et.currentPath,chdir:e=>{var t=Et.lookupPath(e,{follow:!0});if(null===t.node)throw new Et.ErrnoError(44);if(!Et.isDir(t.node.mode))throw new Et.ErrnoError(54);var r=Et.nodePermissions(t.node,"x");if(r)throw new Et.ErrnoError(r);Et.currentPath=t.path},createDefaultDirectories:()=>{Et.mkdir("/tmp"),Et.mkdir("/home"),Et.mkdir("/home/web_user")},createDefaultDevices:()=>{Et.mkdir("/dev"),Et.registerDevice(Et.makedev(1,3),{read:()=>0,write:(e,t,r,n,o)=>n}),Et.mkdev("/dev/null",Et.makedev(1,3)),pt.register(Et.makedev(5,0),pt.default_tty_ops),pt.register(Et.makedev(6,0),pt.default_tty1_ops),Et.mkdev("/dev/tty",Et.makedev(5,0)),Et.mkdev("/dev/tty1",Et.makedev(6,0));var e=ft();Et.createDevice("/dev","random",e),Et.createDevice("/dev","urandom",e),Et.mkdir("/dev/shm"),Et.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{Et.mkdir("/proc");var e=Et.mkdir("/proc/self");Et.mkdir("/proc/self/fd"),Et.mount({mount:()=>{var t=Et.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var r=+t,n=Et.getStream(r);if(!n)throw new Et.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?Et.createDevice("/dev","stdin",o.stdin):Et.symlink("/dev/tty","/dev/stdin"),o.stdout?Et.createDevice("/dev","stdout",null,o.stdout):Et.symlink("/dev/tty","/dev/stdout"),o.stderr?Et.createDevice("/dev","stderr",null,o.stderr):Et.symlink("/dev/tty1","/dev/stderr");var e=Et.open("/dev/stdin",0),t=Et.open("/dev/stdout",1),r=Et.open("/dev/stderr",1);N(0===e.fd,"invalid handle for stdin ("+e.fd+")"),N(1===t.fd,"invalid handle for stdout ("+t.fd+")"),N(2===r.fd,"invalid handle for stderr ("+r.fd+")")},ensureErrnoError:()=>{Et.ErrnoError||(Et.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){for(var t in this.errno=e,wt)if(wt[t]===e){this.code=t;break}},this.setErrno(e),this.message=_t[e],this.stack&&(Object.defineProperty(this,"stack",{value:(new Error).stack,writable:!0}),this.stack=rt(this.stack))},Et.ErrnoError.prototype=new Error,Et.ErrnoError.prototype.constructor=Et.ErrnoError,[44].forEach((e=>{Et.genericErrors[e]=new Et.ErrnoError(e),Et.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{Et.ensureErrnoError(),Et.nameTable=new Array(4096),Et.mount(yt,{},"/"),Et.createDefaultDirectories(),Et.createDefaultDevices(),Et.createSpecialDirectories(),Et.filesystems={MEMFS:yt}},init:(e,t,r)=>{N(!Et.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)"),Et.init.initialized=!0,Et.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=t||o.stdout,o.stderr=r||o.stderr,Et.createStandardStreams()},quit:()=>{Et.init.initialized=!1,Hd();for(var e=0;e<Et.streams.length;e++){var t=Et.streams[e];t&&Et.close(t)}},getMode:(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:(e,t)=>{var r=Et.analyzePath(e,t);return r.exists?r.object:null},analyzePath:(e,t)=>{try{e=(n=Et.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=Et.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=dt.basename(e),n=Et.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:Et.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=dt.join2(e,i);try{Et.mkdir(a)}catch(e){}e=a}}return a},createFile:(e,t,r,n,o)=>{var i=dt.join2("string"==typeof e?e:Et.getPath(e),t),a=Et.getMode(n,o);return Et.create(i,a)},createDataFile:(e,t,r,n,o,i)=>{var a=t;e&&(e="string"==typeof e?e:Et.getPath(e),a=t?dt.join2(e,t):e);var s=Et.getMode(n,o),c=Et.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}Et.chmod(c,146|s);var f=Et.open(c,577);Et.write(f,r,0,r.length,0,i),Et.close(f),Et.chmod(c,s)}return c},createDevice:(e,t,r,n)=>{var o=dt.join2("string"==typeof e?e:Et.getPath(e),t),i=Et.getMode(!!r,!!n);Et.createDevice.major||(Et.createDevice.major=64);var a=Et.makedev(Et.createDevice.major++,0);return Et.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 Et.ErrnoError(29)}if(void 0===c&&0===a)throw new Et.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 Et.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),Et.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(!g)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=Ud(g(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new Et.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||[]):Ud(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,E("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(!m)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=Et.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 Et.forceLoadFile(c),t.apply(null,arguments)}})),u.read=(e,t,r,n,o)=>{Et.forceLoadFile(c);var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(N(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?mt.resolve(dt.join2(e,t)):e,d=qe("cp "+l);function f(r){function f(r){u&&u(),s||Et.createDataFile(e,t,r,n,o,c),i&&i(),We(d)}To.handledByPreloadPlugin(r,l,f,(()=>{a&&a(),We(d)}))||f(r)}Ge(d),"string"==typeof r?bt(r,(e=>f(e)),a):f(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=Et.indexedDB();try{var o=n.open(Et.DB_NAME(),Et.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=()=>{E("creating db"),o.result.createObjectStore(Et.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([Et.DB_STORE_NAME],"readwrite"),i=n.objectStore(Et.DB_STORE_NAME),a=0,s=0,c=e.length;function u(){0==s?t():r()}e.forEach((e=>{var t=i.put(Et.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=Et.indexedDB();try{var o=n.open(Et.DB_NAME(),Et.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=r,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([Et.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var a=i.objectStore(Et.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=()=>{Et.analyzePath(e).exists&&Et.unlink(e),Et.createDataFile(dt.dirname(e),dt.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:()=>{ze("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:()=>{ze("FS.createFolder has been removed; use FS.mkdir instead")},createLink:()=>{ze("FS.createLink has been removed; use FS.symlink instead")},joinPath:()=>{ze("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:()=>{ze("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:()=>{ze("FS.standardizePath has been removed; use PATH.normalize instead")}},xt={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if("/"===t[0])return t;var n;if(-100===e)n=Et.cwd();else{var o=Et.getStream(e);if(!o)throw new Et.ErrnoError(8);n=o.path}if(0==t.length){if(!r)throw new Et.ErrnoError(44);return n}return dt.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&dt.normalize(t)!==dt.normalize(Et.getPath(e.node)))return-54;throw e}return Q[r>>2]=n.dev,Q[r+4>>2]=0,Q[r+8>>2]=n.ino,Q[r+12>>2]=n.mode,Q[r+16>>2]=n.nlink,Q[r+20>>2]=n.uid,Q[r+24>>2]=n.gid,Q[r+28>>2]=n.rdev,Q[r+32>>2]=0,ee[r+40>>3]=BigInt(n.size),Q[r+48>>2]=4096,Q[r+52>>2]=n.blocks,Q[r+56>>2]=n.atime.getTime()/1e3|0,Q[r+60>>2]=0,Q[r+64>>2]=n.mtime.getTime()/1e3|0,Q[r+68>>2]=0,Q[r+72>>2]=n.ctime.getTime()/1e3|0,Q[r+76>>2]=0,ee[r+80>>3]=BigInt(n.ino),0},doMsync:function(e,t,r,n,o){var i=Y.slice(e,e+r);Et.msync(t,i,o,r,n)},doMkdir:function(e,t){return"/"===(e=dt.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),Et.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 Et.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-28;var n=Et.readlink(e),o=Math.min(r,z(n)),i=$[t+o];return V(n,t,r+1),$[t+o]=i,o},doAccess:function(e,t){if(-8&t)return-28;var r=Et.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&&Et.nodePermissions(r,n)?-2:0},doDup:function(e,t,r){var n=Et.getStream(r);return n&&Et.close(n),Et.open(e,t,0,r,r).fd},doReadv:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=Q[t+8*i>>2],s=Q[t+(8*i+4)>>2],c=Et.read(e,$,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=Q[t+8*i>>2],s=Q[t+(8*i+4)>>2],c=Et.write(e,$,a,s,n);if(c<0)return-1;o+=c}return o},varargs:void 0,get:function(){return N(null!=xt.varargs),xt.varargs+=4,Q[xt.varargs-4>>2]},getStr:function(e){return G(e)},getStreamFromFD:function(e){var t=Et.getStream(e);if(!t)throw new Et.ErrnoError(8);return t},get64:function(e,t){return N(e>=0?0===t:-1===t),e}};function kt(e,t,r){xt.varargs=r;try{var n=xt.getStreamFromFD(e);switch(t){case 0:return(o=xt.get())<0?-28:Et.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=xt.get();return n.flags|=o,0;case 5:return o=xt.get(),X[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return lt(28),-1}}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function St(e,t){try{var r=xt.getStreamFromFD(e);return xt.doStat(Et.stat,r.path,t)}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function Tt(e,t,r,n){try{t=xt.getStr(t);var o=256&n,i=4096&n;return N(!(n&=-4353),n),t=xt.calculateAt(e,t,i),xt.doStat(o?Et.lstat:Et.stat,t,r)}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function Ct(e,t,r){try{var n=xt.getStreamFromFD(e);n.getdents||(n.getdents=Et.readdir(n.path));for(var o=280,i=0,a=Et.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=Et.lookupPath(n.path,{parent:!0}).node.id,u=4;else{var d=Et.lookupNode(n.node,l);c=d.id,u=Et.isChrdev(d.mode)?2:Et.isDir(d.mode)?4:Et.isLink(d.mode)?10:8}N(c),ee[t+i>>3]=BigInt(c),ee[t+i+8>>3]=BigInt((s+1)*o),X[t+i+16>>1]=280,$[t+i+18>>0]=u,V(l,t+i+19,256),i+=o,s+=1}return Et.llseek(n,s*o,0),i}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function Pt(e,t,r){xt.varargs=r;try{var n=xt.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=xt.get();return Q[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=xt.get(),Et.ioctl(n,t,o);default:ze("bad ioctl syscall "+t)}}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function At(e,t){try{return e=xt.getStr(e),xt.doStat(Et.lstat,e,t)}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function Ft(e,t,r){xt.varargs=r;try{var n=xt.getStr(e),o=r?xt.get():0;return Et.open(n,t,o).fd}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function Dt(e,t){try{return e=xt.getStr(e),xt.doStat(Et.stat,e,t)}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function Lt(e,t){ze("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}function It(e,t){ze("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")}var Rt={};function Mt(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function Ot(e){return this.fromWireType(Z[e>>2])}var Bt={},Ut={},Nt={},jt=48,qt=57;function Gt(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=jt&&t<=qt?"_"+e:e}function Wt(e,t){return e=Gt(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Vt(e,t){var r=Wt(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 zt=void 0;function Ht(e){throw new zt(e)}function $t(e,t,r){function n(t){var n=r(t);n.length!==e.length&&Ht("Mismatched type converter count");for(var o=0;o<e.length;++o)nr(e[o],n[o])}e.forEach((function(e){Nt[e]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(e,t){Ut.hasOwnProperty(e)?o[t]=Ut[e]:(i.push(e),Bt.hasOwnProperty(e)||(Bt[e]=[]),Bt[e].push((function(){o[t]=Ut[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)}function Yt(e){var t=Rt[e];delete Rt[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;$t([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)),Mt(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:Ot,destructorFunction:a}]}))}var Xt={};function Kt(e){var t=Xt[e];delete Xt[e];var r=t.rawConstructor,n=t.rawDestructor,o=t.fields;$t([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)),Mt(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:Ot,destructorFunction:n}]}))}function Qt(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function Zt(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Jt=e}var Jt=void 0;function er(e){for(var t="",r=e;Y[r];)t+=Jt[Y[r++]];return t}var tr=void 0;function rr(e){throw new tr(e)}function nr(e,t,r={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||rr('type "'+n+'" must have a positive integer typeid pointer'),Ut.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;rr("Cannot register type '"+n+"' twice")}if(Ut[e]=t,delete Nt[e],Bt.hasOwnProperty(e)){var o=Bt[e];delete Bt[e],o.forEach((function(e){e()}))}}function or(e,t,r){switch(t){case 0:return r?function(e){return $[e]}:function(e){return Y[e]};case 1:return r?function(e){return X[e>>1]}:function(e){return K[e>>1]};case 2:return r?function(e){return Q[e>>2]}:function(e){return Z[e>>2]};case 3:return r?function(e){return ee[e>>3]}:function(e){return te[e>>3]};default:throw new TypeError("Unknown integer type: "+e)}}function ir(e,t,r,n,o){t=er(t);var i=ar(r),a=-1!=t.indexOf("u");a&&(o=(BigInt(1)<<BigInt(64))-BigInt(1)),nr(e,{name:t,fromWireType:function(e){return e},toWireType:function(e,r){if("bigint"!=typeof r)throw new TypeError('Cannot convert "'+Qt(r)+'" to '+this.name);if(r<n||r>o)throw new TypeError('Passing a number "'+Qt(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:or(t,i,!a),destructorFunction:null})}function ar(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 sr(e,t,r,n,o){var i=ar(r);nr(e,{name:t=er(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=$;else if(2===r)n=X;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=Q}return this.fromWireType(n[e>>i])},destructorFunction:null})}function cr(e){if(!(this instanceof Mr))return!1;if(!(e instanceof Mr))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 ur(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function lr(e){rr(e.$$.ptrType.registeredClass.name+" instance already deleted")}var dr=!1;function fr(e){}function mr(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function pr(e){e.count.value-=1,0===e.count.value&&mr(e)}function hr(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=hr(e,t,r.baseClass);return null===n?null:r.downcast(n)}var gr={};function vr(){return Object.keys(kr).length}function yr(){var e=[];for(var t in kr)kr.hasOwnProperty(t)&&e.push(kr[t]);return e}var br=[];function _r(){for(;br.length;){var e=br.pop();e.$$.deleteScheduled=!1,e.delete()}}var wr=void 0;function Er(e){wr=e,br.length&&wr&&wr(_r)}function xr(){o.getInheritedInstanceCount=vr,o.getLiveInheritedInstances=yr,o.flushPendingDeletes=_r,o.setDelayFunction=Er}var kr={};function Sr(e,t){for(void 0===t&&rr("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function Tr(e,t){return t=Sr(e,t),kr[t]}function Cr(e,t){return t.ptrType&&t.ptr||Ht("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Ht("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ar(Object.create(e,{$$:{value:t}}))}function Pr(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Tr(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?Cr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Cr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=gr[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var c=hr(t,this.registeredClass,i.registeredClass);return null===c?o.call(this):this.isSmartPointer?Cr(i.registeredClass.instancePrototype,{ptrType:i,ptr:c,smartPtrType:this,smartPtr:e}):Cr(i.registeredClass.instancePrototype,{ptrType:i,ptr:c})}function Ar(e){return"undefined"==typeof FinalizationRegistry?(Ar=e=>e,e):(dr=new FinalizationRegistry((e=>{console.warn(e.leakWarning.stack.replace(/^Error: /,"")),pr(e.$$)})),Ar=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,Pr),dr.register(e,r,e)}return e},fr=e=>dr.unregister(e),Ar(e))}function Fr(){if(this.$$.ptr||lr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Ar(Object.create(Object.getPrototypeOf(this),{$$:{value:ur(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Dr(){this.$$.ptr||lr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&rr("Object already scheduled for deletion"),fr(this),pr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Lr(){return!this.$$.ptr}function Ir(){return this.$$.ptr||lr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&rr("Object already scheduled for deletion"),br.push(this),1===br.length&&wr&&wr(_r),this.$$.deleteScheduled=!0,this}function Rr(){Mr.prototype.isAliasOf=cr,Mr.prototype.clone=Fr,Mr.prototype.delete=Dr,Mr.prototype.isDeleted=Lr,Mr.prototype.deleteLater=Ir}function Mr(){}function Or(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||rr("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 Br(e,t,r){o.hasOwnProperty(e)?((void 0===r||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[r])&&rr("Cannot register public name '"+e+"' twice"),Or(o,e,e),o.hasOwnProperty(r)&&rr("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 Ur(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 Nr(e,t,r){for(;t!==r;)t.upcast||rr("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function jr(e,t){if(null===t)return this.isReference&&rr("null is not a valid "+this.name),0;t.$$||rr('Cannot pass "'+Qt(t)+'" as a '+this.name),t.$$.ptr||rr("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return Nr(t.$$.ptr,r,this.registeredClass)}function qr(e,t){var r;if(null===t)return this.isReference&&rr("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||rr('Cannot pass "'+Qt(t)+'" as a '+this.name),t.$$.ptr||rr("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&rr("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=Nr(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&rr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:rr("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,fn.toHandle((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:rr("Unsupporting sharing policy")}return r}function Gr(e,t){if(null===t)return this.isReference&&rr("null is not a valid "+this.name),0;t.$$||rr('Cannot pass "'+Qt(t)+'" as a '+this.name),t.$$.ptr||rr("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&rr("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return Nr(t.$$.ptr,r,this.registeredClass)}function Wr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Vr(e){this.rawDestructor&&this.rawDestructor(e)}function zr(e){null!==e&&e.delete()}function Hr(){$r.prototype.getPointee=Wr,$r.prototype.destructor=Vr,$r.prototype.argPackAdvance=8,$r.prototype.readValueFromPointer=Ot,$r.prototype.deleteObject=zr,$r.prototype.fromWireType=Pr}function $r(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=qr:n?(this.toWireType=jr,this.destructorFunction=null):(this.toWireType=Gr,this.destructorFunction=null)}function Yr(e,t,r){o.hasOwnProperty(e)||Ht("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 Xr(e,t){e=er(e);var r=ot(t);return"function"!=typeof r&&rr("unknown function pointer with signature "+e+": "+t),r}var Kr=void 0;function Qr(e){var t=zd(e),r=er(t);return Wd(t),r}function Zr(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||Ut[t]||(Nt[t]?Nt[t].forEach(e):(r.push(t),n[t]=!0))})),new Kr(e+": "+r.map(Qr).join([", "]))}function Jr(e,t,r,n,o,i,a,s,c,u,l,d,f){l=er(l),i=Xr(o,i),s&&(s=Xr(a,s)),u&&(u=Xr(c,u)),f=Xr(d,f);var m=Gt(l);Br(m,(function(){Zr("Cannot construct "+l+" due to unbound types",[n])})),$t([e,t,r],n?[n]:[],(function(t){var r,o;t=t[0],o=n?(r=t.registeredClass).instancePrototype:Mr.prototype;var a=Wt(m,(function(){if(Object.getPrototypeOf(this)!==c)throw new tr("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new tr(l+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(void 0===e)throw new tr("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 Ur(l,a,c,f,r,i,s,u),p=new $r(l,d,!0,!1,!1),h=new $r(l+"*",d,!1,!1,!1),g=new $r(l+" const*",d,!1,!0,!1);return gr[e]={pointerType:h,constPointerType:g},Yr(m,a),[p,h,g]}))}function en(e,t){for(var r=[],n=0;n<e;n++)r.push(Q[(t>>2)+n]);return r}function tn(e,t,r,n,o,i){N(t>0);var a=en(t,r);o=Xr(n,o),$t([],[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 tr("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]=()=>{Zr("Cannot construct "+e.name+" due to unbound types",a)},$t([],a,(function(n){return n.splice(1,0,null),e.registeredClass.constructor_body[t-1]=nn(r,n,null,o,i),[]})),[]}))}function rn(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=Wt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,o=e.apply(n,t);return o instanceof Object?o:n}function nn(e,t,r,n,o){var i=t.length;i<2&&rr("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,s=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){s=!0;break}var u="void"!==t[0].name,l="",d="";for(c=0;c<i-2;++c)l+=(0!==c?", ":"")+"arg"+c,d+=(0!==c?", ":"")+"arg"+c+"Wired";var f="return function "+Gt(e)+"("+l+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(f+="var destructors = [];\n");var m=s?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],h=[rr,n,o,Mt,t[0],t[1]];for(a&&(f+="var thisWired = classParam.toWireType("+m+", this);\n"),c=0;c<i-2;++c)f+="var arg"+c+"Wired = argType"+c+".toWireType("+m+", arg"+c+"); // "+t[c+2].name+"\n",p.push("argType"+c),h.push(t[c+2]);if(a&&(d="thisWired"+(d.length>0?", ":"")+d),f+=(u?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",s)f+="runDestructors(destructors);\n";else for(c=a?1:2;c<t.length;++c){var g=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(f+=g+"_dtor("+g+"); // "+t[c].name+"\n",p.push(g+"_dtor"),h.push(t[c].destructorFunction))}return u&&(f+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),f+="}\n",p.push(f),rn(Function,p).apply(null,h)}function on(e,t,r,n,o,i,a,s){var c=en(r,n);t=er(t),i=Xr(o,i),$t([],[e],(function(e){var n=(e=e[0]).name+"."+t;function o(){Zr("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):(Or(u,t,n),u[t].overloadTable[r-2]=o),$t([],c,(function(o){var s=nn(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 an=[],sn=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function cn(e){e>4&&0==--sn[e].refcount&&(sn[e]=void 0,an.push(e))}function un(){for(var e=0,t=5;t<sn.length;++t)void 0!==sn[t]&&++e;return e}function ln(){for(var e=5;e<sn.length;++e)if(void 0!==sn[e])return sn[e];return null}function dn(){o.count_emval_handles=un,o.get_first_emval=ln}var fn={toValue:function(e){return e||rr("Cannot use deleted val. handle = "+e),sn[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=an.length?an.pop():sn.length;return sn[t]={refcount:1,value:e},t}}};function mn(e,t){nr(e,{name:t=er(t),fromWireType:function(e){var t=fn.toValue(e);return cn(e),t},toWireType:function(e,t){return fn.toHandle(t)},argPackAdvance:8,readValueFromPointer:Ot,destructorFunction:null})}function pn(e,t,r){switch(t){case 0:return function(e){var t=r?$:Y;return this.fromWireType(t[e])};case 1:return function(e){var t=r?X:K;return this.fromWireType(t[e>>1])};case 2:return function(e){var t=r?Q:Z;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function hn(e,t,r,n){var o=ar(r);function i(){}t=er(t),i.values={},nr(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:pn(t,o,n),destructorFunction:null}),Br(t,i)}function gn(e,t){var r=Ut[e];return void 0===r&&rr(t+" has unknown type "+Qr(e)),r}function vn(e,t,r){var n=gn(e,"enum");t=er(t);var o=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Wt(n.name+"_"+t,(function(){}))}});o.values[r]=i,o[t]=i}function yn(e,t){switch(t){case 2:return function(e){return this.fromWireType(J[e>>2])};case 3:return function(e){return this.fromWireType(re[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function bn(e,t,r){var n=ar(r);nr(e,{name:t=er(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+Qt(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:yn(t,n),destructorFunction:null})}function _n(e,t,r,n,o,i){var a=en(t,r);e=er(e),o=Xr(n,o),Br(e,(function(){Zr("Cannot call "+e+" due to unbound types",a)}),t-1),$t([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return Yr(e,nn(e,n,null,o,i),t-1),[]}))}function wn(e,t,r,n,o){t=er(t),-1===o&&(o=4294967295);var i=ar(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 "'+Qt(e)+'" to '+r);if(e<n||e>o)throw new TypeError('Passing a number "'+Qt(e)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!")};nr(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:or(t,i,0!==n),destructorFunction:null})}function En(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(H,o,r)}nr(e,{name:r=er(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}function xn(e,t,r,n,o,i,a,s,c,u,l,d){r=er(r),i=Xr(o,i),s=Xr(a,s),u=Xr(c,u),d=Xr(l,d),$t([e],[t],(function(e){return e=e[0],[new $r(r,e.registeredClass,!1,!1,!0,e,n,i,s,u,d)]}))}function kn(e,t){var r="std::string"===(t=er(t));nr(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==Y[a]){var s=G(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(Y[e+4+i]);t=c.join("")}return Wd(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||rr("Cannot pass non-string to std::string");var o=(r&&n?()=>z(t):()=>t.length)(),i=Gd(4+o+1);if(Z[i>>2]=o,r&&n)V(t,i+4,o+1);else if(n)for(var a=0;a<o;++a){var s=t.charCodeAt(a);s>255&&(Wd(i),rr("String has UTF-16 code units that do not fit in 8 bits")),Y[i+4+a]=s}else for(a=0;a<o;++a)Y[i+4+a]=t[a];return null!==e&&e.push(Wd,i),i},argPackAdvance:8,readValueFromPointer:Ot,destructorFunction:function(e){Wd(e)}})}function Sn(e,t,r){var n,o,i,a,s;r=er(r),2===t?(n=oe,o=ie,a=ae,i=()=>K,s=1):4===t&&(n=se,o=ce,a=ue,i=()=>Z,s=2),nr(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 Wd(e),r},toWireType:function(e,n){"string"!=typeof n&&rr("Cannot pass non-string to C++ string type "+r);var i=a(n),c=Gd(4+i+t);return Z[c>>2]=i>>s,o(n,c+4,i+t),null!==e&&e.push(Wd,c),c},argPackAdvance:8,readValueFromPointer:Ot,destructorFunction:function(e){Wd(e)}})}function Tn(e,t,r,n,o,i){Rt[e]={name:er(t),rawConstructor:Xr(r,n),rawDestructor:Xr(o,i),elements:[]}}function Cn(e,t,r,n,o,i,a,s,c){Rt[e].elements.push({getterReturnType:t,getter:Xr(r,n),getterContext:o,setterArgumentType:i,setter:Xr(a,s),setterContext:c})}function Pn(e,t,r,n,o,i){Xt[e]={name:er(t),rawConstructor:Xr(r,n),rawDestructor:Xr(o,i),fields:[]}}function An(e,t,r,n,o,i,a,s,c,u){Xt[e].fields.push({fieldName:er(t),getterReturnType:r,getter:Xr(n,o),getterContext:i,setterArgumentType:a,setter:Xr(s,c),setterContext:u})}function Fn(e,t){nr(e,{isVoid:!0,name:t=er(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})}function Dn(){throw 1/0}function Ln(e,t,r){e=fn.toValue(e),t=gn(t,"emval::as");var n=[],o=fn.toHandle(n);return Q[r>>2]=o,t.toWireType(n,e)}function In(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=gn(Q[(t>>2)+n],"parameter "+n);return r}function Rn(e,t,r,n){e=fn.toValue(e);for(var o=In(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 fn.toHandle(c)}function Mn(e){var t=[];return Q[e>>2]=fn.toHandle(t),t}var On={};function Bn(e){var t=On[e];return void 0===t?er(e):t}var Un=[];function Nn(e,t,r,n,o){return(e=Un[e])(t=fn.toValue(t),r=Bn(r),Mn(n),o)}function jn(e,t,r,n){(e=Un[e])(t=fn.toValue(t),r=Bn(r),null,n)}function qn(e,t){return(e=fn.toValue(e))==fn.toValue(t)}function Gn(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Wn(e){return 0===e?fn.toHandle(Gn()):(e=Bn(e),fn.toHandle(Gn()[e]))}function Vn(e){var t=Un.length;return Un.push(e),t}var zn=[];function Hn(e,t){var r=In(e,t),n=r[0],o=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",i=zn[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 "+Gt("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=Vn(rn(Function,a).apply(null,s)),zn[o]=i,i}function $n(e,t){return e=fn.toValue(e),t=fn.toValue(t),fn.toHandle(e[t])}function Yn(e){e>4&&(sn[e].refcount+=1)}function Xn(e,t){return(e=fn.toValue(e))instanceof fn.toValue(t)}function Kn(e){return"number"==typeof(e=fn.toValue(e))}function Qn(e){return"string"==typeof(e=fn.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)(gn,o,fn.toHandle)}var Jn,eo={};function to(e,t,r,n){e=fn.toValue(e);var o=eo[t];return o||(o=Zn(t),eo[t]=o),o(e,r,n)}function ro(){return fn.toHandle([])}function no(e){return fn.toHandle(Bn(e))}function oo(){return fn.toHandle({})}function io(e){Mt(fn.toValue(e)),cn(e)}function ao(e,t,r){e=fn.toValue(e),t=fn.toValue(t),r=fn.toValue(r),e[t]=r}function so(e,t){var r=(e=gn(e,"_emval_take_value")).readValueFromPointer(t);return fn.toHandle(r)}function co(e){throw fn.toValue(e)}function uo(e,t){var r=new Date(1e3*Q[e>>2]);Q[t>>2]=r.getUTCSeconds(),Q[t+4>>2]=r.getUTCMinutes(),Q[t+8>>2]=r.getUTCHours(),Q[t+12>>2]=r.getUTCDate(),Q[t+16>>2]=r.getUTCMonth(),Q[t+20>>2]=r.getUTCFullYear()-1900,Q[t+24>>2]=r.getUTCDay();var n=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),o=(r.getTime()-n)/864e5|0;Q[t+28>>2]=o}function lo(e,t){var r=new Date(1e3*Q[e>>2]);Q[t>>2]=r.getSeconds(),Q[t+4>>2]=r.getMinutes(),Q[t+8>>2]=r.getHours(),Q[t+12>>2]=r.getDate(),Q[t+16>>2]=r.getMonth(),Q[t+20>>2]=r.getFullYear()-1900,Q[t+24>>2]=r.getDay();var n=new Date(r.getFullYear(),0,1),o=(r.getTime()-n.getTime())/864e5|0;Q[t+28>>2]=o,Q[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));Q[t+32>>2]=s}function fo(e){var t=new Date(Q[e+20>>2]+1900,Q[e+16>>2],Q[e+12>>2],Q[e+8>>2],Q[e+4>>2],Q[e>>2],0),r=Q[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)Q[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))}Q[e+24>>2]=t.getDay();var l=(t.getTime()-o.getTime())/864e5|0;return Q[e+28>>2]=l,Q[e>>2]=t.getSeconds(),Q[e+4>>2]=t.getMinutes(),Q[e+8>>2]=t.getHours(),Q[e+12>>2]=t.getDate(),Q[e+16>>2]=t.getMonth(),t.getTime()/1e3|0}function mo(e,t,r,n,o,i,a,s){try{var c=Et.getStream(o);if(!c)return-8;var u=Et.mmap(c,e,t,i,r,n),l=u.ptr;return Q[a>>2]=u.allocated,l}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function po(e,t,r,n,o,i){try{var a=Et.getStream(o);a&&(2&r&&xt.doMsync(e,a,t,n,i),Et.munmap(a))}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return-e.errno}}function ho(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"}Q[e>>2]=60*c,Q[t>>2]=Number(a!=s);var l=u(o),d=u(i),f=le(l),m=le(d);s<a?(Q[r>>2]=f,Q[r+4>>2]=m):(Q[r>>2]=m,Q[r+4>>2]=f)}function go(e,t,r){go.called||(go.called=!0,ho(e,t,r))}function vo(){ze("native code called abort()")}Jn=()=>performance.now();var yo=!0;function bo(e,t){var r;if(0===e)r=Date.now();else{if(1!==e&&4!==e||!yo)return lt(28),-1;r=Jn()}return Q[t>>2]=r/1e3|0,Q[t+4>>2]=r%1e3*1e3*1e3|0,0}function _o(e,t){if(To.mainLoop.timingMode=e,To.mainLoop.timingValue=t,!To.mainLoop.func)return x("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(To.mainLoop.running||(To.mainLoop.running=!0),0==e)To.mainLoop.scheduler=function(){var e=0|Math.max(0,To.mainLoop.tickStartTime+t-Jn());setTimeout(To.mainLoop.runner,e)},To.mainLoop.method="timeout";else if(1==e)To.mainLoop.scheduler=function(){To.requestAnimationFrame(To.mainLoop.runner)},To.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),m?(void 0===o.setImmediates&&(o.setImmediates=[]),o.setImmediates.push(e),postMessage({target:n})):postMessage(n,"*")}}To.mainLoop.scheduler=function(){setImmediate(To.mainLoop.runner)},To.mainLoop.method="immediate"}return 0}function wo(e){_f(e)}function Eo(){if(!Pe())try{wo(B)}catch(e){it(e)}}function xo(e,t,r,n,i){N(!To.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."),To.mainLoop.func=e,To.mainLoop.arg=n;var a=To.mainLoop.currentlyRunningMainloop;function s(){return!(a<To.mainLoop.currentlyRunningMainloop&&(Eo(),1))}if(To.mainLoop.running=!1,To.mainLoop.runner=function(){if(!U)if(To.mainLoop.queue.length>0){var t=Date.now(),r=To.mainLoop.queue.shift();if(r.func(r.arg),To.mainLoop.remainingBlockers){var n=To.mainLoop.remainingBlockers,i=n%1==0?n-1:Math.floor(n);r.counted?To.mainLoop.remainingBlockers=i:(i+=.5,To.mainLoop.remainingBlockers=(8*n+i)/9)}if(E('main loop blocker "'+r.name+'" took '+(Date.now()-t)+" ms"),To.mainLoop.updateStatus(),!s())return;setTimeout(To.mainLoop.runner,0)}else s()&&(To.mainLoop.currentFrameNumber=To.mainLoop.currentFrameNumber+1|0,1==To.mainLoop.timingMode&&To.mainLoop.timingValue>1&&To.mainLoop.currentFrameNumber%To.mainLoop.timingValue!=0?To.mainLoop.scheduler():(0==To.mainLoop.timingMode&&(To.mainLoop.tickStartTime=Jn()),"timeout"===To.mainLoop.method&&o.ctx&&(k("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!"),To.mainLoop.method=""),To.mainLoop.runIter(e),be(),s()&&("object"==typeof SDL&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),To.mainLoop.scheduler())))},i||(t&&t>0?_o(0,1e3/t):_o(1,1),To.mainLoop.scheduler()),r)throw"unwind"}function ko(e,t){if(Te||U)x("user callback triggered after runtime exited or application aborted. Ignoring.");else if(t)e();else try{e()}catch(e){it(e)}}function So(e,t){return setTimeout((function(){ko(e)}),t)}var To={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){To.mainLoop.scheduler=null,To.mainLoop.currentlyRunningMainloop++},resume:function(){To.mainLoop.currentlyRunningMainloop++;var e=To.mainLoop.timingMode,t=To.mainLoop.timingValue,r=To.mainLoop.func;To.mainLoop.func=null,xo(r,0,!1,To.mainLoop.arg,!0),_o(e,t),To.mainLoop.scheduler()},updateStatus:function(){if(o.setStatus){var e=o.statusMessage||"Please wait...",t=To.mainLoop.remainingBlockers,r=To.mainLoop.expectedBlockers;t?t<r?o.setStatus(e+" ("+(r-t)+"/"+r+")"):o.setStatus(e):o.setStatus("")}},runIter:function(e){if(!U){if(o.preMainLoop&&!1===o.preMainLoop())return;ko(e),o.postMainLoop&&o.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(o.preloadPlugins||(o.preloadPlugins=[]),!To.initted){To.initted=!0;try{new Blob,To.hasBlobConstructor=!0}catch(e){To.hasBlobConstructor=!1,E("warning: no blob constructor, cannot create blobs with mimetypes")}To.BlobBuilder="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:To.hasBlobConstructor?null:E("warning: no BlobBuilder"),To.URLObject="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:void 0,o.noImageDecoding||void 0!==To.URLObject||(E("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(To.hasBlobConstructor)try{(i=new Blob([e],{type:To.getMimetype(t)})).size!==e.length&&(i=new Blob([new Uint8Array(e).buffer],{type:To.getMimetype(t)}))}catch(e){k("Blob constructor present but fails: "+e+"; falling back to blob builder")}if(!i){var a=new To.BlobBuilder;a.append(new Uint8Array(e).buffer),i=a.getBlob()}var s=To.URLObject.createObjectURL(i);N("string"==typeof s,"createObjectURL must return a url as a string");var c=new Image;c.onload=()=>{N(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,To.URLObject.revokeObjectURL(s),r&&r(e)},c.onerror=e=>{E("Image "+s+" could not be decoded"),n&&n()},c.src=s}};o.preloadPlugins.push(e);var t={canHandle:function(e){return!o.noAudioDecoding&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(e,t,r,n){var i=!1;function a(n){i||(i=!0,o.preloadedAudios[t]=n,r&&r(e))}function s(){i||(i=!0,o.preloadedAudios[t]=new Audio,n&&n())}if(!To.hasBlobConstructor)return s();try{var c=new Blob([e],{type:To.getMimetype(t)})}catch(e){return s()}var u=To.URLObject.createObjectURL(c);N("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||(E("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,So((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){!To.pointerLock&&o.canvas.requestPointerLock&&(o.canvas.requestPointerLock(),e.preventDefault())}),!1))}function n(){To.pointerLock=document.pointerLockElement===o.canvas||document.mozPointerLockElement===o.canvas||document.webkitPointerLockElement===o.canvas||document.msPointerLockElement===o.canvas}},handledByPreloadPlugin:function(e,t,r,n){To.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||N(void 0===Dd,"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,To.moduleContextCreatedCallbacks.forEach((function(e){e()})),To.init()),i):null},destroyContext:function(e,t,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(e,t){To.lockPointer=e,To.resizeCanvas=t,void 0===To.lockPointer&&(To.lockPointer=!0),void 0===To.resizeCanvas&&(To.resizeCanvas=!1);var r=o.canvas;function n(){To.isFullscreen=!1;var e=r.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(r.exitFullscreen=To.exitFullscreen,To.lockPointer&&r.requestPointerLock(),To.isFullscreen=!0,To.resizeCanvas?To.setFullscreenCanvasSize():To.updateCanvasDimensions(r)):(e.parentNode.insertBefore(r,e),e.parentNode.removeChild(e),To.resizeCanvas?To.setWindowedCanvasSize():To.updateCanvasDimensions(r)),o.onFullScreen&&o.onFullScreen(To.isFullscreen),o.onFullscreen&&o.onFullscreen(To.isFullscreen)}To.fullscreenHandlersInstalled||(To.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(){ze("Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)")},exitFullscreen:function(){return!!To.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===To.nextRAF)To.nextRAF=t+1e3/60;else for(;t+2>=To.nextRAF;)To.nextRAF+=1e3/60;var r=Math.max(To.nextRAF-t,0);setTimeout(e,r)},requestAnimationFrame:function(e){"function"!=typeof requestAnimationFrame?(0,To.fakeRequestAnimationFrame)(e):requestAnimationFrame(e)},safeSetTimeout:function(e){return So(e)},safeRequestAnimationFrame:function(e){return To.requestAnimationFrame((function(){ko(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(To.pointerLock)"mousemove"!=e.type&&"mozMovementX"in e?To.mouseMovementX=To.mouseMovementY=0:(To.mouseMovementX=To.getMovementX(e),To.mouseMovementY=To.getMovementY(e)),"undefined"!=typeof SDL?(To.mouseX=SDL.mouseX+To.mouseMovementX,To.mouseY=SDL.mouseY+To.mouseMovementY):(To.mouseX+=To.mouseMovementX,To.mouseY+=To.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(N(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)To.lastTouches[s.identifier]=l,To.touches[s.identifier]=l;else if("touchend"===e.type||"touchmove"===e.type){var d=To.touches[s.identifier];d||(d=l),To.lastTouches[s.identifier]=d,To.touches[s.identifier]=l}return}var f=e.pageX-(i+t.left),m=e.pageY-(a+t.top);f*=r/t.width,m*=n/t.height,To.mouseMovementX=f-To.mouseX,To.mouseMovementY=m-To.mouseY,To.mouseX=f,To.mouseY=m}},resizeListeners:[],updateResizeListeners:function(){var e=o.canvas;To.resizeListeners.forEach((function(t){t(e.width,e.height)}))},setCanvasSize:function(e,t,r){var n=o.canvas;To.updateCanvasDimensions(n,e,t),r||To.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if("undefined"!=typeof SDL){var e=Z[SDL.screen>>2];e|=8388608,Q[SDL.screen>>2]=e}To.updateCanvasDimensions(o.canvas),To.updateResizeListeners()},setWindowedCanvasSize:function(){if("undefined"!=typeof SDL){var e=Z[SDL.screen>>2];e&=-8388609,Q[SDL.screen>>2]=e}To.updateCanvasDimensions(o.canvas),To.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)}To.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"))))}},Co={errorCode:12288,defaultDisplayInitialized:!1,currentContext:0,currentReadSurface:0,currentDrawSurface:0,contextAttributes:{alpha:!1,depth:!1,stencil:!1,antialias:!1},stringCache:{},setErrorCode:function(e){Co.errorCode=e},chooseConfig:function(e,t,r,n,o){if(62e3!=e)return Co.setErrorCode(12296),0;if(t)for(;;){var i=Q[t>>2];if(12321==i){var a=Q[t+4>>2];Co.contextAttributes.alpha=a>0}else if(12325==i){var s=Q[t+4>>2];Co.contextAttributes.depth=s>0}else if(12326==i){var c=Q[t+4>>2];Co.contextAttributes.stencil=c>0}else if(12337==i){var u=Q[t+4>>2];Co.contextAttributes.antialias=u>0}else if(12338==i)u=Q[t+4>>2],Co.contextAttributes.antialias=1==u;else if(12544==i){var l=Q[t+4>>2];Co.contextAttributes.lowLatency=12547!=l}else if(12344==i)break;t+=8}return r&&n||o?(o&&(Q[o>>2]=1),r&&n>0&&(Q[r>>2]=62002),Co.setErrorCode(12288),1):(Co.setErrorCode(12300),0)}};function Po(e,t,r,n,o){return Co.chooseConfig(e,t,r,n,o)}function Ao(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 Fo(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 Do(e){var t=e.getExtension("WEBGL_draw_buffers");if(t)return e.drawBuffers=function(e,r){t.drawBuffersWEBGL(e,r)},1}function Lo(e){return!!(e.dibvbi=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"))}function Io(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?Q[n+4*i>>2]:-1;o+=G(Q[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=Dd=Mo.currentContext&&Mo.currentContext.GLctx,!(e&&!Dd)},getContext:function(e){return Mo.contexts[e]},deleteContext:function(e){Mo.currentContext===Mo.contexts[e]&&(Mo.currentContext=null),"object"==typeof Jl&&Jl.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;Ao(t),Fo(t),Do(t),Lo(t),Io(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 Oo(e,t,r,n){if(62e3!=e)return Co.setErrorCode(12296),0;for(var i=1;;){var a=Q[n>>2];if(12440!=a){if(12344==a)break;return Co.setErrorCode(12292),0}i=Q[n+4>>2],n+=8}return i<2||i>3?(Co.setErrorCode(12293),0):(Co.contextAttributes.majorVersion=i-1,Co.contextAttributes.minorVersion=0,Co.context=Mo.createContext(o.canvas,Co.contextAttributes),0!=Co.context?(Co.setErrorCode(12288),Mo.makeContextCurrent(Co.context),o.useWebGL=!0,To.moduleContextCreatedCallbacks.forEach((function(e){e()})),Mo.makeContextCurrent(null),62004):(Co.setErrorCode(12297),0))}function Bo(e,t,r,n){return 62e3!=e?(Co.setErrorCode(12296),0):62002!=t?(Co.setErrorCode(12293),0):(Co.setErrorCode(12288),62006)}function Uo(e,t){return 62e3!=e?(Co.setErrorCode(12296),0):62004!=t?(Co.setErrorCode(12294),0):(Mo.deleteContext(Co.context),Co.setErrorCode(12288),Co.currentContext==t&&(Co.currentContext=0),1)}function No(e,t){return 62e3!=e?(Co.setErrorCode(12296),0):62006!=t?(Co.setErrorCode(12301),1):(Co.currentReadSurface==t&&(Co.currentReadSurface=0),Co.currentDrawSurface==t&&(Co.currentDrawSurface=0),Co.setErrorCode(12288),1)}function jo(e,t,r,n){if(62e3!=e)return Co.setErrorCode(12296),0;if(62002!=t)return Co.setErrorCode(12293),0;if(!n)return Co.setErrorCode(12300),0;switch(Co.setErrorCode(12288),r){case 12320:return Q[n>>2]=Co.contextAttributes.alpha?32:24,1;case 12321:return Q[n>>2]=Co.contextAttributes.alpha?8:0,1;case 12322:case 12323:case 12324:return Q[n>>2]=8,1;case 12325:return Q[n>>2]=Co.contextAttributes.depth?24:0,1;case 12326:return Q[n>>2]=Co.contextAttributes.stencil?8:0,1;case 12327:case 12335:case 12340:return Q[n>>2]=12344,1;case 12328:return Q[n>>2]=62002,1;case 12329:case 12333:case 12334:case 12345:case 12346:case 12347:case 12349:case 12350:case 12354:return Q[n>>2]=0,1;case 12330:case 12332:return Q[n>>2]=4096,1;case 12331:return Q[n>>2]=16777216,1;case 12337:return Q[n>>2]=Co.contextAttributes.antialias?4:0,1;case 12338:return Q[n>>2]=Co.contextAttributes.antialias?1:0,1;case 12339:case 12352:return Q[n>>2]=4,1;case 12341:case 12342:case 12343:return Q[n>>2]=-1,1;case 12348:return Q[n>>2]=1,1;case 12351:return Q[n>>2]=12430,1;default:return Co.setErrorCode(12292),0}}function qo(e){return Co.setErrorCode(12288),62e3}function Go(){return Co.errorCode}function Wo(e,t,r){return 62e3==e?(t&&(Q[t>>2]=1),r&&(Q[r>>2]=4),Co.defaultDisplayInitialized=!0,Co.setErrorCode(12288),1):(Co.setErrorCode(12296),0)}function Vo(e,t,r,n){return 62e3!=e?(Co.setErrorCode(12296),0):0!=n&&62004!=n?(Co.setErrorCode(12294),0):0!=r&&62006!=r||0!=t&&62006!=t?(Co.setErrorCode(12301),0):(Mo.makeContextCurrent(n?Co.context:null),Co.currentContext=n,Co.currentDrawSurface=t,Co.currentReadSurface=r,Co.setErrorCode(12288),1)}function zo(){if(Co.defaultDisplayInitialized)if(o.ctx){if(!o.ctx.isContextLost())return Co.setErrorCode(12288),1;Co.setErrorCode(12302)}else Co.setErrorCode(12290);else Co.setErrorCode(12289);return 0}function Ho(e){return 62e3!=e?(Co.setErrorCode(12296),0):(Co.currentContext=0,Co.currentReadSurface=0,Co.currentDrawSurface=0,Co.defaultDisplayInitialized=!1,Co.setErrorCode(12288),1)}function $o(e){N("number"==typeof e),console.error(G(e))}function Yo(e){N("number"==typeof e),console.log(G(e))}function Xo(e){N("number"==typeof e),console.warn(G(e))}function Ko(){}function Qo(){return 2147483648}function Zo(e){Dd.activeTexture(e)}function Jo(e,t){Dd.attachShader(Mo.programs[e],Mo.shaders[t])}function ei(e,t){Dd.beginQuery(e,Mo.queries[t])}function ti(e,t){Dd.disjointTimerQueryExt.beginQueryEXT(e,Mo.queries[t])}function ri(e){Dd.beginTransformFeedback(e)}function ni(e,t,r){Dd.bindAttribLocation(Mo.programs[e],t,G(r))}function oi(e,t){35051==e?Dd.currentPixelPackBufferBinding=t:35052==e&&(Dd.currentPixelUnpackBufferBinding=t),Dd.bindBuffer(e,Mo.buffers[t])}function ii(e,t,r){Dd.bindBufferBase(e,t,Mo.buffers[r])}function ai(e,t,r,n,o){Dd.bindBufferRange(e,t,Mo.buffers[r],n,o)}function si(e,t){Dd.bindFramebuffer(e,Mo.framebuffers[t])}function ci(e,t){Dd.bindRenderbuffer(e,Mo.renderbuffers[t])}function ui(e,t){Dd.bindSampler(e,Mo.samplers[t])}function li(e,t){Dd.bindTexture(e,Mo.textures[t])}function di(e,t){Dd.bindTransformFeedback(e,Mo.transformFeedbacks[t])}function fi(e){Dd.bindVertexArray(Mo.vaos[e])}function mi(e){Dd.bindVertexArray(Mo.vaos[e])}function pi(e,t,r,n){Dd.blendColor(e,t,r,n)}function hi(e){Dd.blendEquation(e)}function gi(e,t){Dd.blendEquationSeparate(e,t)}function vi(e,t){Dd.blendFunc(e,t)}function yi(e,t,r,n){Dd.blendFuncSeparate(e,t,r,n)}function bi(e,t,r,n,o,i,a,s,c,u){Dd.blitFramebuffer(e,t,r,n,o,i,a,s,c,u)}function _i(e,t,r,n){Mo.currentContext.version>=2?r?Dd.bufferData(e,Y,n,r,t):Dd.bufferData(e,t,n):Dd.bufferData(e,r?Y.subarray(r,r+t):t,n)}function wi(e,t,r,n){Mo.currentContext.version>=2?Dd.bufferSubData(e,t,Y,n,r):Dd.bufferSubData(e,t,Y.subarray(n,n+r))}function Ei(e){return Dd.checkFramebufferStatus(e)}function xi(e){Dd.clear(e)}function ki(e,t,r,n){Dd.clearBufferfi(e,t,r,n)}function Si(e,t,r){Dd.clearBufferfv(e,t,J,r>>2)}function Ti(e,t,r){Dd.clearBufferiv(e,t,Q,r>>2)}function Ci(e,t,r){Dd.clearBufferuiv(e,t,Z,r>>2)}function Pi(e,t,r,n){Dd.clearColor(e,t,r,n)}function Ai(e){Dd.clearDepth(e)}function Fi(e){Dd.clearStencil(e)}function Di(e,t){return N(t===(0|t)),(e>>>0)+4294967296*t}function Li(e,t,r,n){return Dd.clientWaitSync(Mo.syncs[e],t,Di(r,n))}function Ii(e,t,r,n){Dd.colorMask(!!e,!!t,!!r,!!n)}function Ri(e){Dd.compileShader(Mo.shaders[e])}function Mi(e,t,r,n,o,i,a,s){Mo.currentContext.version>=2?Dd.currentPixelUnpackBufferBinding?Dd.compressedTexImage2D(e,t,r,n,o,i,a,s):Dd.compressedTexImage2D(e,t,r,n,o,i,Y,s,a):Dd.compressedTexImage2D(e,t,r,n,o,i,s?Y.subarray(s,s+a):null)}function Oi(e,t,r,n,o,i,a,s,c){Dd.currentPixelUnpackBufferBinding?Dd.compressedTexImage3D(e,t,r,n,o,i,a,s,c):Dd.compressedTexImage3D(e,t,r,n,o,i,a,Y,c,s)}function Bi(e,t,r,n,o,i,a,s,c){Mo.currentContext.version>=2?Dd.currentPixelUnpackBufferBinding?Dd.compressedTexSubImage2D(e,t,r,n,o,i,a,s,c):Dd.compressedTexSubImage2D(e,t,r,n,o,i,a,Y,c,s):Dd.compressedTexSubImage2D(e,t,r,n,o,i,a,c?Y.subarray(c,c+s):null)}function Ui(e,t,r,n,o,i,a,s,c,u,l){Dd.currentPixelUnpackBufferBinding?Dd.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,u,l):Dd.compressedTexSubImage3D(e,t,r,n,o,i,a,s,c,Y,l,u)}function Ni(e,t,r,n,o){Dd.copyBufferSubData(e,t,r,n,o)}function ji(e,t,r,n,o,i,a,s){Dd.copyTexImage2D(e,t,r,n,o,i,a,s)}function qi(e,t,r,n,o,i,a,s){Dd.copyTexSubImage2D(e,t,r,n,o,i,a,s)}function Gi(e,t,r,n,o,i,a,s,c){Dd.copyTexSubImage3D(e,t,r,n,o,i,a,s,c)}function Wi(){var e=Mo.getNewId(Mo.programs),t=Dd.createProgram();return t.name=e,t.maxUniformLength=t.maxAttributeLength=t.maxUniformBlockNameLength=0,t.uniformIdCounter=1,Mo.programs[e]=t,e}function Vi(e){var t=Mo.getNewId(Mo.shaders);return Mo.shaders[t]=Dd.createShader(e),t}function zi(e){Dd.cullFace(e)}function Hi(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2],o=Mo.buffers[n];o&&(Dd.deleteBuffer(o),o.name=0,Mo.buffers[n]=null,n==Dd.currentPixelPackBufferBinding&&(Dd.currentPixelPackBufferBinding=0),n==Dd.currentPixelUnpackBufferBinding&&(Dd.currentPixelUnpackBufferBinding=0))}}function $i(e,t){for(var r=0;r<e;++r){var n=Q[t+4*r>>2],o=Mo.framebuffers[n];o&&(Dd.deleteFramebuffer(o),o.name=0,Mo.framebuffers[n]=null)}}function Yi(e){if(e){var t=Mo.programs[e];t?(Dd.deleteProgram(t),t.name=0,Mo.programs[e]=null):Mo.recordError(1281)}}function Xi(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2],o=Mo.queries[n];o&&(Dd.deleteQuery(o),Mo.queries[n]=null)}}function Ki(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2],o=Mo.queries[n];o&&(Dd.disjointTimerQueryExt.deleteQueryEXT(o),Mo.queries[n]=null)}}function Qi(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2],o=Mo.renderbuffers[n];o&&(Dd.deleteRenderbuffer(o),o.name=0,Mo.renderbuffers[n]=null)}}function Zi(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2],o=Mo.samplers[n];o&&(Dd.deleteSampler(o),o.name=0,Mo.samplers[n]=null)}}function Ji(e){if(e){var t=Mo.shaders[e];t?(Dd.deleteShader(t),Mo.shaders[e]=null):Mo.recordError(1281)}}function ea(e){if(e){var t=Mo.syncs[e];t?(Dd.deleteSync(t),t.name=0,Mo.syncs[e]=null):Mo.recordError(1281)}}function ta(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2],o=Mo.textures[n];o&&(Dd.deleteTexture(o),o.name=0,Mo.textures[n]=null)}}function ra(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2],o=Mo.transformFeedbacks[n];o&&(Dd.deleteTransformFeedback(o),o.name=0,Mo.transformFeedbacks[n]=null)}}function na(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2];Dd.deleteVertexArray(Mo.vaos[n]),Mo.vaos[n]=null}}function oa(e,t){for(var r=0;r<e;r++){var n=Q[t+4*r>>2];Dd.deleteVertexArray(Mo.vaos[n]),Mo.vaos[n]=null}}function ia(e){Dd.depthFunc(e)}function aa(e){Dd.depthMask(!!e)}function sa(e,t){Dd.depthRange(e,t)}function ca(e,t){Dd.detachShader(Mo.programs[e],Mo.shaders[t])}function ua(e){Dd.disable(e)}function la(e){Dd.disableVertexAttribArray(e)}function da(e,t,r){Dd.drawArrays(e,t,r)}function fa(e,t,r,n){Dd.drawArraysInstanced(e,t,r,n)}function ma(e,t,r,n){Dd.drawArraysInstanced(e,t,r,n)}function pa(e,t,r,n){Dd.drawArraysInstanced(e,t,r,n)}function ha(e,t,r,n,o){Dd.dibvbi.drawArraysInstancedBaseInstanceWEBGL(e,t,r,n,o)}function ga(e,t,r,n){Dd.drawArraysInstanced(e,t,r,n)}function va(e,t,r,n){Dd.drawArraysInstanced(e,t,r,n)}var ya=[];function ba(e,t){for(var r=ya[e],n=0;n<e;n++)r[n]=Q[t+4*n>>2];Dd.drawBuffers(r)}function _a(e,t){for(var r=ya[e],n=0;n<e;n++)r[n]=Q[t+4*n>>2];Dd.drawBuffers(r)}function wa(e,t){for(var r=ya[e],n=0;n<e;n++)r[n]=Q[t+4*n>>2];Dd.drawBuffers(r)}function Ea(e,t,r,n){Dd.drawElements(e,t,r,n)}function xa(e,t,r,n,o){Dd.drawElementsInstanced(e,t,r,n,o)}function ka(e,t,r,n,o){Dd.drawElementsInstanced(e,t,r,n,o)}function Sa(e,t,r,n,o){Dd.drawElementsInstanced(e,t,r,n,o)}function Ta(e,t,r,n,o,i,a){Dd.dibvbi.drawElementsInstancedBaseVertexBaseInstanceWEBGL(e,t,r,n,o,i,a)}function Ca(e,t,r,n,o){Dd.drawElementsInstanced(e,t,r,n,o)}function Pa(e,t,r,n,o){Dd.drawElementsInstanced(e,t,r,n,o)}function Aa(e,t,r,n){Dd.drawElements(e,t,r,n)}function Fa(e,t,r,n,o,i){Aa(e,n,o,i)}function Da(e){Dd.enable(e)}function La(e){Dd.enableVertexAttribArray(e)}function Ia(e){Dd.endQuery(e)}function Ra(e){Dd.disjointTimerQueryExt.endQueryEXT(e)}function Ma(){Dd.endTransformFeedback()}function Oa(e,t){var r=Dd.fenceSync(e,t);if(r){var n=Mo.getNewId(Mo.syncs);return r.name=n,Mo.syncs[n]=r,n}return 0}function Ba(){Dd.finish()}function Ua(){Dd.flush()}function Na(e,t,r,n){Dd.framebufferRenderbuffer(e,t,r,Mo.renderbuffers[n])}function ja(e,t,r,n,o){Dd.framebufferTexture2D(e,t,r,Mo.textures[n],o)}function qa(e,t,r,n,o){Dd.framebufferTextureLayer(e,t,Mo.textures[r],n,o)}function Ga(e){Dd.frontFace(e)}function Wa(e,t,r,n){for(var o=0;o<e;o++){var i=Dd[r](),a=i&&Mo.getNewId(n);i?(i.name=a,n[a]=i):Mo.recordError(1282),Q[t+4*o>>2]=a}}function Va(e,t){Wa(e,t,"createBuffer",Mo.buffers)}function za(e,t){Wa(e,t,"createFramebuffer",Mo.framebuffers)}function Ha(e,t){Wa(e,t,"createQuery",Mo.queries)}function $a(e,t){for(var r=0;r<e;r++){var n=Dd.disjointTimerQueryExt.createQueryEXT();if(!n){for(Mo.recordError(1282);r<e;)Q[t+4*r++>>2]=0;return}var o=Mo.getNewId(Mo.queries);n.name=o,Mo.queries[o]=n,Q[t+4*r>>2]=o}}function Ya(e,t){Wa(e,t,"createRenderbuffer",Mo.renderbuffers)}function Xa(e,t){Wa(e,t,"createSampler",Mo.samplers)}function Ka(e,t){Wa(e,t,"createTexture",Mo.textures)}function Qa(e,t){Wa(e,t,"createTransformFeedback",Mo.transformFeedbacks)}function Za(e,t){Wa(e,t,"createVertexArray",Mo.vaos)}function Ja(e,t){Wa(e,t,"createVertexArray",Mo.vaos)}function es(e){Dd.generateMipmap(e)}function ts(e,t,r,n,o,i,a,s){t=Mo.programs[t];var c=Dd[e](t,r);if(c){var u=s&&V(c.name,s,n);o&&(Q[o>>2]=u),i&&(Q[i>>2]=c.size),a&&(Q[a>>2]=c.type)}}function rs(e,t,r,n,o,i,a){ts("getActiveAttrib",e,t,r,n,o,i,a)}function ns(e,t,r,n,o,i,a){ts("getActiveUniform",e,t,r,n,o,i,a)}function os(e,t,r,n,o){e=Mo.programs[e];var i=Dd.getActiveUniformBlockName(e,t);if(i)if(o&&r>0){var a=V(i,o,r);n&&(Q[n>>2]=a)}else n&&(Q[n>>2]=0)}function is(e,t,r,n){if(n)if(e=Mo.programs[e],35393!=r){var o=Dd.getActiveUniformBlockParameter(e,t,r);if(null!==o)if(35395==r)for(var i=0;i<o.length;i++)Q[n+4*i>>2]=o[i];else Q[n>>2]=o}else{var a=Dd.getActiveUniformBlockName(e,t);Q[n>>2]=a.length+1}else Mo.recordError(1281)}function as(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(Q[r+4*a>>2]);var s=Dd.getActiveUniforms(e,i,n);if(s){var c=s.length;for(a=0;a<c;a++)Q[o+4*a>>2]=s[a]}}else Mo.recordError(1281)}function ss(e,t,r,n){var o=Dd.getAttachedShaders(Mo.programs[e]),i=o.length;i>t&&(i=t),Q[r>>2]=i;for(var a=0;a<i;++a){var s=Mo.shaders.indexOf(o[a]);Q[n+4*a>>2]=s}}function cs(e,t){return Dd.getAttribLocation(Mo.programs[e],G(t))}function us(e){return Z[e>>2]+4294967296*Q[e+4>>2]}function ls(e){return Z[e>>2]+4294967296*Z[e+4>>2]}function ds(e,t){Z[e>>2]=t,Z[e+4>>2]=(t-Z[e>>2])/4294967296;var r=t>=0?ls(e):us(e);r!=t&&k("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 fs(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=Dd.getParameter(34467);n=o?o.length:0;break;case 33309:if(Mo.currentContext.version<2)return void Mo.recordError(1282);n=2*(Dd.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=Dd.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:Q[t+4*a>>2]=i[a];break;case 2:J[t+4*a>>2]=i[a];break;case 4:$[t+a>>0]=i[a]?1:0}return}try{n=0|i.name}catch(t){return Mo.recordError(1280),void x("GL_INVALID_ENUM in glGet"+r+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+t+")")}}break;default:return Mo.recordError(1280),void x("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:ds(t,n);break;case 0:Q[t>>2]=n;break;case 2:J[t>>2]=n;break;case 4:$[t>>0]=n?1:0}}else Mo.recordError(1281)}function ms(e,t){fs(e,t,4)}function ps(e,t,r){r?ds(r,Dd.getBufferParameter(e,t)):Mo.recordError(1281)}function hs(e,t,r){r?Q[r>>2]=Dd.getBufferParameter(e,t):Mo.recordError(1281)}function gs(){var e=Dd.getError()||Mo.lastError;return Mo.lastError=0,e}function vs(e,t){fs(e,t,2)}function ys(e,t){return Dd.getFragDataLocation(Mo.programs[e],G(t))}function bs(e,t,r,n){var o=Dd.getFramebufferAttachmentParameter(e,t,r);(o instanceof WebGLRenderbuffer||o instanceof WebGLTexture)&&(o=0|o.name),Q[n>>2]=o}function _s(e,t,r,n){if(r){var o,i=Dd.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:ds(r,o);break;case 0:Q[r>>2]=o;break;case 2:J[r>>2]=o;break;case 4:$[r>>0]=o?1:0;break;default:throw"internal emscriptenWebGLGetIndexed() error, bad type: "+n}}else Mo.recordError(1281)}function ws(e,t,r){_s(e,t,r,1)}function Es(e,t){fs(e,t,1)}function xs(e,t,r){_s(e,t,r,0)}function ks(e,t){fs(e,t,0)}function Ss(e,t,r,n,o){if(n<0)Mo.recordError(1281);else if(o){var i=Dd.getInternalformatParameter(e,t,r);if(null!==i)for(var a=0;a<i.length&&a<n;++a)Q[o+4*a>>2]=i[a]}else Mo.recordError(1281)}function Ts(e,t,r,n,o){Mo.recordError(1282)}function Cs(e,t,r,n){var o=Dd.getProgramInfoLog(Mo.programs[e]);null===o&&(o="(unknown error)");var i=t>0&&n?V(o,n,t):0;r&&(Q[r>>2]=i)}function Ps(e,t,r){if(r)if(e>=Mo.counter)Mo.recordError(1281);else if(e=Mo.programs[e],35716==t){var n=Dd.getProgramInfoLog(e);null===n&&(n="(unknown error)"),Q[r>>2]=n.length+1}else if(35719==t){if(!e.maxUniformLength)for(var o=0;o<Dd.getProgramParameter(e,35718);++o)e.maxUniformLength=Math.max(e.maxUniformLength,Dd.getActiveUniform(e,o).name.length+1);Q[r>>2]=e.maxUniformLength}else if(35722==t){if(!e.maxAttributeLength)for(o=0;o<Dd.getProgramParameter(e,35721);++o)e.maxAttributeLength=Math.max(e.maxAttributeLength,Dd.getActiveAttrib(e,o).name.length+1);Q[r>>2]=e.maxAttributeLength}else if(35381==t){if(!e.maxUniformBlockNameLength)for(o=0;o<Dd.getProgramParameter(e,35382);++o)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,Dd.getActiveUniformBlockName(e,o).length+1);Q[r>>2]=e.maxUniformBlockNameLength}else Q[r>>2]=Dd.getProgramParameter(e,t);else Mo.recordError(1281)}function As(e,t,r){if(r){var n,o=Mo.queries[e];ds(r,"boolean"==typeof(n=Mo.currentContext.version<2?Dd.disjointTimerQueryExt.getQueryObjectEXT(o,t):Dd.getQueryParameter(o,t))?n?1:0:n)}else Mo.recordError(1281)}function Fs(e,t,r){if(r){var n,o=Mo.queries[e],i=Dd.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,Q[r>>2]=n}else Mo.recordError(1281)}function Ds(e,t,r){if(r){var n,o=Mo.queries[e];ds(r,"boolean"==typeof(n=Mo.currentContext.version<2?Dd.disjointTimerQueryExt.getQueryObjectEXT(o,t):Dd.getQueryParameter(o,t))?n?1:0:n)}else Mo.recordError(1281)}function Ls(e,t,r){if(r){var n,o=Mo.queries[e],i=Dd.getQueryParameter(o,t);n="boolean"==typeof i?i?1:0:i,Q[r>>2]=n}else Mo.recordError(1281)}function Is(e,t,r){if(r){var n,o=Mo.queries[e],i=Dd.disjointTimerQueryExt.getQueryObjectEXT(o,t);n="boolean"==typeof i?i?1:0:i,Q[r>>2]=n}else Mo.recordError(1281)}function Rs(e,t,r){r?Q[r>>2]=Dd.getQuery(e,t):Mo.recordError(1281)}function Ms(e,t,r){r?Q[r>>2]=Dd.disjointTimerQueryExt.getQueryEXT(e,t):Mo.recordError(1281)}function Os(e,t,r){r?Q[r>>2]=Dd.getRenderbufferParameter(e,t):Mo.recordError(1281)}function Bs(e,t,r){r?J[r>>2]=Dd.getSamplerParameter(Mo.samplers[e],t):Mo.recordError(1281)}function Us(e,t,r){r?Q[r>>2]=Dd.getSamplerParameter(Mo.samplers[e],t):Mo.recordError(1281)}function Ns(e,t,r,n){var o=Dd.getShaderInfoLog(Mo.shaders[e]);null===o&&(o="(unknown error)");var i=t>0&&n?V(o,n,t):0;r&&(Q[r>>2]=i)}function js(e,t,r,n){var o=Dd.getShaderPrecisionFormat(e,t);Q[r>>2]=o.rangeMin,Q[r+4>>2]=o.rangeMax,Q[n>>2]=o.precision}function qs(e,t,r,n){var o=Dd.getShaderSource(Mo.shaders[e]);if(o){var i=t>0&&n?V(o,n,t):0;r&&(Q[r>>2]=i)}}function Gs(e,t,r){if(r)if(35716==t){var n=Dd.getShaderInfoLog(Mo.shaders[e]);null===n&&(n="(unknown error)");var o=n?n.length+1:0;Q[r>>2]=o}else if(35720==t){var i=Dd.getShaderSource(Mo.shaders[e]),a=i?i.length+1:0;Q[r>>2]=a}else Q[r>>2]=Dd.getShaderParameter(Mo.shaders[e],t);else Mo.recordError(1281)}function Ws(e){var t=z(e)+1,r=Gd(t);return V(e,r,t),r}function Vs(e){var t=Mo.stringCache[e];if(!t){switch(e){case 7939:var r=Dd.getSupportedExtensions()||[];t=Ws((r=r.concat(r.map((function(e){return"GL_"+e})))).join(" "));break;case 7936:case 7937:case 37445:case 37446:var n=Dd.getParameter(e);n||Mo.recordError(1280),t=n&&Ws(n);break;case 7938:var o=Dd.getParameter(7938);t=Ws(o=Mo.currentContext.version>=2?"OpenGL ES 3.0 ("+o+")":"OpenGL ES 2.0 ("+o+")");break;case 35724:var i=Dd.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=Ws(i);break;default:Mo.recordError(1280)}Mo.stringCache[e]=t}return t}function zs(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=Dd.getSupportedExtensions()||[];return n=(n=n.concat(n.map((function(e){return"GL_"+e})))).map((function(e){return Ws(e)})),r=Mo.stringiCache[e]=n,t<0||t>=r.length?(Mo.recordError(1281),0):r[t]}return Mo.recordError(1280),0}function Hs(e,t,r,n,o){if(r<0)Mo.recordError(1281);else if(o){var i=Dd.getSyncParameter(Mo.syncs[e],t);null!==i&&(Q[o>>2]=i,n&&(Q[n>>2]=1))}else Mo.recordError(1281)}function $s(e,t,r){r?J[r>>2]=Dd.getTexParameter(e,t):Mo.recordError(1281)}function Ys(e,t,r){r?Q[r>>2]=Dd.getTexParameter(e,t):Mo.recordError(1281)}function Xs(e,t,r,n,o,i,a){e=Mo.programs[e];var s=Dd.getTransformFeedbackVarying(e,t);if(s){if(a&&r>0){var c=V(s.name,a,r);n&&(Q[n>>2]=c)}else n&&(Q[n>>2]=0);o&&(Q[o>>2]=s.size),i&&(Q[i>>2]=s.type)}}function Ks(e,t){return Dd.getUniformBlockIndex(Mo.programs[e],G(t))}function Qs(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(G(Q[r+4*i>>2]));var a=Dd.getUniformIndices(e,o);if(a){var s=a.length;for(i=0;i<s;i++)Q[n+4*i>>2]=a[i]}}else Mo.recordError(1281)}function Zs(e){return parseInt(e)}function Js(e){return"]"==e.slice(-1)&&e.lastIndexOf("[")}function ec(e){var t,r,n=e.uniformLocsById,o=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},t=0;t<Dd.getProgramParameter(e,35718);++t){var i=Dd.getActiveUniform(e,t),a=i.name,s=i.size,c=Js(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 tc(e,t){if(t=G(t),e=Mo.programs[e]){ec(e);var r=e.uniformLocsById,n=0,o=t,i=Js(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]||Dd.getUniformLocation(e,t)))return n}else Mo.recordError(1281);return-1}function rc(e){var t=Dd.currentProgram;if(t){var r=t.uniformLocsById[e];return"number"==typeof r&&(t.uniformLocsById[e]=r=Dd.getUniformLocation(t,t.uniformArrayNamesById[e]+(r>0?"["+r+"]":""))),r}Mo.recordError(1282)}function nc(e,t,r,n){if(r){ec(e=Mo.programs[e]);var o=Dd.getUniform(e,rc(t));if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:Q[r>>2]=o;break;case 2:J[r>>2]=o}else for(var i=0;i<o.length;i++)switch(n){case 0:Q[r+4*i>>2]=o[i];break;case 2:J[r+4*i>>2]=o[i]}}else Mo.recordError(1281)}function oc(e,t,r){nc(e,t,r,2)}function ic(e,t,r){nc(e,t,r,0)}function ac(e,t,r){nc(e,t,r,0)}function sc(e,t,r,n){if(r){var o=Dd.getVertexAttrib(e,t);if(34975==t)Q[r>>2]=o&&o.name;else if("number"==typeof o||"boolean"==typeof o)switch(n){case 0:Q[r>>2]=o;break;case 2:J[r>>2]=o;break;case 5:Q[r>>2]=Math.fround(o)}else for(var i=0;i<o.length;i++)switch(n){case 0:Q[r+4*i>>2]=o[i];break;case 2:J[r+4*i>>2]=o[i];break;case 5:Q[r+4*i>>2]=Math.fround(o[i])}}else Mo.recordError(1281)}function cc(e,t,r){sc(e,t,r,0)}function uc(e,t,r){sc(e,t,r,0)}function lc(e,t,r){r?Q[r>>2]=Dd.getVertexAttribOffset(e,t):Mo.recordError(1281)}function dc(e,t,r){sc(e,t,r,2)}function fc(e,t,r){sc(e,t,r,5)}function mc(e,t){Dd.hint(e,t)}function pc(e,t,r){for(var n=ya[t],o=0;o<t;o++)n[o]=Q[r+4*o>>2];Dd.invalidateFramebuffer(e,n)}function hc(e,t,r,n,o,i,a){for(var s=ya[t],c=0;c<t;c++)s[c]=Q[r+4*c>>2];Dd.invalidateSubFramebuffer(e,s,n,o,i,a)}function gc(e){var t=Mo.buffers[e];return t?Dd.isBuffer(t):0}function vc(e){return Dd.isEnabled(e)}function yc(e){var t=Mo.framebuffers[e];return t?Dd.isFramebuffer(t):0}function bc(e){return(e=Mo.programs[e])?Dd.isProgram(e):0}function _c(e){var t=Mo.queries[e];return t?Dd.isQuery(t):0}function wc(e){var t=Mo.queries[e];return t?Dd.disjointTimerQueryExt.isQueryEXT(t):0}function Ec(e){var t=Mo.renderbuffers[e];return t?Dd.isRenderbuffer(t):0}function xc(e){var t=Mo.samplers[e];return t?Dd.isSampler(t):0}function kc(e){var t=Mo.shaders[e];return t?Dd.isShader(t):0}function Sc(e){return Dd.isSync(Mo.syncs[e])}function Tc(e){var t=Mo.textures[e];return t?Dd.isTexture(t):0}function Cc(e){return Dd.isTransformFeedback(Mo.transformFeedbacks[e])}function Pc(e){var t=Mo.vaos[e];return t?Dd.isVertexArray(t):0}function Ac(e){var t=Mo.vaos[e];return t?Dd.isVertexArray(t):0}function Fc(e){Dd.lineWidth(e)}function Dc(e){e=Mo.programs[e],Dd.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}}function Lc(e,t,r,n,o,i){Dd.mdibvbi.multiDrawArraysInstancedBaseInstanceWEBGL(e,Q,t>>2,Q,r>>2,Q,n>>2,Z,o>>2,i)}function Ic(e,t,r,n,o,i,a,s){Dd.mdibvbi.multiDrawElementsInstancedBaseVertexBaseInstanceWEBGL(e,Q,t>>2,r,Q,n>>2,Q,o>>2,Q,i>>2,Z,a>>2,s)}function Rc(){Dd.pauseTransformFeedback()}function Mc(e,t){3317==e&&(Mo.unpackAlignment=t),Dd.pixelStorei(e,t)}function Oc(e,t){Dd.polygonOffset(e,t)}function Bc(e,t,r,n){Mo.recordError(1280)}function Uc(e,t,r){Mo.recordError(1280)}function Nc(e,t){Dd.disjointTimerQueryExt.queryCounterEXT(Mo.queries[e],t)}function jc(e){Dd.readBuffer(e)}function qc(e,t,r,n){var o;return t*(e*r+(o=n)-1&-o)}function Gc(e){return{5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[e-6402]||1}function Wc(e){return 0==(e-=5120)?$:1==e?Y:2==e?X:4==e?Q:6==e?J:5==e||28922==e||28520==e||30779==e||30782==e?Z:K}function Vc(e){return 31-Math.clz32(e.BYTES_PER_ELEMENT)}function zc(e,t,r,n,o,i){var a=Wc(e),s=Vc(a),c=1<<s,u=qc(r,n,Gc(t)*c,Mo.unpackAlignment);return a.subarray(o>>s,o+u>>s)}function Hc(e,t,r,n,o,i,a){if(Mo.currentContext.version>=2)if(Dd.currentPixelPackBufferBinding)Dd.readPixels(e,t,r,n,o,i,a);else{var s=Wc(i);Dd.readPixels(e,t,r,n,o,i,s,a>>Vc(s))}else{var c=zc(i,o,r,n,a);c?Dd.readPixels(e,t,r,n,o,i,c):Mo.recordError(1280)}}function $c(){}function Yc(e,t,r,n){Dd.renderbufferStorage(e,t,r,n)}function Xc(e,t,r,n,o){Dd.renderbufferStorageMultisample(e,t,r,n,o)}function Kc(){Dd.resumeTransformFeedback()}function Qc(e,t){Dd.sampleCoverage(e,!!t)}function Zc(e,t,r){Dd.samplerParameterf(Mo.samplers[e],t,r)}function Jc(e,t,r){var n=J[r>>2];Dd.samplerParameterf(Mo.samplers[e],t,n)}function eu(e,t,r){Dd.samplerParameteri(Mo.samplers[e],t,r)}function tu(e,t,r){var n=Q[r>>2];Dd.samplerParameteri(Mo.samplers[e],t,n)}function ru(e,t,r,n){Dd.scissor(e,t,r,n)}function nu(){Mo.recordError(1280)}function ou(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)}Dd.shaderSource(Mo.shaders[e],o)}function iu(e,t,r){Dd.stencilFunc(e,t,r)}function au(e,t,r,n){Dd.stencilFuncSeparate(e,t,r,n)}function su(e){Dd.stencilMask(e)}function cu(e,t){Dd.stencilMaskSeparate(e,t)}function uu(e,t,r){Dd.stencilOp(e,t,r)}function lu(e,t,r,n){Dd.stencilOpSeparate(e,t,r,n)}function du(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(Dd.currentPixelUnpackBufferBinding)Dd.texImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Wc(s);Dd.texImage2D(e,t,r,n,o,i,a,s,u,c>>Vc(u))}else Dd.texImage2D(e,t,r,n,o,i,a,s,null);else Dd.texImage2D(e,t,r,n,o,i,a,s,c?zc(s,a,n,o,c):null)}function fu(e,t,r,n,o,i,a,s,c,u){if(Dd.currentPixelUnpackBufferBinding)Dd.texImage3D(e,t,r,n,o,i,a,s,c,u);else if(u){var l=Wc(c);Dd.texImage3D(e,t,r,n,o,i,a,s,c,l,u>>Vc(l))}else Dd.texImage3D(e,t,r,n,o,i,a,s,c,null)}function mu(e,t,r){Dd.texParameterf(e,t,r)}function pu(e,t,r){var n=J[r>>2];Dd.texParameterf(e,t,n)}function hu(e,t,r){Dd.texParameteri(e,t,r)}function gu(e,t,r){var n=Q[r>>2];Dd.texParameteri(e,t,n)}function vu(e,t,r,n,o){Dd.texStorage2D(e,t,r,n,o)}function yu(e,t,r,n,o,i){Dd.texStorage3D(e,t,r,n,o,i)}function bu(e,t,r,n,o,i,a,s,c){if(Mo.currentContext.version>=2&&36193==s&&(s=5131),Mo.currentContext.version>=2)if(Dd.currentPixelUnpackBufferBinding)Dd.texSubImage2D(e,t,r,n,o,i,a,s,c);else if(c){var u=Wc(s);Dd.texSubImage2D(e,t,r,n,o,i,a,s,u,c>>Vc(u))}else Dd.texSubImage2D(e,t,r,n,o,i,a,s,null);else{var l=null;c&&(l=zc(s,a,o,i,c)),Dd.texSubImage2D(e,t,r,n,o,i,a,s,l)}}function _u(e,t,r,n,o,i,a,s,c,u,l){if(Dd.currentPixelUnpackBufferBinding)Dd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,l);else if(l){var d=Wc(u);Dd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,d,l>>Vc(d))}else Dd.texSubImage3D(e,t,r,n,o,i,a,s,c,u,null)}function wu(e,t,r,n){e=Mo.programs[e];for(var o=[],i=0;i<t;i++)o.push(G(Q[r+4*i>>2]));Dd.transformFeedbackVaryings(e,o,n)}function Eu(e,t){Dd.uniform1f(rc(e),t)}var xu=[];function ku(e,t,r){if(Mo.currentContext.version>=2)Dd.uniform1fv(rc(e),J,r>>2,t);else{if(t<=288)for(var n=xu[t-1],o=0;o<t;++o)n[o]=J[r+4*o>>2];else n=J.subarray(r>>2,r+4*t>>2);Dd.uniform1fv(rc(e),n)}}function Su(e,t){Dd.uniform1i(rc(e),t)}var Tu=[];function Cu(e,t,r){if(Mo.currentContext.version>=2)Dd.uniform1iv(rc(e),Q,r>>2,t);else{if(t<=288)for(var n=Tu[t-1],o=0;o<t;++o)n[o]=Q[r+4*o>>2];else n=Q.subarray(r>>2,r+4*t>>2);Dd.uniform1iv(rc(e),n)}}function Pu(e,t){Dd.uniform1ui(rc(e),t)}function Au(e,t,r){Dd.uniform1uiv(rc(e),Z,r>>2,t)}function Fu(e,t,r){Dd.uniform2f(rc(e),t,r)}function Du(e,t,r){if(Mo.currentContext.version>=2)Dd.uniform2fv(rc(e),J,r>>2,2*t);else{if(t<=144)for(var n=xu[2*t-1],o=0;o<2*t;o+=2)n[o]=J[r+4*o>>2],n[o+1]=J[r+(4*o+4)>>2];else n=J.subarray(r>>2,r+8*t>>2);Dd.uniform2fv(rc(e),n)}}function Lu(e,t,r){Dd.uniform2i(rc(e),t,r)}function Iu(e,t,r){if(Mo.currentContext.version>=2)Dd.uniform2iv(rc(e),Q,r>>2,2*t);else{if(t<=144)for(var n=Tu[2*t-1],o=0;o<2*t;o+=2)n[o]=Q[r+4*o>>2],n[o+1]=Q[r+(4*o+4)>>2];else n=Q.subarray(r>>2,r+8*t>>2);Dd.uniform2iv(rc(e),n)}}function Ru(e,t,r){Dd.uniform2ui(rc(e),t,r)}function Mu(e,t,r){Dd.uniform2uiv(rc(e),Z,r>>2,2*t)}function Ou(e,t,r,n){Dd.uniform3f(rc(e),t,r,n)}function Bu(e,t,r){if(Mo.currentContext.version>=2)Dd.uniform3fv(rc(e),J,r>>2,3*t);else{if(t<=96)for(var n=xu[3*t-1],o=0;o<3*t;o+=3)n[o]=J[r+4*o>>2],n[o+1]=J[r+(4*o+4)>>2],n[o+2]=J[r+(4*o+8)>>2];else n=J.subarray(r>>2,r+12*t>>2);Dd.uniform3fv(rc(e),n)}}function Uu(e,t,r,n){Dd.uniform3i(rc(e),t,r,n)}function Nu(e,t,r){if(Mo.currentContext.version>=2)Dd.uniform3iv(rc(e),Q,r>>2,3*t);else{if(t<=96)for(var n=Tu[3*t-1],o=0;o<3*t;o+=3)n[o]=Q[r+4*o>>2],n[o+1]=Q[r+(4*o+4)>>2],n[o+2]=Q[r+(4*o+8)>>2];else n=Q.subarray(r>>2,r+12*t>>2);Dd.uniform3iv(rc(e),n)}}function ju(e,t,r,n){Dd.uniform3ui(rc(e),t,r,n)}function qu(e,t,r){Dd.uniform3uiv(rc(e),Z,r>>2,3*t)}function Gu(e,t,r,n,o){Dd.uniform4f(rc(e),t,r,n,o)}function Wu(e,t,r){if(Mo.currentContext.version>=2)Dd.uniform4fv(rc(e),J,r>>2,4*t);else{if(t<=72){var n=xu[4*t-1],o=J;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=J.subarray(r>>2,r+16*t>>2);Dd.uniform4fv(rc(e),n)}}function Vu(e,t,r,n,o){Dd.uniform4i(rc(e),t,r,n,o)}function zu(e,t,r){if(Mo.currentContext.version>=2)Dd.uniform4iv(rc(e),Q,r>>2,4*t);else{if(t<=72)for(var n=Tu[4*t-1],o=0;o<4*t;o+=4)n[o]=Q[r+4*o>>2],n[o+1]=Q[r+(4*o+4)>>2],n[o+2]=Q[r+(4*o+8)>>2],n[o+3]=Q[r+(4*o+12)>>2];else n=Q.subarray(r>>2,r+16*t>>2);Dd.uniform4iv(rc(e),n)}}function Hu(e,t,r,n,o){Dd.uniform4ui(rc(e),t,r,n,o)}function $u(e,t,r){Dd.uniform4uiv(rc(e),Z,r>>2,4*t)}function Yu(e,t,r){e=Mo.programs[e],Dd.uniformBlockBinding(e,t,r)}function Xu(e,t,r,n){if(Mo.currentContext.version>=2)Dd.uniformMatrix2fv(rc(e),!!r,J,n>>2,4*t);else{if(t<=72)for(var o=xu[4*t-1],i=0;i<4*t;i+=4)o[i]=J[n+4*i>>2],o[i+1]=J[n+(4*i+4)>>2],o[i+2]=J[n+(4*i+8)>>2],o[i+3]=J[n+(4*i+12)>>2];else o=J.subarray(n>>2,n+16*t>>2);Dd.uniformMatrix2fv(rc(e),!!r,o)}}function Ku(e,t,r,n){Dd.uniformMatrix2x3fv(rc(e),!!r,J,n>>2,6*t)}function Qu(e,t,r,n){Dd.uniformMatrix2x4fv(rc(e),!!r,J,n>>2,8*t)}function Zu(e,t,r,n){if(Mo.currentContext.version>=2)Dd.uniformMatrix3fv(rc(e),!!r,J,n>>2,9*t);else{if(t<=32)for(var o=xu[9*t-1],i=0;i<9*t;i+=9)o[i]=J[n+4*i>>2],o[i+1]=J[n+(4*i+4)>>2],o[i+2]=J[n+(4*i+8)>>2],o[i+3]=J[n+(4*i+12)>>2],o[i+4]=J[n+(4*i+16)>>2],o[i+5]=J[n+(4*i+20)>>2],o[i+6]=J[n+(4*i+24)>>2],o[i+7]=J[n+(4*i+28)>>2],o[i+8]=J[n+(4*i+32)>>2];else o=J.subarray(n>>2,n+36*t>>2);Dd.uniformMatrix3fv(rc(e),!!r,o)}}function Ju(e,t,r,n){Dd.uniformMatrix3x2fv(rc(e),!!r,J,n>>2,6*t)}function el(e,t,r,n){Dd.uniformMatrix3x4fv(rc(e),!!r,J,n>>2,12*t)}function tl(e,t,r,n){if(Mo.currentContext.version>=2)Dd.uniformMatrix4fv(rc(e),!!r,J,n>>2,16*t);else{if(t<=18){var o=xu[16*t-1],i=J;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=J.subarray(n>>2,n+64*t>>2);Dd.uniformMatrix4fv(rc(e),!!r,o)}}function rl(e,t,r,n){Dd.uniformMatrix4x2fv(rc(e),!!r,J,n>>2,8*t)}function nl(e,t,r,n){Dd.uniformMatrix4x3fv(rc(e),!!r,J,n>>2,12*t)}function ol(e){e=Mo.programs[e],Dd.useProgram(e),Dd.currentProgram=e}function il(e){Dd.validateProgram(Mo.programs[e])}function al(e,t){Dd.vertexAttrib1f(e,t)}function sl(e,t){Dd.vertexAttrib1f(e,J[t>>2])}function cl(e,t,r){Dd.vertexAttrib2f(e,t,r)}function ul(e,t){Dd.vertexAttrib2f(e,J[t>>2],J[t+4>>2])}function ll(e,t,r,n){Dd.vertexAttrib3f(e,t,r,n)}function dl(e,t){Dd.vertexAttrib3f(e,J[t>>2],J[t+4>>2],J[t+8>>2])}function fl(e,t,r,n,o){Dd.vertexAttrib4f(e,t,r,n,o)}function ml(e,t){Dd.vertexAttrib4f(e,J[t>>2],J[t+4>>2],J[t+8>>2],J[t+12>>2])}function pl(e,t){Dd.vertexAttribDivisor(e,t)}function hl(e,t){Dd.vertexAttribDivisor(e,t)}function gl(e,t){Dd.vertexAttribDivisor(e,t)}function vl(e,t){Dd.vertexAttribDivisor(e,t)}function yl(e,t){Dd.vertexAttribDivisor(e,t)}function bl(e,t,r,n,o){Dd.vertexAttribI4i(e,t,r,n,o)}function _l(e,t){Dd.vertexAttribI4i(e,Q[t>>2],Q[t+4>>2],Q[t+8>>2],Q[t+12>>2])}function wl(e,t,r,n,o){Dd.vertexAttribI4ui(e,t,r,n,o)}function El(e,t){Dd.vertexAttribI4ui(e,Z[t>>2],Z[t+4>>2],Z[t+8>>2],Z[t+12>>2])}function xl(e,t,r,n,o){Dd.vertexAttribIPointer(e,t,r,n,o)}function kl(e,t,r,n,o,i){Dd.vertexAttribPointer(e,t,r,!!n,o,i)}function Sl(e,t,r,n){Dd.viewport(e,t,r,n)}function Tl(e,t,r,n){Dd.waitSync(Mo.syncs[e],t,Di(r,n))}function Cl(e,t,r){Y.copyWithin(e,t,t+r)}function Pl(e){try{return R.grow(e-H.byteLength+65535>>>16),pe(R.buffer),1}catch(t){x("emscripten_realloc_buffer: Attempted to grow heap from "+H.byteLength+" bytes to "+e+" bytes, but got error: "+t)}}function Al(e){var t=Y.length;N((e>>>=0)>t);var r,n=2147483648;if(e>n)return x("Cannot enlarge memory, asked to go up to "+e+" bytes, but the limit is 2147483648 bytes!"),!1;for(var o=1;o<=4;o*=2){var i=t*(1+.2/o);i=Math.min(i,e+100663296);var a=Math.min(n,(r=Math.max(e,i))+(65536-r%65536)%65536);if(Pl(a))return!0}return x("Failed to grow the heap from "+t+" bytes to "+a+" bytes, not enough memory!"),!1}function Fl(e,t,r,n,i,a,s,c,u){const l=o.UTF8ToString(e,e+t),d=o.HEAPU8.subarray(a,a+s),f=o.HEAPU32.subarray(c/4,c/4+u),m=o.emscripten_ubq_codec_decoderNextHandle++,p=[];for(let e=0;e<u;e++)p[e]=Mo.textures[f[e]];const h={codec:l,codedWidth:r,codedHeight:n,description:new Uint8Array(d)};try{const e=o.emscripten_ubq_codec_createVideoDecoder(p);e.configure(h),e.numberOfFrames=i,o.emscripten_ubq_codec_decoders.set(m,{videoDecoder:e,decoderConfig:h,textures:p})}catch{return 0}return m}function Dl(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 Ll(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 Il(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 Ol(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 Bl(e){const t=o.emscripten_ubq_codec_decoders.get(e).videoDecoder;await t.flush(),t.decodedFrames=0}function Ul(e){return o.emscripten_ubq_codec_decoders.get(e).videoDecoder.decodedFrames}function Nl(){return"undefined"!=typeof VideoFrame&&"undefined"!=typeof VideoDecoder&&"undefined"!=typeof VideoEncoder}function jl(e){const t=o.emscripten_ubq_codec_decoders.get(e).videoDecoder;t.decodedFrames=0,t.probing=!0}function ql(e){const t=o.emscripten_ubq_codec_decoders.get(e).videoDecoder;t.probing=!1,t.decodedFrames=0}function Gl(e){const t=o.emscripten_ubq_codec_decoders.get(e),r=!0===t.videoDecoder.textureUploadFlag;return t.videoDecoder.textureUploadFlag=!1,r}function Wl(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 Vl(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 zl(e){return o.emscripten_ubq_asyncFetchHeaders.has(e)?o.emscripten_ubq_asyncFetchHeaders.get(e):0}function Hl(e,t,r,n,i,c,u,l,d){let f=o.UTF8ToString(t,r),m=o.UTF8ToString(l,d),p=o.emscripten_ubq_asyncFetchNextHandle++;o.emscripten_ubq_asyncFetchStates.set(p,{state:a.PENDING});let h={};for(let e=0;e<i;e++){const t=o.getValue(n+4*e,"i32"),r=o.emscripten_ubq_asyncFetchHeaders.get(t);h[r.key]=r.value}const g=s[e];let v;return"GET"!==g&&"HEAD"!==g&&(v=new Uint8Array(o.HEAPU8.buffer,c,u)),fetch(f,{method:g,headers:h,body:v,mode:"cors",credentials:m}).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(p,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(p,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(p,{state:a.FINISHED,result:e})})).catch((e=>{o.emscripten_ubq_asyncFetchStates.set(p,{state:a.ERROR,error:e})})),p}function $l(e){return!!o.emscripten_ubq_asyncFetchStates.has(e)&&(o.emscripten_ubq_asyncFetchStates.delete(e),!0)}function Yl(e){return o.emscripten_ubq_asyncFetchCompletedBytes.has(e)?o.emscripten_ubq_asyncFetchCompletedBytes.get(e):0}function Xl(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 Kl(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 Ql(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 Jl={inEventHandler:0,removeAllEventListeners:function(){for(var e=Jl.eventHandlers.length-1;e>=0;--e)Jl._removeHandler(e);Jl.eventHandlers=[],Jl.deferredCalls=[]},registerRemoveEventListeners:function(){Jl.removeEventListenersRegistered||(xe.push(Jl.removeAllEventListeners),Jl.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 Jl.deferredCalls){var i=Jl.deferredCalls[o];if(i.targetFunction==e&&n(i.argsList,r))return}Jl.deferredCalls.push({targetFunction:e,precedence:t,argsList:r}),Jl.deferredCalls.sort((function(e,t){return e.precedence<t.precedence}))},removeDeferredCalls:function(e){for(var t=0;t<Jl.deferredCalls.length;++t)Jl.deferredCalls[t].targetFunction==e&&(Jl.deferredCalls.splice(t,1),--t)},canPerformEventHandlerRequests:function(){return Jl.inEventHandler&&Jl.currentEventHandler.allowsDeferredCalls},runDeferredCalls:function(){if(Jl.canPerformEventHandlerRequests())for(var e=0;e<Jl.deferredCalls.length;++e){var t=Jl.deferredCalls[e];Jl.deferredCalls.splice(e,1),--e,t.targetFunction.apply(null,t.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:function(e,t){for(var r=0;r<Jl.eventHandlers.length;++r)Jl.eventHandlers[r].target!=e||t&&t!=Jl.eventHandlers[r].eventTypeString||Jl._removeHandler(r--)},_removeHandler:function(e){var t=Jl.eventHandlers[e];t.target.removeEventListener(t.eventTypeString,t.eventListenerFunc,t.useCapture),Jl.eventHandlers.splice(e,1)},registerOrRemoveHandler:function(e){var t=function(t){++Jl.inEventHandler,Jl.currentEventHandler=e,Jl.runDeferredCalls(),e.handlerFunc(t),Jl.runDeferredCalls(),--Jl.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=t,e.target.addEventListener(e.eventTypeString,t,e.useCapture),Jl.eventHandlers.push(e),Jl.registerRemoveEventListeners();else for(var r=0;r<Jl.eventHandlers.length;++r)Jl.eventHandlers[r].target==e.target&&Jl.eventHandlers[r].eventTypeString==e.eventTypeString&&Jl._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}},ed=["default","low-power","high-performance"];function td(e){return e>2?G(e):e}var rd=[0,"undefined"!=typeof document?document:0,"undefined"!=typeof window?window:0];function nd(e){return e=td(e),rd[e]||("undefined"!=typeof document?document.querySelector(e):void 0)}function od(e){return nd(e)}function id(e,t){N(t);var r=t>>2,n=Q[r+6],o={alpha:!!Q[r+0],depth:!!Q[r+1],stencil:!!Q[r+2],antialias:!!Q[r+3],premultipliedAlpha:!!Q[r+4],preserveDrawingBuffer:!!Q[r+5],powerPreference:ed[n],failIfMajorPerformanceCaveat:!!Q[r+7],majorVersion:Q[r+8],minorVersion:Q[r+9],enableExtensionsByDefault:Q[r+10],explicitSwapControl:Q[r+11],proxyContextToMainThread:Q[r+12],renderViaOffscreenBackBuffer:Q[r+13]},i=od(e);return i?o.explicitSwapControl?0:Mo.createContext(i,o):0}function ad(e,t){return id(e,t)}function sd(e){Mo.currentContext==e&&(Mo.currentContext=0),Mo.deleteContext(e)}function cd(e){N(e);for(var t=e>>2,r=0;r<14;++r)Q[t+r]=0;Q[t+0]=Q[t+1]=Q[t+3]=Q[t+4]=Q[t+8]=Q[t+10]=1}function ud(e){return Mo.makeContextCurrent(e)?0:-5}var ld={};function dd(){return l||"./this.program"}function fd(){if(!fd.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",_:dd()};for(var t in ld)void 0===ld[t]?delete e[t]:e[t]=ld[t];var r=[];for(var t in e)r.push(t+"="+e[t]);fd.strings=r}return fd.strings}function md(e,t){var r=0;return fd().forEach((function(n,o){var i=t+r;Q[e+4*o>>2]=i,me(n,i),r+=n.length+1})),0}function pd(e,t){var r=fd();Q[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),Q[t>>2]=n,0}function hd(e){try{var t=xt.getStreamFromFD(e);return Et.close(t),0}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return e.errno}}function gd(e,t,r,n,o){try{var i=0|Number(n&BigInt(4294967295));N(!(0|Number(n>>BigInt(32))),"offsets over 2^32 not yet supported");var a=xt.getStreamFromFD(e),s=xt.doReadv(a,t,r,i);return Q[o>>2]=s,0}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return e.errno}}function vd(e,t,r,n){try{var o=xt.getStreamFromFD(e),i=xt.doReadv(o,t,r);return Q[n>>2]=i,0}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return e.errno}}function yd(e,t,r,n){try{var o=0|Number(t&BigInt(4294967295)),i=0|Number(t>>BigInt(32)),a=xt.getStreamFromFD(e),s=4294967296*i+(o>>>0),c=9007199254740992;return s<=-c||s>=c?-61:(Et.llseek(a,s,r),ee[n>>3]=BigInt(a.position),a.getdents&&0===s&&0===r&&(a.getdents=null),0)}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return e.errno}}function bd(e,t,r,n){try{var o=xt.getStreamFromFD(e),i=xt.doWritev(o,t,r);return Q[n>>2]=i,0}catch(e){if(void 0===Et||!(e instanceof Et.ErrnoError))throw e;return e.errno}}function _d(){return I()}function wd(e){var t=Date.now();return Q[e>>2]=t/1e3|0,Q[e+4>>2]=t%1e3*1e3|0,0}function Ed(e){L(e)}function xd(e){return e%4==0&&(e%100!=0||e%400==0)}function kd(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var Sd=[31,29,31,30,31,30,31,31,30,31,30,31],Td=[31,28,31,30,31,30,31,31,30,31,30,31];function Cd(e,t){for(var r=new Date(e.getTime());t>0;){var n=xd(r.getFullYear()),o=r.getMonth(),i=(n?Sd:Td)[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 Pd(e,t,r,n){var o=Q[n+40>>2],i={tm_sec:Q[n>>2],tm_min:Q[n+4>>2],tm_hour:Q[n+8>>2],tm_mday:Q[n+12>>2],tm_mon:Q[n+16>>2],tm_year:Q[n+20>>2],tm_wday:Q[n+24>>2],tm_yday:Q[n+28>>2],tm_isdst:Q[n+32>>2],tm_gmtoff:Q[n+36>>2],tm_zone:o?G(o):""},a=G(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var c in s)a=a.replace(new RegExp(c,"g"),s[c]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function f(e,t){return d(e,t,"0")}function m(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 p(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function h(e){var t=Cd(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=p(r),i=p(n);return m(o,t)<=0?m(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var g={"%a":function(e){return u[e.tm_wday].substring(0,3)},"%A":function(e){return u[e.tm_wday]},"%b":function(e){return l[e.tm_mon].substring(0,3)},"%B":function(e){return l[e.tm_mon]},"%C":function(e){return f((e.tm_year+1900)/100|0,2)},"%d":function(e){return f(e.tm_mday,2)},"%e":function(e){return d(e.tm_mday,2," ")},"%g":function(e){return h(e).toString().substring(2)},"%G":function(e){return h(e)},"%H":function(e){return f(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),f(t,2)},"%j":function(e){return f(e.tm_mday+kd(xd(e.tm_year+1900)?Sd:Td,e.tm_mon-1),3)},"%m":function(e){return f(e.tm_mon+1,2)},"%M":function(e){return f(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return f(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),r=0===t.getDay()?t:Cd(t,7-t.getDay()),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(m(r,n)<0){var o=kd(xd(n.getFullYear())?Sd:Td,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return f(Math.ceil(i/7),2)}return 0===m(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=p(r),i=p(n),a=Cd(new Date(e.tm_year+1900,0,1),e.tm_yday);return m(a,o)<0?"53":m(i,a)<=0?"01":(t=o.getFullYear()<e.tm_year+1900?e.tm_yday+32-o.getDate():e.tm_yday+1-o.getDate(),f(Math.ceil(t/7),2))},"%w":function(e){return e.tm_wday},"%W":function(e){var t=new Date(e.tm_year,0,1),r=1===t.getDay()?t:Cd(t,0===t.getDay()?1:7-t.getDay()+1),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(m(r,n)<0){var o=kd(xd(n.getFullYear())?Sd:Td,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return f(Math.ceil(i/7),2)}return 0===m(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"),g)a.includes(c)&&(a=a.replace(new RegExp(c,"g"),g[c](i)));var v=Ud(a=a.replace(/\0\0/g,"%"),!1);return v.length>t?0:(fe(v,e),v.length-1)}function Ad(e,t,r,n){return Pd(e,t,r,n)}function Fd(e){var t=Date.now()/1e3|0;return e&&(Q[e>>2]=t),t}var Dd,Ld=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Et.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},Id=365,Rd=146;Object.defineProperties(Ld.prototype,{read:{get:function(){return(this.mode&Id)===Id},set:function(e){e?this.mode|=Id:this.mode&=~Id}},write:{get:function(){return(this.mode&Rd)===Rd},set:function(e){e?this.mode|=Rd:this.mode&=~Rd}},isFolder:{get:function(){return Et.isDir(this.mode)}},isDevice:{get:function(){return Et.isChrdev(this.mode)}}}),Et.FSNode=Ld,Et.staticInit(),o.FS_createPath=Et.createPath,o.FS_createDataFile=Et.createDataFile,o.FS_createPreloadedFile=Et.createPreloadedFile,o.FS_createLazyFile=Et.createLazyFile,o.FS_createDevice=Et.createDevice,o.FS_unlink=Et.unlink,wt={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},zt=o.InternalError=Vt(Error,"InternalError"),Zt(),tr=o.BindingError=Vt(Error,"BindingError"),Rr(),xr(),Hr(),Kr=o.UnboundTypeError=Vt(Error,"UnboundTypeError"),dn(),o.requestFullscreen=function(e,t){To.requestFullscreen(e,t)},o.requestFullScreen=function(){To.requestFullScreen()},o.requestAnimationFrame=function(e){To.requestAnimationFrame(e)},o.setCanvasSize=function(e,t,r){To.setCanvasSize(e,t,r)},o.pauseMainLoop=function(){To.mainLoop.pause()},o.resumeMainLoop=function(){To.mainLoop.resume()},o.getUserMedia=function(){To.getUserMedia()},o.createContext=function(e,t,r,n){return To.createContext(e,t,r,n)};for(var Md=0;Md<32;++Md)ya.push(new Array(Md));var Od=new Float32Array(288);for(Md=0;Md<288;++Md)xu[Md]=Od.subarray(0,Md+1);var Bd=new Int32Array(288);for(Md=0;Md<288;++Md)Tu[Md]=Bd.subarray(0,Md+1);function Ud(e,t,r){var n=r>0?r:z(e)+1,o=new Array(n),i=W(e,o,0,o.length);return t&&(o.length=i),o}function Nd(){T("fetchSettings")}"function"==typeof atob&&atob;var jd,qd={__assert_fail:at,__cxa_allocate_exception:st,__cxa_throw:ut,__syscall_fcntl64:kt,__syscall_fstat64:St,__syscall_fstatat64:Tt,__syscall_getdents64:Ct,__syscall_ioctl:Pt,__syscall_lstat64:At,__syscall_open:Ft,__syscall_stat64:Dt,_dlopen_js:Lt,_dlsym_js:It,_embind_finalize_value_array:Yt,_embind_finalize_value_object:Kt,_embind_register_bigint:ir,_embind_register_bool:sr,_embind_register_class:Jr,_embind_register_class_constructor:tn,_embind_register_class_function:on,_embind_register_emval:mn,_embind_register_enum:hn,_embind_register_enum_value:vn,_embind_register_float:bn,_embind_register_function:_n,_embind_register_integer:wn,_embind_register_memory_view:En,_embind_register_smart_ptr:xn,_embind_register_std_string:kn,_embind_register_std_wstring:Sn,_embind_register_value_array:Tn,_embind_register_value_array_element:Cn,_embind_register_value_object:Pn,_embind_register_value_object_field:An,_embind_register_void:Fn,_emscripten_throw_longjmp:Dn,_emval_as:Ln,_emval_call:Rn,_emval_call_method:Nn,_emval_call_void_method:jn,_emval_decref:cn,_emval_equals:qn,_emval_get_global:Wn,_emval_get_method_caller:Hn,_emval_get_property:$n,_emval_incref:Yn,_emval_instanceof:Xn,_emval_is_number:Kn,_emval_is_string:Qn,_emval_new:to,_emval_new_array:ro,_emval_new_cstring:no,_emval_new_object:oo,_emval_run_destructors:io,_emval_set_property:ao,_emval_take_value:so,_emval_throw:co,_gmtime_js:uo,_localtime_js:lo,_mktime_js:fo,_mmap_js:mo,_munmap_js:po,_tzset_js:go,abort:vo,clock_gettime:bo,eglChooseConfig:Po,eglCreateContext:Oo,eglCreateWindowSurface:Bo,eglDestroyContext:Uo,eglDestroySurface:No,eglGetConfigAttrib:jo,eglGetDisplay:qo,eglGetError:Go,eglInitialize:Wo,eglMakeCurrent:Vo,eglSwapBuffers:zo,eglTerminate:Ho,emscripten_console_error:$o,emscripten_console_log:Yo,emscripten_console_warn:Xo,emscripten_debugger:Ko,emscripten_get_heap_max:Qo,emscripten_get_now:Jn,emscripten_glActiveTexture:Zo,emscripten_glAttachShader:Jo,emscripten_glBeginQuery:ei,emscripten_glBeginQueryEXT:ti,emscripten_glBeginTransformFeedback:ri,emscripten_glBindAttribLocation:ni,emscripten_glBindBuffer:oi,emscripten_glBindBufferBase:ii,emscripten_glBindBufferRange:ai,emscripten_glBindFramebuffer:si,emscripten_glBindRenderbuffer:ci,emscripten_glBindSampler:ui,emscripten_glBindTexture:li,emscripten_glBindTransformFeedback:di,emscripten_glBindVertexArray:fi,emscripten_glBindVertexArrayOES:mi,emscripten_glBlendColor:pi,emscripten_glBlendEquation:hi,emscripten_glBlendEquationSeparate:gi,emscripten_glBlendFunc:vi,emscripten_glBlendFuncSeparate:yi,emscripten_glBlitFramebuffer:bi,emscripten_glBufferData:_i,emscripten_glBufferSubData:wi,emscripten_glCheckFramebufferStatus:Ei,emscripten_glClear:xi,emscripten_glClearBufferfi:ki,emscripten_glClearBufferfv:Si,emscripten_glClearBufferiv:Ti,emscripten_glClearBufferuiv:Ci,emscripten_glClearColor:Pi,emscripten_glClearDepthf:Ai,emscripten_glClearStencil:Fi,emscripten_glClientWaitSync:Li,emscripten_glColorMask:Ii,emscripten_glCompileShader:Ri,emscripten_glCompressedTexImage2D:Mi,emscripten_glCompressedTexImage3D:Oi,emscripten_glCompressedTexSubImage2D:Bi,emscripten_glCompressedTexSubImage3D:Ui,emscripten_glCopyBufferSubData:Ni,emscripten_glCopyTexImage2D:ji,emscripten_glCopyTexSubImage2D:qi,emscripten_glCopyTexSubImage3D:Gi,emscripten_glCreateProgram:Wi,emscripten_glCreateShader:Vi,emscripten_glCullFace:zi,emscripten_glDeleteBuffers:Hi,emscripten_glDeleteFramebuffers:$i,emscripten_glDeleteProgram:Yi,emscripten_glDeleteQueries:Xi,emscripten_glDeleteQueriesEXT:Ki,emscripten_glDeleteRenderbuffers:Qi,emscripten_glDeleteSamplers:Zi,emscripten_glDeleteShader:Ji,emscripten_glDeleteSync:ea,emscripten_glDeleteTextures:ta,emscripten_glDeleteTransformFeedbacks:ra,emscripten_glDeleteVertexArrays:na,emscripten_glDeleteVertexArraysOES:oa,emscripten_glDepthFunc:ia,emscripten_glDepthMask:aa,emscripten_glDepthRangef:sa,emscripten_glDetachShader:ca,emscripten_glDisable:ua,emscripten_glDisableVertexAttribArray:la,emscripten_glDrawArrays:da,emscripten_glDrawArraysInstanced:fa,emscripten_glDrawArraysInstancedANGLE:ma,emscripten_glDrawArraysInstancedARB:pa,emscripten_glDrawArraysInstancedBaseInstanceWEBGL:ha,emscripten_glDrawArraysInstancedEXT:ga,emscripten_glDrawArraysInstancedNV:va,emscripten_glDrawBuffers:ba,emscripten_glDrawBuffersEXT:_a,emscripten_glDrawBuffersWEBGL:wa,emscripten_glDrawElements:Ea,emscripten_glDrawElementsInstanced:xa,emscripten_glDrawElementsInstancedANGLE:ka,emscripten_glDrawElementsInstancedARB:Sa,emscripten_glDrawElementsInstancedBaseVertexBaseInstanceWEBGL:Ta,emscripten_glDrawElementsInstancedEXT:Ca,emscripten_glDrawElementsInstancedNV:Pa,emscripten_glDrawRangeElements:Fa,emscripten_glEnable:Da,emscripten_glEnableVertexAttribArray:La,emscripten_glEndQuery:Ia,emscripten_glEndQueryEXT:Ra,emscripten_glEndTransformFeedback:Ma,emscripten_glFenceSync:Oa,emscripten_glFinish:Ba,emscripten_glFlush:Ua,emscripten_glFramebufferRenderbuffer:Na,emscripten_glFramebufferTexture2D:ja,emscripten_glFramebufferTextureLayer:qa,emscripten_glFrontFace:Ga,emscripten_glGenBuffers:Va,emscripten_glGenFramebuffers:za,emscripten_glGenQueries:Ha,emscripten_glGenQueriesEXT:$a,emscripten_glGenRenderbuffers:Ya,emscripten_glGenSamplers:Xa,emscripten_glGenTextures:Ka,emscripten_glGenTransformFeedbacks:Qa,emscripten_glGenVertexArrays:Za,emscripten_glGenVertexArraysOES:Ja,emscripten_glGenerateMipmap:es,emscripten_glGetActiveAttrib:rs,emscripten_glGetActiveUniform:ns,emscripten_glGetActiveUniformBlockName:os,emscripten_glGetActiveUniformBlockiv:is,emscripten_glGetActiveUniformsiv:as,emscripten_glGetAttachedShaders:ss,emscripten_glGetAttribLocation:cs,emscripten_glGetBooleanv:ms,emscripten_glGetBufferParameteri64v:ps,emscripten_glGetBufferParameteriv:hs,emscripten_glGetError:gs,emscripten_glGetFloatv:vs,emscripten_glGetFragDataLocation:ys,emscripten_glGetFramebufferAttachmentParameteriv:bs,emscripten_glGetInteger64i_v:ws,emscripten_glGetInteger64v:Es,emscripten_glGetIntegeri_v:xs,emscripten_glGetIntegerv:ks,emscripten_glGetInternalformativ:Ss,emscripten_glGetProgramBinary:Ts,emscripten_glGetProgramInfoLog:Cs,emscripten_glGetProgramiv:Ps,emscripten_glGetQueryObjecti64vEXT:As,emscripten_glGetQueryObjectivEXT:Fs,emscripten_glGetQueryObjectui64vEXT:Ds,emscripten_glGetQueryObjectuiv:Ls,emscripten_glGetQueryObjectuivEXT:Is,emscripten_glGetQueryiv:Rs,emscripten_glGetQueryivEXT:Ms,emscripten_glGetRenderbufferParameteriv:Os,emscripten_glGetSamplerParameterfv:Bs,emscripten_glGetSamplerParameteriv:Us,emscripten_glGetShaderInfoLog:Ns,emscripten_glGetShaderPrecisionFormat:js,emscripten_glGetShaderSource:qs,emscripten_glGetShaderiv:Gs,emscripten_glGetString:Vs,emscripten_glGetStringi:zs,emscripten_glGetSynciv:Hs,emscripten_glGetTexParameterfv:$s,emscripten_glGetTexParameteriv:Ys,emscripten_glGetTransformFeedbackVarying:Xs,emscripten_glGetUniformBlockIndex:Ks,emscripten_glGetUniformIndices:Qs,emscripten_glGetUniformLocation:tc,emscripten_glGetUniformfv:oc,emscripten_glGetUniformiv:ic,emscripten_glGetUniformuiv:ac,emscripten_glGetVertexAttribIiv:cc,emscripten_glGetVertexAttribIuiv:uc,emscripten_glGetVertexAttribPointerv:lc,emscripten_glGetVertexAttribfv:dc,emscripten_glGetVertexAttribiv:fc,emscripten_glHint:mc,emscripten_glInvalidateFramebuffer:pc,emscripten_glInvalidateSubFramebuffer:hc,emscripten_glIsBuffer:gc,emscripten_glIsEnabled:vc,emscripten_glIsFramebuffer:yc,emscripten_glIsProgram:bc,emscripten_glIsQuery:_c,emscripten_glIsQueryEXT:wc,emscripten_glIsRenderbuffer:Ec,emscripten_glIsSampler:xc,emscripten_glIsShader:kc,emscripten_glIsSync:Sc,emscripten_glIsTexture:Tc,emscripten_glIsTransformFeedback:Cc,emscripten_glIsVertexArray:Pc,emscripten_glIsVertexArrayOES:Ac,emscripten_glLineWidth:Fc,emscripten_glLinkProgram:Dc,emscripten_glMultiDrawArraysInstancedBaseInstanceWEBGL:Lc,emscripten_glMultiDrawElementsInstancedBaseVertexBaseInstanceWEBGL:Ic,emscripten_glPauseTransformFeedback:Rc,emscripten_glPixelStorei:Mc,emscripten_glPolygonOffset:Oc,emscripten_glProgramBinary:Bc,emscripten_glProgramParameteri:Uc,emscripten_glQueryCounterEXT:Nc,emscripten_glReadBuffer:jc,emscripten_glReadPixels:Hc,emscripten_glReleaseShaderCompiler:$c,emscripten_glRenderbufferStorage:Yc,emscripten_glRenderbufferStorageMultisample:Xc,emscripten_glResumeTransformFeedback:Kc,emscripten_glSampleCoverage:Qc,emscripten_glSamplerParameterf:Zc,emscripten_glSamplerParameterfv:Jc,emscripten_glSamplerParameteri:eu,emscripten_glSamplerParameteriv:tu,emscripten_glScissor:ru,emscripten_glShaderBinary:nu,emscripten_glShaderSource:ou,emscripten_glStencilFunc:iu,emscripten_glStencilFuncSeparate:au,emscripten_glStencilMask:su,emscripten_glStencilMaskSeparate:cu,emscripten_glStencilOp:uu,emscripten_glStencilOpSeparate:lu,emscripten_glTexImage2D:du,emscripten_glTexImage3D:fu,emscripten_glTexParameterf:mu,emscripten_glTexParameterfv:pu,emscripten_glTexParameteri:hu,emscripten_glTexParameteriv:gu,emscripten_glTexStorage2D:vu,emscripten_glTexStorage3D:yu,emscripten_glTexSubImage2D:bu,emscripten_glTexSubImage3D:_u,emscripten_glTransformFeedbackVaryings:wu,emscripten_glUniform1f:Eu,emscripten_glUniform1fv:ku,emscripten_glUniform1i:Su,emscripten_glUniform1iv:Cu,emscripten_glUniform1ui:Pu,emscripten_glUniform1uiv:Au,emscripten_glUniform2f:Fu,emscripten_glUniform2fv:Du,emscripten_glUniform2i:Lu,emscripten_glUniform2iv:Iu,emscripten_glUniform2ui:Ru,emscripten_glUniform2uiv:Mu,emscripten_glUniform3f:Ou,emscripten_glUniform3fv:Bu,emscripten_glUniform3i:Uu,emscripten_glUniform3iv:Nu,emscripten_glUniform3ui:ju,emscripten_glUniform3uiv:qu,emscripten_glUniform4f:Gu,emscripten_glUniform4fv:Wu,emscripten_glUniform4i:Vu,emscripten_glUniform4iv:zu,emscripten_glUniform4ui:Hu,emscripten_glUniform4uiv:$u,emscripten_glUniformBlockBinding:Yu,emscripten_glUniformMatrix2fv:Xu,emscripten_glUniformMatrix2x3fv:Ku,emscripten_glUniformMatrix2x4fv:Qu,emscripten_glUniformMatrix3fv:Zu,emscripten_glUniformMatrix3x2fv:Ju,emscripten_glUniformMatrix3x4fv:el,emscripten_glUniformMatrix4fv:tl,emscripten_glUniformMatrix4x2fv:rl,emscripten_glUniformMatrix4x3fv:nl,emscripten_glUseProgram:ol,emscripten_glValidateProgram:il,emscripten_glVertexAttrib1f:al,emscripten_glVertexAttrib1fv:sl,emscripten_glVertexAttrib2f:cl,emscripten_glVertexAttrib2fv:ul,emscripten_glVertexAttrib3f:ll,emscripten_glVertexAttrib3fv:dl,emscripten_glVertexAttrib4f:fl,emscripten_glVertexAttrib4fv:ml,emscripten_glVertexAttribDivisor:pl,emscripten_glVertexAttribDivisorANGLE:hl,emscripten_glVertexAttribDivisorARB:gl,emscripten_glVertexAttribDivisorEXT:vl,emscripten_glVertexAttribDivisorNV:yl,emscripten_glVertexAttribI4i:bl,emscripten_glVertexAttribI4iv:_l,emscripten_glVertexAttribI4ui:wl,emscripten_glVertexAttribI4uiv:El,emscripten_glVertexAttribIPointer:xl,emscripten_glVertexAttribPointer:kl,emscripten_glViewport:Sl,emscripten_glWaitSync:Tl,emscripten_memcpy_big:Cl,emscripten_resize_heap:Al,emscripten_ubq_codec_createDecoder:Fl,emscripten_ubq_codec_createEncoder:Dl,emscripten_ubq_codec_decodeSample:Ll,emscripten_ubq_codec_destroyDecoder:Il,emscripten_ubq_codec_destroyEncoder:Rl,emscripten_ubq_codec_encodeFrame:Ml,emscripten_ubq_codec_finalizeEncoding:Ol,emscripten_ubq_codec_flushDecoder:Bl,emscripten_ubq_codec_getNumberOfDecodedFrames:Ul,emscripten_ubq_codec_isSupported:Nl,emscripten_ubq_codec_startProbing:jl,emscripten_ubq_codec_stopProbing:ql,emscripten_ubq_codec_testAndClearTextureUpdateFlag:Gl,emscripten_ubq_fetch_allocateFetchResult:Wl,emscripten_ubq_fetch_createHeader:Vl,emscripten_ubq_fetch_deleteHeader:zl,emscripten_ubq_fetch_dispatchAsyncFetch:Hl,emscripten_ubq_fetch_freeFetchResult:$l,emscripten_ubq_fetch_getFetchCompletedBytes:Yl,emscripten_ubq_fetch_getFetchResultAddress:Xl,emscripten_ubq_fetch_getFetchResultLength:Kl,emscripten_ubq_fetch_getFetchState:Ql,emscripten_ubq_fetch_getFetchTotalBytes:Zl,emscripten_webgl_create_context:ad,emscripten_webgl_destroy_context:sd,emscripten_webgl_init_context_attributes:cd,emscripten_webgl_make_context_current:ud,environ_get:md,environ_sizes_get:pd,exit:wo,fd_close:hd,fd_pread:gd,fd_read:vd,fd_seek:yd,fd_write:bd,getTempRet0:_d,gettimeofday:wd,invoke_ii:ef,invoke_iii:tf,invoke_iiii:nf,invoke_iiiii:lf,invoke_iiiiii:sf,invoke_iiiiiii:uf,invoke_v:mf,invoke_vi:of,invoke_vii:af,invoke_viii:rf,invoke_viiii:cf,invoke_viiiii:df,invoke_viiiiii:pf,invoke_viiiiiiiii:ff,setTempRet0:Ed,strftime_l:Ad,time:Fd},Gd=(Je(),o.___wasm_call_ctors=Ke("__wasm_call_ctors"),o._malloc=Ke("malloc")),Wd=(o._main=Ke("main"),o._free=Ke("free")),Vd=o.___errno_location=Ke("__errno_location"),zd=(o._saveSetjmp=Ke("saveSetjmp"),o.___getTypeName=Ke("__getTypeName")),Hd=(o.___embind_register_native_and_builtin_types=Ke("__embind_register_native_and_builtin_types"),o.___stdio_exit=Ke("__stdio_exit")),$d=(o.___dl_seterr=Ke("__dl_seterr"),o._emscripten_main_thread_process_queued_calls=Ke("emscripten_main_thread_process_queued_calls"),o._emscripten_builtin_memalign=Ke("emscripten_builtin_memalign")),Yd=o._setThrew=Ke("setThrew"),Xd=o._emscripten_stack_init=function(){return(Xd=o._emscripten_stack_init=o.asm.emscripten_stack_init).apply(null,arguments)},Kd=(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(Kd=o._emscripten_stack_get_end=o.asm.emscripten_stack_get_end).apply(null,arguments)}),Qd=o.stackSave=Ke("stackSave"),Zd=o.stackRestore=Ke("stackRestore"),Jd=o.stackAlloc=Ke("stackAlloc");function ef(e,t){var r=Qd();try{return ot(e)(t)}catch(e){if(Zd(r),e!==e+0)throw e;Yd(1,0)}}function tf(e,t,r){var n=Qd();try{return ot(e)(t,r)}catch(e){if(Zd(n),e!==e+0)throw e;Yd(1,0)}}function rf(e,t,r,n){var o=Qd();try{ot(e)(t,r,n)}catch(e){if(Zd(o),e!==e+0)throw e;Yd(1,0)}}function nf(e,t,r,n){var o=Qd();try{return ot(e)(t,r,n)}catch(e){if(Zd(o),e!==e+0)throw e;Yd(1,0)}}function of(e,t){var r=Qd();try{ot(e)(t)}catch(e){if(Zd(r),e!==e+0)throw e;Yd(1,0)}}function af(e,t,r){var n=Qd();try{ot(e)(t,r)}catch(e){if(Zd(n),e!==e+0)throw e;Yd(1,0)}}function sf(e,t,r,n,o,i){var a=Qd();try{return ot(e)(t,r,n,o,i)}catch(e){if(Zd(a),e!==e+0)throw e;Yd(1,0)}}function cf(e,t,r,n,o){var i=Qd();try{ot(e)(t,r,n,o)}catch(e){if(Zd(i),e!==e+0)throw e;Yd(1,0)}}function uf(e,t,r,n,o,i,a){var s=Qd();try{return ot(e)(t,r,n,o,i,a)}catch(e){if(Zd(s),e!==e+0)throw e;Yd(1,0)}}function lf(e,t,r,n,o){var i=Qd();try{return ot(e)(t,r,n,o)}catch(e){if(Zd(i),e!==e+0)throw e;Yd(1,0)}}function df(e,t,r,n,o,i){var a=Qd();try{ot(e)(t,r,n,o,i)}catch(e){if(Zd(a),e!==e+0)throw e;Yd(1,0)}}function ff(e,t,r,n,o,i,a,s,c,u){var l=Qd();try{ot(e)(t,r,n,o,i,a,s,c,u)}catch(e){if(Zd(l),e!==e+0)throw e;Yd(1,0)}}function mf(e){var t=Qd();try{ot(e)()}catch(e){if(Zd(t),e!==e+0)throw e;Yd(1,0)}}function pf(e,t,r,n,o,i,a){var s=Qd();try{ot(e)(t,r,n,o,i,a)}catch(e){if(Zd(s),e!==e+0)throw e;Yd(1,0)}}function hf(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function gf(e){N(0==Be,'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])'),N(0==_e.length,"cannot call main when preRun functions remain to be called");var t=o._main,r=(e=e||[]).length+1,n=Jd(4*(r+1));Q[n>>2]=de(l);for(var i=1;i<r;i++)Q[(n>>2)+i]=de(e[i-1]);Q[(n>>2)+r]=0;try{var a=t(r,n);return _f(a,!0),a}catch(e){return it(e)}}function vf(){Xd(),ye()}function yf(e){function r(){jd||(jd=!0,o.calledRun=!0,U||(Fe(),De(),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),Ef&&gf(e),Ie()))}e=e||u,Be>0||(vf(),Ae(),Be>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),r()}),1)):r(),be()))}function bf(){var e=E,t=x,r=!1;E=x=e=>{r=!0};try{Hd(),["stdout","stderr"].forEach((function(e){var t=Et.analyzePath("/dev/"+e);if(t){var n=t.object.rdev,o=pt.ttys[n];o&&o.output&&o.output.length&&(r=!0)}}))}catch(e){}E=e,x=t,r&&k("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 _f(e,t){if(B=e,Ce||bf(),Pe()){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),x(r)}}else Le();wf(e)}function wf(e){B=e,Pe()||(o.onExit&&o.onExit(e),U=!0),d(e,new hf(e))}if(A("intArrayFromString",!1),A("intArrayToString",!1),A("ccall",!1),A("cwrap",!1),A("setValue",!1),o.getValue=O,A("allocate",!1),A("UTF8ArrayToString",!1),o.UTF8ToString=G,A("stringToUTF8Array",!1),A("stringToUTF8",!1),A("lengthBytesUTF8",!1),A("stackTrace",!1),A("addOnPreRun",!1),A("addOnInit",!1),A("addOnPreMain",!1),A("addOnExit",!1),A("addOnPostRun",!1),A("writeStringToMemory",!1),A("writeArrayToMemory",!1),A("writeAsciiToMemory",!1),o.addRunDependency=Ge,o.removeRunDependency=We,A("FS_createFolder",!1),o.FS_createPath=Et.createPath,o.FS_createDataFile=Et.createDataFile,o.FS_createPreloadedFile=Et.createPreloadedFile,o.FS_createLazyFile=Et.createLazyFile,A("FS_createLink",!1),o.FS_createDevice=Et.createDevice,o.FS_unlink=Et.unlink,A("getLEB",!1),A("getFunctionTables",!1),A("alignFunctionTables",!1),A("registerFunctions",!1),A("addFunction",!1),A("removeFunction",!1),A("getFuncWrapper",!1),A("prettyPrint",!1),A("dynCall",!1),A("getCompilerSetting",!1),A("print",!1),A("printErr",!1),A("getTempRet0",!1),A("setTempRet0",!1),A("callMain",!1),A("abort",!1),A("keepRuntimeAlive",!1),A("zeroMemory",!1),A("stringToNewUTF8",!1),A("emscripten_realloc_buffer",!1),A("ENV",!1),A("withStackSave",!1),A("ERRNO_CODES",!1),A("ERRNO_MESSAGES",!1),A("setErrNo",!1),A("inetPton4",!1),A("inetNtop4",!1),A("inetPton6",!1),A("inetNtop6",!1),A("readSockaddr",!1),A("writeSockaddr",!1),A("DNS",!1),A("getHostByName",!1),A("Protocols",!1),A("Sockets",!1),A("getRandomDevice",!1),A("traverseStack",!1),A("convertFrameToPC",!1),A("UNWIND_CACHE",!1),A("saveInUnwindCache",!1),A("convertPCtoSourceLocation",!1),A("readAsmConstArgsArray",!1),A("readAsmConstArgs",!1),A("mainThreadEM_ASM",!1),A("jstoi_q",!1),A("jstoi_s",!1),A("getExecutableName",!1),A("listenOnce",!1),A("autoResumeAudioContext",!1),A("dynCall",!1),A("callRuntimeCallbacks",!1),A("wasmTableMirror",!1),A("setWasmTableEntry",!1),A("getWasmTableEntry",!1),A("handleException",!1),A("runtimeKeepalivePush",!1),A("runtimeKeepalivePop",!1),A("callUserCallback",!1),A("maybeExit",!1),A("safeSetTimeout",!1),A("asmjsMangle",!1),A("asyncLoad",!1),A("alignMemory",!1),A("mmapAlloc",!1),A("reallyNegative",!1),A("unSign",!1),A("reSign",!1),A("formatString",!1),A("PATH",!1),A("PATH_FS",!1),A("SYSCALLS",!1),A("getSocketFromFD",!1),A("getSocketAddress",!1),A("JSEvents",!1),A("registerKeyEventCallback",!1),o.specialHTMLTargets=rd,A("maybeCStringToJsString",!1),A("findEventTarget",!1),A("findCanvasEventTarget",!1),A("getBoundingClientRect",!1),A("fillMouseEventData",!1),A("registerMouseEventCallback",!1),A("registerWheelEventCallback",!1),A("registerUiEventCallback",!1),A("registerFocusEventCallback",!1),A("fillDeviceOrientationEventData",!1),A("registerDeviceOrientationEventCallback",!1),A("fillDeviceMotionEventData",!1),A("registerDeviceMotionEventCallback",!1),A("screenOrientation",!1),A("fillOrientationChangeEventData",!1),A("registerOrientationChangeEventCallback",!1),A("fillFullscreenChangeEventData",!1),A("registerFullscreenChangeEventCallback",!1),A("registerRestoreOldStyle",!1),A("hideEverythingExceptGivenElement",!1),A("restoreHiddenElements",!1),A("setLetterbox",!1),A("currentFullscreenStrategy",!1),A("restoreOldWindowedStyle",!1),A("softFullscreenResizeWebGLRenderTarget",!1),A("doRequestFullscreen",!1),A("fillPointerlockChangeEventData",!1),A("registerPointerlockChangeEventCallback",!1),A("registerPointerlockErrorEventCallback",!1),A("requestPointerLock",!1),A("fillVisibilityChangeEventData",!1),A("registerVisibilityChangeEventCallback",!1),A("registerTouchEventCallback",!1),A("fillGamepadEventData",!1),A("registerGamepadEventCallback",!1),A("registerBeforeUnloadEventCallback",!1),A("fillBatteryEventData",!1),A("battery",!1),A("registerBatteryEventCallback",!1),A("setCanvasElementSize",!1),A("getCanvasElementSize",!1),A("demangle",!1),A("demangleAll",!1),A("jsStackTrace",!1),A("stackTrace",!1),A("getEnvStrings",!1),A("checkWasiClock",!1),A("writeI53ToI64",!1),A("writeI53ToI64Clamped",!1),A("writeI53ToI64Signaling",!1),A("writeI53ToU64Clamped",!1),A("writeI53ToU64Signaling",!1),A("readI53FromI64",!1),A("readI53FromU64",!1),A("convertI32PairToI53",!1),A("convertU32PairToI53",!1),A("setImmediateWrapped",!1),A("clearImmediateWrapped",!1),A("polyfillSetImmediate",!1),A("uncaughtExceptionCount",!1),A("exceptionLast",!1),A("exceptionCaught",!1),A("ExceptionInfo",!1),A("CatchInfo",!1),A("exception_addRef",!1),A("exception_decRef",!1),A("Browser",!1),A("funcWrappers",!1),A("getFuncWrapper",!1),A("setMainLoop",!1),A("wget",!1),A("FS",!1),A("MEMFS",!1),A("TTY",!1),A("PIPEFS",!1),A("SOCKFS",!1),A("_setNetworkCallback",!1),A("tempFixedLengthArray",!1),A("miniTempWebGLFloatBuffers",!1),A("heapObjectForWebGLType",!1),A("heapAccessShiftForWebGLHeap",!1),A("GL",!1),A("emscriptenWebGLGet",!1),A("computeUnpackAlignedImageSize",!1),A("emscriptenWebGLGetTexPixelData",!1),A("emscriptenWebGLGetUniform",!1),A("webglGetUniformLocation",!1),A("webglPrepareUniformLocationsBeforeFirstUse",!1),A("webglGetLeftBracePos",!1),A("emscriptenWebGLGetVertexAttrib",!1),A("writeGLArray",!1),A("AL",!1),A("SDL_unicode",!1),A("SDL_ttfContext",!1),A("SDL_audio",!1),A("SDL",!1),A("SDL_gfx",!1),A("GLUT",!1),A("EGL",!1),A("GLFW_Window",!1),A("GLFW",!1),A("GLEW",!1),A("IDBStore",!1),A("runAndAbortIfError",!1),A("emscriptenWebGLGetIndexed",!1),A("InternalError",!1),A("BindingError",!1),A("UnboundTypeError",!1),A("PureVirtualError",!1),A("init_embind",!1),A("throwInternalError",!1),A("throwBindingError",!1),A("throwUnboundTypeError",!1),A("ensureOverloadTable",!1),A("exposePublicSymbol",!1),A("replacePublicSymbol",!1),A("extendError",!1),A("createNamedFunction",!1),A("registeredInstances",!1),A("getBasestPointer",!1),A("registerInheritedInstance",!1),A("unregisterInheritedInstance",!1),A("getInheritedInstance",!1),A("getInheritedInstanceCount",!1),A("getLiveInheritedInstances",!1),A("registeredTypes",!1),A("awaitingDependencies",!1),A("typeDependencies",!1),A("registeredPointers",!1),A("registerType",!1),A("whenDependentTypesAreResolved",!1),A("embind_charCodes",!1),A("embind_init_charCodes",!1),A("readLatin1String",!1),A("getTypeName",!1),A("heap32VectorToArray",!1),A("requireRegisteredType",!1),A("getShiftFromSize",!1),A("integerReadValueFromPointer",!1),A("enumReadValueFromPointer",!1),A("floatReadValueFromPointer",!1),A("simpleReadValueFromPointer",!1),A("runDestructors",!1),A("new_",!1),A("craftInvokerFunction",!1),A("embind__requireFunction",!1),A("tupleRegistrations",!1),A("structRegistrations",!1),A("genericPointerToWireType",!1),A("constNoSmartPtrRawPointerToWireType",!1),A("nonConstNoSmartPtrRawPointerToWireType",!1),A("init_RegisteredPointer",!1),A("RegisteredPointer",!1),A("RegisteredPointer_getPointee",!1),A("RegisteredPointer_destructor",!1),A("RegisteredPointer_deleteObject",!1),A("RegisteredPointer_fromWireType",!1),A("runDestructor",!1),A("releaseClassHandle",!1),A("finalizationRegistry",!1),A("detachFinalizer_deps",!1),A("detachFinalizer",!1),A("attachFinalizer",!1),A("makeClassHandle",!1),A("init_ClassHandle",!1),A("ClassHandle",!1),A("ClassHandle_isAliasOf",!1),A("throwInstanceAlreadyDeleted",!1),A("ClassHandle_clone",!1),A("ClassHandle_delete",!1),A("deletionQueue",!1),A("ClassHandle_isDeleted",!1),A("ClassHandle_deleteLater",!1),A("flushPendingDeletes",!1),A("delayFunction",!1),A("setDelayFunction",!1),A("RegisteredClass",!1),A("shallowCopyInternalPointer",!1),A("downcastPointer",!1),A("upcastPointer",!1),A("validateThis",!1),A("char_0",!1),A("char_9",!1),A("makeLegalFunctionName",!1),A("emval_handle_array",!1),A("emval_free_list",!1),A("emval_symbols",!1),A("init_emval",!1),A("count_emval_handles",!1),A("get_first_emval",!1),A("getStringOrSymbol",!1),A("Emval",!1),A("emval_newers",!1),A("craftEmvalAllocator",!1),A("emval_get_global",!1),A("emval_methodCallers",!1),A("emval_registeredMethods",!1),A("warnOnce",!1),A("stackSave",!1),A("stackRestore",!1),A("stackAlloc",!1),A("AsciiToString",!1),A("stringToAscii",!1),A("UTF16ToString",!1),A("stringToUTF16",!1),A("lengthBytesUTF16",!1),A("UTF32ToString",!1),A("stringToUTF32",!1),A("lengthBytesUTF32",!1),A("allocateUTF8",!1),A("allocateUTF8OnStack",!1),o.writeStackCookie=ye,o.checkStackCookie=be,P("ALLOC_NORMAL",!1),P("ALLOC_STACK",!1),Ne=function e(){jd||yf(),jd||(Ne=e)},o.run=yf,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();var Ef=!0;return o.noInitialRun&&(Ef=!1),yf(),e.ready});const He=ze;var $e=r(7984),Ye=r(2934);const Xe=He,Ke=(e,t)=>null!=t?[t,e.split("/").pop()].join(""):new URL(e,window.location.origin);var Qe,Ze,Je=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},et=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 tt{constructor(e){Qe.set(this,void 0),Ze.set(this,void 0),Je(this,Qe,e,"f"),Je(this,Ze,new M(e),"f")}async loadFromString(e){return le("sceneContent",e,ae()),new Promise((t=>{et(this,Qe,"f").loadSceneFromString(e,(e=>{const r=O(e);t(r)}))}))}async loadFromURL(e){return le("url",e,ae()),new Promise((t=>{et(this,Qe,"f").loadSceneFromURL(e,(e=>{const r=O(e);t(r)}))}))}async saveToString(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):et(this,Qe,"f").saveSceneToString(r,(t=>{const r=O(t);e(r)}))}))}async saveToArchive(){return new Promise(((e,t)=>{const r=this.get();null==r?t(new Error("No scene available.")):et(this,Qe,"f").saveSceneToArchive(r,(r=>{"error"in r?t(r.error):e(new Blob([r],{type:me.Zip}))}))}))}create(){return O(et(this,Qe,"f").createScene({layout:k.Free}))}createFromImage(e,t=300,r=1){return le("url",e,ae()),le("dpi",t,se(ie(),0)),le("pixelScaleFactor",r,se(ie(),0)),new Promise((n=>{et(this,Qe,"f").createSceneFromImage(e,t,r,k.Free,0,!1,(e=>{const t=O(e);n(t)}))}))}get(){const e=O(et(this,Qe,"f").findByType(d.Scene)),t=ge(e);return t.length>0?t[0]:null}async applyTemplateFromString(e){return le("content",e,ae()),new Promise((t=>{et(this,Qe,"f").applyTemplateFromString(e,(e=>{O(e),t()}))}))}async applyTemplateFromURL(e){return le("url",e,ae()),new Promise((t=>{et(this,Qe,"f").applyTemplateFromURL(e,(e=>{O(e),t()}))}))}unstable_setDesignUnit(e){le("designUnit",e,ae()),O(et(this,Qe,"f").unstable_setDesignUnit(f.fromDesignUnit(e)))}unstable_getDesignUnit(){return f.toDesignUnit(O(et(this,Qe,"f").unstable_getDesignUnit()))}}Qe=new WeakMap,Ze=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 le("key",e,ae()),le("value",t,ae()),O(nt(this,rt,"f").setVariableString(e,t))}getString(e){return le("key",e,ae()),O(nt(this,rt,"f").getVariableString(e))}remove(e){return le("key",e,ae()),O(nt(this,rt,"f").removeVariable(e))}}rt=new WeakMap;var it,at,st,ct,ut,lt,dt,ft,mt,pt,ht=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},gt=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class vt{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(d.Camera)[0];if(!e)return;if(void 0===gt(this,st,"f"))return;const{width:t,height:r}=gt(this,st,"f"),n=gt(this,at,"f").getValue(e,he.Camera,"resolution");R(n.width,t,1e-4)&&R(n.height,r,1e-4)||gt(this,at,"f").setValue(e,he.Camera,"resolution",{width:t,height:r}),"undefined"!=typeof window&&(R(gt(this,at,"f").getValue(e,he.Camera,"pixelRatio"),window.devicePixelRatio,1e-4)||gt(this,at,"f").setValue(e,he.Camera,"pixelRatio",window.devicePixelRatio))})),lt.set(this,void 0),dt.set(this,void 0),ht(this,ct,e,"f"),ht(this,at,new M(e),"f"),ht(this,st,r,"f"),this.block=new we(e),this.scene=new tt(e),this.variable=new ot(e),this.editor=new je(e),this.event=new We(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;U.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}),N.set(this,void 0),j.set(this,void 0),q.set(this,void 0),G.set(this,void 0),this.id=e,this.helper=new M(t),this.canManageAssets=null!==(n=r.canManageAssets)&&void 0!==n&&n,z(this,N,null!==(o=r.hasType)&&void 0!==o?o:()=>!1,"f"),z(this,j,null!==(i=r.getLabel)&&void 0!==i?i:(e,t)=>t,"f"),z(this,q,null!==(a=r.getTags)&&void 0!==a?a:()=>[],"f"),z(this,G,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||H(this,N,"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},H(this,G,"f"),(e=>H(this,j,"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 B.map((r=>({id:r,type:"ly.img.vectorpath",label:t(r),thumbUri:"",size:{width:1,height:1},context:e})))}({sourceId:this.id},(e=>H(this,j,"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=H(this,j,"f").call(this,e,t),c=H(this,q,"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([H(this,U,"m",W).call(this,e,"thumbPath"),H(this,U,"m",W).call(this,e,"width"),H(this,U,"m",W).call(this,e,"height"),"ly.img.vectorpath"===t?H(this,U,"m",W).call(this,e,"vectorPath"):Promise.resolve(""),"ly.img.image"===t?H(this,U,"m",W).call(this,e,"imagePath"):Promise.resolve(void 0),"ly.img.video"===t?H(this,U,"m",W).call(this,e,"videoPath"):Promise.resolve(void 0),"ly.img.sticker"===t?H(this,U,"m",W).call(this,e,"imageUri"):Promise.resolve(void 0)]),u=O(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=c()(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={},s=await Promise.all(t.map((async t=>{const n=await H(this,U,"m",V).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)))}))),c=n.filter((e=>!o[e]&&!i[e])),u=l()(...s,c);return a()(u).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))),gt(this,at,"f").useInternalAPI((e=>{e.setPreUpdateCallback(gt(this,ut,"f"))})),gt(this,it,"m",ft).call(this),"undefined"!=typeof window&&window.Cypress&&(this.config=n,this.helper=gt(this,at,"f"),this.onPostUpdate=e=>{gt(this,at,"f").useInternalAPI((t=>{t.setPostUpdateCallback(e)}))})}dispose(){gt(this,it,"m",mt).call(this),gt(this,at,"f").useInternalAPI((e=>{e.setPreUpdateCallback(null)})),ht(this,st,null,"f"),ht(this,at,null,"f"),this.block=null,this.scene=null,this.variable=null,gt(this,ct,"f").delete(),ht(this,ct,null,"f")}static async init(e,t){console.log("[CreativeEngine] Revision 00893df8098c70e388d71ae4b3035397ba74252e"),"undefined"==typeof document||t||(t=document.createElement("canvas"));const r=Me(e);return new this(await function(e,t){const r=Me(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:Ce;var i,a,s;return new Promise(((t,i)=>{let a,s;return Xe({locateFile:(e,t)=>{if(e.endsWith(".wasm")){const e=Ke(Ye,n.baseURL).toString();return a=e,e}if(e.endsWith(".data")){const e=Ke($e,n.baseURL).toString();return s=e,e}return t+e},print:e=>{e&&"undefined"!==e&&o(e,Ee.Info)},printErr:e=>{e&&"undefined"!==e&&o(e,Ee.Error)},onRuntimeInitialized:()=>{o("Engine has been initialized.",Ee.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 M(e);function o(e,t){return n.execute("ubq/settings/set",[e,t])}o("ubq://license",t.license||""),o("ubq://role",P[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,forceVideoDisabled:n}=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=F.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])=>{O(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,ft=function(e=!0){if(gt(this,lt,"f"))return;if("undefined"!=typeof HTMLCanvasElement&&gt(this,st,"f")instanceof HTMLCanvasElement){const e=function(e,t,r){const n=t=>{var n,o;const i=e.getBoundingClientRect(),a=null!==(n=null==i?void 0:i.top)&&void 0!==n?n:0,s=null!==(o=null==i?void 0:i.left)&&void 0!==o?o:0,c=function(e){return"undefined"!=typeof TouchEvent&&e instanceof TouchEvent}(t),u=c?t.changedTouches[0].clientX:t.clientX,l=c?t.changedTouches[0].clientY:t.clientY;return c&&t.target===e&&t.cancelable&&"Text"!==r.getEditMode()&&t.preventDefault(),{position:{x:(u-s)*window.devicePixelRatio,y:(l-a)*window.devicePixelRatio},isOverUIElement:t.target!==e,isTouch:c,timestamp:Date.now()}},o=e=>{const r=n(e);r.isTouch&&e.preventDefault(),t.execute("ubq/inputs/mousemove",r)},i=e=>{const r=Object.assign(Object.assign({},n(e)),{button:C(e instanceof MouseEvent?e.button:v.Left),state:y.Up,shiftIsHeld:e.shiftKey});t.execute("ubq/inputs/mousebutton",r),t.ubq.update()},a=e=>{const r=Object.assign(Object.assign({},n(e)),{button:C(e instanceof MouseEvent?e.button:v.Left),state:y.Down,shiftIsHeld:e.shiftKey});t.execute("ubq/inputs/mousebutton",r)};return document.addEventListener("mousemove",o),document.addEventListener("mousedown",a),document.addEventListener("mouseup",i),document.addEventListener("touchmove",o),document.addEventListener("touchstart",a),document.addEventListener("touchend",i),document.addEventListener("touchcancel",i),()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mousedown",a),document.removeEventListener("mouseup",i),document.removeEventListener("touchmove",o),document.removeEventListener("touchstart",a),document.removeEventListener("touchend",i),document.removeEventListener("touchcancel",i)}}(gt(this,st,"f"),gt(this,at,"f"),this.editor),t=function(e,t,r){let n,o=null;const i=r.onStateChanged((()=>{n=r.getEditMode(),"Text"!==n||o?"Text"!==n&&o&&(o(),o=null):o=function(){var n;let o=!1;const i=document.createElement("textarea");i.id="ubq_internal-inline_text_editing_html_representation",i.autocapitalize="none",i.spellcheck=!1,i.cols=4096,i.style.contain="strict",i.style.opacity="0",i.style.pointerEvents="none",i.style.zIndex="-1",i.style.position="absolute",i.style.width="1px",i.style.height="1px",i.style.padding="0",i.style.margin="-1px",i.style.overflow="hidden",i.style.clip="rect(0, 0, 0, 0)",i.style.whiteSpace="nowrap",i.style.border="0";const a=()=>{const e=r.getTextCursorPositionInScreenSpaceX(),t=r.getTextCursorPositionInScreenSpaceY();i.style.left=`${e}px`,i.style.top=`${t}px`};a(),i.addEventListener("input",u),i.addEventListener("keydown",l),i.addEventListener("copy",c),i.addEventListener("compositionstart",d),i.addEventListener("compositionupdate",f),i.addEventListener("compositionend",m),document.addEventListener("touchend",p),document.addEventListener("mousedown",p),document.addEventListener("mouseup",p),document.addEventListener("click",p);const s=r.onStateChanged(a);return null===(n=null==e?void 0:e.parentElement)||void 0===n||n.appendChild(i),i.focus(),()=>{var t;i.removeEventListener("input",u),i.removeEventListener("keydown",l),i.removeEventListener("copy",c),i.removeEventListener("compositionstart",d),i.removeEventListener("compositionupdate",f),i.removeEventListener("compositionend",m),document.removeEventListener("click",p),document.removeEventListener("mousedown",p),document.removeEventListener("mouseup",p),document.removeEventListener("touchend",p),s(),null===(t=null==e?void 0:e.parentElement)||void 0===t||t.removeChild(i)};function c(e){try{t.useInternalAPI((t=>{const r=O(t.getSelectedText());""!==r&&e.clipboardData&&(e.clipboardData.setData("text/plain",r),e.preventDefault())}))}catch(e){console.error(e)}}function u(e){var r,n;const i=e.target,{value:a}=i;let s=a.length;if(o){s=null!==(n=null!==(r=i.selectionEnd)&&void 0!==r?r:i.selectionStart)&&void 0!==n?n: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:b.Unknown,characters:a,shiftIsHeld:!1,commandIsHeld:!1,optionIsHeld:!1,timestamp:Date.now()};t.execute("ubq/inputs/keyboardkey",e)}i.value=""}}async function l(e){if("a"===e.key&&(e.metaKey||e.ctrlKey))return o&&(await t.execute("ubq/text/compositionEnd"),o=!1,e.currentTarget&&(i.value="")),void await t.execute("ubq/text/selectAllText");if("Escape"===e.key)return void async function(){r.setEditMode("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 n=function(e){const t={key:b.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=b.Key0;break;case"1":t.key=b.Key1;break;case"2":t.key=b.Key2;break;case"3":t.key=b.Key3;break;case"4":t.key=b.Key4;break;case"5":t.key=b.Key5;break;case"6":t.key=b.Key6;break;case"7":t.key=b.Key7;break;case"8":t.key=b.Key8;break;case"9":t.key=b.Key9;break;case"A":t.key=b.A;break;case"B":t.key=b.B;break;case"C":t.key=b.C;break;case"D":t.key=b.D;break;case"E":t.key=b.E;break;case"F":t.key=b.F;break;case"G":t.key=b.G;break;case"H":t.key=b.H;break;case"I":t.key=b.I;break;case"J":t.key=b.J;break;case"K":t.key=b.K;break;case"L":t.key=b.L;break;case"M":t.key=b.M;break;case"N":t.key=b.N;break;case"O":t.key=b.O;break;case"P":t.key=b.P;break;case"Q":t.key=b.Q;break;case"R":t.key=b.R;break;case"S":t.key=b.S;break;case"T":t.key=b.T;break;case"U":t.key=b.U;break;case"V":t.key=b.V;break;case"W":t.key=b.W;break;case"X":t.key=b.X;break;case"Y":t.key=b.Y;break;case"Z":t.key=b.Z;break;case" ":t.key=b.Space;break;case"ESCAPE":t.key=b.Escape,t.characters="";break;case"BACKSPACE":t.key=b.Backspace,t.characters="";break;case"DELETE":t.key=b.Delete,t.characters="";break;case"ENTER":t.key=b.Enter,t.characters="\n";break;case"CONTROL":t.key=b.Control,t.characters="";break;case"ALT":t.key=b.Option,t.characters="";break;case"SHIFT":t.key=b.Shift,t.characters="";break;case"ARROWLEFT":t.key=b.ArrowLeft,t.characters="";break;case"ARROWRIGHT":t.key=b.ArrowRight,t.characters="";break;case"ARROWUP":t.key=b.ArrowUp,t.characters="";break;case"ARROWDOWN":t.key=b.ArrowDown,t.characters="";break;case"DEAD":t.key=b.Unknown,t.characters=""}return t}(e);await t.execute("ubq/inputs/keyboardkey",n),e.currentTarget&&(i.value="")}async function d(){o=!0,await t.execute("ubq/text/compositionStart")}function f(){o=!0}async function m(){o=!1,await t.execute("ubq/text/compositionEnd"),i.value=""}function p(t){t.target===e?"Text"===r.getEditMode()&&(i.focus(),t instanceof TouchEvent&&t.cancelable&&t.preventDefault()):r.setEditMode("Transform")}}()}));return()=>{null==o||o(),i()}}(gt(this,st,"f"),gt(this,at,"f"),this.editor);ht(this,dt,(()=>{e(),t()}),"f")}const t=()=>{gt(this,it,"m",pt).call(this,e),ht(this,lt,requestAnimationFrame(t),"f")};ht(this,lt,requestAnimationFrame(t),"f")},mt=function(){var e;null===(e=gt(this,dt,"f"))||void 0===e||e.call(this),ht(this,dt,void 0,"f"),gt(this,lt,"f")&&(cancelAnimationFrame(gt(this,lt,"f")),ht(this,lt,0,"f"))},pt=function(e=!0){e&&void 0!==gt(this,st,"f")&&1===this.block.findByType(d.Scene).length&&gt(this,at,"f").execute("ubq/render",{displayWidth:gt(this,st,"f").width,displayHeight:gt(this,st,"f").height}),gt(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};