trtc-sdk-v5
Version:
Tencent Cloud RTC SDK for Web
1 lines • 755 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).VirtualBackground=t()}(this,(function(){"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function t(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function r(e){return function(){var r=this,n=arguments;return new Promise((function(o,i){var a=e.apply(r,n);function s(e){t(a,o,i,s,c,"next",e)}function c(e){t(a,o,i,s,c,"throw",e)}s(void 0)}))}}function n(e,t,r){return t=A(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,l()?Reflect.construct(t,r||[],A(e).constructor):t.apply(e,r))}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,m(n.key),n)}}function a(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=I(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},c.apply(null,arguments)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(l=function(){return!!e})()}function d(){d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function A(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{A({},"")}catch(e){A=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),s=new P(n||[]);return o(a,"_invoke",{value:D(e,r,s)}),a}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var g="suspendedStart",f="suspendedYield",h="executing",p="completed",E={};function m(){}function y(){}function I(){}var v={};A(v,a,(function(){return this}));var w=Object.getPrototypeOf,C=w&&w(w(M([])));C&&C!==r&&n.call(C,a)&&(v=C);var _=I.prototype=m.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){A(e,t,(function(e){return this._invoke(t,e)}))}))}function B(e,t){function r(o,i,a,s){var c=l(e[o],e,i);if("throw"!==c.type){var A=c.arg,u=A.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(u).then((function(e){A.value=e,a(A)}),(function(e){return r("throw",e,a,s)}))}s(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function D(t,r,n){var o=g;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var c=T(s,n);if(c){if(c===E)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===g)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var A=l(t,r,n);if("normal"===A.type){if(o=n.done?p:f,A.arg===E)continue;return{value:A.arg,done:n.done}}"throw"===A.type&&(o=p,n.method="throw",n.arg=A.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),E;var i=l(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,E;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,E):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,E)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function Q(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function M(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(typeof t+" is not iterable")}return y.prototype=I,o(_,"constructor",{value:I,configurable:!0}),o(I,"constructor",{value:y,configurable:!0}),y.displayName=A(I,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,I):(e.__proto__=I,A(e,c,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},b(B.prototype),A(B.prototype,s,(function(){return this})),t.AsyncIterator=B,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new B(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(_),A(_,c,"Generator"),A(_,a,(function(){return this})),A(_,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=M,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(Q),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return s.type="throw",s.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),A=n.call(a,"finallyLoc");if(c&&A){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!A)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,E):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),E},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),Q(r),E}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;Q(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:M(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),E}},t}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],c=!0,A=!1;try{if(i=(r=r.call(e)).next,0===t);else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){A=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(A)throw o}}return s}}(e,t)||I(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t,r,n){var o=c(A(e.prototype),t,r);return"function"==typeof o?function(e){return o.apply(r,e)}:o}function p(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function E(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||I(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function I(t,r){if(t){if("string"==typeof t)return e(t,r);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e(t,r):void 0}}function v(e){var t="function"==typeof Map?new Map:void 0;return v=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(l())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&g(o,r.prototype),o}(e,arguments,A(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),g(r,e)},v(e)}var w,C=Object.defineProperty,_=Object.defineProperties,b=Object.getOwnPropertyDescriptors,B=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,O=function(e,t,r){return t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r},Q=function(e,t){for(var r in t||(t={}))D.call(t,r)&&O(e,r,t[r]);if(B){var n,o=s(B(t));try{for(o.s();!(n=o.n()).done;){r=n.value;T.call(t,r)&&O(e,r,t[r])}}catch(e){o.e(e)}finally{o.f()}}return e},P=function(e,t){return _(e,b(t))},M=function(e){return"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(e,{get:function(e,t){return("undefined"!=typeof require?require:e)[t]}}):e}((function(e){if("undefined"!=typeof require)return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')})),R=function(e,t,r){return O(e,"symbol"!==y(t)?t+"":t,r)};function S(e){return k.apply(this,arguments)}function k(){return(k=r(d().mark((function e(t){var r,n,o,i,a,s,c,A;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.sdkAppId,n=t.userId,o=t.userSig,i=t.core,s=Math.round((new Date).getTime()/1e3),e.prev=2,e.next=5,i.schedule.getAbilityConfig(r,i.schedule.ScheduleRequestType.TRTC_AUTO_CONF,{sdkAppId:r,userId:n,userSig:o,timestamp:s});case 5:if(c=e.sent,i.log.info("virtual background ability response: ".concat(JSON.stringify(c))),A=c.data,!(null==(a=null==A?void 0:A.trtcAutoConf)?void 0:a.web_ar)){e.next=10;break}return e.abrupt("return",{auth:!0,timestamp:s});case 10:return e.abrupt("return",{auth:!1});case 13:return e.prev=13,e.t0=e.catch(2),i.log.error("virtual background fetch error",e.t0),e.abrupt("return",{auth:!1});case 17:case"end":return e.stop()}}),e,null,[[2,13]])})))).apply(this,arguments)}var F={sdkAppId:{required:!0,type:"number"},userId:{required:!0,type:"string"},userSig:{required:!0,type:"string"}};var x,N=(x="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,"undefined"!=typeof __filename&&(x=x||__filename),function(e){var t,r,n=void 0!==(e=e||{})?e:{};n.ready=new Promise((function(e,n){t=e,r=n})),Object.getOwnPropertyDescriptor(n.ready,"_main")||(Object.defineProperty(n.ready,"_main",{configurable:!0,get:function(){me("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(n.ready,"_main",{configurable:!0,set:function(){me("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(n.ready,"_emscripten_stack_get_end")||(Object.defineProperty(n.ready,"_emscripten_stack_get_end",{configurable:!0,get:function(){me("You are getting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_emscripten_stack_get_end",{configurable:!0,set:function(){me("You are setting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"_emscripten_stack_get_free")||(Object.defineProperty(n.ready,"_emscripten_stack_get_free",{configurable:!0,get:function(){me("You are getting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_emscripten_stack_get_free",{configurable:!0,set:function(){me("You are setting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"_emscripten_stack_init")||(Object.defineProperty(n.ready,"_emscripten_stack_init",{configurable:!0,get:function(){me("You are getting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_emscripten_stack_init",{configurable:!0,set:function(){me("You are setting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"_stackSave")||(Object.defineProperty(n.ready,"_stackSave",{configurable:!0,get:function(){me("You are getting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_stackSave",{configurable:!0,set:function(){me("You are setting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"_stackRestore")||(Object.defineProperty(n.ready,"_stackRestore",{configurable:!0,get:function(){me("You are getting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_stackRestore",{configurable:!0,set:function(){me("You are setting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"_stackAlloc")||(Object.defineProperty(n.ready,"_stackAlloc",{configurable:!0,get:function(){me("You are getting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_stackAlloc",{configurable:!0,set:function(){me("You are setting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"___wasm_call_ctors")||(Object.defineProperty(n.ready,"___wasm_call_ctors",{configurable:!0,get:function(){me("You are getting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"___wasm_call_ctors",{configurable:!0,set:function(){me("You are setting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"_fflush")||(Object.defineProperty(n.ready,"_fflush",{configurable:!0,get:function(){me("You are getting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_fflush",{configurable:!0,set:function(){me("You are setting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"___errno_location")||(Object.defineProperty(n.ready,"___errno_location",{configurable:!0,get:function(){me("You are getting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"___errno_location",{configurable:!0,set:function(){me("You are setting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"_malloc")||(Object.defineProperty(n.ready,"_malloc",{configurable:!0,get:function(){me("You are getting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_malloc",{configurable:!0,set:function(){me("You are setting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"_free")||(Object.defineProperty(n.ready,"_free",{configurable:!0,get:function(){me("You are getting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_free",{configurable:!0,set:function(){me("You are setting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"_setThrew")||(Object.defineProperty(n.ready,"_setThrew",{configurable:!0,get:function(){me("You are getting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_setThrew",{configurable:!0,set:function(){me("You are setting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"___cxa_is_pointer_type")||(Object.defineProperty(n.ready,"___cxa_is_pointer_type",{configurable:!0,get:function(){me("You are getting ___cxa_is_pointer_type 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(n.ready,"___cxa_is_pointer_type",{configurable:!0,set:function(){me("You are setting ___cxa_is_pointer_type 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(n.ready,"___cxa_can_catch")||(Object.defineProperty(n.ready,"___cxa_can_catch",{configurable:!0,get:function(){me("You are getting ___cxa_can_catch 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(n.ready,"___cxa_can_catch",{configurable:!0,set:function(){me("You are setting ___cxa_can_catch 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(n.ready,"_saveSetjmp")||(Object.defineProperty(n.ready,"_saveSetjmp",{configurable:!0,get:function(){me("You are getting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_saveSetjmp",{configurable:!0,set:function(){me("You are setting _saveSetjmp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"_memalign")||(Object.defineProperty(n.ready,"_memalign",{configurable:!0,get:function(){me("You are getting _memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_memalign",{configurable:!0,set:function(){me("You are setting _memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"_emscripten_main_thread_process_queued_calls")||(Object.defineProperty(n.ready,"_emscripten_main_thread_process_queued_calls",{configurable:!0,get:function(){me("You are getting _emscripten_main_thread_process_queued_calls 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(n.ready,"_emscripten_main_thread_process_queued_calls",{configurable:!0,set:function(){me("You are setting _emscripten_main_thread_process_queued_calls 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(n.ready,"_emscripten_webgl_make_context_current")||(Object.defineProperty(n.ready,"_emscripten_webgl_make_context_current",{configurable:!0,get:function(){me("You are getting _emscripten_webgl_make_context_current 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(n.ready,"_emscripten_webgl_make_context_current",{configurable:!0,set:function(){me("You are setting _emscripten_webgl_make_context_current 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(n.ready,"_emscripten_webgl_get_current_context")||(Object.defineProperty(n.ready,"_emscripten_webgl_get_current_context",{configurable:!0,get:function(){me("You are getting _emscripten_webgl_get_current_context 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(n.ready,"_emscripten_webgl_get_current_context",{configurable:!0,set:function(){me("You are setting _emscripten_webgl_get_current_context 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(n.ready,"__get_tzname")||(Object.defineProperty(n.ready,"__get_tzname",{configurable:!0,get:function(){me("You are getting __get_tzname 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(n.ready,"__get_tzname",{configurable:!0,set:function(){me("You are setting __get_tzname 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(n.ready,"__get_daylight")||(Object.defineProperty(n.ready,"__get_daylight",{configurable:!0,get:function(){me("You are getting __get_daylight 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(n.ready,"__get_daylight",{configurable:!0,set:function(){me("You are setting __get_daylight 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(n.ready,"__get_timezone")||(Object.defineProperty(n.ready,"__get_timezone",{configurable:!0,get:function(){me("You are getting __get_timezone 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(n.ready,"__get_timezone",{configurable:!0,set:function(){me("You are setting __get_timezone 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(n.ready,"_emscripten_builtin_malloc")||(Object.defineProperty(n.ready,"_emscripten_builtin_malloc",{configurable:!0,get:function(){me("You are getting _emscripten_builtin_malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_emscripten_builtin_malloc",{configurable:!0,set:function(){me("You are setting _emscripten_builtin_malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"_emscripten_builtin_free")||(Object.defineProperty(n.ready,"_emscripten_builtin_free",{configurable:!0,get:function(){me("You are getting _emscripten_builtin_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_emscripten_builtin_free",{configurable:!0,set:function(){me("You are setting _emscripten_builtin_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"_emscripten_builtin_memalign")||(Object.defineProperty(n.ready,"_emscripten_builtin_memalign",{configurable:!0,get:function(){me("You are getting _emscripten_builtin_memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(n.ready,"_emscripten_builtin_memalign",{configurable:!0,set:function(){me("You are setting _emscripten_builtin_memalign on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(n.ready,"___getTypeName")||(Object.defineProperty(n.ready,"___getTypeName",{configurable:!0,get:function(){me("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(n.ready,"___getTypeName",{configurable:!0,set:function(){me("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(n.ready,"___embind_register_native_and_builtin_types")||(Object.defineProperty(n.ready,"___embind_register_native_and_builtin_types",{configurable:!0,get:function(){me("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(n.ready,"___embind_register_native_and_builtin_types",{configurable:!0,set:function(){me("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(n.ready,"onRuntimeInitialized")||(Object.defineProperty(n.ready,"onRuntimeInitialized",{configurable:!0,get:function(){me("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(n.ready,"onRuntimeInitialized",{configurable:!0,set:function(){me("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")}}));var o,i={};for(o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);var a="./this.program",s=function(e,t){throw t},c="object"===("undefined"==typeof window?"undefined":y(window)),A="function"==typeof importScripts,u="object"===("undefined"==typeof process?"undefined":y(process))&&"object"===y(process.versions)&&"string"==typeof process.versions.node,l=!c&&!u&&!A;if(n.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 d,g,f="";if(!c&&!A)throw new Error("environment detection error");if(A?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),x&&(f=x),f=0!==f.indexOf("blob:")?f.substr(0,f.lastIndexOf("/")+1):"","object"!==("undefined"==typeof window?"undefined":y(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?)");d=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},g=function(e,t,r){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)};var h=n.print||console.log.bind(console),p=n.printErr||console.warn.bind(console);for(o in i)i.hasOwnProperty(o)&&(n[o]=i[o]);function E(e){E.shown||(E.shown={}),E.shown[e]||(E.shown[e]=1,p(e))}i=null,n.arguments&&n.arguments,Object.getOwnPropertyDescriptor(n,"arguments")||Object.defineProperty(n,"arguments",{configurable:!0,get:function(){me("Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),n.thisProgram&&(a=n.thisProgram),Object.getOwnPropertyDescriptor(n,"thisProgram")||Object.defineProperty(n,"thisProgram",{configurable:!0,get:function(){me("Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),n.quit&&(s=n.quit),Object.getOwnPropertyDescriptor(n,"quit")||Object.defineProperty(n,"quit",{configurable:!0,get:function(){me("Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),C(void 0===n.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),C(void 0===n.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),C(void 0===n.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),C(void 0===n.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),C(void 0===n.read,"Module.read option was removed (modify read_ in JS)"),C(void 0===n.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),C(void 0===n.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),C(void 0===n.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),C(void 0===n.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Object.getOwnPropertyDescriptor(n,"read")||Object.defineProperty(n,"read",{configurable:!0,get:function(){me("Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(n,"readAsync")||Object.defineProperty(n,"readAsync",{configurable:!0,get:function(){me("Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(n,"readBinary")||Object.defineProperty(n,"readBinary",{configurable:!0,get:function(){me("Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(n,"setWindowTitle")||Object.defineProperty(n,"setWindowTitle",{configurable:!0,get:function(){me("Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),C(!l,"shell environment detected but not enabled at build time. Add 'shell' to `-s ENVIRONMENT` to enable.");var m,I=0,v=function(e){I=e};n.wasmBinary&&n.wasmBinary,Object.getOwnPropertyDescriptor(n,"wasmBinary")||Object.defineProperty(n,"wasmBinary",{configurable:!0,get:function(){me("Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),n.noExitRuntime,Object.getOwnPropertyDescriptor(n,"noExitRuntime")||Object.defineProperty(n,"noExitRuntime",{configurable:!0,get:function(){me("Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),"object"!==("undefined"==typeof WebAssembly?"undefined":y(WebAssembly))&&me("no native wasm support detected");var w=!1;function C(e,t){e||me("Assertion failed: ".concat(t))}var _="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function b(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&_)return _.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)&&E("Invalid UTF-8 leading byte 0x".concat(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 A=a-65536;i+=String.fromCharCode(55296|A>>10,56320|1023&A)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function B(e,t){return e?b(R,e,t):""}function D(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>=2097152&&E("Invalid Unicode code point 0x".concat(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-0x1FFFFF).")),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 T(e,t,r){return C("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),D(e,R,t,r)}function O(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 Q,P,R,S,k,F,N,U,j,L="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function H(e,t){C(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var r=e,n=r>>1,o=n+t/2;!(n>=o)&&k[n];)++n;if((r=n<<1)-e>32&&L)return L.decode(R.subarray(e,r));for(var i="",a=0;!(a>=t/2);++a){var s=S[e+2*a>>1];if(0==s)break;i+=String.fromCharCode(s)}return i}function G(e,t,r){if(C(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),C("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,i=0;i<o;++i){var a=e.charCodeAt(i);S[t>>1]=a,t+=2}return S[t>>1]=0,t-n}function X(e){return 2*e.length}function Y(e,t){C(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(r>=t/4);){var o=F[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 W(e,t,r){if(C(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),C("number"==typeof r,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,o=n+r-4,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),F[t>>2]=a,(t+=4)+4>o)break}return F[t>>2]=0,t-n}function V(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 z(e){var t=O(e)+1,r=Jr(t);return r&&D(e,P,r,t),r}function K(e,t){return e%t>0&&(e+=t-e%t),e}function Z(e){Q=e,n.HEAP8=P=new Int8Array(e),n.HEAP16=S=new Int16Array(e),n.HEAP32=F=new Int32Array(e),n.HEAPU8=R=new Uint8Array(e),n.HEAPU16=k=new Uint16Array(e),n.HEAPU32=N=new Uint32Array(e),n.HEAPF32=U=new Float32Array(e),n.HEAPF64=j=new Float64Array(e)}var J=5242880;n.TOTAL_STACK&&C(J===n.TOTAL_STACK,"the stack size can no longer be determined at runtime");var q,$=n.INITIAL_MEMORY||16777216;function ee(){var e=en();C(!(3&e)),N[1+(e>>2)]=34821223,N[2+(e>>2)]=2310721022,F[0]=1668509029}function te(){if(!w){var e=en(),t=N[1+(e>>2)],r=N[2+(e>>2)];34821223==t&&2310721022==r||me("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x".concat(r.toString(16)," ").concat(t.toString(16))),1668509029!==F[0]&&me("Runtime error: The application has corrupted its heap memory area (address zero)!")}}Object.getOwnPropertyDescriptor(n,"INITIAL_MEMORY")||Object.defineProperty(n,"INITIAL_MEMORY",{configurable:!0,get:function(){me("Module.INITIAL_MEMORY has been replaced with plain INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),C($>=J,"INITIAL_MEMORY should be larger than TOTAL_STACK, was ".concat($,"! (TOTAL_STACK=").concat(J,")")),C("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),C(!n.wasmMemory,"Use of `wasmMemory` detected. Use -s IMPORTED_MEMORY to define wasmMemory externally"),C(16777216==$,"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 re=[],ne=[],oe=[],ie=[],ae=!1;C(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),C(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),C(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),C(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var se,ce,Ae,ue,le=0,de=null,ge=null,fe={};function he(e){for(var t=e;;){if(!fe[e])return e;e=t+Math.random()}}function pe(e){le++,n.monitorRunDependencies&&n.monitorRunDependencies(le),e?(C(!fe[e]),fe[e]=1,null===de&&"undefined"!=typeof setInterval&&(de=setInterval((function(){if(w)return clearInterval(de),void(de=null);var e=!1;for(var t in fe)e||(e=!0,p("still waiting on run dependencies:")),p("dependency: ".concat(t));e&&p("(end of list)")}),1e4))):p("warning: run dependency added without ID")}function Ee(e){if(le--,n.monitorRunDependencies&&n.monitorRunDependencies(le),e?(C(fe[e]),delete fe[e]):p("warning: run dependency removed without ID"),0==le&&(null!==de&&(clearInterval(de),de=null),ge)){var t=ge;ge=null,t()}}function me(e){n.onAbort&&n.onAbort(e),p(e+=""),w=!0;var t,o="abort(".concat(e,") at ").concat((t=function(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}(),n.extraStackTrace&&(t+="\n".concat(n.extraStackTrace())),Be(t)));e=o;var i=new WebAssembly.RuntimeError(e);throw r(i),i}function ye(e,t){return function(){var r=e,o=t;return o=n.asm,C(ae,"native function `".concat(r,"` called before runtime initialization")),C(!0,"native function `".concat(r,"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)")),o[e]||C(o[e],"exported native function `".concat(r,"` not found")),o[e].apply(null,arguments)}}n.preloadedImages={},n.preloadedAudios={},(se="selfie_segmentation_solution_simd_wasm_bin.wasm").startsWith("data:application/octet-stream;base64,")||(ce=se,se=n.locateFile?n.locateFile(ce,f):f+ce);var Ie,ve={460656:function(){var e=!0;if(e){var t=Ir;if("function"!=typeof t)return void("undefined"!=typeof console&&console.error('Expected Emscripten global function "findCanvasEventTarget" not found. WebGL context creation may fail.'));Ir=function(e){if(0==e){if(n&&n.canvas)return n.canvas;if(n&&n.canvasCssSelector)return t(n.canvasCssSelector);"undefined"!=typeof console&&console.warn("Module properties canvas and canvasCssSelector not found during WebGL context creation.")}return t(e)},e=!1}},461441:function(){return"undefined"!=typeof wasmOffsetConverter}};function we(e,t){if(w)p("user callback triggered after application aborted. Ignoring.");else try{e()}catch(e){if(e instanceof gn)return;if("unwind"!==e)throw e&&"object"===y(e)&&e.stack&&p("exception thrown: ".concat([e,e.stack])),e}}function Ce(e,t){return setTimeout((function(){we(e)}),t)}Ie=u?function(){var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}:function(){return performance.now()};var _e={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){_e.mainLoop.scheduler=null,_e.mainLoop.currentlyRunningMainloop++},resume:function(){_e.mainLoop.currentlyRunningMainloop++;var e=_e.mainLoop.timingMode,t=_e.mainLoop.timingValue,r=_e.mainLoop.func;_e.mainLoop.func=null,function(e,t,r,o){C(!_e.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."),_e.mainLoop.func=e,_e.mainLoop.arg=o;var i=_e.mainLoop.currentlyRunningMainloop;function a(){return!(i<_e.mainLoop.currentlyRunningMainloop)}_e.mainLoop.running=!1,_e.mainLoop.runner=function(){if(!w)if(_e.mainLoop.queue.length>0){var t=Date.now(),r=_e.mainLoop.queue.shift();if(r.func(r.arg),_e.mainLoop.remainingBlockers){var o=_e.mainLoop.remainingBlockers,i=o%1==0?o-1:Math.floor(o);r.counted?_e.mainLoop.remainingBlockers=i:(i+=.5,_e.mainLoop.remainingBlockers=(8*o+i)/9)}if(h('main loop blocker "'.concat(r.name,'" took ').concat(Date.now()-t," ms")),_e.mainLoop.updateStatus(),!a())return;setTimeout(_e.mainLoop.runner,0)}else a()&&(_e.mainLoop.currentFrameNumber=_e.mainLoop.currentFrameNumber+1|0,1==_e.mainLoop.timingMode&&_e.mainLoop.timingValue>1&&_e.mainLoop.currentFrameNumber%_e.mainLoop.timingValue!=0?_e.mainLoop.scheduler():(0==_e.mainLoop.timingMode&&(_e.mainLoop.tickStartTime=Ie()),pr.newRenderingFrameStarted(),void 0!==pr&&pr.currentContext&&!pr.currentContextIsProxied&&!pr.currentContext.attributes.explicitSwapControl&&pr.currentContext.GLctx.commit&&pr.currentContext.GLctx.commit(),"timeout"===_e.mainLoop.method&&n.ctx&&(E("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!"),_e.mainLoop.method=""),_e.mainLoop.runIter(e),te(),a()&&("object"===("undefined"==typeof SDL?"undefined":y(SDL))&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),_e.mainLoop.scheduler())))}}(r,0,0,_e.mainLoop.arg),function(e,t){if(_e.mainLoop.timingMode=e,_e.mainLoop.timingValue=t,!_e.mainLoop.func)return p("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(_e.mainLoop.running||(_e.mainLoop.running=!0),0==e)_e.mainLoop.scheduler=function(){var e=0|Math.max(0,_e.mainLoop.tickStartTime+t-Ie());setTimeout(_e.mainLoop.runner,e)},_e.mainLoop.method="timeout";else if(1==e)_e.mainLoop.scheduler=function(){_e.requestAnimationFrame(_e.mainLoop.runner)},_e.mainLoop.method="rAF";else if(2==e){if("undefined"==typeof setImmediate){var r=[],o="setimmediate";addEventListener("message",(function(e){e.data!==o&&e.data.target!==o||(e.stopPropagation(),r.shift()())}),!0),setImmediate=function(e){r.push(e),A?(void 0===n.setImmediates&&(n.setImmediates=[]),n.setImmediates.push(e),postMessage({target:o})):postMessage(o,"*")}}_e.mainLoop.scheduler=function(){setImmediate(_e.mainLoop.runner)},_e.mainLoop.method="immediate"}}(e,t),_e.mainLoop.scheduler()},updateStatus:function(){if(n.setStatus){var e=n.statusMessage||"Please wait...",t=_e.mainLoop.remainingBlockers,r=_e.mainLoop.expectedBlockers;t?t<r?n.setStatus("".concat(e," (").concat(r-t,"/").concat(r,")")):n.setStatus(e):n.setStatus("")}},runIter:function(e){if(!w){if(n.preMainLoop&&!1===n.preMainLoop())return;we(e),n.postMainLoop&&n.postMainLoop()}}},isFullscreen:!1,pointerL