@vanzxy/baileys 1.6.2 → 1.6.4
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.
Potentially problematic release.
This version of @vanzxy/baileys might be problematic. Click here for more details.
- package/NOTICE.md +50 -0
- package/lib/Utils/A2UI.js +217 -0
- package/lib/Utils/MessageBuilder.js +332 -46
- package/lib/Utils/MessageBuilder_d.ts +45 -0
- package/lib/Utils/PersistentStore.js +592 -0
- package/lib/Utils/PersistentStore_d.ts +60 -0
- package/lib/Utils/anti-delete.d.ts +68 -0
- package/lib/Utils/anti-delete.js +185 -0
- package/lib/Utils/auto-reply.d.ts +47 -0
- package/lib/Utils/auto-reply.js +155 -0
- package/lib/Utils/button-helper-utils.js +314 -0
- package/lib/Utils/button-sender.js +817 -0
- package/lib/Utils/chat-history-helpers.d.ts +21 -0
- package/lib/Utils/chat-history-helpers.js +71 -0
- package/lib/Utils/index.d.ts +11 -0
- package/lib/Utils/index.js +16 -0
- package/lib/Utils/media-messages.d.ts +18 -0
- package/lib/Utils/media-messages.js +71 -0
- package/lib/Utils/media-set.d.ts +13 -0
- package/lib/Utils/media-set.js +165 -0
- package/lib/Utils/message-kind.js +139 -0
- package/lib/Utils/message-search.d.ts +44 -0
- package/lib/Utils/message-search.js +174 -0
- package/lib/Utils/scheduling.d.ts +42 -0
- package/lib/Utils/scheduling.js +140 -0
- package/lib/Utils/status.d.ts +50 -0
- package/lib/Utils/status.js +108 -0
- package/lib/Utils/stickerpack.d.ts +51 -0
- package/lib/Utils/stickerpack.js +276 -0
- package/lib/Utils/templates.d.ts +76 -0
- package/lib/Utils/templates.js +151 -0
- package/lib/Utils/use-sqlite-auth-state.js +28 -1
- package/lib/Utils/vcard.d.ts +58 -0
- package/lib/Utils/vcard.js +94 -0
- package/lib/VoIP/audio-feeder.d.ts +15 -0
- package/lib/VoIP/audio-feeder.js +132 -0
- package/lib/VoIP/index.js +277 -0
- package/lib/VoIP/relay-transport.d.ts +43 -0
- package/lib/VoIP/relay-transport.js +559 -0
- package/lib/VoIP/signaling.js +624 -0
- package/lib/VoIP/types.d.ts +69 -0
- package/lib/VoIP/types.js +17 -0
- package/lib/VoIP/wasm-engine.d.ts +103 -0
- package/lib/VoIP/wasm-engine.js +1214 -0
- package/lib/VoIP/worker-bootstrap.js +1042 -0
- package/lib/WABinary/generic-utils.js +8 -0
- package/lib/assets/wasm/loader.js +5 -0
- package/lib/assets/wasm/whatsapp.wasm +0 -0
- package/lib/assets/wasm/worker-modules.js +273 -0
- package/lib/index.js +4 -0
- package/package.json +22 -1
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
;/*FB_PKG_DELIM*/
|
|
2
|
+
|
|
3
|
+
"use strict";(function(){var e=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof global!="undefined"&&global;if(typeof e.AbortController=="undefined"){var t=(function(){function e(){this.__listeners=new Map}return e.prototype=Object.create(Object.prototype),e.prototype.addEventListener=function(e,t,n){if(arguments.length<2)throw new TypeError("TypeError: Failed to execute 'addEventListener' on 'CustomEventTarget': 2 arguments required, but only "+arguments.length+" present.");var r=this.__listeners,o=e.toString();r.has(o)||r.set(o,new Map);var a=r.get(o);a.has(t)||a.set(t,n)},e.prototype.removeEventListener=function(e,t,n){if(arguments.length<2)throw new TypeError("TypeError: Failed to execute 'addEventListener' on 'CustomEventTarget': 2 arguments required, but only "+arguments.length+" present.");var r=this.__listeners,o=e.toString();if(r.has(o)){var a=r.get(o);a.has(t)&&a.delete(t)}},e.prototype.dispatchEvent=function(e){var t=this;if(!(e instanceof Event))throw new TypeError("Failed to execute 'dispatchEvent' on 'CustomEventTarget': parameter 1 is not of type 'Event'.");var n=e.type,r=this.__listeners,o=r.get(n);if(o){var a=function(){var n=i[0],r=i[1];try{typeof n=="function"?n.call(t,e):n&&typeof n.handleEvent=="function"&&n.handleEvent(e)}catch(e){setTimeout(function(){throw e})}r&&r.once&&o.delete(n)};for(var i of o.entries())a()}return!0},e})(),n={};e.AbortSignal=(function(){function e(e){if(e!==n)throw new TypeError("Illegal constructor.");t.call(this),this._aborted=!1}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Object.defineProperty(e.prototype,"onabort",{get:function(){return this._onabort},set:function(t){var e=this._onabort;e&&this.removeEventListener("abort",e),this._onabort=t,this.addEventListener("abort",t)}}),Object.defineProperty(e.prototype,"aborted",{get:function(){return this._aborted}}),e})(),e.AbortController=(function(){function e(){this._signal=new AbortSignal(n)}return e.prototype=Object.create(Object.prototype),Object.defineProperty(e.prototype,"signal",{get:function(){return this._signal}}),e.prototype.abort=function(){var e=this.signal;e.aborted||(e._aborted=!0,e.dispatchEvent(new Event("abort")))},e})()}})();
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
"use strict";Array.prototype.at==null&&(Array.prototype.at=function(t){var e=parseInt(t,10);return Number.isInteger(e)||(e=0),e>=0&&e<this.length?this[e]:this[this.length+e]});
|
|
8
|
+
"use strict";(function(){if(!Array.prototype.flat){var e=function(n){return n<1?Array.prototype.slice.call(this):Array.prototype.reduce.call(this,function(t,r){return Array.isArray(r)?t.push.apply(t,e.call(r,n-1)):t.push(r),t},[])};Array.prototype.flat=function(){return e.call(this,isNaN(arguments[0])?1:Number(arguments[0]))}}if(!Array.prototype.flatMap){var t=function(t,n){var e=[];if(typeof n!="function"){var r=new TypeError("Callback function must be callable.");throw r.stack,r}for(var o=0;o<t.length;o++){var a=n.call(t,t[o],o,t);Array.isArray(a)?e.push.apply(e,a):e.push(a)}return e};Array.prototype.flatMap=function(e){var n=arguments[1]||this;return t(n,e)}}})();
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
(function(){"use strict";var e=Array.prototype.indexOf;Array.prototype.includes||(Array.prototype.includes=function(r){"use strict";if(r!==void 0&&Array.isArray(this)&&!Number.isNaN(r))return e.apply(this,arguments)!==-1;var o=Object(this),a=o.length?t(o.length):0;if(a===0)return!1;for(var i=arguments.length>1?n(arguments[1]):0,l=i<0?Math.max(a+i,0):i,s=Number.isNaN(r);l<a;){var u=o[l];if(u===r||s&&Number.isNaN(u))return!0;l++}return!1});function t(e){return Math.min(Math.max(n(e),0),Number.MAX_SAFE_INTEGER)}function n(e){var t=Number(e);return Number.isFinite(t)&&t!==0?r(t)*Math.floor(Math.abs(t)):t}function r(e){return e>=0?1:-1}if(!Array.prototype.values){var o=(function(){function e(e){if(this.$1=void 0,this.$2=0,e==null)throw new TypeError("Cannot convert undefined or null to object");this.$1=Object(e)}var t=e.prototype;return t.next=function(){if(this.$1==null||this.$2>=this.$1.length)return this.$1=void 0,{value:void 0,done:!0};var e=this.$1[this.$2];return this.$2++,{value:e,done:!1}},t[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]=function(){return this},e})();Array.prototype.values=function(){return new o(this)}}Array.prototype[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]||(Array.prototype[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]=Array.prototype.values)})();
|
|
12
|
+
"use strict";Array.prototype.findLast==null&&(Array.prototype.findLast=function(t,n){for(var e=this,r=e.length-1;r>=0;r--){var o=e[r],a=t.call(n,o,r,e);if(a)return o}});
|
|
13
|
+
"use strict";Array.prototype.findLastIndex==null&&(Array.prototype.findLastIndex=function(t,n){for(var e=this,r=e.length-1;r>=0;r--){var o=e[r],a=t.call(n,o,r,e);if(a)return r}return-1});
|
|
14
|
+
"use strict";Array.prototype.toReversed==null&&(Array.prototype.toReversed=function(){return this.slice().reverse()});
|
|
15
|
+
"use strict";Array.prototype.toSorted==null&&(Array.prototype.toSorted=function(t){return this.slice().sort(t)});
|
|
16
|
+
"use strict";Array.prototype.toSpliced==null&&(Array.prototype.toSpliced=function(){var e=this.slice();return e.splice.apply(e,arguments),e});
|
|
17
|
+
|
|
18
|
+
"use strict";if(Array.prototype.with==null){var toIntegerOrInfinity=function(t){return Number.isNaN(t)||t===0?0:t===1/0||t===-1/0?t:Math.trunc(t)};Array.prototype.with=function(e,n){var r=this.length,o=toIntegerOrInfinity(e),a;if(o>=0?a=o:a=r+o,a>=r||a<0){var i=new RangeError("Invalid index");throw i.stack,i}var l=this.slice();return l[a]=n,l}}
|
|
19
|
+
|
|
20
|
+
(function(e){e.__t=function(e){return e[0]},e.__w=function(e){return e}})(typeof globalThis!="undefined"?globalThis:typeof global!="undefined"?global:typeof window!="undefined"?window:typeof this!="undefined"?this:typeof self!="undefined"?self:{});
|
|
21
|
+
(function(e){var t={},n=function(t,n){if(!t&&!n)return null;var e={};return typeof t!="undefined"&&(e.type=t),typeof n!="undefined"&&(e.signature=n),e},r=function(t,r){return n(t&&/^[A-Z]/.test(t)?t:void 0,r&&(r.params&&r.params.length||r.returns)?"function("+(r.params?r.params.map(function(e){return/\?/.test(e)?"?"+e.replace("?",""):e}).join(","):"")+")"+(r.returns?":"+r.returns:""):void 0)},o=function(t,n,r){return t},a=function(t,n,o){if("typechecks"in __transform_includes){var e=r(n?n.name:void 0,o);e&&__w(t,e)}return t},i=function(t,n,r){return r.apply(t,n)},l=function(n,r,o,a,i){if(i){i.callId||(i.callId=i.module+":"+(i.line||0)+":"+(i.column||0));var e=i.callId;t[e]=(t[e]||0)+1}return o.apply(n,r)};typeof __transform_includes=="undefined"?(e.__annotator=o,e.__bodyWrapper=i):(e.__annotator=a,"codeusage"in __transform_includes?(e.__annotator=o,e.__bodyWrapper=l,e.__bodyWrapper.getCodeUsage=function(){return t},e.__bodyWrapper.clearCodeUsage=function(){t={}}):e.__bodyWrapper=i)})(typeof globalThis!="undefined"?globalThis:typeof global!="undefined"?global:typeof window!="undefined"?window:typeof this!="undefined"?this:typeof self!="undefined"?self:{});
|
|
22
|
+
self.__DEV__=self.__DEV__||0,self.emptyFunction=function(){};
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
(function(e,t){var n="keys",r="values",o="entries",a=(function(){var e=l(Array),a;return e||(a=(function(){"use strict";function e(e,t){this.$1=e,this.$2=t,this.$3=0}var a=e.prototype;return a.next=function(){if(this.$1==null)return{value:t,done:!0};var e=this.$1,a=this.$1.length,i=this.$3,l=this.$2;if(i>=a)return this.$1=t,{value:t,done:!0};if(this.$3=i+1,l===n)return{value:i,done:!1};if(l===r)return{value:e[i],done:!1};if(l===o)return{value:[i,e[i]],done:!1}},a[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]=function(){return this},e})()),{keys:e?function(e){return e.keys()}:function(e){return new a(e,n)},values:e?function(e){return e.values()}:function(e){return new a(e,r)},entries:e?function(e){return e.entries()}:function(e){return new a(e,o)}}})(),i=(function(){var e=l(String),n;return e||(n=(function(){"use strict";function e(e){this.$1=e,this.$2=0}var n=e.prototype;return n.next=function(){if(this.$1==null)return{value:t,done:!0};var e=this.$2,n=this.$1,r=n.length;if(e>=r)return this.$1=t,{value:t,done:!0};var o,a=n.charCodeAt(e);if(a<55296||a>56319||e+1===r)o=n[e];else{var i=n.charCodeAt(e+1);i<56320||i>57343?o=n[e]:o=n[e]+n[e+1]}return this.$2=e+o.length,{value:o,done:!1}},n[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]=function(){return this},e})()),{keys:function(){throw TypeError("Strings default iterator doesn't implement keys.")},values:e?function(e){return e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]()}:function(e){return new n(e)},entries:function(){throw TypeError("Strings default iterator doesn't implement entries.")}}})();function l(e){return typeof e.prototype[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]=="function"&&typeof e.prototype.values=="function"&&typeof e.prototype.keys=="function"&&typeof e.prototype.entries=="function"}var s=(function(){"use strict";function e(e,t){this.$1=e,this.$2=t,this.$3=Object.keys(e),this.$4=0}var a=e.prototype;return a.next=function(){var e=this.$3.length,a=this.$4,i=this.$2,l=this.$3[a];if(a>=e)return this.$1=t,{value:t,done:!0};if(this.$4=a+1,i===n)return{value:l,done:!1};if(i===r)return{value:this.$1[l],done:!1};if(i===o)return{value:[l,this.$1[l]],done:!1}},a[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]=function(){return this},e})(),u={keys:function(t){return new s(t,n)},values:function(t){return new s(t,r)},entries:function(t){return new s(t,o)}};function c(e,t){return typeof e=="string"?i[t||r](e):Array.isArray(e)?a[t||r](e):e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]?e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]():u[t||o](e)}Object.assign(c,{KIND_KEYS:n,KIND_VALUES:r,KIND_ENTRIES:o,keys:function(t){return c(t,n)},values:function(t){return c(t,r)},entries:function(t){return c(t,o)},generic:u.entries}),e.FB_enumerate=c})(typeof global=="object"?global:typeof this=="object"?this:typeof window=="object"?window:typeof self=="object"?self:{});
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
"use strict";(function(){if(typeof Element=="undefined"||Element.prototype.scroll)return;function e(e,t){if(t===void 0&&(t=!1),e.length!==0){var n=e[0],r=e[1];if(n=Number(n)||0,r=Number(r)||0,e.length===1){var o=e[0];if(o==null)return;n=o.left,r=o.top,n!==void 0&&(n=Number(n)||0),r!==void 0&&(r=Number(r)||0)}n!==void 0&&(this.scrollLeft=(t?this.scrollLeft:0)+n),r!==void 0&&(this.scrollTop=(t?this.scrollTop:0)+r)}}Element.prototype.scroll=Element.prototype.scrollTo=function(){e.call(this,arguments)},Element.prototype.scrollBy=function(){e.call(this,arguments,!0)}})();
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
"use strict";function*generator(){yield 1}function getIterables(){return[generator(),[].values(),[].keys(),[].entries(),new Uint8Array([]).values(),new Uint8Array([]).keys(),new Uint8Array([]).entries(),new Map().values(),new Map().keys(),new Map().entries(),new Set().values(),new Set().keys(),new Set().entries()]}function polyfillIteratorFunctions(){var e=new Set;getIterables().forEach(function(t){e.add(Object.getPrototypeOf(t))}),e.forEach(function(e){typeof e.drop!="function"&&(e.drop=function(t){for(var e=0;e<t;e++)this.next();return this}),typeof e.every!="function"&&(e.every=function(t){var e=0;for(var n of this)if(!t(n,e++))return!1;return!0}),typeof e.filter!="function"&&(e.filter=function*(t){var e=0;for(var n of this)t(n,e++)&&(yield n)}),typeof e.find!="function"&&(e.find=function(t){var e=0;for(var n of this)if(t(n,e++))return n}),typeof e.flatMap!="function"&&(e.flatMap=function*(t){var e=0;for(var n of this){var r=t(n,e++);"next"in r||(r=r[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]());for(var o=r.next();!o.done;)yield o.value,o=r.next()}}),typeof e.forEach!="function"&&(e.forEach=function(t){var e=0;for(var n of this)t(n,e++)}),typeof e.map!="function"&&(e.map=function*(t){var e=0;for(var n of this)yield t(n,e++)}),typeof e.reduce!="function"&&(e.reduce=function(t,n){var e=n,r=0;for(var o of this)e=t(e,o,r++);return e}),typeof e.some!="function"&&(e.some=function(t){var e=0;for(var n of this)if(t(n,e++))return!0;return!1}),typeof e.take!="function"&&(e.take=function*(t){var e=0;for(var n of this){if(e++>=t)break;yield n}}),typeof e.toArray!="function"&&(e.toArray=function(){return Array.from(this)})})}polyfillIteratorFunctions();
|
|
37
|
+
(function(){function e(){if(typeof JSON!="object"||typeof JSON.stringify!="function")return!1;if(typeof navigator=="undefined"||!navigator.userAgent)return!0;var e=navigator.userAgent,t;return e.indexOf("Firefox/")>-1?(t=e.match(/Firefox\/([0-9]+)/),t==null||!(parseInt(t[1],10)>=62)):e.indexOf("Edg/")>-1?(t=e.match(/Edg\/([0-9]+)/),t==null||!(parseInt(t[1],10)>=79)):e.indexOf("Chrome/")>-1?(t=e.match(/Chrome\/([0-9]+)/),t==null||!(parseInt(t[1],10)>=66)):e.indexOf("CriOS/")>-1?(t=e.match(/CriOS\/([0-9]+)/),t==null||!(parseInt(t[1],10)>=66)):e.indexOf("Safari/")>-1&&e.indexOf("Version/")>-1?(t=e.match(/Version\/([0-9]+)/),t==null||!(parseInt(t[1],10)>=12)):!0}function t(){return JSON.stringify(["\u2028\u2029"])==='["\\u2028\\u2029"]'}e()&&!t()&&(JSON.stringify=(function(e){var t=/\u2028/g,n=/\u2029/g;return function(o,a,i){var r=e.call(this,o,a,i);return r&&(-1<r.indexOf("\u2028")&&(r=r.replace(t,"\\u2028")),-1<r.indexOf("\u2029")&&(r=r.replace(n,"\\u2029"))),r}})(JSON.stringify))})();
|
|
38
|
+
|
|
39
|
+
(function(){var e=Object.prototype.hasOwnProperty;Object.entries=function(t){if(t==null){var n=new TypeError("Object.entries called on non-object");throw n.stack,n}var r=[];for(var o in t)e.call(t,o)&&r.push([o,t[o]]);return r},typeof Object.fromEntries!="function"&&(Object.fromEntries=function(t){var e={};for(var n of t){var r=n[0],o=n[1];e[r]=o}return e}),Object.values=function(t){if(t==null){var n=new TypeError("Object.values called on non-object");throw n.stack,n}var r=[];for(var o in t)e.call(t,o)&&r.push(t[o]);return r}})();
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
"use strict";Set.prototype.difference==null&&(Set.prototype.difference=function(t){var e=new Set(this);for(var n of t)e.has(n)&&e.delete(n);return e});
|
|
44
|
+
"use strict";Set.prototype.intersection==null&&(Set.prototype.intersection=function(t){var e=new Set;for(var n of this)t.has(n)&&e.add(n);return e});
|
|
45
|
+
"use strict";Set.prototype.isDisjointFrom==null&&(Set.prototype.isDisjointFrom=function(t){if(this.size<=t.size){for(var e of this)if(t.has(e))return!1}else for(var n of t)if(this.has(n))return!1;return!0});
|
|
46
|
+
"use strict";Set.prototype.isSubsetOf==null&&(Set.prototype.isSubsetOf=function(t){if(this.size>t.size)return!1;for(var e of this)if(!t.has(e))return!1;return!0});
|
|
47
|
+
"use strict";Set.prototype.isSupersetOf==null&&(Set.prototype.isSupersetOf=function(t){if(this.size<t.size)return!1;for(var e of t)if(!this.has(e))return!1;return!0});
|
|
48
|
+
"use strict";Set.prototype.symmetricDifference==null&&(Set.prototype.symmetricDifference=function(t){var e=new Set(this);for(var n of t)e.has(n)?e.delete(n):e.add(n);return e});
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
String.prototype.contains||(String.prototype.contains=String.prototype.includes);
|
|
53
|
+
String.prototype.padStart||(String.prototype.padStart=function(e,t){return e=e>>0,t=String(t||" "),this.length>e?String(this):(e=e-this.length,e>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return e=e>>0,t=String(t||" "),this.length>e?String(this):(e=e-this.length,e>t.length&&(t+=t.repeat(e/t.length)),String(this)+t.slice(0,e))});
|
|
54
|
+
if(!String.prototype.matchAll){var MAX_CALLS_TO_EXEC=250;String.prototype.matchAll=function(e){if(!e.global){var n=new TypeError("String.prototype.matchAll called with a non-global RegExp argument");throw n.stack,n}for(var r=String(this),o=[],a,i=0;(a=e.exec(r))&&i++<MAX_CALLS_TO_EXEC;)o.push(a);return o}}
|
|
55
|
+
String.prototype.trimLeft||(String.prototype.trimLeft=function(){return this.replace(/^\s+/,"")}),String.prototype.trimRight||(String.prototype.trimRight=function(){return this.replace(/\s+$/,"")});
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
"use strict";(function(e){function t(){return!(typeof URL!="function"||typeof URL.createObjectURL!="function"||typeof URL.revokeObjectURL!="function"||typeof File!="function"||typeof Blob!="function")}if(t()){var n={},r=URL.createObjectURL,o=URL.revokeObjectURL;URL.createObjectURL=function(e){var t=null,o=0;e instanceof File?(t="File",o=e.size):e instanceof Blob?(t="Blob",o=e.size):typeof MediaSource=="function"&&e instanceof MediaSource&&(t="MediaSource",o=0);var a=r.call(URL,e);return t!==null&&(n[a]={type:t,size:o}),a},URL.revokeObjectURL=function(e){o.call(URL,e),delete n[e]},URL._fbRegisteredObjectURL=function(){return Object.values(n)}}})(this);
|
|
62
|
+
(function(e){var t=e.babelHelpers={},n=Object.prototype.hasOwnProperty;typeof Symbol!="undefined"&&!(typeof Symbol!="function"||Symbol.asyncIterator)&&(Symbol.asyncIterator=Symbol("Symbol.asyncIterator"));function r(e){this.wrapped=e}function o(e){var t,n;function o(e,r){return new Promise(function(o,i){var l={key:e,arg:r,resolve:o,reject:i,next:null};n?n=n.next=l:(t=n=l,a(e,r))})}function a(t,n){try{var o=e[t](n),l=o.value,s=l instanceof r;Promise.resolve(s?l.wrapped:l).then(function(e){if(s){a(t==="return"?"return":"next",e);return}i(o.done?"return":"normal",e)},function(e){a("throw",e)})}catch(e){i("throw",e)}}function i(e,r){switch(e){case"return":t.resolve({value:r,done:!0});break;case"throw":t.reject(r);break;default:t.resolve({value:r,done:!1});break}t=t.next,t?a(t.key,t.arg):n=null}this._invoke=o,typeof e.return!="function"&&(this.return=void 0)}typeof Symbol=="function"&&(typeof Symbol!="function"||Symbol.asyncIterator)&&(o.prototype[typeof Symbol=="function"?Symbol.asyncIterator:"@@asyncIterator"]=function(){return this}),o.prototype.next=function(e){return this._invoke("next",e)},o.prototype.throw=function(e){return this._invoke("throw",e)},o.prototype.return=function(e){return this._invoke("return",e)},t.createClass=(function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}})(),t.inheritsLoose=function(e,t){return Object.assign(e,t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.__superConstructor__=t,t},t.wrapNativeSuper=function(e){var n=typeof Map=="function"?new Map:void 0;return t.wrapNativeSuper=function(e){if(e===null)return null;if(typeof e!="function"){var r=new TypeError("Super expression must either be null or a function");throw r.stack,r}if(n!==void 0){if(n.has(e))return n.get(e);n.set(e,o)}t.inheritsLoose(o,e);function o(){e.apply(this,arguments)}return o},t.wrapNativeSuper(e)},t.assertThisInitialized=function(e){if(e===void 0){var t=new ReferenceError("this hasn't been initialised - super() hasn't been called");throw t.stack,t}return e},t._extends=Object.assign,t.extends=t._extends,t.construct=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(t)))},t.objectWithoutPropertiesLoose=function(e,t){var r={};for(var o in e)!n.call(e,o)||t.indexOf(o)>=0||(r[o]=e[o]);return r},t.taggedTemplateLiteralLoose=function(e,t){return t||(t=e.slice(0)),e.raw=t,e},t.bind=Function.prototype.bind,t.wrapAsyncGenerator=function(e){return function(){return new o(e.apply(this,arguments))}},t.awaitAsyncGenerator=function(e){return new r(e)},t.asyncIterator=function(e){var t;if(typeof Symbol!="undefined"&&((typeof Symbol!="function"||Symbol.asyncIterator)&&(t=e[typeof Symbol=="function"?Symbol.asyncIterator:"@@asyncIterator"],t!=null)||(typeof Symbol!="function"||Symbol.iterator)&&(t=e[typeof Symbol=="function"?Symbol.iterator:"@@iterator"],t!=null)))return t.call(e);var n=new TypeError("Object is not async iterable");throw n.stack,n},t.asyncGeneratorDelegate=function(e,t){var n={},r=!1;function o(n,o){return r=!0,o=new Promise(function(t){t(e[n](o))}),{done:!1,value:t(o)}}return typeof Symbol=="function"&&(typeof Symbol!="function"||Symbol.iterator)&&(n[typeof Symbol=="function"?Symbol.iterator:"@@iterator"]=function(){return this}),n.next=function(e){return r?(r=!1,e):o("next",e)},typeof e.throw=="function"&&(n.throw=function(e){if(r)throw r=!1,e;return o("throw",e)}),typeof e.return=="function"&&(n.return=function(e){return r?(r=!1,e):o("return",e)}),n},t.arrayLikeToArray=function(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}})(typeof global=="undefined"?self:global);
|
|
63
|
+
|
|
64
|
+
(function(t){if(t.require!=null)return;var e=null,n=null,r=[],o={},a={},i=0,l=0,s=0,u=0,c=0,d=1,m=2,p=4,_=8,f=16,g=32,h=64,y=128,C=256,b={},v={},S=Object.prototype.hasOwnProperty,R=Object.prototype.toString;function L(e){for(var t=Array.prototype.slice.call(e),n={},r,a,i,l;t.length;)if(a=t.shift(),!n[a]&&(n[a]=!0,i=o[a],!(!i||pe(i))&&i.dependencies))for(r=0;r<i.dependencies.length;r++)l=i.dependencies[r],pe(l)||t.push(l.id);for(a in n)S.call(n,a)&&t.push(a);var s=[];for(r=0;r<t.length;r++){a=t[r];var u=a;i=o[a];var c=i?i.dependencies:null;if(!i||!c)u+=" is not defined";else if(pe(i))u+=" is ready";else{for(var d=[],m=0;m<c.length;m++)l=c[m],pe(l)||d.push(l.id);u+=" is waiting for "+d.join(", ")}s.push(u)}return s.join("\n")}function E(e){var t=new Error(e);t.name="ModuleError",t.messageFormat=e;for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.messageParams=r.map(function(e){return String(e)}),t.taalOpcodes=[2,2],t}var k=t.Env||{},I=!!k.gk_require_when_ready_in_order,T=!!k.clear_js_factory_after_used,D=!!k.profile_require_factories,x=t.performance||{},$;if(x.now&&x.timing&&x.timing.navigationStart){var P=x.timing.navigationStart;$=function(){return x.now()+P}}else $=function(){return Date.now()};var N=0;function M(e){N++;var t=o[e];return(!t||t.exports==null&&!t.factoryFinished)&&(W(e),t=o[e]),t&&t.refcount--===1&&(o[e]=null),t}function w(e){return e.defaultExport!==v?e.defaultExport:e.exports}function A(e){var t=M(e);if(t)return w(t)}function F(e){var t=M(e);if(t)return t.defaultExport!==v?t.defaultExport:null}function O(e){var t=M(e);if(t)return t.exports}function B(e){return e.factoryLength===-1&&e.factory!=null&&(e.factoryLength=e.factory.length),e.factoryLength}function W(r){var i=t.ErrorGuard;if(i&&!i.inGuard())return i.applyWithGuard(W,null,[r]);var l=o[r];if(!l){var s='Requiring unknown module "%s"';throw E(s,r)}t.__onBeforeModuleFactory==null||t.__onBeforeModuleFactory(l);var u,c;if(l.hasError){if(l.error==null)throw E('Requiring module "%s" which threw an exception',r);var d=q(l.error);throw U(d,{messageFormat:'Requiring module "%s" which threw an exception',messageParams:[r]}),d}if(!pe(l))throw E('Requiring module "%s" with unresolved dependencies: %s',r,L([r]));z(l);var p=l.exports={},f=l.factory,y=l.dependencies;if(f!=null&&R.call(f)==="[object Function]"&&y!=null){var C=y.length,v,k;try{try{be(l)}catch(e){V(e,r)}var I=[],x=C;if(l.special&_){var P=l.special&g?n:e;I=P.slice(0),I[P.length-2]=l,I[P.length-1]=p,x+=I.length}if(l.special&m){var N=B(l);x=Math.min(C+I.length,N)}for(var M=0;M<C;M++){var w=y[M];I.length<x&&I.push(A.call(null,w.id))}var F;D&&(F=$()),a[l.id].factoryRun=!0;try{var O=l.context!=null?l.context:t;v=f.apply(O,I)}catch(e){V(e,r)}finally{if(D){var H=$(),G=a[l.id];G.factoryTime=H-(F||0),G.factoryEnd=H,G.factoryStart=F}}}catch(e){throw l.hasError=!0,l.error=e,l.exports=null,e}finally{}v!=null&&(typeof v=="object"||typeof v=="function")&&(l.exports=v);var j;if(l.special&h?l.exports!=null&&S.call(l.exports,"default")&&(l.defaultExport=j=l.exports.default):l.defaultExport=j=l.exports,typeof j=="function"){var K=j.__superConstructor__;if(j.displayName==null||K&&K.displayName===j.displayName)try{j.displayName=(j.name||"(anonymous)")+" [from "+r+"]"}catch(e){}}l.factoryFinished=!0,T&&(l.factory=null,f=void 0)}else l.exports=f;var Q="__isRequired__"+r,X=o[Q];X&&!pe(X)&&oe(Q,b),t.__onAfterModuleFactory==null||t.__onAfterModuleFactory(l)}function q(e){return t.getErrorSafe!=null?t.getErrorSafe(e):e!=null&&typeof e=="object"&&typeof e.message=="string"?e:E("Non-error thrown: %s",String(e))}function U(e,n){var r=t.ErrorSerializer;r&&r.aggregateError(e,n)}function V(e,t){var n=q(e);throw U(n,{messageFormat:'Module "%s"',messageParams:[t],forcedKey:t.startsWith("__")?null:t}),n}function H(){return N}function G(){var e={};for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t]);return e}function z(e){e.nonJSDeps||(e.nonJSDeps=!0,e.dependencies&&e.dependencies.forEach(z))}var j=t!=null&&t.document!=null&&"createElement"in t.document,K=typeof WorkerGlobalScope=="function",Q=j||K,X=k.use_fbt_virtual_modules===!0&&Q,Y="$fbt_virtual",J={},Z=null,ee=6e4;function te(e){!(e in o)&&!(e in J)&&(J[e]=$()),Z||(Z=setTimeout(Te()(ne,"_checkFbtVirtualModuleTimeout"),ee))}function ne(){Z=null;var e=$(),t=Object.keys(J).filter(function(t){var n=e-J[t]>ee;return n&&delete J[t],n});Object.keys(J).length>0&&(Z=setTimeout(Te()(ne,"_checkFbtVirtualModuleTimeout"),ee)),t.length>0&&se.apply(null,[["FBLogger"],function(e){e("binary_transparency","vmod_timeout").warn("The following virtual modules are taking over %sms to be defined: %s...",ee,t.join(",").slice(0,300))}])}function re(e,t,n){if(X&&n!=null&&n&y){var r=e+Y;t.push(r),te(r)}}function oe(e,n,o,i,l,s,d){n===void 0?(n=[],o=e,e=ue()):o===void 0&&(o=n,R.call(e)==="[object Array]"?(n=e,e=ue(n.join(","))):n=[]);var m={cancel:le.bind(this,e)},p=ae(e);if(!n&&!o&&s!=null&&s!==0)return p.refcount+=s,m;if(X&&(e in J&&delete J[e],Array.isArray(n)&&re(e,n,i)),a[e]={id:e,dependencies:n,meta:d,category:i,defined:D?$():null,factoryTime:null,factoryStart:null,factoryEnd:null,factoryRun:!1},p.dependencies&&p.reload!==!0)return e.indexOf(":")!==-1?c++:u++,m;s!=null&&s!==0&&(p.refcount+=s);var _=n.map(ae);if(p.factory=o,p.dependencies=_,p.context=l,p.special=i,(p.nonJSDeps||he(p))&&(p.nonJSDeps=!1,z(p)),Ce(p),r.length>0){var f=r;r=[];var g=!ye(p)&&t.ScheduleJSWork?t.ScheduleJSWork:Ie;g(function(){if(I){for(var e=0;e<f.length;e++)A.call(null,f[e].id);f.length=0}else for(;f.length>0;)A.call(null,f.pop().id)})()}return m}function ae(e){var t=o[e];return t||(t=ie(e,0),o[e]=t,t)}function ie(e,t,n){var r={id:e,refcount:t,exports:n!=null?n:null,defaultExport:n!=null?n:v,factory:void 0,factoryLength:-1,factoryFinished:!1,dependencies:void 0,depPosition:0,context:void 0,special:0,hasError:!1,error:null,ranRecursiveSideEffects:!1,sideEffectDependencyException:null,nextDepWaitingHead:null,nextDepWaitingNext:null,tarjanGeneration:-1,tarjanLow:0,tarjanIndex:0,tarjanOnStack:!1,nonJSDeps:!1};return r}function le(e){if(o[e]){var t=o[e];if(o[e]=null,t.dependencies)for(var n=0;n<t.dependencies.length;n++){var r=t.dependencies[n];r.refcount--===1&&le(r.id)}}}function se(e,t,n,r){n===void 0&&(n=null),r===void 0&&(r=0);var o="__requireLazy__x__"+i++;return oe("__requireLazy__"+o,e,Te()(t,"requireLazy",{propagationType:0}),r|d|f,n,1)}function ue(e){return"__mod__"+(e!=null?e+"__":"")+i++}function ce(e,t,n){if(n.tarjanGeneration!=l&&(n.tarjanGeneration=l,n.tarjanLow=n.tarjanIndex=s++,n.tarjanOnStack=!0,t.push(n)),n.dependencies!=null)for(var r=n.depPosition;r<n.dependencies.length;r++){var o=n.dependencies[r];o.tarjanGeneration!=l?(ce(e,t,o),n.tarjanLow=Math.min(n.tarjanLow,o.tarjanLow)):o.tarjanOnStack&&(n.tarjanLow=Math.min(n.tarjanLow,o.tarjanIndex))}if(n.tarjanLow==n.tarjanIndex){var a=[],i;do if(i=t.pop(),i.tarjanOnStack=!1,a.push(i),n==t[0]&&i!=n&&i.dependencies!=null)for(var u=i.depPosition;u<i.dependencies.length;u++){var c=i.dependencies[u];!pe(c)&&e.indexOf(c)===-1&&t.indexOf(c)===-1&&a.indexOf(c)===-1&&e.push(c)}while(i!=n)}}function de(e){var t=e.dependencies;if(!t)throw E("Called _replaceCycleLinkWithSCCDeps on an undefined module");l++,ce(t,[],e),e.depPosition++,Ce(e)}function me(e,t){for(var n=t;n.dependencies&&n.depPosition!=n.dependencies.length;){n=n.dependencies[n.depPosition];if(n==e){de(e);return}}e.nextDepWaitingNext=t.nextDepWaitingHead,t.nextDepWaitingHead=e}function pe(e){return e.dependencies!=null&&e.depPosition>=e.dependencies.length}function _e(e){e.depPosition++,Ce(e)}function fe(e){var t=e.nextDepWaitingHead;for(e.nextDepWaitingHead=null;t!=null;){var n=t;n.nonJSDeps&&z(e),t=n.nextDepWaitingNext,n.nextDepWaitingNext=null;var r=!o[n.id];r||_e(n)}}function ge(e){return e.special&d}function he(e){return e.special&f}function ye(e){return e.special&C}function Ce(e){for(;e.dependencies!=null&&e.depPosition<e.dependencies.length;){var t=e.dependencies[e.depPosition],n=pe(t);if(!n&&e!=t){me(e,t);return}e.depPosition++}ge(e)&&r.push(e),e.nextDepWaitingHead!==null&&fe(e)}function be(e){if(e.sideEffectDependencyException!=null)throw e.sideEffectDependencyException;if(!e.ranRecursiveSideEffects){e.ranRecursiveSideEffects=!0;var t=e.dependencies;if(t)for(var n=0;n<t.length;n++){var r=t[n];try{be(r)}catch(t){throw e.sideEffectDependencyException=t,t}if(r.special&p)try{A.call(null,r.id)}catch(t){throw e.sideEffectDependencyException=t,t}}}}function ve(e,t){o[e]=ie(e,0,t),a[e]={id:e,dependencies:[],category:0,factoryLengthAccessTime:null,factoryTime:null,factoryStart:null,factoryEnd:null,factoryRun:!1}}ve("module",0),ve("exports",0),ve("define",oe),ve("global",t),ve("require",A),ve("requireInterop",A),ve("importDefault",F),ve("importNamespace",O),ve("requireDynamic",Se),ve("requireLazy",se),ve("requireWeak",Re),ve("ifRequired",Le),ve("ifRequireable",Ee),e=[A.call(null,"global"),A.call(null,"require"),A.call(null,"requireDynamic"),A.call(null,"requireLazy"),A.call(null,"requireInterop"),null],n=[A.call(null,"global"),A.call(null,"require"),A.call(null,"importDefault"),A.call(null,"importNamespace"),A.call(null,"requireLazy"),A.call(null,"requireInterop"),null],oe.amd={},t.define=oe,t.require=A,t.requireInterop=A,t.importDefault=F,t.importNamespace=O,t.requireDynamic=Se,t.requireLazy=se,t.__onBeforeModuleFactory=null,t.__onAfterModuleFactory=null;function Se(e,t){throw new ReferenceError("requireDynamic is not defined")}function Re(e,t){Le.call(null,e,function(e){t(e)},function(){oe("__requireWeak__"+e+"__"+i++,["__isRequired__"+e],Te()(function(){return t(w(o[e]))},"requireWeak"),d,null,1)})}function Le(e,t,n){var r=o[e];if(r&&r.factoryFinished){if(typeof t=="function")return t(w(r))}else if(typeof n=="function")return n()}function Ee(e,t,n){var r=o[e];if(r&&r.nonJSDeps&&pe(r)){if(typeof t=="function")return t(A.call(null,e))}else if(typeof n=="function")return n()}var ke={getDupCount:function(){return[u,c]},getModules:function(){var e={};for(var t in o)o[t]&&Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t]);return e},modulesMap:o,debugUnresolvedDependencies:L};function Ie(e){return e}function Te(){var e=t.TimeSlice&&t.TimeSlice.guard?t.TimeSlice.guard:Ie;return function(){return e.apply(void 0,arguments)}}ve("__getTotalRequireCalls",H),ve("__getModuleTimeDetails",G),ve("__debug",ke),t.__d=function(e,t,n,r){Te()(function(){oe(e,t,n,(r!=null?r:m)|_,null,null,null)},"define "+e,{root:!0})()};function De(e,t){return!0}if(t.__d_stub){for(var xe=0;xe<t.__d_stub.length;xe++)t.__d.apply(null,t.__d_stub[xe]);delete t.__d_stub}if(t.__rl_stub){for(var $e=0;$e<t.__rl_stub.length;$e++)se.apply(null,t.__rl_stub[$e]);delete t.__rl_stub}var Pe=function(){};t.$RefreshReg$=Pe,t.$RefreshSig$=function(){return function(e){return e}}})(typeof this!="undefined"?this:typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{});
|
|
65
|
+
(function(){if(typeof globalThis=="undefined"){var e=typeof global!="undefined"?global:typeof window!="undefined"?window:typeof this!="undefined"?this:typeof self!="undefined"?self:{};e.globalThis=e}})();
|
|
66
|
+
(function(e){var t=e.performance;t&&t.setResourceTimingBufferSize&&(t.setResourceTimingBufferSize(2500),t.onresourcetimingbufferfull=function(){e.__isresourcetimingbufferfull=!0},t.setResourceTimingBufferSize=function(){})})(typeof this=="object"?this:typeof global=="object"?global:typeof window=="object"?window:typeof self=="object"?self:{});
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
__d("FBJSON",[],(function(t,n,r,o,a,i){var e=JSON.parse,l=JSON.stringify;i.parse=e,i.stringify=l}),66);
|
|
70
|
+
__d("Env",[],(function(t,n,r,o,a,i){var e={ajaxpipe_token:null,compat_iframe_token:null,iframeKey:"",iframeTarget:"",iframeToken:"",isCQuick:!1,jssp_header_sent:!1,jssp_targeting_enabled:!1,loadHyperion:!1,start:Date.now(),nocatch:!1,ig_server_override:"",barcelona_server_override:"",ig_mqtt_wss_endpoint:"",ig_mqtt_polling_endpoint:""};t.Env&&Object.assign(e,t.Env),t.Env=e;var l=e;i.default=l}),66);
|
|
71
|
+
__d("fb-error-lite",[],(function(t,n,r,o,a,i){"use strict";var e={PREVIOUS_FILE:1,PREVIOUS_FRAME:2,PREVIOUS_DIR:3,FORCED_KEY:4};function l(t){var n=new Error(t);if(n.stack===void 0)try{throw n}catch(e){}n.messageFormat=t;for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return n.messageParams=o.map(function(e){return String(e)}),n.taalOpcodes=[e.PREVIOUS_FRAME],n}var s={err:l,TAALOpcode:e};i.default=s}),66);
|
|
72
|
+
__d("sprintf",[],(function(t,n,r,o,a,i){"use strict";function e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0;return e.replace(/%s/g,function(){return String(n[o++])})}i.default=e}),66);
|
|
73
|
+
__d("invariant",["Env","fb-error-lite","sprintf"],(function(t,n,r,o,a,i,l){"use strict";var e;function s(e,t){if(!e){for(var n=t,o=arguments.length,a=new Array(o>2?o-2:0),i=2;i<o;i++)a[i-2]=arguments[i];if(typeof n=="number"){var l=u(n,a),s=l.decoderLink,c=l.message;n=c,a.unshift(s)}else if(n===void 0){n="Invariant: ";for(var d=0;d<a.length;d++)n+="%s,"}var m=n,p=new Error(m);throw p.name="Invariant Violation",p.messageFormat=n,p.messageParams=a.map(function(e){return String(e)}),p.taalOpcodes=[r("fb-error-lite").TAALOpcode.PREVIOUS_FRAME],p.stack,p}}function u(t,n){var o="Minified invariant #"+t+"; %s";n.length>0&&(o+=" Params: "+n.map(function(e){return"%s"}).join(", "));var a=(e||(e=r("Env"))).show_invariant_decoder===!0?"visit "+c(t,n)+" to see the full message.":"";return{message:o,decoderLink:a}}function c(e,t){var n="https://www.internalfb.com/intern/invariant/"+e+"/";return t.length>0&&(n+="?"+t.map(function(e,t){return"args["+t+"]="+encodeURIComponent(String(e))}).join("&")),n}l.default=s}),98);
|
|
74
|
+
__d("ArbiterToken",["invariant"],(function(t,n,r,o,a,i,l,s){"use strict";var e=(function(){function e(e,t){this.unsubscribe=function(){for(var e=0;e<this.$2.length;e++)this.$2[e].remove();this.$2.length=0},this.$1=e,this.$2=t}var t=e.prototype;return t.isForArbiterInstance=function(t){return this.$1||s(0,2506),this.$1===t},e})();l.default=e}),98);
|
|
75
|
+
__d("performance",[],(function(t,n,r,o,a,i){"use strict";var e=t.performance||t.msPerformance||t.webkitPerformance||{},l=e;i.default=l}),66);
|
|
76
|
+
__d("performanceNow",["performance"],(function(t,n,r,o,a,i,l){var e,s;if((e||(e=r("performance"))).now)s=function(){return(e||(e=r("performance"))).now()};else{var u=t._cstart,c=Date.now(),d=typeof u=="number"&&u<c?u:c,m=0;s=function(){var e=Date.now(),t=e-d;return t<m&&(d-=m-t,t=e-d),m=t,t}}var p=s;l.default=p}),98);
|
|
77
|
+
__d("removeFromArray",[],(function(t,n,r,o,a,i){"use strict";function e(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1)}i.default=e}),66);
|
|
78
|
+
__d("fb-error",["performanceNow","removeFromArray"],(function(t,n,r,o,a,i){"use strict";var e,l={PREVIOUS_FILE:1,PREVIOUS_FRAME:2,PREVIOUS_DIR:3,FORCED_KEY:4};function s(e){var t=new Error(e);if(t.stack===void 0)try{throw t}catch(e){}t.messageFormat=e;for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.messageParams=r.map(function(e){return String(e)}),t.taalOpcodes=[l.PREVIOUS_FRAME],t}var u=!1,c={errorListener:function(n){var e=t.console,r=e[n.type]?n.type:"error";if(n.type==="fatal"||r==="error"&&!u){var o=n.message;e.error("ErrorUtils caught an error:\n\n"+o+"\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs.",n),u=!0}}},d={skipDupErrorGuard:!1},m={config:d,setup:_},p=!1;function _(e){p===!1&&(p=!0,m.config=Object.freeze(e))}var f={access_token:null},g=6,h=6e4,y=10*h,C=new Map,b=0;function v(){var t=(e||(e=n("performanceNow")))();if(t>b+h){var r=t-y;for(var o of C){var a=o[0],i=o[1];i.lastAccessed<r&&C.delete(a)}b=t}}function S(t){v();var r=(e||(e=n("performanceNow")))(),o=C.get(t);if(o==null)return C.set(t,{dropped:0,logged:[r],lastAccessed:r}),1;var a=o.dropped,i=o.logged;for(o.lastAccessed=r;i[0]<r-h;)i.shift();return i.length<g?(o.dropped=0,i.push(r),a+1):(o.dropped++,null)}var R={shouldLog:function(t){return S(t.hash)}},L="RE_EXN_ID";function E(e){var t=null;return e==null||typeof e!="object"?t=s("Non-object thrown: %s",String(e)):Object.prototype.hasOwnProperty.call(e,L)?t=s("Rescript exception thrown: %s",JSON.stringify(e)):typeof(e==null?void 0:e.then)=="function"?t=s("Promise thrown: %s",JSON.stringify(e)):typeof e.message!="string"?t=s("Non-error thrown: %s, keys: %s",String(e),JSON.stringify(Object.keys(e).sort())):e.messageFormat!=null&&typeof e.messageFormat!="string"?t=s("Error with non-string messageFormat thrown: %s, %s, keys: %s",String(e.message),String(e),JSON.stringify(Object.keys(e).sort())):Object.isExtensible&&!Object.isExtensible(e)&&(t=s("Non-extensible thrown: %s",String(e.message))),t!=null?(t.taalOpcodes=t.taalOpcodes||[],t.taalOpcodes.push(l.PREVIOUS_FRAME),t):e}var k=typeof window=="undefined"?"<self.onerror>":"<window.onerror>",I;function T(e){var t,n=e.error!=null?E(e.error):s(e.message||"");n.fileName==null&&e.filename!=null&&(n.fileName=e.filename),n.line==null&&e.lineno!=null&&(n.line=e.lineno),n.column==null&&e.colno!=null&&(n.column=e.colno),n.guardList=[k],n.loggingSource="ONERROR",(t=I)===null||t===void 0||t.reportError(n)}var D={setup:function(n){typeof t.addEventListener=="function"&&I==null&&(I=n,t.addEventListener("error",T))}},x=[],$={pushGuard:function(t){x.unshift(t)},popGuard:function(){x.shift()},inGuard:function(){return x.length!==0},cloneGuardList:function(){return x.map(function(e){return e.name})},findDeferredSource:function(){for(var e of x)if(e.deferredSource!=null)return e.deferredSource}};function P(e){return e.type!=null?e.type:e.loggingSource=="GUARDED"||e.loggingSource=="ERROR_BOUNDARY"||e.name=="SyntaxError"?"fatal":e.loggingSource=="ONERROR"&&e.message.indexOf("ResizeObserver loop")>=0||e.stack!=null&&e.stack.indexOf("chrome-extension://")>=0?"warn":"error"}var N=[],M=(function(){function e(){this.metadata=[].concat(N)}var t=e.prototype;return t.addEntries=function(){var e;return(e=this.metadata).push.apply(e,arguments),this},t.addEntry=function(t,n,r){return this.metadata.push([t,n,r]),this},t.isEmpty=function(){return this.metadata.length===0},t.clearEntries=function(){this.metadata=[]},t.format=function(){var e=[];return this.metadata.forEach(function(t){if(t&&t.length){var n=t.map(function(e){return e!=null?String(e).replace(/:/g,"_"):""}).join(":");e.push(n)}}),e},t.getAll=function(){return this.metadata},e.addGlobalMetadata=function(t,n,r){N.push([t,n,r])},e.getGlobalMetadata=function(){return N},e.unsetGlobalMetadata=function(t,n){N=N.filter(function(e){return!(Array.isArray(e)&&e[0]===t&&e[1]===n)})},e})(),w={debug:1,info:2,warn:3,error:4,fatal:5};function A(e,t){var n,r;if(!Object.isFrozen(e)){t.type&&(!e.type||w[e.type]>w[t.type])&&(e.type=t.type);var o=t.metadata;if(o!=null){var a,i=(a=e.metadata)!==null&&a!==void 0?a:new M;o!=null&&i.addEntries.apply(i,o.getAll()),e.metadata=i}t.project!=null&&(e.project=t.project),t.errorName!=null&&(e.errorName=t.errorName),t.componentStack!=null&&(e.componentStack=t.componentStack),t.deferredSource!=null&&(e.deferredSource=t.deferredSource),t.blameModule!=null&&(e.blameModule=t.blameModule),t.loggingSource!=null&&(e.loggingSource=t.loggingSource);var l=(n=e.messageFormat)!==null&&n!==void 0?n:e.message,s=(r=e.messageParams)!==null&&r!==void 0?r:[];if(l!==t.messageFormat&&t.messageFormat!=null){var u;l+=" [Caught in: "+t.messageFormat+"]",s.push.apply(s,(u=t.messageParams)!==null&&u!==void 0?u:[])}e.messageFormat=l,e.messageParams=s;var c=t.forcedKey,d=e.forcedKey,m=c!=null&&d!=null?c+"_"+d:c!=null?c:d;e.forcedKey=m}}function F(e){var t;return O((t=e.messageFormat)!==null&&t!==void 0?t:e.message,e.messageParams||[])}function O(e,t){var n=0,r=String(e),o=r.replace(/%s/g,function(){return n<t.length?t[n++]:"NOPARAM"});return n<t.length&&(o+=" PARAMS"+JSON.stringify(t.slice(n))),o}function B(e){return(e!=null?e:[]).map(function(e){return String(e)})}var W={aggregateError:A,toReadableMessage:F,toStringParams:B},q=5,U=[];function V(e){U.push(e),U.length>q&&U.shift()}function H(e){var t=e.getAllResponseHeaders();if(t!=null&&t.indexOf("X-FB-Debug")>=0){var n=e.getResponseHeader("X-FB-Debug");n&&V(n)}}function G(){return U}var z={add:V,addFromXHR:H,getAll:G},j="abcdefghijklmnopqrstuvwxyz012345";function K(){for(var e=0,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var o of n)if(o!=null)for(var a=o.length,i=0;i<a;i++)e=(e<<5)-e+o.charCodeAt(i);for(var l="",s=0;s<6;s++)l=j.charAt(e&31)+l,e>>=5;return l}var Q=[/\(([^\s\)\()]+):(\d+):(\d+)\)$/,/@([^\s\)\()]+):(\d+):(\d+)$/,/^([^\s\)\()]+):(\d+):(\d+)$/,/^at ([^\s\)\()]+):(\d+):(\d+)$/],X=/^\w+:\s.*?\n/g;Error.stackTraceLimit!=null&&Error.stackTraceLimit<80&&(Error.stackTraceLimit=80);function Y(e){var t=e.message,n=e.name,r=e.stack;if(r==null)return null;if(n!=null&&t!=null&&t!==""){var o=n+": "+t+"\n";if(r.startsWith(o))return r.substr(o.length);if(r===n+": "+t)return null}if(n!=null){var a=n+"\n";if(r.startsWith(a))return r.substr(a.length)}if(t!=null&&t!==""){var i=": "+t+"\n",l=r.indexOf(i),s=r.substring(0,l);if(/^\w+$/.test(s))return r.substring(l+i.length)}return r.replace(X,"")}function J(e){var t=e.trim(),n=t,r,o,a;if(t.includes("charset=utf-8;base64,"))n="<inlined-file>";else{var i;for(var l of Q)if(i=t.match(l),i!=null)break;i!=null&&i.length===4?(r=i[1],o=parseInt(i[2],10),a=parseInt(i[3],10),n=t.substring(0,t.length-i[0].length)):n=t,n=n.replace(/^at /,"").trim()}var s={identifier:n,script:r,line:o,column:a};return s.text=ne(s),s}function Z(e){return e==null||e===""?[]:e.split(/\n\n/)[0].split("\n").map(J)}function ee(e){var t=Y(e);return Z(t)}function te(e){if(e==null||e==="")return null;var t=e.split("\n");return t.splice(0,1),t.map(function(e){return e.trim()})}function ne(e){var t=e.column,n=e.identifier,r=e.line,o=e.script,a=" at "+(n!=null?n:"<unknown>");return o!=null&&r!=null&&t!=null&&(a+=" ("+o+":"+r+":"+t+")"),a}function re(r){var o,a,i,s,u,c,d,m,p,_,f=ee(r),g=(o=r.taalOpcodes)!==null&&o!==void 0?o:[],h=r.framesToPop;if(h!=null)for(h=Math.min(h,f.length);h-- >0;)g.unshift(l.PREVIOUS_FRAME);var y=(a=r.messageFormat)!==null&&a!==void 0?a:r.message,C=((i=r.messageParams)!==null&&i!==void 0?i:[]).map(function(e){return String(e)}),b=te(r.componentStack),v=b==null?null:b.map(J),S=r.metadata?r.metadata.format():new M().format();S.length===0&&(S=void 0);var R=f.map(function(e){return e.text}).join("\n"),L=(s=r.errorName)!==null&&s!==void 0?s:r.name,E=P(r),k=r.loggingSource,I=r.project,T=(u=r.lineNumber)!==null&&u!==void 0?u:r.line,D=(c=r.columnNumber)!==null&&c!==void 0?c:r.column,x=(d=r.fileName)!==null&&d!==void 0?d:r.sourceURL,$=f.length>0;$&&T==null&&(T=f[0].line),$&&D==null&&(D=f[0].column),$&&x==null&&(x=f[0].script);var N={blameModule:r.blameModule,cause:r.cause,column:D==null?null:String(D),clientTime:Math.floor(Date.now()/1e3),componentStackFrames:v,deferredSource:r.deferredSource!=null?re(r.deferredSource):null,extra:(m=r.extra)!==null&&m!==void 0?m:{},fbtrace_id:r.fbtrace_id,guardList:(p=r.guardList)!==null&&p!==void 0?p:[],hash:K(L,R,E,I,k),isNormalizedError:!0,line:T==null?null:String(T),loggingSource:k,message:W.toReadableMessage(r),messageFormat:y,messageParams:C,metadata:S,name:L,page_time:Math.floor((e||(e=n("performanceNow")))()),project:I,reactComponentStack:b,script:x,serverHash:r.serverHash,stack:R,stackFrames:f,type:E,xFBDebug:z.getAll(),tags:(_=r.tags)!==null&&_!==void 0?_:[],operation:r.operation};r.forcedKey!=null&&(N.forcedKey=r.forcedKey),g.length>0&&(N.taalOpcodes=g);var w=t.location;w&&(N.windowLocationURL=w.href);for(var A in N)N[A]==null&&delete N[A];return N}function oe(e){return e!=null&&typeof e=="object"&&e.isNormalizedError===!0?e:null}var ae={formatStackFrame:ne,normalizeError:re,ifNormalizedError:oe},ie="<global.react>",le=[],se=[],ue=50,ce=!1,de={history:se,addListener:function(t,n){n===void 0&&(n=!1),le.push(t),n||se.forEach(function(e){var n;return t(e,(n=e.loggingSource)!==null&&n!==void 0?n:"DEPRECATED")})},unshiftListener:function(t){le.unshift(t)},removeListener:function(t){n("removeFromArray")(le,t)},reportError:function(t){var e=ae.normalizeError(t);de.reportNormalizedError(e)},reportNormalizedError:function(t){if(ce)return!1;var e=$.cloneGuardList();if(t.componentStackFrames&&e.unshift(ie),e.length>0&&(t.guardList=e),t.deferredSource==null){var n=$.findDeferredSource();n!=null&&(t.deferredSource=ae.normalizeError(n))}se.length>ue&&se.splice(ue/2,1),se.push(t),ce=!0;for(var r=0;r<le.length;r++)try{var o;le[r](t,(o=t.loggingSource)!==null&&o!==void 0?o:"DEPRECATED")}catch(e){}return ce=!1,!0}};de.addListener(c.errorListener);var me="<anonymous guard>",pe=!1,_e={applyWithGuard:function(t,n,r,o){if(m.config.skipDupErrorGuard&&"__isMetaErrorGuarded"in t)return t.apply(n,r);if($.pushGuard({name:((o==null?void 0:o.name)!=null?o.name:null)||(t.name?"func_name:"+t.name:null)||me,deferredSource:o==null?void 0:o.deferredSource}),pe)try{return t.apply(n,r)}finally{$.popGuard()}try{return Function.prototype.apply.call(t,n,r)}catch(n){try{var e,a=o!=null?o:babelHelpers.extends({},null),i=a.deferredSource,l=a.onError,s=a.onNormalizedError,u=E(n),c={deferredSource:i,loggingSource:"GUARDED",project:(e=o==null?void 0:o.project)!==null&&e!==void 0?e:"ErrorGuard",type:o==null?void 0:o.errorType};W.aggregateError(u,c);var d=ae.normalizeError(u);u==null&&t&&(d.extra[t.toString().substring(0,100)]="function",r!=null&&r.length&&(d.extra[Array.from(r).toString().substring(0,100)]="args")),d.guardList=$.cloneGuardList(),l&&l(u),s&&s(d),de.reportNormalizedError(d)}catch(e){}}finally{$.popGuard()}},guard:function(t,n){function e(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return _e.applyWithGuard(t,this,r,n)}return e.__isMetaErrorGuarded=!0,t.__SMmeta&&(e.__SMmeta=t.__SMmeta),e},inGuard:function(){return $.inGuard()},skipGuardGlobal:function(t){pe=t}},fe=1024,ge=[],he=0;function ye(e){return String(e)}function Ce(e){return e==null?null:String(e)}function be(e,t){var n={};return t&&t.forEach(function(e){n[e]=!0}),Object.keys(e).forEach(function(t){e[t]?n[t]=!0:n[t]&&delete n[t]}),Object.keys(n)}function ve(e){return(e!=null?e:[]).map(function(e){return{column:Ce(e.column),identifier:e.identifier,line:Ce(e.line),script:e.script}})}function Se(e){var t=String(e);return t.length>fe?t.substring(0,fe-3)+"...":t}function Re(e,t){var n,r,o,a,i={appId:Ce(t.appId),cavalry_lid:t.cavalry_lid,access_token:f.access_token,ancestor_hash:e.hash,bundle_variant:(n=t.bundle_variant)!==null&&n!==void 0?n:null,clientTime:ye(e.clientTime),column:e.column,componentStackFrames:ve(e.componentStackFrames),events:e.events,extra:be(e.extra,t.extra),forcedKey:e.forcedKey,frontend_env:(r=t.frontend_env)!==null&&r!==void 0?r:null,guardList:e.guardList,line:e.line,loggingFramework:t.loggingFramework,messageFormat:Se(e.messageFormat),messageParams:e.messageParams.map(Se),name:e.name,sample_weight:Ce(t.sample_weight),script:e.script,site_category:t.site_category,stackFrames:ve(e.stackFrames),type:e.type,page_time:Ce(e.page_time),project:e.project,push_phase:t.push_phase,report_source:t.report_source,report_source_ref:t.report_source_ref,rollout_hash:(o=t.rollout_hash)!==null&&o!==void 0?o:null,script_path:t.script_path,server_revision:Ce(t.server_revision),spin:Ce(t.spin),svn_rev:String(t.client_revision),additional_client_revisions:Array.from((a=t.additional_client_revisions)!==null&&a!==void 0?a:[]).map(ye),taalOpcodes:e.taalOpcodes==null?null:e.taalOpcodes.map(function(e){return e}),web_session_id:t.web_session_id,version:"3",xFBDebug:e.xFBDebug,tags:e.tags},l=e.blameModule,s=e.deferredSource;return l!=null&&(i.blameModule=String(l)),s&&s.stackFrames&&(i.deferredSource={stackFrames:ve(s.stackFrames)}),e.metadata&&(i.metadata=e.metadata),e.loadingUrls&&(i.loadingUrls=e.loadingUrls),e.serverHash!=null&&(i.serverHash=e.serverHash),e.windowLocationURL!=null&&(i.windowLocationURL=e.windowLocationURL),e.loggingSource!=null&&(i.loggingSource=e.loggingSource),i}function Le(e,t,n){var r;if(he++,t.sample_weight===0)return!1;var o=R.shouldLog(e);if(o==null||(r=t.projectBlocklist)!==null&&r!==void 0&&r.includes(e.project))return!1;var a=Re(e,t);return Object.assign(a,{ancestors:ge.slice(),clientWeight:ye(o),page_position:ye(he)}),ge.length<15&&["fatal","error"].includes(e.type)&&ge.push(e.hash),n(a),!0}var Ee={createErrorPayload:Re,postError:Le},ke=null,Ie=!1;function Te(e){if(ke!=null){var t=ke,n=e.reason,r,o=E(n),a=null;if(n!==o&&typeof n=="object"&&n!==null){if(r=Object.keys(n).sort().slice(0,3),typeof n.message!="string"&&typeof n.messageFormat=="string"&&(n.message=n.messageFormat,o=E(n)),typeof n.message!="string"&&typeof n.errorMsg=="string")if(/^\s*\<!doctype/i.test(n.errorMsg)){var i=/<title>([^<]+)<\/title>(?:(?:.|\n)*<h1>([^<]+)<\/h1>)?/im.exec(n.errorMsg);if(i){var l,u;o=s('HTML document with title="%s" and h1="%s"',(l=i[1])!==null&&l!==void 0?l:"",(u=i[2])!==null&&u!==void 0?u:"")}else o=s("HTML document sanitized")}else/^\s*<\?xml/i.test(n.errorMsg)?o=s("XML document sanitized"):(n.message=n.errorMsg,o=E(n));o!==n&&typeof n.name=="string"&&(a=n.name),typeof n.name!="string"&&typeof n.errorCode=="string"&&(a="UnhandledRejectionWith_errorCode_"+n.errorCode),typeof n.name!="string"&&typeof n.error=="number"&&(a="UnhandledRejectionWith_error_"+String(n.error))}o.loggingSource="ONUNHANDLEDREJECTION";try{a=o===n&&a!=null&&a!==""?a:typeof(n==null?void 0:n.name)=="string"&&n.name!==""?n.name:r!=null&&r.length>0?"UnhandledRejectionWith_"+r.join("_"):"UnhandledRejection_"+(n===null?"null":typeof n),o.name=a}catch(e){}try{var c=n==null?void 0:n.stack;(typeof c!="string"||c==="")&&(c=o.stack),(typeof c!="string"||c==="")&&(c=s("").stack),o.stack=o.name+": "+o.message+"\n"+c.split("\n").slice(1).join("\n")}catch(e){}try{var d=e.promise;o.stack=o.stack+(d!=null&&typeof d.settledStack=="string"?"\n at <promise_settled_stack_below>\n"+d.settledStack:"")+(d!=null&&typeof d.createdStack=="string"?"\n at <promise_created_stack_below>\n"+d.createdStack:"")}catch(e){}try{var m=e.promise;"__isPromiseWithTracing"in m&&m.__isPromiseWithTracing===!0&&m.deferredError!=null&&(o.deferredSource=E(m.deferredError))}catch(e){}t.reportError(o),e.preventDefault()}}function De(e){ke=e,typeof t.addEventListener=="function"&&!Ie&&(Ie=!0,t.addEventListener("unhandledrejection",Te))}var xe={onunhandledrejection:Te,setup:De},$e={preSetup:function(t){(t==null||t.ignoreOnError!==!0)&&D.setup(de),(t==null||t.ignoreOnUnahndledRejection!==!0)&&xe.setup(de)},setup:function(t,n,r){de.addListener(function(e){var o,a=babelHelpers.extends({},t,(o=r==null?void 0:r())!==null&&o!==void 0?o:{});Ee.postError(e,a,n)})}},Pe=20,Ne=(function(){function e(e,t){var n=this;t===void 0&&(t=[]),this.FATAL=function(e){for(var t=e.join("%s"),r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];n.fatal.apply(n,[t].concat(o))},this.MUSTFIX=function(e){for(var t=n.getTagString()+e.join("%s"),r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];n.mustfix.apply(n,[t].concat(o))},this.WARN=function(e){for(var t=n.getTagString()+e.join("%s"),r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];n.warn.apply(n,[t].concat(o))},this.INFO=function(e){for(var t=n.getTagString()+e.join("%s"),r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];n.info.apply(n,[t].concat(o))},this.DEBUG=function(e){for(var t=n.getTagString()+e.join("%s"),r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];n.debug.apply(n,[t].concat(o))},this.project=e,this.events=[],this.metadata=new M,this.taalOpcodes=[],this.loggerTags=new Set(t)}var t=e.prototype;return t.$1=function(n,r){for(var t=String(r),o=this.blameModule,a=this.events,i=this.forcedKey,s=this.metadata,u=this.project,c=this.error,d,m=arguments.length,p=new Array(m>2?m-2:0),_=2;_<m;_++)p[_-2]=arguments[_];if(this.normalizedError)d=babelHelpers.extends({},this.normalizedError,{messageFormat:this.normalizedError.messageFormat+" [Caught in: "+t+"]",messageParams:W.toStringParams([].concat(this.normalizedError.messageParams,p)),project:u,type:n,loggingSource:"FBLOGGER"}),d.message=W.toReadableMessage(d),i!=null&&(d.forcedKey=d.forcedKey!=null?i+"_"+d.forcedKey:i);else if(c)this.taalOpcodes.length>0&&new e("fblogger").blameToPreviousFrame().blameToPreviousFrame().warn("Blame helpers do not work with catching"),W.aggregateError(c,{messageFormat:t,messageParams:W.toStringParams(p),errorName:c.name,forcedKey:i,project:u,type:n,loggingSource:"FBLOGGER"}),d=ae.normalizeError(c);else{if(c=new Error(t),c.stack===void 0)try{throw c}catch(e){}c.messageFormat=t,c.messageParams=W.toStringParams(p),c.blameModule=o,c.forcedKey=i,c.project=u,c.type=n,c.loggingSource="FBLOGGER",c.taalOpcodes=[l.PREVIOUS_FRAME,l.PREVIOUS_FRAME].concat(this.taalOpcodes),d=ae.normalizeError(c),d.name="FBLogger"}if(!s.isEmpty())if(d.metadata==null)d.metadata=s.format();else{var f=d.metadata.concat(s.format()),g=new Set(f);d.metadata=Array.from(g.values())}if(a.length>0){if(d.events!=null){var h;(h=d.events).push.apply(h,a)}else d.events=[].concat(a);if(d.events!=null&&d.events.length>Pe){var y=d.events.length-Pe;d.events.splice(0,y+1,"<first "+y+" events omitted>")}}return d.tags=Array.from(this.loggerTags),de.reportNormalizedError(d),c},t.fatal=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.$1.apply(this,["fatal",t].concat(n))},t.mustfix=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.$1.apply(this,["error",t].concat(n))},t.warn=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.$1.apply(this,["warn",t].concat(n))},t.info=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.$1.apply(this,["info",t].concat(n))},t.debug=function(t){},t.mustfixThrow=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var o=this.$1.apply(this,["error",t].concat(n));o||(o=s("mustfixThrow does not support catchingNormalizedError"),o.taalOpcodes=o.taalOpcodes||[],o.taalOpcodes.push(l.PREVIOUS_FRAME));try{o.message=W.toReadableMessage(o)}catch(e){}throw o.is_js_error=!0,o},t.catching=function(n){return n instanceof Error?this.error=n:new e("fblogger").blameToPreviousFrame().warn("Catching non-Error object is not supported"),this},t.catchingNormalizedError=function(t){return this.normalizedError=t,this},t.event=function(t){return this.events.push(t),this},t.blameToModule=function(t){return this.blameModule=t,this},t.blameToPreviousFile=function(){return this.taalOpcodes.push(l.PREVIOUS_FILE),this},t.blameToPreviousFrame=function(){return this.taalOpcodes.push(l.PREVIOUS_FRAME),this},t.blameToPreviousDirectory=function(){return this.taalOpcodes.push(l.PREVIOUS_DIR),this},t.addToCategoryKey=function(t){return this.forcedKey=t,this},t.addMetadata=function(t,n,r){return this.metadata.addEntry(t,n,r),this},t.tags=function(n){var t=n.concat(Array.from(this.loggerTags)),r=new e(this.project,t);return this.events.forEach(function(e){return r.event(e)}),this.metadata.getAll().forEach(function(e){var t=e[0],n=e[1],o=e[2];return r.addMetadata(t,n,o)}),r},t.getTagString=function(){var e=this.loggerTags.size>0?"["+Array.from(this.loggerTags).join("|")+"] ":"";return e},e})(),Me=function(t,n){var e=new Ne(t);return n!=null?e.event(t+"."+n):e};Me.addGlobalMetadata=function(e,t,n){M.addGlobalMetadata(e,t,n)};var we="<CUSTOM_NAME:",Ae=">";function Fe(e,t){if(e!=null&&t!=null)try{Object.defineProperty(e,"name",{value:we+" "+t+Ae})}catch(e){}return e}var Oe={blameToPreviousFile:function(t){var e;return t.taalOpcodes=(e=t.taalOpcodes)!==null&&e!==void 0?e:[],t.taalOpcodes.push(l.PREVIOUS_FILE),t},blameToPreviousFrame:function(t){var e;return t.taalOpcodes=(e=t.taalOpcodes)!==null&&e!==void 0?e:[],t.taalOpcodes.push(l.PREVIOUS_FRAME),t},blameToPreviousDirectory:function(t){var e;return t.taalOpcodes=(e=t.taalOpcodes)!==null&&e!==void 0?e:[],t.taalOpcodes.push(l.PREVIOUS_DIR),t}},Be={err:s,ErrorBrowserConsole:c,ErrorConfig:m,ErrorDynamicData:f,ErrorFilter:R,ErrorGlobalEventHandler:D,ErrorGuard:_e,ErrorGuardState:$,ErrorMetadata:M,ErrorNormalizeUtils:ae,ErrorPoster:Ee,ErrorPubSub:de,ErrorSerializer:W,ErrorSetup:$e,ErrorXFBDebug:z,FBLogger:Me,getErrorSafe:E,getSimpleHash:K,TAAL:Oe,TAALOpcode:l,renameFunction:Fe};a.exports=Be}),null);
|
|
79
|
+
__d("ErrorGuard",["fb-error"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("fb-error").ErrorGuard}),98);
|
|
80
|
+
__d("CallbackDependencyManager",["ErrorGuard"],(function(t,n,r,o,a,i){var e,l=(function(){"use strict";function t(){this.$1=new Map,this.$2=new Map,this.$3=1,this.$4=new Map}var r=t.prototype;return r.$5=function(t,n){for(var e=0,r=new Set,o=0,a=n.length;o<a;o++)r.add(n[o]);for(var i of r.keys())if(!this.$4.get(i)){e++;var l=this.$1.get(i);l===void 0&&(l=new Map,this.$1.set(i,l)),l.set(t,(l.get(t)||0)+1)}return e},r.$6=function(r){var t=this.$1.get(r);if(t)for(var o of t.entries()){var a=o[0],i=o[1]-1;t.set(a,i),i<=0&&t.delete(a);var l=this.$2.get(a);if(l!==void 0&&(l.$7--,l.$7<=0)){var s=l.$8;this.$2.delete(a),(e||(e=n("ErrorGuard"))).applyWithGuard(s,null,[])}}},r.addDependenciesToExistingCallback=function(t,n){var e=this.$2.get(t);if(!e)return null;var r=this.$5(t,n);return e.$7+=r,t},r.isPersistentDependencySatisfied=function(t){return!!this.$4.get(t)},r.satisfyPersistentDependency=function(t){this.$4.set(t,1),this.$6(t)},r.satisfyNonPersistentDependency=function(t){var e=this.$4.get(t)===1;e||this.$4.set(t,1),this.$6(t),e||this.$4.delete(t)},r.registerCallback=function(r,o){var t=this.$3;this.$3++;var a=this.$5(t,o);return a===0?((e||(e=n("ErrorGuard"))).applyWithGuard(r,null,[]),null):(this.$2.set(t,{$8:r,$7:a}),t)},t})();a.exports=l}),null);
|
|
81
|
+
__d("EventSubscription",[],(function(t,n,r,o,a,i){"use strict";var e=function(t){var e=this;this.remove=function(){e.subscriber&&(e.subscriber.removeSubscription(e),e.subscriber=null)},this.subscriber=t};i.default=e}),66);
|
|
82
|
+
__d("EmitterSubscription",["EventSubscription"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(t,n,r){var o;return o=e.call(this,t)||this,o.listener=n,o.context=r,o}return babelHelpers.inheritsLoose(t,e),t})(r("EventSubscription"));l.default=e}),98);
|
|
83
|
+
__d("EventSubscriptionVendor",["invariant"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(){this.$1={}}var t=e.prototype;return t.addSubscription=function(t,n){n.subscriber===this||l(0,2828),this.$1[t]||(this.$1[t]=[]);var e=this.$1[t].length;return this.$1[t].push(n),n.eventType=t,n.key=e,n},t.removeAllSubscriptions=function(t){t===void 0?this.$1={}:delete this.$1[t]},t.removeSubscription=function(t){var e=t.eventType,n=t.key,r=this.$1[e];r&&delete r[n]},t.getSubscriptionsForType=function(t){return this.$1[t]},e})();a.exports=e}),null);
|
|
84
|
+
__d("FBLogger",["fb-error"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("fb-error").FBLogger}),98);
|
|
85
|
+
__d("emptyFunction",[],(function(t,n,r,o,a,i){"use strict";function e(e){return function(){return e}}var l=function(){};l.thatReturns=e,l.thatReturnsFalse=e(!1),l.thatReturnsTrue=e(!0),l.thatReturnsNull=e(null),l.thatReturnsThis=function(){return this},l.thatReturnsArgument=function(e){return e};var s=l;i.default=s}),66);
|
|
86
|
+
__d("BaseEventEmitter",["EmitterSubscription","ErrorGuard","EventSubscriptionVendor","FBLogger","emptyFunction"],(function(t,n,r,o,a,i){var e,l=(function(){"use strict";function t(){this.$2=new(n("EventSubscriptionVendor")),this.$1=null}var r=t.prototype;return r.addListener=function(t,r,o){return this.$2.addSubscription(t,new(n("EmitterSubscription"))(this.$2,r,o))},r.removeListener=function(t){this.$2.removeSubscription(t)},r.once=function(t,n,r){var e=this;return this.addListener(t,function(){e.removeCurrentListener(),n.apply(r,arguments)})},r.removeAllListeners=function(t){this.$2.removeAllSubscriptions(t)},r.removeCurrentListener=function(){if(!this.$1)throw n("FBLogger")("emitter").mustfixThrow("Not in an emitting cycle; there is no current subscription");this.$2.removeSubscription(this.$1)},r.listeners=function(t){var e=this.$2.getSubscriptionsForType(t);return e?e.filter(n("emptyFunction").thatReturnsTrue).map(function(e){return e.listener}):[]},r.emit=function(t){var e=this.$2.getSubscriptionsForType(t);if(e){for(var n=Object.keys(e),r,o=0;o<n.length;o++){var a=n[o],i=e[a];if(i){if(this.$1=i,r==null){r=[i,t];for(var l=0,s=arguments.length<=1?0:arguments.length-1;l<s;l++)r[l+2]=l+1<1||arguments.length<=l+1?void 0:arguments[l+1]}else r[0]=i;this.__emitToSubscription.apply(this,r)}}this.$1=null}},r.__emitToSubscription=function(r,o){for(var t=arguments.length,a=new Array(t>2?t-2:0),i=2;i<t;i++)a[i-2]=arguments[i];(e||(e=n("ErrorGuard"))).applyWithGuard(r.listener,r.context,a,{name:"EventEmitter "+o+" event"})},t})();a.exports=l}),null);
|
|
87
|
+
__d("EventEmitter",["BaseEventEmitter"],(function(t,n,r,o,a,i,l){var e=(function(e){function t(){return e.apply(this,arguments)||this}return babelHelpers.inheritsLoose(t,e),t})(r("BaseEventEmitter"));l.default=e}),98);
|
|
88
|
+
__d("EventEmitterWithHolding",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(e,t){this.$2=e,this.$3=t,this.$1=null,this.$5=[],this.$4=0}var t=e.prototype;return t.addListener=function(t,n,r){return this.$2.addListener(t,n,r)},t.once=function(t,n,r){return this.$2.once(t,n,r)},t.addRetroactiveListener=function(t,n,r){var e=this.$2.addListener(t,n,r),o=this.$5;return o.push(!1),this.$4++,this.$3.emitToListener(t,n,r),this.$4--,o[o.length-1]&&e.remove(),o.pop(),e},t.removeAllListeners=function(t){this.$2.removeAllListeners(t)},t.removeCurrentListener=function(){if(this.$4){var e=this.$5;e[e.length-1]=!0}else this.$2.removeCurrentListener()},t.listeners=function(t){return this.$2.listeners(t)},t.emit=function(t){for(var e,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(e=this.$2).emit.apply(e,[t].concat(r))},t.emitAndHold=function(t){for(var e,n,r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];this.$1=(e=this.$3).holdEvent.apply(e,[t].concat(o)),(n=this.$2).emit.apply(n,[t].concat(o)),this.$1=null},t.releaseCurrentEvent=function(){this.$1!=null?this.$3.releaseEvent(this.$1):this.$4>0&&this.$3.releaseCurrentEvent()},t.releaseHeldEventType=function(t){this.$3.releaseEventType(t)},e})();i.default=e}),66);
|
|
89
|
+
__d("EventHolder",["invariant"],(function(t,n,r,o,a,i,l,s){"use strict";var e=(function(){function e(){this.$1={},this.$2=[]}var t=e.prototype;return t.holdEvent=function(t){this.$1[t]=this.$1[t]||[];for(var e=this.$1[t],n={eventType:t,index:e.length},r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return e.push(o),n},t.emitToListener=function(t,n,r){var e=this,o=this.$1[t];o&&o.forEach(function(o,a){o&&(e.$2.push({eventType:t,index:a}),n.apply(r,o),e.$2.pop())})},t.releaseCurrentEvent=function(){this.$2.length||s(0,1764),this.releaseEvent(this.$2[this.$2.length-1])},t.releaseEvent=function(t){delete this.$1[t.eventType][t.index]},t.releaseEventType=function(t){this.$1[t]=[]},e})();l.default=e}),98);
|
|
90
|
+
__d("Arbiter",["invariant","ArbiterToken","CallbackDependencyManager","ErrorGuard","EventEmitter","EventEmitterWithHolding","EventHolder"],(function(t,n,r,o,a,i,l,s){"use strict";var e;function u(e){return Array.isArray(e)?e:[e]}function c(e){return e instanceof d||e===d?e:d}var d=(function(){function t(){var e=new(r("EventEmitter"));this.$3=new m,this.$2=new(r("EventEmitterWithHolding"))(e,this.$3),this.$1=new(r("CallbackDependencyManager")),this.$4=[]}var n=t.prototype;return n.subscribe=function(t,n,o){var e=this;t=u(t),t.forEach(function(e){e&&typeof e=="string"||s(0,1966,e)}),typeof n=="function"||s(0,1967,n),o=o||"all",o==="new"||o==="all"||s(0,1968,o);var a=t.map(function(t){var r=function(o){return e.$5(n,t,o)};if(r.__SMmeta=n.__SMmeta,o==="new")return e.$2.addListener(t,r);e.$4.push({});var a=e.$2.addRetroactiveListener(t,r);return e.$4.pop(),a});return new(r("ArbiterToken"))(this,a)},n.$5=function(n,o,a){var t=this.$4[this.$4.length-1];if(t[o]!==!1){var i=(e||(e=r("ErrorGuard"))).applyWithGuard(n,null,[o,a]);i===!1&&this.$2.releaseCurrentEvent(),t[o]=i}},n.unsubscribeCurrentSubscription=function(){this.$2.removeCurrentListener()},n.releaseCurrentPersistentEvent=function(){this.$2.releaseCurrentEvent()},n.subscribeOnce=function(t,n,r){var e=this,o=this.subscribe(t,function(t,r){return e.unsubscribeCurrentSubscription(),n(t,r)},r);return o},n.unsubscribe=function(t){t.isForArbiterInstance(this)||s(0,1969),t.unsubscribe()},n.inform=function(t,n,r){var e=Array.isArray(t);t=u(t),r=r||"event";var o=r==="state"||r==="persistent";this.$4.push({});for(var a=0;a<t.length;a++){var i=t[a];i||s(0,1970,i),this.$3.setHoldingBehavior(i,r),this.$2.emitAndHold(i,n),this.$6(i,n,o)}var l=this.$4.pop();return e?l:l[t[0]]},n.query=function(t){var e=this.$3.getHoldingBehavior(t);!e||e==="state"||s(0,1971,t);var n=null;return this.$3.emitToListener(t,function(e){n=e}),n},n.registerCallback=function(t,n){return typeof t=="function"?this.$1.registerCallback(t,n):this.$1.addDependenciesToExistingCallback(t,n)},n.$6=function(t,n,r){n!==null&&(r?this.$1.satisfyPersistentDependency(t):this.$1.satisfyNonPersistentDependency(t))},t.subscribe=function(n,r,o){return t.prototype.subscribe.apply(c(this),arguments)},t.unsubscribeCurrentSubscription=function(){return t.prototype.unsubscribeCurrentSubscription.apply(c(this))},t.releaseCurrentPersistentEvent=function(){return t.prototype.releaseCurrentPersistentEvent.apply(c(this))},t.subscribeOnce=function(n,r,o){return t.prototype.subscribeOnce.apply(c(this),arguments)},t.unsubscribe=function(n){return t.prototype.unsubscribe.apply(c(this),arguments)},t.inform=function(n,r,o){return t.prototype.inform.apply(c(this),arguments)},t.informSingle=function(n,r,o){return t.prototype.inform.apply(c(this),arguments)},t.query=function(n){return t.prototype.query.apply(c(this),arguments)},t.registerCallback=function(n,r){return t.prototype.registerCallback.apply(c(this),arguments)},t.$6=function(n,r,o){return t.prototype.$6.apply(c(this),arguments)},t.$5=function(n,r,o){return t.prototype.$5.apply(c(this),arguments)},t})(),m=(function(e){function t(){var t;return t=e.call(this)||this,t.$ArbiterEventHolder1={},t}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.setHoldingBehavior=function(t,n){this.$ArbiterEventHolder1[t]=n},n.getHoldingBehavior=function(t){return this.$ArbiterEventHolder1[t]},n.holdEvent=function(n){var t=this.$ArbiterEventHolder1[n];if(t!=="persistent"&&this.$ArbiterEventHolder2(n),t!=="event"){for(var r,o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];return(r=e.prototype.holdEvent).call.apply(r,[this,n].concat(a))}},n.$ArbiterEventHolder2=function(t){var e=this;this.emitToListener(t,function(){return e.releaseCurrentEvent()})},n.releaseEvent=function(n){n&&e.prototype.releaseEvent.call(this,n)},t})(r("EventHolder"));d.call(d);var p=d;l.default=p}),98);
|
|
91
|
+
__d("BigPipeInstance",[],(function(t,n,r,o,a,i){"use strict";var e=null,l={Events:{init:"BigPipe/init",tti:"tti_bigpipe",displayed:"all_pagelets_displayed",loaded:"all_pagelets_loaded"},setCurrentInstance_DO_NOT_USE:function(n){e=n},getCurrentInstance:function(){return e}},s=l;i.default=s}),66);
|
|
92
|
+
__d("CSSCore",["invariant"],(function(t,n,r,o,a,i,l,s){function e(e,t){for(var n=e;n.parentNode;)n=n.parentNode;if(n instanceof Element){var r=n.querySelectorAll(t);return Array.prototype.indexOf.call(r,e)!==-1}return!1}function u(e,t){return!/\s/.test(t)||s(0,11794,t),t&&(e.classList?e.classList.add(t):m(e,t)||(e.className=e.className+" "+t)),e}function c(e,t){return!/\s/.test(t)||s(0,11795,t),t&&(e.classList?e.classList.remove(t):m(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),e}function d(e,t,n){return(n?u:c)(e,t)}function m(e,t){return!/\s/.test(t)||s(0,442),e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}function p(t,n){var r,o,a,i,l=(r=(o=(a=(i=t.matches)!=null?i:t.webkitMatchesSelector)!=null?a:t.mozMatchesSelector)!=null?o:t.msMatchesSelector)!=null?r:function(n){return e(t,n)};return l.call(t,n)}l.addClass=u,l.removeClass=c,l.conditionClass=d,l.hasClass=m,l.matchesSelector=p}),98);
|
|
93
|
+
__d("Parent",["CSSCore"],(function(t,n,r,o,a,i,l){function e(e,t){t=t.toUpperCase();var n=m(e,function(e){return e.nodeName===t});return n instanceof Element?n:null}function s(e,t){var n=m(e,function(e){return e instanceof Element&&o("CSSCore").hasClass(e,t)});return n instanceof Element?n:null}function u(e,t){var n=e;if(typeof n.matches=="function"){for(;n&&n!==document&&!n.matches(t);)n=n.parentNode;return n instanceof Element?n:null}else if(typeof n.msMatchesSelector=="function"){for(;n&&n!==document&&!n.msMatchesSelector(t);)n=n.parentNode;return n instanceof Element?n:null}else return c(n,t)}function c(e,t){for(var n=e,r=n;r.parentNode;)r=r.parentNode;if(!(r instanceof Element)&&!(r instanceof Document))return null;for(var o=r.querySelectorAll(t);n;){if(Array.from(o).some(function(e){return e===n}))return n instanceof Element?n:null;n=n.parentNode}return n instanceof Element?n:null}function d(e,t){var n=m(e,function(e){return e instanceof Element&&!!e.getAttribute(t)});return n instanceof Element?n:null}function m(e,t){for(var n=e;n;){if(t(n))return n;n=n.parentNode}return null}l.byTag=e,l.byClass=s,l.bySelector=u,l.bySelector_SLOW=c,l.byAttribute=d,l.find=m}),98);
|
|
94
|
+
__d("ContextualComponent",["Parent"],(function(t,n,r,o,a,i,l){var e=(function(){function e(e){var t=e.element,n=e.isRoot,r=e.parent;this.$2=n,this.$3=t,this.$4=r,this.$5=new Set,this.$6=[],this.$7=[],this.$8()}e.forNode=function(n){return e.$1.get(n)||null},e.closestToNode=function(n){var t=o("Parent").find(n,function(t){return!!e.forNode(t)});return t?e.forNode(t):null},e.register=function(n){return new e(n)};var t=e.prototype;return t.onCleanup=function(t){this.$6.push(t)},t.onUnmount=function(t){this.$7.push(t)},t.cleanup=function(){this.$5.forEach(function(e){return e.cleanup()}),this.$6.forEach(function(e){return e()}),this.$6=[]},t.unmount=function(){this.cleanup(),this.$5.forEach(function(e){return e.unmount()}),this.$7.forEach(function(e){return e()}),this.$7=[];var t=this.$4;t&&(e.$1.delete(this.$3),t.$9(this))},t.reinitialize=function(){var t=this.$4;t&&(t.$9(this),this.$4=void 0),e.$1.delete(this.$3),this.$8()},t.$8=function(){if(!this.$2&&!this.$4){var t=e.closestToNode(this.$3);t&&(this.$4=t)}this.$4&&this.$4.$10(this),e.$1.set(this.$3,this)},t.$10=function(t){this.$5.add(t)},t.$9=function(t){this.$5.delete(t)},e})();e.$1=new Map,l.default=e}),98);
|
|
95
|
+
__d("ExecutionEnvironment",[],(function(t,n,r,o,a,i){"use strict";var e=!!(t!==void 0&&t.document&&t.document.createElement),l=typeof WorkerGlobalScope=="function",s=typeof SharedWorkerGlobalScope=="function"&&self instanceof SharedWorkerGlobalScope,u=!l&&e,c={canUseDOM:e,canUseEventListeners:e&&!!(t.addEventListener||t.attachEvent),canUseViewport:e&&!!window.screen,canUseWorkers:typeof Worker!="undefined",isInBrowser:e||l,isInMainThread:u,isInSharedWorker:s,isInWorker:l},d=c;i.default=d}),66);
|
|
96
|
+
__d("PageEvents",[],(function(t,n,r,o,a,i){var e=Object.freeze({NATIVE_ONLOAD:"onload/onload",BIGPIPE_ONLOAD:"onload/onload_callback",AJAXPIPE_ONLOAD:"ajaxpipe/onload_callback",NATIVE_DOMREADY:"onload/dom_content_ready",BIGPIPE_DOMREADY:"onload/domcontent_callback",AJAXPIPE_DOMREADY:"ajaxpipe/domcontent_callback",NATIVE_ONBEFOREUNLOAD:"onload/beforeunload",NATIVE_ONUNLOAD:"onload/unload",AJAXPIPE_ONUNLOAD:"onload/exit",AJAXPIPE_SEND:"ajaxpipe/send",AJAXPIPE_FIRST_RESPONSE:"ajaxpipe/first_response",AJAXPIPE_ONBEFORECLEARCANVAS:"ajaxpipe/onbeforeclearcanvas"});i.default=e}),66);
|
|
97
|
+
__d("requireCond",[],(function(t,n,r,o,a,i){function e(e,t,n){throw new Error("Cannot use raw untransformed requireCond.")}var l=e;i.default=l}),66);
|
|
98
|
+
__d("TimeSlice",["cr:1126"],(function(t,n,r,o,a,i,l){l.default=n("cr:1126")}),98);
|
|
99
|
+
__d("createCancelableFunction",["emptyFunction"],(function(t,n,r,o,a,i,l){"use strict";function e(e){var t=e,n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.apply(this,n)};return n.cancel=function(){t=r("emptyFunction")},n}l.default=e}),98);
|
|
100
|
+
__d("SimpleHook",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(){this.__callbacks=[],this.call=this.$2}var t=e.prototype;return t.hasCallback=function(t){var e=this.__callbacks;return e.length>0&&(t==null||e.some(function(e){return e===t||e.$1===t}))},t.add=function(t,n){var e=this,r;if((n==null?void 0:n.once)===!0){var o=function(){e.remove(r),t.apply(null,arguments)};o.$1=t,r=o}else r=t;return this.__callbacks.push(r),r},t.removeLast=function(){return this.__callbacks.pop()},t.remove=function(t){return this.removeIf(function(e){return e===t})},t.removeIf=function(t){var e=this.__callbacks;return this.__callbacks=e.filter(function(e){return!t(e)}),e.length>this.__callbacks.length},t.clear=function(){this.__callbacks=[]},t.$2=function(){for(var e=this.__callbacks,t=0,n=e.length;t<n;++t){var r=e[t];r.apply(null,arguments)}},e})();i.SimpleHook=e}),66);
|
|
101
|
+
__d("performanceAbsoluteNowOnAdjust",["SimpleHook"],(function(t,n,r,o,a,i,l){"use strict";var e=new(o("SimpleHook")).SimpleHook,s=e;l.default=s}),98);
|
|
102
|
+
__d("performanceAbsoluteNow",["performance","performanceAbsoluteNowOnAdjust"],(function(t,n,r,o,a,i,l){var e,s=function(){return Date.now()};function u(e){s=e}var c=0,d=-1,m=typeof(e||(e=r("performance")))=="object",p=m&&typeof(e||(e=r("performance"))).now=="function";m&&((e||(e=r("performance"))).timeOrigin?d=(e||(e=r("performance"))).timeOrigin:(e||(e=r("performance"))).timing&&(e||(e=r("performance"))).timing.navigationStart&&(d=(e||(e=r("performance"))).timing.navigationStart));var _,f,g=function(){return 0};if(p&&d!==-1){if(_=function(){return(e||(e=r("performance"))).now()+d},f=function(){return _()+c},g=function(){var e=Date.now()-_();return e>500&&(c=e,r("performanceAbsoluteNowOnAdjust").call(e)),e},typeof window=="object"&&typeof window.addEventListener=="function"){var h={capture:!1,passive:!0};window.addEventListener("blur",g,h),window.addEventListener("focus",g,h)}}else f=_=function(){return s()};var y={setFallback:u,fromRelativeTime:(function(){if(d===-1){var t=p?Date.now()-(e||(e=r("performance"))).now():0;return function(e){return e+t}}else return function(e){return e+d}})(),__adjust:g,adjusted:f},C=Object.assign(_,y),b=C;l.default=b}),98);
|
|
103
|
+
__d("RunBlue",["Arbiter","BigPipeInstance","ContextualComponent","ExecutionEnvironment","PageEvents","TimeSlice","createCancelableFunction","emptyFunction","performanceAbsoluteNow"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u="onunloadhooks",c="onafterunloadhooks";function d(e){var n=t.PageHooks;return window.domready&&n?(n.runHook(e,"domreadyhooks:late"),{remove:r("emptyFunction")}):C("domreadyhooks",e)}function m(e){var n=t.PageHooks;if(window.loaded&&n){var r=t.setTimeout(function(){n.runHook(e,"onloadhooks:late")},0);return{remove:function(){return t.clearTimeout(r)}}}else return C("onloadhooks",e)}function p(e,t){var n=t===void 0?!window.loading_page_chrome:t;return C(n?"onbeforeleavehooks":"onbeforeunloadhooks",e)}function _(e,t){return window.onunload||(window.onunload=r("TimeSlice").guard(function(){r("Arbiter").inform(r("PageEvents").NATIVE_ONUNLOAD,!0,"state")},"window.onunload")),C(e,t)}function f(e){return _(u,e)}function g(e){return _(c,e)}function h(e){return C("onleavehooks",e)}function y(e,t){var n=r("createCancelableFunction")(t),o=function(){n(),n.cancel()},a=r("ContextualComponent").closestToNode(e);return a&&a.onCleanup(o),window.onleavehooks=(window.onleavehooks||[]).concat(o),{remove:function(){n.cancel()}}}function C(e,t){var n=r("createCancelableFunction")(t);return window[e]=(window[e]||[]).concat(n),{remove:function(){n.cancel()}}}function b(e){window[e]=[]}var v=r("TimeSlice").guard(function(){r("Arbiter").inform(r("PageEvents").NATIVE_DOMREADY,!0,"state")},"DOMContentLoaded");t._domcontentready=v;function S(){var e=document,n=window;if(e.addEventListener){var o=/AppleWebKit.(\d+)/.exec(navigator.userAgent);if(o&&o[1]<525)var a=t.setInterval(function(){/loaded|complete/.test(e.readyState)&&(v(),t.clearInterval(a))},10);else e.addEventListener("DOMContentLoaded",v,!0)}else{var i=n.location.protocol==="https:"?"//:":"javascript:void(0)";e.write('<script onreadystatechange="if (this.readyState==\'complete\') {this.parentNode.removeChild(this);_domcontentready();}" defer="defer" src="'+i+'"></'),e.write("script>")}var l=n.onload;n.onload=r("TimeSlice").guard(function(){l&&l(),r("Arbiter").inform(r("PageEvents").NATIVE_ONLOAD,!0,"state")},"window.onload"),n.onbeforeunload=r("TimeSlice").guard(function(e){var t={};if(r("Arbiter").inform(r("PageEvents").NATIVE_ONBEFOREUNLOAD,t,"state"),t.warn||r("Arbiter").inform(r("PageEvents").AJAXPIPE_ONUNLOAD,{transition_type:"normal"}),t.warn!==void 0){var n=t.warn.body!=null?t.warn.body:t.warn;return e&&(e.returnValue=n),n}else return},"window.onbeforeunload")}function R(){var t,n=(e||(e=r("performanceAbsoluteNow")))();(t=window.console)!=null&&t.timeStamp&&window.console.timeStamp('perf_trace {"name": "e2e", "parent": "PageEvents.BIGPIPE_ONLOAD"}'),r("Arbiter").inform(r("PageEvents").BIGPIPE_ONLOAD,{ts:n},"state")}var L=r("Arbiter").registerCallback(function(){r("BigPipeInstance").getCurrentInstance()?r("Arbiter").subscribeOnce(r("BigPipeInstance").Events.displayed,R):R()},[r("PageEvents").NATIVE_ONLOAD]),E=r("Arbiter").registerCallback(function(){var e={timeTriggered:Date.now()};r("Arbiter").inform(r("PageEvents").BIGPIPE_DOMREADY,e,"state")},[r("PageEvents").NATIVE_DOMREADY]);(s||(s=r("ExecutionEnvironment"))).canUseDOM&&S();function k(){return{remove:function(){}}}l.onLoad=d,l.onAfterLoad=m,l.onBeforeUnload=p,l.onUnload=f,l.onAfterUnload=g,l.onLeave=h,l.onCleanupOrLeave=y,l.__removeHook=b,l.__onloadCallback=L,l.__domContentCallback=E,l.maybeOnBeforeUnload=k}),98);
|
|
104
|
+
__d("RunWWW",["cr:925100"],(function(t,n,r,o,a,i,l){"use strict";var e;l.__domContentCallback=(e=n("cr:925100")).__domContentCallback,l.__onloadCallback=e.__onloadCallback,l.__removeHook=e.__removeHook,l.onAfterLoad=e.onAfterLoad,l.onAfterUnload=e.onAfterUnload,l.onBeforeUnload=e.onBeforeUnload,l.maybeOnBeforeUnload=e.maybeOnBeforeUnload,l.onCleanupOrLeave=e.onCleanupOrLeave,l.onLeave=e.onLeave,l.onLoad=e.onLoad,l.onUnload=e.onUnload}),98);
|
|
105
|
+
__d("CircularBuffer",["FBLogger"],(function(t,n,r,o,a,i,l){var e=(function(){function e(e){if(e<=0)throw r("FBLogger")("comet_infra").mustfixThrow("Buffer size should be a positive integer");this.$1=e,this.$2=0,this.$3=[],this.$4=[]}var t=e.prototype;return t.write=function(t){var e=this;return this.$3.length<this.$1?this.$3.push(t):(this.$4.forEach(function(t){return t(e.$3[e.$2])}),this.$3[this.$2]=t,this.$2++,this.$2%=this.$1),this},t.onEvict=function(t){return this.$4.push(t),this},t.read=function(){return this.$3.slice(this.$2).concat(this.$3.slice(0,this.$2))},t.expand=function(t){if(t>this.$1){var e=this.read();this.$2=0,this.$3=e,this.$1=t}return this},t.dropFirst=function(t){if(t<=this.$1){var e=this.read();this.$2=0,e.splice(0,t),this.$3=e}return this},t.clear=function(){return this.$2=0,this.$3=[],this},t.currentSize=function(){return this.$3.length},t.lastElement=function(){return this.$3[this.$2]},e})();l.default=e}),98);
|
|
106
|
+
__d("ErrorPubSub",["fb-error"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("fb-error").ErrorPubSub}),98);
|
|
107
|
+
__d("err",["fb-error"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("fb-error").err}),98);
|
|
108
|
+
__d("IntervalTrackingBoundedBuffer",["CircularBuffer","ErrorPubSub","err"],(function(t,n,r,o,a,i,l){"use strict";var e,s=5e3,u=(function(){function t(e){var t=this;if(this.$6=0,e!=null){if(e<=0){var n=new Error("Size for a buffer must be greater than zero.");throw n.stack,n}}else e=s;this.$4=e,this.$1=new(r("CircularBuffer"))(e),this.$1.onEvict(function(){t.$6++}),this.$2=[],this.$3=1,this.$5=0}var n=t.prototype;return n.open=function(){var e=this,t=this.$3++,n=!1,r,o=this.$5,a={id:t,startIdx:o,hasOverflown:function(){return a.getOverflowSize()>0},getOverflowSize:function(){return r!=null?r:Math.max(e.$6-o,0)},close:function(){return n?[]:(n=!0,r=e.$6-o,e.$7(t))}};return this.$2.push(a),a},n.pushElement=function(t){return this.$2.length>0&&(this.$1.write(t),this.$5++),this},n.isActive=function(){return this.$2.length>0},n.$8=function(t){return Math.max(t-this.$6,0)},n.$7=function(n){for(var t,o,a,i,l=0;l<this.$2.length;l++){var s=this.$2[l],u=s.id,c=s.startIdx;u===n?(a=l,i=c):(o==null||c<o)&&(o=c),(t==null||c<t)&&(t=c)}if(a==null||t==null||i==null)return(e||(e=r("ErrorPubSub"))).reportError(r("err")("messed up state inside IntervalTrackingBoundedBuffer")),[];this.$2.splice(a,1);var d=this.$8(i),m=this.$1.read().slice(d),p=this.$8(o==null?this.$5:o)-this.$8(t);return p>0&&(this.$1.dropFirst(p),this.$6+=p),m},t})();l.default=u}),98);
|
|
109
|
+
__d("TimeSliceSham",["Env","ErrorGuard","IntervalTrackingBoundedBuffer"],(function(t,n,r,o,a,i){var e,l,s=(e||(e=n("Env"))).timesliceBufferSize;s==null&&(s=5e3);var u=new(n("IntervalTrackingBoundedBuffer"))(s),c={PropagationType:{CONTINUATION:0,EXECUTION:1,ORPHAN:2},guard:function(t,r){return(l||(l=n("ErrorGuard"))).guard(t,{name:"TimeSlice"+(r?": "+r:"")})},copyGuardForWrapper:function(t,n){return t},checkCoverage:function(){},setLogging:function(t,n){},getContext:function(){return null},getGuardedContinuation:function(t){function e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(this,n)}return e},getReusableContinuation:function(t){return c.getPlaceholderReusableContinuation()},getPlaceholderReusableContinuation:function(){var e=function(t){return t()};return e.last=e,e},getGuardNameStack:function(){return[]},registerExecutionContextObserver:function(t){},catchUpOnDemandExecutionContextObservers:function(t){},getBuffer:function(){return u}};t.TimeSlice=c,a.exports=c}),6);
|
|
110
|
+
__d("Promise",["cr:6640"],(function(t,n,r,o,a,i){"use strict";var e,l=(e=n("cr:6640"))!=null?e:t.Promise;l.allSettled||(l.allSettled=function(e){var t;if((typeof Symbol=="function"?Symbol.iterator:"@@iterator")in e)t=Array.from(e);else{var n=new TypeError("Promise.allSettled must be passed an iterable.");return n.stack,l.reject(n)}for(var r=Array(t.length),o=function(){var e=t[a],n=typeof e=="object"&&e!==null&&typeof e.then=="function";r[a]=n?new l(function(t,n){e.then(function(n){t({status:"fulfilled",value:n})},function(n){t({status:"rejected",reason:n})})}):l.resolve({status:"fulfilled",value:e})},a=0,i=t.length;a<i;++a)o();return l.all(r)}),l.prototype.finally||(l.prototype.finally=function(e){return this.then(function(t){return l.resolve(e()).then(function(){return t})},function(t){return l.resolve(e()).then(function(){throw t})})}),a.exports=l}),null);
|
|
111
|
+
__d("CometLruCache",["FBLogger"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e,t){this.$1=e,this.$2=t,e<=0&&r("FBLogger")("CometLruCache").mustfix("CometLruCache: Unable to create instance of cache with zero or negative capacity."),this.$3=new Map}var t=e.prototype;return t.set=function(t,n){if(this.$3.delete(t),this.$3.set(t,{timestamp:Date.now(),value:n}),this.$3.size>this.$1){var e=this.$3.keys().next();e.done||this.$3.delete(e.value)}},t.get=function(t){var e=this.$3.get(t);return e!=null?Date.now()>e.timestamp+this.$2?(this.$3.delete(t),null):(this.$3.delete(t),this.$3.set(t,e),e.value):null},t.has=function(t){return this.$3.has(t)},t.delete=function(t){this.$3.delete(t)},t.size=function(){return this.$3.size},t.capacity=function(){return this.$1-this.$3.size},t.clear=function(){this.$3.clear()},e})();function s(t,n){return n===void 0&&(n=Number.MAX_SAFE_INTEGER),new e(t,n)}l.create=s}),98);
|
|
112
|
+
__d("BaseDeserializePHPQueryData",[],(function(t,n,r,o,a,i){"use strict";var e=/^([-_\w]+)((?:\[[-_\w]*\])+)=?(.*)/;function l(e){return e==="hasOwnProperty"||e==="__proto__"?"\uD83D\uDF56":e}function s(t,n){if(t==null||t==="")return{};for(var r={},o=t.replace(/%5B/gi,"[").replace(/%5D/gi,"]"),a=o.split("&"),i=Object.prototype.hasOwnProperty,s=0,u=a.length;s<u;s++){var c=a[s].match(e);if(c){var _=c[2].split(/\]\[|\[|\]/).slice(0,-1),f=c[1],g=n(c[3]||"");_[0]=f;for(var h=r,y=0;y<_.length-1;y++){var C=l(_[y]);if(C){if(!i.call(h,C)){var b=_[y+1]&&!_[y+1].match(/^\d{1,3}$/)?{}:[];if(h[C]=b,h[C]!==b)return r}h=h[C]}else _[y+1]&&!_[y+1].match(/^\d{1,3}$/)?h.push({}):h.push([]),h=h[h.length-1]}h instanceof Array&&_[_.length-1]===""?h.push(g):h[l(_[_.length-1])]=g}else{var d=a[s].indexOf("=");if(d===-1)r[n(a[s])]=null;else{var m=a[s].substring(0,d),p=a[s].substring(d+1);r[n(m)]=n(p)}}}return r}i.deserialize=s}),66);
|
|
113
|
+
__d("flattenPHPQueryData",["invariant"],(function(t,n,r,o,a,i,l,s){"use strict";function e(e){return u(e,"",{})}function u(e,t,n){if(e==null)n[t]=void 0;else if(typeof e=="object"){typeof e.appendChild!="function"||s(0,2616);for(var r in e)r!=="$$typeof"&&Object.prototype.hasOwnProperty.call(e,r)&&e[r]!==void 0&&u(e[r],t?t+"["+r+"]":r,n)}else n[t]=e;return n}l.default=e}),98);
|
|
114
|
+
__d("PHPQuerySerializer",["BaseDeserializePHPQueryData","flattenPHPQueryData"],(function(t,n,r,o,a,i,l){function e(e){var t=[],n=r("flattenPHPQueryData")(e);for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)){var a=s(o);n[o]===void 0?t.push(a):t.push(a+"="+s(String(n[o])))}return t.join("&")}function s(e){return encodeURIComponent(e).replace(/%5D/g,"]").replace(/%5B/g,"[")}function u(e){return o("BaseDeserializePHPQueryData").deserialize(e,c)}function c(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}}var d={decodeComponent:c,deserialize:u,encodeComponent:s,serialize:e};i.exports=d}),34);
|
|
115
|
+
__d("PHPQuerySerializerNoEncoding",["BaseDeserializePHPQueryData","flattenPHPQueryData"],(function(t,n,r,o,a,i,l){"use strict";function e(e){var t=[],n=r("flattenPHPQueryData")(e);for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)){var a=o;n[o]===void 0?t.push(a):t.push(a+"="+String(n[o]))}return t.join("&")}function s(e){return e}function u(e){return o("BaseDeserializePHPQueryData").deserialize(e,c)}function c(e){return e}var d={decodeComponent:c,deserialize:u,encodeComponent:s,serialize:e},m=d;l.default=m}),98);
|
|
116
|
+
__d("URIRFC3986",[],(function(t,n,r,o,a,i){"use strict";var e=new RegExp("^([^:/?#]+:)?(//([^\\\\/?#@]*@)?(\\[[A-Fa-f0-9:.]+\\]|[^\\/?#:]*)(:[0-9]*)?)?([^?#]*)(\\?[^#]*)?(#.*)?");function l(t){if(t.trim()==="")return null;var n=t.match(e);if(n==null)return null;var r=n[2]?n[2].substr(2):null,o=n[1]?n[1].substr(0,n[1].length-1):null,a={uri:n[0]?n[0]:null,scheme:o,authority:r,userinfo:n[3]?n[3].substr(0,n[3].length-1):null,host:n[2]?n[4]:null,port:n[5]&&n[5].substr(1)?parseInt(n[5].substr(1),10):null,path:n[6]?n[6]:null,query:n[7]?n[7].substr(1):null,fragment:n[8]?n[8].substr(1):null,isGenericURI:r===null&&!!o};return a}i.parse=l}),66);
|
|
117
|
+
__d("$InternalEnum",[],(function(t,n,r,o,a,i){"use strict";var e=Object.prototype.hasOwnProperty,l=typeof WeakMap=="function"?new WeakMap:new Map;function s(e){var t=l.get(e);if(t!==void 0)return t;var n=new Map;Object.getOwnPropertyNames(e).forEach(function(t){n.set(e[t],t)});try{l.set(e,n)}catch(e){}return n}var u=Object.freeze(Object.defineProperties(Object.create(null),{isValid:{value:function(t){return s(this).has(t)}},cast:{value:function(t){return this.isValid(t)?t:void 0}},members:{value:function(){return s(this).keys()}},getName:{value:function(t){return s(this).get(t)}}}));function c(t){var n=Object.create(u);for(var r in t)e.call(t,r)&&Object.defineProperty(n,r,{value:t[r]});return Object.freeze(n)}var d=Object.freeze(Object.defineProperties(Object.create(null),{isValid:{value:function(n){return typeof n=="string"?e.call(this,n):!1}},cast:{value:u.cast},members:{value:function(){return Object.getOwnPropertyNames(this).values()}},getName:{value:function(t){return t}}}));c.Mirrored=function(t){for(var e=Object.create(d),n=0,r=t.length;n<r;++n)Object.defineProperty(e,t[n],{value:t[n]});return Object.freeze(e)},Object.freeze(c.Mirrored),a.exports=Object.freeze(c)}),null);
|
|
118
|
+
__d("URISchemes",["$InternalEnum"],(function(t,n,r,o,a,i){"use strict";var e=new Set(["about","accountscenter","aidemos","aistudio","apk","blob","barcelona","cmms","fb","fba","fbatwork","fb-ama","fb-internal","fb-workchat","fb-workchat-secure","fb-messenger","fb-messenger-public","fb-messenger-group-thread","fb-page-messages","fb-pma","fbagenthome","fbcf","fbconnect","fbinternal","fbmobilehome","fbrpc","file","flipper","ftp","gtalk","http","https","mailto","wss","ms-app","intent","itms","itms-apps","itms-services","lasso","market","svn+ssh","fbstaging","tel","sms","pebblejs","sftp","whatsapp","moments","flash","fblite","chrome-extension","webcal","instagram","iglite","fb124024574287414","fb124024574287414rc","fb124024574287414master","fb1576585912599779","fb929757330408142","designpack","fbpixelcloud","fbapi20130214","fb1196383223757595","tbauth","oculus","oculus.store","oculus.feed","fb1680871178595114","fb1543576032349914","fb1635404796768116","fb147781309031234","oculusstore","socialplatform","odh","com.oculus.rd","aria","skype","ms-windows-store","callto","messenger","workchat","fb236786383180508","fb1775440806014337","data","fb-mk","munki","origami-file","fb-nimble-vrsrecorder","fb-nimble-monohandtrackingvis","together","togetherbl","horizonlauncher","horizon","venues","whatsapp-consumer","whatsapp-smb","fb-ide-opener","fb-vscode","fb-vscode-insiders","fb-vscode-dev","editor","spark-studio","spark-player","spark-simulator","meta-spatial-editor","cosmo-player","arstudio","manifold","origami-internal","origami-public","stella","mwa","mattermost","logaggregator","pcoip","cinema","home","oculus360photos","systemux","content","moonstone","hsr-asset-viewer","upi","phonepe","gpay","tez","paytmmp","bhim","q4bconfigurator","q4bnux","fb-viewapp","meta-ai","vibes","x-safari-https","meta-bloks","facebook-horizon","fbboost","ctrl-hub","ctrl-launcher","hsr-editor","assethub","gizmo","aura","basel","lantern","fb-owl"]),l=n("$InternalEnum")({EXPLICITLY_ALLOWED_SCHEMES_ONLY:"explicitly_allowed_schemes_only",INCLUDE_DEFAULTS:"include_defaults"});function s(t,n,r){return n===void 0&&(n=l.INCLUDE_DEFAULTS),t==null||t===""?!0:(r==null?void 0:r.has(t.toLowerCase()))||n===l.INCLUDE_DEFAULTS&&e.has(t.toLowerCase())}i.Options=l,i.isAllowed=s}),66);
|
|
119
|
+
__d("isSameOrigin",[],(function(t,n,r,o,a,i){"use strict";function e(e,t){return!e.getProtocol()||!e.getDomain()||!t.getProtocol()||!t.getDomain()?!1:e.getOrigin()===t.getOrigin()}i.default=e}),66);
|
|
120
|
+
__d("nullthrows",[],(function(t,n,r,o,a,i){function e(e,t){if(t===void 0&&(t="Got unexpected null or undefined"),e!=null)return e;var n=new Error(t);throw n.framesToPop=1,n.stack,n}i.default=e}),66);
|
|
121
|
+
__d("structuredClone",[],(function(t,n,r,o,a,i){"use strict";var e,l=(e=window)==null?void 0:e.structuredClone;i.default=l}),66);
|
|
122
|
+
__d("ConstUriUtils",["CometLruCache","ExecutionEnvironment","FBLogger","PHPQuerySerializer","PHPQuerySerializerNoEncoding","URIRFC3986","URISchemes","UriNeedRawQuerySVConfig","isSameOrigin","nullthrows","structuredClone"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c,d=o("CometLruCache").create(5e3),m=new RegExp("(^|\\.)facebook\\.com$","i"),p=new RegExp("(^|\\.)messenger\\.com$","i"),_=new RegExp("(^|\\.)instagram\\.com$","i"),f=new RegExp("(^|\\\\.)meta\\\\.(com|ai)$","i"),g=new RegExp("(^|\\.)threads\\.com$","i"),h=new RegExp("^(?:[^/]*:|[\\x00-\\x1f]*/[\\x00-\\x1f]*/)"),y=new RegExp("[\\x00-\\x2c\\x2f\\x3b-\\x40\\x5c\\x5e\\x60\\x7b-\\x7f\\uFDD0-\\uFDEF\\uFFF0-\\uFFFF\\u2047\\u2048\\uFE56\\uFE5F\\uFF03\\uFF0F\\uFF1F]"),C=r("UriNeedRawQuerySVConfig").uris.map(function(e){return{domain:e,valid:k(e)}}),b=[],v=[];function S(e,t){var n={};if(e!=null)for(var o of e.entries())n[o[0]]=o[1];else r("FBLogger")("ConstUriUtils").warn("Passed a null query map in, this means poor client side flow coverage or client/server boundary type issue.");return t.serialize(n)}function R(e,t,n){var o=c||(c=r("PHPQuerySerializer"));if(["http","https"].includes(t)&&L(e)){if(e.includes("doubleclick.net")&&n!=null&&!n.startsWith("http"))return o;o=r("PHPQuerySerializerNoEncoding")}return o}function L(e){return e!=null&&C.some(function(t){return t.valid&&E(e,t.domain)})}function E(e,t){if(t===""||e==="")return!1;if(e.endsWith(t)){var n=e.length-t.length-1;if(n===-1||e[n]===".")return!0}return!1}function k(e){return!y.test(e)}function I(e,t){var n=t.protocol!=null&&t.protocol!==""?t.protocol:e.getProtocol(),r=t.domain!=null?R(t.domain,n):e.getSerializer(),o={domain:e.getDomain(),fragment:e.getFragment(),fragmentSeparator:e.hasFragmentSeparator(),isGeneric:e.isGeneric(),originalRawQuery:e.getOriginalRawQuery(),path:e.getPath(),port:e.getPort(),protocol:e.getProtocol(),queryParams:e.getQueryParams(),serializer:r,subdomain:e.getSubdomain()},a=babelHelpers.extends({},o,t),i=t.queryParams!=null&&t.queryParams.size!==0;return P.getUribyObject(a,i)}function T(e,t,n,r){n===void 0&&(n=!1);var o=e.protocol!==""?e.protocol+":"+(e.isGeneric?"":"//"):"",a=e.domain!==""?e.domain:"",i=e.port!==""?":"+e.port:"",l=e.path!==""?e.path:o!==""&&o!=="mailto:"||a!==""||i!==""?"/":"",s=D(a,e.originalRawQuery,e.queryParams,t,n,r!=null?r:e.serializer),u=s.length>0?"?":"",c=e.fragment!==""?"#"+e.fragment:"",d=e.fragment===""&&e.fragmentSeparator?"#":"";return""+o+a+i+l+u+s+d+c}function D(e,t,n,r,o,a){return o===void 0&&(o=!1),!r&&(o||L(e))?t!=null?t:"":S(n,a)}function x(t){var n,r=t.trim(),a=(e||(e=o("URIRFC3986"))).parse(r)||{fragment:null,host:null,isGenericURI:!1,query:null,scheme:null,userinfo:null},i=a.host||"",l=i.split("."),s=l.length>=3?l[0]:"",u=R(i,a.scheme||"",a.query),c=u.deserialize(a.query||"")||{},d=new Map(Object.entries(c)),m=$({domain:i,fragment:a.fragment||"",fragmentSeparator:a.fragment==="",isGeneric:a.isGenericURI,originalRawQuery:a.query,path:a.path||"",port:a.port!=null?String(a.port):"",protocol:(a.scheme||"").toLowerCase(),queryParams:d,serializer:u,subdomain:s,userInfo:(n=a==null?void 0:a.userinfo)!=null?n:""},t);return m}function $(e,t,n,a){n===void 0&&(n=(u||(u=o("URISchemes"))).Options.INCLUDE_DEFAULTS);var i={components:babelHelpers.extends({},e),error:"",valid:!0},l=i.components;if(!(u||(u=o("URISchemes"))).isAllowed(e.protocol,n,a))return i.valid=!1,i.error='The URI protocol "'+String(e.protocol)+'" is not allowed.',i;if(!k(e.domain||""))return i.valid=!1,i.error="This is an unsafe domain "+String(e.domain),i;if(l.port=e.port!=null&&String(e.port)||"",e.userInfo)return i.valid=!1,i.error="Invalid URI: (userinfo is not allowed in a URI "+String(e.userInfo)+")",i;var s=t!=null&&t!==""?t:T(l,!1);return l.domain===""&&l.path.indexOf("\\")!==-1?(i.valid=!1,i.error="Invalid URI: (no domain but multiple back-slashes "+s+")",i):!l.protocol&&h.test(s)?(i.valid=!1,i.error="Invalid URI: (unsafe protocol-relative URI "+s+")",i):l.domain!==""&&l.path!==""&&!l.path.startsWith("/")?(i.valid=!1,i.error="Invalid URI: (domain and pathwhere path lacks leading slash "+s+")",i):(l.protocol!==""&&l.protocol!=="file"&&!l.isGeneric&&!l.domain&&l.path!==""&&r("FBLogger")("ConstUriUtils").warn('invalid URI (protocol "'+l.protocol+'" with no domain)'),i)}var P=(function(){function e(e){this.queryParams=new Map,this.domain=e.domain,this.fragment=e.fragment,this.fragmentSeparator=!!e.fragmentSeparator,this.isGenericProtocol=!!e.isGeneric,this.path=e.path,this.originalRawQuery=e.originalRawQuery,this.port=e.port,this.protocol=e.protocol,this.queryParams=e.queryParams,this.serializer=e.serializer,this.subdomain=e.subdomain}var t=e.prototype;return t.addQueryParam=function(t,n){if(t){var e=this.getQueryParams();return e.set(t,n),I(this,{queryParams:e})}return this},t.addQueryParams=function(t){if(t.size>0){var e=this.getQueryParams();return t.forEach(function(t,n){e.set(n,t)}),I(this,{queryParams:e})}return this},t.addQueryParamString=function(t){if(t){var e=t.startsWith("?")?t.slice(1):t,n=this.getQueryParams();return e.split("&").map(function(e){var t=e.split("="),r=t[0],o=t[1];n.set(r,o)}),I(this,{queryParams:n})}return this},t.addTrailingSlash=function(){var e=this.getPath();return e.length>0&&e[e.length-1]!=="/"?this.setPath(e+"/"):this},t.getDomain=function(){return this.domain},t.getFragment=function(){return this.fragment},t.getOrigin=function(){var e=this.getPort();return this.getProtocol()+"://"+this.getDomain()+(e?":"+e:"")},t.getOriginalRawQuery=function(){return this.originalRawQuery},t.getPath=function(){return this.path},t.getPort=function(){return this.port},t.getProtocol=function(){return this.protocol.toLowerCase()},t.getQualifiedUri=function(){if(!this.getDomain()){var t,n=(t=typeof window!="undefined"?window:self)==null||(t=t.location)==null?void 0:t.href;if(n==null)return r("FBLogger")("ConstUriUtils").blameToPreviousFile().warn("Cannot get qualified URI for current URI as there is no current location"),null;(s||(s=r("ExecutionEnvironment"))).isInWorker&&n.startsWith("blob:")&&(n=n.substring(5,n.length));var o=n.slice(0,n.indexOf("/",n.indexOf(":")+3));return e.getUri(o+this.toString())}return this},t.getQueryParam=function(t){var e=this.queryParams.get(t);if(typeof e=="string")return e;var n=JSON.stringify(e);return n==null?n:JSON.parse(n)},t.getQueryData=function(){return Object.fromEntries(this.getQueryParams())},t.getQueryParams=function(){if(r("structuredClone")!=null)return r("structuredClone")(this.queryParams);var e=JSON.stringify(Array.from(this.queryParams),function(e,t){return Array.isArray(t)?{__CUUArr:!0,value:babelHelpers.extends({},t)}:t}),t=JSON.parse(e,function(e,t){return t!=null&&typeof t=="object"&&t.__CUUArr?Object.keys(t.value).reduce(function(e,n){return e[n]=t.value[n],e},[]):t});return new Map(t)},t.getQueryString=function(t){return t===void 0&&(t=!1),D(this.domain,this.originalRawQuery,this.queryParams,!1,t,this.serializer)},t.getRegisteredDomain=function(){if(!this.getDomain())return"";if(!this.isFacebookUri())return null;var e=this.getDomain().split("."),t=e.indexOf("facebook");return t===-1&&(t=e.indexOf("workplace")),e.slice(t).join(".")},t.getSerializer=function(){return this.serializer},t.getSubdomain=function(){return this.subdomain},t.getUnqualifiedUri=function(){if(this.getDomain()){var t=this.toString();return e.getUri(t.slice(t.indexOf("/",t.indexOf(":")+3)))}return this},e.getUri=function(n){var t=n.trim(),o=d.get(t);if(o==null){var a=x(t);if(a.valid)o=new e(a.components),d.set(t,o);else return r("FBLogger")("ConstUriUtils").blameToPreviousFrame().warn(a.error),null}return o},e.getUriOrThrow=function(n){return r("nullthrows")(e.getUri(n))},e.getUribyObject=function(n,o){var t=T(n,o),a=d.get(t);if(a==null){o&&(n.originalRawQuery=S(n.queryParams,n.serializer));var i=$(n);if(i.valid)a=new e(i.components),d.set(t,a);else return r("FBLogger")("ConstUri").mustfix(i.error),null}return a},t.hasFragmentSeparator=function(){return this.fragmentSeparator},t.isEmpty=function(){return!(this.getPath()||this.getProtocol()||this.getDomain()||this.getPort()||this.queryParams.size>0||this.getFragment())},t.isFacebookUri=function(){var e=this.toString();return e===""?!1:!this.getDomain()&&!this.getProtocol()?!0:["https","http"].indexOf(this.getProtocol())!==-1&&(m.test(this.getDomain())||p.test(this.getDomain())||_.test(this.getDomain())||f.test(this.getDomain()))||g.test(this.getDomain())},t.isGeneric=function(){return this.isGenericProtocol},t.isSameOrigin=function(t){return r("isSameOrigin")(this,t)},t.isSubdomainOfDomain=function(n){var t=e.getUri(n);return t!=null&&E(this.domain,n)},t.isSecure=function(){return this.getProtocol()==="https"},t.removeQueryParams=function(t){if(Array.isArray(t)&&t.length>0){var e=this.getQueryParams();return t.map(function(t){return e.delete(t)}),I(this,{queryParams:e})}return this},t.removeQueryParam=function(t){if(t){var e=this.getQueryParams();return e.delete(t),I(this,{queryParams:e})}return this},t.removeSubdomain=function(){var e=this.getQualifiedUri();if(e==null)return null;var t=e.getDomain(),n=t.split(".");return n.length>=3&&(n=n.slice(-2)),I(e,{domain:n.join("."),subdomain:""})},t.replaceQueryParam=function(t,n){if(t){var e=this.getQueryParams();return e.set(t,n),I(this,{queryParams:e})}return this},t.replaceQueryParams=function(t){return I(this,{queryParams:t})},t.replaceQueryParamString=function(t){if(t!=null){var e=t.startsWith("?")?t.slice(1):t,n=this.getQueryParams();return e.split("&").map(function(e){var t=e.split("="),r=t[0],o=t[1];n.set(r,o)}),I(this,{queryParams:n})}return this},t.setDomain=function(t){if(t){var e=t.split("."),n=e.length>=3?e[0]:"";return I(this,{domain:t,subdomain:n})}return this},t.setFragment=function(t){return t==="#"?I(this,{fragment:"",fragmentSeparator:!0}):I(this,{fragment:t,fragmentSeparator:t!==""})},t.setPath=function(t){return t!=null?I(this,{path:t}):this},t.setPort=function(t){return t?I(this,{port:t}):this},t.setProtocol=function(t){return t?I(this,{protocol:t}):this},t.setSecure=function(t){return this.setProtocol(t?"https":"http")},t.setSubDomain=function(t){if(t){var e=this.getQualifiedUri();if(e==null)return null;var n=e.getDomain(),r=n.split(".");return r.length>=3?r[0]=t:r.unshift(t),I(e,{domain:r.join("."),subdomain:t})}return this},t.stripTrailingSlash=function(){return this.setPath(this.getPath().replace(/\/$/,""))},t.qualifyDomain=function(t){if(!this.getDomain()){var e=t;return e==null&&(e=this.getQualifiedUri()),e==null?this:I(this,{domain:e.getDomain(),protocol:e.getProtocol()})}return this},e.$1=function(t){var e=t;for(var n of b)e=n(e);return e},e.$2=function(t,n){var e=n;for(var r of v)e=r(t,e);return e},t.$3=function(n,r){return r===void 0&&(r=!1),T({domain:e.$1(this.domain),fragment:this.fragment,fragmentSeparator:this.fragmentSeparator,isGeneric:this.isGenericProtocol,originalRawQuery:this.originalRawQuery,path:this.path,port:this.port,protocol:this.protocol,queryParams:e.$2(this.domain,this.queryParams),serializer:n,subdomain:this.subdomain,userInfo:""},!1,r)},t.toStringRawQuery=function(){return this.rawStringValue==null&&(this.rawStringValue=this.$3(r("PHPQuerySerializerNoEncoding"))),this.rawStringValue},t.toString=function(){return this.stringValue==null&&(this.stringValue=this.$3(this.serializer)),this.stringValue},t.toStringPreserveQuery=function(){return this.$3(this.serializer,!0)},e.isValidUri=function(n){var t=d.get(n);if(t!=null)return!0;var r=x(n);return r.valid?(d.set(n,new e(r.components)),!0):!1},e})();function N(e){return e instanceof P?e:null}function M(e){b.push(e)}function w(e){v.push(e)}var A=P.getUri,F=P.getUriOrThrow,O=P.isValidUri;l.isSubdomainOfDomain=E,l.isConstUri=N,l.registerDomainFilter=M,l.registerQueryParamsFilter=w,l.getUri=A,l.getUriOrThrow=F,l.isValidUri=O}),98);
|
|
123
|
+
__d("routeBuilderUtils",[],(function(t,n,r,o,a,i){"use strict";function e(e){var t=e.split("/");return t.filter(function(e){return e!==""}).map(function(e){var t=e.split(/{|}/);if(t.length<3)return{isToken:!1,part:e};var n=t[0],r=t[1],o=t[2],a=r[0]==="?",i=r[a?1:0]==="*",l=r.substring((a?1:0)+(i?1:0));return{isToken:!0,optional:a,catchAll:i,prefix:n,suffix:o,token:l}})}i.getPathParts=e}),66);
|
|
124
|
+
__d("jsRouteBuilder",["ConstUriUtils","FBLogger","routeBuilderUtils"],(function(t,n,r,o,a,i,l){"use strict";var e="#";function s(t,n,a,i,l){l===void 0&&(l=!1);var s=o("routeBuilderUtils").getPathParts(t);function u(u){try{var c=i!=null?babelHelpers.extends({},i,u):u!=null?u:{},d={},m="",p=!1;m=s.reduce(function(e,t){if(t.isToken){var r,o=t.optional,a=t.prefix,i=t.suffix,l=t.token;if(o&&p)return e;var s=(r=c[l])!=null?r:n[l];if(s==null&&o)return p=!0,e;if(s==null){var u=new Error("Missing required template parameter: "+l);throw u.stack,u}if(s===""){var m=new Error("Required template parameter is an empty string: "+l);throw m.stack,m}return d[l]=!0,e+"/"+a+s+i}else return p=!1,e+"/"+t.part},""),t.slice(-1)==="/"&&(m+="/"),m===""&&(m="/");var _=o("ConstUriUtils").getUri(m);for(var f in c){var g=c[f];!d[f]&&g!=null&&_!=null&&(a!=null&&a.has(f)?g!==!1&&(_=_.addQueryParam(f,null)):_=_.addQueryParam(f,g))}return[_,m]}catch(n){var h=n==null?void 0:n.message,y=r("FBLogger")("JSRouteBuilder").blameToPreviousFrame().blameToPreviousFrame();return l&&(y=y.blameToPreviousFrame()),y.mustfix("Failed building URI for base path: %s message: %s",t,h),[null,e]}}return{buildUri:function(n){var t,r=(t=u(n)[0])!=null?t:o("ConstUriUtils").getUri(e);if(r==null){var a=new Error("Not even the fallback URL parsed validly!");throw a.stack,a}return r},buildUriNullable:function(t){return u(t)[0]},buildURL:function(t){var e,n=u(t),r=n[0],o=n[1];return(e=r==null?void 0:r.toString())!=null?e:o},buildURLStringDEPRECATED:function(t){var e,n=u(t),r=n[0],o=n[1];return(e=r==null?void 0:r.toString())!=null?e:o},getPath:function(){return t}}}l.default=s}),98);
|
|
125
|
+
__d("XCometFBMultiSiteWebWorkerInitScriptControllerRouteBuilder",["jsRouteBuilder"],(function(t,n,r,o,a,i,l){var e=r("jsRouteBuilder")("/static_resources/webworker_v1/init_script/",Object.freeze({}),void 0),s=e;l.default=s}),98);
|
|
126
|
+
__d("StaticSiteData",[],(function(t,n,r,o,a,i){var e=Object.freeze({hs_key:"__hs",connection_class_server_guess_key:"__ccg",dpr_key:"dpr",spin_rev_key:"__spin_r",spin_time_key:"__spin_t",spin_branch_key:"__spin_b",spin_mhenv_key:"__spin_dev_mhenv",lite_iframe_locale_override_key:"__ltif_locale",weblite_key:"__wblt",weblite_iframe_key:"__wbltif",force_touch_key:"__fmt",kite_key:"__ktif",kite_legacy_key:"_ktif",haste_session_id_key:"__hsi",jsmod_key:"__dyn",comet_key:"__comet_req",canonical_route_key:"__crn"});i.default=e}),66);
|
|
127
|
+
__d("objectEntries",[],(function(t,n,r,o,a,i){function e(e){return Object.entries(e)}i.default=e}),66);
|
|
128
|
+
__d("getWorkerInitScriptSPINParams",["SiteData","StaticSiteData","objectEntries"],(function(t,n,r,o,a,i,l){"use strict";function e(){var e,t,n,o,a=(n=r("SiteData"))[(o=r("StaticSiteData")).spin_mhenv_key],i=babelHelpers.extends((e={},e[o.hs_key]=n.haste_session,e[o.spin_rev_key]=n[o.spin_rev_key],e[o.spin_branch_key]=n[o.spin_branch_key],e[o.spin_time_key]=n[o.spin_time_key],e),a?(t={},t[r("StaticSiteData").spin_mhenv_key]=a,t):null);return new Map(r("objectEntries")(i))}l.default=e}),98);
|
|
129
|
+
__d("WorkerBundleResource",["XCometFBMultiSiteWebWorkerInitScriptControllerRouteBuilder","getWorkerInitScriptSPINParams","nullthrows"],(function(t,n,r,o,a,i,l){"use strict";function e(e,t){var n,o,a,i=(n=t==null?void 0:t.logImportScriptsErrors)!=null?n:!1,l=(o=t==null?void 0:t.name)!=null?o:e.name,u=new window.URL(e.url,window.location.href).href;if(u==null){var c=new Error("Can't start up worker without a resource url.");throw c.stack,c}for(var d=r("nullthrows")((a=r("XCometFBMultiSiteWebWorkerInitScriptControllerRouteBuilder").buildUri({}).addQueryParams(r("getWorkerInitScriptSPINParams")()))==null||(a=a.addQueryParams(s()))==null?void 0:a.toString()),m=new Worker(d,{name:l}),p=arguments.length,_=new Array(p>2?p-2:0),f=2;f<p;f++)_[f-2]=arguments[f];return m.postMessage({bundleUrl:u,initArgs:_,isDev:!1,resource:e,logImportScriptsErrors:i,type:"sr-init"}),m}function s(){var e=new URLSearchParams(window.location.search),t=new Map;return e.forEach(function(e,n){["gk_enable","gk_enable[]","gk_disable","gk_disable[]"].includes(n)&&t.set(n,e)}),t}l.createDedicatedWebWorker=e}),98);
|
|
130
|
+
__d("getFalcoLogPolicy_DO_NOT_USE",["FBLogger"],(function(t,n,r,o,a,i,l){"use strict";var e={r:1},s={};function u(t){var n=s[t];return n==null?(r("FBLogger")("staticresources").mustfix("Failed to find a Haste-supplied log policy for the Falco event ' + 'identified by token `%s`. Failing open (ie. with a sampling rate of 1.0).",t),e):n}u.add=function(e,t){Object.keys(e).forEach(function(n){t&&t.entry++,s[n]==null?s[n]=e[n]:t&&t.dup_entry++})},l.default=u}),98);
|
|
131
|
+
__d("OdsWebBatchFalcoEvent",["FalcoLoggerInternal","getFalcoLogPolicy_DO_NOT_USE"],(function(t,n,r,o,a,i,l){"use strict";var e=r("getFalcoLogPolicy_DO_NOT_USE")("1838142"),s=o("FalcoLoggerInternal").create("ods_web_batch",e),u=s;l.default=u}),98);
|
|
132
|
+
__d("FalcoConsentChecker",[],(function(t,n,r,o,a,i){"use strict";function e(t,n,r,o){var a,i;switch(typeof o){case"string":return a=t[String(o)],a?a<=n:!1;case"number":return e(t,n,r,r[Number(o)]);default:if(i=!1,Array.isArray(o)){for(var l=o[0],s=1;s<o.length;s++)if(i=e(t,n,r,o[s]),i){if(l==="or")return!0}else if(l==="and")return!1}return i}}i.default=e}),66);
|
|
133
|
+
/**
|
|
134
|
+
* License: https://www.facebook.com/legal/license/a-T0Nj64ye1/
|
|
135
|
+
*/
|
|
136
|
+
__d("Alea",[],(function(t,n,r,o,a,i){function e(){var e=4022871197,t=function(n){for(var t=n.toString(),r=0;r<t.length;r++){e+=t.charCodeAt(r);var o=.02519603282416938*e;e=o>>>0,o-=e,o*=e,e=o>>>0,o-=e,e+=o*4294967296}return(e>>>0)*23283064365386963e-26};return t.version="Mash 0.9",t}function l(){for(var t=0,n=0,r=0,o=1,a=arguments.length,i=new Array(a),l=0;l<a;l++)i[l]=arguments[l];var s=i.length>0?i:[new Date],u=e();t=u(" "),n=u(" "),r=u(" ");for(var c=0;c<s.length;c++)t-=u(s[c]),t<0&&(t+=1),n-=u(s[c]),n<0&&(n+=1),r-=u(s[c]),r<0&&(r+=1);u=null;var d=function(){var e=2091639*t+o*23283064365386963e-26;return t=n,n=r,r=e-(o=e|0),r};return d.version="Alea 0.9",d.args=s,d}i.default=l}),66);
|
|
137
|
+
__d("Random",["Alea","ServerNonce"],(function(t,n,r,o,a,i){"use strict";var e=4294967296,l=n("ServerNonce").ServerNonce,s;function u(){return s==null&&(s=n("Alea")(l)),s}var c={random:(function(){var n=typeof Uint32Array=="function"?new Uint32Array(1):null,r=t.crypto||t.msCrypto;if(n!=null)try{var o=r==null?void 0:r.getRandomValues;if(typeof o=="function"){var a=o.bind(r);return function(){try{a(n)}catch(e){return u()()}return n[0]/e}}}catch(e){}return u()})(),uint32:function(){return Math.floor(c.random()*e)},intBetween:function(t,n){return Math.floor(c.random()*(n-t+1)+t)},coinflip:(function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t})(function(e){return e===0?!1:e<=1?!0:c.random()*e<=1})};a.exports=c}),null);
|
|
138
|
+
__d("ServerTime",["ServerTimeData"],(function(t,n,r,o,a,i,l){var e,s=0,u=0,c=null,d=(e=(typeof window!="undefined"?window:self).performance)==null?void 0:e.timing;if(d){var m=d.requestStart,p=d.domLoading;if(m&&p){var _=r("ServerTimeData").timeOfResponseStart-r("ServerTimeData").timeOfRequestStart,f=p-m-_;u=f/2;var g=p-r("ServerTimeData").timeOfResponseStart-u,h=Math.max(50,f*.8);Math.abs(g)>h&&(s=g,c=Date.now())}}else b(r("ServerTimeData").serverTime);function y(){return Date.now()-s}function C(){return s}function b(e){var t=Date.now()-e;Math.abs(s-t)>6e4&&(s=t,c=Date.now())}function v(){return c===null?null:Date.now()-c}var S=y,R=C;l.getMillis=y,l.getOffsetMillis=C,l.update=b,l.getMillisSinceLastUpdate=v,l.get=S,l.getSkew=R}),98);
|
|
139
|
+
__d("WebSessionDefaultTimeoutMs",[],(function(t,n,r,o,a,i){"use strict";var e=35e3;i.default=e}),66);
|
|
140
|
+
__d("CookieConsent",["InitialCookieConsent"],(function(t,n,r,o,a,i,l){"use strict";var e,s=new Set((e||(e=r("InitialCookieConsent"))).initialConsent),u=e.shouldShowCookieBanner,c={setConsented:function(){s.add(1),u=!1},shouldShowCookieBanner:function(){return u},shouldWaitForDeferredDatrCookie:function(){return(e||(e=r("InitialCookieConsent"))).shouldWaitForDeferredDatrCookie},isFirstPartyStorageAllowed:function(){return!(e||(e=r("InitialCookieConsent"))).noCookies&&c.hasFirstPartyConsent()},hasFirstPartyConsent:function(){return s.has(1)},hasIndividualThirdPartyIntegrationConsent:function(t){var e,n=c.hasThirdPartyConsent([t]);return(e=n.get(t))!=null?e:!1},hasThirdPartyConsent:function(n){var t=new Map;if(!(e||(e=r("InitialCookieConsent"))).hasGranularThirdPartyCookieConsent){var o=s.has(2);for(var a of n)(e||(e=r("InitialCookieConsent"))).exemptedIntegrations.includes(a)?t.set(a,!0):t.set(a,o);return t}for(var i of n)(e||(e=r("InitialCookieConsent"))).optedInIntegrations.includes(i)?t.set(i,!0):t.set(i,!1);return t},isThirdPartyConsentRequiredForMetaPixel:function(){return(e||(e=r("InitialCookieConsent"))).consentRequiredForMetaPixel},isThirdPartyIntegrationEmbedAllowed:function(n){return(e||(e=r("InitialCookieConsent"))).hasGranularThirdPartyCookieConsent?!(e||(e=r("InitialCookieConsent"))).noCookies&&(e||(e=r("InitialCookieConsent"))).optedInIntegrations.includes(n):(e||(e=r("InitialCookieConsent"))).exemptedIntegrations.includes(n)?!(e||(e=r("InitialCookieConsent"))).noCookies:!(e||(e=r("InitialCookieConsent"))).noCookies&&s.has(2)}},d=c;l.default=d}),98);
|
|
141
|
+
__d("getErrorSafe",["fb-error"],(function(t,n,r,o,a,i,l){"use strict";l.default=r("fb-error").getErrorSafe}),98);
|
|
142
|
+
__d("isQuotaExceededError",[],(function(t,n,r,o,a,i){"use strict";function e(e){if(!(e instanceof t.DOMException))return!1;var n=e;return n.code===22||n.code===1014||n.name==="QuotaExceededError"||n.name==="NS_ERROR_DOM_QUOTA_REACHED"}function l(t,n){return!!(e(n)&&t&&t.length!==0)}i.isQuotaExceededError=e,i.isStorageQuotaExceededError=l}),66);
|
|
143
|
+
__d("WebStorage",["CookieConsent","FBLogger","err","getErrorSafe","isQuotaExceededError"],(function(t,n,r,o,a,i,l){"use strict";var e,s={},u={},c="localStorage",d="sessionStorage",m=!1,p=typeof window!="undefined"?window:self;function _(t,n,o){return(e||(e=r("CookieConsent"))).isFirstPartyStorageAllowed()?(Object.prototype.hasOwnProperty.call(t,o)||(t[o]=n(o)),t[o]):(m||(r("FBLogger")("web_storage").warn("Failed to get %s because of missing cookie consent",o.toString()),m=!0),null)}function f(e){try{return p[e]}catch(e){r("FBLogger")("web_storage").warn("Failed to get storage for read %s",r("getErrorSafe")(e).message)}return null}function g(e){var t=null;try{if(t=p[e],t!=null&&typeof t.setItem=="function"&&typeof t.removeItem=="function"){var n="__test__"+Date.now();t.setItem(n,""),t.removeItem(n)}else return null}catch(n){if(o("isQuotaExceededError").isStorageQuotaExceededError(t,r("getErrorSafe")(n))===!1)return r("FBLogger")("web_storage").catching(r("getErrorSafe")(n)).warn("Failed to get WebStorage of type `%s`",e),null}return t}function h(e){var t=null;try{if(t=p[e],t!=null&&typeof t.setItem=="function"&&typeof t.removeItem=="function"){var n="__test__"+Date.now();t.setItem(n,""),t.removeItem(n)}}catch(e){if(o("isQuotaExceededError").isStorageQuotaExceededError(t,r("getErrorSafe")(e))===!0)return!0}return!1}function y(e){for(var t=[],n=0;n<e.length;n++)t.push(e.key(n)||"");return t}function C(e,t,n){if(e==null)return r("err")("storage cannot be null");var o=null;try{e.setItem(t,n)}catch(i){var a=y(e).map(function(t){var n=(e.getItem(t)||"").length;return t+"("+n+")"});o=r("err")("%sStorage quota exceeded while setting %s(%s). Items(length) follows: %s",r("getErrorSafe")(i).name?r("getErrorSafe")(i).name+": ":"",t,n.length,a.join())}return o}var b={getLocalStorage:function(){return _(s,g,c)},getAllowlistedKeyFromLocalStorage:function(t){var e;return(e=_(u,f,c))==null?void 0:e.getItem(t)},getSessionStorage:function(){return _(s,g,d)},getAllowlistedKeyFromSessionStorage:function(t){var e;return(e=_(u,f,d))==null?void 0:e.getItem(t)},getLocalStorageForRead:function(){return _(u,f,c)},getSessionStorageForRead:function(){return _(u,f,d)},isLocalStorageQuotaExceeded:function(){return h(c)},isSessionStorageQuotaExceeded:function(){return h(d)},setItemGuarded:C,setAllowlistedKeyToLocalStorage:function(t,n,r){return C(t,n,r)},clearCaches:function(){s={},u={}}},v=b;l.default=v}),98);
|
|
144
|
+
__d("WebSession",["FBLogger","Random","WebSessionDefaultTimeoutMs","WebStorage"],(function(t,n,r,o,a,i,l){"use strict";var e,s=36,u=6,c=Math.pow(s,u);function d(e){return e==null||Number.isFinite(e)===!1||e<=0?null:e}function m(e){if(e==null)return null;var t=parseInt(e,10);return""+t!==e?(r("FBLogger")("web_session").warn("Expected the web session expiry time to parse as an integer. Found `%s`.",String(e)),null):d(t)}function p(e){return e==null?null:e.length!==u?(r("FBLogger")("web_session").warn("Expected the web session id to be a %d character string. It was %d character(s). Received `%s`.",u,e.length,e),null):/^[a-z0-9]+$/.test(e)===!1?(r("FBLogger")("web_session").warn("Expected the web session ID to be a base-%d encoded string. Received `%s`.",s,e),null):e}function _(e){if(e==null)return null;if(typeof e!="string"&&!(e instanceof String))return r("FBLogger")("web_session").warn("A non-string value was passed to `coerceSession`. This should be impossible according to this method's Flow type. The value was `%s`.",e),null;var t=e.split(":"),n=t[0],o=t[1],a=m(o),i=p(n);return a==null||i==null?null:{expiryTime:a,id:i}}function f(){var e=Math.floor(o("Random").random()*c),t=e.toString(s);return"0".repeat(u-t.length)+t}var g=null;function h(){return g==null&&(g=f()),g}function y(t){t===void 0&&(t=Date.now());var n=(e||(e=r("WebStorage"))).getLocalStorageForRead();if(n==null)return null;try{var o=_(n.getItem("Session"));return o&&t<o.expiryTime?o:null}catch(e){return null}}function C(){var t=(e||(e=r("WebStorage"))).getSessionStorageForRead();if(t==null)return null;var n=p(t.getItem("TabId"));if(n==null){var o=(e||(e=r("WebStorage"))).getSessionStorage();if(o==null)return null;var a=f();return e.setItemGuarded(o,"TabId",a),a}return n}function b(t){if(t!==void 0&&d(t)==null){r("FBLogger")("web_session").warn("`WebSession.extend()` was passed an invalid target expiry time `%s`.",t);return}var n=Date.now(),o=t!=null?t:n+r("WebSessionDefaultTimeoutMs"),a=y(n);if(!(a&&a.expiryTime>=o||o<=n)){var i=(e||(e=r("WebStorage"))).getLocalStorage();if(i!=null){var l=a==null?f():a.id;(e||(e=r("WebStorage"))).setItemGuarded(i,"Session",l+":"+o)}}}function v(){var e;return(e=y())==null?void 0:e.id}function S(){var e,t,n=h(),r=(e=v())!=null?e:"",o=(t=C())!=null?t:"";return r+":"+o+":"+n}function R(){return h()}l.getTabId=C,l.extend=b,l.getSessionId=v,l.getId=S,l.getPageId_DO_NOT_USE=R}),98);
|
|
145
|
+
__d("justknobx",["invariant"],(function(t,n,r,o,a,i,l,s){"use strict";var e={},u={getBool:function(t){s(0,47459)},getInt:function(t){s(0,47459)},_:function(n){var t=e[n];return t!=null||s(0,47458,n),t.r},add:function(n,r){for(var t in n)r&&r.entry++,t in e?r&&r.dup_entry++:e[t]=n[t]}},c=u;l.default=c}),98);
|
|
146
|
+
__d("PromiseAnnotate",[],(function(t,n,r,o,a,i){"use strict";function e(e,t){return e.displayName=t,e}function l(e){var t=e.displayName;return typeof t=="string"?t:null}i.setDisplayName=e,i.getDisplayName=l}),66);
|
|
147
|
+
__d("asyncToGeneratorRuntime",["Promise"],(function(t,n,r,o,a,i){"use strict";var e;function l(t,r,o,a,i,l,s){try{var u=t[l](s),c=u.value}catch(e){o(e);return}u.done?r(c):(e||(e=n("Promise"))).resolve(c).then(a,i)}function s(t){return function(){var r=this,o=arguments;return new(e||(e=n("Promise")))(function(e,n){var a=t.apply(r,o);function i(t){l(a,e,n,i,s,"next",t)}function s(t){l(a,e,n,i,s,"throw",t)}i(void 0)})}}i.asyncToGenerator=s}),66);
|
|
148
|
+
__d("promiseDone",["ErrorPubSub","PromiseAnnotate","asyncToGeneratorRuntime","getErrorSafe"],(function(t,n,r,o,a,i,l){var e,s;function u(e){var t=r("getErrorSafe")(e);t.loggingSource="PROMISE_DONE",(s||(s=r("ErrorPubSub"))).reportError(t)}function c(e){return(function(){var t=n("asyncToGeneratorRuntime").asyncToGenerator(function*(t){try{var n=yield e(t);return n}catch(e){u(e)}});return function(e){return t.apply(this,arguments)}})()}function d(t,n,r){var a=r!=null?c(r):null,i=arguments.length>1?t.then(n,a):t;r==null&&i.then(null,u);var l=(e||(e=o("PromiseAnnotate"))).getDisplayName(t);l!=null&&(e||(e=o("PromiseAnnotate"))).setDisplayName(i,l)}l.default=d}),98);
|
|
149
|
+
__d("FalcoLoggerInternal",["AnalyticsCoreData","FBLogger","FalcoConsentChecker","FalcoLoggerInternalState","FalcoUtils","Promise","Random","ServerTime","WebSession","err","justknobx","performanceAbsoluteNow","promiseDone"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c=o("FalcoUtils").getTaggedBitmap(0),d=o("FalcoUtils").getTaggedBitmap(37),m=500*1024*.6,p={};function _(){try{var e;if(r("justknobx")._("1276")&&window.self!==window.top&&(e=window.top)!=null&&e.require){var t=window.top.require("FalcoLoggerInternalState");if(t!=null)return r("FBLogger")("falco","iframe_handling").warn("Successfully delegated internal state to top frame"),t.getInstance()}}catch(e){}return r("FalcoLoggerInternalState").getInstance()}var f=_();function g(e,t,n){var a=r("Random").coinflip(t.r);if(!a)return o("FalcoUtils").bumpODSMetrics(n,"event.filters.sampling",1),!1;var i=t.c;if(i!=null&&(s||(s=r("AnalyticsCoreData"))).consents!=null){var l=h(i,(s||(s=r("AnalyticsCoreData"))).consents,e);if(!l)return o("FalcoUtils").bumpODSMetrics(n,"event.filters.consent",1),!1}return!0}function h(e,t,n){var o=p[e];return o==null&&(o=p[e]=JSON.parse(e)),r("FalcoConsentChecker")(t,n,o,o[0])}function y(){return(u||(u=r("performanceAbsoluteNow")))()-o("ServerTime").getOffsetMillis()}function C(e,t,n,o,a,i){if((s||(s=r("AnalyticsCoreData"))).enable_observer){var l=babelHelpers.extends({name:e,time:t,sampled:n,getData:a,policy:o},i&&{getPrivacyContext:i});L.emit("event",l)}}function b(e,t,n,a,i,l){var u=JSON.stringify(i);if(u.length>m){o("FalcoUtils").bumpODSMetrics(e,"event.filters.exceeded_size",1),r("FBLogger")("falco","oversized_message:"+e).warn('Dropping event "%s" due to exceeding the max size %s at %s',e,m,u.length);return}var p=o("FalcoUtils").xorBitmap([0,0],c);p=o("FalcoUtils").xorBitmap(p,d);var _={name:e,policy:t,time:n,extra:u,privacyContext:a,tags:p,sessionId:o("WebSession").getId(),deviceId:(s||(s=r("AnalyticsCoreData"))).device_id,appVersion:s.app_version};l.wrapAndEnqueueItem(_),o("FalcoUtils").bumpODSMetrics(e,"event.captured",1)}function v(e,t,n,a,i,l){try{var s=y();o("FalcoUtils").bumpODSMetrics(e,"event.logged",1);var u=g(s,t,e);if(u){var c=a(),d=n&&n();i?r("promiseDone")(i().then(function(n){b(e,t,s,d,babelHelpers.extends({},c,n),l)}).catch(function(n){r("FBLogger")("falco","canonical_resolution_failed").catching(n instanceof Error?n:r("err")(String(n))).warn('Failed to resolve canonicals for "%s", logging without them',e),b(e,t,s,d,c,l)})):b(e,t,s,d,c,l)}C(e,s,u,t,a,n)}catch(e){R(e)}}function S(t,a,i,l,s,u){try{var c=y();o("FalcoUtils").bumpODSMetrics(t,"event.logged",1);var d=g(c,a,t);if(d){var m=l(),p=(e||(e=n("Promise"))).resolve(i&&i()),_=s?s().catch(function(e){return r("FBLogger")("falco","canonical_resolution_failed").catching(e instanceof Error?e:r("err")(String(e))).warn('Failed to resolve canonicals for "%s", logging without them',t),null}):null;return e.all([m,p,_]).then(function(e){var n=e[0],r=e[1],o=e[2];b(t,a,c,r,o?babelHelpers.extends({},n,o):n,u),C(t,c,d,a,function(){return n},r&&function(){return r})})}else return C(t,c,d,a,l,i),(e||(e=n("Promise"))).resolve()}catch(t){return(e||(e=n("Promise"))).reject(t)}}function R(e){var t=r("FBLogger")("falco");e instanceof Error?t.catching(e).warn("Error while attempting to log to Falco"):t.warn("Caught non-error while attempting to log to Falco: %s",JSON.stringify(e))}var L=f.observable;function E(e,t,n){var r=f.logCriticalQueue,o=f.logImmediatelyQueue,a=f.logQueue;return{log:function(o,i){v(e,t,i,o,n,a)},logAsync:function(o,i){S(e,t,i,o,n,a).catch(R)},logImmediately:function(a,i){v(e,t,i,a,n,o)},logCritical:function(a,i){v(e,t,i,a,n,r)},logRealtimeEvent:function(a,i){v(e,t,i,a,n,r)}}}l.observable=L,l.create=E}),98);
|
|
150
|
+
__d("Run",["cr:310"],(function(t,n,r,o,a,i,l){"use strict";var e;l.__domContentCallback=(e=n("cr:310")).__domContentCallback,l.__onloadCallback=e.__onloadCallback,l.onAfterLoad=e.onAfterLoad,l.onAfterUnload=e.onAfterUnload,l.onBeforeUnload=e.onBeforeUnload,l.maybeOnBeforeUnload=e.maybeOnBeforeUnload,l.onLeave=e.onLeave,l.onLoad=e.onLoad,l.onUnload=e.onUnload}),98);
|
|
151
|
+
__d("clearTimeout",["cr:3725"],(function(t,n,r,o,a,i,l){"use strict";l.default=n("cr:3725")}),98);
|
|
152
|
+
__d("pageID",["WebSession"],(function(t,n,r,o,a,i,l){"use strict";var e=o("WebSession").getPageId_DO_NOT_USE();l.default=e}),98);
|
|
153
|
+
__d("setTimeout",["cr:4344"],(function(t,n,r,o,a,i,l){"use strict";l.default=n("cr:4344")}),98);
|
|
154
|
+
__d("WebStorageMutex",["WebStorage","clearTimeout","pageID","setTimeout"],(function(t,n,r,o,a,i,l){"use strict";var e,s=null,u=!1,c=r("pageID");function d(){return u||(u=!0,s=(e||(e=r("WebStorage"))).getLocalStorage()),s}var m=(function(){function t(e){this.name=e}t.testSetPageID=function(t){c=t};var n=t.prototype;return n.$2=function(){var e=d();if(!e)return c;var t=e.getItem("mutex_"+this.name);return t=(t!=null?t:"").split(":"),t&&parseInt(t[1],10)>=Date.now()?t[0]:null},n.$3=function(n){var t=d();if(t){var o=n==null?1e3:n,a=Date.now()+o;(e||(e=r("WebStorage"))).setItemGuarded(t,"mutex_"+this.name,c+":"+a)}},n.hasLock=function(){return this.$2()===c},n.lock=function(t,n,o){var e=this;this.$1&&r("clearTimeout")(this.$1),c===(this.$2()||c)&&this.$3(o),this.$1=r("setTimeout")(function(){e.$1=null;var r=e.hasLock()?t:n;r&&r(e)},0)},n.unlock=function(){this.$1&&r("clearTimeout")(this.$1);var e=d();e&&this.hasLock()&&e.removeItem("mutex_"+this.name)},t})();l.default=m}),98);
|
|
155
|
+
__d("guid",[],(function(t,n,r,o,a,i){function e(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"&&typeof String.prototype.padStart=="function"){var e=crypto.getRandomValues(new Uint32Array(2));return"f"+e[0].toString(16).padStart(8,"0")+e[1].toString(16).padStart(8,"0")}return"f"+(Math.random()*(1<<30)).toString(16).replace(".","")}i.default=e}),66);
|
|
156
|
+
__d("TimerStorage",[],(function(t,n,r,o,a,i){var e={ANIMATION_FRAME:"ANIMATION_FRAME",IDLE_CALLBACK:"IDLE_CALLBACK",IMMEDIATE:"IMMEDIATE",INTERVAL:"INTERVAL",TIMEOUT:"TIMEOUT"},l={};Object.keys(e).forEach(function(e){return l[e]={}});var s=babelHelpers.extends({},e,{set:function(t,n){l[t][n]=!0},unset:function(t,n){delete l[t][n]},clearAll:function(t,n){Object.keys(l[t]).forEach(n),l[t]={}},getStorages:function(){return{}}}),u=s;i.default=u}),66);
|
|
157
|
+
__d("nativeRequestAnimationFrame",[],(function(t,n,r,o,a,i){var e=t.__fbNativeRequestAnimationFrame||t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame,l=e;i.default=l}),66);
|
|
158
|
+
__d("requestAnimationFramePolyfill",["ExecutionEnvironment","nativeRequestAnimationFrame","performanceNow"],(function(t,n,r,o,a,i,l){var e,s,u=0,c=r("nativeRequestAnimationFrame");if((e||(e=r("ExecutionEnvironment"))).isInWorker&&c!=null)try{c(function(){})}catch(e){c=null}var d=c||function(e){var n=(s||(s=r("performanceNow")))(),o=Math.max(0,16-(n-u));return u=n+o,t.setTimeout(function(){e((s||(s=r("performanceNow")))())},o)},m=d;l.default=m}),98);
|
|
159
|
+
__d("requestAnimationFrameAcrossTransitions",["TimeSlice","requestAnimationFramePolyfill"],(function(t,n,r,o,a,i,l){function e(e){var t=r("TimeSlice").guard(e,"requestAnimationFrame",{propagationType:r("TimeSlice").PropagationType.CONTINUATION});return r("requestAnimationFramePolyfill")(t)}l.default=e}),98);
|
|
160
|
+
__d("requestAnimationFrame",["TimeSlice","TimerStorage","requestAnimationFrameAcrossTransitions"],(function(t,n,r,o,a,i,l){function e(e){function t(t){r("TimerStorage").unset(r("TimerStorage").ANIMATION_FRAME,n),e(t)}r("TimeSlice").copyGuardForWrapper(e,t),t.__originalCallback=e;var n=r("requestAnimationFrameAcrossTransitions")(t);return r("TimerStorage").set(r("TimerStorage").ANIMATION_FRAME,n),n}l.default=e}),98);
|
|
161
|
+
__d("PersistedQueue",["AnalyticsCoreData","BaseEventEmitter","ExecutionEnvironment","Run","WebStorage","WebStorageMutex","cr:8958","err","guid","nullthrows","performanceAbsoluteNow","requestAnimationFrame"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c,d=864e5,m=30*1e3,p=new(r("BaseEventEmitter")),_;function f(t){if(t===void 0&&(t=!1),_===void 0){var n;if((n=(e||(e=r("AnalyticsCoreData"))).queue_activation_experiment)!=null&&n&&t)try{return(s||(s=r("WebStorage"))).getLocalStorageForRead()}catch(e){return null}var o="check_quota";try{var a=(s||(s=r("WebStorage"))).getLocalStorage();a?(a.setItem(o,o),a.removeItem(o),_=a):_=null}catch(e){_=null}}return _}function g(e){var t=e.prev,n=e.next;n&&(n.prev=t),t&&(t.next=n),e.next=null,e.prev=null}function h(e){return{item:e,next:null,prev:null}}function y(e,t){var n;return e+"^$"+((n=t==null?void 0:t.queueNameSuffix)!=null?n:"")}var C={},b={},v={},S=!1,R=(function(){function e(e,t){var n,o=this;if(this.$7=0,this.$3=e,this.$5=(n=t==null?void 0:t.queueNameSuffix)!=null?n:"",this.$4=y(e,t),this.$11=this.$4+"^$"+r("guid")(),this.$14=!1,t){var a;this.$8=(a=t.max_age_in_ms)!=null?a:d,this.$12=t.migrate,this.$13=t.onLoad}else this.$8=d;this.$9=[p.addListener("active",function(){(o.$10!=null||!o.$14)&&(o.$14=!0,o.$10=null,o.$15())}),p.addListener("inactive",function(){o.$10==null&&(o.$10=Date.now(),o.$16())})],((u||(u=r("ExecutionEnvironment"))).canUseDOM||(u||(u=r("ExecutionEnvironment"))).isInWorker)&&r("requestAnimationFrame")(function(){return o.$15()})}var t=e.prototype;return t.isActive=function(){var e=this.$10;return e==null?!0:Date.now()-e>m?(this.$10=null,p.emit("active",null),!0):!1},t.$15=function(){this.$17(),this.$18()},t.$16=function(){this.$19()},t.getFullName=function(){return this.$4},t.getQueueNameSuffix=function(){return this.$5},e.isQueueActivateExperiment=function(){return S},e.setOnQueueActivateExperiment=function(){S=!0},e.create=function(n,o){var t=y(n,o);if(t in C)throw r("err")("Duplicate queue created: "+n);var a=new e(n,o);C[t]=a,v[n]?v[n].push(a):v[n]=[a];var i=b[n];return i&&a.setHandler(i),a},e.setHandler=function(t,n){if(v[t]){var e=v[t];for(var r of e)r.setHandler(n)}b[t]=n},t.destroy=function(){this.$9.forEach(function(e){return e.remove()})},e.destroy=function(t,n){var e=y(t,n);C[e].destroy(),delete C[e]},t.setHandler=function(t){return this.$6=t,this.$18(),this},t.$18=function(){this.$7>0&&this.$6&&this.$6(this)},t.length=function(){return this.$7},t.enumeratedLength=function(){return this.$20().length},e.isPersistenceAllowed=function(){var e=f();return!!e},e.getSuffixesForKey=function(t){var e=[];try{var n=f(!0);if(!n)return e;for(var r=t+"^$",o=0;o<n.length;o++){var a=n.key(o);if(typeof a=="string"&&a.startsWith("mutex_falco_"))n.removeItem(a);else if(typeof a=="string"&&a.startsWith(r)){var i=a.split("^$");if(i.length>2){var l=i[1];e.push(l)}else e.push("")}}}catch(e){}return e},t.$17=function(){var e=this,t=f(!0);if(t){var o=this.$4+"^$",a=new(r("WebStorageMutex"))(o),i=this.$12,l=this.$13;a.lock(function(a){var s=Date.now()-e.$8;try{for(var u=0;u<t.length;u++){var c=t.key(u);if(typeof c=="string"&&c.startsWith(o)){var d=t.getItem(c);if(t.removeItem(c),d!=null&&d.startsWith("{")){var m=n("cr:8958").parse(r("nullthrows")(d));if(m.ts>s)try{for(var p of m.items){var _=i!=null?i(p):p;_=l!=null?l(p):p,e.$21(_)}}catch(e){}}}}}catch(e){}a.unlock(),e.$18()})}},t.$19=function(){var e=f();if(e){var t=this.$20();if(t.length===0){e.getItem(this.$11)!=null&&e.removeItem(this.$11);return}(s||(s=r("WebStorage"))).setItemGuarded(e,this.$11,n("cr:8958").stringify({items:t.map(function(e){return e}),ts:(c||(c=r("performanceAbsoluteNow")))()}))}},t.$20=function(){var e=this.$1,t=[];if(!e)return t;do t.push(e.item);while(e=e.prev);return t.reverse()},t.markItemAsCompleted=function(t){var e=t.prev;g(t),this.$1===t&&(this.$1=e),this.$7--,this.isActive()||this.$19()},t.markItemAsFailed=function(t){g(t);var e=this.$2;if(e){var n=e.prev;n&&(n.next=t,t.prev=n),t.next=e,e.prev=t}this.$2=t,this.isActive()&&this.$18()},t.markItem=function(t,n){n?this.markItemAsCompleted(t):this.markItemAsFailed(t)},t.$21=function(t){var e=h(t),n=this.$1;n&&(n.next=e,e.prev=n),this.$1=e,this.$2||(this.$2=e),this.$7++},t.wrapAndEnqueueItem=function(t){this.$21(t),this.isActive()?this.$18():this.$19()},t.dequeueItem=function(){if(this.$10!=null)return null;var e=this.$2;return e?(this.$2=e.next,e):null},e})();if(R.eventEmitter=p,(u||(u=r("ExecutionEnvironment"))).canUseDOM){var L=o("Run").maybeOnBeforeUnload(function(){p.emit("inactive",null),L==null||L.remove()},!1);if(!L)var E=o("Run").onUnload(function(){p.emit("inactive",null),E.remove()})}l.default=R}),98);
|
|
162
|
+
__d("FalcoUtils",["AnalyticsCoreData","ODS","PersistedQueue","nullthrows"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u="ods_web_batch",c=p(33);function d(e){var t;return e.tags=_((t=e.tags)!=null?t:[0,0],c),e}function m(e){if(e){var t=e.appScopedIdentity,n=e.claim,r=e.fbIdentity,o="";if(r){var a=r.accountId,i=r.actorId;o=a+"^#"+i+"^#"}else t!==void 0&&(o="^#^#"+t);return o+"^#"+n}return""}function p(e){return e>30?[0,1<<e-30]:[1<<e,0]}function _(e,t){return[e[0]|t[0],e[1]|t[1]]}function f(t,n,a){var i;t!==u&&(s||(s=o("ODS"))).bumpEntityKey(7173,"entities.ff_js_web."+t+"."+(e||(e=r("AnalyticsCoreData"))).app_id+"."+((i=(e||(e=r("AnalyticsCoreData"))).app_version)!=null?i:"0").split(".")[0]+"."+e.push_phase,n,a)}function g(e,t,n){var o,a=(o=r("PersistedQueue").getSuffixesForKey(e))!=null?o:[];a.push(t);for(var i of a){var l=e+"^$"+i;if(!n.has(l)){var s=r("PersistedQueue").create(e,{onLoad:d,queueNameSuffix:i});n.set(l,s)}}return r("nullthrows")(n.get(e+"^$"+t))}l.identityToString=m,l.getTaggedBitmap=p,l.xorBitmap=_,l.bumpODSMetrics=f,l.createQueue=g}),98);
|
|
163
|
+
__d("FalcoLoggerInternalState",["AnalyticsCoreData","BaseEventEmitter","FalcoUtils"],(function(t,n,r,o,a,i,l){"use strict";var e,s=(function(){function t(){var t;this.queuesMap=new Map;var n=(t=o("FalcoUtils")).identityToString((e||(e=r("AnalyticsCoreData"))).identity);this.observable=new(r("BaseEventEmitter")),this.logQueue=o("FalcoUtils").createQueue("falco_queue_log",n,this.queuesMap),this.logImmediatelyQueue=o("FalcoUtils").createQueue("falco_queue_immediately",n,this.queuesMap),this.logCriticalQueue=o("FalcoUtils").createQueue("falco_queue_critical",n,this.queuesMap)}return t.getInstance=function(){return t.$1||(t.$1=new t),t.$1},t})();s.$1=null,l.default=s}),98);
|
|
164
|
+
__d("BanzaiLazyQueue",["SimpleHook"],(function(t,n,r,o,a,i,l){var e=[],s=new(o("SimpleHook")).SimpleHook,u={onQueue:s,queuePost:function(n,r,o){e.push([n,r,o]),s.call(n,r,o)},flushQueue:function(){var t=e;return e=[],t}};i.exports=u}),34);
|
|
165
|
+
__d("gkx",["invariant","BanzaiLazyQueue","ExecutionEnvironment","emptyFunction"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u={},c={};function d(t){var n=u[t];return n!=null||s(0,11797,t),c[t]||(c[t]=!0,n.hash!=null&&((e||(e=r("ExecutionEnvironment"))).canUseDOM||(e||(e=r("ExecutionEnvironment"))).isInWorker)&&o("BanzaiLazyQueue").queuePost("gk2_exposure",{identifier:t,hash:n.hash})),n.result}d.add=function(e,t){for(var n in e)t&&t.entry++,n in u?t&&t.dup_entry++:u[n]=e[n]},d.addLoggedInternal=function(e){d.add(e);for(var t in e)c[t]=!0};var m=r("emptyFunction");d.getGKs=function(){return null},d.getLogged=function(){return Object.keys(c).map(function(e){return{identifier:e,hash:u[e].hash}})},d.setPass=m,d.setFail=m,d.clear=m;var p=d;l.default=p}),98);
|
|
166
|
+
__d("ODS",["ExecutionEnvironment","FBLogger","OdsWebBatchFalcoEvent","Random","Run","clearTimeout","gkx","setTimeout"],(function(t,n,r,o,a,i,l){var e,s,u=(e||(e=r("ExecutionEnvironment"))).canUseDOM||(e||(e=r("ExecutionEnvironment"))).isInWorker,c={};function d(e,t,n,r,o){var a;r===void 0&&(r=1),o===void 0&&(o=1);var i=(a=c[t])!=null?a:null;if(!(i!=null&&i<=0)){s=s||{};var l=s[e]||(s[e]={}),u=l[t]||(l[t]={}),d=u[n]||(u[n]={n:0,d:null}),m=Number(r),_=Number(o);if(i>0&&(m/=i,_/=i),!(!isFinite(m)||!isFinite(_))){if(d.n+=m,arguments.length>=5){var f=d.d;f==null&&(f=0),d.d=f+_}p()}}}var m;function p(){m==null&&(m=r("setTimeout")(function(){h()},r("gkx")("20935")?13e3/2:5e3))}function _(e,t){u&&(c[e]=o("Random").random()<t?t:0)}function f(e,t,n,r){r===void 0&&(r=1),u&&d(e,t,n,r)}function g(e,t,n,r,o){r===void 0&&(r=1),o===void 0&&(o=1),u&&d(e,t,n,r,o)}function h(e){if(e===void 0&&(e="normal"),!u||(r("clearTimeout")(m),m=null,s==null))return;var t=s;s=null;function n(){return{batch:t}}e==="critical"?r("OdsWebBatchFalcoEvent").logCritical(n):r("OdsWebBatchFalcoEvent").log(n)}u&&o("Run").onUnload(function(){h("critical")}),l.setEntitySample=_,l.bumpEntityKey=f,l.bumpFraction=g,l.flush=h}),98);
|
|
167
|
+
__d("PerfFalcoEvent",["FalcoLoggerInternal","getFalcoLogPolicy_DO_NOT_USE"],(function(t,n,r,o,a,i,l){"use strict";var e=r("getFalcoLogPolicy_DO_NOT_USE")("1744178"),s=o("FalcoLoggerInternal").create("perf",e),u=s;l.default=u}),98);
|
|
168
|
+
__d("CurrentLocale",["IntlCurrentLocale"],(function(t,n,r,o,a,i,l){"use strict";var e={get:function(){return r("IntlCurrentLocale").code}},s=e;l.default=s}),98);
|
|
169
|
+
__d("Locale",["SiteData"],(function(t,n,r,o,a,i,l){function e(){return r("SiteData").is_rtl}l.isRTL=e}),98);
|
|
170
|
+
__d("PerfXSharedFields",["CurrentLocale","Locale","SiteData","getErrorSafe"],(function(t,n,r,o,a,i,l){var e=typeof window!="undefined"?window:self,s={addCommonValues:function(n){var t=e==null?void 0:e.navigator;try{t&&typeof t.hardwareConcurrency=="number"&&(n.num_cores=Math.floor(t.hardwareConcurrency)),t&&t.deviceMemory&&(n.ram_gb=t.deviceMemory),t&&t.connection&&(typeof t.connection.downlink=="number"&&(n.downlink_megabits=t.connection.downlink),typeof t.connection.effectiveType=="string"&&(n.effective_connection_type=t.connection.effectiveType),typeof t.connection.rtt=="number"&&(n.rtt_ms=t.connection.rtt))}catch(e){if(r("getErrorSafe")(e).message!=="can't access dead object")throw r("getErrorSafe")(e)}return n.client_push_phase=r("SiteData").push_phase,n.client_revision=r("SiteData").client_revision,r("SiteData").server_revision!=null&&(n.server_revision=r("SiteData").server_revision),n.locale=r("CurrentLocale").get(),n.isRTL=Number(o("Locale").isRTL()),n},getCommonData:function(){var e={};return s.addCommonValues(e),e}},u=s;l.default=u}),98);
|
|
171
|
+
__d("QPLCoreHelpers",[],(function(t,n,r,o,a,i){"use strict";function e(e,t,n,r,o,a,i){var l,s,u,c="unreliable";o!=null&&(c+="_"+o);var d={string:(l={},l.join_id=e,l.qpl_join__source_clock=c,l.qpl__source="client_js",l),int:(s={},s.qpl_join__absolute_time_origin_ms=t,s),bool:(u={},u.qpl_join__source_is_primary=n,u)};if(r!=null&&d.int&&(d.int.qpl_join__close_session_after_seconds=r),a!=null){var m;d.string_array=(m={},m.qpl_join__namespaces=a,m)}return i!=null&&d.int&&(d.int.qpl_join__action_priority=i),d}function l(e){switch(e){case 1:return"join_request_";case 0:return"join_request_";case 3:return"join_response_";case 2:return"join_response_";default:return null}}function s(e,t){var n=l(e);return n==null?null:n+t}i.generateJoinAnnotations=e,i.getAlignmentPointNamePrefix=l,i.getAlignmentPointName=s}),66);
|
|
172
|
+
__d("QPLEvent",[],(function(t,n,r,o,a,i){"use strict";function e(e){return e.i}function l(e){var t;return(t=e.r)!=null?t:0}function s(e){var t;return(t=e.m)!=null?t:1}i.getMarkerId=e,i.getSampleRate=l,i.getSamplingMethod=s}),66);
|
|
173
|
+
__d("DoublyLinkedListMap",[],(function(t,n,r,o,a,i){var e=(function(){"use strict";function e(){this.$1=null,this.$2=null,this.$3={},this.$4=0}var t=e.prototype;return t.get=function(t){var e,n=(e=this.$3[t])==null?void 0:e.data;return n!=null?n:null},t.getIndex=function(t){for(var e=this.$1,n=0;e;e=e.next,n++)if(e.key===t)return n;return null},t.$5=function(t,n,r,o){r!=null&&!this.$3[r]&&(r=null);var e;r!=null&&this.$3[r]?e=this.$3[r]:e=o?this.$1:this.$2;var a={data:n,key:t,next:null,prev:null};return e&&(this.remove(t),o?(a.prev=e.prev,e.prev&&(e.prev.next=a),e.prev=a,a.next=e):(a.next=e.next,e.next&&(e.next.prev=a),e.next=a,a.prev=e)),a.prev===null&&(this.$1=a),a.next===null&&(this.$2=a),this.$3[t]=a,this.$4++,this},t.insertBefore=function(t,n,r){return this.$5(t,n,r,!0)},t.insertAfter=function(t,n,r){return this.$5(t,n,r,!1)},t.prepend=function(t,n){return this.insertBefore(t,n,this.$1&&this.$1.key)},t.append=function(t,n){return this.insertAfter(t,n,this.$2&&this.$2.key)},t.remove=function(t){var e=this.$3[t];if(e){var n=e.next,r=e.prev;n&&(n.prev=r),r&&(r.next=n),this.$1===e&&(this.$1=n),this.$2===e&&(this.$2=r),delete this.$3[t],this.$4--}return this},t.find=function(t){for(var e=this.$1;e;e=e.next)if(t(e.data))return e.key;return null},t.reduce=function(t,n){for(var e=this.$1;e;e=e.next)n=t(e.data,n);return n},t.exists=function(t){return!!this.$3[t]},t.isEmpty=function(){return!this.$1},t.reset=function(){this.$1=null,this.$2=null,this.$3={},this.$4=0},t.map=function(t){for(var e=this.$1;e;e=e.next)t(e.data)},t.getCount=function(){return this.$4},t.getHead=function(){var e;return(e=this.$1)==null?void 0:e.data},t.getTail=function(){var e;return(e=this.$2)==null?void 0:e.data},t.getNext=function(t){var e;return(e=this.$3[t])==null||(e=e.next)==null?void 0:e.data},t.getPrev=function(t){var e;return(e=this.$3[t])==null||(e=e.prev)==null?void 0:e.data},t.getHeadKey=function(){var e;return(e=this.$1)==null?void 0:e.key},t.getTailKey=function(){var e;return(e=this.$2)==null?void 0:e.key},e})();a.exports=e}),null);
|
|
174
|
+
__d("QPLMarkerMap",["DoublyLinkedListMap"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e){var t=e===void 0?{}:e,n=t.perMarkerLimit,o=n===void 0?null:n,a=t.totalLimit,i=a===void 0?null:a;this.size=0,this.$1={},this.$4=i,this.$5=o,this.$3=new Map,this.$2=new(r("DoublyLinkedListMap"))}var t=e.prototype;return t.set=function(t,n,r){var e=this.$1[t];if(e===void 0){var o={};e=o,this.$1[t]=e}var a=Object.prototype.hasOwnProperty.call(e,n);a||(this.$6(t),this.$7()),this.$8(t,n),a||this.size++,e[n]=r},t.delete=function(t,n){var e=this.$1[t];e===void 0||!Object.prototype.hasOwnProperty.call(e,n)||(this.$9(t,n),delete e[n],this.size--,Object.keys(e).length===0&&delete this.$1[t])},t.get=function(t,n){var e=this.$1[t];if(e!==void 0)return e[n]},t.has=function(t,n){var e=this.$1[t];return e===void 0?!1:Object.prototype.hasOwnProperty.call(e,n)},t.forEach=function(t){var e=0;for(var n in this.$1){var r=Number(n),o=this.$1[r];for(var a in o){var i=Number(a);t(o[i],r,i,e++)}}},t.toString=function(){try{return JSON.stringify(this.$1)}catch(e){return"{}"}},t.$8=function(t,n){var e={markerId:t,instanceKey:n},r=this.$10(t,n),o=this.$4!=null,a=this.$5!=null;o&&(this.$2.remove(r),this.$2.append(r,e));var i=this.$11(t);a&&(i.remove(r),i.append(r,e))},t.$9=function(t,n){var e=this.$10(t,n),r=this.$4!=null,o=this.$5!=null;if(r&&this.$2.remove(e),o){var a=this.$3.get(t);a&&(a.remove(e),a.isEmpty()&&this.$3.delete(t))}},t.$6=function(t){var e=this.$5;if(e!=null){var n=this.$11(t);n.getCount()>=e&&this.$12(n)}},t.$7=function(){var e=this.$4;e!=null&&this.size>=e&&this.$12(this.$2)},t.$12=function(t){var e=t.getHeadKey();if(e!=null){var n=t.get(e);n&&this.delete(n.markerId,n.instanceKey)}},t.$10=function(t,n){return t+":"+n},t.$11=function(t){var e=this.$3.get(t);return e||(e=new(r("DoublyLinkedListMap")),this.$3.set(t,e)),e},e})();l.default=e}),98);
|
|
175
|
+
__d("QPLTimestamp",[],(function(t,n,r,o,a,i){"use strict";function e(e){if(e===0)return"0";var t=e.toFixed(6).split(".",2),n=t[0],r=t[1];return n==="0"?r.replace(/^0+/,""):n+r}function l(t,n){var r=n-t;return e(r)}i.timestampToSerializedNanoseconds=e,i.calculateDurationAsNanoseconds=l}),66);
|
|
176
|
+
__d("crc32",[],(function(t,n,r,o,a,i){function e(e){for(var t=-1,n=0,r=e.length;n<r;n++)t=t>>>8^l[(t^e.charCodeAt(n))&255];return~t}var l=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];t.Int32Array!==void 0&&(l=new Int32Array(l)),i.default=e}),66);
|
|
177
|
+
__d("QPLUtils",["crc32"],(function(t,n,r,o,a,i,l){"use strict";function e(e){return r("crc32")(e)>>>0}function s(t){return t!=null?e(t):0}l.unsignedCrc32=e,l.deriveInstanceKey=s}),98);
|
|
178
|
+
__d("QuickPerformanceLoggerTypes",[],(function(t,n,r,o,a,i){"use strict";var e=1,l=3;i.EVENT_BASED_SAMPLING=e,i.USER_BASED_SAMPLING=l}),66);
|
|
179
|
+
__d("uuidv4",[],(function(t,n,r,o,a,i){"use strict";function e(){var e,t=(e=self)==null||(e=e.crypto)==null?void 0:e.randomUUID;return typeof t=="function"?self.crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e==="x"?t:t&3|8;return n.toString(16)})}i.default=e}),66);
|
|
180
|
+
__d("QPLCore",["QPLCoreHelpers","QPLEvent","QPLMarkerMap","QPLTimestamp","QPLUtils","QuickPerformanceLoggerTypes","uuidv4"],(function(t,n,r,o,a,i,l){"use strict";var e;function s(e){if(e==null)return e;var t={};for(var n in e)t[n]=String(e[n]);return t}function u(e){if(e==null)return e;var t={};for(var n in e)t[n]=e[n].map(String);return t}function c(e,t,n,r){var o,a=t[e];if(!a||Object.entries(a).length===0)return null;var i={};return Object.keys(a).forEach(function(e){var t=a[e];t==null||t.length===0?delete a[e]:r?i[e]=r(t):i[e]=t}),o={},o[e]=babelHelpers.extends({},n&&n[e],i),o}function d(e,t){if(e==null)return t;var n=babelHelpers.extends({},t,c("string",e,t),c("int",e,t,Math.trunc),c("double",e,t),c("bool",e,t),c("string_array",e,t),c("int_array",e,t,function(e){return e.map(Math.trunc)}),c("double_array",e,t),c("bool_array",e,t));return Object.keys(n).forEach(function(e){var t=n[e];(t==null||Object.entries(t).length===0)&&delete n[e]}),Object.entries(n).length!==0?n:null}function m(e,t){var n={};g.isMarkerTracked(t)&&(n.tracked_for_loss=!0),typeof t.absoluteTimeOrigin=="number"&&(n.absolute_time_origin_ns=o("QPLTimestamp").timestampToSerializedNanoseconds(t.absoluteTimeOrigin));var r=babelHelpers.extends({},e,n);return r}function p(e,t){if(!t)return e;var n={};return t.string&&(n.annotations=t.string),t.int&&(n.annotations_int=s(t.int)),t.double&&(n.annotations_double=t.double),t.bool&&(n.annotations_bool=t.bool),t.string_array&&(n.annotations_string_array=t.string_array),t.int_array&&(n.annotations_int_array=u(t.int_array)),t.double_array&&(n.annotations_double_array=t.double_array),t.bool_array&&(n.annotations_bool_array=t.bool_array),babelHelpers.extends({},e,n)}var _=new Map([[o("QuickPerformanceLoggerTypes").EVENT_BASED_SAMPLING,"random_sampling"],[o("QuickPerformanceLoggerTypes").USER_BASED_SAMPLING,"per_user"]]);function f(e,t){return e===0?!1:e<=1?!0:typeof t=="string"?o("QPLUtils").unsignedCrc32(t)%e===0:Math.random()*e<=1}var g=(function(){function t(e){var t;this.$2=1,this.$3=100,this.$4=new Map,this.$5=new Map,this.$6=null,this.$8=new Map,this.activeMarkers=new Map,this.$1=e,this.$7=e.logger,this.$5=(t=e.listenersWithMarker)!=null?t:new Map,this.$9=new(r("QPLMarkerMap"))}var n=t.prototype;return n.$10=function(t,n){try{return n()}catch(e){this.$1.onError&&this.$1.onError(t,e)}},n.getMarker=function(n,r){var t=this;return this.$10("getMarker",function(){var a=t.$11((e||(e=o("QPLEvent"))).getMarkerId(n));if(!a)return null;var i=a.get(r);return i||null})},n.isMarkerOn=function(n,r){var t,a=this;return r===void 0&&(r=0),(t=this.$10("isMarkerOn",function(){var t=a.$11((e||(e=o("QPLEvent"))).getMarkerId(n));if(!t)return!1;var i=t.get(r);return!!i}))!=null?t:!1},t.isMarkerTracked=function(t){return t.trackedForLoss===!0||t.type===2},n.$11=function(t){return this.activeMarkers.get(t)},n.addMarker=function(t,n,r){var e=this.activeMarkers.get(t);e||(e=new Map,this.activeMarkers.set(t,e)),e.set(n,r)},n.deleteMarker=function(t,n){var e;(e=this.activeMarkers.get(t))==null||e.delete(n),this.$12(t,n)},n.markerStart=function(r,a,i,l){var n=this;a===void 0&&(a=0),i===void 0&&(i=this.currentTimestamp());var s=l===void 0?{}:l,u=s.cancelExisting,c=u===void 0?!1:u,d=s.cancelOnUnload,m=d===void 0?!1:d,p=s.trackedForLoss,_=p===void 0?!1:p,f=s.type,g=f===void 0?1:f,h=s.samplingBasis,y=h===void 0?null:h,C=s.qplInternalDoNotUseAbsoluteTimeOrigin,b=s.timeoutMS,v=b===void 0?null:b,S=s.onMarkerTimeout__DoNotUse,R=S===void 0?null:S,L=s.enableE2ETracing,E=L===void 0?!1:L,k=s.crashResilient,I=k===void 0?!1:k;this.$10("markerStart",function(){var l=n.getMarker(r,a);if(l){var s=Math.round(i-l.timestamp);c&&(n.markerAnnotate(r,{string:{cancelType:"DUPLICATE_EVENT"},int:{time_between_markers_ms:s}},{instanceKey:a}),n.markerEnd(r,4,a,i))}var u=n.$13(r,y),d=u[0],p=u[1],f=u[2],h=null;E&&(h=n.$1.e2eTracingIDGenerator?n.$1.e2eTracingIDGenerator(r):null);var b={event:r,passesSampling:d,timestamp:i,sampleRate:p,samplingMethod:f,points:[],cancelOnUnload:m,trackedForLoss:_,type:g,timeoutMS:v,e2eTracingID:h,isCrashResilient:I};if(typeof C=="number"&&(b.absoluteTimeOrigin=C),n.$4.forEach(function(e){e.onMarkerStart&&e.onMarkerStart(r,a,i)}),n.$5.forEach(function(e){e.onMarkerStartWithMarker(r,a,i,b)}),d&&(n.addMarker((e||(e=o("QPLEvent"))).getMarkerId(r),a,b),v!=null&&n.$14(r,a,v,R)),d&&t.isMarkerTracked(b)&&n.$15({marker_id:27787271,action_id:51,sample_rate:1,annotations_int:{tracked_marker_id:String((e||(e=o("QPLEvent"))).getMarkerId(r))},marker_type:1}),h!==null){var S;n.markerAnnotate(r,{string:(S={},S.qpl_e2e__tracing_id=h,S)},{instanceKey:a})}d&&n.$4.forEach(function(e){e.onMarkerStarted&&e.onMarkerStarted(r,a,i,n.$16(b))})})},n.$16=function(t){if(t==null){var e={isCrashResilient:!1};return e}return{isCrashResilient:t.isCrashResilient}},n.$17=function(t,n){this.$9.delete(t,n)},n.$18=function(t,n,r){this.$9.set(t,n,r)},n.$12=function(t,n){var e,r=this.$9.get(t,n);r&&(e=this.$1.runtimeAbstractionLayer)!=null&&e.clearTimeout&&(this.$1.runtimeAbstractionLayer.clearTimeout(r),this.$17(t,n))},n.$14=function(n,r,a,i){var t=this,l=(e||(e=o("QPLEvent"))).getMarkerId(n);try{var s,u;if(this.$12(l,r),!((s=this.$1.runtimeAbstractionLayer)!=null&&s.setTimeout))return;var c=(u=this.$1.runtimeAbstractionLayer)==null?void 0:u.setTimeout(function(){i!=null&&i(n,r),t.$4.forEach(function(e){e.onTimeoutEvent!=null&&e.onTimeoutEvent({event:n,instanceKey:r,passesSampling:!0})}),t.$17(l,r),t.markerEnd(n,113,r)},a);this.$18(l,r,c)}catch(e){}},n.markerAnnotate=function(t,n,r){var e=this,o=r===void 0?{}:r,a=o.instanceKey,i=a===void 0?0:a;this.$10("markerAnnotate",function(){e.$4.forEach(function(e){Object.keys(n).forEach(function(r){var o=n[r];o&&Object.keys(o).forEach(function(n){e.onAnnotation&&e.onAnnotation(t,i,n,o[n],r)})})});var r=e.getMarker(t,i);r&&(r.annotations=d(n,r.annotations))})},n.markerPoint=function(t,n,r){var e=this,o=r===void 0?{}:r,a=o.instanceKey,i=a===void 0?0:a,l=o.data,s=o.timestamp,u=s===void 0?this.currentTimestamp():s;this.$10("markerPoint",function(){e.$4.forEach(function(e){e.onMarkerPoint&&e.onMarkerPoint(t,i,n,l,u)});var r=e.getMarker(t,i);if(r){var o={name:n,timeSinceStart:Math.trunc(u-r.timestamp)},a=d(l);a&&(o.data=a),r.points.push(o)}})},n.markerEnd=function(n,r,a,i){var t=this;a===void 0&&(a=0),i===void 0&&(i=this.currentTimestamp()),this.$10("markerEnd",function(){var l=t.getMarker(n,a);if(!l){t.$4.forEach(function(e){var o={durationMs:0,passesSampling:!1};e.onMarkerEnd&&e.onMarkerEnd(r,n,a,i,babelHelpers.extends({},o,t.$16(l)))});return}var c=r,d=t.$19(l,l.timestamp,i);d&&r===2&&(c=5947);var f=l.points.map(function(e){return e.data?{name:e.name,timeSinceStart:String(e.timeSinceStart),data:(function(t,n,r,o,a,i,l,c){var d={};if(((t=e.data)==null?void 0:t.string)!=null&&(d.string=e.data.string),((n=e.data)==null?void 0:n.string_array)!=null&&(d.string_array=e.data.string_array),((r=e.data)==null?void 0:r.int)!=null){var m;d.int=s((m=e.data)==null?void 0:m.int)}if(((o=e.data)==null?void 0:o.int_array)!=null){var p;d.int_array=u((p=e.data)==null?void 0:p.int_array)}return((a=e.data)==null?void 0:a.double)!=null&&(d.double=e.data.double),((i=e.data)==null?void 0:i.double_array)!=null&&(d.double_array=e.data.double_array),((l=e.data)==null?void 0:l.bool)!=null&&(d.bool=e.data.bool),((c=e.data)==null?void 0:c.bool_array)!=null&&(d.bool_array=e.data.bool_array),d})()}:{name:e.name,timeSinceStart:String(e.timeSinceStart)}}),g={marker_id:(e||(e=o("QPLEvent"))).getMarkerId(n),action_id:c,instance_id:a,sample_rate:l.sampleRate,method:_.get(l.samplingMethod),duration_ns:o("QPLTimestamp").calculateDurationAsNanoseconds(l.timestamp,i),points:f,metadata:{application_analytics:{time_since_qpl_module_init:i-t.$1.moduleLoadTimestamp}},marker_type:l.type,flags:1,unique_marker_id_debug_only:l.uniqueMarkerDebugId},h=p(g,l.annotations),y=m(h,l);t.$4.forEach(function(e){var t={durationMs:l?i-l.timestamp:0,logData:y,passesSampling:l.passesSampling,isCrashResilient:l.isCrashResilient};e.onMarkerEnd&&e.onMarkerEnd(c,n,a,i,t)}),l.passesSampling&&(l.timestampIsApproximate!==!0&&t.$15(y),t.$6===(e||(e=o("QPLEvent"))).getMarkerId(n)&&t.$1.onDebuggingIdEnded&&t.$1.onDebuggingIdEnded()),t.deleteMarker(e.getMarkerId(n),a)})},n.markerDrop=function(n,r){var t=this;r===void 0&&(r=0),this.$10("markerDrop",function(){var a=t.getMarker(n,r);t.deleteMarker((e||(e=o("QPLEvent"))).getMarkerId(n),r);var i=t.currentTimestamp();t.$4.forEach(function(e){if(e.onMarkerDrop){var o;e.onMarkerDrop(n,r,i,babelHelpers.extends({passesSampling:(o=a==null?void 0:a.passesSampling)!=null?o:!1},t.$16(a)))}})})},n.markEvent=function(n,r,a,i){var t=this,l=i===void 0?{}:i,s=l.timestamp,u=s===void 0?this.currentTimestamp():s,c=l.annotations;this.$10("markEvent",function(){var i;if(t.$4.forEach(function(e){e.onMarkEvent&&e.onMarkEvent({event:n,timestamp:u,annotations:c})}),!((i=t.$1.quickLogConfigHelper)!=null&&i.isKillswitchOn())){var l=t.$13(n),s=l[0],m=l[1],f=l[2];if(s){var g=d(typeof c=="function"?c():c),h={marker_id:(e||(e=o("QPLEvent"))).getMarkerId(n),action_id:51,instance_id:0,sample_rate:m,method:_.get(f),da_type:r,da_level:a,metadata:{application_analytics:{time_since_qpl_module_init:u-t.$1.moduleLoadTimestamp}},marker_type:1,flags:1};t.$15(p(h,g))}}})},n.markerStartForJoin=function(t,n,r){var e=this,a=r===void 0?{}:r,i=a.instanceKey,l=i===void 0?0:i,s=a.cancelExisting,u=s===void 0?!1:s,c=a.cancelOnUnload,d=c===void 0?!1:c,m=a.trackedForLoss,p=m===void 0?!1:m,_=a.type,f=_===void 0?1:_,g=a.qplInternalDoNotUseAbsoluteTimeOrigin,h=g===void 0?null:g,y=a.timeoutMS,C=y===void 0?null:y,b=a.monotonicTimestamp,v=b===void 0?this.currentTimestamp():b,S=a.absoluteTimeOriginMs,R=S===void 0?this.currentUnixTimestamp():S,L=a.sourceIsPrimary,E=L===void 0?!1:L,k=a.closeSession,I=a.onMarkerTimeout__DoNotUse,T=a.unreliableSourceClockProcessId,D=a.crashResilient,x=a.joinNamespaces,$=a.actionPriority;this.$10("markerStartForJoin",function(){e.markerStart(t,l,v,{cancelExisting:u,cancelOnUnload:d,trackedForLoss:p,type:f,samplingBasis:n,qplInternalDoNotUseAbsoluteTimeOrigin:h,timeoutMS:C,onMarkerTimeout__DoNotUse:I,crashResilient:D});var r=o("QPLCoreHelpers").generateJoinAnnotations(n,R,E,k,T,x,$);e.markerAnnotate(t,r,{instanceKey:l})})},n.addAlignmentPointForJoin=function(t,n,r){var e=this,a=r===void 0?{}:r,i=a.instanceKey,l=i===void 0?0:i,s=a.requestId,u=s===void 0?"default_id":s,c=a.timestamp,d=c===void 0?this.currentTimestamp():c;this.$10("addAlignmentPointForJoin",function(){var r=o("QPLCoreHelpers").getAlignmentPointName(n,u);r!=null&&e.markerPoint(t,r,{instanceKey:l,timestamp:d})})},n.setAlwaysOnSampleRate=function(t,n){this.$8.set(t,n)},n.setDefaultSampleRate=function(t){this.$3=t},n.currentTimestamp=function(){var e,t=this;return(e=this.$10("currentTimestamp",function(){return t.$1.monotonicNowMs()}))!=null?e:0},n.currentUnixTimestamp=function(){var e,t=this;return(e=this.$10("currentUnixTimestamp",function(){return t.$1.unixNowMs()}))!=null?e:0},n.enableDebug=function(t){this.$6=t},n.disableDebug=function(){this.$6=null},n.addListener=function(t){var e,n=this;return(e=this.$10("addListener",function(){var e=n.$2++;return n.$4.set(e,t),{dispose:function(){n.$4.delete(e)}}}))!=null?e:{dispose:function(){}}},n.$13=function(n,r){var t,a;if(this.$1.unsampleAllEvents&&this.$1.unsampleAllEvents()||this.$6===(e||(e=o("QPLEvent"))).getMarkerId(n))return[!0,1,o("QuickPerformanceLoggerTypes").EVENT_BASED_SAMPLING];var i=(e||(e=o("QPLEvent"))).getSampleRate(n),l=e.getSamplingMethod(n);if(this.$8.get(n)==null&&i!==0&&l===o("QuickPerformanceLoggerTypes").USER_BASED_SAMPLING)return[!0,i!=null?i:1,o("QuickPerformanceLoggerTypes").USER_BASED_SAMPLING];var s=(t=(a=this.$8.get(n))!=null?a:i)!=null?t:this.$3,u=l!=null?l:o("QuickPerformanceLoggerTypes").EVENT_BASED_SAMPLING,c=f(s,r);return[c,s,u]},n.$15=function(t){this.$4.forEach(function(e){e.onUploadEvent&&e.onUploadEvent(t)});var e=this.$1.decorateEventBeforeUpload?this.$1.decorateEventBeforeUpload(t):t;this.$1.sendEvent(t,e)},n.$19=function(t,n,r){if(t.timeoutMS==null)return!1;var e=r-n;return e>=t.timeoutMS},n.getActiveMarkerIds=function(t){var e,n=this,r=t.type;return(e=this.$10("getActiveMarkerIds",function(){var e=new Set;return n.activeMarkers.forEach(function(t,n){t.forEach(function(t){if(t.type===r){e.add(n);return}})}),Array.from(e)}))!=null?e:[]},n.getActiveE2ETraceIds=function(){var e,t=this;return(e=this.$10("getActiveE2ETraceIds",function(){var e=new Map;return t.activeMarkers.forEach(function(t,n){var r=new Map;t.forEach(function(e,t){e.e2eTracingID!=null&&r.set(t,{e2eTraceID:e.e2eTracingID,qplEvent:e.event})}),r.size>0&&e.set(n,r)}),e}))!=null?e:new Map},n.getActiveE2ETraceIdsAsArray=function(){var e,t=this;return(e=this.$10("getActiveE2ETraceIdsAsArray",function(){var e=[];return t.activeMarkers.forEach(function(t,n){t.forEach(function(t,n){t.e2eTracingID!=null&&e.push(t.e2eTracingID)})}),e}))!=null?e:[]},n.forEachMarkerInstance=function(t,n){var e=this;this.$10("forEachMarkerInstance",function(){var r=e.$11(t);if(r)for(var o of r.entries()){var a=o[0],i=o[1];n(a,i.event)}})},n.getMarkerStartTs=function(t,n){var e=this,r=n===void 0?{}:n,o=r.instanceKey,a=o===void 0?0:o;return this.$10("getMarkerStartTs",function(){var n=e.getMarker(t,a);if(n)return n.timestamp})},n.markerLogDebugPoints=function(n,a){var t=this,i=a===void 0?{}:a,l=i.instanceKey,s=l===void 0?0:l;this.$10("markerLogDebugPoints",function(){var a=(e||(e=o("QPLEvent"))).getMarkerId(n),i=t.getMarker(n,s);if(i){var l=r("uuidv4")();i.uniqueMarkerDebugId=l}})},t})();g.normalizeAnnotations=d,l.default=g}),98);
|
|
181
|
+
__d("QPLInspector",[],(function(t,n,r,o,a,i){var e=(function(){function e(){this.$1=[],this.$2={}}var t=e.prototype;return t.appendLog=function(t){for(var e in this.$2)!Object.prototype.hasOwnProperty.call(this.$2,e)||t.marker_id!==e||this.$2[t.marker_id].forEach(function(e){return e(t)});this.$1.push(t)},t.dumpLogs=function(){return this.$1},t.addListener=function(t,n){Object.prototype.hasOwnProperty.call(this.$2,t)||(this.$2[t]=[]),this.$2[t].push(n),this.$1.forEach(function(e){e.marker_id===t&&n(e)})},t.removeListener=function(t,n){var e=this.$2[t].indexOf(n);e!==-1&&this.$2[t].splice(e,1)},e})(),l=new e;i.default=l}),66);
|
|
182
|
+
__d("performanceNavigationStart",["performance"],(function(t,n,r,o,a,i,l){var e,s=typeof window!="undefined"?window:self,u;if((e||(e=r("performance"))).now)if((e||(e=r("performance"))).timing&&(e||(e=r("performance"))).timing.navigationStart)u=function(){return(e||(e=r("performance"))).timing.navigationStart};else{if(typeof s._cstart=="number")u=function(){return s._cstart};else{var c=Date.now();u=function(){return c}}u.isPolyfilled=!0}else u=function(){return 0},u.isPolyfilled=!0;var d=u;l.default=d}),98);
|
|
183
|
+
__d("QuickPerformanceLogger",["Arbiter","Env","FBLogger","ODS","PerfFalcoEvent","PerfXSharedFields","Promise","QPLCore","QPLEvent","QPLInspector","Run","WebStorage","clearTimeout","cr:12180","cr:1984081","cr:686","getErrorSafe","gkx","guid","performanceAbsoluteNow","performanceNavigationStart","performanceNow","setTimeout"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c,d,m,p,_,f=typeof window!="undefined"?window:self;function g(t,n){r("FBLogger")("qpl").catching(r("getErrorSafe")(n)).MUSTFIX(e||(e=babelHelpers.taggedTemplateLiteralLoose(["QPL error in ",""])),t)}function h(e){var t=r("PerfXSharedFields").getCommonData(),n={memory_stats:{total_mem:t.ram_gb!=null?t.ram_gb*1073741824:null},network_stats:{downlink_megabits:t.downlink_megabits,network_subtype:t.effective_connection_type,rtt_ms:t.rtt_ms},sitedata_info:{client_push_phase:t.client_push_phase,client_revision:t.client_revision,server_revision:t.server_revision},locale_info:{locale:t.locale,isRTL:t.isRTL}};if(r("gkx")("20836")&&(n.workplace_info={is_gemini:r("gkx")("21050")}),r("gkx")("21051")&&typeof f.__sapienzMetadataCallback__=="function"){var o=f.__sapienzMetadataCallback__();n.sapienz={request_id:String(o.requestId),config_name:String(o.configName)}}return babelHelpers.extends({},e,{metadata:babelHelpers.extends({},e.metadata,n)})}function y(e,t,n){return{i:e,m:n,r:t}}function C(e,t){return new(_||(_=n("Promise")))(function(){var n=t||e;typeof f.__je2e_recordQPLMarker=="function"&&f.__je2e_recordQPLMarker(n),(p||(p=r("Env"))).enable_qplinspector===!0&&r("QPLInspector").appendLog(n),r("gkx")("21053")||r("gkx")("20935")||r("gkx")("5679")?r("PerfFalcoEvent").logImmediately(function(){return n}):r("gkx")("2160")||r("gkx")("21055")||r("gkx")("9550")?r("PerfFalcoEvent").logCritical(function(){return n}):r("PerfFalcoEvent").log(function(){return n})})}function b(e){var t=(s||(s=o("QPLEvent"))).getMarkerId(e),n=t+"_"+r("guid")();return(m||(m=o("ODS"))).bumpEntityKey(2401,"obc.www.all","qpl.e2e_tracing_id_generated."+t),n}function v(e){var t=babelHelpers.extends({},e,{config_type:r("gkx")("21056")?"alpha_beta":"prod"});return h(t)}function S(){return(p||(p=r("Env"))).enable_qplinspector===!0||typeof f.__je2e_recordQPLMarker=="function"||r("gkx")("21057")}function R(){r("Arbiter").inform("qpl_debugger_finished")}var L=(u||(u=r("performanceAbsoluteNow")))();typeof f.__je2e_felabsTracePlugin_setQplInit=="function"&&f.__je2e_felabsTracePlugin_setQplInit((c||(c=r("performanceNow")))());var E={debug:function(t,n,r){},warn:function(t){r("FBLogger")("qpl").blameToPreviousDirectory().warn(t)}},k="qpl",I=(function(e){function t(){var t;t=e.call(this,{decorateEventBeforeUpload:v,unsampleAllEvents:S,onDebuggingIdEnded:R,monotonicNowMs:u||(u=r("performanceAbsoluteNow")),unixNowMs:u||(u=r("performanceAbsoluteNow")),moduleLoadTimestamp:L,logger:E,sendEvent:C,e2eTracingIDGenerator:b,runtimeAbstractionLayer:{setTimeout:r("setTimeout"),clearTimeout:r("clearTimeout")},debugLoggingEnabled:(p||(p=r("Env"))).qpl_debug_logging,onError:g})||this;var n=r("gkx")("21055")?r("gkx")("21058")?function(e){return o("Run").onBeforeUnload(e,!1)}:o("Run").onBeforeUnload:o("Run").onUnload;return n(function(){t.$QuickPerformanceLogger$p_1(),t.$QuickPerformanceLogger$p_2(706,{respectUnloadPolicy:!0,timestamp:t.currentTimestamp()})}),t.$QuickPerformanceLogger$p_3(),t.initQplFlipperPlugin(),t.initQplSapienzPlugin(),t.initQplUserTimingPlugin(),t}babelHelpers.inheritsLoose(t,e);var a=t.prototype;return a.$QuickPerformanceLogger$p_3=function(){var e=this,t=(d||(d=r("WebStorage"))).getSessionStorageForRead();if(!t){this.$QuickPerformanceLogger$p_4("#loadSavedState","sessionStorage is not available");return}var n=t.getItem(k);if(n!=null){t.removeItem(k);var o=JSON.parse(n);if(o==null){this.$QuickPerformanceLogger$p_4("#loadSavedState","Saved state failed to deserialize");return}if(o.markers==null||o.markers.length===0){this.$QuickPerformanceLogger$p_4("#loadSavedState","No saved markers found");return}o.markers.forEach(function(t){var n=t[0],r=t[1],o=t[2];e.addMarker(n,r,o),e.$QuickPerformanceLogger$p_4("#loadSavedState","Marker "+n+" (instanceKey: "+r+") resumed")})}},a.$QuickPerformanceLogger$p_1=function(){var e=this,t=[];if(this.activeMarkers.forEach(function(e,n){e.forEach(function(e,r){e.resumeAfterNavigation===!0&&(delete e.resumeAfterNavigation,t.push([n,r,e]))})}),t.length>0){var n={markers:t},o=(d||(d=r("WebStorage"))).getSessionStorage(),a=d.setItemGuarded(o,k,JSON.stringify(n));a&&(t.forEach(function(t){var n=t[0],r=t[1],o=t[2],a=y(n,o.sampleRate,o.samplingMethod);e.markerEnd(a,96,r)}),this.$QuickPerformanceLogger$p_4("#storeSavedState","Failed to store saved state: "+a.message),r("FBLogger")("qpl").catching(a).warn("Failed to store QPL state: "+JSON.stringify(n,null,2))),t.forEach(function(t){var n=t[0],r=t[1];e.deleteMarker(n,r)})}},a.markerStoreBeforeNavigation=function(t,n){var e=n===void 0?{}:n,r=e.instanceKey,a=r===void 0?0:r,i=(s||(s=o("QPLEvent"))).getMarkerId(t),l=this.getMarker(t,a);if(!l){this.$QuickPerformanceLogger$p_4("markerStoreBeforeNavigation","Failed to set marker to store on page unload. Could not find marker "+i+", instancekey="+a);return}l.resumeAfterNavigation=!0,this.$QuickPerformanceLogger$p_4("markerStoreBeforeNavigation","Set marker "+i+" to store on page unload, instancekey="+a)},a.markerStartFromNavStart=function(t,n,o){n===void 0&&(n=0);var e=o===void 0?{}:o,a=e.cancelExisting,i=a===void 0?!1:a,l=e.cancelOnUnload,s=l===void 0?!1:l,u=e.trackedForLoss,c=u===void 0?!1:u,d=e.type,m=d===void 0?1:d,p=e.qplInternalDoNotUseConvertToTimeOnServer,_=e.onMarkerTimeout__DoNotUse,f=e.timeoutMS,g=f===void 0?null:f,h=e.crashResilient,y=h===void 0?!1:h,C=r("performanceNavigationStart")(),b=typeof p=="function"?p(C):void 0;if(this.markerStart(t,n,C,{cancelExisting:i,cancelOnUnload:s,trackedForLoss:c,type:m,qplInternalDoNotUseAbsoluteTimeOrigin:b,onMarkerTimeout__DoNotUse:_,timeoutMS:g,crashResilient:y}),r("performanceNavigationStart").isPolyfilled===!0){var v=this.getMarker(t,n);v&&(v.timestampIsApproximate=!0)}},a.markerStartForJoinFromNavStart=function(t,n,o){var e=o===void 0?{}:o,a=e.instanceKey,i=a===void 0?0:a,l=e.cancelExisting,s=l===void 0?!1:l,u=e.cancelOnUnload,c=u===void 0?!1:u,d=e.trackedForLoss,m=d===void 0?!1:d,p=e.type,_=p===void 0?1:p,f=e.qplInternalDoNotUseConvertToTimeOnServer,g=e.absoluteTimeOriginMs,h=e.sourceIsPrimary,y=h===void 0?!1:h,C=e.closeSession,b=e.unreliableSourceClockProcessId,v=e.onMarkerTimeout__DoNotUse,S=e.timeoutMS,R=e.crashResilient,L=R===void 0?!1:R,E=r("performanceNavigationStart")(),k=typeof f=="function"?f(E):void 0;if(this.markerStartForJoin(t,n,{instanceKey:i,cancelExisting:s,cancelOnUnload:c,trackedForLoss:m,type:_,qplInternalDoNotUseAbsoluteTimeOrigin:k,monotonicTimestamp:E,absoluteTimeOriginMs:g,sourceIsPrimary:y,closeSession:C,unreliableSourceClockProcessId:b,timeoutMS:S,onMarkerTimeout__DoNotUse:v,crashResilient:L}),r("performanceNavigationStart").isPolyfilled===!0){var I=this.getMarker(t,i);I&&(I.timestampIsApproximate=!0)}},a.$QuickPerformanceLogger$p_2=function(t,n){var e=this,r=n===void 0?{}:n,o=r.respectUnloadPolicy,a=r.timestamp;this.activeMarkers.forEach(function(n,r){n.forEach(function(n,i){if(o!==!0||n.cancelOnUnload===!0){var l=y(r,n.sampleRate,n.samplingMethod);e.markerEnd(l,t,i,a)}})})},a.$QuickPerformanceLogger$p_4=function(t,n,r){E.debug(t,n,r)},a.initQplFlipperPlugin=function(){n("cr:686")!=null&&this.addListener(n("cr:686").qplFlipperPlugin.listener())},a.initQplSapienzPlugin=function(){n("cr:1984081")!=null&&this.addListener(n("cr:1984081").getQplSapienzListener())},a.initQplUserTimingPlugin=function(){n("cr:12180")!=null&&this.addListener(n("cr:12180").getQplUserTimingListener())},t})(r("QPLCore")),T=new I,D=T;l.default=D}),98);
|
|
184
|
+
__d("DateConsts",[],(function(t,n,r,o,a,i){var e=1e3,l=60,s=60,u=24,c=7,d=12,m=1e3,p=30.43,_=4.333,f=365.242,g=l*s,h=g*u,y=h*c,C=h*f,b=e*l,v=b*s,S=e*h,R=S*c,L=S*f,E={SUNDAY:0,MONDAY:1,TUESDAY:2,WEDNESDAY:3,THURSDAY:4,FRIDAY:5,SATURDAY:6};Object.freeze(E);function k(e,t){return new Date(e,t,0).getDate()}function I(){return Date.now()/e}var T={instantRange:{since:-864e10,until:864e10+1}};i.MS_PER_SEC=e,i.SEC_PER_MIN=l,i.MIN_PER_HOUR=s,i.HOUR_PER_DAY=u,i.DAYS_PER_WEEK=c,i.MONTHS_PER_YEAR=d,i.US_PER_MS=m,i.AVG_DAYS_PER_MONTH=p,i.AVG_WEEKS_PER_MONTH=_,i.AVG_DAYS_PER_YEAR=f,i.SEC_PER_HOUR=g,i.SEC_PER_DAY=h,i.SEC_PER_WEEK=y,i.SEC_PER_YEAR=C,i.MS_PER_MIN=b,i.MS_PER_HOUR=v,i.MS_PER_DAY=S,i.MS_PER_WEEK=R,i.MS_PER_YEAR=L,i.DAYS=E,i.getDaysInMonth=k,i.getCurrentTimeInSeconds=I,i.private=T}),66);
|
|
185
|
+
__d("FuncChannel",["FBLogger","Promise"],(function(t,n,r,o,a,i,l){"use strict";var e,s=(function(){function t(t){var o=this,a;this.$2=[],this.callMessageHandler=function(t){return new(e||(e=n("Promise")))(function(e,n){t.result={resolveFunc:e,rejectFunc:n},o.$2.push(t)})},this.messageToCall=function(e){var t,n,a=o.proxyMethods[e.method];if(typeof a!="function"){r("FBLogger")("worker").mustfix("proxyMethods[%s] is not a functions",e.method);return}var i=(t=e.result)==null?void 0:t.resolveFunc,l=(n=e.result)==null?void 0:n.rejectFunc;if(typeof i=="function"&&typeof l=="function")try{var s=a.apply(e.thisArg,e.argList);i(s)}catch(e){l(e)}else return a.apply(e.thisArg,e.argList)};var i=this,l={},s=(a=t==null?void 0:t(l))!=null?a:{},u=babelHelpers.extends({},l);function c(e){u[e]=function(){var t={type:"call",method:e,thisArg:null,argList:Array.from(arguments)};return i.callMessageHandler(t)},l[e]=function(){var t=i.$1[e];if(typeof t!="function"){r("FBLogger")("worker").mustfix("_backend[%s] is not a functions",e);return}return t.apply(i.$1,arguments)},s[e]==null&&(s[e]=l[e])}if(this.$1=u,t!=null){var d=Object.keys(s);d.forEach(c),this.proxyMethods=s}else this.proxyMethods=new Proxy(s,{get:function(t,n){var e=n;return s[e]==null&&c(e),s[e]}})}var o=t.prototype;return o.flushBuffer=function(){var e=this.$2;this.$2=[],e.forEach(this.messageToCall)},o.setBackend=function(t){return this.$1!==t&&(this.$1=t,this.flushBuffer()),this},o.setCallMessageHandler=function(t){this.callMessageHandler=t,this.flushBuffer()},t})();l.default=s}),98);
|
|
186
|
+
__d("MainPageUrl",["ExecutionEnvironment","FBLogger","SimpleHook","getErrorSafe"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c=new URL((function(){var e=(self!==void 0?self:typeof window!="undefined"?window:{location:{href:"http://undefined"}}).location.href;return(u||(u=r("ExecutionEnvironment"))).isInWorker&&e&&e.startsWith("blob:")&&(e=e.substring(5,e.length)),e})()),d=new URL(c.href),m=new(o("SimpleHook")).SimpleHook;function p(){var e;return(u||(u=r("ExecutionEnvironment"))).isInBrowser&&(d==null||(e=d.searchParams)==null?void 0:e.get("workerlog"))==="debug"}function _(t){try{p()&&r("FBLogger")("worker").DEBUG(e||(e=babelHelpers.taggedTemplateLiteralLoose(["received url ",""])),t);var n=new URL(t,d.href||c.href);d.href!==n.href?(d.href=n.href,m.call(d)):p()&&r("FBLogger")("worker").DEBUG(s||(s=babelHelpers.taggedTemplateLiteralLoose(["ignoring url: path didn't change in ",""])),t)}catch(e){r("FBLogger")("worker").catching(r("getErrorSafe")(e)).warn("invalid url")}}typeof window=="object"&&typeof window.location=="object"&&typeof window.location.href=="string"&&_(window.location.href),l.mainPageUrl=d,l.onMainPageUrlChange=m,l.isWorkerLogEnabled=p,l.updateMainPageUrl=_}),98);
|
|
187
|
+
__d("TimedOnceFunc",["ExecutionEnvironment"],(function(t,n,r,o,a,i,l){var e,s=(function(){function t(t,n){this.$2=!1,this.$4=t,this.$3=n,(e||(e=r("ExecutionEnvironment"))).isInBrowser&&this.$5()}var n=t.prototype;return n.$6=function(){this.$1!=null&&clearTimeout(this.$1),this.$1=null},n.$5=function(){var e=this;this.isDone()||(this.$6(),this.$1=setTimeout(function(){e.$2=!0,e.run()},this.$3))},n.isDone=function(){return this.$4===null},n.isCancelled=function(){return this.$1===null&&this.$4!==null},n.run=function(){if(this.$6(),this.$4!=null){var e=this.$4;this.$4=null,e(this.$2)}},n.getDelay=function(){return this.$3},n.delay=function(t){this.$3=t!=null?t:this.$3,this.$5()},n.cancel=function(){this.$6()},t})();l.TimedOnceFunc=s}),98);
|
|
188
|
+
__d("VirtualMessageChannel",["invariant","Promise","SimpleHook","nullthrows","promiseDone"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u=(function(){function t(e){e===void 0&&(e=!1),this.$2=new(o("SimpleHook")).SimpleHook,this.onmessage=null,this.onmessageerror=null,this.$3=e}var a=t.prototype;return a.setRemotePort=function(t){this.$1=t},a.addEventListener=function(t,n,r){if((t==="message"||t==="error")&&r==null||s(0,55320,t),t==="message")if(typeof n=="function")this.$2.add(n);else{var e=n.handleEvent.bind(n);this.$2.add(e),n.__handler=e}},a.removeEventListener=function(t,n,r){if(typeof n=="function")this.$2.remove(n);else{var e=n.__handler;this.$2.remove(e)}},a.postMessage=function(o,a){var t=this,i=function(){var e=r("nullthrows")(t.$1,"By now remote port must have value!");e.$2.call({data:o,ports:a})};this.$3?i():r("promiseDone")((e||(e=n("Promise"))).resolve(),i)},a.start=function(){},a.close=function(){},t})(),c=function(t,n){this.port1=new u(t),this.port2=new u(n),this.port1.setRemotePort(this.port2),this.port2.setRemotePort(this.port1)};l.VirtualMessagePort=u,l.VirtualMessageChannel=c}),98);
|
|
189
|
+
__d("Deferred",["Promise"],(function(t,n,r,o,a,i){"use strict";var e;(e||(e=n("Promise"))).resolve();var l=(function(){function t(t){var r=this,o=t||e||(e=n("Promise"));this.$1=!1,this.$2=new o(function(e,t){r.$3=e,r.$4=t})}var r=t.prototype;return r.getPromise=function(){return this.$2},r.resolve=function(t){this.$1=!0,this.$3(t)},r.reject=function(t){this.$1=!0,this.$4(t)},r.isSettled=function(){return this.$1},t})();i.default=l}),66);
|
|
190
|
+
__d("DoubleKeyMap",[],(function(t,n,r,o,a,i){"use strict";var e=(function(){function e(){this.$1=new Map}var t=e.prototype;return t.set=function(t,n,r){var e=this.$1.get(t);e||this.$1.set(t,e=new Map),e.set(n,r)},t.get=function(t,n){var e;return(e=this.$1.get(t))==null?void 0:e.get(n)},t.delete=function(t,n){var e=this.$1.get(t);e&&(e.delete(n),e.size===0&&this.$1.delete(t))},t.getAll=function(t){return this.$1.get(t)},t.deleteAll=function(t){this.$1.delete(t)},e})();i.DoubleKeyMap=e}),66);
|
|
191
|
+
__d("NestedTimeRange",["SimpleHook","performance","performanceAbsoluteNow"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u=new(o("SimpleHook")).SimpleHook,c=new(o("SimpleHook")).SimpleHook,d="/";function m(e,t){return""+e+d+t}var p=(function(){function t(e,t){t===void 0&&(t=null),this.$3=0,this.$1=e,this.$2=t}var n=t.prototype;return n.isRunning=function(){return this.$3>0},n.fullname=function(){return this.$2!==null?m(this.$2.fullname(),this.$1):this.$1},n.start=function(n){if(n===void 0&&(n=(e||(e=r("performanceAbsoluteNow")))()),this.$3===0){var t;(t=this.$2)==null||t.start(n),this.__onStart(n)}return++this.$3,n},n.__onStart=function(t){u.call(this,t)},n.stop=function(n){if(n===void 0&&(n=(e||(e=r("performanceAbsoluteNow")))()),--this.$3,this.$3===0){var t;this.__onStop(n),(t=this.$2)==null||t.stop(n)}return n},n.__onStop=function(t){c.call(this,t)},t})();function _(){(s||(s=r("performance"))).mark&&(s||(s=r("performance"))).measure&&(u.add(function(e,t){(s||(s=r("performance"))).mark(e.fullname()+"_start")}),c.add(function(e,t){(s||(s=r("performance"))).measure(e.fullname(),e.fullname()+"_start")}))}l.OnRangeStart=u,l.OnRangeStop=c,l.TIME_RANGE_LEVEL_SEPARATOR=d,l.rangeFullName=m,l.NestedTimeRange=p,l.enableDevConsoleTimeline=_}),98);
|
|
192
|
+
__d("QLogEvent",["DoubleKeyMap","FBLogger","NestedTimeRange","QPLEvent","SimpleHook","performanceNavigationStart"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u=new(o("DoubleKeyMap")).DoubleKeyMap,c=(function(e){function t(t,n,r){var o;return o=e.call(this,t,r)||this,o.$QPLRange$p_1=n,u.set(n,o.fullname(),o),o}babelHelpers.inheritsLoose(t,e);var n=t.prototype;return n.__onStart=function(n){e.prototype.__onStart.call(this,n),this.$QPLRange$p_1.point(this.fullname()+"_START",{timestamp:n})},n.__onStop=function(n){e.prototype.__onStop.call(this,n),this.$QPLRange$p_1.point(this.fullname()+"_END",{timestamp:n}),u.delete(this.$QPLRange$p_1,this.fullname())},n.range=function(n){var e;this.fullname().startsWith(o("NestedTimeRange").TIME_RANGE_LEVEL_SEPARATOR)||r("FBLogger")("qpl").warn("Range %s cannot have subrange since root name does not start with /",this.fullname());var a=o("NestedTimeRange").rangeFullName(this.fullname(),n);return(e=u.get(this.$QPLRange$p_1,a))!=null?e:new t(n,this.$QPLRange$p_1,this)},t})(o("NestedTimeRange").NestedTimeRange),d=new(o("DoubleKeyMap")).DoubleKeyMap,m=new(s=o("SimpleHook")).SimpleHook,p=new s.SimpleHook,_=new s.SimpleHook,f=new s.SimpleHook,g=(function(t){function n(n,r,a,i,l){var s;r===void 0&&(r=0),a===void 0&&(a=2),i===void 0&&(i=!1);var u=(e||(e=o("QPLEvent"))).getMarkerId(n);return s=t.call(this,"event_"+u)||this,s.event=n,s.instanceKey=r,s.$QPLEvent$p_1=a,s.isUserFlow=i,s.$QPLEvent$p_2=l,d.set(u,r,s),s}babelHelpers.inheritsLoose(n,t);var a=n.prototype;return a.action=function(t){return this.$QPLEvent$p_1=t,this},a.getAction=function(){return this.$QPLEvent$p_1},a.setIsUserFlow=function(t){return this.isUserFlow=t,this},a.startFromNavStart=function(){return this.start(r("performanceNavigationStart")()),this},a.startFromTime=function(t){return this.start(t),this},a.__onStart=function(t){var e;(e=this.$QPLEvent$p_2)==null||e.onStart(this,t),m.call(this,t)},a.__onStop=function(n){var t;(t=this.$QPLEvent$p_2)==null||t.onStop(this,n),p.call(this,n),u.deleteAll(this),d.delete((e||(e=o("QPLEvent"))).getMarkerId(this.event),this.instanceKey)},a.range=function(t){var e;return(e=u.get(this,t))!=null?e:new c(t,this)},a.point=function(t,n){var e;return n===void 0&&(n={}),(e=this.$QPLEvent$p_2)==null||e.onPoint(this,t,n),_.call(this,t,n),this},a.annotate=function(t){var e;return(e=this.$QPLEvent$p_2)==null||e.onAnnotate(this,t),f.call(this,t),this},n})(o("NestedTimeRange").NestedTimeRange);function h(t,n,r){var a;return n===void 0&&(n=0),(a=d.get((e||(e=o("QPLEvent"))).getMarkerId(t),n))!=null?a:new g(t,n,2,!1,r)}l.OnEventStart=m,l.OnEventStop=p,l.OnEventPoint=_,l.OnEventAnnotate=f,l.QPLEvent=g,l.event=h}),98);
|
|
193
|
+
__d("QPLHasteSupportDataStorage",[],(function(t,n,r,o,a,i){"use strict";var e={},l={add:function(n,r){Object.keys(n).forEach(function(t){if(r&&r.entry++,e[t]==null){var o=n[t];e[t]=o}else r&&r.dup_entry++})},get:function(n){return e[n]}};i.default=l}),66);
|
|
194
|
+
__d("qpl",["FBLogger","QPLHasteSupportDataStorage"],(function(t,n,r,o,a,i,l){"use strict";var e={},s={_:function(n,o){var t=e[o];if(t==null){var a=r("QPLHasteSupportDataStorage").get(o);a==null?(r("FBLogger")("staticresources").mustfix("Failed to find a Haste-supplied config for the QPL event identified by token `%s`.",o),t={i:n}):t=babelHelpers.extends({i:n},a),e[o]=t}return t}},u=s;l.default=u}),98);
|
|
195
|
+
__d("WorkerMessagePortLogging",["MainPageUrl","QLogEvent","qpl"],(function(t,n,r,o,a,i,l){"use strict";var e=Math.random()<.1,s=20,u=100,c=50;function d(){return o("MainPageUrl").isWorkerLogEnabled()||o("MainPageUrl").mainPageUrl.searchParams.get("worker_log")===1}var m=0;function p(){return o("QLogEvent").event(r("qpl")._(41497718,"106"),m++)}function _(t,n,r){if(r===void 0&&(r=!1),!(n==null||!e)){var o=n.receiveDateTime,a=n.receiveTimestamp,i=n.sendDateTime,l=n.sendDelayHighPrecision,d=n.sendTimestamp,m=p();m.startFromTime();var _=m.range("SEND_DELAY");_.start(d),_.stop(a);var f=m.range("SEND_DELAY_LOW_PRECISION");f.start(i),f.stop(o);var g=Math.abs(d-i),h=Math.abs(a-o);if(m.annotate({string:{port_name:t},int:{send_delay:l,send_drift:g,receive_drift:h},bool:{send_delay_above_max:l!=null&&l>s,send_drift_above_max:g>u,receive_drift_above_max:h>u}}),r){var y=m.range("ROUND_TRIP");y.start(n.sendTimestamp),y.stop(n.receiveTimestamp);var C=n.receiveTimestamp-n.sendTimestamp;m.annotate({int:{round_trip:C},bool:{round_trip_above_max:C>c}})}m.stop()}}l.isWorkerLogEnabled=d,l.logMessageTiming=_}),98);
|
|
196
|
+
__d("WorkerMessagePort",["Deferred","FBLogger","MainPageUrl","Promise","PromiseAnnotate","SimpleHook","VirtualMessageChannel","WorkerMessagePortLogging","performanceAbsoluteNow","promiseDone"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u;function c(e){return e}var d=(function(e){function t(){return e.apply(this,arguments)||this}return babelHelpers.inheritsLoose(t,e),t})(o("SimpleHook").SimpleHook);function m(e,t){var n=e;n.__timing=t}function p(e){return e.__timing}var _=(function(){function e(e,t){var n=this;this.$1={},this.onUnhandledMessage=new d,this.onMessage=new d,this.onPostMessage=new d,this.onError=new d,this.$2=e,this.name=t,this.$2.addEventListener("message",function(e){return n.onMessageHandler(e.data)}),this.$2.addEventListener("error",function(e){return n.onError.call(e)}),this.onPostMessage.add(function(e){m(e,{receiveDateTime:-1,receiveTimestamp:-1,sendDateTime:Date.now(),sendDelayHighPrecision:0,sendDelayLowPrecision:0,sendTimestamp:(u||(u=r("performanceAbsoluteNow")))()})}),this.onMessage.add(function(e){var t=p(e);if(t!=null){var a=t.sendDateTime,i=t.sendTimestamp,l=(u||(u=r("performanceAbsoluteNow")))(),s=Date.now();t.receiveTimestamp=l,t.receiveDateTime=s,t.sendDelayHighPrecision=l-i,t.sendDelayLowPrecision=s-a,o("WorkerMessagePortLogging").logMessageTiming(n.name,t)}})}var t=e.prototype;return t.onMessageHandler=function(t){try{this.onMessage.call(t);var e=this.$1[t.type];e?e.call(t):this.onUnhandledMessage.call(t)}catch(e){this.onError.call(e)}},t.postMessage=function(t,n){this.onPostMessage.call(t),n?this.$2.postMessage(t,n):this.$2.postMessage(t)},t.addMessageListener=function(t,n){var e=this.$1[t];return e||(e=new d,this.$1[t]=e),e.add(n)},t.removeMessageListener=function(t,n){var e=this.$1[t];return!!e&&e.remove(n)},t.removeAllMessageListeners=function(t){var e=this.$1[t];e&&e.clear()},t.onMessageOnce=function(t,r){var e=this;return new(s||(s=n("Promise")))(function(n){var o=e.addMessageListener(t,function(a){r(a)&&(e.removeMessageListener(t,o),n(a))})})},t.close=function(){var e=this.$2;e.close==null||e.close(),e.terminate==null||e.terminate()},t.isWrappingVirtualMessagePort=function(){return this.$2 instanceof o("VirtualMessageChannel").VirtualMessagePort},e})();function f(e){return e}var g=(function(t){function a(a,i){var l;l=t.call(this,a,i)||this;var u=l,d=new(r("Deferred")),m=d.getPromise();u.addMessageListener("endpoint_started",function(e){d.resolve(e);var t=p(e);u.postMessage({endpoint:e.endpoint,startSendTimestamp:t==null?void 0:t.sendTimestamp,targetEndpoint:l.name,type:"endpoint_started_received"})});var _=u.onMessageOnce("endpoint_started_received",function(){return!0});return(e||(e=o("PromiseAnnotate"))).setDisplayName(m,"endpoint_started"),e.setDisplayName(_,"endpoint_started_received"),u.postMessage({endpoint:l.name,type:"endpoint_started"}),r("promiseDone")(m,function(e){var t=p(e);o("WorkerMessagePortLogging").logMessageTiming(l.name,t)}),r("promiseDone")(_,function(e){var t=p(e);t!=null&&o("WorkerMessagePortLogging").logMessageTiming(l.name,t,!0)}),l.fullyConnected=(s||(s=n("Promise"))).race([m,_]).then(function(){return l}),l}return babelHelpers.inheritsLoose(a,t),a})(_);l.getMessageTiming=p,l.WorkerMessagePort=_,l.CastWorkerMessagePort=f,l.WorkerSyncedMessagePort=g}),98);
|
|
197
|
+
__d("WorkerFuncChannel",["invariant","DateConsts","ExecutionEnvironment","FBLogger","FuncChannel","MainPageUrl","Promise","TimedOnceFunc","VirtualMessageChannel","WorkerMessagePort","err","promiseDone"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c={serialize:function(t,n){return n.push(t),t},deserialize:function(t){return t}},d=1e4,m=0,p=5,_=p+1,f=(function(){function e(e){var t=self.WeakRef;t&&(this.$1=new t(e))}var t=e.prototype;return t.isDead=function(){return this.$1!=null&&this.$1.deref()==null},e})(),g=(function(t){function a(e,n,a,i){var l;a===void 0&&(a=null),i===void 0&&(i={}),l=t.call(this,e)||this,l.$WorkerFuncChannel$p_1=new Map,l.$WorkerFuncChannel$p_2=new Map,l.$WorkerFuncChannel$p_5={function:{serialize:function(t,n){var e=_++;l.$WorkerFuncChannel$p_1.set(e,t);var r={type:"function",value:e};return r},deserialize:function(t){var e=l,n=t.value,r=function(){var t={type:"call",id:n,method:"__anonymous",thisArg:null,argList:Array.from(arguments)};return e.callMessageHandler(t)};return l.$WorkerFuncChannel$p_2.set(n,new f(r)),r}},custom:{serialize:function(t,n){var e=t.constructor.name,r=l.$WorkerFuncChannel$p_4[e];r!=null||s(0,63779,e);var o=r.serialize(t,n);return{type:"custom",custom:e,value:o}},deserialize:function(t){var e=t.custom,n=l.$WorkerFuncChannel$p_4[e];return n!=null||s(0,63779,e),n.deserialize(t.value)}},error:{serialize:function(t,n){var e={name:t.name,message:t.message,stack:t.stack};return{type:"error",value:e}},deserialize:function(t){var e=r("err")(t.value.message);return e.name=t.value.name,e.stack=t.value.stack,e}},object:{serialize:function(t,n){var e=t.constructor;if(e!==Object){var r=new Error("Cannot clone class object");throw r.stack,r}return{type:"object",value:t}},deserialize:function(t){return t.value}},raw:{serialize:function(t,n){return{type:"raw",value:t}},deserialize:function(t){return t.value}}},l.name=n,l.$WorkerFuncChannel$p_3=a,l.$WorkerFuncChannel$p_4=i;var c=function(t){o("MainPageUrl").isWorkerLogEnabled()&&r("FBLogger")("adsworker").debug("[Channel] removing callback ids: %s",t.join()),t.forEach(function(e){return l.$WorkerFuncChannel$p_1.delete(e)})},p=l.__remoteInternalFunc(m,c);return typeof jest=="undefined"&&(u||(u=r("ExecutionEnvironment"))).isInBrowser&&setInterval(function(){var e=[];l.$WorkerFuncChannel$p_2.forEach(function(t,n){t.isDead()&&(e.push(n),l.$WorkerFuncChannel$p_2.delete(n))}),e.length>0?p(e):l.$WorkerFuncChannel$p_2.size>5e3&&l.$WorkerFuncChannel$p_2.size%10===0&&r("FBLogger")("adsworker").warn("[%s] has too many remaining refs %s",l.name,l.$WorkerFuncChannel$p_2.size)},d),l}babelHelpers.inheritsLoose(a,t);var i=a.prototype;return i.__remoteInternalFunc=function(t,n){(t>p||this.$WorkerFuncChannel$p_1.get(t)!=null)&&r("FBLogger")("adsworker").mustfix("invalid internal func id %s",t),this.$WorkerFuncChannel$p_1.set(t,n);var e=this.$WorkerFuncChannel$p_5.function.deserialize({type:"function",value:t});return e},i.$WorkerFuncChannel$p_6=function(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array},i.$WorkerFuncChannel$p_7=function(t){if(typeof t=="function")return"function";if(t===null||typeof t!="object"||Array.isArray(t)||this.$WorkerFuncChannel$p_6(t))return"raw";var e=t.constructor.name;return this.$WorkerFuncChannel$p_4[e]?"custom":t instanceof Error?"error":"object"},i.$WorkerFuncChannel$p_8=function(t,n){var e=this.$WorkerFuncChannel$p_7(t);return this.$WorkerFuncChannel$p_5[e].serialize(t,n)},i.$WorkerFuncChannel$p_9=function(t){var e=t;if(t!==null&&typeof t=="object"&&typeof t.type=="string"){var n=this.$WorkerFuncChannel$p_5[t.type];if(n)return n.deserialize(t)}return e},i.__onPostOutMessage=function(t){return t},i.__callCallback=function(t,n){t.apply(null,n.argList)},i.setOutMessagePort=function(o,a){var t=this,i=[];this.setCallMessageHandler(function(a){a.thisArg=t.name;var l=[];a.argList=a.argList.map(function(e){return t.$WorkerFuncChannel$p_8(e,l)});var s=new(e||(e=n("Promise")))(function(e,n){a.result={resolveFunc:t.$WorkerFuncChannel$p_8(e,l),rejectFunc:t.$WorkerFuncChannel$p_8(n,l)}}),u=t.__onPostOutMessage(a);return u!=null&&(i!=null?i.push({message:a,transferList:l}):o.postMessage(a,l)),s.catch(function(e){r("FBLogger")("worker").catching(e).mustfix("Error: channel %s, remote call of %s returned error %s",t.name,a.method,e.message)}),s}),r("promiseDone")(a||E.waitForRemote(this.name),function(){var e=i;i=null,e==null||e.forEach(function(e){o.postMessage(e.message,e.transferList)}),t.$WorkerFuncChannel$p_3==null||t.$WorkerFuncChannel$p_3()})},i.__messageToCall=function(t){var e=this;if(t.argList=t.argList.map(function(t){return e.$WorkerFuncChannel$p_9(t)}),t.result){var n=t.result,o=n.rejectFunc,a=n.resolveFunc;a=this.$WorkerFuncChannel$p_9(a),o=this.$WorkerFuncChannel$p_9(o),t.result={resolveFunc:a,rejectFunc:o}}var i=t.id;if(i===void 0)this.messageToCall(t);else{var l=this.$WorkerFuncChannel$p_1.get(i);l?this.__callCallback(l,t):r("FBLogger")("adsworker").mustfix("Error: callback is called but no longer available")}},i.setInMessagePort=function(t){var e=this;t.addMessageListener("call",function(t){typeof t.thisArg=="string"&&t.thisArg===e.name&&e.__messageToCall(t)}),E.notifyReady(this.name)},i.setMessagePort=function(t){return this.setInMessagePort(t),this.setOutMessagePort(t),this},a})(r("FuncChannel")),h=(function(e){function t(){return e.apply(this,arguments)||this}return babelHelpers.inheritsLoose(t,e),t})(o("WorkerMessagePort").WorkerMessagePort);function y(e,t,n,o){E.exportChannel(e,function(o){var a=o.remoteNativePort,i=o.syncPort,l=t();e===l.name||s(0,54247,e,l.name);var u;a?(u=new h(a,i.name+"("+l.name+")"),a.start(),u.onError.add(function(e){throw r("FBLogger")("worker").catching(e).mustfix("error caught in remotePort"),e})):u=i,l.setMessagePort(u).setBackend(n),r("promiseDone")(i.fullyConnected,function(){i.postMessage({type:"channelReady",channelName:l.name}),E.logState("EXPORTED",e)})})}function C(e,t,n,r){return r===void 0&&(r={}),y(n,function(){return new g(function(t){return e},n,null,r)},e,t)}var b=(function(e){function t(t,n){n===void 0&&(n="");var a=o("DateConsts").MS_PER_MIN*1;return e.call(this,function(){r("FBLogger")("worker").warn("Channel %s did not establish eventually. %s",t,n)},a)||this}return babelHelpers.inheritsLoose(t,e),t})(o("TimedOnceFunc").TimedOnceFunc);function v(e,t){var n,a=null,i,l;t.isWrappingVirtualMessagePort()?(l=new(o("VirtualMessageChannel")).VirtualMessageChannel(!0,!0),n="on virtual dedicated channel"):(l=new MessageChannel,n="on native dedicated channel",i=[l.port2]);var s=l.port1;a=l.port2,s.start();var u=new h(s,t.name+"("+e.name+")");return r("promiseDone")(t.fullyConnected,function(){E.logState("IMPORTING "+n+" ",e.name),e.setInMessagePort(u);var o=new b(e.name,n);r("promiseDone")(t.onMessageOnce("channelReady",function(t){return t.channelName===e.name}),function(t){e.setOutMessagePort(u),o.cancel(),E.logState("ESTABLISHED",e.name)}),t.postMessage({type:"channelImport",channelName:e.name,port:a},i)}),e.proxyMethods}function S(e,t,n,r){n===void 0&&(n=null),r===void 0&&(r={});var o=new g(function(t){return e},t,n,r);return o}function R(e,t,n,r,o){return r===void 0&&(r=null),o===void 0&&(o={}),v(S(e,n,r,o),t)}var L=(function(){function t(){this.name=self.name+"_P"+Math.round(10*Math.random()),this.$1=new Map,this.$2=new Set}var a=t.prototype;return a.logState=function(t,n){o("MainPageUrl").isWorkerLogEnabled()&&r("FBLogger")("worker").debug("%s-%s %s",this.name,t,n)},a.$3=function(t){var e=this.$1.get(t);return e==null&&(e={pendingPorts:null,onImportRequest:null},this.$1.set(t,e)),e},a.exportChannel=function(t,n){var e=this,o=this.$3(t);o.onImportRequest!=null&&r("FBLogger")("worker").debug("Re-exporting channel %s",t),o.onImportRequest=n,this.logState("REGISTERED",t);var a=o.pendingPorts;if(a!=null){var i=a.filter(function(t){return e.$2.has(t.syncPort)});i.forEach(n),i.length<a.length?o.pendingPorts=a.filter(function(t){return!e.$2.has(t.syncPort)}):o.pendingPorts=null}return o},a.activate=function(t,n,o){var e=this;if(this.$2.has(t)){r("FBLogger")("worker").debug("Port %sis already duplicated ",t.name);return}this.$2.add(t),t.addMessageListener("channelImport",function(n){var r=n.channelName,o=e.$3(r),a={syncPort:t,remoteNativePort:n.port};o.onImportRequest!=null?o.onImportRequest(a):o.pendingPorts!=null?o.pendingPorts.push(a):o.pendingPorts=[a],e.logState("IMPORT REQUEST",r)})},a.notifyReady=function(t){},a.waitForRemote=function(r){return(e||(e=n("Promise"))).resolve()},t})(),E=new L;function k(e,t,n){E.activate(e,t,n)}l.TransferableTransformer=c,l.WorkerFuncChannel=g,l.exportChannelOnPort=y,l.exportChannel=C,l.importChannelOnPort=v,l.makeChannel=S,l.importChannel=R,l.activateChannels=k}),98);
|
|
198
|
+
__d("WorkerBanzaiLazyQueueChannelClient",["BanzaiLazyQueue","WorkerFuncChannel"],(function(t,n,r,o,a,i,l){"use strict";function e(e){o("WorkerFuncChannel").exportChannel(r("BanzaiLazyQueue"),e,"banzai_lazyqueue_channel")}l.init=e}),98);
|
|
199
|
+
__d("WorkerQPLChannel",["WorkerFuncChannel","performanceAbsoluteNow"],(function(t,n,r,o,a,i,l){"use strict";var e,s=new(o("WorkerFuncChannel")).WorkerFuncChannel(function(t){return{markerStartFromNavStart:null,markerStart:function(o,a,i){return i===void 0&&(i=(e||(e=r("performanceAbsoluteNow")))()),t.markerStart(o,a,i)},markerAnnotate:function(n,r,o){return t.markerAnnotate(n,r,o)},markerPoint:function(o,a,i){var n=(i==null?void 0:i.timestamp)===void 0?babelHelpers.extends({},i,{timestamp:(e||(e=r("performanceAbsoluteNow")))()}):i;return t.markerPoint(o,a,n)},markerEnd:function(o,a,i,l){return l===void 0&&(l=(e||(e=r("performanceAbsoluteNow")))()),t.markerEnd(o,a,i,l)}}},"qpl");function u(e){s.setMessagePort(e)}function c(e){s.setBackend(e)}l.setMessagePort=u,l.initQPL=c}),98);
|
|
200
|
+
__d("WorkerClient",["WorkerBanzaiLazyQueueChannelClient","WorkerFuncChannel","WorkerQPLChannel"],(function(t,n,r,o,a,i,l){"use strict";function e(e){o("WorkerFuncChannel").activateChannels(e,"client","worker"),o("WorkerBanzaiLazyQueueChannelClient").init(e),o("WorkerQPLChannel").setMessagePort(e),a(["QuickPerformanceLogger"],function(e){return o("WorkerQPLChannel").initQPL(e)})}l.init=e}),98);
|
|
201
|
+
__d("bx",["FBLogger"],(function(t,n,r,o,a,i,l){"use strict";var e={};function s(t){var n=e[t];if(!n)throw r("FBLogger")("staticresources").mustfixThrow("bx"+('(...): Unknown file path "'+t+'"'));return n}s.add=function(t,n){var r=!1;for(var o in t)n&&n.entry++,o in e?n&&n.dup_entry++:(t[o].loggingID=o,e[o]=t[o])},s.getURL=function(e){return e.uri},l.default=s}),98);
|
|
202
|
+
__d("WAWebVoipWebWasmLoader_ProdLab_internal.worker",["Promise","WorkerBundleResource","WorkerClient","WorkerMessagePort","bx"],(function(t,n,r,o,a,i,l){var e=["type","__name"],s,u,c=r("bx").getURL(r("bx")("78864"),{cacheBreaker:"1778490182335"}),d=(function(){var t=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return function(r){var a=this;r===void 0&&(r={});function i(){return B.buffer!=G.buffer&&te(),G}function l(){return B.buffer!=G.buffer&&te(),z}function d(){return B.buffer!=G.buffer&&te(),j}function m(){return B.buffer!=G.buffer&&te(),K}function p(){return B.buffer!=G.buffer&&te(),Q}function _(){return B.buffer!=G.buffer&&te(),X}function f(){return B.buffer!=G.buffer&&te(),Y}function g(){return B.buffer!=G.buffer&&te(),ee}var h=r,y,C;h.ready=new(u||(u=n("Promise")))(function(e,t){y=e,C=t}),["_malloc","_free","__emscripten_thread_init","__emscripten_thread_exit","__emscripten_thread_crashed","__emscripten_thread_mailbox_await","__emscripten_tls_init","_pthread_self","checkMailbox","establishStackSpace","invokeEntryPoint","PThread","getExceptionMessage","___get_exception_message","_on_call_event_js_sync","_wasm_throw_ml_abort","_set_ml_inference_flag","_patch_abort_for_ml_inference","_get_persistent_directory_path_js","_get_bwe_ml_model_path_js","_get_random_bytes_js","_is_participant_known_contact_js","_renderVideoFrame_js","_sendSignalingXMPP_js_sync","_fflush","_call_sendto","___indirect_function_table","_call_init_capture_driver_js_sync","_call_start_capture_js_sync","_call_stop_capture_js_sync","_call_init_playback_driver_js_sync","_call_start_playback_js_sync","_call_stop_playback_js_sync","_query_browser_audio_processing_status_js_sync","_call_start_desktop_capture_js_sync","_call_stop_desktop_capture_js_sync","_call_start_video_capture_js_sync","_call_stop_video_capture_js_sync","_loggingCallback_js_sync","__embind_initialize_bindings","__emscripten_check_mailbox","___start_em_js","___stop_em_js","___start_em_asm","___stop_em_asm","onRuntimeInitialized"].forEach(function(e){Object.getOwnPropertyDescriptor(h.ready,e)||Object.defineProperty(h.ready,e,{get:function(){return Ee("You are getting "+e+" 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")},set:function(){return Ee("You are setting "+e+" 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 b=Object.assign({},h),v=[],S="./this.program",R=function(t,n){throw n},L=typeof window=="object",E=typeof importScripts=="function",k=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",I=!L&&!k&&!E;if(h.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var T=h.ENVIRONMENT_IS_PTHREAD||!1,D="";function x(e){return h.locateFile?h.locateFile(e,D):D+e}var $,P,N,M;if(I){if(typeof process=="object"&&typeof n=="function"||typeof window=="object"||typeof importScripts=="function")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?)");typeof read!="undefined"&&($=read),N=function(t){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(t));var e=read(t,"binary");return H(typeof e=="object"),e},P=function(t,n,r){setTimeout(function(){return n(N(t))})},typeof clearTimeout=="undefined"&&(globalThis.clearTimeout=function(e){}),typeof setTimeout=="undefined"&&(globalThis.setTimeout=function(e){return typeof e=="function"?e():Ee()}),typeof scriptArgs!="undefined"?v=scriptArgs:typeof arguments!="undefined"&&(v=arguments),typeof quit=="function"&&(R=function(t,n){throw setTimeout(function(){if(!(n instanceof ft)){var e=n;n&&typeof n=="object"&&n.stack&&(e=[n,n.stack]),A("exiting due to exception: "+e)}quit(t)}),n}),typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)}else if(L||E){if(E?D=self.location.href:typeof document!="undefined"&&document.currentScript&&(D=document.currentScript.src),t&&(D=t),D.indexOf("blob:")!==0?D=D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):D="",!(typeof window=="object"||typeof importScripts=="function"))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?)");$=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},E&&(N=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),P=function(t,n,r){var e=new XMLHttpRequest;e.open("GET",t,!0),e.responseType="arraybuffer",e.onload=function(){if(e.status==200||e.status==0&&e.response){n(e.response);return}r()},e.onerror=r,e.send(null)},M=function(t){return document.title=t}}else throw new Error("environment detection error");var w=h.print||console.log.bind(console),A=h.printErr||console.error.bind(console);Object.assign(h,b),b=null,Ci(),h.arguments&&(v=h.arguments),Be("arguments","arguments_"),h.thisProgram&&(S=h.thisProgram),Be("thisProgram","thisProgram"),h.quit&&(R=h.quit),Be("quit","quit_"),H(typeof h.memoryInitializerPrefixURL=="undefined","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),H(typeof h.pthreadMainPrefixURL=="undefined","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),H(typeof h.cdInitializerPrefixURL=="undefined","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),H(typeof h.filePackagePrefixURL=="undefined","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),H(typeof h.read=="undefined","Module.read option was removed (modify read_ in JS)"),H(typeof h.readAsync=="undefined","Module.readAsync option was removed (modify readAsync in JS)"),H(typeof h.readBinary=="undefined","Module.readBinary option was removed (modify readBinary in JS)"),H(typeof h.setWindowTitle=="undefined","Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),H(typeof h.TOTAL_MEMORY=="undefined","Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Be("asm","wasmExports"),Be("read","read_"),Be("readAsync","readAsync"),Be("readBinary","readBinary"),Be("setWindowTitle","setWindowTitle"),H(L||E||k,"Pthreads do not work in this environment yet (need Web Workers, or an alternative to them)"),H(!k,"node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."),H(!I,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable.");var F;h.wasmBinary&&(F=h.wasmBinary),Be("wasmBinary","wasmBinary");var O=h.noExitRuntime||!0;Be("noExitRuntime","noExitRuntime"),typeof WebAssembly!="object"&&Ee("no native wasm support detected");var B,W,q,U=!1,V;function H(e,t){e||Ee("Assertion failed"+(t?": "+t:""))}var G,z,j,K,Q,X,Y,J,Z,ee;function te(){var e=B.buffer;h.HEAP8=G=new Int8Array(e),h.HEAP16=j=new Int16Array(e),h.HEAP32=Q=new Int32Array(e),h.HEAPU8=z=new Uint8Array(e),h.HEAPU16=K=new Uint16Array(e),h.HEAPU32=X=new Uint32Array(e),h.HEAPF32=Y=new Float32Array(e),h.HEAPF64=ee=new Float64Array(e),h.HEAP64=J=new BigInt64Array(e),h.HEAPU64=Z=new BigUint64Array(e)}H(!h.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),H(typeof Int32Array!="undefined"&&typeof Float64Array!="undefined"&&Int32Array.prototype.subarray!=null&&Int32Array.prototype.set!=null,"JS engine does not provide full typed array support");var ne=h.INITIAL_MEMORY||10485760;if(Be("INITIAL_MEMORY","INITIAL_MEMORY"),H(ne>=1048576,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+ne+"! (STACK_SIZE=1048576)"),T)B=h.wasmMemory;else if(h.wasmMemory)B=h.wasmMemory;else if(B=new WebAssembly.Memory({initial:ne/65536,maximum:2147483648/65536,shared:!0}),!(B.buffer instanceof SharedArrayBuffer))throw A("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),k&&A("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");te(),ne=B.buffer.byteLength,H(ne%65536===0);var re;function oe(){var e=Hi();H((e&3)==0),e==0&&(e+=4),_()[e>>2]=34821223,_()[e+4>>2]=2310721022,_()[0]=1668509029}function ae(){if(!U){var e=Hi();e==0&&(e+=4);var t=_()[e>>2],n=_()[e+4>>2];(t!=34821223||n!=2310721022)&&Ee("Stack overflow! Stack cookie has been overwritten at "+en(e)+", expected hex dwords 0x89BACDFE and 0x2135467, but received "+en(n)+" "+en(t)),_()[0]!=1668509029&&Ee("Runtime error: The application has corrupted its heap memory area (address zero)!")}}(function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,t[0]!==115||t[1]!==99)throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"})();var ie=[],le=[],se=[],ue=!1,ce=0;function de(){return O||ce>0}function me(){if(H(!T),h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)fe(h.preRun.shift());rn(ie)}function pe(){H(!ue),ue=!0,!T&&(ae(),!h.noFSInit&&!Kt.init.initialized&&Kt.init(),Kt.ignorePermissions=!1,Nt.init(),rn(le))}function _e(){if(ae(),!T){if(h.postRun)for(typeof h.postRun=="function"&&(h.postRun=[h.postRun]);h.postRun.length;)he(h.postRun.shift());rn(se)}}function fe(e){ie.unshift(e)}function ge(e){le.unshift(e)}function he(e){se.unshift(e)}H(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),H(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),H(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),H(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 ye=0,Ce=null,be=null,ve={};function Se(e){for(var t=e;;){if(!ve[e])return e;e=t+Math.random()}}function Re(e){ye++,h.monitorRunDependencies&&h.monitorRunDependencies(ye),e?(H(!ve[e]),ve[e]=1,Ce===null&&typeof setInterval!="undefined"&&(Ce=setInterval(function(){if(U){clearInterval(Ce),Ce=null;return}var e=!1;for(var t in ve)e||(e=!0,A("still waiting on run dependencies:")),A("dependency: "+t);e&&A("(end of list)")},1e4))):A("warning: run dependency added without ID")}function Le(e){if(ye--,h.monitorRunDependencies&&h.monitorRunDependencies(ye),e?(H(ve[e]),delete ve[e]):A("warning: run dependency removed without ID"),ye==0&&(Ce!==null&&(clearInterval(Ce),Ce=null),be)){var t=be;be=null,t()}}function Ee(e){h.onAbort&&h.onAbort(e),e="Aborted("+e+")",A(e),U=!0,V=1;var t=new WebAssembly.RuntimeError(e);throw C(t),t}var ke="data:application/octet-stream;base64,";function Ie(e){return e.startsWith(ke)}function Te(e){return e.startsWith("file://")}function De(e){return function(){H(ue,"native function `"+e+"` called before runtime initialization");var t=W[e];return H(t,"exported native function `"+e+"` not found"),t.apply(null,arguments)}}var xe=(function(e){function t(){return e.apply(this,arguments)||this}return babelHelpers.inheritsLoose(t,e),t})(babelHelpers.wrapNativeSuper(Error)),$e=(function(e){function t(){return e.apply(this,arguments)||this}return babelHelpers.inheritsLoose(t,e),t})(xe),Pe=(function(e){function t(t){var n;n=e.call(this,t)||this,n.excPtr=t;var r=un(t);return n.name=r[0],n.message=r[1],n}return babelHelpers.inheritsLoose(t,e),t})(xe),Ne=c;function Me(e){if(e==Ne&&F)return new Uint8Array(F);if(N)return N(e);throw"both async and sync fetching of the wasm failed"}function we(e){return!F&&(L||E)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(function(t){if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(function(){return Me(e)}):(u||(u=n("Promise"))).resolve().then(function(){return Me(e)})}function Ae(e,t,n){return we(e).then(function(e){return WebAssembly.instantiate(e,t)}).then(function(e){return e}).then(n,function(e){A("failed to asynchronously prepare wasm: "+e),Te(Ne)&&A("warning: Loading from a file URI ("+Ne+") 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"),Ee(e)})}function Fe(e,t,n,r){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!Ie(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(function(e){var o=WebAssembly.instantiateStreaming(e,n);return o.then(r,function(e){return A("wasm streaming compile failed: "+e),A("falling back to ArrayBuffer instantiation"),Ae(t,n,r)})}):Ae(t,n,r)}function Oe(){var e={env:bi,wasi_snapshot_preview1:bi};function t(e,t){var n=e.exports;return W=n,mn(W._emscripten_tls_init),re=W.__indirect_function_table,H(re,"table not found in wasm exports"),ge(W.__wasm_call_ctors),q=t,Le("wasm-instantiate"),n}Re("wasm-instantiate");var n=h;function r(e){H(h===n,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),n=null,t(e.instance,e.module)}if(h.instantiateWasm)try{return h.instantiateWasm(e,t)}catch(e){A("Module.instantiateWasm callback failed with error: "+e),C(e)}return Fe(F,Ne,e,r).catch(C),{}}function Be(e,t,n){n===void 0&&(n=!0),Object.getOwnPropertyDescriptor(h,e)||Object.defineProperty(h,e,{configurable:!0,get:function(){var r=n?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":"";Ee("`Module."+e+"` has been replaced by `"+t+"`"+r)}})}function We(e){Object.getOwnPropertyDescriptor(h,e)&&Ee("`Module."+e+"` was supplied but `"+e+"` not included in INCOMING_MODULE_JS_API")}function qe(e){return e==="FS_createPath"||e==="FS_createDataFile"||e==="FS_createPreloadedFile"||e==="FS_unlink"||e==="addRunDependency"||e==="FS_createLazyFile"||e==="FS_createDevice"||e==="removeRunDependency"}function Ue(e,t){typeof globalThis!="undefined"&&Object.defineProperty(globalThis,e,{configurable:!0,get:function(){pn("`"+e+"` is not longer defined by emscripten. "+t)}})}Ue("buffer","Please use HEAP8.buffer or wasmMemory.buffer");function Ve(e){typeof globalThis!="undefined"&&!Object.getOwnPropertyDescriptor(globalThis,e)&&Object.defineProperty(globalThis,e,{configurable:!0,get:function(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",n=e;n.startsWith("_")||(n="$"+e),t+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='"+n+"')",qe(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),pn(t)}}),He(e)}function He(e){Object.getOwnPropertyDescriptor(h,e)||Object.defineProperty(h,e,{configurable:!0,get:function(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)";qe(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),Ee(t)}})}function Ge(e){console.warn.apply(console,arguments)}var ze={1333147:function(){return Date.now()},1333170:function(t,n){var e="voip: [WasmTimestampCalibration] backgrounding detected: skew_old="+t.toFixed(1)+"ms, skew_new="+n.toFixed(1)+"ms, delta="+(n-t).toFixed(1)+"ms";self.WhatsAppVoipWasmWorkerCompatibleCallbacks.loggingCallback({level:2,message:e})}};function je(e,t){var n=t?Qt(t):"";self.WhatsAppVoipWasmWorkerCompatibleCallbacks.onCallEvent({eventType:e,userData:"",eventDataJson:n})}function Ke(e){self.__inMLInference=e}function Qe(){var e=Ee;Ee=function(n){if(self.__inMLInference&&h._wasm_throw_ml_abort){h.onAbort&&h.onAbort(n),n="Aborted("+n+")",A(n);var t=Dt(n)+1,r=Zi(),o=tl(t);On(n,o,t),h._wasm_throw_ml_abort(o),el(r);return}e(n)}}function Xe(){var e=self.WhatsAppVoipWasmWorkerCompatibleCallbacks.getPersistentDirectoryPath();if(e){var t=Dt(e)+1,n=Li(t);return On(e,n,t),n}return null}function Ye(e){var t=e?Qt(e):null,n=self.WhatsAppVoipWasmWorkerCompatibleCallbacks.getBweModelPath({versionName:t});if(n){var r=Dt(n)+1,o=Li(r);return On(n,o,r),o}return null}function Je(e,t){if(t==null){var n=new Error("get_random_bytes_js: rawBytesPtr is null");throw n.stack,n}var r=new Uint8Array(e),o=self.crypto.getRandomValues(r);ci(o,t)}function Ze(e){var t=Qt(e);return self.WhatsAppVoipWasmWorkerCompatibleCallbacks.isParticipantKnownContact({jid:t})}function et(e,t,n,r,o,a,i,s,u){var c=l(),d=new Uint8Array(n);d.set(c.subarray(t,t+n));var m=Qt(e);self.WhatsAppVoipWasmWorkerCompatibleCallbacks&&self.WhatsAppVoipWasmWorkerCompatibleCallbacks.onVideoFrameWasmToJs&&self.WhatsAppVoipWasmWorkerCompatibleCallbacks.onVideoFrameWasmToJs({userJid:m,frameBuffer:d.buffer,width:r,height:o,orientation:a,format:i,timestamp:s,isKeyFrame:u})}function tt(e,t,n,r){var o=l(),a=new Uint8Array(r);a.set(o.subarray(n,n+r));var i=Qt(t),s=Qt(e);self.WhatsAppVoipWasmWorkerCompatibleCallbacks.onSignalingXmpp({peerJid:s,callId:i,xmlPayload:a})}function nt(e,t,n,r){var o=l(),a=o.length;if(e<0||e>=a||t<0||e+t>a)return ERROR(s||(s=babelHelpers.taggedTemplateLiteralLoose(["voip: call_sendto: Invalid buffer access - buf: ",", len: ",", heapSize: ",""])),e,t,a),-1;var i=o.subarray(e,e+t);return self.WhatsAppVoipWasmWorkerCompatibleCallbacks.sendDataToRelay({data:i,len:t,ip:Qt(n),port:r})}function rt(e,t,n,r){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.initCaptureDriverJS({sample_rate:e,channels:t,bits_per_sample:n,frames_per_chunk:r})}function ot(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.startCaptureJS()}function at(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.stopCaptureJS()}function it(e,t,n,r){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.initPlaybackDriverJS({sample_rate:e,channels:t,bits_per_sample:n,frames_per_chunk:r})}function lt(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.startPlaybackJS()}function st(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.stopPlaybackJS()}function ut(){return self.WhatsAppVoipWasmWorkerCompatibleCallbacks.getBrowserAudioProcessingStatus()}function ct(e,t,n){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.startDesktopCaptureJS({width:e,height:t,max_fps:n})}function dt(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.stopDesktopCaptureJS()}function mt(e,t,n,r,o){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.startVideoCaptureJS({camera_id:Qt(e),width:t,height:n,max_fps:r,isAVUpgrade:!!o})}function pt(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.stopVideoCaptureJS()}function _t(e,t){var n=t?Qt(t).trim():"";self.WhatsAppVoipWasmWorkerCompatibleCallbacks.loggingCallback({level:e,message:n})}function ft(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}var gt=function(t){t.terminate(),t.removeAllMessageListeners("cmd"),t.addMessageListener("cmd",function(e){var n=e.cmd;A('received "'+n+'" command from terminated worker: '+t.workerID)})};function ht(e){H(!T,"Internal Error! killThread() can only ever be called from main application thread!"),H(e,"Internal Error! Null pthread_ptr in killThread!");var t=nn.pthreads[e];delete nn.pthreads[e],gt(t),Gi(e),nn.runningWorkers.splice(nn.runningWorkers.indexOf(t),1),t.pthread_ptr=0}function yt(e){H(!T,"Internal Error! cancelThread() can only ever be called from main application thread!"),H(e,"Internal Error! Null pthread_ptr in cancelThread!");var t=nn.pthreads[e];t.postMessage({cmd:"cancel",type:"cmd"})}function Ct(e){H(!T,"Internal Error! cleanupThread() can only ever be called from main application thread!"),H(e,"Internal Error! Null pthread_ptr in cleanupThread!");var t=nn.pthreads[e];H(t),nn.returnWorkerToPool(t)}var bt=function(t,n){return l().fill(0,t,t+n),t};function vt(e){H(!T,"Internal Error! spawnThread() can only ever be called from main application thread!"),H(e.pthread_ptr,"Internal error, no pthread ptr!");var t=nn.getNewWorker();if(!t)return 6;H(!t.pthread_ptr,"Internal error!"),nn.runningWorkers.push(t),nn.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var n={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};return t.postMessage(babelHelpers.extends({},n,{type:"cmd"}),e.transferList),0}var St={isAbs:function(t){return t.charAt(0)==="/"},splitPath:function(t){var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return e.exec(t).slice(1)},normalizeArray:function(t,n){for(var e=0,r=t.length-1;r>=0;r--){var o=t[r];o==="."?t.splice(r,1):o===".."?(t.splice(r,1),e++):e&&(t.splice(r,1),e--)}if(n)for(;e;e--)t.unshift("..");return t},normalize:function(t){var e=St.isAbs(t),n=t.substr(-1)==="/";return t=St.normalizeArray(t.split("/").filter(function(e){return!!e}),!e).join("/"),!t&&!e&&(t="."),t&&n&&(t+="/"),(e?"/":"")+t},dirname:function(t){var e=St.splitPath(t),n=e[0],r=e[1];return!n&&!r?".":(r&&(r=r.substr(0,r.length-1)),n+r)},basename:function(t){if(t==="/")return"/";t=St.normalize(t),t=t.replace(/\/$/,"");var e=t.lastIndexOf("/");return e===-1?t:t.substr(e+1)},join:function(){var e=Array.prototype.slice.call(arguments);return St.normalize(e.join("/"))},join2:function(t,n){return St.normalize(t+"/"+n)}},Rt=function(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return function(e){return e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),e};Ee("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: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")},Lt=function(t){return(Lt=Rt())(t)},Et={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:Kt.cwd();if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t=St.isAbs(r)}return e=St.normalizeArray(e.split("/").filter(function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."},relative:function(t,n){t=Et.resolve(t).substr(1),n=Et.resolve(n).substr(1);function e(e){for(var t=0;t<e.length&&e[t]==="";t++);for(var n=e.length-1;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}for(var r=e(t.split("/")),o=e(n.split("/")),a=Math.min(r.length,o.length),i=a,l=0;l<a;l++)if(r[l]!==o[l]){i=l;break}for(var s=[],l=i;l<r.length;l++)s.push("..");return s=s.concat(o.slice(i)),s.join("/")}},kt=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0,It=function(t,n,r){for(var e=n+r,o=n;t[o]&&!(o>=e);)++o;if(o-n>16&&t.buffer&&kt)return kt.decode(t.slice(n,o));for(var a="";n<o;){var i=t[n++];if(!(i&128)){a+=String.fromCharCode(i);continue}var l=t[n++]&63;if((i&224)==192){a+=String.fromCharCode((i&31)<<6|l);continue}var s=t[n++]&63;if((i&240)==224?i=(i&15)<<12|l<<6|s:((i&248)!=240&&pn("Invalid UTF-8 leading byte "+en(i)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),i=(i&7)<<18|l<<12|s<<6|t[n++]&63),i<65536)a+=String.fromCharCode(i);else{var u=i-65536;a+=String.fromCharCode(55296|u>>10,56320|u&1023)}}return a},Tt=[],Dt=function(t){for(var e=0,n=0;n<t.length;++n){var r=t.charCodeAt(n);r<=127?e++:r<=2047?e+=2:r>=55296&&r<=57343?(e+=4,++n):e+=3}return e},xt=function(t,n,r,o){if(H(typeof t=="string"),!(o>0))return 0;for(var e=r,a=r+o-1,i=0;i<t.length;++i){var l=t.charCodeAt(i);if(l>=55296&&l<=57343){var s=t.charCodeAt(++i);l=65536+((l&1023)<<10)|s&1023}if(l<=127){if(r>=a)break;n[r++]=l}else if(l<=2047){if(r+1>=a)break;n[r++]=192|l>>6,n[r++]=128|l&63}else if(l<=65535){if(r+2>=a)break;n[r++]=224|l>>12,n[r++]=128|l>>6&63,n[r++]=128|l&63}else{if(r+3>=a)break;l>1114111&&pn("Invalid Unicode code point "+en(l)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),n[r++]=240|l>>18,n[r++]=128|l>>12&63,n[r++]=128|l>>6&63,n[r++]=128|l&63}}return n[r]=0,r-e};function $t(e,t,n){var r=n>0?n:Dt(e)+1,o=new Array(r),a=xt(e,o,0,o.length);return t&&(o.length=a),o}var Pt=function(){if(!Tt.length){var e=null;if(typeof window!="undefined"&&typeof window.prompt=="function"?(e=window.prompt("Input: "),e!==null&&(e+="\n")):typeof readline=="function"&&(e=readline(),e!==null&&(e+="\n")),!e)return null;Tt=$t(e,!0)}return Tt.shift()},Nt={ttys:[],init:function(){},shutdown:function(){},register:function(t,n){Nt.ttys[t]={input:[],output:[],ops:n},Kt.registerDevice(t,Nt.stream_ops)},stream_ops:{open:function(t){var e=Nt.ttys[t.node.rdev];if(!e)throw new Kt.ErrnoError(43);t.tty=e,t.seekable=!1},close:function(t){t.tty.ops.fsync(t.tty)},fsync:function(t){t.tty.ops.fsync(t.tty)},read:function(t,n,r,o,a){if(!t.tty||!t.tty.ops.get_char)throw new Kt.ErrnoError(60);for(var e=0,i=0;i<o;i++){var l;try{l=t.tty.ops.get_char(t.tty)}catch(e){throw new Kt.ErrnoError(29)}if(l===void 0&&e===0)throw new Kt.ErrnoError(6);if(l==null)break;e++,n[r+i]=l}return e&&(t.node.timestamp=Date.now()),e},write:function(t,n,r,o,a){if(!t.tty||!t.tty.ops.put_char)throw new Kt.ErrnoError(60);try{for(var e=0;e<o;e++)t.tty.ops.put_char(t.tty,n[r+e])}catch(e){throw new Kt.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),e}},default_tty_ops:{get_char:function(t){return Pt()},put_char:function(t,n){n===null||n===10?(w(It(t.output,0)),t.output=[]):n!=0&&t.output.push(n)},fsync:function(t){t.output&&t.output.length>0&&(w(It(t.output,0)),t.output=[])},ioctl_tcgets:function(t){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets:function(t,n,r){return 0},ioctl_tiocgwinsz:function(t){return[24,80]}},default_tty1_ops:{put_char:function(t,n){n===null||n===10?(A(It(t.output,0)),t.output=[]):n!=0&&t.output.push(n)},fsync:function(t){t.output&&t.output.length>0&&(A(It(t.output,0)),t.output=[])}}},Mt=function(t,n){return H(n,"alignment argument is required"),Math.ceil(t/n)*n},wt=function(t){t=Mt(t,65536);var e=Mi(65536,t);return e?bt(e,t):0},At={ops_table:null,mount:function(t){return At.createNode(null,"/",16895,0)},createNode:function(t,n,r,o){if(Kt.isBlkdev(r)||Kt.isFIFO(r))throw new Kt.ErrnoError(63);At.ops_table||(At.ops_table={dir:{node:{getattr:At.node_ops.getattr,setattr:At.node_ops.setattr,lookup:At.node_ops.lookup,mknod:At.node_ops.mknod,rename:At.node_ops.rename,unlink:At.node_ops.unlink,rmdir:At.node_ops.rmdir,readdir:At.node_ops.readdir,symlink:At.node_ops.symlink},stream:{llseek:At.stream_ops.llseek}},file:{node:{getattr:At.node_ops.getattr,setattr:At.node_ops.setattr},stream:{llseek:At.stream_ops.llseek,read:At.stream_ops.read,write:At.stream_ops.write,allocate:At.stream_ops.allocate,mmap:At.stream_ops.mmap,msync:At.stream_ops.msync}},link:{node:{getattr:At.node_ops.getattr,setattr:At.node_ops.setattr,readlink:At.node_ops.readlink},stream:{}},chrdev:{node:{getattr:At.node_ops.getattr,setattr:At.node_ops.setattr},stream:Kt.chrdev_stream_ops}});var e=Kt.createNode(t,n,r,o);return Kt.isDir(e.mode)?(e.node_ops=At.ops_table.dir.node,e.stream_ops=At.ops_table.dir.stream,e.contents={}):Kt.isFile(e.mode)?(e.node_ops=At.ops_table.file.node,e.stream_ops=At.ops_table.file.stream,e.usedBytes=0,e.contents=null):Kt.isLink(e.mode)?(e.node_ops=At.ops_table.link.node,e.stream_ops=At.ops_table.link.stream):Kt.isChrdev(e.mode)&&(e.node_ops=At.ops_table.chrdev.node,e.stream_ops=At.ops_table.chrdev.stream),e.timestamp=Date.now(),t&&(t.contents[n]=e,t.timestamp=e.timestamp),e},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,n){var e=t.contents?t.contents.length:0;if(!(e>=n)){var r=1024*1024;n=Math.max(n,e*(e<r?2:1.125)>>>0),e!=0&&(n=Math.max(n,256));var o=t.contents;t.contents=new Uint8Array(n),t.usedBytes>0&&t.contents.set(o.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,n){if(t.usedBytes!=n)if(n==0)t.contents=null,t.usedBytes=0;else{var e=t.contents;t.contents=new Uint8Array(n),e&&t.contents.set(e.subarray(0,Math.min(n,t.usedBytes))),t.usedBytes=n}},node_ops:{getattr:function(t){var e={};return e.dev=Kt.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,Kt.isDir(t.mode)?e.size=4096:Kt.isFile(t.mode)?e.size=t.usedBytes:Kt.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,n){n.mode!==void 0&&(t.mode=n.mode),n.timestamp!==void 0&&(t.timestamp=n.timestamp),n.size!==void 0&&At.resizeFileStorage(t,n.size)},lookup:function(t,n){throw Kt.genericErrors[44]},mknod:function(t,n,r,o){return At.createNode(t,n,r,o)},rename:function(t,n,r){if(Kt.isDir(t.mode)){var e;try{e=Kt.lookupNode(n,r)}catch(e){}if(e)for(var o in e.contents)throw new Kt.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=r,n.contents[r]=t,n.timestamp=t.parent.timestamp,t.parent=n},unlink:function(t,n){delete t.contents[n],t.timestamp=Date.now()},rmdir:function(t,n){var e=Kt.lookupNode(t,n);for(var r in e.contents)throw new Kt.ErrnoError(55);delete t.contents[n],t.timestamp=Date.now()},readdir:function(t){var e=[".",".."];for(var n in t.contents)Object.prototype.hasOwnProperty.call(t.contents,n)&&e.push(n);return e},symlink:function(t,n,r){var e=At.createNode(t,n,41471,0);return e.link=r,e},readlink:function(t){if(!Kt.isLink(t.mode))throw new Kt.ErrnoError(28);return t.link}},stream_ops:{read:function(t,n,r,o,a){var e=t.node.contents;if(a>=t.node.usedBytes)return 0;var i=Math.min(t.node.usedBytes-a,o);if(H(i>=0),i>8&&e.subarray)n.set(e.subarray(a,a+i),r);else for(var l=0;l<i;l++)n[r+l]=e[a+l];return i},write:function(t,n,r,o,a,l){if(H(!(n instanceof ArrayBuffer)),n.buffer===i().buffer&&(l=!1),!o)return 0;var e=t.node;if(e.timestamp=Date.now(),n.subarray&&(!e.contents||e.contents.subarray)){if(l)return H(a===0,"canOwn must imply no weird position inside the file"),e.contents=n.subarray(r,r+o),e.usedBytes=o,o;if(e.usedBytes===0&&a===0)return e.contents=n.slice(r,r+o),e.usedBytes=o,o;if(a+o<=e.usedBytes)return e.contents.set(n.subarray(r,r+o),a),o}if(At.expandFileStorage(e,a+o),e.contents.subarray&&n.subarray)e.contents.set(n.subarray(r,r+o),a);else for(var s=0;s<o;s++)e.contents[a+s]=n[r+s];return e.usedBytes=Math.max(e.usedBytes,a+o),o},llseek:function(t,n,r){var e=n;if(r===1?e+=t.position:r===2&&Kt.isFile(t.node.mode)&&(e+=t.node.usedBytes),e<0)throw new Kt.ErrnoError(28);return e},allocate:function(t,n,r){At.expandFileStorage(t.node,n+r),t.node.usedBytes=Math.max(t.node.usedBytes,n+r)},mmap:function(t,n,r,o,a){if(!Kt.isFile(t.node.mode))throw new Kt.ErrnoError(43);var e,l,s=t.node.contents;if(!(a&2)&&s.buffer===i().buffer)l=!1,e=s.byteOffset;else{if((r>0||r+n<s.length)&&(s.subarray?s=s.subarray(r,r+n):s=Array.prototype.slice.call(s,r,r+n)),l=!0,e=wt(n),!e)throw new Kt.ErrnoError(48);i().set(s,e)}return{ptr:e,allocated:l}},msync:function(t,n,r,o,a){return At.stream_ops.write(t,n,0,o,r,!1),0}}},Ft=function(t,n,r,o){var e=o?"":Se("al "+t);P(t,function(r){H(r,'Loading data file "'+t+'" failed (no arrayBuffer).'),n(new Uint8Array(r)),e&&Le(e)},function(e){if(r)r();else throw'Loading data file "'+t+'" failed.'}),e&&Re(e)},Ot=h.preloadPlugins||[];function Bt(e,t,n,r){typeof Ra!="undefined"&&Ra.init();var o=!1;return Ot.forEach(function(a){o||a.canHandle(t)&&(a.handle(e,t,n,r),o=!0)}),o}function Wt(e,t,n,r,o,a,i,l,s,u){var c=t?Et.resolve(St.join2(e,t)):e,d=Se("cp "+c);function m(n){function m(n){u&&u(),l||Kt.createDataFile(e,t,n,r,o,s),a&&a(),Le(d)}Bt(n,c,m,function(){i&&i(),Le(d)})||m(n)}Re(d),typeof n=="string"?Ft(n,function(e){return m(e)},i):m(n)}function qt(e){var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},n=t[e];if(typeof n=="undefined")throw new Error("Unknown file open mode: "+e);return n}function Ut(e,t){var n=0;return e&&(n|=365),t&&(n|=146),n}var Vt={dbs:{},indexedDB:(function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t})(function(){if(typeof indexedDB!="undefined")return indexedDB;var e=null;return typeof window=="object"&&(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),H(e,"IDBFS used, but indexedDB not supported"),e}),DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(t){return At.mount.apply(null,arguments)},syncfs:function(t,n,r){Vt.getLocalSet(t,function(e,o){if(e)return r(e);Vt.getRemoteSet(t,function(e,t){if(e)return r(e);var a=n?t:o,i=n?o:t;Vt.reconcile(a,i,r)})})},quit:function(){Object.values(Vt.dbs).forEach(function(e){return e.close()}),Vt.dbs={}},getDB:function(t,n){var e=Vt.dbs[t];if(e)return n(null,e);var r;try{r=Vt.indexedDB().open(t,Vt.DB_VERSION)}catch(e){return n(e)}if(!r)return n("Unable to connect to IndexedDB");r.onupgradeneeded=function(e){var t=e.target.result,n=e.target.transaction,r;t.objectStoreNames.contains(Vt.DB_STORE_NAME)?r=n.objectStore(Vt.DB_STORE_NAME):r=t.createObjectStore(Vt.DB_STORE_NAME),r.indexNames.contains("timestamp")||r.createIndex("timestamp","timestamp",{unique:!1})},r.onsuccess=function(){e=r.result,Vt.dbs[t]=e,n(null,e)},r.onerror=function(e){n(e.target.error),e.preventDefault()}},getLocalSet:function(t,n){var e={};function r(e){return e!=="."&&e!==".."}function o(e){return function(t){return St.join2(e,t)}}for(var a=Kt.readdir(t.mountpoint).filter(r).map(o(t.mountpoint));a.length;){var i=a.pop(),l;try{l=Kt.stat(i)}catch(e){return n(e)}Kt.isDir(l.mode)&&a.push.apply(a,Kt.readdir(i).filter(r).map(o(i))),e[i]={timestamp:l.mtime}}return n(null,{type:"local",entries:e})},getRemoteSet:function(t,n){var e={};Vt.getDB(t.mountpoint,function(t,r){if(t)return n(t);try{var o=r.transaction([Vt.DB_STORE_NAME],"readonly");o.onerror=function(e){n(e.target.error),e.preventDefault()};var a=o.objectStore(Vt.DB_STORE_NAME),i=a.index("timestamp");i.openKeyCursor().onsuccess=function(t){var o=t.target.result;if(!o)return n(null,{type:"remote",db:r,entries:e});e[o.primaryKey]={timestamp:o.key},o.continue()}}catch(e){return n(e)}})},loadLocalEntry:function(t,n){var e,r;try{var o=Kt.lookupPath(t);r=o.node,e=Kt.stat(t)}catch(e){return n(e)}return Kt.isDir(e.mode)?n(null,{timestamp:e.mtime,mode:e.mode}):Kt.isFile(e.mode)?(r.contents=At.getFileDataAsTypedArray(r),n(null,{timestamp:e.mtime,mode:e.mode,contents:r.contents})):n(new Error("node type not supported"))},storeLocalEntry:function(t,n,r){try{if(Kt.isDir(n.mode))Kt.mkdirTree(t,n.mode);else if(Kt.isFile(n.mode))Kt.writeFile(t,n.contents,{canOwn:!0});else return r(new Error("node type not supported"));Kt.chmod(t,n.mode),Kt.utime(t,n.timestamp,n.timestamp)}catch(e){return r(e)}r(null)},removeLocalEntry:function(t,n){try{var e=Kt.stat(t);Kt.isDir(e.mode)?Kt.rmdir(t):Kt.isFile(e.mode)&&Kt.unlink(t)}catch(e){return n(e)}n(null)},loadRemoteEntry:function(t,n,r){var e=t.get(n);e.onsuccess=function(e){r(null,e.target.result)},e.onerror=function(e){r(e.target.error),e.preventDefault()}},storeRemoteEntry:function(t,n,r,o){try{var e=t.put(r,n)}catch(e){o(e);return}e.onsuccess=function(){o(null)},e.onerror=function(e){o(e.target.error),e.preventDefault()}},removeRemoteEntry:function(t,n,r){var e=t.delete(n);e.onsuccess=function(){r(null)},e.onerror=function(e){r(e.target.error),e.preventDefault()}},reconcile:function(t,n,r){var e=0,o=[];Object.keys(t.entries).forEach(function(r){var a=t.entries[r],i=n.entries[r];(!i||a.timestamp.getTime()!=i.timestamp.getTime())&&(o.push(r),e++)});var i=[];if(Object.keys(n.entries).forEach(function(n){t.entries[n]||(i.push(n),e++)}),!e)return r(null);var l=!1,s=t.type==="remote"?t.db:n.db,u=s.transaction([Vt.DB_STORE_NAME],"readwrite"),c=u.objectStore(Vt.DB_STORE_NAME);function d(e){if(e&&!l)return l=!0,r(e)}u.onerror=function(e){d(a.error),e.preventDefault()},u.oncomplete=function(e){l||r(null)},o.sort().forEach(function(e){n.type==="local"?Vt.loadRemoteEntry(c,e,function(t,n){if(t)return d(t);Vt.storeLocalEntry(e,n,d)}):Vt.loadLocalEntry(e,function(t,n){if(t)return d(t);Vt.storeRemoteEntry(c,e,n,d)})}),i.sort().reverse().forEach(function(e){n.type==="local"?Vt.removeLocalEntry(e,d):Vt.removeRemoteEntry(c,e,d)})}},Ht={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},Gt={};function zt(e){return pn("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling"),e}function jt(e){var t=/\b_Z[\w\d_]+/g;return e.replace(t,function(e){var t=zt(e);return e===t?e:t+" ["+e+"]"})}var Kt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(t,n){if(n===void 0&&(n={}),t=Et.resolve(t),!t)return{path:"",node:null};var e={follow_mount:!0,recurse_count:0};if(n=Object.assign(e,n),n.recurse_count>8)throw new Kt.ErrnoError(32);for(var r=t.split("/").filter(function(e){return!!e}),o=Kt.root,a="/",i=0;i<r.length;i++){var l=i===r.length-1;if(l&&n.parent)break;if(o=Kt.lookupNode(o,r[i]),a=St.join2(a,r[i]),Kt.isMountpoint(o)&&(!l||l&&n.follow_mount)&&(o=o.mounted.root),!l||n.follow)for(var s=0;Kt.isLink(o.mode);){var u=Kt.readlink(a);a=Et.resolve(St.dirname(a),u);var c=Kt.lookupPath(a,{recurse_count:n.recurse_count+1});if(o=c.node,s++>40)throw new Kt.ErrnoError(32)}}return{path:a,node:o}},getPath:function(t){for(var e;;){if(Kt.isRoot(t)){var n=t.mount.mountpoint;return e?n[n.length-1]!=="/"?n+"/"+e:n+e:n}e=e?t.name+"/"+e:t.name,t=t.parent}},hashName:function(t,n){for(var e=0,r=0;r<n.length;r++)e=(e<<5)-e+n.charCodeAt(r)|0;return(t+e>>>0)%Kt.nameTable.length},hashAddNode:function(t){var e=Kt.hashName(t.parent.id,t.name);t.name_next=Kt.nameTable[e],Kt.nameTable[e]=t},hashRemoveNode:function(t){var e=Kt.hashName(t.parent.id,t.name);if(Kt.nameTable[e]===t)Kt.nameTable[e]=t.name_next;else for(var n=Kt.nameTable[e];n;){if(n.name_next===t){n.name_next=t.name_next;break}n=n.name_next}},lookupNode:function(t,n){var e=Kt.mayLookup(t);if(e)throw new Kt.ErrnoError(e,t);for(var r=Kt.hashName(t.id,n),o=Kt.nameTable[r];o;o=o.name_next){var a=o.name;if(o.parent.id===t.id&&a===n)return o}return Kt.lookup(t,n)},createNode:function(t,n,r,o){H(typeof t=="object");var e=new Kt.FSNode(t,n,r,o);return Kt.hashAddNode(e),e},destroyNode:function(t){Kt.hashRemoveNode(t)},isRoot:function(t){return t===t.parent},isMountpoint:function(t){return!!t.mounted},isFile:function(t){return(t&61440)===32768},isDir:function(t){return(t&61440)===16384},isLink:function(t){return(t&61440)===40960},isChrdev:function(t){return(t&61440)===8192},isBlkdev:function(t){return(t&61440)===24576},isFIFO:function(t){return(t&61440)===4096},isSocket:function(t){return(t&49152)===49152},flagsToPermissionString:function(t){var e=["r","w","rw"][t&3];return t&512&&(e+="w"),e},nodePermissions:function(t,n){return Kt.ignorePermissions?0:n.includes("r")&&!(t.mode&292)||n.includes("w")&&!(t.mode&146)||n.includes("x")&&!(t.mode&73)?2:0},mayLookup:function(t){var e=Kt.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate:function(t,n){try{var e=Kt.lookupNode(t,n);return 20}catch(e){}return Kt.nodePermissions(t,"wx")},mayDelete:function(t,n,r){var e;try{e=Kt.lookupNode(t,n)}catch(e){return e.errno}var o=Kt.nodePermissions(t,"wx");if(o)return o;if(r){if(!Kt.isDir(e.mode))return 54;if(Kt.isRoot(e)||Kt.getPath(e)===Kt.cwd())return 10}else if(Kt.isDir(e.mode))return 31;return 0},mayOpen:function(t,n){return t?Kt.isLink(t.mode)?32:Kt.isDir(t.mode)&&(Kt.flagsToPermissionString(n)!=="r"||n&512)?31:Kt.nodePermissions(t,Kt.flagsToPermissionString(n)):44},MAX_OPEN_FDS:4096,nextfd:function(){for(var e=0;e<=Kt.MAX_OPEN_FDS;e++)if(!Kt.streams[e])return e;throw new Kt.ErrnoError(33)},getStreamChecked:function(t){var e=Kt.getStream(t);if(!e)throw new Kt.ErrnoError(8);return e},getStream:function(t){return Kt.streams[t]},createStream:function(t,n){return n===void 0&&(n=-1),Kt.FSStream||(Kt.FSStream=function(){this.shared={}},Kt.FSStream.prototype={},Object.defineProperties(Kt.FSStream.prototype,{object:{get:function(){return this.node},set:function(t){this.node=t}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(t){this.shared.flags=t}},position:{get:function(){return this.shared.position},set:function(t){this.shared.position=t}}})),t=Object.assign(new Kt.FSStream,t),n==-1&&(n=Kt.nextfd()),t.fd=n,Kt.streams[n]=t,t},closeStream:function(t){Kt.streams[t]=null},chrdev_stream_ops:{open:function(t){var e=Kt.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:function(){throw new Kt.ErrnoError(70)}},major:function(t){return t>>8},minor:function(t){return t&255},makedev:function(t,n){return t<<8|n},registerDevice:function(t,n){Kt.devices[t]={stream_ops:n}},getDevice:function(t){return Kt.devices[t]},getMounts:function(t){for(var e=[],n=[t];n.length;){var r=n.pop();e.push(r),n.push.apply(n,r.mounts)}return e},syncfs:function(t,n){typeof t=="function"&&(n=t,t=!1),Kt.syncFSRequests++,Kt.syncFSRequests>1&&A("warning: "+Kt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=Kt.getMounts(Kt.root.mount),r=0;function o(e){return H(Kt.syncFSRequests>0),Kt.syncFSRequests--,n(e)}function a(t){if(t)return a.errored?void 0:(a.errored=!0,o(t));++r>=e.length&&o(null)}e.forEach(function(e){if(!e.type.syncfs)return a(null);e.type.syncfs(e,t,a)})},mount:function(t,n,r){if(typeof t=="string")throw t;var e=r==="/",o=!r,a;if(e&&Kt.root)throw new Kt.ErrnoError(10);if(!e&&!o){var i=Kt.lookupPath(r,{follow_mount:!1});if(r=i.path,a=i.node,Kt.isMountpoint(a))throw new Kt.ErrnoError(10);if(!Kt.isDir(a.mode))throw new Kt.ErrnoError(54)}var l={type:t,opts:n,mountpoint:r,mounts:[]},s=t.mount(l);return s.mount=l,l.root=s,e?Kt.root=s:a&&(a.mounted=l,a.mount&&a.mount.mounts.push(l)),s},unmount:function(t){var e=Kt.lookupPath(t,{follow_mount:!1});if(!Kt.isMountpoint(e.node))throw new Kt.ErrnoError(28);var n=e.node,r=n.mounted,o=Kt.getMounts(r);Object.keys(Kt.nameTable).forEach(function(e){for(var t=Kt.nameTable[e];t;){var n=t.name_next;o.includes(t.mount)&&Kt.destroyNode(t),t=n}}),n.mounted=null;var a=n.mount.mounts.indexOf(r);H(a!==-1),n.mount.mounts.splice(a,1)},lookup:function(t,n){return t.node_ops.lookup(t,n)},mknod:function(t,n,r){var e=Kt.lookupPath(t,{parent:!0}),o=e.node,a=St.basename(t);if(!a||a==="."||a==="..")throw new Kt.ErrnoError(28);var i=Kt.mayCreate(o,a);if(i)throw new Kt.ErrnoError(i);if(!o.node_ops.mknod)throw new Kt.ErrnoError(63);return o.node_ops.mknod(o,a,n,r)},create:function(t,n){return n=n!==void 0?n:438,n&=4095,n|=32768,Kt.mknod(t,n,0)},mkdir:function(t,n){return n=n!==void 0?n:511,n&=1023,n|=16384,Kt.mknod(t,n,0)},mkdirTree:function(t,n){for(var e=t.split("/"),r="",o=0;o<e.length;++o)if(e[o]){r+="/"+e[o];try{Kt.mkdir(r,n)}catch(e){if(e.errno!=20)throw e}}},mkdev:function(t,n,r){return typeof r=="undefined"&&(r=n,n=438),n|=8192,Kt.mknod(t,n,r)},symlink:function(t,n){if(!Et.resolve(t))throw new Kt.ErrnoError(44);var e=Kt.lookupPath(n,{parent:!0}),r=e.node;if(!r)throw new Kt.ErrnoError(44);var o=St.basename(n),a=Kt.mayCreate(r,o);if(a)throw new Kt.ErrnoError(a);if(!r.node_ops.symlink)throw new Kt.ErrnoError(63);return r.node_ops.symlink(r,o,t)},rename:function(t,n){var e=St.dirname(t),r=St.dirname(n),o=St.basename(t),a=St.basename(n),i,l,s;if(i=Kt.lookupPath(t,{parent:!0}),l=i.node,i=Kt.lookupPath(n,{parent:!0}),s=i.node,!l||!s)throw new Kt.ErrnoError(44);if(l.mount!==s.mount)throw new Kt.ErrnoError(75);var u=Kt.lookupNode(l,o),c=Et.relative(t,r);if(c.charAt(0)!==".")throw new Kt.ErrnoError(28);if(c=Et.relative(n,e),c.charAt(0)!==".")throw new Kt.ErrnoError(55);var d;try{d=Kt.lookupNode(s,a)}catch(e){}if(u!==d){var m=Kt.isDir(u.mode),p=Kt.mayDelete(l,o,m);if(p)throw new Kt.ErrnoError(p);if(p=d?Kt.mayDelete(s,a,m):Kt.mayCreate(s,a),p)throw new Kt.ErrnoError(p);if(!l.node_ops.rename)throw new Kt.ErrnoError(63);if(Kt.isMountpoint(u)||d&&Kt.isMountpoint(d))throw new Kt.ErrnoError(10);if(s!==l&&(p=Kt.nodePermissions(l,"w"),p))throw new Kt.ErrnoError(p);Kt.hashRemoveNode(u);try{l.node_ops.rename(u,s,a)}catch(e){throw e}finally{Kt.hashAddNode(u)}}},rmdir:function(t){var e=Kt.lookupPath(t,{parent:!0}),n=e.node,r=St.basename(t),o=Kt.lookupNode(n,r),a=Kt.mayDelete(n,r,!0);if(a)throw new Kt.ErrnoError(a);if(!n.node_ops.rmdir)throw new Kt.ErrnoError(63);if(Kt.isMountpoint(o))throw new Kt.ErrnoError(10);n.node_ops.rmdir(n,r),Kt.destroyNode(o)},readdir:function(t){var e=Kt.lookupPath(t,{follow:!0}),n=e.node;if(!n.node_ops.readdir)throw new Kt.ErrnoError(54);return n.node_ops.readdir(n)},unlink:function(t){var e=Kt.lookupPath(t,{parent:!0}),n=e.node;if(!n)throw new Kt.ErrnoError(44);var r=St.basename(t),o=Kt.lookupNode(n,r),a=Kt.mayDelete(n,r,!1);if(a)throw new Kt.ErrnoError(a);if(!n.node_ops.unlink)throw new Kt.ErrnoError(63);if(Kt.isMountpoint(o))throw new Kt.ErrnoError(10);n.node_ops.unlink(n,r),Kt.destroyNode(o)},readlink:function(t){var e=Kt.lookupPath(t),n=e.node;if(!n)throw new Kt.ErrnoError(44);if(!n.node_ops.readlink)throw new Kt.ErrnoError(28);return Et.resolve(Kt.getPath(n.parent),n.node_ops.readlink(n))},stat:function(t,n){var e=Kt.lookupPath(t,{follow:!n}),r=e.node;if(!r)throw new Kt.ErrnoError(44);if(!r.node_ops.getattr)throw new Kt.ErrnoError(63);return r.node_ops.getattr(r)},lstat:function(t){return Kt.stat(t,!0)},chmod:function(t,n,r){var e;if(typeof t=="string"){var o=Kt.lookupPath(t,{follow:!r});e=o.node}else e=t;if(!e.node_ops.setattr)throw new Kt.ErrnoError(63);e.node_ops.setattr(e,{mode:n&4095|e.mode&-4096,timestamp:Date.now()})},lchmod:function(t,n){Kt.chmod(t,n,!0)},fchmod:function(t,n){var e=Kt.getStreamChecked(t);Kt.chmod(e.node,n)},chown:function(t,n,r,o){var e;if(typeof t=="string"){var a=Kt.lookupPath(t,{follow:!o});e=a.node}else e=t;if(!e.node_ops.setattr)throw new Kt.ErrnoError(63);e.node_ops.setattr(e,{timestamp:Date.now()})},lchown:function(t,n,r){Kt.chown(t,n,r,!0)},fchown:function(t,n,r){var e=Kt.getStreamChecked(t);Kt.chown(e.node,n,r)},truncate:function(t,n){if(n<0)throw new Kt.ErrnoError(28);var e;if(typeof t=="string"){var r=Kt.lookupPath(t,{follow:!0});e=r.node}else e=t;if(!e.node_ops.setattr)throw new Kt.ErrnoError(63);if(Kt.isDir(e.mode))throw new Kt.ErrnoError(31);if(!Kt.isFile(e.mode))throw new Kt.ErrnoError(28);var o=Kt.nodePermissions(e,"w");if(o)throw new Kt.ErrnoError(o);e.node_ops.setattr(e,{size:n,timestamp:Date.now()})},ftruncate:function(t,n){var e=Kt.getStreamChecked(t);if((e.flags&2097155)===0)throw new Kt.ErrnoError(28);Kt.truncate(e.node,n)},utime:function(t,n,r){var e=Kt.lookupPath(t,{follow:!0}),o=e.node;o.node_ops.setattr(o,{timestamp:Math.max(n,r)})},open:function(t,n,r){if(t==="")throw new Kt.ErrnoError(44);n=typeof n=="string"?qt(n):n,r=typeof r=="undefined"?438:r,n&64?r=r&4095|32768:r=0;var e;if(typeof t=="object")e=t;else{t=St.normalize(t);try{var o=Kt.lookupPath(t,{follow:!(n&131072)});e=o.node}catch(e){}}var a=!1;if(n&64)if(e){if(n&128)throw new Kt.ErrnoError(20)}else e=Kt.mknod(t,r,0),a=!0;if(!e)throw new Kt.ErrnoError(44);if(Kt.isChrdev(e.mode)&&(n&=-513),n&65536&&!Kt.isDir(e.mode))throw new Kt.ErrnoError(54);if(!a){var i=Kt.mayOpen(e,n);if(i)throw new Kt.ErrnoError(i)}n&512&&!a&&Kt.truncate(e,0),n&=-131713;var l=Kt.createStream({node:e,path:Kt.getPath(e),flags:n,seekable:!0,position:0,stream_ops:e.stream_ops,ungotten:[],error:!1});return l.stream_ops.open&&l.stream_ops.open(l),h.logReadFiles&&!(n&1)&&(Kt.readFiles||(Kt.readFiles={}),t in Kt.readFiles||(Kt.readFiles[t]=1)),l},close:function(t){if(Kt.isClosed(t))throw new Kt.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(e){throw e}finally{Kt.closeStream(t.fd)}t.fd=null},isClosed:function(t){return t.fd===null},llseek:function(t,n,r){if(Kt.isClosed(t))throw new Kt.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new Kt.ErrnoError(70);if(r!=0&&r!=1&&r!=2)throw new Kt.ErrnoError(28);return t.position=t.stream_ops.llseek(t,n,r),t.ungotten=[],t.position},read:function(t,n,r,o,a){if(H(r>=0),o<0||a<0)throw new Kt.ErrnoError(28);if(Kt.isClosed(t))throw new Kt.ErrnoError(8);if((t.flags&2097155)===1)throw new Kt.ErrnoError(8);if(Kt.isDir(t.node.mode))throw new Kt.ErrnoError(31);if(!t.stream_ops.read)throw new Kt.ErrnoError(28);var e=typeof a!="undefined";if(!e)a=t.position;else if(!t.seekable)throw new Kt.ErrnoError(70);var i=t.stream_ops.read(t,n,r,o,a);return e||(t.position+=i),i},write:function(t,n,r,o,a,i){if(H(r>=0),o<0||a<0)throw new Kt.ErrnoError(28);if(Kt.isClosed(t))throw new Kt.ErrnoError(8);if((t.flags&2097155)===0)throw new Kt.ErrnoError(8);if(Kt.isDir(t.node.mode))throw new Kt.ErrnoError(31);if(!t.stream_ops.write)throw new Kt.ErrnoError(28);t.seekable&&t.flags&1024&&Kt.llseek(t,0,2);var e=typeof a!="undefined";if(!e)a=t.position;else if(!t.seekable)throw new Kt.ErrnoError(70);var l=t.stream_ops.write(t,n,r,o,a,i);return e||(t.position+=l),l},allocate:function(t,n,r){if(Kt.isClosed(t))throw new Kt.ErrnoError(8);if(n<0||r<=0)throw new Kt.ErrnoError(28);if((t.flags&2097155)===0)throw new Kt.ErrnoError(8);if(!Kt.isFile(t.node.mode)&&!Kt.isDir(t.node.mode))throw new Kt.ErrnoError(43);if(!t.stream_ops.allocate)throw new Kt.ErrnoError(138);t.stream_ops.allocate(t,n,r)},mmap:function(t,n,r,o,a){if((o&2)!==0&&(a&2)===0&&(t.flags&2097155)!==2)throw new Kt.ErrnoError(2);if((t.flags&2097155)===1)throw new Kt.ErrnoError(2);if(!t.stream_ops.mmap)throw new Kt.ErrnoError(43);return t.stream_ops.mmap(t,n,r,o,a)},msync:function(t,n,r,o,a){return H(r>=0),t.stream_ops.msync?t.stream_ops.msync(t,n,r,o,a):0},munmap:function(t){return 0},ioctl:function(t,n,r){if(!t.stream_ops.ioctl)throw new Kt.ErrnoError(59);return t.stream_ops.ioctl(t,n,r)},readFile:function(t,n){if(n===void 0&&(n={}),n.flags=n.flags||0,n.encoding=n.encoding||"binary",n.encoding!=="utf8"&&n.encoding!=="binary")throw new Error('Invalid encoding type "'+n.encoding+'"');var e,r=Kt.open(t,n.flags),o=Kt.stat(t),a=o.size,i=new Uint8Array(a);return Kt.read(r,i,0,a,0),n.encoding==="utf8"?e=It(i,0):n.encoding==="binary"&&(e=i),Kt.close(r),e},writeFile:function(t,n,r){r===void 0&&(r={}),r.flags=r.flags||577;var e=Kt.open(t,r.flags,r.mode);if(typeof n=="string"){var o=new Uint8Array(Dt(n)+1),a=xt(n,o,0,o.length);Kt.write(e,o,0,a,void 0,r.canOwn)}else if(ArrayBuffer.isView(n))Kt.write(e,n,0,n.byteLength,void 0,r.canOwn);else throw new Error("Unsupported data type");Kt.close(e)},cwd:function(){return Kt.currentPath},chdir:function(t){var e=Kt.lookupPath(t,{follow:!0});if(e.node===null)throw new Kt.ErrnoError(44);if(!Kt.isDir(e.node.mode))throw new Kt.ErrnoError(54);var n=Kt.nodePermissions(e.node,"x");if(n)throw new Kt.ErrnoError(n);Kt.currentPath=e.path},createDefaultDirectories:function(){Kt.mkdir("/tmp"),Kt.mkdir("/home"),Kt.mkdir("/home/web_user")},createDefaultDevices:function(){Kt.mkdir("/dev"),Kt.registerDevice(Kt.makedev(1,3),{read:function(){return 0},write:function(t,n,r,o,a){return o}}),Kt.mkdev("/dev/null",Kt.makedev(1,3)),Nt.register(Kt.makedev(5,0),Nt.default_tty_ops),Nt.register(Kt.makedev(6,0),Nt.default_tty1_ops),Kt.mkdev("/dev/tty",Kt.makedev(5,0)),Kt.mkdev("/dev/tty1",Kt.makedev(6,0));var e=new Uint8Array(1024),t=0,n=function(){return t===0&&(t=Lt(e).byteLength),e[--t]};Kt.createDevice("/dev","random",n),Kt.createDevice("/dev","urandom",n),Kt.mkdir("/dev/shm"),Kt.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){Kt.mkdir("/proc");var e=Kt.mkdir("/proc/self");Kt.mkdir("/proc/self/fd"),Kt.mount({mount:function(){var t=Kt.createNode(e,"fd",16895,73);return t.node_ops={lookup:function(t,n){var e=+n,r=Kt.getStreamChecked(e),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return r.path}}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:function(){h.stdin?Kt.createDevice("/dev","stdin",h.stdin):Kt.symlink("/dev/tty","/dev/stdin"),h.stdout?Kt.createDevice("/dev","stdout",null,h.stdout):Kt.symlink("/dev/tty","/dev/stdout"),h.stderr?Kt.createDevice("/dev","stderr",null,h.stderr):Kt.symlink("/dev/tty1","/dev/stderr");var e=Kt.open("/dev/stdin",0),t=Kt.open("/dev/stdout",1),n=Kt.open("/dev/stderr",1);H(e.fd===0,"invalid handle for stdin ("+e.fd+")"),H(t.fd===1,"invalid handle for stdout ("+t.fd+")"),H(n.fd===2,"invalid handle for stderr ("+n.fd+")")},ensureErrnoError:function(){Kt.ErrnoError||(Kt.ErrnoError=function(t,n){this.name="ErrnoError",this.node=n,this.setErrno=function(e){this.errno=e;for(var t in Gt)if(Gt[t]===e){this.code=t;break}},this.setErrno(t),this.message=Ht[t],this.stack&&(Object.defineProperty(this,"stack",{value:new Error().stack,writable:!0}),this.stack=jt(this.stack))},Kt.ErrnoError.prototype=new Error,Kt.ErrnoError.prototype.constructor=Kt.ErrnoError,[44].forEach(function(e){Kt.genericErrors[e]=new Kt.ErrnoError(e),Kt.genericErrors[e].stack="<generic error, no stack>"}))},staticInit:function(){Kt.ensureErrnoError(),Kt.nameTable=new Array(4096),Kt.mount(At,{},"/"),Kt.createDefaultDirectories(),Kt.createDefaultDevices(),Kt.createSpecialDirectories(),Kt.filesystems={MEMFS:At,IDBFS:Vt}},init:function(t,n,r){H(!Kt.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)"),Kt.init.initialized=!0,Kt.ensureErrnoError(),h.stdin=t||h.stdin,h.stdout=n||h.stdout,h.stderr=r||h.stderr,Kt.createStandardStreams()},quit:function(){Kt.init.initialized=!1,Ii(0);for(var e=0;e<Kt.streams.length;e++){var t=Kt.streams[e];t&&Kt.close(t)}},findObject:function(t,n){var e=Kt.analyzePath(t,n);return e.exists?e.object:null},analyzePath:function(t,n){try{var e=Kt.lookupPath(t,{follow:!n});t=e.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 e=Kt.lookupPath(t,{parent:!0});r.parentExists=!0,r.parentPath=e.path,r.parentObject=e.node,r.name=St.basename(t),e=Kt.lookupPath(t,{follow:!n}),r.exists=!0,r.path=e.path,r.object=e.node,r.name=e.node.name,r.isRoot=e.path==="/"}catch(e){r.error=e.errno}return r},createPath:function(t,n,r,o){t=typeof t=="string"?t:Kt.getPath(t);for(var e=n.split("/").reverse();e.length;){var a=e.pop();if(a){var i=St.join2(t,a);try{Kt.mkdir(i)}catch(e){}t=i}}return i},createFile:function(t,n,r,o,a){var e=St.join2(typeof t=="string"?t:Kt.getPath(t),n),i=Ut(o,a);return Kt.create(e,i)},createDataFile:function(t,n,r,o,a,i){var e=n;t&&(t=typeof t=="string"?t:Kt.getPath(t),e=n?St.join2(t,n):t);var l=Ut(o,a),s=Kt.create(e,l);if(r){if(typeof r=="string"){for(var u=new Array(r.length),c=0,d=r.length;c<d;++c)u[c]=r.charCodeAt(c);r=u}Kt.chmod(s,l|146);var m=Kt.open(s,577);Kt.write(m,r,0,r.length,0,i),Kt.close(m),Kt.chmod(s,l)}return s},createDevice:function(t,n,r,o){var e=St.join2(typeof t=="string"?t:Kt.getPath(t),n),a=Ut(!!r,!!o);Kt.createDevice.major||(Kt.createDevice.major=64);var i=Kt.makedev(Kt.createDevice.major++,0);return Kt.registerDevice(i,{open:function(t){t.seekable=!1},close:function(t){o&&o.buffer&&o.buffer.length&&o(10)},read:function(t,n,o,a,i){for(var e=0,l=0;l<a;l++){var s;try{s=r()}catch(e){throw new Kt.ErrnoError(29)}if(s===void 0&&e===0)throw new Kt.ErrnoError(6);if(s==null)break;e++,n[o+l]=s}return e&&(t.node.timestamp=Date.now()),e},write:function(t,n,r,a,i){for(var e=0;e<a;e++)try{o(n[r+e])}catch(e){throw new Kt.ErrnoError(29)}return a&&(t.node.timestamp=Date.now()),e}}),Kt.mkdev(e,a,i)},forceLoadFile:function(t){if(t.isDevice||t.isFolder||t.link||t.contents)return!0;if(typeof XMLHttpRequest!="undefined")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($)try{t.contents=$t($(t.url),!0),t.usedBytes=t.contents.length}catch(e){throw new Kt.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:function(t,n,r,o,a){function e(){this.lengthKnown=!1,this.chunks=[]}if(e.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,n=t/this.chunkSize|0;return this.getter(n)[e]}},e.prototype.setDataGetter=function(t){this.getter=t},e.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||e.status===304))throw new Error("Couldn't load "+r+". Status: "+e.status);var t=Number(e.getResponseHeader("Content-length")),n,o=(n=e.getResponseHeader("Accept-Ranges"))&&n==="bytes",a=(n=e.getResponseHeader("Content-Encoding"))&&n==="gzip",i=1024*1024;o||(i=t);var l=function(n,o){if(n>o)throw new Error("invalid range ("+n+", "+o+") or no bytes requested!");if(o>t-1)throw new Error("only "+t+" bytes available! programmer error!");var e=new XMLHttpRequest;if(e.open("GET",r,!1),t!==i&&e.setRequestHeader("Range","bytes="+n+"-"+o),e.responseType="arraybuffer",e.overrideMimeType&&e.overrideMimeType("text/plain; charset=x-user-defined"),e.send(null),!(e.status>=200&&e.status<300||e.status===304))throw new Error("Couldn't load "+r+". Status: "+e.status);return e.response!==void 0?new Uint8Array(e.response||[]):$t(e.responseText||"",!0)},s=this;s.setDataGetter(function(e){var n=e*i,r=(e+1)*i-1;if(r=Math.min(r,t-1),typeof s.chunks[e]=="undefined"&&(s.chunks[e]=l(n,r)),typeof s.chunks[e]=="undefined")throw new Error("doXHR failed!");return s.chunks[e]}),(a||!t)&&(i=t=1,t=this.getter(0).length,i=t,w("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=t,this._chunkSize=i,this.lengthKnown=!0},typeof XMLHttpRequest!="undefined"){if(!E)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var l=new e;Object.defineProperties(l,{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:l}}else var s={isDevice:!1,url:r};var u=Kt.createFile(t,n,s,o,a);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={},d=Object.keys(u.stream_ops);d.forEach(function(e){var t=u.stream_ops[e];c[e]=function(){return Kt.forceLoadFile(u),t.apply(null,arguments)}});function m(e,t,n,r,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,r);if(H(i>=0),a.slice)for(var l=0;l<i;l++)t[n+l]=a[o+l];else for(var l=0;l<i;l++)t[n+l]=a.get(o+l);return i}return c.read=function(e,t,n,r,o){return Kt.forceLoadFile(u),m(e,t,n,r,o)},c.mmap=function(e,t,n,r,o){Kt.forceLoadFile(u);var a=wt(t);if(!a)throw new Kt.ErrnoError(48);return m(e,i(),a,t,n),{ptr:a,allocated:!0}},u.stream_ops=c,u},absolutePath:function(){Ee("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:function(){Ee("FS.createFolder has been removed; use FS.mkdir instead")},createLink:function(){Ee("FS.createLink has been removed; use FS.symlink instead")},joinPath:function(){Ee("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:function(){Ee("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:function(){Ee("FS.standardizePath has been removed; use PATH.normalize instead")}},Qt=function(t,n){return H(typeof t=="number"),t?It(l(),t,n):""},Xt={DEFAULT_POLLMASK:5,calculateAt:function(t,n,r){if(St.isAbs(n))return n;var e;if(t===-100)e=Kt.cwd();else{var o=Xt.getStreamFromFD(t);e=o.path}if(n.length==0){if(!r)throw new Kt.ErrnoError(44);return e}return St.join2(e,n)},doStat:function(t,n,r){try{var e=t(n)}catch(e){if(e&&e.node&&St.normalize(n)!==St.normalize(Kt.getPath(e.node)))return-54;throw e}p()[r>>2]=e.dev,p()[r+4>>2]=e.mode,_()[r+8>>2]=e.nlink,p()[r+12>>2]=e.uid,p()[r+16>>2]=e.gid,p()[r+20>>2]=e.rdev,J[r+24>>3]=BigInt(e.size),p()[r+32>>2]=4096,p()[r+36>>2]=e.blocks;var o=e.atime.getTime(),a=e.mtime.getTime(),i=e.ctime.getTime();return J[r+40>>3]=BigInt(Math.floor(o/1e3)),_()[r+48>>2]=o%1e3*1e3,J[r+56>>3]=BigInt(Math.floor(a/1e3)),_()[r+64>>2]=a%1e3*1e3,J[r+72>>3]=BigInt(Math.floor(i/1e3)),_()[r+80>>2]=i%1e3*1e3,J[r+88>>3]=BigInt(e.ino),0},doMsync:function(t,n,r,o,a){if(!Kt.isFile(n.node.mode))throw new Kt.ErrnoError(43);if(o&2)return 0;var e=l().slice(t,t+r);Kt.msync(n,e,a,r,o)},varargs:void 0,get:function(){H(Xt.varargs!=null),Xt.varargs+=4;var e=p()[Xt.varargs-4>>2];return e},getStr:function(t){var e=Qt(t);return e},getStreamFromFD:function(t){var e=Kt.getStreamChecked(t);return e}};function Yt(e){if(T)return Pa(1,1,e);V=e,de()||(nn.terminateAllThreads(),h.onExit&&h.onExit(e),U=!0),R(e,new ft(e))}var Jt=function(t,n){if(V=t,wu(),T)throw H(!n),an(t),"unwind";if(de()&&!n){var e="program exited (with status: "+t+"), but keepRuntimeAlive() is set (counter="+ce+") due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)";C(e),A(e)}Yt(t)},Zt=Jt,en=function(t){return H(typeof t=="number"),t>>>=0,"0x"+t.toString(16).padStart(8,"0")},tn=function(t){if(t instanceof ft||t=="unwind")return V;ae(),t instanceof WebAssembly.RuntimeError&&nl()<=0&&A("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 1048576)"),R(1,t)},nn={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},nextWorkerID:1,debugInit:function(){function e(){var e=0;return ue&&typeof Pi!="undefined"&&(e=Pi()),"w:"+(h.workerID||0)+",t:"+en(e)+": "}var t=Ge;Ge=function(r){return t(e()+r)}},init:function(){nn.debugInit(),T?nn.initWorker():nn.initMainThread()},initMainThread:function(){for(var e=typeof h.pthreadPoolSizeOverride=="number"?h.pthreadPoolSizeOverride:20;e--;)nn.allocateUnusedWorker();fe(function(){Re("loading-workers");var e=15e3,t=!1,n=function(o){if(!t){t=!0,clearTimeout(r);var n=0;try{if(o){var a=[],i=[];for(var l of nn.unusedWorkers)l.loaded?a.push(l):i.push(l);for(var l of i)try{gt(l)}catch(e){A("voip: ThreadPoolManager: failed to terminate timed-out pthread worker "+l.workerID+": "+e)}n=i.length,nn.unusedWorkers=a,A("voip: ThreadPoolManager: pthread worker prewarm timed out after "+e+"ms; continuing with "+a.length+" ready workers")}}finally{Le("loading-workers")}}},r=setTimeout(function(){return n(!0)},e);nn.loadWasmModuleToAllWorkers(function(){return n(!1)})})},initWorker:function(){O=!1},setExitStatus:function(t){V=t},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:function(){H(!T,"Internal Error! terminateAllThreads() can only ever be called from main application thread!");for(var e of nn.runningWorkers)gt(e);for(var e of nn.unusedWorkers)gt(e);nn.unusedWorkers=[],nn.runningWorkers=[],nn.pthreads=[]},returnWorkerToPool:function(t){var e=t.pthread_ptr;delete nn.pthreads[e],nn.unusedWorkers.push(t),nn.runningWorkers.splice(nn.runningWorkers.indexOf(t),1),t.pthread_ptr=0,Gi(e)},receiveObjectTransfer:function(t){},threadInitTLS:function(){nn.tlsInitFunctions.forEach(function(e){return e()})},loadWasmModuleToWorker:function(o){return new(u||(u=n("Promise")))(function(n){o.addMessageListener("cmd",function(e){var t=e,r=t.cmd;if(t.targetThread&&t.targetThread!=Pi()){var a=nn.pthreads[t.targetThread];a?a.postMessage(babelHelpers.extends({},t,{type:"cmd"}),t.transferList):A('Internal error! Worker sent a message "'+r+'" to target pthread '+t.targetThread+", but that thread no longer exists!");return}r==="checkMailbox"?Vo():r==="spawnThread"?vt(t):r==="cleanupThread"?Ct(t.thread):r==="killThread"?ht(t.thread):r==="cancelThread"?yt(t.thread):r==="loaded"?(o.loaded=!0,n(o)):r==="alert"?alert("Thread "+t.threadId+": "+t.text):t.target==="setimmediate"?o.postMessage(babelHelpers.extends({},t,{type:"cmd"})):r==="callHandler"?h[t.handler].apply(h,t.args):r&&A("worker sent an unknown command "+r)}),o.addMessageListener("waWasmWorkerCompatibleCallback",function(t){var n=t.type,r=t.__name,o=babelHelpers.objectWithoutPropertiesLoose(t,e);a.WhatsAppVoipWasmWorkerCompatibleCallbacks[r](o)}),o.onerror=function(e){var t="worker sent an error!";throw o.pthread_ptr&&(t="Pthread "+en(o.pthread_ptr)+" sent an error!"),A(t+" "+e.filename+":"+e.lineno+": "+e.message),e},H(B instanceof WebAssembly.Memory,"WebAssembly memory should have been loaded by now!"),H(q instanceof WebAssembly.Module,"WebAssembly Module should have been loaded by now!");var r=[],i=["onExit","onAbort","print","printErr"];for(var l of i)Object.prototype.hasOwnProperty.call(h,l)&&r.push(l);o.workerID=nn.nextWorkerID++,o.postMessage({cmd:"load",handlers:r,urlOrBlob:h.mainScriptUrlOrBlob||t,wasmMemory:B,wasmModule:q,workerID:o.workerID,wasmVariant:"prod-lab",type:"cmd"})})},loadWasmModuleToAllWorkers:function(t){if(T)return t();var e=(u||(u=n("Promise"))).all(nn.unusedWorkers.map(nn.loadWasmModuleToWorker));e.then(t)},allocateUnusedWorker:function(){var e,t=o("WorkerBundleResource").createDedicatedWebWorker(WAWebVoipWebWasmWorkerResource);e=new(o("WorkerMessagePort")).WorkerMessagePort(t,"WAWebVoipWebWasmWorker"),o("WorkerClient").init(e),nn.unusedWorkers.push(e)},getNewWorker:function(){return nn.unusedWorkers.length==0&&(A("Tried to spawn a new thread, but the thread pool is exhausted.\nThis might result in a deadlock unless some threads eventually exit or the code explicitly breaks out to the event loop.\nIf you want to increase the pool size, use setting `-sPTHREAD_POOL_SIZE=...`.\nIf you want to throw an explicit error instead of the risk of deadlocking in those cases, use setting `-sPTHREAD_POOL_SIZE_STRICT=2`."),nn.allocateUnusedWorker(),nn.loadWasmModuleToWorker(nn.unusedWorkers[0])),nn.unusedWorkers.pop()}};h.PThread=nn;var rn=function(t){for(;t.length>0;)t.shift()(h)};function on(){var e=Pi(),t=p()[e+52>>2],n=p()[e+56>>2],r=t-n;H(t!=0),H(r!=0),H(t>r,"stackHigh must be higher then stackLow"),Yi(t,r),el(t),oe()}h.establishStackSpace=on;function an(e){if(T)return Pa(2,0,e);Zt(e)}var ln=function(t){var e=Zi(),n=t();return el(e),n},sn=function(t){return ln(function(){var e=tl(4),n=tl(4);al(t,e,n);var r=_()[e>>2],o=_()[n>>2],a=Qt(r);Ei(r);var i;return o&&(i=Qt(o),Ei(o)),[a,i]})};function un(e){return sn(e)}h.getExceptionMessage=un;var cn=function(t){return re.get(t)};function dn(e,t){var n=cn(e)(t);ae();function r(e){de()?nn.setExitStatus(e):zi(e)}r(n)}h.invokeEntryPoint=dn;function mn(e){nn.tlsInitFunctions.push(e)}var pn=function(t){pn.shown||(pn.shown={}),pn.shown[t]||(pn.shown[t]=1,A(t))},_n=function(t,n,r,o){Ee("Assertion failed: "+Qt(t)+", at: "+[n?Qt(n):"unknown filename",r,o?Qt(o):"unknown function"])},fn=[],gn=0;function hn(e){var t=new bn(e);return t.get_caught()||(t.set_caught(!0),gn--),t.set_rethrown(!1),fn.push(t),ol(t.excPtr),t.get_exception_ptr()}var yn=0;function Cn(){Ki(0,0),H(fn.length>0);var e=fn.pop();rl(e.excPtr),yn=0}function bn(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){_()[this.ptr+4>>2]=e},this.get_type=function(){return _()[this.ptr+4>>2]},this.set_destructor=function(e){_()[this.ptr+8>>2]=e},this.get_destructor=function(){return _()[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,i()[this.ptr+12>>0]=e},this.get_caught=function(){return i()[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,i()[this.ptr+13>>0]=e},this.get_rethrown=function(){return i()[this.ptr+13>>0]!=0},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){_()[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _()[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=ll(this.get_type());if(e)return _()[this.excPtr>>2];var t=this.get_adjusted_ptr();return t!==0?t:this.excPtr}}function vn(e){throw yn||(yn=new Pe(e)),yn}var Sn=function(t){var e=yn&&yn.excPtr;if(!e)return Qi(0),0;var n=new bn(e);n.set_adjusted_ptr(e);var r=n.get_type();if(!r)return Qi(0),e;for(var o in t){var a=t[o];if(a===0||a===r)break;var i=n.ptr+16;if(il(a,r,i))return Qi(a),e}return Qi(r),e},Rn=function(){return Sn([])},Ln=function(t){return Sn([t])},En=function(t,n){return Sn([t,n])};function kn(e){var t=new bn(e).get_exception_ptr();return t}function In(){var e=fn.pop();e||Ee("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(fn.push(e),e.set_rethrown(!0),e.set_caught(!1),gn++),yn=new Pe(t),yn}function Tn(e,t,n){var r=new bn(e);throw r.init(t,n),yn=new Pe(e),gn++,yn}function Dn(){return gn}function xn(e){Fi(e,!E,1,!L,1048576,!1),nn.threadInitTLS()}function $n(e){T?postMessage({cmd:"cleanupThread",thread:e,type:"cmd"}):Ct(e)}function Pn(e,t,n,r){return T?Pa(3,1,e,t,n,r):Nn(e,t,n,r)}function Nn(e,t,n,r){if(typeof SharedArrayBuffer=="undefined")return A("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var o=[],a=0;if(T&&(o.length===0||a))return Pn(e,t,n,r);var i={startRoutine:n,pthread_ptr:e,arg:r,transferList:o};return T?(i.cmd="spawnThread",postMessage(babelHelpers.extends({},i,{type:"cmd"}),o),0):vt(i)}function Mn(e){if(T)return Pa(4,1,e);try{return e=Xt.getStr(e),Kt.chdir(e),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}var wn=function(t){return p()[Ti()>>2]=t,t};function An(e,t,n){if(T)return Pa(5,1,e,t,n);Xt.varargs=n;try{var r=Xt.getStreamFromFD(e);switch(t){case 0:{var o=Xt.get();if(o<0)return-28;var a;return a=Kt.createStream(r,o),a.fd}case 1:case 2:return 0;case 3:return r.flags;case 4:{var o=Xt.get();return r.flags|=o,0}case 5:{var o=Xt.get(),i=0;return d()[o+i>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return wn(28),-1;default:return-28}}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Fn(e,t){if(T)return Pa(6,1,e,t);try{var n=Xt.getStreamFromFD(e);return Xt.doStat(Kt.stat,n.path,t)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}var On=function(t,n,r){return H(typeof r=="number","stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),xt(t,l(),n,r)};function Bn(e,t,n){if(T)return Pa(7,1,e,t,n);try{var r=Xt.getStreamFromFD(e);r.getdents||(r.getdents=Kt.readdir(r.path));for(var o=280,a=0,l=Kt.llseek(r,0,1),s=Math.floor(l/o);s<r.getdents.length&&a+o<=n;){var u,c,m=r.getdents[s];if(m===".")u=r.node.id,c=4;else if(m===".."){var p=Kt.lookupPath(r.path,{parent:!0});u=p.node.id,c=4}else{var _=Kt.lookupNode(r.node,m);u=_.id,c=Kt.isChrdev(_.mode)?2:Kt.isDir(_.mode)?4:Kt.isLink(_.mode)?10:8}H(u),J[t+a>>3]=BigInt(u),J[t+a+8>>3]=BigInt((s+1)*o),d()[t+a+16>>1]=280,i()[t+a+18>>0]=c,On(m,t+a+19,256),a+=o,s+=1}return Kt.llseek(r,s*o,0),a}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Wn(e,t,n){if(T)return Pa(8,1,e,t,n);Xt.varargs=n;try{var r=Xt.getStreamFromFD(e);switch(t){case 21509:return r.tty?0:-59;case 21505:{if(!r.tty)return-59;if(r.tty.ops.ioctl_tcgets){var o=r.tty.ops.ioctl_tcgets(r),a=Xt.get();p()[a>>2]=o.c_iflag||0,p()[a+4>>2]=o.c_oflag||0,p()[a+8>>2]=o.c_cflag||0,p()[a+12>>2]=o.c_lflag||0;for(var l=0;l<32;l++)i()[a+l+17>>0]=o.c_cc[l]||0;return 0}return 0}case 21510:case 21511:case 21512:return r.tty?0:-59;case 21506:case 21507:case 21508:{if(!r.tty)return-59;if(r.tty.ops.ioctl_tcsets){for(var a=Xt.get(),s=p()[a>>2],u=p()[a+4>>2],c=p()[a+8>>2],m=p()[a+12>>2],_=[],l=0;l<32;l++)_.push(i()[a+l+17>>0]);return r.tty.ops.ioctl_tcsets(r.tty,t,{c_iflag:s,c_oflag:u,c_cflag:c,c_lflag:m,c_cc:_})}return 0}case 21519:{if(!r.tty)return-59;var a=Xt.get();return p()[a>>2]=0,0}case 21520:return r.tty?-28:-59;case 21531:{var a=Xt.get();return Kt.ioctl(r,t,a)}case 21523:{if(!r.tty)return-59;if(r.tty.ops.ioctl_tiocgwinsz){var f=r.tty.ops.ioctl_tiocgwinsz(r.tty),a=Xt.get();d()[a>>1]=f[0],d()[a+2>>1]=f[1]}return 0}case 21524:return r.tty?0:-59;case 21515:return r.tty?0:-59;default:return-28}}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function qn(e,t){if(T)return Pa(9,1,e,t);try{return e=Xt.getStr(e),Xt.doStat(Kt.lstat,e,t)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Un(e,t,n){if(T)return Pa(10,1,e,t,n);try{return t=Xt.getStr(t),t=Xt.calculateAt(e,t),t=St.normalize(t),t[t.length-1]==="/"&&(t=t.substr(0,t.length-1)),Kt.mkdir(t,n,0),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Vn(e,t,n,r){if(T)return Pa(11,1,e,t,n,r);try{t=Xt.getStr(t);var o=r&256,a=r&4096;return r=r&-6401,H(!r,"unknown flags in __syscall_newfstatat: "+r),t=Xt.calculateAt(e,t,a),Xt.doStat(o?Kt.lstat:Kt.stat,t,n)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Hn(e,t,n,r){if(T)return Pa(12,1,e,t,n,r);Xt.varargs=r;try{t=Xt.getStr(t),t=Xt.calculateAt(e,t);var o=r?Xt.get():0;return Kt.open(t,n,o).fd}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Gn(e,t){if(T)return Pa(13,1,e,t);try{return e=Xt.getStr(e),Xt.doStat(Kt.stat,e,t)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function zn(e,t,n){if(T)return Pa(14,1,e,t,n);try{return t=Xt.getStr(t),t=Xt.calculateAt(e,t),n===0?Kt.unlink(t):n===512?Kt.rmdir(t):Ee("Invalid flags passed to unlinkat"),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function jn(e){if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e}function Kn(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Qn=e}var Qn=void 0;function Xn(e){for(var t="",n=e;l()[n];)t+=Qn[l()[n++]];return t}var Yn={},Jn={},Zn={},er=void 0;function tr(e){throw new er(e)}var nr=void 0;function rr(e){throw new nr(e)}function or(e,t,n){e.forEach(function(e){Zn[e]=t});function r(t){var r=n(t);r.length!==e.length&&rr("Mismatched type converter count");for(var o=0;o<e.length;++o)ir(e[o],r[o])}var o=new Array(t.length),a=[],i=0;t.forEach(function(e,t){Object.prototype.hasOwnProperty.call(Jn,e)?o[t]=Jn[e]:(a.push(e),Object.prototype.hasOwnProperty.call(Yn,e)||(Yn[e]=[]),Yn[e].push(function(){o[t]=Jn[e],++i,i===a.length&&r(o)}))}),a.length===0&&r(o)}function ar(e,t,n){n===void 0&&(n={});var r=t.name;if(e||tr('type "'+r+'" must have a positive integer typeid pointer'),Object.prototype.hasOwnProperty.call(Jn,e)){if(n.ignoreDuplicateRegistrations)return;tr("Cannot register type '"+r+"' twice")}if(Jn[e]=t,delete Zn[e],Object.prototype.hasOwnProperty.call(Yn,e)){var o=Yn[e];delete Yn[e],o.forEach(function(e){return e()})}}function ir(e,t,n){if(n===void 0&&(n={}),!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return ar(e,t,n)}function lr(e,t,n){switch(t){case 0:return n?function(t){return i()[t]}:function(t){return l()[t]};case 1:return n?function(t){return d()[t>>1]}:function(t){return m()[t>>1]};case 2:return n?function(t){return p()[t>>2]}:function(t){return _()[t>>2]};case 3:return n?function(t){return J[t>>3]}:function(t){return Z[t>>3]};default:throw new TypeError("Unknown integer type: "+e)}}function sr(e,t,n,r,o){t=Xn(t);var a=ur(n),i=t.indexOf("u")!=-1;i&&(o=(BigInt(1)<<BigInt(64))-BigInt(1)),ir(e,{name:t,fromWireType:function(t){return t},toWireType:function(n,a){if(typeof a!="bigint"&&typeof a!="number")throw new TypeError('Cannot convert "'+jn(a)+'" to '+this.name);if(a<r||a>o)throw new TypeError('Passing a number "'+jn(a)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+r+", "+o+"]!");return a},argPackAdvance:8,readValueFromPointer:lr(t,a,!i),destructorFunction:null})}function ur(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 cr(e,t,n,r,o){var a=ur(n);t=Xn(t),ir(e,{name:t,fromWireType:function(t){return!!t},toWireType:function(t,n){return n?r:o},argPackAdvance:8,readValueFromPointer:function(r){var e;if(n===1)e=i();else if(n===2)e=d();else if(n===4)e=p();else throw new TypeError("Unknown boolean type size: "+t);return this.fromWireType(e[r>>a])},destructorFunction:null,jsType:"boolean"})}function dr(e){if(!(this instanceof Or)||!(e instanceof Or))return!1;for(var t=this.$$.ptrType.registeredClass,n=this.$$.ptr,r=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)o=r.upcast(o),r=r.baseClass;return t===r&&n===o}function mr(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function pr(e){function t(e){return e.$$.ptrType.registeredClass.name}tr(t(e)+" instance already deleted")}var _r=!1;function fr(e){}function gr(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function hr(e){e.count.value-=1;var t=e.count.value===0;t&&gr(e)}function yr(e,t,n){if(t===n)return e;if(n.baseClass===void 0)return null;var r=yr(e,t,n.baseClass);return r===null?null:n.downcast(r)}var Cr={};function br(){return Object.keys(Ir).length}function vr(){var e=[];for(var t in Ir)Object.prototype.hasOwnProperty.call(Ir,t)&&e.push(Ir[t]);return e}var Sr=[];function Rr(){for(;Sr.length;){var e=Sr.pop();e.$$.deleteScheduled=!1,e.delete()}}var Lr=void 0;function Er(e){Lr=e,Sr.length&&Lr&&Lr(Rr)}function kr(){h.getInheritedInstanceCount=br,h.getLiveInheritedInstances=vr,h.flushPendingDeletes=Rr,h.setDelayFunction=Er}var Ir={};function Tr(e,t){for(t===void 0&&tr("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function Dr(e,t){return t=Tr(e,t),Ir[t]}function xr(e,t){(!t.ptrType||!t.ptr)&&rr("makeClassHandle requires ptr and ptrType");var n=!!t.smartPtrType,r=!!t.smartPtr;return n!==r&&rr("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Pr(Object.create(e,{$$:{value:t}}))}function $r(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=Dr(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function o(){return this.isSmartPointer?xr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):xr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=this.registeredClass.getActualType(t),i=Cr[a];if(!i)return o.call(this);var l;this.isConst?l=i.constPointerType:l=i.pointerType;var s=yr(t,this.registeredClass,l.registeredClass);return s===null?o.call(this):this.isSmartPointer?xr(l.registeredClass.instancePrototype,{ptrType:l,ptr:s,smartPtrType:this,smartPtr:e}):xr(l.registeredClass.instancePrototype,{ptrType:l,ptr:s})}var Pr=function(t){return typeof FinalizationRegistry=="undefined"?(Pr=function(t){return t},t):(_r=new FinalizationRegistry(function(e){e.leakWarning.stack.replace(/^Error: /,""),hr(e.$$)}),Pr=function(t){var e=t.$$,n=!!e.smartPtr;if(n){var r={$$:e},o=e.ptrType.registeredClass;r.leakWarning=new Error("Embind found a leaked C++ instance "+o.name+" <"+en(e.ptr)+">.\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,$r),_r.register(t,r,t)}return t},fr=function(t){return _r.unregister(t)},Pr(t))};function Nr(){if(this.$$.ptr||pr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Pr(Object.create(Object.getPrototypeOf(this),{$$:{value:mr(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Mr(){this.$$.ptr||pr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&tr("Object already scheduled for deletion"),fr(this),hr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function wr(){return!this.$$.ptr}function Ar(){return this.$$.ptr||pr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&tr("Object already scheduled for deletion"),Sr.push(this),Sr.length===1&&Lr&&Lr(Rr),this.$$.deleteScheduled=!0,this}function Fr(){Or.prototype.isAliasOf=dr,Or.prototype.clone=Nr,Or.prototype.delete=Mr,Or.prototype.isDeleted=wr,Or.prototype.deleteLater=Ar}function Or(){}var Br=48,Wr=57;function qr(e){if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=Br&&t<=Wr?"_"+e:e}function Ur(e,t){var n;return e=qr(e),(n={},n[e]=function(){return t.apply(this,arguments)},n)[e]}function Vr(e,t,n){if(e[t].overloadTable===void 0){var r=e[t];e[t]=function(){return Object.prototype.hasOwnProperty.call(e[t].overloadTable,arguments.length)||tr("Function '"+n+"' 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[r.argCount]=r}}function Hr(e,t,n){Object.prototype.hasOwnProperty.call(h,e)?((n===void 0||h[e].overloadTable!==void 0&&h[e].overloadTable[n]!==void 0)&&tr("Cannot register public name '"+e+"' twice"),Vr(h,e,e),Object.prototype.hasOwnProperty.call(h,n)&&tr("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),h[e].overloadTable[n]=t):(h[e]=t,n!==void 0&&(h[e].numArguments=n))}function Gr(e,t,n,r,o,a,i,l){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=l,this.pureVirtualFunctions=[]}function zr(e,t,n){for(;t!==n;)t.upcast||tr("Expected null or instance of "+n.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function jr(e,t){if(t===null)return this.isReference&&tr("null is not a valid "+this.name),0;t.$$||tr('Cannot pass "'+jn(t)+'" as a '+this.name),t.$$.ptr||tr("Cannot pass deleted object as a pointer of type "+this.name);var n=t.$$.ptrType.registeredClass,r=zr(t.$$.ptr,n,this.registeredClass);return r}function Kr(e,t){var n;if(t===null)return this.isReference&&tr("null is not a valid "+this.name),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;t.$$||tr('Cannot pass "'+jn(t)+'" as a '+this.name),t.$$.ptr||tr("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&tr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;if(n=zr(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&tr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:tr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var o=t.clone();n=this.rawShare(n,vo.toHandle(function(){o.delete()})),e!==null&&e.push(this.rawDestructor,n)}break;default:tr("Unsupporting sharing policy")}return n}function Qr(e,t){if(t===null)return this.isReference&&tr("null is not a valid "+this.name),0;t.$$||tr('Cannot pass "'+jn(t)+'" as a '+this.name),t.$$.ptr||tr("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&tr("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass,r=zr(t.$$.ptr,n,this.registeredClass);return r}function Xr(e){return this.fromWireType(p()[e>>2])}function Yr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Jr(e){this.rawDestructor&&this.rawDestructor(e)}function Zr(e){e!==null&&e.delete()}function eo(){to.prototype.getPointee=Yr,to.prototype.destructor=Jr,to.prototype.argPackAdvance=8,to.prototype.readValueFromPointer=Xr,to.prototype.deleteObject=Zr,to.prototype.fromWireType=$r}function to(e,t,n,r,o,a,i,l,s,u,c){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=l,this.rawConstructor=s,this.rawShare=u,this.rawDestructor=c,!o&&t.baseClass===void 0?r?(this.toWireType=jr,this.destructorFunction=null):(this.toWireType=Qr,this.destructorFunction=null):this.toWireType=Kr}function no(e,t,n){Object.prototype.hasOwnProperty.call(h,e)||rr("Replacing nonexistant public symbol"),h[e].overloadTable!==void 0&&n!==void 0?h[e].overloadTable[n]=t:(h[e]=t,h[e].argCount=n)}function ro(e,t){e=Xn(e);function n(){return cn(t)}var r=n();return typeof r!="function"&&tr("unknown function pointer with signature "+e+": "+t),r}function oo(e,t){var n=Ur(t,function(e){this.name=t,this.message=e;var n=new Error(e).stack;n!==void 0&&(this.stack=this.toString()+"\n"+n.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},n}var ao=void 0;function io(e){var t=wi(e),n=Xn(t);return Ei(t),n}function lo(e,t){var n=[],r={};function o(e){if(!r[e]&&!Jn[e]){if(Zn[e]){Zn[e].forEach(o);return}n.push(e),r[e]=!0}}throw t.forEach(o),new ao(e+": "+n.map(io).join([", "]))}function so(e,t,n,r,o,a,i,l,s,u,c,d,m){c=Xn(c),a=ro(o,a),l&&(l=ro(i,l)),u&&(u=ro(s,u)),m=ro(d,m);var p=qr(c);Hr(p,function(){lo("Cannot construct "+c+" due to unbound types",[r])}),or([e,t,n],r?[r]:[],function(t){t=t[0];var n,o;r?(n=t.registeredClass,o=n.instancePrototype):o=Or.prototype;var i=Ur(p,function(){if(Object.getPrototypeOf(this)!==s)throw new er("Use 'new' to construct "+c);if(d.constructor_body===void 0)throw new er(c+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(e===void 0)throw new er("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(d.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)}),s=Object.create(o,{constructor:{value:i}});i.prototype=s;var d=new Gr(c,i,s,m,n,a,l,u);d.baseClass&&(d.baseClass.__derivedClasses===void 0&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var _=new to(c,d,!0,!1,!1),f=new to(c+"*",d,!1,!1,!1),g=new to(c+" const*",d,!1,!0,!1);return Cr[e]={pointerType:f,constPointerType:g},no(p,i),[_,f,g]})}function uo(e,t){for(var n=[],r=0;r<e;r++)n.push(_()[t+r*4>>2]);return n}function co(e){for(;e.length;){var t=e.pop(),n=e.pop();n(t)}}function mo(e,t,n,r,o,a){var i=t.length;i<2&&tr("argTypes array size mismatch! Must at least get return value and 'this' types!"),H(!a,"Async bindings are only supported with JSPI.");for(var l=t[1]!==null&&n!==null,s=!1,u=1;u<t.length;++u)if(t[u]!==null&&t[u].destructorFunction===void 0){s=!0;break}var c=t[0].name!=="void",d=i-2,m=new Array(d),p=[],_=[];return function(){arguments.length!==d&&tr("function "+e+" called with "+arguments.length+" arguments, expected "+d+" args!"),_.length=0;var n;p.length=l?2:1,p[0]=o,l&&(n=t[1].toWireType(_,this),p[1]=n);for(var a=0;a<d;++a)m[a]=t[a+2].toWireType(_,arguments[a]),p.push(m[a]);var i=r.apply(null,p);function u(e){if(s)co(_);else for(var r=l?1:2;r<t.length;r++){var o=r===1?n:m[r-2];t[r].destructorFunction!==null&&t[r].destructorFunction(o)}if(c)return t[0].fromWireType(e)}return u(i)}}function po(e,t,n,r,o,a){H(t>0);var i=uo(t,n);o=ro(r,o),or([],[e],function(e){e=e[0];var n="constructor "+e.name;if(e.registeredClass.constructor_body===void 0&&(e.registeredClass.constructor_body=[]),e.registeredClass.constructor_body[t-1]!==void 0)throw new er("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=function(){lo("Cannot construct "+e.name+" due to unbound types",i)},or([],i,function(r){return r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=mo(n,r,null,o,a),[]}),[]})}function _o(e,t,n,r,o,a,i,l,s){var u=uo(n,r);t=Xn(t),a=ro(o,a),or([],[e],function(e){e=e[0];var r=e.name+"."+t;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),l&&e.registeredClass.pureVirtualFunctions.push(t);function o(){lo("Cannot call "+r+" due to unbound types",u)}var c=e.registeredClass.instancePrototype,d=c[t];return d===void 0||d.overloadTable===void 0&&d.className!==e.name&&d.argCount===n-2?(o.argCount=n-2,o.className=e.name,c[t]=o):(Vr(c,t,r),c[t].overloadTable[n-2]=o),or([],u,function(o){var l=mo(r,o,e,a,i,s);return c[t].overloadTable===void 0?(l.argCount=n-2,c[t]=l):c[t].overloadTable[n-2]=l,[]}),[]})}function fo(){Object.assign(go.prototype,{get:function(t){return H(this.allocated[t]!==void 0,"invalid handle: "+t),this.allocated[t]},has:function(t){return this.allocated[t]!==void 0},allocate:function(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free:function(t){H(this.allocated[t]!==void 0),this.allocated[t]=void 0,this.freelist.push(t)}})}function go(){this.allocated=[void 0],this.freelist=[]}var ho=new go;function yo(e){e>=ho.reserved&&--ho.get(e).refcount===0&&ho.free(e)}function Co(){for(var e=0,t=ho.reserved;t<ho.allocated.length;++t)ho.allocated[t]!==void 0&&++e;return e}function bo(){ho.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),ho.reserved=ho.allocated.length,h.count_emval_handles=Co}var vo={toValue:function(t){return t||tr("Cannot use deleted val. handle = "+t),ho.get(t).value},toHandle:function(t){switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return ho.allocate({refcount:1,value:t})}}};function So(e,t){t=Xn(t),ir(e,{name:t,fromWireType:function(t){var e=vo.toValue(t);return yo(t),e},toWireType:function(t,n){return vo.toHandle(n)},argPackAdvance:8,readValueFromPointer:Xr,destructorFunction:null})}function Ro(e,t){switch(t){case 2:return function(e){return this.fromWireType(f()[e>>2])};case 3:return function(e){return this.fromWireType(g()[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Lo(e,t,n){var r=ur(n);t=Xn(t),ir(e,{name:t,fromWireType:function(t){return t},toWireType:function(t,n){if(typeof n!="number"&&typeof n!="boolean")throw new TypeError("Cannot convert "+jn(n)+" to "+this.name);return n},argPackAdvance:8,readValueFromPointer:Ro(t,r),destructorFunction:null,jsType:"number"})}function Eo(e,t,n,r,o,a,i){var l=uo(t,n);e=Xn(e),o=ro(r,o),Hr(e,function(){lo("Cannot call "+e+" due to unbound types",l)},t-1),or([],l,function(n){var r=[n[0],null].concat(n.slice(1));return no(e,mo(e,r,null,o,a,i),t-1),h.__WA_INVOKER_FUNCS==null&&(h.__WA_INVOKER_FUNCS=new Map),h.__WA_INVOKER_FUNCS.set(e,{argTypes:n.slice(1),returnType:n[0]}),[]})}function ko(e,t,n,r,o){t=Xn(t),o===-1&&(o=4294967295);var a=ur(n),i=function(t){return t};if(r===0){var l=32-8*n;i=function(t){return t<<l>>>l}}var s=t.includes("unsigned"),u=function(n,a){if(typeof n!="number"&&typeof n!="boolean")throw new TypeError('Cannot convert "'+jn(n)+'" to '+a);if(n<r||n>o)throw new TypeError('Passing a number "'+jn(n)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+r+", "+o+"]!")},c;s?c=function(t,n){return u(n,this.name),n>>>0}:c=function(t,n){return u(n,this.name),n},ir(e,{name:t,fromWireType:i,toWireType:c,argPackAdvance:8,readValueFromPointer:lr(t,a,r!==0),destructorFunction:null,jsType:"number"})}function Io(e,t,n){var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array],o=r[t];function a(e){e=e>>2;var t=_(),n=t[e],r=t[e+1];return new o(t.buffer,r,n)}n=Xn(n),ir(e,{name:n,fromWireType:a,argPackAdvance:8,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})}function To(e,t){t=Xn(t);var n=t==="std::string";ir(e,{name:t,fromWireType:function(t){var e=_()[t>>2],r=t+4,o;if(n)for(var a=r,i=0;i<=e;++i){var s=r+i;if(i==e||l()[s]==0){var u=s-a,c=Qt(a,u);o===void 0?o=c:(o+="\0",o+=c),a=s+1}}else{for(var d=new Array(e),i=0;i<e;++i)d[i]=String.fromCharCode(l()[r+i]);o=d.join("")}return Ei(t),o},toWireType:function(t,r){r instanceof ArrayBuffer&&(r=new Uint8Array(r));var e,o=typeof r=="string";o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||tr("Cannot pass non-string to std::string"),n&&o?e=Dt(r):e=r.length;var a=Li(4+e+1),i=a+4;if(_()[a>>2]=e,n&&o)On(r,i,e+1);else if(o)for(var s=0;s<e;++s){var u=r.charCodeAt(s);u>255&&(Ei(i),tr("String has UTF-16 code units that do not fit in 8 bits")),l()[i+s]=u}else for(var s=0;s<e;++s)l()[i+s]=r[s];return t!==null&&t.push(Ei,a),a},argPackAdvance:8,readValueFromPointer:Xr,destructorFunction:function(t){Ei(t)},jsType:"string"})}var Do=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0,xo=function(t,n){H(t%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var e=t,r=e>>1,o=r+n/2;!(r>=o)&&m()[r];)++r;if(e=r<<1,e-t>32&&Do)return Do.decode(l().slice(t,e));for(var a="",i=0;!(i>=n/2);++i){var s=d()[t+i*2>>1];if(s==0)break;a+=String.fromCharCode(s)}return a},$o=function(t,n,r){if(H(n%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),H(typeof r=="number","stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var e=n,o=r<t.length*2?r/2:t.length,a=0;a<o;++a){var i=t.charCodeAt(a);d()[n>>1]=i,n+=2}return d()[n>>1]=0,n-e},Po=function(t){return t.length*2},No=function(t,n){H(t%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var e=0,r="";!(e>=n/4);){var o=p()[t+e*4>>2];if(o==0)break;if(++e,o>=65536){var a=o-65536;r+=String.fromCharCode(55296|a>>10,56320|a&1023)}else r+=String.fromCharCode(o)}return r},Mo=function(t,n,r){if(H(n%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),H(typeof r=="number","stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),r===void 0&&(r=2147483647),r<4)return 0;for(var e=n,o=e+r-4,a=0;a<t.length;++a){var i=t.charCodeAt(a);if(i>=55296&&i<=57343){var l=t.charCodeAt(++a);i=65536+((i&1023)<<10)|l&1023}if(p()[n>>2]=i,n+=4,n+4>o)break}return p()[n>>2]=0,n-e},wo=function(t){for(var e=0,n=0;n<t.length;++n){var r=t.charCodeAt(n);r>=55296&&r<=57343&&++n,e+=4}return e},Ao=function(t,n,r){r=Xn(r);var e,o,a,i,l;n===2?(e=xo,o=$o,i=Po,a=function(){return m()},l=1):n===4&&(e=No,o=Mo,i=wo,a=function(){return _()},l=2),ir(t,{name:r,fromWireType:function(r){for(var t=_()[r>>2],o=a(),i,s=r+4,u=0;u<=t;++u){var c=r+4+u*n;if(u==t||o[c>>l]==0){var d=c-s,m=e(s,d);i===void 0?i=m:(i+="\0",i+=m),s=c+n}}return Ei(r),i},toWireType:function(t,a){typeof a!="string"&&tr("Cannot pass non-string to C++ string type "+r);var e=i(a),s=Li(4+e+n);return _()[s>>2]=e>>l,o(a,s+4,e+n),t!==null&&t.push(Ei,s),s},argPackAdvance:8,readValueFromPointer:Xr,destructorFunction:function(t){Ei(t)}})};function Fo(e,t){t=Xn(t),ir(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:function(){},toWireType:function(t,n){},jsType:"void"})}var Oo=!0,Bo=function(){return Oo},Wo=function(){if(!de())try{T?zi(V):Zt(V)}catch(e){tn(e)}},qo=function(t){if(U){A("user callback triggered after runtime exited or application aborted. Ignoring.");return}try{t(),Wo()}catch(e){tn(e)}};function Uo(e){if(typeof Atomics.waitAsync=="function"){var t=Atomics.waitAsync(p(),e>>2,e);H(t.async),t.value.then(Vo);var n=e+128;Atomics.store(p(),n>>2,1)}}h.__emscripten_thread_mailbox_await=Uo;var Vo=function(){var e=Pi();e&&(Uo(e),qo(function(){return ji()}))};h.checkMailbox=Vo;var Ho=function(t,n,r){if(t==n)setTimeout(function(){return Vo()});else if(T)postMessage({targetThread:t,cmd:"checkMailbox",type:"cmd"});else{var e=nn.pthreads[t];if(!e){A("Cannot send message to thread with ID "+t+", unknown thread ID!");return}e.postMessage({cmd:"checkMailbox",type:"cmd"})}};function Go(e,t,n){return A("emscripten_set_offscreencanvas_size: Build with -sOFFSCREENCANVAS_SUPPORT=1 to enable transferring canvases to pthreads."),-1}function zo(e){}var jo=function(){throw new $e};function Ko(e){e>4&&(ho.get(e).refcount+=1)}function Qo(e,t){var n=Jn[e];return n===void 0&&tr(t+" has unknown type "+io(e)),n}function Xo(e,t){e=Qo(e,"_emval_take_value");var n=e.readValueFromPointer(t);return vo.toHandle(n)}var Yo=9007199254740992,Jo=-9007199254740992;function Zo(e){return e<Jo||e>Yo?NaN:Number(e)}function ea(e,t){e=Zo(e),t=Zo(t);var n=new Date(e*1e3);p()[t>>2]=n.getUTCSeconds(),p()[t+4>>2]=n.getUTCMinutes(),p()[t+8>>2]=n.getUTCHours(),p()[t+12>>2]=n.getUTCDate(),p()[t+16>>2]=n.getUTCMonth(),p()[t+20>>2]=n.getUTCFullYear()-1900,p()[t+24>>2]=n.getUTCDay();var r=Date.UTC(n.getUTCFullYear(),0,1,0,0,0,0),o=(n.getTime()-r)/(1e3*60*60*24)|0;p()[t+28>>2]=o}var ta=function(t){return t%4===0&&(t%100!==0||t%400===0)},na=[0,31,60,91,121,152,182,213,244,274,305,335],ra=[0,31,59,90,120,151,181,212,243,273,304,334],oa=function(t){var e=ta(t.getFullYear()),n=e?na:ra,r=n[t.getMonth()]+t.getDate()-1;return r};function aa(e,t){e=Zo(e),t=Zo(t);var n=new Date(e*1e3);p()[t>>2]=n.getSeconds(),p()[t+4>>2]=n.getMinutes(),p()[t+8>>2]=n.getHours(),p()[t+12>>2]=n.getDate(),p()[t+16>>2]=n.getMonth(),p()[t+20>>2]=n.getFullYear()-1900,p()[t+24>>2]=n.getDay();var r=oa(n)|0;p()[t+28>>2]=r,p()[t+36>>2]=-(n.getTimezoneOffset()*60);var o=new Date(n.getFullYear(),0,1),a=new Date(n.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),l=(a!=i&&n.getTimezoneOffset()==Math.min(i,a))|0;p()[t+32>>2]=l}var ia=function(t){t=Zo(t);var e=(function(){var e=new Date(p()[t+20>>2]+1900,p()[t+16>>2],p()[t+12>>2],p()[t+8>>2],p()[t+4>>2],p()[t>>2],0),n=p()[t+32>>2],r=e.getTimezoneOffset(),o=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),l=Math.min(i,a);if(n<0)p()[t+32>>2]=+(a!=i&&l==r);else if(n>0!=(l==r)){var s=Math.max(i,a),u=n>0?l:s;e.setTime(e.getTime()+(u-r)*6e4)}p()[t+24>>2]=e.getDay();var c=oa(e)|0;return p()[t+28>>2]=c,p()[t>>2]=e.getSeconds(),p()[t+4>>2]=e.getMinutes(),p()[t+8>>2]=e.getHours(),p()[t+12>>2]=e.getDate(),p()[t+16>>2]=e.getMonth(),p()[t+20>>2]=e.getYear(),e.getTime()/1e3})();return BigInt(e)};function la(e,t,n,r,o,a,i){if(T)return Pa(15,1,e,t,n,r,o,a,i);e=Zo(e),o=Zo(o),a=Zo(a),i=Zo(i);try{if(isNaN(o))return 61;var l=Xt.getStreamFromFD(r),s=Kt.mmap(l,e,o,t,n),u=s.ptr;return p()[a>>2]=s.allocated,_()[i>>2]=u,0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function sa(e,t,n,r,o,a){if(T)return Pa(16,1,e,t,n,r,o,a);e=Zo(e),t=Zo(t),a=Zo(a);try{if(isNaN(a))return 61;var i=Xt.getStreamFromFD(o);n&2&&Xt.doMsync(e,i,t,r,a),Kt.munmap(i)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}var ua=function(t){var e=Dt(t)+1,n=Li(e);return n&&On(t,n,e),n},ca=function(t,n,r){var e=new Date().getFullYear(),o=new Date(e,0,1),a=new Date(e,6,1),i=o.getTimezoneOffset(),l=a.getTimezoneOffset(),s=Math.max(i,l);_()[t>>2]=s*60,p()[n>>2]=+(i!=l);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}var c=u(o),d=u(a),m=ua(c),f=ua(d);l<i?(_()[r>>2]=m,_()[r+4>>2]=f):(_()[r>>2]=f,_()[r+4>>2]=m)},da=function(){Ee("native code called abort()")},ma=[],pa=function(t,n){H(Array.isArray(ma)),H(n%16==0),ma.length=0;var e;for(n>>=2;e=l()[t++];){var r=String.fromCharCode(e),o=["d","f","i"];o.push("j"),H(o.includes(r),"Invalid character "+e+'("'+r+'") in readEmAsmArgs! Use only ['+o+'], and do not specify "v" for void return argument.'),n+=e!=105&n,ma.push(e==105?p()[n]:(e==106?J:g())[n++>>1]),++n}return ma},_a=function(t,n,r){var e=pa(n,r);return Object.prototype.hasOwnProperty.call(ze,t)||Ee("No EM_ASM constant found at address "+t),ze[t].apply(null,e)},fa=function(t,n,r){return _a(t,n,r)},ga=function(t,n,r){return _a(t,n,r)},ha=function(){ce+=1},ya=function(){H(ce>0),ce-=1},Ca=function(t,n){return ha(),setTimeout(function(){ya(),qo(t)},n)};function ba(e,t){if(Ra.mainLoop.timingMode=e,Ra.mainLoop.timingValue=t,!Ra.mainLoop.func)return A("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(Ra.mainLoop.running||(ha(),Ra.mainLoop.running=!0),e==0)Ra.mainLoop.scheduler=function(){var e=Math.max(0,Ra.mainLoop.tickStartTime+t-va())|0;setTimeout(Ra.mainLoop.runner,e)},Ra.mainLoop.method="timeout";else if(e==1)Ra.mainLoop.scheduler=function(){Ra.requestAnimationFrame(Ra.mainLoop.runner)},Ra.mainLoop.method="rAF";else if(e==2){if(typeof setImmediate=="undefined"){var n=[],r="setimmediate",o=function(t){(t.data===r||t.data.target===r)&&(t.stopPropagation(),n.shift()())};addEventListener("message",o,!0),setImmediate=function(t){n.push(t),E?(h.setImmediates===void 0&&(h.setImmediates=[]),h.setImmediates.push(t),postMessage({target:r,type:"cmd"})):postMessage(babelHelpers.extends({},r,{type:"cmd"}),"*")}}Ra.mainLoop.scheduler=function(){setImmediate(Ra.mainLoop.runner)},Ra.mainLoop.method="immediate"}return 0}var va;va=function(){return performance.timeOrigin+performance.now()};function Sa(e,t,n,r,o){H(!Ra.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."),Ra.mainLoop.func=e,Ra.mainLoop.arg=r;var a=Ra.mainLoop.currentlyRunningMainloop;function i(){return a<Ra.mainLoop.currentlyRunningMainloop?(ya(),!1):!0}if(Ra.mainLoop.running=!1,Ra.mainLoop.runner=function(){if(!U){if(Ra.mainLoop.queue.length>0){var t=Date.now(),n=Ra.mainLoop.queue.shift();if(n.func(n.arg),Ra.mainLoop.remainingBlockers){var r=Ra.mainLoop.remainingBlockers,o=r%1==0?r-1:Math.floor(r);n.counted?Ra.mainLoop.remainingBlockers=o:(o=o+.5,Ra.mainLoop.remainingBlockers=(8*r+o)/9)}if(w('main loop blocker "'+n.name+'" took '+(Date.now()-t)+" ms"),Ra.mainLoop.updateStatus(),!i())return;setTimeout(Ra.mainLoop.runner,0);return}if(i()){if(Ra.mainLoop.currentFrameNumber=Ra.mainLoop.currentFrameNumber+1|0,Ra.mainLoop.timingMode==1&&Ra.mainLoop.timingValue>1&&Ra.mainLoop.currentFrameNumber%Ra.mainLoop.timingValue!=0){Ra.mainLoop.scheduler();return}else Ra.mainLoop.timingMode==0&&(Ra.mainLoop.tickStartTime=va());Ra.mainLoop.method==="timeout"&&h.ctx&&(pn("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!"),Ra.mainLoop.method=""),Ra.mainLoop.runIter(e),ae(),i()&&(typeof SDL=="object"&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),Ra.mainLoop.scheduler())}}},o||(t&&t>0?ba(0,1e3/t):ba(1,1),Ra.mainLoop.scheduler()),n)throw"unwind"}var Ra={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Ra.mainLoop.scheduler=null,Ra.mainLoop.currentlyRunningMainloop++},resume:function(){Ra.mainLoop.currentlyRunningMainloop++;var e=Ra.mainLoop.timingMode,t=Ra.mainLoop.timingValue,n=Ra.mainLoop.func;Ra.mainLoop.func=null,Sa(n,0,!1,Ra.mainLoop.arg,!0),ba(e,t),Ra.mainLoop.scheduler()},updateStatus:function(){if(h.setStatus){var e=h.statusMessage||"Please wait...",t=Ra.mainLoop.remainingBlockers,n=Ra.mainLoop.expectedBlockers;t?t<n?h.setStatus(e+" ("+(n-t)+"/"+n+")"):h.setStatus(e):h.setStatus("")}},runIter:function(t){if(!U){if(h.preMainLoop){var e=h.preMainLoop();if(e===!1)return}qo(t),h.postMainLoop&&h.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(Ra.initted)return;Ra.initted=!0;var e={};e.canHandle=function(t){return!h.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(t)},e.handle=function(t,n,r,o){var e=new Blob([t],{type:Ra.getMimetype(n)});e.size!==t.length&&(e=new Blob([new Uint8Array(t).buffer],{type:Ra.getMimetype(n)}));var a=URL.createObjectURL(e);H(typeof a=="string","createObjectURL must return a url as a string");var i=new Image;i.onload=function(){H(i.complete,"Image "+n+" could not be decoded");var e=document.createElement("canvas");e.width=i.width,e.height=i.height;var o=e.getContext("2d");o.drawImage(i,0,0),gi[n]=e,URL.revokeObjectURL(a),r&&r(t)},i.onerror=function(e){w("Image "+a+" could not be decoded"),o&&o()},i.src=a},Ot.push(e);var t={};t.canHandle=function(t){return!h.noAudioDecoding&&t.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},t.handle=function(t,n,r,o){var e=!1;function a(o){e||(e=!0,hi[n]=o,r&&r(t))}var i=new Blob([t],{type:Ra.getMimetype(n)}),l=URL.createObjectURL(i);H(typeof l=="string","createObjectURL must return a url as a string");var s=new Audio;s.addEventListener("canplaythrough",function(){return a(s)},!1),s.onerror=function(o){if(e)return;A("warning: browser could not fully decode audio "+n+", trying slower base64 approach");function r(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="=",r="",o=0,a=0,i=0;i<e.length;i++)for(o=o<<8|e[i],a+=8;a>=6;){var l=o>>a-6&63;a-=6,r+=t[l]}return a==2?(r+=t[(o&3)<<4],r+=n+n):a==4&&(r+=t[(o&15)<<2],r+=n),r}s.src="data:audio/x-"+n.substr(-3)+";base64,"+r(t),a(s)},s.src=l,Ca(function(){a(s)},1e4)},Ot.push(t);function n(){Ra.pointerLock=document.pointerLockElement===h.canvas||document.mozPointerLockElement===h.canvas||document.webkitPointerLockElement===h.canvas||document.msPointerLockElement===h.canvas}var r=h.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),h.elementPointerLock&&r.addEventListener("click",function(e){!Ra.pointerLock&&h.canvas.requestPointerLock&&(h.canvas.requestPointerLock(),e.preventDefault())},!1))},createContext:function(t,n,r,o){if(n&&h.ctx&&t==h.canvas)return h.ctx;var e,a;if(n){var i={antialias:!1,alpha:!1,majorVersion:1};if(o)for(var l in o)i[l]=o[l];typeof GL!="undefined"&&(a=GL.createContext(t,i),a&&(e=GL.getContext(a).GLctx))}else e=t.getContext("2d");return e?(r&&(n||H(typeof GLctx=="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),h.ctx=e,n&&GL.makeContextCurrent(a),h.useWebGL=n,Ra.moduleContextCreatedCallbacks.forEach(function(e){return e()}),Ra.init()),e):null},destroyContext:function(t,n,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(t,n){Ra.lockPointer=t,Ra.resizeCanvas=n,typeof Ra.lockPointer=="undefined"&&(Ra.lockPointer=!0),typeof Ra.resizeCanvas=="undefined"&&(Ra.resizeCanvas=!1);var e=h.canvas;function r(){Ra.isFullscreen=!1;var t=e.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===t?(e.exitFullscreen=Ra.exitFullscreen,Ra.lockPointer&&e.requestPointerLock(),Ra.isFullscreen=!0,Ra.resizeCanvas?Ra.setFullscreenCanvasSize():Ra.updateCanvasDimensions(e)):(t.parentNode.insertBefore(e,t),t.parentNode.removeChild(t),Ra.resizeCanvas?Ra.setWindowedCanvasSize():Ra.updateCanvasDimensions(e)),h.onFullScreen&&h.onFullScreen(Ra.isFullscreen),h.onFullscreen&&h.onFullscreen(Ra.isFullscreen)}Ra.fullscreenHandlersInstalled||(Ra.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",r,!1),document.addEventListener("mozfullscreenchange",r,!1),document.addEventListener("webkitfullscreenchange",r,!1),document.addEventListener("MSFullscreenChange",r,!1));var o=document.createElement("div");e.parentNode.insertBefore(o,e),o.appendChild(e),o.requestFullscreen=o.requestFullscreen||o.mozRequestFullScreen||o.msRequestFullscreen||(o.webkitRequestFullscreen?function(){return o.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(o.webkitRequestFullScreen?function(){return o.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),o.requestFullscreen()},requestFullScreen:function(){Ee("Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)")},exitFullscreen:function(){if(!Ra.isFullscreen)return!1;var e=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){};return e.apply(document,[]),!0},nextRAF:0,fakeRequestAnimationFrame:function(t){var e=Date.now();if(Ra.nextRAF===0)Ra.nextRAF=e+1e3/60;else for(;e+2>=Ra.nextRAF;)Ra.nextRAF+=1e3/60;var n=Math.max(Ra.nextRAF-e,0);setTimeout(t,n)},requestAnimationFrame:(function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t})(function(e){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(e);return}var t=Ra.fakeRequestAnimationFrame;t(e)}),safeSetTimeout:function(t,n){return Ca(t,n)},safeRequestAnimationFrame:function(t){return ha(),Ra.requestAnimationFrame(function(){ya(),qo(t)})},getMimetype:function(t){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[t.substr(t.lastIndexOf(".")+1)]},getUserMedia:function(t){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(t)},getMovementX:function(t){return t.movementX||t.mozMovementX||t.webkitMovementX||0},getMovementY:function(t){return t.movementY||t.mozMovementY||t.webkitMovementY||0},getMouseWheelDelta:function(t){var e=0;switch(t.type){case"DOMMouseScroll":e=t.detail/3;break;case"mousewheel":e=t.wheelDelta/120;break;case"wheel":switch(e=t.deltaY,t.deltaMode){case 0:e/=100;break;case 1:e/=3;break;case 2:e*=80;break;default:throw"unrecognized mouse wheel delta mode: "+t.deltaMode}break;default:throw"unrecognized mouse wheel event: "+t.type}return e},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(t){if(Ra.pointerLock)t.type!="mousemove"&&"mozMovementX"in t?Ra.mouseMovementX=Ra.mouseMovementY=0:(Ra.mouseMovementX=Ra.getMovementX(t),Ra.mouseMovementY=Ra.getMovementY(t)),typeof SDL!="undefined"?(Ra.mouseX=SDL.mouseX+Ra.mouseMovementX,Ra.mouseY=SDL.mouseY+Ra.mouseMovementY):(Ra.mouseX+=Ra.mouseMovementX,Ra.mouseY+=Ra.mouseMovementY);else{var e=h.canvas.getBoundingClientRect(),n=h.canvas.width,r=h.canvas.height,o=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset,a=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;if(H(typeof o!="undefined"&&typeof a!="undefined","Unable to retrieve scroll position, mouse positions likely broken."),t.type==="touchstart"||t.type==="touchend"||t.type==="touchmove"){var i=t.touch;if(i===void 0)return;var l=i.pageX-(o+e.left),s=i.pageY-(a+e.top);l=l*(n/e.width),s=s*(r/e.height);var u={x:l,y:s};if(t.type==="touchstart")Ra.lastTouches[i.identifier]=u,Ra.touches[i.identifier]=u;else if(t.type==="touchend"||t.type==="touchmove"){var c=Ra.touches[i.identifier];c||(c=u),Ra.lastTouches[i.identifier]=c,Ra.touches[i.identifier]=u}return}var d=t.pageX-(o+e.left),m=t.pageY-(a+e.top);d=d*(n/e.width),m=m*(r/e.height),Ra.mouseMovementX=d-Ra.mouseX,Ra.mouseMovementY=m-Ra.mouseY,Ra.mouseX=d,Ra.mouseY=m}},resizeListeners:[],updateResizeListeners:function(){var e=h.canvas;Ra.resizeListeners.forEach(function(t){return t(e.width,e.height)})},setCanvasSize:function(t,n,r){var e=h.canvas;Ra.updateCanvasDimensions(e,t,n),r||Ra.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var e=_()[SDL.screen>>2];e=e|8388608,p()[SDL.screen>>2]=e}Ra.updateCanvasDimensions(h.canvas),Ra.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var e=_()[SDL.screen>>2];e=e&-8388609,p()[SDL.screen>>2]=e}Ra.updateCanvasDimensions(h.canvas),Ra.updateResizeListeners()},updateCanvasDimensions:function(t,n,r){n&&r?(t.widthNative=n,t.heightNative=r):(n=t.widthNative,r=t.heightNative);var e=n,o=r;if(h.forcedAspectRatio&&h.forcedAspectRatio>0&&(e/o<h.forcedAspectRatio?e=Math.round(o*h.forcedAspectRatio):o=Math.round(e/h.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===t.parentNode&&typeof screen!="undefined"){var a=Math.min(screen.width/e,screen.height/o);e=Math.round(e*a),o=Math.round(o*a)}Ra.resizeCanvas?(t.width!=e&&(t.width=e),t.height!=o&&(t.height=o),typeof t.style!="undefined"&&(t.style.removeProperty("width"),t.style.removeProperty("height"))):(t.width!=n&&(t.width=n),t.height!=r&&(t.height=r),typeof t.style!="undefined"&&(e!=n||o!=r?(t.style.setProperty("width",e+"px","important"),t.style.setProperty("height",o+"px","important")):(t.style.removeProperty("width"),t.style.removeProperty("height"))))}};function La(e,t,n){function r(){cn(e)(t)}n>=0?Ca(r,n):Ra.safeRequestAnimationFrame(r)}function Ea(){E||pn("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")}var ka=function(t){H(typeof t=="number"),Qt(t)};function Ia(){return Date.now()}var Ta=function(){throw ha(),"unwind"},Da=function(){return 2147483648},xa=function(){return Da()};function $a(){return navigator.hardwareConcurrency}function Pa(e,t){var n=arguments.length-2,r=arguments,o=19;if(n>o)throw"proxyToMainThread: Too many arguments "+n+" to proxied function idx="+e+", maximum supported is "+o;return ln(function(){for(var o=n*2,a=tl(o*8),i=a>>3,l=0;l<n;l++){var s=r[2+l];typeof s=="bigint"?(J[i+2*l]=BigInt(1),J[i+2*l+1]=s):(J[i+2*l]=BigInt(0),g()[i+2*l+1]=s)}return qi(e,o,a,t)})}var Na=[];function Ma(e,t,n,r){nn.currentProxiedOperationCallerThread=t,n/=2,Na.length=n;for(var o=r>>3,a=0;a<n;a++)J[o+2*a]?Na[a]=J[o+2*a+1]:Na[a]=g()[o+2*a+1];var i=e<0,l=i?ze[-e-1]:yi[e];return H(l.length==n,"Call args mismatch in emscripten_receive_on_main_thread_js"),l.apply(null,Na)}var wa=function(t){var e=B.buffer,n=t-e.byteLength+65535>>>16;try{return B.grow(n),te(),1}catch(n){A("growMemory: Attempted to grow heap from "+e.byteLength+" bytes to "+t+" bytes, but got error: "+n)}},Aa=function(t){var e=l().length;if(t>>>=0,t<=e)return!1;var n=Da();if(t>n)return A("Cannot enlarge memory, asked to go up to "+t+" bytes, but the limit is "+n+" bytes!"),!1;for(var r=function(t,n){return t+(n-t%n)%n},o=1;o<=4;o*=2){var a=e*(1+.2/o);a=Math.min(a,t+100663296);var i=Math.min(n,r(Math.max(t,a),65536)),s=wa(i);if(s)return!0}return A("Failed to grow the heap from "+e+" bytes to "+i+" bytes, not enough memory!"),!1},Fa=ya,Oa=ha,Ba={},Wa=function(){return S||"./this.program"},qa=function(){if(!qa.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Wa()};for(var n in Ba)Ba[n]===void 0?delete t[n]:t[n]=Ba[n];var r=[];for(var n in t)r.push(n+"="+t[n]);qa.strings=r}return qa.strings},Ua=function(t,n){for(var e=0;e<t.length;++e)H(t.charCodeAt(e)===(t.charCodeAt(e)&255)),i()[n++>>0]=t.charCodeAt(e);i()[n>>0]=0};function Va(e,t){if(T)return Pa(17,1,e,t);var n=0;return qa().forEach(function(r,o){var a=t+n;_()[e+o*4>>2]=a,Ua(r,a),n+=r.length+1}),0}function Ha(e,t){if(T)return Pa(18,1,e,t);var n=qa();_()[e>>2]=n.length;var r=0;return n.forEach(function(e){r+=e.length+1}),_()[t>>2]=r,0}function Ga(e){if(T)return Pa(19,1,e);try{var t=Xt.getStreamFromFD(e);return Kt.close(t),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}var za=function(t,n,r,o){for(var e=0,a=0;a<r;a++){var l=_()[n>>2],s=_()[n+4>>2];n+=8;var u=Kt.read(t,i(),l,s,o);if(u<0)return-1;if(e+=u,u<s)break;typeof o!="undefined"&&(o+=u)}return e};function ja(e,t,n,r,o){if(T)return Pa(20,1,e,t,n,r,o);t=Zo(t),n=Zo(n),r=Zo(r),o=Zo(o);try{if(isNaN(r))return 61;var a=Xt.getStreamFromFD(e),i=za(a,t,n,r);return _()[o>>2]=i,0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}function Ka(e,t,n,r){if(T)return Pa(21,1,e,t,n,r);try{var o=Xt.getStreamFromFD(e),a=za(o,t,n);return _()[r>>2]=a,0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}function Qa(e,t,n,r){if(T)return Pa(22,1,e,t,n,r);t=Zo(t),r=Zo(r);try{if(isNaN(t))return 61;var o=Xt.getStreamFromFD(e);return Kt.llseek(o,t,n),J[r>>3]=BigInt(o.position),o.getdents&&t===0&&n===0&&(o.getdents=null),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}var Xa=function(t,n,r,o){for(var e=0,a=0;a<r;a++){var l=_()[n>>2],s=_()[n+4>>2];n+=8;var u=Kt.write(t,i(),l,s,o);if(u<0)return-1;e+=u,typeof o!="undefined"&&(o+=u)}return e};function Ya(e,t,n,r){if(T)return Pa(23,1,e,t,n,r);try{var o=Xt.getStreamFromFD(e),a=Xa(o,t,n);return _()[r>>2]=a,0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}var Ja=function(t,n){return Lt(l().subarray(t,t+n)),0},Za=function(t){for(var e=t.split("."),n=0;n<4;n++){var r=Number(e[n]);if(isNaN(r))return null;e[n]=r}return(e[0]|e[1]<<8|e[2]<<16|e[3]<<24)>>>0},ei=function(t){return parseInt(t)},ti=function(t){var e,n,r,o,a=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,i=[];if(!a.test(t))return null;if(t==="::")return[0,0,0,0,0,0,0,0];for(t.startsWith("::")?t=t.replace("::","Z:"):t=t.replace("::",":Z:"),t.indexOf(".")>0?(t=t.replace(new RegExp("[.]","g"),":"),e=t.split(":"),e[e.length-4]=ei(e[e.length-4])+ei(e[e.length-3])*256,e[e.length-3]=ei(e[e.length-2])+ei(e[e.length-1])*256,e=e.slice(0,e.length-2)):e=t.split(":"),r=0,o=0,n=0;n<e.length;n++)if(typeof e[n]=="string")if(e[n]==="Z"){for(o=0;o<8-e.length+1;o++)i[n+o]=0;r=o-1}else i[n+r]=$i(parseInt(e[n],16));else i[n+r]=e[n];return[i[1]<<16|i[0],i[3]<<16|i[2],i[5]<<16|i[4],i[7]<<16|i[6]]},ni={address_map:{id:1,addrs:{},names:{}},lookup_name:function(t){var e=Za(t);if(e!==null||(e=ti(t),e!==null))return t;var n;if(ni.address_map.addrs[t])n=ni.address_map.addrs[t];else{var r=ni.address_map.id++;H(r<65535,"exceeded max address mappings of 65535"),n="172.29."+(r&255)+"."+(r&65280),ni.address_map.names[n]=t,ni.address_map.addrs[t]=n}return n},lookup_addr:function(t){return ni.address_map.names[t]?ni.address_map.names[t]:null}},ri=function(t){var e=Li(20),n=ua(t);_()[e>>2]=n;var r=Li(4);_()[r>>2]=0,_()[e+4>>2]=r;var o=2;p()[e+8>>2]=o,p()[e+12>>2]=4;var a=Li(12);return _()[a>>2]=a+8,_()[a+4>>2]=0,p()[a+8>>2]=Za(ni.lookup_name(t)),_()[e+16>>2]=a,e};function oi(e){return T?Pa(24,1,e):ri(Qt(e))}function ai(e){return e}var ii=function(t,n){for(var e=0,r=0;r<=n;e+=t[r++]);return e},li=[31,29,31,30,31,30,31,31,30,31,30,31],si=[31,28,31,30,31,30,31,31,30,31,30,31],ui=function(t,n){for(var e=new Date(t.getTime());n>0;){var r=ta(e.getFullYear()),o=e.getMonth(),a=(r?li:si)[o];if(n>a-e.getDate())n-=a-e.getDate()+1,e.setDate(1),o<11?e.setMonth(o+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1));else return e.setDate(e.getDate()+n),e}return e},ci=function(t,n){H(t.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),i().set(t,n)},di=function(t,n,r,o){var e=p()[o+40>>2],a={tm_sec:p()[o>>2],tm_min:p()[o+4>>2],tm_hour:p()[o+8>>2],tm_mday:p()[o+12>>2],tm_mon:p()[o+16>>2],tm_year:p()[o+20>>2],tm_wday:p()[o+24>>2],tm_yday:p()[o+28>>2],tm_isdst:p()[o+32>>2],tm_gmtoff:p()[o+36>>2],tm_zone:e?Qt(e):""},i=Qt(r),l={"%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 s in l)i=i.replace(new RegExp(s,"g"),l[s]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,t,n){for(var r=typeof e=="number"?e.toString():e||"";r.length<t;)r=n[0]+r;return r}function m(e,t){return d(e,t,"0")}function _(e,t){function n(e){return e<0?-1:e>0?1:0}var r;return(r=n(e.getFullYear()-t.getFullYear()))===0&&(r=n(e.getMonth()-t.getMonth()))===0&&(r=n(e.getDate()-t.getDate())),r}function f(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function g(e){var t=ui(new Date(e.tm_year+1900,0,1),e.tm_yday),n=new Date(t.getFullYear(),0,4),r=new Date(t.getFullYear()+1,0,4),o=f(n),a=f(r);return _(o,t)<=0?_(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var h={"%a":function(t){return u[t.tm_wday].substring(0,3)},"%A":function(t){return u[t.tm_wday]},"%b":function(t){return c[t.tm_mon].substring(0,3)},"%B":function(t){return c[t.tm_mon]},"%C":function(t){var e=t.tm_year+1900;return m(e/100|0,2)},"%d":function(t){return m(t.tm_mday,2)},"%e":function(t){return d(t.tm_mday,2," ")},"%g":function(t){return g(t).toString().substring(2)},"%G":function(t){return g(t)},"%H":function(t){return m(t.tm_hour,2)},"%I":function(t){var e=t.tm_hour;return e==0?e=12:e>12&&(e-=12),m(e,2)},"%j":function(t){return m(t.tm_mday+ii(ta(t.tm_year+1900)?li:si,t.tm_mon-1),3)},"%m":function(t){return m(t.tm_mon+1,2)},"%M":function(t){return m(t.tm_min,2)},"%n":function(){return"\n"},"%p":function(t){return t.tm_hour>=0&&t.tm_hour<12?"AM":"PM"},"%S":function(t){return m(t.tm_sec,2)},"%t":function(){return" "},"%u":function(t){return t.tm_wday||7},"%U":function(t){var e=t.tm_yday+7-t.tm_wday;return m(Math.floor(e/7),2)},"%V":function(t){var e=Math.floor((t.tm_yday+7-(t.tm_wday+6)%7)/7);if((t.tm_wday+371-t.tm_yday-2)%7<=2&&e++,e){if(e==53){var r=(t.tm_wday+371-t.tm_yday)%7;r!=4&&(r!=3||!ta(t.tm_year))&&(e=1)}}else{e=52;var n=(t.tm_wday+7-t.tm_yday-1)%7;(n==4||n==5&&ta(t.tm_year%400-1))&&e++}return m(e,2)},"%w":function(t){return t.tm_wday},"%W":function(t){var e=t.tm_yday+7-(t.tm_wday+6)%7;return m(Math.floor(e/7),2)},"%y":function(t){return(t.tm_year+1900).toString().substring(2)},"%Y":function(t){return t.tm_year+1900},"%z":function(t){var e=t.tm_gmtoff,n=e>=0;return e=Math.abs(e)/60,e=e/60*100+e%60,(n?"+":"-")+("0000"+e).slice(-4)},"%Z":function(t){return t.tm_zone},"%%":function(){return"%"}};i=i.replace(/%%/g,"\0\0");for(var s in h)i.includes(s)&&(i=i.replace(new RegExp(s,"g"),h[s](a)));i=i.replace(/\0\0/g,"%");var y=$t(i,!1);return y.length>n?0:(ci(y,t),y.length-1)},mi=function(t,n,r,o,a){return di(t,n,r,o)};nn.init();var pi=function(t,n,r,o){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=Kt.nextInode++,this.name=n,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=o},_i=365,fi=146;Object.defineProperties(pi.prototype,{read:{get:function(){return(this.mode&_i)===_i},set:function(t){t?this.mode|=_i:this.mode&=~_i}},write:{get:function(){return(this.mode&fi)===fi},set:function(t){t?this.mode|=fi:this.mode&=~fi}},isFolder:{get:function(){return Kt.isDir(this.mode)}},isDevice:{get:function(){return Kt.isChrdev(this.mode)}}}),Kt.FSNode=pi,Kt.createPreloadedFile=Wt,Kt.staticInit(),Gt={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},Kn(),er=h.BindingError=(function(e){function t(t){var n;return n=e.call(this,t)||this,n.name="BindingError",n}return babelHelpers.inheritsLoose(t,e),t})(babelHelpers.wrapNativeSuper(Error)),nr=h.InternalError=(function(e){function t(t){var n;return n=e.call(this,t)||this,n.name="InternalError",n}return babelHelpers.inheritsLoose(t,e),t})(babelHelpers.wrapNativeSuper(Error)),Fr(),kr(),eo(),ao=h.UnboundTypeError=oo(Error,"UnboundTypeError"),fo(),bo(),h.requestFullscreen=function(t,n){Ra.requestFullscreen(t,n)},h.requestFullScreen=function(){Ra.requestFullScreen()},h.requestAnimationFrame=function(t){Ra.requestAnimationFrame(t)},h.setCanvasSize=function(t,n,r){Ra.setCanvasSize(t,n,r)},h.pauseMainLoop=function(){Ra.mainLoop.pause()},h.resumeMainLoop=function(){Ra.mainLoop.resume()},h.getUserMedia=function(){Ra.getUserMedia()},h.createContext=function(t,n,r,o){return Ra.createContext(t,n,r,o)};var gi={},hi={},yi=[null,Yt,an,Pn,Mn,An,Fn,Bn,Wn,qn,Un,Vn,Hn,Gn,zn,la,sa,Va,Ha,Ga,ja,Ka,Qa,Ya,oi];function Ci(){We("fetchSettings")}var bi={__assert_fail:_n,__cxa_begin_catch:hn,__cxa_end_catch:Cn,__cxa_find_matching_catch_2:Rn,__cxa_find_matching_catch_3:Ln,__cxa_find_matching_catch_4:En,__cxa_get_exception_ptr:kn,__cxa_rethrow:In,__cxa_throw:Tn,__cxa_uncaught_exceptions:Dn,__emscripten_init_main_thread_js:xn,__emscripten_thread_cleanup:$n,__pthread_create_js:Nn,__resumeException:vn,__syscall_chdir:Mn,__syscall_fcntl64:An,__syscall_fstat64:Fn,__syscall_getdents64:Bn,__syscall_ioctl:Wn,__syscall_lstat64:qn,__syscall_mkdirat:Un,__syscall_newfstatat:Vn,__syscall_openat:Hn,__syscall_stat64:Gn,__syscall_unlinkat:zn,_embind_register_bigint:sr,_embind_register_bool:cr,_embind_register_class:so,_embind_register_class_constructor:po,_embind_register_class_function:_o,_embind_register_emval:So,_embind_register_float:Lo,_embind_register_function:Eo,_embind_register_integer:ko,_embind_register_memory_view:Io,_embind_register_std_string:To,_embind_register_std_wstring:Ao,_embind_register_void:Fo,_emscripten_get_now_is_monotonic:Bo,_emscripten_notify_mailbox_postmessage:Ho,_emscripten_set_offscreencanvas_size:Go,_emscripten_thread_mailbox_await:Uo,_emscripten_thread_set_strongref:zo,_emscripten_throw_longjmp:jo,_emval_decref:yo,_emval_incref:Ko,_emval_take_value:Xo,_gmtime_js:ea,_localtime_js:aa,_mktime_js:ia,_mmap_js:la,_munmap_js:sa,_tzset_js:ca,abort:da,call_init_capture_driver_js_sync:rt,call_init_playback_driver_js_sync:it,call_sendto:nt,call_start_capture_js_sync:ot,call_start_desktop_capture_js_sync:ct,call_start_playback_js_sync:lt,call_start_video_capture_js_sync:mt,call_stop_capture_js_sync:at,call_stop_desktop_capture_js_sync:dt,call_stop_playback_js_sync:st,call_stop_video_capture_js_sync:pt,emscripten_asm_const_double:fa,emscripten_asm_const_int:ga,emscripten_async_call:La,emscripten_check_blocking_allowed:Ea,emscripten_console_error:ka,emscripten_date_now:Ia,emscripten_exit_with_live_runtime:Ta,emscripten_get_heap_max:xa,emscripten_get_now:va,emscripten_num_logical_cores:$a,emscripten_receive_on_main_thread_js:Ma,emscripten_resize_heap:Aa,emscripten_runtime_keepalive_pop:Fa,emscripten_runtime_keepalive_push:Oa,environ_get:Va,environ_sizes_get:Ha,exit:Zt,fd_close:Ga,fd_pread:ja,fd_read:Ka,fd_seek:Qa,fd_write:Ya,get_bwe_ml_model_path_js:Ye,get_persistent_directory_path_js:Xe,get_random_bytes_js:Je,getentropy:Ja,gethostbyname:oi,invoke_d:Su,invoke_diii:Iu,invoke_fii:rs,invoke_fiii:ku,invoke_fiiiiii:ou,invoke_i:dl,invoke_ii:pl,invoke_iid:yu,invoke_iidi:Ru,invoke_iidii:uu,invoke_iidjjjidjjjdjjji:jl,invoke_iidjjjii:ts,invoke_iidjjjiii:Ql,invoke_iiffiii:as,invoke_iiffiiiii:os,invoke_iifi:Gs,invoke_iii:_l,invoke_iiid:bu,invoke_iiifi:Us,invoke_iiii:gl,invoke_iiiidd:pu,invoke_iiiifiii:cs,invoke_iiiifiiiiii:ps,invoke_iiiii:bl,invoke_iiiiid:Lu,invoke_iiiiii:kl,invoke_iiiiiii:hl,invoke_iiiiiiii:Ll,invoke_iiiiiiiii:vl,invoke_iiiiiiiiii:Rl,invoke_iiiiiiiiiiffiii:is,invoke_iiiiiiiiiii:Al,invoke_iiiiiiiiiiii:ms,invoke_iiiiiiiiiiiiffiii:us,invoke_iiiiiiiiiiiii:_s,invoke_iiiiiiiiiiiiii:$l,invoke_iiiiiiiiiiiiiiffiiiii:ds,invoke_iiiiiiiiiiiiiii:Ds,invoke_iiiiiiiiiiiiiiiffiiiii:ls,invoke_iiiiiiiiiiiiiiiiiffiiiii:ss,invoke_iiiiiiiiiiiiiiiiii:Pl,invoke_iiiiiiiiiiji:Wl,invoke_iiiiiiiiij:Es,invoke_iiiiiiiij:Ss,invoke_iiiiiiij:ys,invoke_iiiiiiijjii:Fs,invoke_iiiiiij:Rs,invoke_iiiiiijiiii:ks,invoke_iiiiiijjijiiiiiiiiii:Bs,invoke_iiiiij:au,invoke_iiiiijjii:Zl,invoke_iiiiijjiii:es,invoke_iiiiijjjii:Yl,invoke_iiiiijjjiii:Jl,invoke_iiiij:bs,invoke_iiiijiii:lu,invoke_iiiijiiji:Gl,invoke_iiiijjii:ns,invoke_iiiijjiii:Xl,invoke_iiij:Cs,invoke_iiijddddddd:eu,invoke_iiiji:Bl,invoke_iiijii:Fl,invoke_iiijiiji:Hl,invoke_iiijji:Vl,invoke_iiijjiiii:Qs,invoke_iij:ws,invoke_iiji:Is,invoke_iijii:Ls,invoke_iijiii:ru,invoke_iijijijiji:gu,invoke_iijj:Ys,invoke_iijjjiiii:js,invoke_iijjjj:zs,invoke_iijjjji:Zs,invoke_ij:su,invoke_iji:_u,invoke_j:Nl,invoke_ji:fs,invoke_jii:Os,invoke_jiii:Sl,invoke_jiiii:Eu,invoke_jiiiiiiii:vs,invoke_jiiiiiji:Ts,invoke_jiij:Js,invoke_jij:Ws,invoke_v:fl,invoke_vd:vu,invoke_vi:yl,invoke_vid:fu,invoke_viddjjii:Ks,invoke_vif:gs,invoke_vii:ml,invoke_viid:iu,invoke_viidi:hu,invoke_viif:Du,invoke_viii:cl,invoke_viiii:Cl,invoke_viiiii:El,invoke_viiiiii:xl,invoke_viiiiiidiii:Ul,invoke_viiiiiii:Dl,invoke_viiiiiiiddiii:Ol,invoke_viiiiiiii:Tl,invoke_viiiiiiiii:Il,invoke_viiiiiiiiii:ql,invoke_viiiiiiiiiiii:hs,invoke_viiiiiiiiiiiii:du,invoke_viiiiiiiiiiiiiii:Tu,invoke_viiiiiiiiiiiiiiiiiiiiiiiiiiiiiii:tu,invoke_viiiiiiij:cu,invoke_viiiiij:Vs,invoke_viiiiiji:Cu,invoke_viiiij:Hs,invoke_viiij:xs,invoke_viiiji:zl,invoke_viij:As,invoke_viiji:$s,invoke_viijii:Ps,invoke_viijiiii:Ms,invoke_viijj:mu,invoke_viijjdiii:Kl,invoke_vij:Ns,invoke_viji:nu,invoke_vijiiiii:Ml,invoke_vijj:qs,invoke_vijji:Xs,invoke_vjiiiiii:wl,is_participant_known_contact_js:Ze,llvm_eh_typeid_for:ai,loggingCallback_js_sync:_t,memory:B||h.wasmMemory,on_call_event_js_sync:je,patch_abort_for_ml_inference:Qe,query_browser_audio_processing_status_js_sync:ut,renderVideoFrame_js:et,sendSignalingXMPP_js_sync:tt,set_ml_inference_flag:Ke,strftime_l:mi},vi=Oe(),Si=De("__wasm_call_ctors"),Ri=De("__cxa_free_exception"),Li=h._malloc=De("malloc"),Ei=h._free=De("free"),ki=h._wasm_throw_ml_abort=De("wasm_throw_ml_abort"),Ii=h._fflush=De("fflush"),Ti=De("__errno_location"),Di=De("ntohs"),xi=De("htonl"),$i=De("htons"),Pi=h._pthread_self=function(){return(Pi=h._pthread_self=W.pthread_self)()},Ni=h.__emscripten_tls_init=De("_emscripten_tls_init"),Mi=De("emscripten_builtin_memalign"),wi=De("__getTypeName"),Ai=h.__embind_initialize_bindings=De("_embind_initialize_bindings"),Fi=h.__emscripten_thread_init=De("_emscripten_thread_init"),Oi=h.__emscripten_thread_crashed=De("_emscripten_thread_crashed"),Bi=De("emscripten_main_thread_process_queued_calls"),Wi=De("emscripten_main_runtime_thread_id"),qi=De("_emscripten_run_in_main_runtime_thread_js"),Ui=De("emscripten_dispatch_to_thread_"),Vi=function(){return(Vi=W.emscripten_stack_get_base)()},Hi=function(){return(Hi=W.emscripten_stack_get_end)()},Gi=De("_emscripten_thread_free_data"),zi=h.__emscripten_thread_exit=De("_emscripten_thread_exit"),ji=h.__emscripten_check_mailbox=De("_emscripten_check_mailbox"),Ki=De("setThrew"),Qi=De("setTempRet0"),Xi=function(){return(Xi=W.emscripten_stack_init)()},Yi=function(t,n){return(Yi=W.emscripten_stack_set_limits)(t,n)},Ji=function(){return(Ji=W.emscripten_stack_get_free)()},Zi=De("stackSave"),el=De("stackRestore"),tl=De("stackAlloc"),nl=function(){return(nl=W.emscripten_stack_get_current)()},rl=De("__cxa_decrement_exception_refcount"),ol=De("__cxa_increment_exception_refcount"),al=h.___get_exception_message=De("__get_exception_message"),il=De("__cxa_can_catch"),ll=De("__cxa_is_pointer_type"),sl=h.___start_em_js=1327852,ul=h.___stop_em_js=1333147;function cl(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function dl(e){var t=Zi();try{return cn(e)()}catch(e){if(el(t),!(e instanceof xe))throw e;Ki(1,0)}}function ml(e,t,n){var r=Zi();try{cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function pl(e,t){var n=Zi();try{return cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;Ki(1,0)}}function _l(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function fl(e){var t=Zi();try{cn(e)()}catch(e){if(el(t),!(e instanceof xe))throw e;Ki(1,0)}}function gl(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function hl(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function yl(e,t){var n=Zi();try{cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;Ki(1,0)}}function Cl(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function bl(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function vl(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Sl(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Rl(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function Ll(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function El(e,t,n,r,o,a){var i=Zi();try{cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function kl(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Il(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function Tl(e,t,n,r,o,a,i,l,s){var u=Zi();try{cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Dl(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function xl(e,t,n,r,o,a,i){var l=Zi();try{cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function $l(e,t,n,r,o,a,i,l,s,u,c,d,m,p){var _=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p)}catch(e){if(el(_),!(e instanceof xe))throw e;Ki(1,0)}}function Pl(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h){var y=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h)}catch(e){if(el(y),!(e instanceof xe))throw e;Ki(1,0)}}function Nl(e){var t=Zi();try{return cn(e)()}catch(e){if(el(t),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Ml(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function wl(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function Al(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Fl(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Ol(e,t,n,r,o,a,i,l,s,u,c,d,m){var p=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m)}catch(e){if(el(p),!(e instanceof xe))throw e;Ki(1,0)}}function Bl(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Wl(e,t,n,r,o,a,i,l,s,u,c,d){var m=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d)}catch(e){if(el(m),!(e instanceof xe))throw e;Ki(1,0)}}function ql(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Ul(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Vl(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Hl(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function Gl(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function zl(e,t,n,r,o,a){var i=Zi();try{cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function jl(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f){var g=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f)}catch(e){if(el(g),!(e instanceof xe))throw e;Ki(1,0)}}function Kl(e,t,n,r,o,a,i,l,s){var u=Zi();try{cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Ql(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Xl(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Yl(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function Jl(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Zl(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function es(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function ts(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function ns(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function rs(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function os(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function as(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function is(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_){var f=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_)}catch(e){if(el(f),!(e instanceof xe))throw e;Ki(1,0)}}function ls(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v){var S=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v)}catch(e){if(el(S),!(e instanceof xe))throw e;Ki(1,0)}}function ss(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v,S,R){var L=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v,S,R)}catch(e){if(el(L),!(e instanceof xe))throw e;Ki(1,0)}}function us(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g){var h=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g)}catch(e){if(el(h),!(e instanceof xe))throw e;Ki(1,0)}}function cs(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function ds(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b){var v=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b)}catch(e){if(el(v),!(e instanceof xe))throw e;Ki(1,0)}}function ms(e,t,n,r,o,a,i,l,s,u,c,d){var m=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d)}catch(e){if(el(m),!(e instanceof xe))throw e;Ki(1,0)}}function ps(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function _s(e,t,n,r,o,a,i,l,s,u,c,d,m){var p=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m)}catch(e){if(el(p),!(e instanceof xe))throw e;Ki(1,0)}}function fs(e,t){var n=Zi();try{return cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function gs(e,t,n){var r=Zi();try{cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function hs(e,t,n,r,o,a,i,l,s,u,c,d,m){var p=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m)}catch(e){if(el(p),!(e instanceof xe))throw e;Ki(1,0)}}function ys(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function Cs(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function bs(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function vs(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Ss(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Rs(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function Ls(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Es(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function ks(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Is(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Ts(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Ds(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_){var f=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_)}catch(e){if(el(f),!(e instanceof xe))throw e;Ki(1,0)}}function xs(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function $s(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Ps(e,t,n,r,o,a){var i=Zi();try{cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Ns(e,t,n){var r=Zi();try{cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function Ms(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function ws(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function As(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Fs(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Os(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Bs(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C){var b=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C)}catch(e){if(el(b),!(e instanceof xe))throw e;Ki(1,0)}}function Ws(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function qs(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Us(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Vs(e,t,n,r,o,a,i){var l=Zi();try{cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function Hs(e,t,n,r,o,a){var i=Zi();try{cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Gs(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function zs(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function js(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Ks(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function Qs(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Xs(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Ys(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Js(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Zs(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function eu(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function tu(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v,S,R,L,E,k,I,T,D,x,$){var P=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v,S,R,L,E,k,I,T,D,x,$)}catch(e){if(el(P),!(e instanceof xe))throw e;Ki(1,0)}}function nu(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function ru(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function ou(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function au(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function iu(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function lu(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function su(e,t){var n=Zi();try{return cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;Ki(1,0)}}function uu(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function cu(e,t,n,r,o,a,i,l,s){var u=Zi();try{cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function du(e,t,n,r,o,a,i,l,s,u,c,d,m,p){var _=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p)}catch(e){if(el(_),!(e instanceof xe))throw e;Ki(1,0)}}function mu(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function pu(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function _u(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function fu(e,t,n){var r=Zi();try{cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function gu(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function hu(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function yu(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function Cu(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function bu(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function vu(e,t){var n=Zi();try{cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;Ki(1,0)}}function Su(e){var t=Zi();try{return cn(e)()}catch(e){if(el(t),!(e instanceof xe))throw e;Ki(1,0)}}function Ru(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Lu(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Eu(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function ku(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Iu(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Tu(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f){var g=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f)}catch(e){if(el(g),!(e instanceof xe))throw e;Ki(1,0)}}function Du(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}h.keepRuntimeAlive=de,h.wasmMemory=B,h.GROWABLE_HEAP_U8=l,h.GROWABLE_HEAP_F32=f,h.ExitStatus=ft,h.FS=Kt,h.PThread=nn,h.registeredTypes=Jn;var xu=["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","inetNtop4","inetNtop6","readSockaddr","writeSockaddr","getCallstack","emscriptenLog","convertPCtoSourceLocation","runMainThreadEmAsm","jstoi_s","listenOnce","autoResumeAudioContext","getDynCaller","dynCall","setWasmTableEntry","asmjsMangle","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","stringToUTF8OnStack","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSizeCallingThread","setCanvasElementSizeMainThread","setCanvasElementSize","getCanvasSizeCallingThread","getCanvasSizeMainThread","getCanvasElementSize","jsStackTrace","stackTrace","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","getSocketFromFD","getSocketAddress","_setNetworkCallback","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","__glGenObject","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","emscripten_webgl_destroy_context_before_on_calling_thread","registerWebGlEventCallback","runAndAbortIfError","SDL_unicode","SDL_ttfContext","SDL_audio","GLFW_Window","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","registerInheritedInstance","unregisterInheritedInstance","enumReadValueFromPointer","validateThis","getStringOrSymbol","craftEmvalAllocator","emval_get_global","emval_lookupTypes","emval_allocateDestructors","emval_addMethodCaller"];xu.forEach(Ve);var $u=["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createDataFile","FS_createLazyFile","FS_createLink","FS_createDevice","FS_unlink","out","err","callMain","abort","wasmTable","wasmExports","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","GROWABLE_HEAP_I8","GROWABLE_HEAP_I16","GROWABLE_HEAP_U16","GROWABLE_HEAP_I32","GROWABLE_HEAP_U32","GROWABLE_HEAP_F64","writeStackCookie","checkStackCookie","MAX_INT53","MIN_INT53","bigintToI53Checked","ptrToString","zeroMemory","exitJS","getHeapMax","growMemory","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","arraySum","addDays","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","inetPton4","inetPton6","DNS","getHostByName","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","readEmAsmArgs","runEmAsmFunction","jstoi_q","getExecutableName","getWasmTableEntry","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asyncLoad","alignMemory","mmapAlloc","handleAllocatorInit","HandleAllocator","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToNewUTF8","writeArrayToMemory","JSEvents","specialHTMLTargets","currentFullscreenStrategy","restoreOldWindowedStyle","demangle","demangleAll","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","ExceptionInfo","findMatchingCatch","getExceptionMessageCommon","incrementExceptionRefcount","decrementExceptionRefcount","getExceptionMessage","Browser","setMainLoop","wget","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","emscripten_webgl_power_preferences","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","GLFW","allocateUTF8","allocateUTF8OnStack","terminateWorker","killThread","cleanupThread","registerTLSInit","cancelThread","spawnThread","exitOnMainThread","proxyToMainThread","emscripten_receive_on_main_thread_js_callArgs","invokeEntryPoint","checkMailbox","InternalError","BindingError","throwInternalError","throwBindingError","awaitingDependencies","typeDependencies","tupleRegistrations","structRegistrations","sharedRegisterType","whenDependentTypesAreResolved","embind_charCodes","embind_init_charCodes","readLatin1String","getTypeName","heap32VectorToArray","requireRegisteredType","UnboundTypeError","PureVirtualError","init_embind","throwUnboundTypeError","ensureOverloadTable","exposePublicSymbol","replacePublicSymbol","extendError","createNamedFunction","embindRepr","registeredInstances","getBasestPointer","getInheritedInstance","getInheritedInstanceCount","getLiveInheritedInstances","registeredPointers","registerType","getShiftFromSize","integerReadValueFromPointer","floatReadValueFromPointer","simpleReadValueFromPointer","runDestructors","craftInvokerFunction","embind__requireFunction","genericPointerToWireType","constNoSmartPtrRawPointerToWireType","nonConstNoSmartPtrRawPointerToWireType","init_RegisteredPointer","RegisteredPointer","RegisteredPointer_getPointee","RegisteredPointer_destructor","RegisteredPointer_deleteObject","RegisteredPointer_fromWireType","runDestructor","releaseClassHandle","finalizationRegistry","detachFinalizer_deps","detachFinalizer","attachFinalizer","makeClassHandle","init_ClassHandle","ClassHandle","ClassHandle_isAliasOf","throwInstanceAlreadyDeleted","ClassHandle_clone","ClassHandle_delete","deletionQueue","ClassHandle_isDeleted","ClassHandle_deleteLater","flushPendingDeletes","delayFunction","setDelayFunction","RegisteredClass","shallowCopyInternalPointer","downcastPointer","upcastPointer","char_0","char_9","makeLegalFunctionName","emval_handles","emval_symbols","init_emval","count_emval_handles","Emval","emval_newers","emval_methodCallers","emval_registeredMethods","IDBFS"];$u.forEach(He);var Pu;be=function e(){Pu||Mu(),Pu||(be=e)};function Nu(){H(!T),Xi(),oe()}function Mu(){if(ye>0)return;if(T||Nu(),T){y(h),pe(),startWorker(h);return}if(me(),ye>0)return;function e(){Pu||(Pu=!0,h.calledRun=!0,!U&&(pe(),y(h),h.onRuntimeInitialized&&h.onRuntimeInitialized(),H(!h._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),_e()))}h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},1),e()},1)):e(),ae()}function wu(){var e=w,t=A,n=!1;w=A=function(t){n=!0};try{Ii(0),["stdout","stderr"].forEach(function(e){var t=Kt.analyzePath("/dev/"+e);if(t){var r=t.object,o=r.rdev,a=Nt.ttys[o];a&&a.output&&a.output.length&&(n=!0)}})}catch(e){}w=e,A=t,n&&pn("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.")}if(h.preInit)for(typeof h.preInit=="function"&&(h.preInit=[h.preInit]);h.preInit.length>0;)h.preInit.pop()();return Mu(),r.ready}})();typeof l=="object"&&typeof i=="object"?i.exports=d:typeof define=="function"&&define.amd&&define([],function(){return d})}),34);
|
|
203
|
+
__d("WAWebVoipWebWasmLoader_ProdLabvideo_internal.worker",["Promise","WorkerBundleResource","WorkerClient","WorkerMessagePort","bx"],(function(t,n,r,o,a,i,l){var e=["type","__name"],s,u,c=r("bx").getURL(r("bx")("78865"),{cacheBreaker:"1778490227631"}),d=(function(){var t=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return function(r){var a=this;r===void 0&&(r={});function i(){return B.buffer!=G.buffer&&te(),G}function l(){return B.buffer!=G.buffer&&te(),z}function d(){return B.buffer!=G.buffer&&te(),j}function m(){return B.buffer!=G.buffer&&te(),K}function p(){return B.buffer!=G.buffer&&te(),Q}function _(){return B.buffer!=G.buffer&&te(),X}function f(){return B.buffer!=G.buffer&&te(),Y}function g(){return B.buffer!=G.buffer&&te(),ee}var h=r,y,C;h.ready=new(u||(u=n("Promise")))(function(e,t){y=e,C=t}),["_malloc","_free","__emscripten_thread_init","__emscripten_thread_exit","__emscripten_thread_crashed","__emscripten_thread_mailbox_await","__emscripten_tls_init","_pthread_self","checkMailbox","establishStackSpace","invokeEntryPoint","PThread","getExceptionMessage","___get_exception_message","_on_call_event_js_sync","_wasm_throw_ml_abort","_set_ml_inference_flag","_patch_abort_for_ml_inference","_get_persistent_directory_path_js","_get_bwe_ml_model_path_js","_get_random_bytes_js","_is_participant_known_contact_js","_renderVideoFrame_js","_sendSignalingXMPP_js_sync","_fflush","_call_sendto","___indirect_function_table","_call_init_capture_driver_js_sync","_call_start_capture_js_sync","_call_stop_capture_js_sync","_call_init_playback_driver_js_sync","_call_start_playback_js_sync","_call_stop_playback_js_sync","_query_browser_audio_processing_status_js_sync","_call_start_desktop_capture_js_sync","_call_stop_desktop_capture_js_sync","_call_start_video_capture_js_sync","_call_stop_video_capture_js_sync","_loggingCallback_js_sync","__embind_initialize_bindings","__emscripten_check_mailbox","___start_em_js","___stop_em_js","___start_em_asm","___stop_em_asm","onRuntimeInitialized"].forEach(function(e){Object.getOwnPropertyDescriptor(h.ready,e)||Object.defineProperty(h.ready,e,{get:function(){return Ee("You are getting "+e+" 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")},set:function(){return Ee("You are setting "+e+" 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 b=Object.assign({},h),v=[],S="./this.program",R=function(t,n){throw n},L=typeof window=="object",E=typeof importScripts=="function",k=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",I=!L&&!k&&!E;if(h.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var T=h.ENVIRONMENT_IS_PTHREAD||!1,D="";function x(e){return h.locateFile?h.locateFile(e,D):D+e}var $,P,N,M;if(I){if(typeof process=="object"&&typeof n=="function"||typeof window=="object"||typeof importScripts=="function")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?)");typeof read!="undefined"&&($=read),N=function(t){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(t));var e=read(t,"binary");return H(typeof e=="object"),e},P=function(t,n,r){setTimeout(function(){return n(N(t))})},typeof clearTimeout=="undefined"&&(globalThis.clearTimeout=function(e){}),typeof setTimeout=="undefined"&&(globalThis.setTimeout=function(e){return typeof e=="function"?e():Ee()}),typeof scriptArgs!="undefined"?v=scriptArgs:typeof arguments!="undefined"&&(v=arguments),typeof quit=="function"&&(R=function(t,n){throw setTimeout(function(){if(!(n instanceof ft)){var e=n;n&&typeof n=="object"&&n.stack&&(e=[n,n.stack]),A("exiting due to exception: "+e)}quit(t)}),n}),typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)}else if(L||E){if(E?D=self.location.href:typeof document!="undefined"&&document.currentScript&&(D=document.currentScript.src),t&&(D=t),D.indexOf("blob:")!==0?D=D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):D="",!(typeof window=="object"||typeof importScripts=="function"))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?)");$=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},E&&(N=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),P=function(t,n,r){var e=new XMLHttpRequest;e.open("GET",t,!0),e.responseType="arraybuffer",e.onload=function(){if(e.status==200||e.status==0&&e.response){n(e.response);return}r()},e.onerror=r,e.send(null)},M=function(t){return document.title=t}}else throw new Error("environment detection error");var w=h.print||console.log.bind(console),A=h.printErr||console.error.bind(console);Object.assign(h,b),b=null,Ci(),h.arguments&&(v=h.arguments),Be("arguments","arguments_"),h.thisProgram&&(S=h.thisProgram),Be("thisProgram","thisProgram"),h.quit&&(R=h.quit),Be("quit","quit_"),H(typeof h.memoryInitializerPrefixURL=="undefined","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),H(typeof h.pthreadMainPrefixURL=="undefined","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),H(typeof h.cdInitializerPrefixURL=="undefined","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),H(typeof h.filePackagePrefixURL=="undefined","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),H(typeof h.read=="undefined","Module.read option was removed (modify read_ in JS)"),H(typeof h.readAsync=="undefined","Module.readAsync option was removed (modify readAsync in JS)"),H(typeof h.readBinary=="undefined","Module.readBinary option was removed (modify readBinary in JS)"),H(typeof h.setWindowTitle=="undefined","Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),H(typeof h.TOTAL_MEMORY=="undefined","Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Be("asm","wasmExports"),Be("read","read_"),Be("readAsync","readAsync"),Be("readBinary","readBinary"),Be("setWindowTitle","setWindowTitle"),H(L||E||k,"Pthreads do not work in this environment yet (need Web Workers, or an alternative to them)"),H(!k,"node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."),H(!I,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable.");var F;h.wasmBinary&&(F=h.wasmBinary),Be("wasmBinary","wasmBinary");var O=h.noExitRuntime||!0;Be("noExitRuntime","noExitRuntime"),typeof WebAssembly!="object"&&Ee("no native wasm support detected");var B,W,q,U=!1,V;function H(e,t){e||Ee("Assertion failed"+(t?": "+t:""))}var G,z,j,K,Q,X,Y,J,Z,ee;function te(){var e=B.buffer;h.HEAP8=G=new Int8Array(e),h.HEAP16=j=new Int16Array(e),h.HEAP32=Q=new Int32Array(e),h.HEAPU8=z=new Uint8Array(e),h.HEAPU16=K=new Uint16Array(e),h.HEAPU32=X=new Uint32Array(e),h.HEAPF32=Y=new Float32Array(e),h.HEAPF64=ee=new Float64Array(e),h.HEAP64=J=new BigInt64Array(e),h.HEAPU64=Z=new BigUint64Array(e)}H(!h.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),H(typeof Int32Array!="undefined"&&typeof Float64Array!="undefined"&&Int32Array.prototype.subarray!=null&&Int32Array.prototype.set!=null,"JS engine does not provide full typed array support");var ne=h.INITIAL_MEMORY||10485760;if(Be("INITIAL_MEMORY","INITIAL_MEMORY"),H(ne>=1048576,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+ne+"! (STACK_SIZE=1048576)"),T)B=h.wasmMemory;else if(h.wasmMemory)B=h.wasmMemory;else if(B=new WebAssembly.Memory({initial:ne/65536,maximum:2147483648/65536,shared:!0}),!(B.buffer instanceof SharedArrayBuffer))throw A("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),k&&A("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");te(),ne=B.buffer.byteLength,H(ne%65536===0);var re;function oe(){var e=Hi();H((e&3)==0),e==0&&(e+=4),_()[e>>2]=34821223,_()[e+4>>2]=2310721022,_()[0]=1668509029}function ae(){if(!U){var e=Hi();e==0&&(e+=4);var t=_()[e>>2],n=_()[e+4>>2];(t!=34821223||n!=2310721022)&&Ee("Stack overflow! Stack cookie has been overwritten at "+en(e)+", expected hex dwords 0x89BACDFE and 0x2135467, but received "+en(n)+" "+en(t)),_()[0]!=1668509029&&Ee("Runtime error: The application has corrupted its heap memory area (address zero)!")}}(function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,t[0]!==115||t[1]!==99)throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"})();var ie=[],le=[],se=[],ue=!1,ce=0;function de(){return O||ce>0}function me(){if(H(!T),h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)fe(h.preRun.shift());rn(ie)}function pe(){H(!ue),ue=!0,!T&&(ae(),!h.noFSInit&&!Kt.init.initialized&&Kt.init(),Kt.ignorePermissions=!1,Nt.init(),rn(le))}function _e(){if(ae(),!T){if(h.postRun)for(typeof h.postRun=="function"&&(h.postRun=[h.postRun]);h.postRun.length;)he(h.postRun.shift());rn(se)}}function fe(e){ie.unshift(e)}function ge(e){le.unshift(e)}function he(e){se.unshift(e)}H(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),H(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),H(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),H(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 ye=0,Ce=null,be=null,ve={};function Se(e){for(var t=e;;){if(!ve[e])return e;e=t+Math.random()}}function Re(e){ye++,h.monitorRunDependencies&&h.monitorRunDependencies(ye),e?(H(!ve[e]),ve[e]=1,Ce===null&&typeof setInterval!="undefined"&&(Ce=setInterval(function(){if(U){clearInterval(Ce),Ce=null;return}var e=!1;for(var t in ve)e||(e=!0,A("still waiting on run dependencies:")),A("dependency: "+t);e&&A("(end of list)")},1e4))):A("warning: run dependency added without ID")}function Le(e){if(ye--,h.monitorRunDependencies&&h.monitorRunDependencies(ye),e?(H(ve[e]),delete ve[e]):A("warning: run dependency removed without ID"),ye==0&&(Ce!==null&&(clearInterval(Ce),Ce=null),be)){var t=be;be=null,t()}}function Ee(e){h.onAbort&&h.onAbort(e),e="Aborted("+e+")",A(e),U=!0,V=1;var t=new WebAssembly.RuntimeError(e);throw C(t),t}var ke="data:application/octet-stream;base64,";function Ie(e){return e.startsWith(ke)}function Te(e){return e.startsWith("file://")}function De(e){return function(){H(ue,"native function `"+e+"` called before runtime initialization");var t=W[e];return H(t,"exported native function `"+e+"` not found"),t.apply(null,arguments)}}var xe=(function(e){function t(){return e.apply(this,arguments)||this}return babelHelpers.inheritsLoose(t,e),t})(babelHelpers.wrapNativeSuper(Error)),$e=(function(e){function t(){return e.apply(this,arguments)||this}return babelHelpers.inheritsLoose(t,e),t})(xe),Pe=(function(e){function t(t){var n;n=e.call(this,t)||this,n.excPtr=t;var r=un(t);return n.name=r[0],n.message=r[1],n}return babelHelpers.inheritsLoose(t,e),t})(xe),Ne=c;function Me(e){if(e==Ne&&F)return new Uint8Array(F);if(N)return N(e);throw"both async and sync fetching of the wasm failed"}function we(e){return!F&&(L||E)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(function(t){if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(function(){return Me(e)}):(u||(u=n("Promise"))).resolve().then(function(){return Me(e)})}function Ae(e,t,n){return we(e).then(function(e){return WebAssembly.instantiate(e,t)}).then(function(e){return e}).then(n,function(e){A("failed to asynchronously prepare wasm: "+e),Te(Ne)&&A("warning: Loading from a file URI ("+Ne+") 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"),Ee(e)})}function Fe(e,t,n,r){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!Ie(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(function(e){var o=WebAssembly.instantiateStreaming(e,n);return o.then(r,function(e){return A("wasm streaming compile failed: "+e),A("falling back to ArrayBuffer instantiation"),Ae(t,n,r)})}):Ae(t,n,r)}function Oe(){var e={env:bi,wasi_snapshot_preview1:bi};function t(e,t){var n=e.exports;return W=n,mn(W._emscripten_tls_init),re=W.__indirect_function_table,H(re,"table not found in wasm exports"),ge(W.__wasm_call_ctors),q=t,Le("wasm-instantiate"),n}Re("wasm-instantiate");var n=h;function r(e){H(h===n,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),n=null,t(e.instance,e.module)}if(h.instantiateWasm)try{return h.instantiateWasm(e,t)}catch(e){A("Module.instantiateWasm callback failed with error: "+e),C(e)}return Fe(F,Ne,e,r).catch(C),{}}function Be(e,t,n){n===void 0&&(n=!0),Object.getOwnPropertyDescriptor(h,e)||Object.defineProperty(h,e,{configurable:!0,get:function(){var r=n?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":"";Ee("`Module."+e+"` has been replaced by `"+t+"`"+r)}})}function We(e){Object.getOwnPropertyDescriptor(h,e)&&Ee("`Module."+e+"` was supplied but `"+e+"` not included in INCOMING_MODULE_JS_API")}function qe(e){return e==="FS_createPath"||e==="FS_createDataFile"||e==="FS_createPreloadedFile"||e==="FS_unlink"||e==="addRunDependency"||e==="FS_createLazyFile"||e==="FS_createDevice"||e==="removeRunDependency"}function Ue(e,t){typeof globalThis!="undefined"&&Object.defineProperty(globalThis,e,{configurable:!0,get:function(){pn("`"+e+"` is not longer defined by emscripten. "+t)}})}Ue("buffer","Please use HEAP8.buffer or wasmMemory.buffer");function Ve(e){typeof globalThis!="undefined"&&!Object.getOwnPropertyDescriptor(globalThis,e)&&Object.defineProperty(globalThis,e,{configurable:!0,get:function(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",n=e;n.startsWith("_")||(n="$"+e),t+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='"+n+"')",qe(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),pn(t)}}),He(e)}function He(e){Object.getOwnPropertyDescriptor(h,e)||Object.defineProperty(h,e,{configurable:!0,get:function(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)";qe(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),Ee(t)}})}function Ge(e){console.warn.apply(console,arguments)}var ze={1333355:function(){return Date.now()},1333378:function(t,n){var e="voip: [WasmTimestampCalibration] backgrounding detected: skew_old="+t.toFixed(1)+"ms, skew_new="+n.toFixed(1)+"ms, delta="+(n-t).toFixed(1)+"ms";self.WhatsAppVoipWasmWorkerCompatibleCallbacks.loggingCallback({level:2,message:e})}};function je(e,t){var n=t?Qt(t):"";self.WhatsAppVoipWasmWorkerCompatibleCallbacks.onCallEvent({eventType:e,userData:"",eventDataJson:n})}function Ke(e){self.__inMLInference=e}function Qe(){var e=Ee;Ee=function(n){if(self.__inMLInference&&h._wasm_throw_ml_abort){h.onAbort&&h.onAbort(n),n="Aborted("+n+")",A(n);var t=Dt(n)+1,r=Zi(),o=tl(t);On(n,o,t),h._wasm_throw_ml_abort(o),el(r);return}e(n)}}function Xe(){var e=self.WhatsAppVoipWasmWorkerCompatibleCallbacks.getPersistentDirectoryPath();if(e){var t=Dt(e)+1,n=Li(t);return On(e,n,t),n}return null}function Ye(e){var t=e?Qt(e):null,n=self.WhatsAppVoipWasmWorkerCompatibleCallbacks.getBweModelPath({versionName:t});if(n){var r=Dt(n)+1,o=Li(r);return On(n,o,r),o}return null}function Je(e,t){if(t==null){var n=new Error("get_random_bytes_js: rawBytesPtr is null");throw n.stack,n}var r=new Uint8Array(e),o=self.crypto.getRandomValues(r);ci(o,t)}function Ze(e){var t=Qt(e);return self.WhatsAppVoipWasmWorkerCompatibleCallbacks.isParticipantKnownContact({jid:t})}function et(e,t,n,r,o,a,i,s,u){var c=l(),d=new Uint8Array(n);d.set(c.subarray(t,t+n));var m=Qt(e);self.WhatsAppVoipWasmWorkerCompatibleCallbacks&&self.WhatsAppVoipWasmWorkerCompatibleCallbacks.onVideoFrameWasmToJs&&self.WhatsAppVoipWasmWorkerCompatibleCallbacks.onVideoFrameWasmToJs({userJid:m,frameBuffer:d.buffer,width:r,height:o,orientation:a,format:i,timestamp:s,isKeyFrame:u})}function tt(e,t,n,r){var o=l(),a=new Uint8Array(r);a.set(o.subarray(n,n+r));var i=Qt(t),s=Qt(e);self.WhatsAppVoipWasmWorkerCompatibleCallbacks.onSignalingXmpp({peerJid:s,callId:i,xmlPayload:a})}function nt(e,t,n,r){var o=l(),a=o.length;if(e<0||e>=a||t<0||e+t>a)return ERROR(s||(s=babelHelpers.taggedTemplateLiteralLoose(["voip: call_sendto: Invalid buffer access - buf: ",", len: ",", heapSize: ",""])),e,t,a),-1;var i=o.subarray(e,e+t);return self.WhatsAppVoipWasmWorkerCompatibleCallbacks.sendDataToRelay({data:i,len:t,ip:Qt(n),port:r})}function rt(e,t,n,r){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.initCaptureDriverJS({sample_rate:e,channels:t,bits_per_sample:n,frames_per_chunk:r})}function ot(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.startCaptureJS()}function at(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.stopCaptureJS()}function it(e,t,n,r){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.initPlaybackDriverJS({sample_rate:e,channels:t,bits_per_sample:n,frames_per_chunk:r})}function lt(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.startPlaybackJS()}function st(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.stopPlaybackJS()}function ut(){return self.WhatsAppVoipWasmWorkerCompatibleCallbacks.getBrowserAudioProcessingStatus()}function ct(e,t,n){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.startDesktopCaptureJS({width:e,height:t,max_fps:n})}function dt(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.stopDesktopCaptureJS()}function mt(e,t,n,r,o){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.startVideoCaptureJS({camera_id:Qt(e),width:t,height:n,max_fps:r,isAVUpgrade:!!o})}function pt(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.stopVideoCaptureJS()}function _t(e,t){var n=t?Qt(t).trim():"";self.WhatsAppVoipWasmWorkerCompatibleCallbacks.loggingCallback({level:e,message:n})}function ft(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}var gt=function(t){t.terminate(),t.removeAllMessageListeners("cmd"),t.addMessageListener("cmd",function(e){var n=e.cmd;A('received "'+n+'" command from terminated worker: '+t.workerID)})};function ht(e){H(!T,"Internal Error! killThread() can only ever be called from main application thread!"),H(e,"Internal Error! Null pthread_ptr in killThread!");var t=nn.pthreads[e];delete nn.pthreads[e],gt(t),Gi(e),nn.runningWorkers.splice(nn.runningWorkers.indexOf(t),1),t.pthread_ptr=0}function yt(e){H(!T,"Internal Error! cancelThread() can only ever be called from main application thread!"),H(e,"Internal Error! Null pthread_ptr in cancelThread!");var t=nn.pthreads[e];t.postMessage({cmd:"cancel",type:"cmd"})}function Ct(e){H(!T,"Internal Error! cleanupThread() can only ever be called from main application thread!"),H(e,"Internal Error! Null pthread_ptr in cleanupThread!");var t=nn.pthreads[e];H(t),nn.returnWorkerToPool(t)}var bt=function(t,n){return l().fill(0,t,t+n),t};function vt(e){H(!T,"Internal Error! spawnThread() can only ever be called from main application thread!"),H(e.pthread_ptr,"Internal error, no pthread ptr!");var t=nn.getNewWorker();if(!t)return 6;H(!t.pthread_ptr,"Internal error!"),nn.runningWorkers.push(t),nn.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var n={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};return t.postMessage(babelHelpers.extends({},n,{type:"cmd"}),e.transferList),0}var St={isAbs:function(t){return t.charAt(0)==="/"},splitPath:function(t){var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return e.exec(t).slice(1)},normalizeArray:function(t,n){for(var e=0,r=t.length-1;r>=0;r--){var o=t[r];o==="."?t.splice(r,1):o===".."?(t.splice(r,1),e++):e&&(t.splice(r,1),e--)}if(n)for(;e;e--)t.unshift("..");return t},normalize:function(t){var e=St.isAbs(t),n=t.substr(-1)==="/";return t=St.normalizeArray(t.split("/").filter(function(e){return!!e}),!e).join("/"),!t&&!e&&(t="."),t&&n&&(t+="/"),(e?"/":"")+t},dirname:function(t){var e=St.splitPath(t),n=e[0],r=e[1];return!n&&!r?".":(r&&(r=r.substr(0,r.length-1)),n+r)},basename:function(t){if(t==="/")return"/";t=St.normalize(t),t=t.replace(/\/$/,"");var e=t.lastIndexOf("/");return e===-1?t:t.substr(e+1)},join:function(){var e=Array.prototype.slice.call(arguments);return St.normalize(e.join("/"))},join2:function(t,n){return St.normalize(t+"/"+n)}},Rt=function(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return function(e){return e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),e};Ee("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: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")},Lt=function(t){return(Lt=Rt())(t)},Et={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:Kt.cwd();if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t=St.isAbs(r)}return e=St.normalizeArray(e.split("/").filter(function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."},relative:function(t,n){t=Et.resolve(t).substr(1),n=Et.resolve(n).substr(1);function e(e){for(var t=0;t<e.length&&e[t]==="";t++);for(var n=e.length-1;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}for(var r=e(t.split("/")),o=e(n.split("/")),a=Math.min(r.length,o.length),i=a,l=0;l<a;l++)if(r[l]!==o[l]){i=l;break}for(var s=[],l=i;l<r.length;l++)s.push("..");return s=s.concat(o.slice(i)),s.join("/")}},kt=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0,It=function(t,n,r){for(var e=n+r,o=n;t[o]&&!(o>=e);)++o;if(o-n>16&&t.buffer&&kt)return kt.decode(t.slice(n,o));for(var a="";n<o;){var i=t[n++];if(!(i&128)){a+=String.fromCharCode(i);continue}var l=t[n++]&63;if((i&224)==192){a+=String.fromCharCode((i&31)<<6|l);continue}var s=t[n++]&63;if((i&240)==224?i=(i&15)<<12|l<<6|s:((i&248)!=240&&pn("Invalid UTF-8 leading byte "+en(i)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),i=(i&7)<<18|l<<12|s<<6|t[n++]&63),i<65536)a+=String.fromCharCode(i);else{var u=i-65536;a+=String.fromCharCode(55296|u>>10,56320|u&1023)}}return a},Tt=[],Dt=function(t){for(var e=0,n=0;n<t.length;++n){var r=t.charCodeAt(n);r<=127?e++:r<=2047?e+=2:r>=55296&&r<=57343?(e+=4,++n):e+=3}return e},xt=function(t,n,r,o){if(H(typeof t=="string"),!(o>0))return 0;for(var e=r,a=r+o-1,i=0;i<t.length;++i){var l=t.charCodeAt(i);if(l>=55296&&l<=57343){var s=t.charCodeAt(++i);l=65536+((l&1023)<<10)|s&1023}if(l<=127){if(r>=a)break;n[r++]=l}else if(l<=2047){if(r+1>=a)break;n[r++]=192|l>>6,n[r++]=128|l&63}else if(l<=65535){if(r+2>=a)break;n[r++]=224|l>>12,n[r++]=128|l>>6&63,n[r++]=128|l&63}else{if(r+3>=a)break;l>1114111&&pn("Invalid Unicode code point "+en(l)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),n[r++]=240|l>>18,n[r++]=128|l>>12&63,n[r++]=128|l>>6&63,n[r++]=128|l&63}}return n[r]=0,r-e};function $t(e,t,n){var r=n>0?n:Dt(e)+1,o=new Array(r),a=xt(e,o,0,o.length);return t&&(o.length=a),o}var Pt=function(){if(!Tt.length){var e=null;if(typeof window!="undefined"&&typeof window.prompt=="function"?(e=window.prompt("Input: "),e!==null&&(e+="\n")):typeof readline=="function"&&(e=readline(),e!==null&&(e+="\n")),!e)return null;Tt=$t(e,!0)}return Tt.shift()},Nt={ttys:[],init:function(){},shutdown:function(){},register:function(t,n){Nt.ttys[t]={input:[],output:[],ops:n},Kt.registerDevice(t,Nt.stream_ops)},stream_ops:{open:function(t){var e=Nt.ttys[t.node.rdev];if(!e)throw new Kt.ErrnoError(43);t.tty=e,t.seekable=!1},close:function(t){t.tty.ops.fsync(t.tty)},fsync:function(t){t.tty.ops.fsync(t.tty)},read:function(t,n,r,o,a){if(!t.tty||!t.tty.ops.get_char)throw new Kt.ErrnoError(60);for(var e=0,i=0;i<o;i++){var l;try{l=t.tty.ops.get_char(t.tty)}catch(e){throw new Kt.ErrnoError(29)}if(l===void 0&&e===0)throw new Kt.ErrnoError(6);if(l==null)break;e++,n[r+i]=l}return e&&(t.node.timestamp=Date.now()),e},write:function(t,n,r,o,a){if(!t.tty||!t.tty.ops.put_char)throw new Kt.ErrnoError(60);try{for(var e=0;e<o;e++)t.tty.ops.put_char(t.tty,n[r+e])}catch(e){throw new Kt.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),e}},default_tty_ops:{get_char:function(t){return Pt()},put_char:function(t,n){n===null||n===10?(w(It(t.output,0)),t.output=[]):n!=0&&t.output.push(n)},fsync:function(t){t.output&&t.output.length>0&&(w(It(t.output,0)),t.output=[])},ioctl_tcgets:function(t){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets:function(t,n,r){return 0},ioctl_tiocgwinsz:function(t){return[24,80]}},default_tty1_ops:{put_char:function(t,n){n===null||n===10?(A(It(t.output,0)),t.output=[]):n!=0&&t.output.push(n)},fsync:function(t){t.output&&t.output.length>0&&(A(It(t.output,0)),t.output=[])}}},Mt=function(t,n){return H(n,"alignment argument is required"),Math.ceil(t/n)*n},wt=function(t){t=Mt(t,65536);var e=Mi(65536,t);return e?bt(e,t):0},At={ops_table:null,mount:function(t){return At.createNode(null,"/",16895,0)},createNode:function(t,n,r,o){if(Kt.isBlkdev(r)||Kt.isFIFO(r))throw new Kt.ErrnoError(63);At.ops_table||(At.ops_table={dir:{node:{getattr:At.node_ops.getattr,setattr:At.node_ops.setattr,lookup:At.node_ops.lookup,mknod:At.node_ops.mknod,rename:At.node_ops.rename,unlink:At.node_ops.unlink,rmdir:At.node_ops.rmdir,readdir:At.node_ops.readdir,symlink:At.node_ops.symlink},stream:{llseek:At.stream_ops.llseek}},file:{node:{getattr:At.node_ops.getattr,setattr:At.node_ops.setattr},stream:{llseek:At.stream_ops.llseek,read:At.stream_ops.read,write:At.stream_ops.write,allocate:At.stream_ops.allocate,mmap:At.stream_ops.mmap,msync:At.stream_ops.msync}},link:{node:{getattr:At.node_ops.getattr,setattr:At.node_ops.setattr,readlink:At.node_ops.readlink},stream:{}},chrdev:{node:{getattr:At.node_ops.getattr,setattr:At.node_ops.setattr},stream:Kt.chrdev_stream_ops}});var e=Kt.createNode(t,n,r,o);return Kt.isDir(e.mode)?(e.node_ops=At.ops_table.dir.node,e.stream_ops=At.ops_table.dir.stream,e.contents={}):Kt.isFile(e.mode)?(e.node_ops=At.ops_table.file.node,e.stream_ops=At.ops_table.file.stream,e.usedBytes=0,e.contents=null):Kt.isLink(e.mode)?(e.node_ops=At.ops_table.link.node,e.stream_ops=At.ops_table.link.stream):Kt.isChrdev(e.mode)&&(e.node_ops=At.ops_table.chrdev.node,e.stream_ops=At.ops_table.chrdev.stream),e.timestamp=Date.now(),t&&(t.contents[n]=e,t.timestamp=e.timestamp),e},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,n){var e=t.contents?t.contents.length:0;if(!(e>=n)){var r=1024*1024;n=Math.max(n,e*(e<r?2:1.125)>>>0),e!=0&&(n=Math.max(n,256));var o=t.contents;t.contents=new Uint8Array(n),t.usedBytes>0&&t.contents.set(o.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,n){if(t.usedBytes!=n)if(n==0)t.contents=null,t.usedBytes=0;else{var e=t.contents;t.contents=new Uint8Array(n),e&&t.contents.set(e.subarray(0,Math.min(n,t.usedBytes))),t.usedBytes=n}},node_ops:{getattr:function(t){var e={};return e.dev=Kt.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,Kt.isDir(t.mode)?e.size=4096:Kt.isFile(t.mode)?e.size=t.usedBytes:Kt.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,n){n.mode!==void 0&&(t.mode=n.mode),n.timestamp!==void 0&&(t.timestamp=n.timestamp),n.size!==void 0&&At.resizeFileStorage(t,n.size)},lookup:function(t,n){throw Kt.genericErrors[44]},mknod:function(t,n,r,o){return At.createNode(t,n,r,o)},rename:function(t,n,r){if(Kt.isDir(t.mode)){var e;try{e=Kt.lookupNode(n,r)}catch(e){}if(e)for(var o in e.contents)throw new Kt.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=r,n.contents[r]=t,n.timestamp=t.parent.timestamp,t.parent=n},unlink:function(t,n){delete t.contents[n],t.timestamp=Date.now()},rmdir:function(t,n){var e=Kt.lookupNode(t,n);for(var r in e.contents)throw new Kt.ErrnoError(55);delete t.contents[n],t.timestamp=Date.now()},readdir:function(t){var e=[".",".."];for(var n in t.contents)Object.prototype.hasOwnProperty.call(t.contents,n)&&e.push(n);return e},symlink:function(t,n,r){var e=At.createNode(t,n,41471,0);return e.link=r,e},readlink:function(t){if(!Kt.isLink(t.mode))throw new Kt.ErrnoError(28);return t.link}},stream_ops:{read:function(t,n,r,o,a){var e=t.node.contents;if(a>=t.node.usedBytes)return 0;var i=Math.min(t.node.usedBytes-a,o);if(H(i>=0),i>8&&e.subarray)n.set(e.subarray(a,a+i),r);else for(var l=0;l<i;l++)n[r+l]=e[a+l];return i},write:function(t,n,r,o,a,l){if(H(!(n instanceof ArrayBuffer)),n.buffer===i().buffer&&(l=!1),!o)return 0;var e=t.node;if(e.timestamp=Date.now(),n.subarray&&(!e.contents||e.contents.subarray)){if(l)return H(a===0,"canOwn must imply no weird position inside the file"),e.contents=n.subarray(r,r+o),e.usedBytes=o,o;if(e.usedBytes===0&&a===0)return e.contents=n.slice(r,r+o),e.usedBytes=o,o;if(a+o<=e.usedBytes)return e.contents.set(n.subarray(r,r+o),a),o}if(At.expandFileStorage(e,a+o),e.contents.subarray&&n.subarray)e.contents.set(n.subarray(r,r+o),a);else for(var s=0;s<o;s++)e.contents[a+s]=n[r+s];return e.usedBytes=Math.max(e.usedBytes,a+o),o},llseek:function(t,n,r){var e=n;if(r===1?e+=t.position:r===2&&Kt.isFile(t.node.mode)&&(e+=t.node.usedBytes),e<0)throw new Kt.ErrnoError(28);return e},allocate:function(t,n,r){At.expandFileStorage(t.node,n+r),t.node.usedBytes=Math.max(t.node.usedBytes,n+r)},mmap:function(t,n,r,o,a){if(!Kt.isFile(t.node.mode))throw new Kt.ErrnoError(43);var e,l,s=t.node.contents;if(!(a&2)&&s.buffer===i().buffer)l=!1,e=s.byteOffset;else{if((r>0||r+n<s.length)&&(s.subarray?s=s.subarray(r,r+n):s=Array.prototype.slice.call(s,r,r+n)),l=!0,e=wt(n),!e)throw new Kt.ErrnoError(48);i().set(s,e)}return{ptr:e,allocated:l}},msync:function(t,n,r,o,a){return At.stream_ops.write(t,n,0,o,r,!1),0}}},Ft=function(t,n,r,o){var e=o?"":Se("al "+t);P(t,function(r){H(r,'Loading data file "'+t+'" failed (no arrayBuffer).'),n(new Uint8Array(r)),e&&Le(e)},function(e){if(r)r();else throw'Loading data file "'+t+'" failed.'}),e&&Re(e)},Ot=h.preloadPlugins||[];function Bt(e,t,n,r){typeof Ra!="undefined"&&Ra.init();var o=!1;return Ot.forEach(function(a){o||a.canHandle(t)&&(a.handle(e,t,n,r),o=!0)}),o}function Wt(e,t,n,r,o,a,i,l,s,u){var c=t?Et.resolve(St.join2(e,t)):e,d=Se("cp "+c);function m(n){function m(n){u&&u(),l||Kt.createDataFile(e,t,n,r,o,s),a&&a(),Le(d)}Bt(n,c,m,function(){i&&i(),Le(d)})||m(n)}Re(d),typeof n=="string"?Ft(n,function(e){return m(e)},i):m(n)}function qt(e){var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},n=t[e];if(typeof n=="undefined")throw new Error("Unknown file open mode: "+e);return n}function Ut(e,t){var n=0;return e&&(n|=365),t&&(n|=146),n}var Vt={dbs:{},indexedDB:(function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t})(function(){if(typeof indexedDB!="undefined")return indexedDB;var e=null;return typeof window=="object"&&(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),H(e,"IDBFS used, but indexedDB not supported"),e}),DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(t){return At.mount.apply(null,arguments)},syncfs:function(t,n,r){Vt.getLocalSet(t,function(e,o){if(e)return r(e);Vt.getRemoteSet(t,function(e,t){if(e)return r(e);var a=n?t:o,i=n?o:t;Vt.reconcile(a,i,r)})})},quit:function(){Object.values(Vt.dbs).forEach(function(e){return e.close()}),Vt.dbs={}},getDB:function(t,n){var e=Vt.dbs[t];if(e)return n(null,e);var r;try{r=Vt.indexedDB().open(t,Vt.DB_VERSION)}catch(e){return n(e)}if(!r)return n("Unable to connect to IndexedDB");r.onupgradeneeded=function(e){var t=e.target.result,n=e.target.transaction,r;t.objectStoreNames.contains(Vt.DB_STORE_NAME)?r=n.objectStore(Vt.DB_STORE_NAME):r=t.createObjectStore(Vt.DB_STORE_NAME),r.indexNames.contains("timestamp")||r.createIndex("timestamp","timestamp",{unique:!1})},r.onsuccess=function(){e=r.result,Vt.dbs[t]=e,n(null,e)},r.onerror=function(e){n(e.target.error),e.preventDefault()}},getLocalSet:function(t,n){var e={};function r(e){return e!=="."&&e!==".."}function o(e){return function(t){return St.join2(e,t)}}for(var a=Kt.readdir(t.mountpoint).filter(r).map(o(t.mountpoint));a.length;){var i=a.pop(),l;try{l=Kt.stat(i)}catch(e){return n(e)}Kt.isDir(l.mode)&&a.push.apply(a,Kt.readdir(i).filter(r).map(o(i))),e[i]={timestamp:l.mtime}}return n(null,{type:"local",entries:e})},getRemoteSet:function(t,n){var e={};Vt.getDB(t.mountpoint,function(t,r){if(t)return n(t);try{var o=r.transaction([Vt.DB_STORE_NAME],"readonly");o.onerror=function(e){n(e.target.error),e.preventDefault()};var a=o.objectStore(Vt.DB_STORE_NAME),i=a.index("timestamp");i.openKeyCursor().onsuccess=function(t){var o=t.target.result;if(!o)return n(null,{type:"remote",db:r,entries:e});e[o.primaryKey]={timestamp:o.key},o.continue()}}catch(e){return n(e)}})},loadLocalEntry:function(t,n){var e,r;try{var o=Kt.lookupPath(t);r=o.node,e=Kt.stat(t)}catch(e){return n(e)}return Kt.isDir(e.mode)?n(null,{timestamp:e.mtime,mode:e.mode}):Kt.isFile(e.mode)?(r.contents=At.getFileDataAsTypedArray(r),n(null,{timestamp:e.mtime,mode:e.mode,contents:r.contents})):n(new Error("node type not supported"))},storeLocalEntry:function(t,n,r){try{if(Kt.isDir(n.mode))Kt.mkdirTree(t,n.mode);else if(Kt.isFile(n.mode))Kt.writeFile(t,n.contents,{canOwn:!0});else return r(new Error("node type not supported"));Kt.chmod(t,n.mode),Kt.utime(t,n.timestamp,n.timestamp)}catch(e){return r(e)}r(null)},removeLocalEntry:function(t,n){try{var e=Kt.stat(t);Kt.isDir(e.mode)?Kt.rmdir(t):Kt.isFile(e.mode)&&Kt.unlink(t)}catch(e){return n(e)}n(null)},loadRemoteEntry:function(t,n,r){var e=t.get(n);e.onsuccess=function(e){r(null,e.target.result)},e.onerror=function(e){r(e.target.error),e.preventDefault()}},storeRemoteEntry:function(t,n,r,o){try{var e=t.put(r,n)}catch(e){o(e);return}e.onsuccess=function(){o(null)},e.onerror=function(e){o(e.target.error),e.preventDefault()}},removeRemoteEntry:function(t,n,r){var e=t.delete(n);e.onsuccess=function(){r(null)},e.onerror=function(e){r(e.target.error),e.preventDefault()}},reconcile:function(t,n,r){var e=0,o=[];Object.keys(t.entries).forEach(function(r){var a=t.entries[r],i=n.entries[r];(!i||a.timestamp.getTime()!=i.timestamp.getTime())&&(o.push(r),e++)});var i=[];if(Object.keys(n.entries).forEach(function(n){t.entries[n]||(i.push(n),e++)}),!e)return r(null);var l=!1,s=t.type==="remote"?t.db:n.db,u=s.transaction([Vt.DB_STORE_NAME],"readwrite"),c=u.objectStore(Vt.DB_STORE_NAME);function d(e){if(e&&!l)return l=!0,r(e)}u.onerror=function(e){d(a.error),e.preventDefault()},u.oncomplete=function(e){l||r(null)},o.sort().forEach(function(e){n.type==="local"?Vt.loadRemoteEntry(c,e,function(t,n){if(t)return d(t);Vt.storeLocalEntry(e,n,d)}):Vt.loadLocalEntry(e,function(t,n){if(t)return d(t);Vt.storeRemoteEntry(c,e,n,d)})}),i.sort().reverse().forEach(function(e){n.type==="local"?Vt.removeLocalEntry(e,d):Vt.removeRemoteEntry(c,e,d)})}},Ht={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},Gt={};function zt(e){return pn("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling"),e}function jt(e){var t=/\b_Z[\w\d_]+/g;return e.replace(t,function(e){var t=zt(e);return e===t?e:t+" ["+e+"]"})}var Kt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(t,n){if(n===void 0&&(n={}),t=Et.resolve(t),!t)return{path:"",node:null};var e={follow_mount:!0,recurse_count:0};if(n=Object.assign(e,n),n.recurse_count>8)throw new Kt.ErrnoError(32);for(var r=t.split("/").filter(function(e){return!!e}),o=Kt.root,a="/",i=0;i<r.length;i++){var l=i===r.length-1;if(l&&n.parent)break;if(o=Kt.lookupNode(o,r[i]),a=St.join2(a,r[i]),Kt.isMountpoint(o)&&(!l||l&&n.follow_mount)&&(o=o.mounted.root),!l||n.follow)for(var s=0;Kt.isLink(o.mode);){var u=Kt.readlink(a);a=Et.resolve(St.dirname(a),u);var c=Kt.lookupPath(a,{recurse_count:n.recurse_count+1});if(o=c.node,s++>40)throw new Kt.ErrnoError(32)}}return{path:a,node:o}},getPath:function(t){for(var e;;){if(Kt.isRoot(t)){var n=t.mount.mountpoint;return e?n[n.length-1]!=="/"?n+"/"+e:n+e:n}e=e?t.name+"/"+e:t.name,t=t.parent}},hashName:function(t,n){for(var e=0,r=0;r<n.length;r++)e=(e<<5)-e+n.charCodeAt(r)|0;return(t+e>>>0)%Kt.nameTable.length},hashAddNode:function(t){var e=Kt.hashName(t.parent.id,t.name);t.name_next=Kt.nameTable[e],Kt.nameTable[e]=t},hashRemoveNode:function(t){var e=Kt.hashName(t.parent.id,t.name);if(Kt.nameTable[e]===t)Kt.nameTable[e]=t.name_next;else for(var n=Kt.nameTable[e];n;){if(n.name_next===t){n.name_next=t.name_next;break}n=n.name_next}},lookupNode:function(t,n){var e=Kt.mayLookup(t);if(e)throw new Kt.ErrnoError(e,t);for(var r=Kt.hashName(t.id,n),o=Kt.nameTable[r];o;o=o.name_next){var a=o.name;if(o.parent.id===t.id&&a===n)return o}return Kt.lookup(t,n)},createNode:function(t,n,r,o){H(typeof t=="object");var e=new Kt.FSNode(t,n,r,o);return Kt.hashAddNode(e),e},destroyNode:function(t){Kt.hashRemoveNode(t)},isRoot:function(t){return t===t.parent},isMountpoint:function(t){return!!t.mounted},isFile:function(t){return(t&61440)===32768},isDir:function(t){return(t&61440)===16384},isLink:function(t){return(t&61440)===40960},isChrdev:function(t){return(t&61440)===8192},isBlkdev:function(t){return(t&61440)===24576},isFIFO:function(t){return(t&61440)===4096},isSocket:function(t){return(t&49152)===49152},flagsToPermissionString:function(t){var e=["r","w","rw"][t&3];return t&512&&(e+="w"),e},nodePermissions:function(t,n){return Kt.ignorePermissions?0:n.includes("r")&&!(t.mode&292)||n.includes("w")&&!(t.mode&146)||n.includes("x")&&!(t.mode&73)?2:0},mayLookup:function(t){var e=Kt.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate:function(t,n){try{var e=Kt.lookupNode(t,n);return 20}catch(e){}return Kt.nodePermissions(t,"wx")},mayDelete:function(t,n,r){var e;try{e=Kt.lookupNode(t,n)}catch(e){return e.errno}var o=Kt.nodePermissions(t,"wx");if(o)return o;if(r){if(!Kt.isDir(e.mode))return 54;if(Kt.isRoot(e)||Kt.getPath(e)===Kt.cwd())return 10}else if(Kt.isDir(e.mode))return 31;return 0},mayOpen:function(t,n){return t?Kt.isLink(t.mode)?32:Kt.isDir(t.mode)&&(Kt.flagsToPermissionString(n)!=="r"||n&512)?31:Kt.nodePermissions(t,Kt.flagsToPermissionString(n)):44},MAX_OPEN_FDS:4096,nextfd:function(){for(var e=0;e<=Kt.MAX_OPEN_FDS;e++)if(!Kt.streams[e])return e;throw new Kt.ErrnoError(33)},getStreamChecked:function(t){var e=Kt.getStream(t);if(!e)throw new Kt.ErrnoError(8);return e},getStream:function(t){return Kt.streams[t]},createStream:function(t,n){return n===void 0&&(n=-1),Kt.FSStream||(Kt.FSStream=function(){this.shared={}},Kt.FSStream.prototype={},Object.defineProperties(Kt.FSStream.prototype,{object:{get:function(){return this.node},set:function(t){this.node=t}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(t){this.shared.flags=t}},position:{get:function(){return this.shared.position},set:function(t){this.shared.position=t}}})),t=Object.assign(new Kt.FSStream,t),n==-1&&(n=Kt.nextfd()),t.fd=n,Kt.streams[n]=t,t},closeStream:function(t){Kt.streams[t]=null},chrdev_stream_ops:{open:function(t){var e=Kt.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:function(){throw new Kt.ErrnoError(70)}},major:function(t){return t>>8},minor:function(t){return t&255},makedev:function(t,n){return t<<8|n},registerDevice:function(t,n){Kt.devices[t]={stream_ops:n}},getDevice:function(t){return Kt.devices[t]},getMounts:function(t){for(var e=[],n=[t];n.length;){var r=n.pop();e.push(r),n.push.apply(n,r.mounts)}return e},syncfs:function(t,n){typeof t=="function"&&(n=t,t=!1),Kt.syncFSRequests++,Kt.syncFSRequests>1&&A("warning: "+Kt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=Kt.getMounts(Kt.root.mount),r=0;function o(e){return H(Kt.syncFSRequests>0),Kt.syncFSRequests--,n(e)}function a(t){if(t)return a.errored?void 0:(a.errored=!0,o(t));++r>=e.length&&o(null)}e.forEach(function(e){if(!e.type.syncfs)return a(null);e.type.syncfs(e,t,a)})},mount:function(t,n,r){if(typeof t=="string")throw t;var e=r==="/",o=!r,a;if(e&&Kt.root)throw new Kt.ErrnoError(10);if(!e&&!o){var i=Kt.lookupPath(r,{follow_mount:!1});if(r=i.path,a=i.node,Kt.isMountpoint(a))throw new Kt.ErrnoError(10);if(!Kt.isDir(a.mode))throw new Kt.ErrnoError(54)}var l={type:t,opts:n,mountpoint:r,mounts:[]},s=t.mount(l);return s.mount=l,l.root=s,e?Kt.root=s:a&&(a.mounted=l,a.mount&&a.mount.mounts.push(l)),s},unmount:function(t){var e=Kt.lookupPath(t,{follow_mount:!1});if(!Kt.isMountpoint(e.node))throw new Kt.ErrnoError(28);var n=e.node,r=n.mounted,o=Kt.getMounts(r);Object.keys(Kt.nameTable).forEach(function(e){for(var t=Kt.nameTable[e];t;){var n=t.name_next;o.includes(t.mount)&&Kt.destroyNode(t),t=n}}),n.mounted=null;var a=n.mount.mounts.indexOf(r);H(a!==-1),n.mount.mounts.splice(a,1)},lookup:function(t,n){return t.node_ops.lookup(t,n)},mknod:function(t,n,r){var e=Kt.lookupPath(t,{parent:!0}),o=e.node,a=St.basename(t);if(!a||a==="."||a==="..")throw new Kt.ErrnoError(28);var i=Kt.mayCreate(o,a);if(i)throw new Kt.ErrnoError(i);if(!o.node_ops.mknod)throw new Kt.ErrnoError(63);return o.node_ops.mknod(o,a,n,r)},create:function(t,n){return n=n!==void 0?n:438,n&=4095,n|=32768,Kt.mknod(t,n,0)},mkdir:function(t,n){return n=n!==void 0?n:511,n&=1023,n|=16384,Kt.mknod(t,n,0)},mkdirTree:function(t,n){for(var e=t.split("/"),r="",o=0;o<e.length;++o)if(e[o]){r+="/"+e[o];try{Kt.mkdir(r,n)}catch(e){if(e.errno!=20)throw e}}},mkdev:function(t,n,r){return typeof r=="undefined"&&(r=n,n=438),n|=8192,Kt.mknod(t,n,r)},symlink:function(t,n){if(!Et.resolve(t))throw new Kt.ErrnoError(44);var e=Kt.lookupPath(n,{parent:!0}),r=e.node;if(!r)throw new Kt.ErrnoError(44);var o=St.basename(n),a=Kt.mayCreate(r,o);if(a)throw new Kt.ErrnoError(a);if(!r.node_ops.symlink)throw new Kt.ErrnoError(63);return r.node_ops.symlink(r,o,t)},rename:function(t,n){var e=St.dirname(t),r=St.dirname(n),o=St.basename(t),a=St.basename(n),i,l,s;if(i=Kt.lookupPath(t,{parent:!0}),l=i.node,i=Kt.lookupPath(n,{parent:!0}),s=i.node,!l||!s)throw new Kt.ErrnoError(44);if(l.mount!==s.mount)throw new Kt.ErrnoError(75);var u=Kt.lookupNode(l,o),c=Et.relative(t,r);if(c.charAt(0)!==".")throw new Kt.ErrnoError(28);if(c=Et.relative(n,e),c.charAt(0)!==".")throw new Kt.ErrnoError(55);var d;try{d=Kt.lookupNode(s,a)}catch(e){}if(u!==d){var m=Kt.isDir(u.mode),p=Kt.mayDelete(l,o,m);if(p)throw new Kt.ErrnoError(p);if(p=d?Kt.mayDelete(s,a,m):Kt.mayCreate(s,a),p)throw new Kt.ErrnoError(p);if(!l.node_ops.rename)throw new Kt.ErrnoError(63);if(Kt.isMountpoint(u)||d&&Kt.isMountpoint(d))throw new Kt.ErrnoError(10);if(s!==l&&(p=Kt.nodePermissions(l,"w"),p))throw new Kt.ErrnoError(p);Kt.hashRemoveNode(u);try{l.node_ops.rename(u,s,a)}catch(e){throw e}finally{Kt.hashAddNode(u)}}},rmdir:function(t){var e=Kt.lookupPath(t,{parent:!0}),n=e.node,r=St.basename(t),o=Kt.lookupNode(n,r),a=Kt.mayDelete(n,r,!0);if(a)throw new Kt.ErrnoError(a);if(!n.node_ops.rmdir)throw new Kt.ErrnoError(63);if(Kt.isMountpoint(o))throw new Kt.ErrnoError(10);n.node_ops.rmdir(n,r),Kt.destroyNode(o)},readdir:function(t){var e=Kt.lookupPath(t,{follow:!0}),n=e.node;if(!n.node_ops.readdir)throw new Kt.ErrnoError(54);return n.node_ops.readdir(n)},unlink:function(t){var e=Kt.lookupPath(t,{parent:!0}),n=e.node;if(!n)throw new Kt.ErrnoError(44);var r=St.basename(t),o=Kt.lookupNode(n,r),a=Kt.mayDelete(n,r,!1);if(a)throw new Kt.ErrnoError(a);if(!n.node_ops.unlink)throw new Kt.ErrnoError(63);if(Kt.isMountpoint(o))throw new Kt.ErrnoError(10);n.node_ops.unlink(n,r),Kt.destroyNode(o)},readlink:function(t){var e=Kt.lookupPath(t),n=e.node;if(!n)throw new Kt.ErrnoError(44);if(!n.node_ops.readlink)throw new Kt.ErrnoError(28);return Et.resolve(Kt.getPath(n.parent),n.node_ops.readlink(n))},stat:function(t,n){var e=Kt.lookupPath(t,{follow:!n}),r=e.node;if(!r)throw new Kt.ErrnoError(44);if(!r.node_ops.getattr)throw new Kt.ErrnoError(63);return r.node_ops.getattr(r)},lstat:function(t){return Kt.stat(t,!0)},chmod:function(t,n,r){var e;if(typeof t=="string"){var o=Kt.lookupPath(t,{follow:!r});e=o.node}else e=t;if(!e.node_ops.setattr)throw new Kt.ErrnoError(63);e.node_ops.setattr(e,{mode:n&4095|e.mode&-4096,timestamp:Date.now()})},lchmod:function(t,n){Kt.chmod(t,n,!0)},fchmod:function(t,n){var e=Kt.getStreamChecked(t);Kt.chmod(e.node,n)},chown:function(t,n,r,o){var e;if(typeof t=="string"){var a=Kt.lookupPath(t,{follow:!o});e=a.node}else e=t;if(!e.node_ops.setattr)throw new Kt.ErrnoError(63);e.node_ops.setattr(e,{timestamp:Date.now()})},lchown:function(t,n,r){Kt.chown(t,n,r,!0)},fchown:function(t,n,r){var e=Kt.getStreamChecked(t);Kt.chown(e.node,n,r)},truncate:function(t,n){if(n<0)throw new Kt.ErrnoError(28);var e;if(typeof t=="string"){var r=Kt.lookupPath(t,{follow:!0});e=r.node}else e=t;if(!e.node_ops.setattr)throw new Kt.ErrnoError(63);if(Kt.isDir(e.mode))throw new Kt.ErrnoError(31);if(!Kt.isFile(e.mode))throw new Kt.ErrnoError(28);var o=Kt.nodePermissions(e,"w");if(o)throw new Kt.ErrnoError(o);e.node_ops.setattr(e,{size:n,timestamp:Date.now()})},ftruncate:function(t,n){var e=Kt.getStreamChecked(t);if((e.flags&2097155)===0)throw new Kt.ErrnoError(28);Kt.truncate(e.node,n)},utime:function(t,n,r){var e=Kt.lookupPath(t,{follow:!0}),o=e.node;o.node_ops.setattr(o,{timestamp:Math.max(n,r)})},open:function(t,n,r){if(t==="")throw new Kt.ErrnoError(44);n=typeof n=="string"?qt(n):n,r=typeof r=="undefined"?438:r,n&64?r=r&4095|32768:r=0;var e;if(typeof t=="object")e=t;else{t=St.normalize(t);try{var o=Kt.lookupPath(t,{follow:!(n&131072)});e=o.node}catch(e){}}var a=!1;if(n&64)if(e){if(n&128)throw new Kt.ErrnoError(20)}else e=Kt.mknod(t,r,0),a=!0;if(!e)throw new Kt.ErrnoError(44);if(Kt.isChrdev(e.mode)&&(n&=-513),n&65536&&!Kt.isDir(e.mode))throw new Kt.ErrnoError(54);if(!a){var i=Kt.mayOpen(e,n);if(i)throw new Kt.ErrnoError(i)}n&512&&!a&&Kt.truncate(e,0),n&=-131713;var l=Kt.createStream({node:e,path:Kt.getPath(e),flags:n,seekable:!0,position:0,stream_ops:e.stream_ops,ungotten:[],error:!1});return l.stream_ops.open&&l.stream_ops.open(l),h.logReadFiles&&!(n&1)&&(Kt.readFiles||(Kt.readFiles={}),t in Kt.readFiles||(Kt.readFiles[t]=1)),l},close:function(t){if(Kt.isClosed(t))throw new Kt.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(e){throw e}finally{Kt.closeStream(t.fd)}t.fd=null},isClosed:function(t){return t.fd===null},llseek:function(t,n,r){if(Kt.isClosed(t))throw new Kt.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new Kt.ErrnoError(70);if(r!=0&&r!=1&&r!=2)throw new Kt.ErrnoError(28);return t.position=t.stream_ops.llseek(t,n,r),t.ungotten=[],t.position},read:function(t,n,r,o,a){if(H(r>=0),o<0||a<0)throw new Kt.ErrnoError(28);if(Kt.isClosed(t))throw new Kt.ErrnoError(8);if((t.flags&2097155)===1)throw new Kt.ErrnoError(8);if(Kt.isDir(t.node.mode))throw new Kt.ErrnoError(31);if(!t.stream_ops.read)throw new Kt.ErrnoError(28);var e=typeof a!="undefined";if(!e)a=t.position;else if(!t.seekable)throw new Kt.ErrnoError(70);var i=t.stream_ops.read(t,n,r,o,a);return e||(t.position+=i),i},write:function(t,n,r,o,a,i){if(H(r>=0),o<0||a<0)throw new Kt.ErrnoError(28);if(Kt.isClosed(t))throw new Kt.ErrnoError(8);if((t.flags&2097155)===0)throw new Kt.ErrnoError(8);if(Kt.isDir(t.node.mode))throw new Kt.ErrnoError(31);if(!t.stream_ops.write)throw new Kt.ErrnoError(28);t.seekable&&t.flags&1024&&Kt.llseek(t,0,2);var e=typeof a!="undefined";if(!e)a=t.position;else if(!t.seekable)throw new Kt.ErrnoError(70);var l=t.stream_ops.write(t,n,r,o,a,i);return e||(t.position+=l),l},allocate:function(t,n,r){if(Kt.isClosed(t))throw new Kt.ErrnoError(8);if(n<0||r<=0)throw new Kt.ErrnoError(28);if((t.flags&2097155)===0)throw new Kt.ErrnoError(8);if(!Kt.isFile(t.node.mode)&&!Kt.isDir(t.node.mode))throw new Kt.ErrnoError(43);if(!t.stream_ops.allocate)throw new Kt.ErrnoError(138);t.stream_ops.allocate(t,n,r)},mmap:function(t,n,r,o,a){if((o&2)!==0&&(a&2)===0&&(t.flags&2097155)!==2)throw new Kt.ErrnoError(2);if((t.flags&2097155)===1)throw new Kt.ErrnoError(2);if(!t.stream_ops.mmap)throw new Kt.ErrnoError(43);return t.stream_ops.mmap(t,n,r,o,a)},msync:function(t,n,r,o,a){return H(r>=0),t.stream_ops.msync?t.stream_ops.msync(t,n,r,o,a):0},munmap:function(t){return 0},ioctl:function(t,n,r){if(!t.stream_ops.ioctl)throw new Kt.ErrnoError(59);return t.stream_ops.ioctl(t,n,r)},readFile:function(t,n){if(n===void 0&&(n={}),n.flags=n.flags||0,n.encoding=n.encoding||"binary",n.encoding!=="utf8"&&n.encoding!=="binary")throw new Error('Invalid encoding type "'+n.encoding+'"');var e,r=Kt.open(t,n.flags),o=Kt.stat(t),a=o.size,i=new Uint8Array(a);return Kt.read(r,i,0,a,0),n.encoding==="utf8"?e=It(i,0):n.encoding==="binary"&&(e=i),Kt.close(r),e},writeFile:function(t,n,r){r===void 0&&(r={}),r.flags=r.flags||577;var e=Kt.open(t,r.flags,r.mode);if(typeof n=="string"){var o=new Uint8Array(Dt(n)+1),a=xt(n,o,0,o.length);Kt.write(e,o,0,a,void 0,r.canOwn)}else if(ArrayBuffer.isView(n))Kt.write(e,n,0,n.byteLength,void 0,r.canOwn);else throw new Error("Unsupported data type");Kt.close(e)},cwd:function(){return Kt.currentPath},chdir:function(t){var e=Kt.lookupPath(t,{follow:!0});if(e.node===null)throw new Kt.ErrnoError(44);if(!Kt.isDir(e.node.mode))throw new Kt.ErrnoError(54);var n=Kt.nodePermissions(e.node,"x");if(n)throw new Kt.ErrnoError(n);Kt.currentPath=e.path},createDefaultDirectories:function(){Kt.mkdir("/tmp"),Kt.mkdir("/home"),Kt.mkdir("/home/web_user")},createDefaultDevices:function(){Kt.mkdir("/dev"),Kt.registerDevice(Kt.makedev(1,3),{read:function(){return 0},write:function(t,n,r,o,a){return o}}),Kt.mkdev("/dev/null",Kt.makedev(1,3)),Nt.register(Kt.makedev(5,0),Nt.default_tty_ops),Nt.register(Kt.makedev(6,0),Nt.default_tty1_ops),Kt.mkdev("/dev/tty",Kt.makedev(5,0)),Kt.mkdev("/dev/tty1",Kt.makedev(6,0));var e=new Uint8Array(1024),t=0,n=function(){return t===0&&(t=Lt(e).byteLength),e[--t]};Kt.createDevice("/dev","random",n),Kt.createDevice("/dev","urandom",n),Kt.mkdir("/dev/shm"),Kt.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){Kt.mkdir("/proc");var e=Kt.mkdir("/proc/self");Kt.mkdir("/proc/self/fd"),Kt.mount({mount:function(){var t=Kt.createNode(e,"fd",16895,73);return t.node_ops={lookup:function(t,n){var e=+n,r=Kt.getStreamChecked(e),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return r.path}}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:function(){h.stdin?Kt.createDevice("/dev","stdin",h.stdin):Kt.symlink("/dev/tty","/dev/stdin"),h.stdout?Kt.createDevice("/dev","stdout",null,h.stdout):Kt.symlink("/dev/tty","/dev/stdout"),h.stderr?Kt.createDevice("/dev","stderr",null,h.stderr):Kt.symlink("/dev/tty1","/dev/stderr");var e=Kt.open("/dev/stdin",0),t=Kt.open("/dev/stdout",1),n=Kt.open("/dev/stderr",1);H(e.fd===0,"invalid handle for stdin ("+e.fd+")"),H(t.fd===1,"invalid handle for stdout ("+t.fd+")"),H(n.fd===2,"invalid handle for stderr ("+n.fd+")")},ensureErrnoError:function(){Kt.ErrnoError||(Kt.ErrnoError=function(t,n){this.name="ErrnoError",this.node=n,this.setErrno=function(e){this.errno=e;for(var t in Gt)if(Gt[t]===e){this.code=t;break}},this.setErrno(t),this.message=Ht[t],this.stack&&(Object.defineProperty(this,"stack",{value:new Error().stack,writable:!0}),this.stack=jt(this.stack))},Kt.ErrnoError.prototype=new Error,Kt.ErrnoError.prototype.constructor=Kt.ErrnoError,[44].forEach(function(e){Kt.genericErrors[e]=new Kt.ErrnoError(e),Kt.genericErrors[e].stack="<generic error, no stack>"}))},staticInit:function(){Kt.ensureErrnoError(),Kt.nameTable=new Array(4096),Kt.mount(At,{},"/"),Kt.createDefaultDirectories(),Kt.createDefaultDevices(),Kt.createSpecialDirectories(),Kt.filesystems={MEMFS:At,IDBFS:Vt}},init:function(t,n,r){H(!Kt.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)"),Kt.init.initialized=!0,Kt.ensureErrnoError(),h.stdin=t||h.stdin,h.stdout=n||h.stdout,h.stderr=r||h.stderr,Kt.createStandardStreams()},quit:function(){Kt.init.initialized=!1,Ii(0);for(var e=0;e<Kt.streams.length;e++){var t=Kt.streams[e];t&&Kt.close(t)}},findObject:function(t,n){var e=Kt.analyzePath(t,n);return e.exists?e.object:null},analyzePath:function(t,n){try{var e=Kt.lookupPath(t,{follow:!n});t=e.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 e=Kt.lookupPath(t,{parent:!0});r.parentExists=!0,r.parentPath=e.path,r.parentObject=e.node,r.name=St.basename(t),e=Kt.lookupPath(t,{follow:!n}),r.exists=!0,r.path=e.path,r.object=e.node,r.name=e.node.name,r.isRoot=e.path==="/"}catch(e){r.error=e.errno}return r},createPath:function(t,n,r,o){t=typeof t=="string"?t:Kt.getPath(t);for(var e=n.split("/").reverse();e.length;){var a=e.pop();if(a){var i=St.join2(t,a);try{Kt.mkdir(i)}catch(e){}t=i}}return i},createFile:function(t,n,r,o,a){var e=St.join2(typeof t=="string"?t:Kt.getPath(t),n),i=Ut(o,a);return Kt.create(e,i)},createDataFile:function(t,n,r,o,a,i){var e=n;t&&(t=typeof t=="string"?t:Kt.getPath(t),e=n?St.join2(t,n):t);var l=Ut(o,a),s=Kt.create(e,l);if(r){if(typeof r=="string"){for(var u=new Array(r.length),c=0,d=r.length;c<d;++c)u[c]=r.charCodeAt(c);r=u}Kt.chmod(s,l|146);var m=Kt.open(s,577);Kt.write(m,r,0,r.length,0,i),Kt.close(m),Kt.chmod(s,l)}return s},createDevice:function(t,n,r,o){var e=St.join2(typeof t=="string"?t:Kt.getPath(t),n),a=Ut(!!r,!!o);Kt.createDevice.major||(Kt.createDevice.major=64);var i=Kt.makedev(Kt.createDevice.major++,0);return Kt.registerDevice(i,{open:function(t){t.seekable=!1},close:function(t){o&&o.buffer&&o.buffer.length&&o(10)},read:function(t,n,o,a,i){for(var e=0,l=0;l<a;l++){var s;try{s=r()}catch(e){throw new Kt.ErrnoError(29)}if(s===void 0&&e===0)throw new Kt.ErrnoError(6);if(s==null)break;e++,n[o+l]=s}return e&&(t.node.timestamp=Date.now()),e},write:function(t,n,r,a,i){for(var e=0;e<a;e++)try{o(n[r+e])}catch(e){throw new Kt.ErrnoError(29)}return a&&(t.node.timestamp=Date.now()),e}}),Kt.mkdev(e,a,i)},forceLoadFile:function(t){if(t.isDevice||t.isFolder||t.link||t.contents)return!0;if(typeof XMLHttpRequest!="undefined")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($)try{t.contents=$t($(t.url),!0),t.usedBytes=t.contents.length}catch(e){throw new Kt.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:function(t,n,r,o,a){function e(){this.lengthKnown=!1,this.chunks=[]}if(e.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,n=t/this.chunkSize|0;return this.getter(n)[e]}},e.prototype.setDataGetter=function(t){this.getter=t},e.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||e.status===304))throw new Error("Couldn't load "+r+". Status: "+e.status);var t=Number(e.getResponseHeader("Content-length")),n,o=(n=e.getResponseHeader("Accept-Ranges"))&&n==="bytes",a=(n=e.getResponseHeader("Content-Encoding"))&&n==="gzip",i=1024*1024;o||(i=t);var l=function(n,o){if(n>o)throw new Error("invalid range ("+n+", "+o+") or no bytes requested!");if(o>t-1)throw new Error("only "+t+" bytes available! programmer error!");var e=new XMLHttpRequest;if(e.open("GET",r,!1),t!==i&&e.setRequestHeader("Range","bytes="+n+"-"+o),e.responseType="arraybuffer",e.overrideMimeType&&e.overrideMimeType("text/plain; charset=x-user-defined"),e.send(null),!(e.status>=200&&e.status<300||e.status===304))throw new Error("Couldn't load "+r+". Status: "+e.status);return e.response!==void 0?new Uint8Array(e.response||[]):$t(e.responseText||"",!0)},s=this;s.setDataGetter(function(e){var n=e*i,r=(e+1)*i-1;if(r=Math.min(r,t-1),typeof s.chunks[e]=="undefined"&&(s.chunks[e]=l(n,r)),typeof s.chunks[e]=="undefined")throw new Error("doXHR failed!");return s.chunks[e]}),(a||!t)&&(i=t=1,t=this.getter(0).length,i=t,w("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=t,this._chunkSize=i,this.lengthKnown=!0},typeof XMLHttpRequest!="undefined"){if(!E)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var l=new e;Object.defineProperties(l,{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:l}}else var s={isDevice:!1,url:r};var u=Kt.createFile(t,n,s,o,a);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={},d=Object.keys(u.stream_ops);d.forEach(function(e){var t=u.stream_ops[e];c[e]=function(){return Kt.forceLoadFile(u),t.apply(null,arguments)}});function m(e,t,n,r,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,r);if(H(i>=0),a.slice)for(var l=0;l<i;l++)t[n+l]=a[o+l];else for(var l=0;l<i;l++)t[n+l]=a.get(o+l);return i}return c.read=function(e,t,n,r,o){return Kt.forceLoadFile(u),m(e,t,n,r,o)},c.mmap=function(e,t,n,r,o){Kt.forceLoadFile(u);var a=wt(t);if(!a)throw new Kt.ErrnoError(48);return m(e,i(),a,t,n),{ptr:a,allocated:!0}},u.stream_ops=c,u},absolutePath:function(){Ee("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:function(){Ee("FS.createFolder has been removed; use FS.mkdir instead")},createLink:function(){Ee("FS.createLink has been removed; use FS.symlink instead")},joinPath:function(){Ee("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:function(){Ee("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:function(){Ee("FS.standardizePath has been removed; use PATH.normalize instead")}},Qt=function(t,n){return H(typeof t=="number"),t?It(l(),t,n):""},Xt={DEFAULT_POLLMASK:5,calculateAt:function(t,n,r){if(St.isAbs(n))return n;var e;if(t===-100)e=Kt.cwd();else{var o=Xt.getStreamFromFD(t);e=o.path}if(n.length==0){if(!r)throw new Kt.ErrnoError(44);return e}return St.join2(e,n)},doStat:function(t,n,r){try{var e=t(n)}catch(e){if(e&&e.node&&St.normalize(n)!==St.normalize(Kt.getPath(e.node)))return-54;throw e}p()[r>>2]=e.dev,p()[r+4>>2]=e.mode,_()[r+8>>2]=e.nlink,p()[r+12>>2]=e.uid,p()[r+16>>2]=e.gid,p()[r+20>>2]=e.rdev,J[r+24>>3]=BigInt(e.size),p()[r+32>>2]=4096,p()[r+36>>2]=e.blocks;var o=e.atime.getTime(),a=e.mtime.getTime(),i=e.ctime.getTime();return J[r+40>>3]=BigInt(Math.floor(o/1e3)),_()[r+48>>2]=o%1e3*1e3,J[r+56>>3]=BigInt(Math.floor(a/1e3)),_()[r+64>>2]=a%1e3*1e3,J[r+72>>3]=BigInt(Math.floor(i/1e3)),_()[r+80>>2]=i%1e3*1e3,J[r+88>>3]=BigInt(e.ino),0},doMsync:function(t,n,r,o,a){if(!Kt.isFile(n.node.mode))throw new Kt.ErrnoError(43);if(o&2)return 0;var e=l().slice(t,t+r);Kt.msync(n,e,a,r,o)},varargs:void 0,get:function(){H(Xt.varargs!=null),Xt.varargs+=4;var e=p()[Xt.varargs-4>>2];return e},getStr:function(t){var e=Qt(t);return e},getStreamFromFD:function(t){var e=Kt.getStreamChecked(t);return e}};function Yt(e){if(T)return Pa(1,1,e);V=e,de()||(nn.terminateAllThreads(),h.onExit&&h.onExit(e),U=!0),R(e,new ft(e))}var Jt=function(t,n){if(V=t,wu(),T)throw H(!n),an(t),"unwind";if(de()&&!n){var e="program exited (with status: "+t+"), but keepRuntimeAlive() is set (counter="+ce+") due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)";C(e),A(e)}Yt(t)},Zt=Jt,en=function(t){return H(typeof t=="number"),t>>>=0,"0x"+t.toString(16).padStart(8,"0")},tn=function(t){if(t instanceof ft||t=="unwind")return V;ae(),t instanceof WebAssembly.RuntimeError&&nl()<=0&&A("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 1048576)"),R(1,t)},nn={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},nextWorkerID:1,debugInit:function(){function e(){var e=0;return ue&&typeof Pi!="undefined"&&(e=Pi()),"w:"+(h.workerID||0)+",t:"+en(e)+": "}var t=Ge;Ge=function(r){return t(e()+r)}},init:function(){nn.debugInit(),T?nn.initWorker():nn.initMainThread()},initMainThread:function(){for(var e=typeof h.pthreadPoolSizeOverride=="number"?h.pthreadPoolSizeOverride:20;e--;)nn.allocateUnusedWorker();fe(function(){Re("loading-workers");var e=15e3,t=!1,n=function(o){if(!t){t=!0,clearTimeout(r);var n=0;try{if(o){var a=[],i=[];for(var l of nn.unusedWorkers)l.loaded?a.push(l):i.push(l);for(var l of i)try{gt(l)}catch(e){A("voip: ThreadPoolManager: failed to terminate timed-out pthread worker "+l.workerID+": "+e)}n=i.length,nn.unusedWorkers=a,A("voip: ThreadPoolManager: pthread worker prewarm timed out after "+e+"ms; continuing with "+a.length+" ready workers")}}finally{Le("loading-workers")}}},r=setTimeout(function(){return n(!0)},e);nn.loadWasmModuleToAllWorkers(function(){return n(!1)})})},initWorker:function(){O=!1},setExitStatus:function(t){V=t},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:function(){H(!T,"Internal Error! terminateAllThreads() can only ever be called from main application thread!");for(var e of nn.runningWorkers)gt(e);for(var e of nn.unusedWorkers)gt(e);nn.unusedWorkers=[],nn.runningWorkers=[],nn.pthreads=[]},returnWorkerToPool:function(t){var e=t.pthread_ptr;delete nn.pthreads[e],nn.unusedWorkers.push(t),nn.runningWorkers.splice(nn.runningWorkers.indexOf(t),1),t.pthread_ptr=0,Gi(e)},receiveObjectTransfer:function(t){},threadInitTLS:function(){nn.tlsInitFunctions.forEach(function(e){return e()})},loadWasmModuleToWorker:function(o){return new(u||(u=n("Promise")))(function(n){o.addMessageListener("cmd",function(e){var t=e,r=t.cmd;if(t.targetThread&&t.targetThread!=Pi()){var a=nn.pthreads[t.targetThread];a?a.postMessage(babelHelpers.extends({},t,{type:"cmd"}),t.transferList):A('Internal error! Worker sent a message "'+r+'" to target pthread '+t.targetThread+", but that thread no longer exists!");return}r==="checkMailbox"?Vo():r==="spawnThread"?vt(t):r==="cleanupThread"?Ct(t.thread):r==="killThread"?ht(t.thread):r==="cancelThread"?yt(t.thread):r==="loaded"?(o.loaded=!0,n(o)):r==="alert"?alert("Thread "+t.threadId+": "+t.text):t.target==="setimmediate"?o.postMessage(babelHelpers.extends({},t,{type:"cmd"})):r==="callHandler"?h[t.handler].apply(h,t.args):r&&A("worker sent an unknown command "+r)}),o.addMessageListener("waWasmWorkerCompatibleCallback",function(t){var n=t.type,r=t.__name,o=babelHelpers.objectWithoutPropertiesLoose(t,e);a.WhatsAppVoipWasmWorkerCompatibleCallbacks[r](o)}),o.onerror=function(e){var t="worker sent an error!";throw o.pthread_ptr&&(t="Pthread "+en(o.pthread_ptr)+" sent an error!"),A(t+" "+e.filename+":"+e.lineno+": "+e.message),e},H(B instanceof WebAssembly.Memory,"WebAssembly memory should have been loaded by now!"),H(q instanceof WebAssembly.Module,"WebAssembly Module should have been loaded by now!");var r=[],i=["onExit","onAbort","print","printErr"];for(var l of i)Object.prototype.hasOwnProperty.call(h,l)&&r.push(l);o.workerID=nn.nextWorkerID++,o.postMessage({cmd:"load",handlers:r,urlOrBlob:h.mainScriptUrlOrBlob||t,wasmMemory:B,wasmModule:q,workerID:o.workerID,wasmVariant:"prod-labvideo",type:"cmd"})})},loadWasmModuleToAllWorkers:function(t){if(T)return t();var e=(u||(u=n("Promise"))).all(nn.unusedWorkers.map(nn.loadWasmModuleToWorker));e.then(t)},allocateUnusedWorker:function(){var e,t=o("WorkerBundleResource").createDedicatedWebWorker(WAWebVoipWebWasmWorkerResource);e=new(o("WorkerMessagePort")).WorkerMessagePort(t,"WAWebVoipWebWasmWorker"),o("WorkerClient").init(e),nn.unusedWorkers.push(e)},getNewWorker:function(){return nn.unusedWorkers.length==0&&(A("Tried to spawn a new thread, but the thread pool is exhausted.\nThis might result in a deadlock unless some threads eventually exit or the code explicitly breaks out to the event loop.\nIf you want to increase the pool size, use setting `-sPTHREAD_POOL_SIZE=...`.\nIf you want to throw an explicit error instead of the risk of deadlocking in those cases, use setting `-sPTHREAD_POOL_SIZE_STRICT=2`."),nn.allocateUnusedWorker(),nn.loadWasmModuleToWorker(nn.unusedWorkers[0])),nn.unusedWorkers.pop()}};h.PThread=nn;var rn=function(t){for(;t.length>0;)t.shift()(h)};function on(){var e=Pi(),t=p()[e+52>>2],n=p()[e+56>>2],r=t-n;H(t!=0),H(r!=0),H(t>r,"stackHigh must be higher then stackLow"),Yi(t,r),el(t),oe()}h.establishStackSpace=on;function an(e){if(T)return Pa(2,0,e);Zt(e)}var ln=function(t){var e=Zi(),n=t();return el(e),n},sn=function(t){return ln(function(){var e=tl(4),n=tl(4);al(t,e,n);var r=_()[e>>2],o=_()[n>>2],a=Qt(r);Ei(r);var i;return o&&(i=Qt(o),Ei(o)),[a,i]})};function un(e){return sn(e)}h.getExceptionMessage=un;var cn=function(t){return re.get(t)};function dn(e,t){var n=cn(e)(t);ae();function r(e){de()?nn.setExitStatus(e):zi(e)}r(n)}h.invokeEntryPoint=dn;function mn(e){nn.tlsInitFunctions.push(e)}var pn=function(t){pn.shown||(pn.shown={}),pn.shown[t]||(pn.shown[t]=1,A(t))},_n=function(t,n,r,o){Ee("Assertion failed: "+Qt(t)+", at: "+[n?Qt(n):"unknown filename",r,o?Qt(o):"unknown function"])},fn=[],gn=0;function hn(e){var t=new bn(e);return t.get_caught()||(t.set_caught(!0),gn--),t.set_rethrown(!1),fn.push(t),ol(t.excPtr),t.get_exception_ptr()}var yn=0;function Cn(){Ki(0,0),H(fn.length>0);var e=fn.pop();rl(e.excPtr),yn=0}function bn(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){_()[this.ptr+4>>2]=e},this.get_type=function(){return _()[this.ptr+4>>2]},this.set_destructor=function(e){_()[this.ptr+8>>2]=e},this.get_destructor=function(){return _()[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,i()[this.ptr+12>>0]=e},this.get_caught=function(){return i()[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,i()[this.ptr+13>>0]=e},this.get_rethrown=function(){return i()[this.ptr+13>>0]!=0},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){_()[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _()[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=ll(this.get_type());if(e)return _()[this.excPtr>>2];var t=this.get_adjusted_ptr();return t!==0?t:this.excPtr}}function vn(e){throw yn||(yn=new Pe(e)),yn}var Sn=function(t){var e=yn&&yn.excPtr;if(!e)return Qi(0),0;var n=new bn(e);n.set_adjusted_ptr(e);var r=n.get_type();if(!r)return Qi(0),e;for(var o in t){var a=t[o];if(a===0||a===r)break;var i=n.ptr+16;if(il(a,r,i))return Qi(a),e}return Qi(r),e},Rn=function(){return Sn([])},Ln=function(t){return Sn([t])},En=function(t,n){return Sn([t,n])};function kn(e){var t=new bn(e).get_exception_ptr();return t}function In(){var e=fn.pop();e||Ee("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(fn.push(e),e.set_rethrown(!0),e.set_caught(!1),gn++),yn=new Pe(t),yn}function Tn(e,t,n){var r=new bn(e);throw r.init(t,n),yn=new Pe(e),gn++,yn}function Dn(){return gn}function xn(e){Fi(e,!E,1,!L,1048576,!1),nn.threadInitTLS()}function $n(e){T?postMessage({cmd:"cleanupThread",thread:e,type:"cmd"}):Ct(e)}function Pn(e,t,n,r){return T?Pa(3,1,e,t,n,r):Nn(e,t,n,r)}function Nn(e,t,n,r){if(typeof SharedArrayBuffer=="undefined")return A("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var o=[],a=0;if(T&&(o.length===0||a))return Pn(e,t,n,r);var i={startRoutine:n,pthread_ptr:e,arg:r,transferList:o};return T?(i.cmd="spawnThread",postMessage(babelHelpers.extends({},i,{type:"cmd"}),o),0):vt(i)}function Mn(e){if(T)return Pa(4,1,e);try{return e=Xt.getStr(e),Kt.chdir(e),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}var wn=function(t){return p()[Ti()>>2]=t,t};function An(e,t,n){if(T)return Pa(5,1,e,t,n);Xt.varargs=n;try{var r=Xt.getStreamFromFD(e);switch(t){case 0:{var o=Xt.get();if(o<0)return-28;var a;return a=Kt.createStream(r,o),a.fd}case 1:case 2:return 0;case 3:return r.flags;case 4:{var o=Xt.get();return r.flags|=o,0}case 5:{var o=Xt.get(),i=0;return d()[o+i>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return wn(28),-1;default:return-28}}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Fn(e,t){if(T)return Pa(6,1,e,t);try{var n=Xt.getStreamFromFD(e);return Xt.doStat(Kt.stat,n.path,t)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}var On=function(t,n,r){return H(typeof r=="number","stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),xt(t,l(),n,r)};function Bn(e,t,n){if(T)return Pa(7,1,e,t,n);try{var r=Xt.getStreamFromFD(e);r.getdents||(r.getdents=Kt.readdir(r.path));for(var o=280,a=0,l=Kt.llseek(r,0,1),s=Math.floor(l/o);s<r.getdents.length&&a+o<=n;){var u,c,m=r.getdents[s];if(m===".")u=r.node.id,c=4;else if(m===".."){var p=Kt.lookupPath(r.path,{parent:!0});u=p.node.id,c=4}else{var _=Kt.lookupNode(r.node,m);u=_.id,c=Kt.isChrdev(_.mode)?2:Kt.isDir(_.mode)?4:Kt.isLink(_.mode)?10:8}H(u),J[t+a>>3]=BigInt(u),J[t+a+8>>3]=BigInt((s+1)*o),d()[t+a+16>>1]=280,i()[t+a+18>>0]=c,On(m,t+a+19,256),a+=o,s+=1}return Kt.llseek(r,s*o,0),a}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Wn(e,t,n){if(T)return Pa(8,1,e,t,n);Xt.varargs=n;try{var r=Xt.getStreamFromFD(e);switch(t){case 21509:return r.tty?0:-59;case 21505:{if(!r.tty)return-59;if(r.tty.ops.ioctl_tcgets){var o=r.tty.ops.ioctl_tcgets(r),a=Xt.get();p()[a>>2]=o.c_iflag||0,p()[a+4>>2]=o.c_oflag||0,p()[a+8>>2]=o.c_cflag||0,p()[a+12>>2]=o.c_lflag||0;for(var l=0;l<32;l++)i()[a+l+17>>0]=o.c_cc[l]||0;return 0}return 0}case 21510:case 21511:case 21512:return r.tty?0:-59;case 21506:case 21507:case 21508:{if(!r.tty)return-59;if(r.tty.ops.ioctl_tcsets){for(var a=Xt.get(),s=p()[a>>2],u=p()[a+4>>2],c=p()[a+8>>2],m=p()[a+12>>2],_=[],l=0;l<32;l++)_.push(i()[a+l+17>>0]);return r.tty.ops.ioctl_tcsets(r.tty,t,{c_iflag:s,c_oflag:u,c_cflag:c,c_lflag:m,c_cc:_})}return 0}case 21519:{if(!r.tty)return-59;var a=Xt.get();return p()[a>>2]=0,0}case 21520:return r.tty?-28:-59;case 21531:{var a=Xt.get();return Kt.ioctl(r,t,a)}case 21523:{if(!r.tty)return-59;if(r.tty.ops.ioctl_tiocgwinsz){var f=r.tty.ops.ioctl_tiocgwinsz(r.tty),a=Xt.get();d()[a>>1]=f[0],d()[a+2>>1]=f[1]}return 0}case 21524:return r.tty?0:-59;case 21515:return r.tty?0:-59;default:return-28}}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function qn(e,t){if(T)return Pa(9,1,e,t);try{return e=Xt.getStr(e),Xt.doStat(Kt.lstat,e,t)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Un(e,t,n){if(T)return Pa(10,1,e,t,n);try{return t=Xt.getStr(t),t=Xt.calculateAt(e,t),t=St.normalize(t),t[t.length-1]==="/"&&(t=t.substr(0,t.length-1)),Kt.mkdir(t,n,0),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Vn(e,t,n,r){if(T)return Pa(11,1,e,t,n,r);try{t=Xt.getStr(t);var o=r&256,a=r&4096;return r=r&-6401,H(!r,"unknown flags in __syscall_newfstatat: "+r),t=Xt.calculateAt(e,t,a),Xt.doStat(o?Kt.lstat:Kt.stat,t,n)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Hn(e,t,n,r){if(T)return Pa(12,1,e,t,n,r);Xt.varargs=r;try{t=Xt.getStr(t),t=Xt.calculateAt(e,t);var o=r?Xt.get():0;return Kt.open(t,n,o).fd}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Gn(e,t){if(T)return Pa(13,1,e,t);try{return e=Xt.getStr(e),Xt.doStat(Kt.stat,e,t)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function zn(e,t,n){if(T)return Pa(14,1,e,t,n);try{return t=Xt.getStr(t),t=Xt.calculateAt(e,t),n===0?Kt.unlink(t):n===512?Kt.rmdir(t):Ee("Invalid flags passed to unlinkat"),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function jn(e){if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e}function Kn(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Qn=e}var Qn=void 0;function Xn(e){for(var t="",n=e;l()[n];)t+=Qn[l()[n++]];return t}var Yn={},Jn={},Zn={},er=void 0;function tr(e){throw new er(e)}var nr=void 0;function rr(e){throw new nr(e)}function or(e,t,n){e.forEach(function(e){Zn[e]=t});function r(t){var r=n(t);r.length!==e.length&&rr("Mismatched type converter count");for(var o=0;o<e.length;++o)ir(e[o],r[o])}var o=new Array(t.length),a=[],i=0;t.forEach(function(e,t){Object.prototype.hasOwnProperty.call(Jn,e)?o[t]=Jn[e]:(a.push(e),Object.prototype.hasOwnProperty.call(Yn,e)||(Yn[e]=[]),Yn[e].push(function(){o[t]=Jn[e],++i,i===a.length&&r(o)}))}),a.length===0&&r(o)}function ar(e,t,n){n===void 0&&(n={});var r=t.name;if(e||tr('type "'+r+'" must have a positive integer typeid pointer'),Object.prototype.hasOwnProperty.call(Jn,e)){if(n.ignoreDuplicateRegistrations)return;tr("Cannot register type '"+r+"' twice")}if(Jn[e]=t,delete Zn[e],Object.prototype.hasOwnProperty.call(Yn,e)){var o=Yn[e];delete Yn[e],o.forEach(function(e){return e()})}}function ir(e,t,n){if(n===void 0&&(n={}),!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return ar(e,t,n)}function lr(e,t,n){switch(t){case 0:return n?function(t){return i()[t]}:function(t){return l()[t]};case 1:return n?function(t){return d()[t>>1]}:function(t){return m()[t>>1]};case 2:return n?function(t){return p()[t>>2]}:function(t){return _()[t>>2]};case 3:return n?function(t){return J[t>>3]}:function(t){return Z[t>>3]};default:throw new TypeError("Unknown integer type: "+e)}}function sr(e,t,n,r,o){t=Xn(t);var a=ur(n),i=t.indexOf("u")!=-1;i&&(o=(BigInt(1)<<BigInt(64))-BigInt(1)),ir(e,{name:t,fromWireType:function(t){return t},toWireType:function(n,a){if(typeof a!="bigint"&&typeof a!="number")throw new TypeError('Cannot convert "'+jn(a)+'" to '+this.name);if(a<r||a>o)throw new TypeError('Passing a number "'+jn(a)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+r+", "+o+"]!");return a},argPackAdvance:8,readValueFromPointer:lr(t,a,!i),destructorFunction:null})}function ur(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 cr(e,t,n,r,o){var a=ur(n);t=Xn(t),ir(e,{name:t,fromWireType:function(t){return!!t},toWireType:function(t,n){return n?r:o},argPackAdvance:8,readValueFromPointer:function(r){var e;if(n===1)e=i();else if(n===2)e=d();else if(n===4)e=p();else throw new TypeError("Unknown boolean type size: "+t);return this.fromWireType(e[r>>a])},destructorFunction:null,jsType:"boolean"})}function dr(e){if(!(this instanceof Or)||!(e instanceof Or))return!1;for(var t=this.$$.ptrType.registeredClass,n=this.$$.ptr,r=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)o=r.upcast(o),r=r.baseClass;return t===r&&n===o}function mr(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function pr(e){function t(e){return e.$$.ptrType.registeredClass.name}tr(t(e)+" instance already deleted")}var _r=!1;function fr(e){}function gr(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function hr(e){e.count.value-=1;var t=e.count.value===0;t&&gr(e)}function yr(e,t,n){if(t===n)return e;if(n.baseClass===void 0)return null;var r=yr(e,t,n.baseClass);return r===null?null:n.downcast(r)}var Cr={};function br(){return Object.keys(Ir).length}function vr(){var e=[];for(var t in Ir)Object.prototype.hasOwnProperty.call(Ir,t)&&e.push(Ir[t]);return e}var Sr=[];function Rr(){for(;Sr.length;){var e=Sr.pop();e.$$.deleteScheduled=!1,e.delete()}}var Lr=void 0;function Er(e){Lr=e,Sr.length&&Lr&&Lr(Rr)}function kr(){h.getInheritedInstanceCount=br,h.getLiveInheritedInstances=vr,h.flushPendingDeletes=Rr,h.setDelayFunction=Er}var Ir={};function Tr(e,t){for(t===void 0&&tr("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function Dr(e,t){return t=Tr(e,t),Ir[t]}function xr(e,t){(!t.ptrType||!t.ptr)&&rr("makeClassHandle requires ptr and ptrType");var n=!!t.smartPtrType,r=!!t.smartPtr;return n!==r&&rr("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Pr(Object.create(e,{$$:{value:t}}))}function $r(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=Dr(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function o(){return this.isSmartPointer?xr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):xr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=this.registeredClass.getActualType(t),i=Cr[a];if(!i)return o.call(this);var l;this.isConst?l=i.constPointerType:l=i.pointerType;var s=yr(t,this.registeredClass,l.registeredClass);return s===null?o.call(this):this.isSmartPointer?xr(l.registeredClass.instancePrototype,{ptrType:l,ptr:s,smartPtrType:this,smartPtr:e}):xr(l.registeredClass.instancePrototype,{ptrType:l,ptr:s})}var Pr=function(t){return typeof FinalizationRegistry=="undefined"?(Pr=function(t){return t},t):(_r=new FinalizationRegistry(function(e){e.leakWarning.stack.replace(/^Error: /,""),hr(e.$$)}),Pr=function(t){var e=t.$$,n=!!e.smartPtr;if(n){var r={$$:e},o=e.ptrType.registeredClass;r.leakWarning=new Error("Embind found a leaked C++ instance "+o.name+" <"+en(e.ptr)+">.\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,$r),_r.register(t,r,t)}return t},fr=function(t){return _r.unregister(t)},Pr(t))};function Nr(){if(this.$$.ptr||pr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Pr(Object.create(Object.getPrototypeOf(this),{$$:{value:mr(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Mr(){this.$$.ptr||pr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&tr("Object already scheduled for deletion"),fr(this),hr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function wr(){return!this.$$.ptr}function Ar(){return this.$$.ptr||pr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&tr("Object already scheduled for deletion"),Sr.push(this),Sr.length===1&&Lr&&Lr(Rr),this.$$.deleteScheduled=!0,this}function Fr(){Or.prototype.isAliasOf=dr,Or.prototype.clone=Nr,Or.prototype.delete=Mr,Or.prototype.isDeleted=wr,Or.prototype.deleteLater=Ar}function Or(){}var Br=48,Wr=57;function qr(e){if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=Br&&t<=Wr?"_"+e:e}function Ur(e,t){var n;return e=qr(e),(n={},n[e]=function(){return t.apply(this,arguments)},n)[e]}function Vr(e,t,n){if(e[t].overloadTable===void 0){var r=e[t];e[t]=function(){return Object.prototype.hasOwnProperty.call(e[t].overloadTable,arguments.length)||tr("Function '"+n+"' 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[r.argCount]=r}}function Hr(e,t,n){Object.prototype.hasOwnProperty.call(h,e)?((n===void 0||h[e].overloadTable!==void 0&&h[e].overloadTable[n]!==void 0)&&tr("Cannot register public name '"+e+"' twice"),Vr(h,e,e),Object.prototype.hasOwnProperty.call(h,n)&&tr("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),h[e].overloadTable[n]=t):(h[e]=t,n!==void 0&&(h[e].numArguments=n))}function Gr(e,t,n,r,o,a,i,l){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=l,this.pureVirtualFunctions=[]}function zr(e,t,n){for(;t!==n;)t.upcast||tr("Expected null or instance of "+n.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function jr(e,t){if(t===null)return this.isReference&&tr("null is not a valid "+this.name),0;t.$$||tr('Cannot pass "'+jn(t)+'" as a '+this.name),t.$$.ptr||tr("Cannot pass deleted object as a pointer of type "+this.name);var n=t.$$.ptrType.registeredClass,r=zr(t.$$.ptr,n,this.registeredClass);return r}function Kr(e,t){var n;if(t===null)return this.isReference&&tr("null is not a valid "+this.name),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;t.$$||tr('Cannot pass "'+jn(t)+'" as a '+this.name),t.$$.ptr||tr("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&tr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;if(n=zr(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&tr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:tr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var o=t.clone();n=this.rawShare(n,vo.toHandle(function(){o.delete()})),e!==null&&e.push(this.rawDestructor,n)}break;default:tr("Unsupporting sharing policy")}return n}function Qr(e,t){if(t===null)return this.isReference&&tr("null is not a valid "+this.name),0;t.$$||tr('Cannot pass "'+jn(t)+'" as a '+this.name),t.$$.ptr||tr("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&tr("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass,r=zr(t.$$.ptr,n,this.registeredClass);return r}function Xr(e){return this.fromWireType(p()[e>>2])}function Yr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Jr(e){this.rawDestructor&&this.rawDestructor(e)}function Zr(e){e!==null&&e.delete()}function eo(){to.prototype.getPointee=Yr,to.prototype.destructor=Jr,to.prototype.argPackAdvance=8,to.prototype.readValueFromPointer=Xr,to.prototype.deleteObject=Zr,to.prototype.fromWireType=$r}function to(e,t,n,r,o,a,i,l,s,u,c){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=l,this.rawConstructor=s,this.rawShare=u,this.rawDestructor=c,!o&&t.baseClass===void 0?r?(this.toWireType=jr,this.destructorFunction=null):(this.toWireType=Qr,this.destructorFunction=null):this.toWireType=Kr}function no(e,t,n){Object.prototype.hasOwnProperty.call(h,e)||rr("Replacing nonexistant public symbol"),h[e].overloadTable!==void 0&&n!==void 0?h[e].overloadTable[n]=t:(h[e]=t,h[e].argCount=n)}function ro(e,t){e=Xn(e);function n(){return cn(t)}var r=n();return typeof r!="function"&&tr("unknown function pointer with signature "+e+": "+t),r}function oo(e,t){var n=Ur(t,function(e){this.name=t,this.message=e;var n=new Error(e).stack;n!==void 0&&(this.stack=this.toString()+"\n"+n.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},n}var ao=void 0;function io(e){var t=wi(e),n=Xn(t);return Ei(t),n}function lo(e,t){var n=[],r={};function o(e){if(!r[e]&&!Jn[e]){if(Zn[e]){Zn[e].forEach(o);return}n.push(e),r[e]=!0}}throw t.forEach(o),new ao(e+": "+n.map(io).join([", "]))}function so(e,t,n,r,o,a,i,l,s,u,c,d,m){c=Xn(c),a=ro(o,a),l&&(l=ro(i,l)),u&&(u=ro(s,u)),m=ro(d,m);var p=qr(c);Hr(p,function(){lo("Cannot construct "+c+" due to unbound types",[r])}),or([e,t,n],r?[r]:[],function(t){t=t[0];var n,o;r?(n=t.registeredClass,o=n.instancePrototype):o=Or.prototype;var i=Ur(p,function(){if(Object.getPrototypeOf(this)!==s)throw new er("Use 'new' to construct "+c);if(d.constructor_body===void 0)throw new er(c+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(e===void 0)throw new er("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(d.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)}),s=Object.create(o,{constructor:{value:i}});i.prototype=s;var d=new Gr(c,i,s,m,n,a,l,u);d.baseClass&&(d.baseClass.__derivedClasses===void 0&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var _=new to(c,d,!0,!1,!1),f=new to(c+"*",d,!1,!1,!1),g=new to(c+" const*",d,!1,!0,!1);return Cr[e]={pointerType:f,constPointerType:g},no(p,i),[_,f,g]})}function uo(e,t){for(var n=[],r=0;r<e;r++)n.push(_()[t+r*4>>2]);return n}function co(e){for(;e.length;){var t=e.pop(),n=e.pop();n(t)}}function mo(e,t,n,r,o,a){var i=t.length;i<2&&tr("argTypes array size mismatch! Must at least get return value and 'this' types!"),H(!a,"Async bindings are only supported with JSPI.");for(var l=t[1]!==null&&n!==null,s=!1,u=1;u<t.length;++u)if(t[u]!==null&&t[u].destructorFunction===void 0){s=!0;break}var c=t[0].name!=="void",d=i-2,m=new Array(d),p=[],_=[];return function(){arguments.length!==d&&tr("function "+e+" called with "+arguments.length+" arguments, expected "+d+" args!"),_.length=0;var n;p.length=l?2:1,p[0]=o,l&&(n=t[1].toWireType(_,this),p[1]=n);for(var a=0;a<d;++a)m[a]=t[a+2].toWireType(_,arguments[a]),p.push(m[a]);var i=r.apply(null,p);function u(e){if(s)co(_);else for(var r=l?1:2;r<t.length;r++){var o=r===1?n:m[r-2];t[r].destructorFunction!==null&&t[r].destructorFunction(o)}if(c)return t[0].fromWireType(e)}return u(i)}}function po(e,t,n,r,o,a){H(t>0);var i=uo(t,n);o=ro(r,o),or([],[e],function(e){e=e[0];var n="constructor "+e.name;if(e.registeredClass.constructor_body===void 0&&(e.registeredClass.constructor_body=[]),e.registeredClass.constructor_body[t-1]!==void 0)throw new er("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=function(){lo("Cannot construct "+e.name+" due to unbound types",i)},or([],i,function(r){return r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=mo(n,r,null,o,a),[]}),[]})}function _o(e,t,n,r,o,a,i,l,s){var u=uo(n,r);t=Xn(t),a=ro(o,a),or([],[e],function(e){e=e[0];var r=e.name+"."+t;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),l&&e.registeredClass.pureVirtualFunctions.push(t);function o(){lo("Cannot call "+r+" due to unbound types",u)}var c=e.registeredClass.instancePrototype,d=c[t];return d===void 0||d.overloadTable===void 0&&d.className!==e.name&&d.argCount===n-2?(o.argCount=n-2,o.className=e.name,c[t]=o):(Vr(c,t,r),c[t].overloadTable[n-2]=o),or([],u,function(o){var l=mo(r,o,e,a,i,s);return c[t].overloadTable===void 0?(l.argCount=n-2,c[t]=l):c[t].overloadTable[n-2]=l,[]}),[]})}function fo(){Object.assign(go.prototype,{get:function(t){return H(this.allocated[t]!==void 0,"invalid handle: "+t),this.allocated[t]},has:function(t){return this.allocated[t]!==void 0},allocate:function(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free:function(t){H(this.allocated[t]!==void 0),this.allocated[t]=void 0,this.freelist.push(t)}})}function go(){this.allocated=[void 0],this.freelist=[]}var ho=new go;function yo(e){e>=ho.reserved&&--ho.get(e).refcount===0&&ho.free(e)}function Co(){for(var e=0,t=ho.reserved;t<ho.allocated.length;++t)ho.allocated[t]!==void 0&&++e;return e}function bo(){ho.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),ho.reserved=ho.allocated.length,h.count_emval_handles=Co}var vo={toValue:function(t){return t||tr("Cannot use deleted val. handle = "+t),ho.get(t).value},toHandle:function(t){switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return ho.allocate({refcount:1,value:t})}}};function So(e,t){t=Xn(t),ir(e,{name:t,fromWireType:function(t){var e=vo.toValue(t);return yo(t),e},toWireType:function(t,n){return vo.toHandle(n)},argPackAdvance:8,readValueFromPointer:Xr,destructorFunction:null})}function Ro(e,t){switch(t){case 2:return function(e){return this.fromWireType(f()[e>>2])};case 3:return function(e){return this.fromWireType(g()[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Lo(e,t,n){var r=ur(n);t=Xn(t),ir(e,{name:t,fromWireType:function(t){return t},toWireType:function(t,n){if(typeof n!="number"&&typeof n!="boolean")throw new TypeError("Cannot convert "+jn(n)+" to "+this.name);return n},argPackAdvance:8,readValueFromPointer:Ro(t,r),destructorFunction:null,jsType:"number"})}function Eo(e,t,n,r,o,a,i){var l=uo(t,n);e=Xn(e),o=ro(r,o),Hr(e,function(){lo("Cannot call "+e+" due to unbound types",l)},t-1),or([],l,function(n){var r=[n[0],null].concat(n.slice(1));return no(e,mo(e,r,null,o,a,i),t-1),h.__WA_INVOKER_FUNCS==null&&(h.__WA_INVOKER_FUNCS=new Map),h.__WA_INVOKER_FUNCS.set(e,{argTypes:n.slice(1),returnType:n[0]}),[]})}function ko(e,t,n,r,o){t=Xn(t),o===-1&&(o=4294967295);var a=ur(n),i=function(t){return t};if(r===0){var l=32-8*n;i=function(t){return t<<l>>>l}}var s=t.includes("unsigned"),u=function(n,a){if(typeof n!="number"&&typeof n!="boolean")throw new TypeError('Cannot convert "'+jn(n)+'" to '+a);if(n<r||n>o)throw new TypeError('Passing a number "'+jn(n)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+r+", "+o+"]!")},c;s?c=function(t,n){return u(n,this.name),n>>>0}:c=function(t,n){return u(n,this.name),n},ir(e,{name:t,fromWireType:i,toWireType:c,argPackAdvance:8,readValueFromPointer:lr(t,a,r!==0),destructorFunction:null,jsType:"number"})}function Io(e,t,n){var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array],o=r[t];function a(e){e=e>>2;var t=_(),n=t[e],r=t[e+1];return new o(t.buffer,r,n)}n=Xn(n),ir(e,{name:n,fromWireType:a,argPackAdvance:8,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})}function To(e,t){t=Xn(t);var n=t==="std::string";ir(e,{name:t,fromWireType:function(t){var e=_()[t>>2],r=t+4,o;if(n)for(var a=r,i=0;i<=e;++i){var s=r+i;if(i==e||l()[s]==0){var u=s-a,c=Qt(a,u);o===void 0?o=c:(o+="\0",o+=c),a=s+1}}else{for(var d=new Array(e),i=0;i<e;++i)d[i]=String.fromCharCode(l()[r+i]);o=d.join("")}return Ei(t),o},toWireType:function(t,r){r instanceof ArrayBuffer&&(r=new Uint8Array(r));var e,o=typeof r=="string";o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||tr("Cannot pass non-string to std::string"),n&&o?e=Dt(r):e=r.length;var a=Li(4+e+1),i=a+4;if(_()[a>>2]=e,n&&o)On(r,i,e+1);else if(o)for(var s=0;s<e;++s){var u=r.charCodeAt(s);u>255&&(Ei(i),tr("String has UTF-16 code units that do not fit in 8 bits")),l()[i+s]=u}else for(var s=0;s<e;++s)l()[i+s]=r[s];return t!==null&&t.push(Ei,a),a},argPackAdvance:8,readValueFromPointer:Xr,destructorFunction:function(t){Ei(t)},jsType:"string"})}var Do=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0,xo=function(t,n){H(t%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var e=t,r=e>>1,o=r+n/2;!(r>=o)&&m()[r];)++r;if(e=r<<1,e-t>32&&Do)return Do.decode(l().slice(t,e));for(var a="",i=0;!(i>=n/2);++i){var s=d()[t+i*2>>1];if(s==0)break;a+=String.fromCharCode(s)}return a},$o=function(t,n,r){if(H(n%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),H(typeof r=="number","stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var e=n,o=r<t.length*2?r/2:t.length,a=0;a<o;++a){var i=t.charCodeAt(a);d()[n>>1]=i,n+=2}return d()[n>>1]=0,n-e},Po=function(t){return t.length*2},No=function(t,n){H(t%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var e=0,r="";!(e>=n/4);){var o=p()[t+e*4>>2];if(o==0)break;if(++e,o>=65536){var a=o-65536;r+=String.fromCharCode(55296|a>>10,56320|a&1023)}else r+=String.fromCharCode(o)}return r},Mo=function(t,n,r){if(H(n%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),H(typeof r=="number","stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),r===void 0&&(r=2147483647),r<4)return 0;for(var e=n,o=e+r-4,a=0;a<t.length;++a){var i=t.charCodeAt(a);if(i>=55296&&i<=57343){var l=t.charCodeAt(++a);i=65536+((i&1023)<<10)|l&1023}if(p()[n>>2]=i,n+=4,n+4>o)break}return p()[n>>2]=0,n-e},wo=function(t){for(var e=0,n=0;n<t.length;++n){var r=t.charCodeAt(n);r>=55296&&r<=57343&&++n,e+=4}return e},Ao=function(t,n,r){r=Xn(r);var e,o,a,i,l;n===2?(e=xo,o=$o,i=Po,a=function(){return m()},l=1):n===4&&(e=No,o=Mo,i=wo,a=function(){return _()},l=2),ir(t,{name:r,fromWireType:function(r){for(var t=_()[r>>2],o=a(),i,s=r+4,u=0;u<=t;++u){var c=r+4+u*n;if(u==t||o[c>>l]==0){var d=c-s,m=e(s,d);i===void 0?i=m:(i+="\0",i+=m),s=c+n}}return Ei(r),i},toWireType:function(t,a){typeof a!="string"&&tr("Cannot pass non-string to C++ string type "+r);var e=i(a),s=Li(4+e+n);return _()[s>>2]=e>>l,o(a,s+4,e+n),t!==null&&t.push(Ei,s),s},argPackAdvance:8,readValueFromPointer:Xr,destructorFunction:function(t){Ei(t)}})};function Fo(e,t){t=Xn(t),ir(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:function(){},toWireType:function(t,n){},jsType:"void"})}var Oo=!0,Bo=function(){return Oo},Wo=function(){if(!de())try{T?zi(V):Zt(V)}catch(e){tn(e)}},qo=function(t){if(U){A("user callback triggered after runtime exited or application aborted. Ignoring.");return}try{t(),Wo()}catch(e){tn(e)}};function Uo(e){if(typeof Atomics.waitAsync=="function"){var t=Atomics.waitAsync(p(),e>>2,e);H(t.async),t.value.then(Vo);var n=e+128;Atomics.store(p(),n>>2,1)}}h.__emscripten_thread_mailbox_await=Uo;var Vo=function(){var e=Pi();e&&(Uo(e),qo(function(){return ji()}))};h.checkMailbox=Vo;var Ho=function(t,n,r){if(t==n)setTimeout(function(){return Vo()});else if(T)postMessage({targetThread:t,cmd:"checkMailbox",type:"cmd"});else{var e=nn.pthreads[t];if(!e){A("Cannot send message to thread with ID "+t+", unknown thread ID!");return}e.postMessage({cmd:"checkMailbox",type:"cmd"})}};function Go(e,t,n){return A("emscripten_set_offscreencanvas_size: Build with -sOFFSCREENCANVAS_SUPPORT=1 to enable transferring canvases to pthreads."),-1}function zo(e){}var jo=function(){throw new $e};function Ko(e){e>4&&(ho.get(e).refcount+=1)}function Qo(e,t){var n=Jn[e];return n===void 0&&tr(t+" has unknown type "+io(e)),n}function Xo(e,t){e=Qo(e,"_emval_take_value");var n=e.readValueFromPointer(t);return vo.toHandle(n)}var Yo=9007199254740992,Jo=-9007199254740992;function Zo(e){return e<Jo||e>Yo?NaN:Number(e)}function ea(e,t){e=Zo(e),t=Zo(t);var n=new Date(e*1e3);p()[t>>2]=n.getUTCSeconds(),p()[t+4>>2]=n.getUTCMinutes(),p()[t+8>>2]=n.getUTCHours(),p()[t+12>>2]=n.getUTCDate(),p()[t+16>>2]=n.getUTCMonth(),p()[t+20>>2]=n.getUTCFullYear()-1900,p()[t+24>>2]=n.getUTCDay();var r=Date.UTC(n.getUTCFullYear(),0,1,0,0,0,0),o=(n.getTime()-r)/(1e3*60*60*24)|0;p()[t+28>>2]=o}var ta=function(t){return t%4===0&&(t%100!==0||t%400===0)},na=[0,31,60,91,121,152,182,213,244,274,305,335],ra=[0,31,59,90,120,151,181,212,243,273,304,334],oa=function(t){var e=ta(t.getFullYear()),n=e?na:ra,r=n[t.getMonth()]+t.getDate()-1;return r};function aa(e,t){e=Zo(e),t=Zo(t);var n=new Date(e*1e3);p()[t>>2]=n.getSeconds(),p()[t+4>>2]=n.getMinutes(),p()[t+8>>2]=n.getHours(),p()[t+12>>2]=n.getDate(),p()[t+16>>2]=n.getMonth(),p()[t+20>>2]=n.getFullYear()-1900,p()[t+24>>2]=n.getDay();var r=oa(n)|0;p()[t+28>>2]=r,p()[t+36>>2]=-(n.getTimezoneOffset()*60);var o=new Date(n.getFullYear(),0,1),a=new Date(n.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),l=(a!=i&&n.getTimezoneOffset()==Math.min(i,a))|0;p()[t+32>>2]=l}var ia=function(t){t=Zo(t);var e=(function(){var e=new Date(p()[t+20>>2]+1900,p()[t+16>>2],p()[t+12>>2],p()[t+8>>2],p()[t+4>>2],p()[t>>2],0),n=p()[t+32>>2],r=e.getTimezoneOffset(),o=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),l=Math.min(i,a);if(n<0)p()[t+32>>2]=+(a!=i&&l==r);else if(n>0!=(l==r)){var s=Math.max(i,a),u=n>0?l:s;e.setTime(e.getTime()+(u-r)*6e4)}p()[t+24>>2]=e.getDay();var c=oa(e)|0;return p()[t+28>>2]=c,p()[t>>2]=e.getSeconds(),p()[t+4>>2]=e.getMinutes(),p()[t+8>>2]=e.getHours(),p()[t+12>>2]=e.getDate(),p()[t+16>>2]=e.getMonth(),p()[t+20>>2]=e.getYear(),e.getTime()/1e3})();return BigInt(e)};function la(e,t,n,r,o,a,i){if(T)return Pa(15,1,e,t,n,r,o,a,i);e=Zo(e),o=Zo(o),a=Zo(a),i=Zo(i);try{if(isNaN(o))return 61;var l=Xt.getStreamFromFD(r),s=Kt.mmap(l,e,o,t,n),u=s.ptr;return p()[a>>2]=s.allocated,_()[i>>2]=u,0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function sa(e,t,n,r,o,a){if(T)return Pa(16,1,e,t,n,r,o,a);e=Zo(e),t=Zo(t),a=Zo(a);try{if(isNaN(a))return 61;var i=Xt.getStreamFromFD(o);n&2&&Xt.doMsync(e,i,t,r,a),Kt.munmap(i)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}var ua=function(t){var e=Dt(t)+1,n=Li(e);return n&&On(t,n,e),n},ca=function(t,n,r){var e=new Date().getFullYear(),o=new Date(e,0,1),a=new Date(e,6,1),i=o.getTimezoneOffset(),l=a.getTimezoneOffset(),s=Math.max(i,l);_()[t>>2]=s*60,p()[n>>2]=+(i!=l);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}var c=u(o),d=u(a),m=ua(c),f=ua(d);l<i?(_()[r>>2]=m,_()[r+4>>2]=f):(_()[r>>2]=f,_()[r+4>>2]=m)},da=function(){Ee("native code called abort()")},ma=[],pa=function(t,n){H(Array.isArray(ma)),H(n%16==0),ma.length=0;var e;for(n>>=2;e=l()[t++];){var r=String.fromCharCode(e),o=["d","f","i"];o.push("j"),H(o.includes(r),"Invalid character "+e+'("'+r+'") in readEmAsmArgs! Use only ['+o+'], and do not specify "v" for void return argument.'),n+=e!=105&n,ma.push(e==105?p()[n]:(e==106?J:g())[n++>>1]),++n}return ma},_a=function(t,n,r){var e=pa(n,r);return Object.prototype.hasOwnProperty.call(ze,t)||Ee("No EM_ASM constant found at address "+t),ze[t].apply(null,e)},fa=function(t,n,r){return _a(t,n,r)},ga=function(t,n,r){return _a(t,n,r)},ha=function(){ce+=1},ya=function(){H(ce>0),ce-=1},Ca=function(t,n){return ha(),setTimeout(function(){ya(),qo(t)},n)};function ba(e,t){if(Ra.mainLoop.timingMode=e,Ra.mainLoop.timingValue=t,!Ra.mainLoop.func)return A("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(Ra.mainLoop.running||(ha(),Ra.mainLoop.running=!0),e==0)Ra.mainLoop.scheduler=function(){var e=Math.max(0,Ra.mainLoop.tickStartTime+t-va())|0;setTimeout(Ra.mainLoop.runner,e)},Ra.mainLoop.method="timeout";else if(e==1)Ra.mainLoop.scheduler=function(){Ra.requestAnimationFrame(Ra.mainLoop.runner)},Ra.mainLoop.method="rAF";else if(e==2){if(typeof setImmediate=="undefined"){var n=[],r="setimmediate",o=function(t){(t.data===r||t.data.target===r)&&(t.stopPropagation(),n.shift()())};addEventListener("message",o,!0),setImmediate=function(t){n.push(t),E?(h.setImmediates===void 0&&(h.setImmediates=[]),h.setImmediates.push(t),postMessage({target:r,type:"cmd"})):postMessage(babelHelpers.extends({},r,{type:"cmd"}),"*")}}Ra.mainLoop.scheduler=function(){setImmediate(Ra.mainLoop.runner)},Ra.mainLoop.method="immediate"}return 0}var va;va=function(){return performance.timeOrigin+performance.now()};function Sa(e,t,n,r,o){H(!Ra.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."),Ra.mainLoop.func=e,Ra.mainLoop.arg=r;var a=Ra.mainLoop.currentlyRunningMainloop;function i(){return a<Ra.mainLoop.currentlyRunningMainloop?(ya(),!1):!0}if(Ra.mainLoop.running=!1,Ra.mainLoop.runner=function(){if(!U){if(Ra.mainLoop.queue.length>0){var t=Date.now(),n=Ra.mainLoop.queue.shift();if(n.func(n.arg),Ra.mainLoop.remainingBlockers){var r=Ra.mainLoop.remainingBlockers,o=r%1==0?r-1:Math.floor(r);n.counted?Ra.mainLoop.remainingBlockers=o:(o=o+.5,Ra.mainLoop.remainingBlockers=(8*r+o)/9)}if(w('main loop blocker "'+n.name+'" took '+(Date.now()-t)+" ms"),Ra.mainLoop.updateStatus(),!i())return;setTimeout(Ra.mainLoop.runner,0);return}if(i()){if(Ra.mainLoop.currentFrameNumber=Ra.mainLoop.currentFrameNumber+1|0,Ra.mainLoop.timingMode==1&&Ra.mainLoop.timingValue>1&&Ra.mainLoop.currentFrameNumber%Ra.mainLoop.timingValue!=0){Ra.mainLoop.scheduler();return}else Ra.mainLoop.timingMode==0&&(Ra.mainLoop.tickStartTime=va());Ra.mainLoop.method==="timeout"&&h.ctx&&(pn("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!"),Ra.mainLoop.method=""),Ra.mainLoop.runIter(e),ae(),i()&&(typeof SDL=="object"&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),Ra.mainLoop.scheduler())}}},o||(t&&t>0?ba(0,1e3/t):ba(1,1),Ra.mainLoop.scheduler()),n)throw"unwind"}var Ra={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Ra.mainLoop.scheduler=null,Ra.mainLoop.currentlyRunningMainloop++},resume:function(){Ra.mainLoop.currentlyRunningMainloop++;var e=Ra.mainLoop.timingMode,t=Ra.mainLoop.timingValue,n=Ra.mainLoop.func;Ra.mainLoop.func=null,Sa(n,0,!1,Ra.mainLoop.arg,!0),ba(e,t),Ra.mainLoop.scheduler()},updateStatus:function(){if(h.setStatus){var e=h.statusMessage||"Please wait...",t=Ra.mainLoop.remainingBlockers,n=Ra.mainLoop.expectedBlockers;t?t<n?h.setStatus(e+" ("+(n-t)+"/"+n+")"):h.setStatus(e):h.setStatus("")}},runIter:function(t){if(!U){if(h.preMainLoop){var e=h.preMainLoop();if(e===!1)return}qo(t),h.postMainLoop&&h.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(Ra.initted)return;Ra.initted=!0;var e={};e.canHandle=function(t){return!h.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(t)},e.handle=function(t,n,r,o){var e=new Blob([t],{type:Ra.getMimetype(n)});e.size!==t.length&&(e=new Blob([new Uint8Array(t).buffer],{type:Ra.getMimetype(n)}));var a=URL.createObjectURL(e);H(typeof a=="string","createObjectURL must return a url as a string");var i=new Image;i.onload=function(){H(i.complete,"Image "+n+" could not be decoded");var e=document.createElement("canvas");e.width=i.width,e.height=i.height;var o=e.getContext("2d");o.drawImage(i,0,0),gi[n]=e,URL.revokeObjectURL(a),r&&r(t)},i.onerror=function(e){w("Image "+a+" could not be decoded"),o&&o()},i.src=a},Ot.push(e);var t={};t.canHandle=function(t){return!h.noAudioDecoding&&t.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},t.handle=function(t,n,r,o){var e=!1;function a(o){e||(e=!0,hi[n]=o,r&&r(t))}var i=new Blob([t],{type:Ra.getMimetype(n)}),l=URL.createObjectURL(i);H(typeof l=="string","createObjectURL must return a url as a string");var s=new Audio;s.addEventListener("canplaythrough",function(){return a(s)},!1),s.onerror=function(o){if(e)return;A("warning: browser could not fully decode audio "+n+", trying slower base64 approach");function r(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="=",r="",o=0,a=0,i=0;i<e.length;i++)for(o=o<<8|e[i],a+=8;a>=6;){var l=o>>a-6&63;a-=6,r+=t[l]}return a==2?(r+=t[(o&3)<<4],r+=n+n):a==4&&(r+=t[(o&15)<<2],r+=n),r}s.src="data:audio/x-"+n.substr(-3)+";base64,"+r(t),a(s)},s.src=l,Ca(function(){a(s)},1e4)},Ot.push(t);function n(){Ra.pointerLock=document.pointerLockElement===h.canvas||document.mozPointerLockElement===h.canvas||document.webkitPointerLockElement===h.canvas||document.msPointerLockElement===h.canvas}var r=h.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),h.elementPointerLock&&r.addEventListener("click",function(e){!Ra.pointerLock&&h.canvas.requestPointerLock&&(h.canvas.requestPointerLock(),e.preventDefault())},!1))},createContext:function(t,n,r,o){if(n&&h.ctx&&t==h.canvas)return h.ctx;var e,a;if(n){var i={antialias:!1,alpha:!1,majorVersion:1};if(o)for(var l in o)i[l]=o[l];typeof GL!="undefined"&&(a=GL.createContext(t,i),a&&(e=GL.getContext(a).GLctx))}else e=t.getContext("2d");return e?(r&&(n||H(typeof GLctx=="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),h.ctx=e,n&&GL.makeContextCurrent(a),h.useWebGL=n,Ra.moduleContextCreatedCallbacks.forEach(function(e){return e()}),Ra.init()),e):null},destroyContext:function(t,n,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(t,n){Ra.lockPointer=t,Ra.resizeCanvas=n,typeof Ra.lockPointer=="undefined"&&(Ra.lockPointer=!0),typeof Ra.resizeCanvas=="undefined"&&(Ra.resizeCanvas=!1);var e=h.canvas;function r(){Ra.isFullscreen=!1;var t=e.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===t?(e.exitFullscreen=Ra.exitFullscreen,Ra.lockPointer&&e.requestPointerLock(),Ra.isFullscreen=!0,Ra.resizeCanvas?Ra.setFullscreenCanvasSize():Ra.updateCanvasDimensions(e)):(t.parentNode.insertBefore(e,t),t.parentNode.removeChild(t),Ra.resizeCanvas?Ra.setWindowedCanvasSize():Ra.updateCanvasDimensions(e)),h.onFullScreen&&h.onFullScreen(Ra.isFullscreen),h.onFullscreen&&h.onFullscreen(Ra.isFullscreen)}Ra.fullscreenHandlersInstalled||(Ra.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",r,!1),document.addEventListener("mozfullscreenchange",r,!1),document.addEventListener("webkitfullscreenchange",r,!1),document.addEventListener("MSFullscreenChange",r,!1));var o=document.createElement("div");e.parentNode.insertBefore(o,e),o.appendChild(e),o.requestFullscreen=o.requestFullscreen||o.mozRequestFullScreen||o.msRequestFullscreen||(o.webkitRequestFullscreen?function(){return o.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(o.webkitRequestFullScreen?function(){return o.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),o.requestFullscreen()},requestFullScreen:function(){Ee("Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)")},exitFullscreen:function(){if(!Ra.isFullscreen)return!1;var e=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){};return e.apply(document,[]),!0},nextRAF:0,fakeRequestAnimationFrame:function(t){var e=Date.now();if(Ra.nextRAF===0)Ra.nextRAF=e+1e3/60;else for(;e+2>=Ra.nextRAF;)Ra.nextRAF+=1e3/60;var n=Math.max(Ra.nextRAF-e,0);setTimeout(t,n)},requestAnimationFrame:(function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t})(function(e){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(e);return}var t=Ra.fakeRequestAnimationFrame;t(e)}),safeSetTimeout:function(t,n){return Ca(t,n)},safeRequestAnimationFrame:function(t){return ha(),Ra.requestAnimationFrame(function(){ya(),qo(t)})},getMimetype:function(t){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[t.substr(t.lastIndexOf(".")+1)]},getUserMedia:function(t){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(t)},getMovementX:function(t){return t.movementX||t.mozMovementX||t.webkitMovementX||0},getMovementY:function(t){return t.movementY||t.mozMovementY||t.webkitMovementY||0},getMouseWheelDelta:function(t){var e=0;switch(t.type){case"DOMMouseScroll":e=t.detail/3;break;case"mousewheel":e=t.wheelDelta/120;break;case"wheel":switch(e=t.deltaY,t.deltaMode){case 0:e/=100;break;case 1:e/=3;break;case 2:e*=80;break;default:throw"unrecognized mouse wheel delta mode: "+t.deltaMode}break;default:throw"unrecognized mouse wheel event: "+t.type}return e},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(t){if(Ra.pointerLock)t.type!="mousemove"&&"mozMovementX"in t?Ra.mouseMovementX=Ra.mouseMovementY=0:(Ra.mouseMovementX=Ra.getMovementX(t),Ra.mouseMovementY=Ra.getMovementY(t)),typeof SDL!="undefined"?(Ra.mouseX=SDL.mouseX+Ra.mouseMovementX,Ra.mouseY=SDL.mouseY+Ra.mouseMovementY):(Ra.mouseX+=Ra.mouseMovementX,Ra.mouseY+=Ra.mouseMovementY);else{var e=h.canvas.getBoundingClientRect(),n=h.canvas.width,r=h.canvas.height,o=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset,a=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;if(H(typeof o!="undefined"&&typeof a!="undefined","Unable to retrieve scroll position, mouse positions likely broken."),t.type==="touchstart"||t.type==="touchend"||t.type==="touchmove"){var i=t.touch;if(i===void 0)return;var l=i.pageX-(o+e.left),s=i.pageY-(a+e.top);l=l*(n/e.width),s=s*(r/e.height);var u={x:l,y:s};if(t.type==="touchstart")Ra.lastTouches[i.identifier]=u,Ra.touches[i.identifier]=u;else if(t.type==="touchend"||t.type==="touchmove"){var c=Ra.touches[i.identifier];c||(c=u),Ra.lastTouches[i.identifier]=c,Ra.touches[i.identifier]=u}return}var d=t.pageX-(o+e.left),m=t.pageY-(a+e.top);d=d*(n/e.width),m=m*(r/e.height),Ra.mouseMovementX=d-Ra.mouseX,Ra.mouseMovementY=m-Ra.mouseY,Ra.mouseX=d,Ra.mouseY=m}},resizeListeners:[],updateResizeListeners:function(){var e=h.canvas;Ra.resizeListeners.forEach(function(t){return t(e.width,e.height)})},setCanvasSize:function(t,n,r){var e=h.canvas;Ra.updateCanvasDimensions(e,t,n),r||Ra.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var e=_()[SDL.screen>>2];e=e|8388608,p()[SDL.screen>>2]=e}Ra.updateCanvasDimensions(h.canvas),Ra.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var e=_()[SDL.screen>>2];e=e&-8388609,p()[SDL.screen>>2]=e}Ra.updateCanvasDimensions(h.canvas),Ra.updateResizeListeners()},updateCanvasDimensions:function(t,n,r){n&&r?(t.widthNative=n,t.heightNative=r):(n=t.widthNative,r=t.heightNative);var e=n,o=r;if(h.forcedAspectRatio&&h.forcedAspectRatio>0&&(e/o<h.forcedAspectRatio?e=Math.round(o*h.forcedAspectRatio):o=Math.round(e/h.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===t.parentNode&&typeof screen!="undefined"){var a=Math.min(screen.width/e,screen.height/o);e=Math.round(e*a),o=Math.round(o*a)}Ra.resizeCanvas?(t.width!=e&&(t.width=e),t.height!=o&&(t.height=o),typeof t.style!="undefined"&&(t.style.removeProperty("width"),t.style.removeProperty("height"))):(t.width!=n&&(t.width=n),t.height!=r&&(t.height=r),typeof t.style!="undefined"&&(e!=n||o!=r?(t.style.setProperty("width",e+"px","important"),t.style.setProperty("height",o+"px","important")):(t.style.removeProperty("width"),t.style.removeProperty("height"))))}};function La(e,t,n){function r(){cn(e)(t)}n>=0?Ca(r,n):Ra.safeRequestAnimationFrame(r)}function Ea(){E||pn("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")}var ka=function(t){H(typeof t=="number"),Qt(t)};function Ia(){return Date.now()}var Ta=function(){throw ha(),"unwind"},Da=function(){return 2147483648},xa=function(){return Da()};function $a(){return navigator.hardwareConcurrency}function Pa(e,t){var n=arguments.length-2,r=arguments,o=19;if(n>o)throw"proxyToMainThread: Too many arguments "+n+" to proxied function idx="+e+", maximum supported is "+o;return ln(function(){for(var o=n*2,a=tl(o*8),i=a>>3,l=0;l<n;l++){var s=r[2+l];typeof s=="bigint"?(J[i+2*l]=BigInt(1),J[i+2*l+1]=s):(J[i+2*l]=BigInt(0),g()[i+2*l+1]=s)}return qi(e,o,a,t)})}var Na=[];function Ma(e,t,n,r){nn.currentProxiedOperationCallerThread=t,n/=2,Na.length=n;for(var o=r>>3,a=0;a<n;a++)J[o+2*a]?Na[a]=J[o+2*a+1]:Na[a]=g()[o+2*a+1];var i=e<0,l=i?ze[-e-1]:yi[e];return H(l.length==n,"Call args mismatch in emscripten_receive_on_main_thread_js"),l.apply(null,Na)}var wa=function(t){var e=B.buffer,n=t-e.byteLength+65535>>>16;try{return B.grow(n),te(),1}catch(n){A("growMemory: Attempted to grow heap from "+e.byteLength+" bytes to "+t+" bytes, but got error: "+n)}},Aa=function(t){var e=l().length;if(t>>>=0,t<=e)return!1;var n=Da();if(t>n)return A("Cannot enlarge memory, asked to go up to "+t+" bytes, but the limit is "+n+" bytes!"),!1;for(var r=function(t,n){return t+(n-t%n)%n},o=1;o<=4;o*=2){var a=e*(1+.2/o);a=Math.min(a,t+100663296);var i=Math.min(n,r(Math.max(t,a),65536)),s=wa(i);if(s)return!0}return A("Failed to grow the heap from "+e+" bytes to "+i+" bytes, not enough memory!"),!1},Fa=ya,Oa=ha,Ba={},Wa=function(){return S||"./this.program"},qa=function(){if(!qa.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Wa()};for(var n in Ba)Ba[n]===void 0?delete t[n]:t[n]=Ba[n];var r=[];for(var n in t)r.push(n+"="+t[n]);qa.strings=r}return qa.strings},Ua=function(t,n){for(var e=0;e<t.length;++e)H(t.charCodeAt(e)===(t.charCodeAt(e)&255)),i()[n++>>0]=t.charCodeAt(e);i()[n>>0]=0};function Va(e,t){if(T)return Pa(17,1,e,t);var n=0;return qa().forEach(function(r,o){var a=t+n;_()[e+o*4>>2]=a,Ua(r,a),n+=r.length+1}),0}function Ha(e,t){if(T)return Pa(18,1,e,t);var n=qa();_()[e>>2]=n.length;var r=0;return n.forEach(function(e){r+=e.length+1}),_()[t>>2]=r,0}function Ga(e){if(T)return Pa(19,1,e);try{var t=Xt.getStreamFromFD(e);return Kt.close(t),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}var za=function(t,n,r,o){for(var e=0,a=0;a<r;a++){var l=_()[n>>2],s=_()[n+4>>2];n+=8;var u=Kt.read(t,i(),l,s,o);if(u<0)return-1;if(e+=u,u<s)break;typeof o!="undefined"&&(o+=u)}return e};function ja(e,t,n,r,o){if(T)return Pa(20,1,e,t,n,r,o);t=Zo(t),n=Zo(n),r=Zo(r),o=Zo(o);try{if(isNaN(r))return 61;var a=Xt.getStreamFromFD(e),i=za(a,t,n,r);return _()[o>>2]=i,0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}function Ka(e,t,n,r){if(T)return Pa(21,1,e,t,n,r);try{var o=Xt.getStreamFromFD(e),a=za(o,t,n);return _()[r>>2]=a,0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}function Qa(e,t,n,r){if(T)return Pa(22,1,e,t,n,r);t=Zo(t),r=Zo(r);try{if(isNaN(t))return 61;var o=Xt.getStreamFromFD(e);return Kt.llseek(o,t,n),J[r>>3]=BigInt(o.position),o.getdents&&t===0&&n===0&&(o.getdents=null),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}var Xa=function(t,n,r,o){for(var e=0,a=0;a<r;a++){var l=_()[n>>2],s=_()[n+4>>2];n+=8;var u=Kt.write(t,i(),l,s,o);if(u<0)return-1;e+=u,typeof o!="undefined"&&(o+=u)}return e};function Ya(e,t,n,r){if(T)return Pa(23,1,e,t,n,r);try{var o=Xt.getStreamFromFD(e),a=Xa(o,t,n);return _()[r>>2]=a,0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}var Ja=function(t,n){return Lt(l().subarray(t,t+n)),0},Za=function(t){for(var e=t.split("."),n=0;n<4;n++){var r=Number(e[n]);if(isNaN(r))return null;e[n]=r}return(e[0]|e[1]<<8|e[2]<<16|e[3]<<24)>>>0},ei=function(t){return parseInt(t)},ti=function(t){var e,n,r,o,a=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,i=[];if(!a.test(t))return null;if(t==="::")return[0,0,0,0,0,0,0,0];for(t.startsWith("::")?t=t.replace("::","Z:"):t=t.replace("::",":Z:"),t.indexOf(".")>0?(t=t.replace(new RegExp("[.]","g"),":"),e=t.split(":"),e[e.length-4]=ei(e[e.length-4])+ei(e[e.length-3])*256,e[e.length-3]=ei(e[e.length-2])+ei(e[e.length-1])*256,e=e.slice(0,e.length-2)):e=t.split(":"),r=0,o=0,n=0;n<e.length;n++)if(typeof e[n]=="string")if(e[n]==="Z"){for(o=0;o<8-e.length+1;o++)i[n+o]=0;r=o-1}else i[n+r]=$i(parseInt(e[n],16));else i[n+r]=e[n];return[i[1]<<16|i[0],i[3]<<16|i[2],i[5]<<16|i[4],i[7]<<16|i[6]]},ni={address_map:{id:1,addrs:{},names:{}},lookup_name:function(t){var e=Za(t);if(e!==null||(e=ti(t),e!==null))return t;var n;if(ni.address_map.addrs[t])n=ni.address_map.addrs[t];else{var r=ni.address_map.id++;H(r<65535,"exceeded max address mappings of 65535"),n="172.29."+(r&255)+"."+(r&65280),ni.address_map.names[n]=t,ni.address_map.addrs[t]=n}return n},lookup_addr:function(t){return ni.address_map.names[t]?ni.address_map.names[t]:null}},ri=function(t){var e=Li(20),n=ua(t);_()[e>>2]=n;var r=Li(4);_()[r>>2]=0,_()[e+4>>2]=r;var o=2;p()[e+8>>2]=o,p()[e+12>>2]=4;var a=Li(12);return _()[a>>2]=a+8,_()[a+4>>2]=0,p()[a+8>>2]=Za(ni.lookup_name(t)),_()[e+16>>2]=a,e};function oi(e){return T?Pa(24,1,e):ri(Qt(e))}function ai(e){return e}var ii=function(t,n){for(var e=0,r=0;r<=n;e+=t[r++]);return e},li=[31,29,31,30,31,30,31,31,30,31,30,31],si=[31,28,31,30,31,30,31,31,30,31,30,31],ui=function(t,n){for(var e=new Date(t.getTime());n>0;){var r=ta(e.getFullYear()),o=e.getMonth(),a=(r?li:si)[o];if(n>a-e.getDate())n-=a-e.getDate()+1,e.setDate(1),o<11?e.setMonth(o+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1));else return e.setDate(e.getDate()+n),e}return e},ci=function(t,n){H(t.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),i().set(t,n)},di=function(t,n,r,o){var e=p()[o+40>>2],a={tm_sec:p()[o>>2],tm_min:p()[o+4>>2],tm_hour:p()[o+8>>2],tm_mday:p()[o+12>>2],tm_mon:p()[o+16>>2],tm_year:p()[o+20>>2],tm_wday:p()[o+24>>2],tm_yday:p()[o+28>>2],tm_isdst:p()[o+32>>2],tm_gmtoff:p()[o+36>>2],tm_zone:e?Qt(e):""},i=Qt(r),l={"%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 s in l)i=i.replace(new RegExp(s,"g"),l[s]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,t,n){for(var r=typeof e=="number"?e.toString():e||"";r.length<t;)r=n[0]+r;return r}function m(e,t){return d(e,t,"0")}function _(e,t){function n(e){return e<0?-1:e>0?1:0}var r;return(r=n(e.getFullYear()-t.getFullYear()))===0&&(r=n(e.getMonth()-t.getMonth()))===0&&(r=n(e.getDate()-t.getDate())),r}function f(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function g(e){var t=ui(new Date(e.tm_year+1900,0,1),e.tm_yday),n=new Date(t.getFullYear(),0,4),r=new Date(t.getFullYear()+1,0,4),o=f(n),a=f(r);return _(o,t)<=0?_(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var h={"%a":function(t){return u[t.tm_wday].substring(0,3)},"%A":function(t){return u[t.tm_wday]},"%b":function(t){return c[t.tm_mon].substring(0,3)},"%B":function(t){return c[t.tm_mon]},"%C":function(t){var e=t.tm_year+1900;return m(e/100|0,2)},"%d":function(t){return m(t.tm_mday,2)},"%e":function(t){return d(t.tm_mday,2," ")},"%g":function(t){return g(t).toString().substring(2)},"%G":function(t){return g(t)},"%H":function(t){return m(t.tm_hour,2)},"%I":function(t){var e=t.tm_hour;return e==0?e=12:e>12&&(e-=12),m(e,2)},"%j":function(t){return m(t.tm_mday+ii(ta(t.tm_year+1900)?li:si,t.tm_mon-1),3)},"%m":function(t){return m(t.tm_mon+1,2)},"%M":function(t){return m(t.tm_min,2)},"%n":function(){return"\n"},"%p":function(t){return t.tm_hour>=0&&t.tm_hour<12?"AM":"PM"},"%S":function(t){return m(t.tm_sec,2)},"%t":function(){return" "},"%u":function(t){return t.tm_wday||7},"%U":function(t){var e=t.tm_yday+7-t.tm_wday;return m(Math.floor(e/7),2)},"%V":function(t){var e=Math.floor((t.tm_yday+7-(t.tm_wday+6)%7)/7);if((t.tm_wday+371-t.tm_yday-2)%7<=2&&e++,e){if(e==53){var r=(t.tm_wday+371-t.tm_yday)%7;r!=4&&(r!=3||!ta(t.tm_year))&&(e=1)}}else{e=52;var n=(t.tm_wday+7-t.tm_yday-1)%7;(n==4||n==5&&ta(t.tm_year%400-1))&&e++}return m(e,2)},"%w":function(t){return t.tm_wday},"%W":function(t){var e=t.tm_yday+7-(t.tm_wday+6)%7;return m(Math.floor(e/7),2)},"%y":function(t){return(t.tm_year+1900).toString().substring(2)},"%Y":function(t){return t.tm_year+1900},"%z":function(t){var e=t.tm_gmtoff,n=e>=0;return e=Math.abs(e)/60,e=e/60*100+e%60,(n?"+":"-")+("0000"+e).slice(-4)},"%Z":function(t){return t.tm_zone},"%%":function(){return"%"}};i=i.replace(/%%/g,"\0\0");for(var s in h)i.includes(s)&&(i=i.replace(new RegExp(s,"g"),h[s](a)));i=i.replace(/\0\0/g,"%");var y=$t(i,!1);return y.length>n?0:(ci(y,t),y.length-1)},mi=function(t,n,r,o,a){return di(t,n,r,o)};nn.init();var pi=function(t,n,r,o){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=Kt.nextInode++,this.name=n,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=o},_i=365,fi=146;Object.defineProperties(pi.prototype,{read:{get:function(){return(this.mode&_i)===_i},set:function(t){t?this.mode|=_i:this.mode&=~_i}},write:{get:function(){return(this.mode&fi)===fi},set:function(t){t?this.mode|=fi:this.mode&=~fi}},isFolder:{get:function(){return Kt.isDir(this.mode)}},isDevice:{get:function(){return Kt.isChrdev(this.mode)}}}),Kt.FSNode=pi,Kt.createPreloadedFile=Wt,Kt.staticInit(),Gt={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},Kn(),er=h.BindingError=(function(e){function t(t){var n;return n=e.call(this,t)||this,n.name="BindingError",n}return babelHelpers.inheritsLoose(t,e),t})(babelHelpers.wrapNativeSuper(Error)),nr=h.InternalError=(function(e){function t(t){var n;return n=e.call(this,t)||this,n.name="InternalError",n}return babelHelpers.inheritsLoose(t,e),t})(babelHelpers.wrapNativeSuper(Error)),Fr(),kr(),eo(),ao=h.UnboundTypeError=oo(Error,"UnboundTypeError"),fo(),bo(),h.requestFullscreen=function(t,n){Ra.requestFullscreen(t,n)},h.requestFullScreen=function(){Ra.requestFullScreen()},h.requestAnimationFrame=function(t){Ra.requestAnimationFrame(t)},h.setCanvasSize=function(t,n,r){Ra.setCanvasSize(t,n,r)},h.pauseMainLoop=function(){Ra.mainLoop.pause()},h.resumeMainLoop=function(){Ra.mainLoop.resume()},h.getUserMedia=function(){Ra.getUserMedia()},h.createContext=function(t,n,r,o){return Ra.createContext(t,n,r,o)};var gi={},hi={},yi=[null,Yt,an,Pn,Mn,An,Fn,Bn,Wn,qn,Un,Vn,Hn,Gn,zn,la,sa,Va,Ha,Ga,ja,Ka,Qa,Ya,oi];function Ci(){We("fetchSettings")}var bi={__assert_fail:_n,__cxa_begin_catch:hn,__cxa_end_catch:Cn,__cxa_find_matching_catch_2:Rn,__cxa_find_matching_catch_3:Ln,__cxa_find_matching_catch_4:En,__cxa_get_exception_ptr:kn,__cxa_rethrow:In,__cxa_throw:Tn,__cxa_uncaught_exceptions:Dn,__emscripten_init_main_thread_js:xn,__emscripten_thread_cleanup:$n,__pthread_create_js:Nn,__resumeException:vn,__syscall_chdir:Mn,__syscall_fcntl64:An,__syscall_fstat64:Fn,__syscall_getdents64:Bn,__syscall_ioctl:Wn,__syscall_lstat64:qn,__syscall_mkdirat:Un,__syscall_newfstatat:Vn,__syscall_openat:Hn,__syscall_stat64:Gn,__syscall_unlinkat:zn,_embind_register_bigint:sr,_embind_register_bool:cr,_embind_register_class:so,_embind_register_class_constructor:po,_embind_register_class_function:_o,_embind_register_emval:So,_embind_register_float:Lo,_embind_register_function:Eo,_embind_register_integer:ko,_embind_register_memory_view:Io,_embind_register_std_string:To,_embind_register_std_wstring:Ao,_embind_register_void:Fo,_emscripten_get_now_is_monotonic:Bo,_emscripten_notify_mailbox_postmessage:Ho,_emscripten_set_offscreencanvas_size:Go,_emscripten_thread_mailbox_await:Uo,_emscripten_thread_set_strongref:zo,_emscripten_throw_longjmp:jo,_emval_decref:yo,_emval_incref:Ko,_emval_take_value:Xo,_gmtime_js:ea,_localtime_js:aa,_mktime_js:ia,_mmap_js:la,_munmap_js:sa,_tzset_js:ca,abort:da,call_init_capture_driver_js_sync:rt,call_init_playback_driver_js_sync:it,call_sendto:nt,call_start_capture_js_sync:ot,call_start_desktop_capture_js_sync:ct,call_start_playback_js_sync:lt,call_start_video_capture_js_sync:mt,call_stop_capture_js_sync:at,call_stop_desktop_capture_js_sync:dt,call_stop_playback_js_sync:st,call_stop_video_capture_js_sync:pt,emscripten_asm_const_double:fa,emscripten_asm_const_int:ga,emscripten_async_call:La,emscripten_check_blocking_allowed:Ea,emscripten_console_error:ka,emscripten_date_now:Ia,emscripten_exit_with_live_runtime:Ta,emscripten_get_heap_max:xa,emscripten_get_now:va,emscripten_num_logical_cores:$a,emscripten_receive_on_main_thread_js:Ma,emscripten_resize_heap:Aa,emscripten_runtime_keepalive_pop:Fa,emscripten_runtime_keepalive_push:Oa,environ_get:Va,environ_sizes_get:Ha,exit:Zt,fd_close:Ga,fd_pread:ja,fd_read:Ka,fd_seek:Qa,fd_write:Ya,get_bwe_ml_model_path_js:Ye,get_persistent_directory_path_js:Xe,get_random_bytes_js:Je,getentropy:Ja,gethostbyname:oi,invoke_d:Su,invoke_diii:Iu,invoke_fii:rs,invoke_fiii:ku,invoke_fiiiiii:ou,invoke_i:dl,invoke_ii:pl,invoke_iid:yu,invoke_iidi:Ru,invoke_iidii:uu,invoke_iidjjjidjjjdjjji:jl,invoke_iidjjjii:ts,invoke_iidjjjiii:Ql,invoke_iiffiii:as,invoke_iiffiiiii:os,invoke_iifi:Gs,invoke_iii:_l,invoke_iiid:bu,invoke_iiifi:Us,invoke_iiii:gl,invoke_iiiidd:pu,invoke_iiiifiii:cs,invoke_iiiifiiiiii:ps,invoke_iiiii:bl,invoke_iiiiid:Lu,invoke_iiiiii:kl,invoke_iiiiiii:hl,invoke_iiiiiiii:Ll,invoke_iiiiiiiii:vl,invoke_iiiiiiiiii:Rl,invoke_iiiiiiiiiiffiii:is,invoke_iiiiiiiiiii:Al,invoke_iiiiiiiiiiii:ms,invoke_iiiiiiiiiiiiffiii:us,invoke_iiiiiiiiiiiii:_s,invoke_iiiiiiiiiiiiii:$l,invoke_iiiiiiiiiiiiiiffiiiii:ds,invoke_iiiiiiiiiiiiiii:Ds,invoke_iiiiiiiiiiiiiiiffiiiii:ls,invoke_iiiiiiiiiiiiiiiiiffiiiii:ss,invoke_iiiiiiiiiiiiiiiiii:Pl,invoke_iiiiiiiiiiji:Wl,invoke_iiiiiiiiij:Es,invoke_iiiiiiiij:Ss,invoke_iiiiiiij:ys,invoke_iiiiiiijjii:Fs,invoke_iiiiiij:Rs,invoke_iiiiiijiiii:ks,invoke_iiiiiijjijiiiiiiiiii:Bs,invoke_iiiiij:au,invoke_iiiiijjii:Zl,invoke_iiiiijjiii:es,invoke_iiiiijjjii:Yl,invoke_iiiiijjjiii:Jl,invoke_iiiij:bs,invoke_iiiijiii:lu,invoke_iiiijiiji:Gl,invoke_iiiijjii:ns,invoke_iiiijjiii:Xl,invoke_iiij:Cs,invoke_iiijddddddd:eu,invoke_iiiji:Bl,invoke_iiijii:Fl,invoke_iiijiiji:Hl,invoke_iiijji:Vl,invoke_iiijjiiii:Qs,invoke_iij:ws,invoke_iiji:Is,invoke_iijii:Ls,invoke_iijiii:ru,invoke_iijijijiji:gu,invoke_iijj:Ys,invoke_iijjjiiii:js,invoke_iijjjj:zs,invoke_iijjjji:Zs,invoke_ij:su,invoke_iji:_u,invoke_j:Nl,invoke_ji:fs,invoke_jii:Os,invoke_jiii:Sl,invoke_jiiii:Eu,invoke_jiiiiiiii:vs,invoke_jiiiiiji:Ts,invoke_jiij:Js,invoke_jij:Ws,invoke_v:fl,invoke_vd:vu,invoke_vi:yl,invoke_vid:fu,invoke_viddjjii:Ks,invoke_vif:gs,invoke_vii:ml,invoke_viid:iu,invoke_viidi:hu,invoke_viif:Du,invoke_viii:cl,invoke_viiii:Cl,invoke_viiiii:El,invoke_viiiiii:xl,invoke_viiiiiidiii:Ul,invoke_viiiiiii:Dl,invoke_viiiiiiiddiii:Ol,invoke_viiiiiiii:Tl,invoke_viiiiiiiii:Il,invoke_viiiiiiiiii:ql,invoke_viiiiiiiiiiii:hs,invoke_viiiiiiiiiiiii:du,invoke_viiiiiiiiiiiiiii:Tu,invoke_viiiiiiiiiiiiiiiiiiiiiiiiiiiiiii:tu,invoke_viiiiiiij:cu,invoke_viiiiij:Vs,invoke_viiiiiji:Cu,invoke_viiiij:Hs,invoke_viiij:xs,invoke_viiiji:zl,invoke_viij:As,invoke_viiji:$s,invoke_viijii:Ps,invoke_viijiiii:Ms,invoke_viijj:mu,invoke_viijjdiii:Kl,invoke_vij:Ns,invoke_viji:nu,invoke_vijiiiii:Ml,invoke_vijj:qs,invoke_vijji:Xs,invoke_vjiiiiii:wl,is_participant_known_contact_js:Ze,llvm_eh_typeid_for:ai,loggingCallback_js_sync:_t,memory:B||h.wasmMemory,on_call_event_js_sync:je,patch_abort_for_ml_inference:Qe,query_browser_audio_processing_status_js_sync:ut,renderVideoFrame_js:et,sendSignalingXMPP_js_sync:tt,set_ml_inference_flag:Ke,strftime_l:mi},vi=Oe(),Si=De("__wasm_call_ctors"),Ri=De("__cxa_free_exception"),Li=h._malloc=De("malloc"),Ei=h._free=De("free"),ki=h._wasm_throw_ml_abort=De("wasm_throw_ml_abort"),Ii=h._fflush=De("fflush"),Ti=De("__errno_location"),Di=De("ntohs"),xi=De("htonl"),$i=De("htons"),Pi=h._pthread_self=function(){return(Pi=h._pthread_self=W.pthread_self)()},Ni=h.__emscripten_tls_init=De("_emscripten_tls_init"),Mi=De("emscripten_builtin_memalign"),wi=De("__getTypeName"),Ai=h.__embind_initialize_bindings=De("_embind_initialize_bindings"),Fi=h.__emscripten_thread_init=De("_emscripten_thread_init"),Oi=h.__emscripten_thread_crashed=De("_emscripten_thread_crashed"),Bi=De("emscripten_main_thread_process_queued_calls"),Wi=De("emscripten_main_runtime_thread_id"),qi=De("_emscripten_run_in_main_runtime_thread_js"),Ui=De("emscripten_dispatch_to_thread_"),Vi=function(){return(Vi=W.emscripten_stack_get_base)()},Hi=function(){return(Hi=W.emscripten_stack_get_end)()},Gi=De("_emscripten_thread_free_data"),zi=h.__emscripten_thread_exit=De("_emscripten_thread_exit"),ji=h.__emscripten_check_mailbox=De("_emscripten_check_mailbox"),Ki=De("setThrew"),Qi=De("setTempRet0"),Xi=function(){return(Xi=W.emscripten_stack_init)()},Yi=function(t,n){return(Yi=W.emscripten_stack_set_limits)(t,n)},Ji=function(){return(Ji=W.emscripten_stack_get_free)()},Zi=De("stackSave"),el=De("stackRestore"),tl=De("stackAlloc"),nl=function(){return(nl=W.emscripten_stack_get_current)()},rl=De("__cxa_decrement_exception_refcount"),ol=De("__cxa_increment_exception_refcount"),al=h.___get_exception_message=De("__get_exception_message"),il=De("__cxa_can_catch"),ll=De("__cxa_is_pointer_type"),sl=h.___start_em_js=1328060,ul=h.___stop_em_js=1333355;function cl(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function dl(e){var t=Zi();try{return cn(e)()}catch(e){if(el(t),!(e instanceof xe))throw e;Ki(1,0)}}function ml(e,t,n){var r=Zi();try{cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function pl(e,t){var n=Zi();try{return cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;Ki(1,0)}}function _l(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function fl(e){var t=Zi();try{cn(e)()}catch(e){if(el(t),!(e instanceof xe))throw e;Ki(1,0)}}function gl(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function hl(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function yl(e,t){var n=Zi();try{cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;Ki(1,0)}}function Cl(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function bl(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function vl(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Sl(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Rl(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function Ll(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function El(e,t,n,r,o,a){var i=Zi();try{cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function kl(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Il(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function Tl(e,t,n,r,o,a,i,l,s){var u=Zi();try{cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Dl(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function xl(e,t,n,r,o,a,i){var l=Zi();try{cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function $l(e,t,n,r,o,a,i,l,s,u,c,d,m,p){var _=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p)}catch(e){if(el(_),!(e instanceof xe))throw e;Ki(1,0)}}function Pl(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h){var y=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h)}catch(e){if(el(y),!(e instanceof xe))throw e;Ki(1,0)}}function Nl(e){var t=Zi();try{return cn(e)()}catch(e){if(el(t),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Ml(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function wl(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function Al(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Fl(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Ol(e,t,n,r,o,a,i,l,s,u,c,d,m){var p=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m)}catch(e){if(el(p),!(e instanceof xe))throw e;Ki(1,0)}}function Bl(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Wl(e,t,n,r,o,a,i,l,s,u,c,d){var m=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d)}catch(e){if(el(m),!(e instanceof xe))throw e;Ki(1,0)}}function ql(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Ul(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Vl(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Hl(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function Gl(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function zl(e,t,n,r,o,a){var i=Zi();try{cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function jl(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f){var g=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f)}catch(e){if(el(g),!(e instanceof xe))throw e;Ki(1,0)}}function Kl(e,t,n,r,o,a,i,l,s){var u=Zi();try{cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Ql(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Xl(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Yl(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function Jl(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Zl(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function es(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function ts(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function ns(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function rs(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function os(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function as(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function is(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_){var f=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_)}catch(e){if(el(f),!(e instanceof xe))throw e;Ki(1,0)}}function ls(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v){var S=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v)}catch(e){if(el(S),!(e instanceof xe))throw e;Ki(1,0)}}function ss(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v,S,R){var L=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v,S,R)}catch(e){if(el(L),!(e instanceof xe))throw e;Ki(1,0)}}function us(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g){var h=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g)}catch(e){if(el(h),!(e instanceof xe))throw e;Ki(1,0)}}function cs(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function ds(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b){var v=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b)}catch(e){if(el(v),!(e instanceof xe))throw e;Ki(1,0)}}function ms(e,t,n,r,o,a,i,l,s,u,c,d){var m=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d)}catch(e){if(el(m),!(e instanceof xe))throw e;Ki(1,0)}}function ps(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function _s(e,t,n,r,o,a,i,l,s,u,c,d,m){var p=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m)}catch(e){if(el(p),!(e instanceof xe))throw e;Ki(1,0)}}function fs(e,t){var n=Zi();try{return cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function gs(e,t,n){var r=Zi();try{cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function hs(e,t,n,r,o,a,i,l,s,u,c,d,m){var p=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m)}catch(e){if(el(p),!(e instanceof xe))throw e;Ki(1,0)}}function ys(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function Cs(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function bs(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function vs(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Ss(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Rs(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function Ls(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Es(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function ks(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Is(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Ts(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Ds(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_){var f=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_)}catch(e){if(el(f),!(e instanceof xe))throw e;Ki(1,0)}}function xs(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function $s(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Ps(e,t,n,r,o,a){var i=Zi();try{cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Ns(e,t,n){var r=Zi();try{cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function Ms(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function ws(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function As(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Fs(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Os(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Bs(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C){var b=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C)}catch(e){if(el(b),!(e instanceof xe))throw e;Ki(1,0)}}function Ws(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function qs(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Us(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Vs(e,t,n,r,o,a,i){var l=Zi();try{cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function Hs(e,t,n,r,o,a){var i=Zi();try{cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Gs(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function zs(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function js(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Ks(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function Qs(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Xs(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Ys(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Js(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Zs(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function eu(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function tu(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v,S,R,L,E,k,I,T,D,x,$){var P=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v,S,R,L,E,k,I,T,D,x,$)}catch(e){if(el(P),!(e instanceof xe))throw e;Ki(1,0)}}function nu(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function ru(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function ou(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function au(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function iu(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function lu(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function su(e,t){var n=Zi();try{return cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;Ki(1,0)}}function uu(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function cu(e,t,n,r,o,a,i,l,s){var u=Zi();try{cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function du(e,t,n,r,o,a,i,l,s,u,c,d,m,p){var _=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p)}catch(e){if(el(_),!(e instanceof xe))throw e;Ki(1,0)}}function mu(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function pu(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function _u(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function fu(e,t,n){var r=Zi();try{cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function gu(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function hu(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function yu(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function Cu(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function bu(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function vu(e,t){var n=Zi();try{cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;Ki(1,0)}}function Su(e){var t=Zi();try{return cn(e)()}catch(e){if(el(t),!(e instanceof xe))throw e;Ki(1,0)}}function Ru(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Lu(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Eu(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function ku(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Iu(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Tu(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f){var g=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f)}catch(e){if(el(g),!(e instanceof xe))throw e;Ki(1,0)}}function Du(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}h.keepRuntimeAlive=de,h.wasmMemory=B,h.GROWABLE_HEAP_U8=l,h.GROWABLE_HEAP_F32=f,h.ExitStatus=ft,h.FS=Kt,h.PThread=nn,h.registeredTypes=Jn;var xu=["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","inetNtop4","inetNtop6","readSockaddr","writeSockaddr","getCallstack","emscriptenLog","convertPCtoSourceLocation","runMainThreadEmAsm","jstoi_s","listenOnce","autoResumeAudioContext","getDynCaller","dynCall","setWasmTableEntry","asmjsMangle","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","stringToUTF8OnStack","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSizeCallingThread","setCanvasElementSizeMainThread","setCanvasElementSize","getCanvasSizeCallingThread","getCanvasSizeMainThread","getCanvasElementSize","jsStackTrace","stackTrace","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","getSocketFromFD","getSocketAddress","_setNetworkCallback","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","__glGenObject","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","emscripten_webgl_destroy_context_before_on_calling_thread","registerWebGlEventCallback","runAndAbortIfError","SDL_unicode","SDL_ttfContext","SDL_audio","GLFW_Window","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","registerInheritedInstance","unregisterInheritedInstance","enumReadValueFromPointer","validateThis","getStringOrSymbol","craftEmvalAllocator","emval_get_global","emval_lookupTypes","emval_allocateDestructors","emval_addMethodCaller"];xu.forEach(Ve);var $u=["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createDataFile","FS_createLazyFile","FS_createLink","FS_createDevice","FS_unlink","out","err","callMain","abort","wasmTable","wasmExports","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","GROWABLE_HEAP_I8","GROWABLE_HEAP_I16","GROWABLE_HEAP_U16","GROWABLE_HEAP_I32","GROWABLE_HEAP_U32","GROWABLE_HEAP_F64","writeStackCookie","checkStackCookie","MAX_INT53","MIN_INT53","bigintToI53Checked","ptrToString","zeroMemory","exitJS","getHeapMax","growMemory","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","arraySum","addDays","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","inetPton4","inetPton6","DNS","getHostByName","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","readEmAsmArgs","runEmAsmFunction","jstoi_q","getExecutableName","getWasmTableEntry","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asyncLoad","alignMemory","mmapAlloc","handleAllocatorInit","HandleAllocator","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToNewUTF8","writeArrayToMemory","JSEvents","specialHTMLTargets","currentFullscreenStrategy","restoreOldWindowedStyle","demangle","demangleAll","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","ExceptionInfo","findMatchingCatch","getExceptionMessageCommon","incrementExceptionRefcount","decrementExceptionRefcount","getExceptionMessage","Browser","setMainLoop","wget","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","emscripten_webgl_power_preferences","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","GLFW","allocateUTF8","allocateUTF8OnStack","terminateWorker","killThread","cleanupThread","registerTLSInit","cancelThread","spawnThread","exitOnMainThread","proxyToMainThread","emscripten_receive_on_main_thread_js_callArgs","invokeEntryPoint","checkMailbox","InternalError","BindingError","throwInternalError","throwBindingError","awaitingDependencies","typeDependencies","tupleRegistrations","structRegistrations","sharedRegisterType","whenDependentTypesAreResolved","embind_charCodes","embind_init_charCodes","readLatin1String","getTypeName","heap32VectorToArray","requireRegisteredType","UnboundTypeError","PureVirtualError","init_embind","throwUnboundTypeError","ensureOverloadTable","exposePublicSymbol","replacePublicSymbol","extendError","createNamedFunction","embindRepr","registeredInstances","getBasestPointer","getInheritedInstance","getInheritedInstanceCount","getLiveInheritedInstances","registeredPointers","registerType","getShiftFromSize","integerReadValueFromPointer","floatReadValueFromPointer","simpleReadValueFromPointer","runDestructors","craftInvokerFunction","embind__requireFunction","genericPointerToWireType","constNoSmartPtrRawPointerToWireType","nonConstNoSmartPtrRawPointerToWireType","init_RegisteredPointer","RegisteredPointer","RegisteredPointer_getPointee","RegisteredPointer_destructor","RegisteredPointer_deleteObject","RegisteredPointer_fromWireType","runDestructor","releaseClassHandle","finalizationRegistry","detachFinalizer_deps","detachFinalizer","attachFinalizer","makeClassHandle","init_ClassHandle","ClassHandle","ClassHandle_isAliasOf","throwInstanceAlreadyDeleted","ClassHandle_clone","ClassHandle_delete","deletionQueue","ClassHandle_isDeleted","ClassHandle_deleteLater","flushPendingDeletes","delayFunction","setDelayFunction","RegisteredClass","shallowCopyInternalPointer","downcastPointer","upcastPointer","char_0","char_9","makeLegalFunctionName","emval_handles","emval_symbols","init_emval","count_emval_handles","Emval","emval_newers","emval_methodCallers","emval_registeredMethods","IDBFS"];$u.forEach(He);var Pu;be=function e(){Pu||Mu(),Pu||(be=e)};function Nu(){H(!T),Xi(),oe()}function Mu(){if(ye>0)return;if(T||Nu(),T){y(h),pe(),startWorker(h);return}if(me(),ye>0)return;function e(){Pu||(Pu=!0,h.calledRun=!0,!U&&(pe(),y(h),h.onRuntimeInitialized&&h.onRuntimeInitialized(),H(!h._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),_e()))}h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},1),e()},1)):e(),ae()}function wu(){var e=w,t=A,n=!1;w=A=function(t){n=!0};try{Ii(0),["stdout","stderr"].forEach(function(e){var t=Kt.analyzePath("/dev/"+e);if(t){var r=t.object,o=r.rdev,a=Nt.ttys[o];a&&a.output&&a.output.length&&(n=!0)}})}catch(e){}w=e,A=t,n&&pn("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.")}if(h.preInit)for(typeof h.preInit=="function"&&(h.preInit=[h.preInit]);h.preInit.length>0;)h.preInit.pop()();return Mu(),r.ready}})();typeof l=="object"&&typeof i=="object"?i.exports=d:typeof define=="function"&&define.amd&&define([],function(){return d})}),34);
|
|
204
|
+
__d("WAHex",["err"],(function(t,n,r,o,a,i,l){"use strict";var e=16,s=[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70],u=[48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102];function c(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(s[r>>4],s[r&15])}return String.fromCharCode.apply(String,t)}function d(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(u[r>>4],u[r&15])}return String.fromCharCode.apply(String,t)}function m(e){var t=_(e);if(t.length%2!==0)throw r("err")('parseHex given hex "'+t+'" which is not a multiple of 8-bits.');for(var n=new Uint8Array(t.length>>1),o=0,a=0;o<t.length;o+=2,a++)n[a]=p(t,o)<<4|p(t,o+1);return n.buffer}function p(e,t){var n=e.charCodeAt(t);return n<=57?n-48:n<=70?10+n-65:10+n-97}function _(e){if(/[^0-9a-fA-F]/.test(e))throw r("err")('"'+e+'" is not a valid hex');return e}function f(e){var t=e.buffer;return e.byteOffset===0&&e.length===t.byteLength?t:t.slice(e.byteOffset,e.byteOffset+e.length)}function g(e){for(var t=!0,n=e.length;t&&n;){var r=e[--n];t=32<=r&&r<127}return t?JSON.stringify(String.fromCharCode.apply(String,e)):c(e)}function h(t,n){n===void 0&&(n=!1);var r=_(t);return E(r,e),(n?"-":"")+"0x"+C(r,e)}function y(e,t,n){n===void 0&&(n=!1);var r=k(e),o=k(t);return(n?"-":"")+"0x"+r+o}function C(e,t){for(var n=t-e.length,r=e,o=0;o<n;o++)r="0"+r;return r}function b(e){var t=e<0,n=t?(-e).toString(16):e.toString(16);return h(n,t)}function v(e){return e.substring(e.indexOf("0x")+2)}function S(e){return e[0]==="-"}function R(e,t){var n=S(e),r=S(t);if(n!==r)return!n;var o=v(e)>v(t);return n?!o:o}function L(e){return S(e)?e.slice(1):"-"+e}function E(e,t){if(e.length>t)throw r("err")('"'+e+'" is longer than '+t*4+" bits.")}function k(e){if(e>4294967295||e<-4294967296)throw r("err")("uint32ToLowerCaseHex given number over 32 bits");var t=(e>=0?e:4294967296+e).toString(16);return C(t,8)}l.NUM_HEX_IN_LONG=e,l.HEX_LOWER=u,l.toHex=c,l.toLowerCaseHex=d,l.parseHex=m,l.hexAt=p,l.hexOrThrow=_,l.bytesToBuffer=f,l.bytesToDebugString=g,l.createHexLong=h,l.createHexLongFrom32Bits=y,l.hexLongFromNumber=b,l.hexLongToHex=v,l.hexLongIsNegative=S,l.isBiggerHexLong=R,l.negateHexLong=L}),98);
|
|
205
|
+
__d("WABinary",["WAHex","err"],(function(t,n,r,o,a,i,l){"use strict";var e=65533,s=10,u=new Uint8Array(s),c=new Uint8Array(0),d=(function(){function e(t,n){var r=this;t===void 0&&(t=c),n===void 0&&(n=!1),this.$1=new Uint8Array(0),this.$2=0,this.$4=0,this.write=function(){for(var t=0;t<arguments.length;t++){var n=t<0||arguments.length<=t?void 0:arguments[t];typeof n=="string"?r.writeString(n):typeof n=="number"?r.writeUint8(n):n instanceof e?r.writeBinary(n):n instanceof ArrayBuffer?r.writeBuffer(n):n instanceof Uint8Array&&r.writeByteArray(n)}},t instanceof ArrayBuffer?(this.$1=new Uint8Array(t),this.$2=this.$4=t.byteLength):t instanceof Uint8Array&&(this.$1=t,this.$2=this.$4=t.length),this.$5=0,this.$6=this.$3=0,this.$7=null,this.$8=n,this.$9=0,this.$10=0}var t=e.prototype;return t.size=function(){return this.$2-this.$3},t.peek=function(t,n){this.$9++;var e=this.$3,r=this.$5;try{return t(this,n)}finally{this.$9--,this.$3=e-(this.$5-r)}},t.advance=function(t){this.$11(t)},t.readWithViewParser=function(t,n,r,o){return n(this.$12(),this.$11(t),t,r,o)},t.readWithBytesParser=function(t,n,r,o){return n(this.$1,this.$11(t),t,r,o)},t.readUint8=function(){return g(this,1,y,!1)},t.readInt8=function(){return g(this,1,y,!0)},t.readUint16=function(t){return t===void 0&&(t=this.$8),g(this,2,C,t)},t.readInt32=function(t){return t===void 0&&(t=this.$8),g(this,4,b,t)},t.readUint32=function(t){return t===void 0&&(t=this.$8),g(this,4,v,t)},t.readInt64=function(t){return t===void 0&&(t=this.$8),g(this,8,S,j,t)},t.readUint64=function(t){return t===void 0&&(t=this.$8),g(this,8,S,K,t)},t.readLong=function(t,n){return n===void 0&&(n=this.$8),g(this,8,S,t,n)},t.readFloat32=function(t){return t===void 0&&(t=this.$8),g(this,4,R,t)},t.readFloat64=function(t){return t===void 0&&(t=this.$8),g(this,8,L,t)},t.readVarInt=function(t){var e=this.size(),n=h(this,0,E,e);return h(this,n,k,t)},t.readBuffer=function(t){return t===void 0&&(t=this.size()),t===0?new ArrayBuffer(0):h(this,t,I)},t.readByteArrayView=function(t){return t===void 0&&(t=this.size()),t===0?new Uint8Array(0):h(this,t,T)},t.readBinary=function(n,r){if(n===void 0&&(n=this.size()),r===void 0&&(r=this.$8),n===0)return new e(void 0,r);var t=h(this,n,T);return new e(t,r)},t.indexOf=function(t){if(t.length===0)return 0;for(var e=this.$1,n=this.$2,r=this.$3,o=0,a=r,i=r;i<n;i++)if(e[i]===t[o]){if(o===0&&(a=i),o++,o===t.byteLength)return i-r-t.byteLength+1}else o>0&&(o=0,i=a);return-1},t.readString=function(t){return h(this,t,D)},t.ensureCapacity=function(t){this.$13(this.$3+t)},t.ensureAdditionalCapacity=function(t){this.$13(this.$4+t)},t.writeToView=function(t,n,r,o){var e=this.$14(t);return n(this.$12(),e,t,r,o)},t.writeToBytes=function(t,n,r,o){var e=this.$14(t);return n(this.$1,e,t,r,o)},t.writeUint8=function(t){G(t,0,256,"uint8"),$(this,1,P,t,!1)},t.writeInt8=function(t){G(t,-128,128,"signed int8"),$(this,1,P,t,!0)},t.writeUint16=function(t,n){n===void 0&&(n=this.$8),G(t,0,65536,"uint16"),x(this,2,N,t,n)},t.writeInt16=function(t,n){n===void 0&&(n=this.$8),G(t,-32768,32768,"signed int16"),x(this,2,M,t,n)},t.writeUint32=function(t,n){n===void 0&&(n=this.$8),G(t,0,4294967296,"uint32"),x(this,4,w,t,n)},t.writeInt32=function(t,n){n===void 0&&(n=this.$8),G(t,-2147483648,2147483648,"signed int32"),x(this,4,A,t,n)},t.writeUint64=function(t,n){n===void 0&&(n=this.$8),G(t,0,18446744073709552e3,"uint64"),x(this,8,F,t,n)},t.writeInt64=function(t,n){n===void 0&&(n=this.$8),G(t,-9223372036854776e3,9223372036854776e3,"signed int64"),x(this,8,F,t,n)},t.writeFloat32=function(t,n){n===void 0&&(n=this.$8),x(this,4,O,t,n)},t.writeFloat64=function(t,n){n===void 0&&(n=this.$8),x(this,8,B,t,n)},t.writeVarInt=function(t){G(t,-9223372036854776e3,9223372036854776e3,"varint (signed int64)");var e=t<0,n=e?-t:t,r=Math.floor(n/4294967296),o=n-r*4294967296;e&&(r=~r,o===0?r++:o=-o);var a=H(r,o);$(this,a,W,r,o)},t.writeVarIntFromHexLong=function(t){for(var e=o("WAHex").hexLongIsNegative(t),n=e?o("WAHex").negateHexLong(t):t,r=o("WAHex").hexLongToHex(n),a=0,i=0,l=0;l<o("WAHex").NUM_HEX_IN_LONG;l++)a=a<<4|i>>>28,i=i<<4|o("WAHex").hexAt(r,l);e&&(a=~a,i===0?a++:i=-i);var s=H(a,i);$(this,s,W,a,i)},t.writeBinary=function(t){var e=t.peek(function(e){return e.readByteArrayView()});if(e.length){var n=this.$14(e.length);this.$1.set(e,n)}},t.writeBuffer=function(t){this.writeByteArray(new Uint8Array(t))},t.writeByteArray=function(t){var e=this.$14(t.length);this.$1.set(t,e)},t.writeBufferView=function(t){this.writeByteArray(new Uint8Array(t.buffer,t.byteOffset,t.byteLength))},t.writeString=function(t){$(this,_(t),q,t)},t.writeHexLong=function(t,n){n===void 0&&(n=this.$8),x(this,8,U,t,n)},t.writeBytes=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0;r<t.length;r++)G(t[r],0,256,"byte");$(this,t.length,V,t)},t.writeAtomically=function(t,n){this.$10++;var e=this.$4,r=this.$5;try{var o=t(this,n);return e=this.$4,r=this.$5,o}finally{this.$10--,this.$4=e-(this.$5-r)}},t.writeWithVarIntLength=function(t,n){var e=this.$4,r=this.writeAtomically(t,n),o=this.$4;this.writeVarInt(o-e);for(var a=this.$4-o,i=this.$1,l=0;l<a;l++)u[l]=i[o+l];for(var s=o-1;s>=e;s--)i[s+a]=i[s];for(var c=0;c<a;c++)i[e+c]=u[c];return r},e.build=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];for(var o=0,a=0;a<n.length;a++){var i=n[a];typeof i=="string"?o+=_(i):typeof i=="number"?o++:i instanceof e?o+=i.size():i instanceof ArrayBuffer?o+=i.byteLength:i instanceof Uint8Array&&(o+=i.length)}var l=new e;return l.ensureCapacity(o),l.write.apply(l,arguments),l},t.$12=function(){return this.$7||(this.$7=new DataView(this.$1.buffer,this.$1.byteOffset))},t.$11=function(t){if(t<0)throw r("err")("ReadError: given negative number of bytes to read");var e=this.$3,n=e+t;if(n>this.$2)throw r("err")(e===this.$2?"ReadError: tried to read from depleted binary":"ReadError: tried to read beyond end of binary");return this.$3=n,this.$9||(this.$6=n),e},t.$13=function(t){var e=this.$1;if(t<=e.length)return t;var n=this.$6,r=t-n,o=Math.max(r,2*(e.length-n),64),a=new Uint8Array(o);return n?(a.set(e.subarray(n)),this.$5+=n,this.$3-=n,this.$2-=n,this.$4-=n,this.$6=0):a.set(e),this.$1=a,this.$7=null,r},t.$14=function(t){var e=this.$13(this.$4+t),n=this.$4;return this.$4=e,this.$10||(this.$2=e),n},e})(),m="",p=0;function _(e){if(e===m)return p;for(var t=e.length,n=0,r=0;r<t;r++){var o=e.charCodeAt(r);if(o<128)n++;else if(o<2048)n+=2;else if(o<55296||57344<=o&&o<=65535)n+=3;else if(55296<=o&&o<56320&&r+1!==t){var a=e.charCodeAt(r+1);56320<=a&&a<57344?(r++,n+=4):n+=3}else n+=3}return m=e,p=n}function f(e,t,n){var r=t>>21;if(e){var o=t&2097151,a=!!(o||n);return r===0||r===-1&&a}else return r===0}function g(e,t,n,r,o){return e.readWithViewParser(t,n,r,o)}function h(e,t,n,r,o){return e.readWithBytesParser(t,n,r,o)}function y(e,t,n,r){return r?e.getInt8(t):e.getUint8(t)}function C(e,t,n,r){return e.getUint16(t,r)}function b(e,t,n,r){return e.getInt32(t,r)}function v(e,t,n,r){return e.getUint32(t,r)}function S(e,t,n,r,o){var a=e.getInt32(o?t+4:t,o),i=e.getInt32(o?t:t+4,o);return r(a,i)}function R(e,t,n,r){return e.getFloat32(t,r)}function L(e,t,n,r){return e.getFloat64(t,r)}function E(e,t,n,o){for(var a=Math.min(o,s),i=0,l=128;i<a&&l&128;)l=e[t+i++];if(i===s&&l>1)throw r("err")("ParseError: varint exceeds 64 bits");return l&128?i+1:i}function k(e,t,n,r){var o=0,a=0,i=n;n===s&&(i--,a=e[t+i]&1);for(var l=i-1;l>=0;l--)o=o<<7|a>>>25,a=a<<7|e[t+l]&127;return r(o,a)}function I(e,t,n){var r=t+e.byteOffset,o=e.buffer;return r===0&&n===o.byteLength?o:o.slice(r,r+n)}function T(e,t,n){return e.subarray(t,t+n)}function D(t,n,r){for(var o=n+r,a=[],i=null,l=n;l<o;l++){a.length>5e3&&(i||(i=[]),i.push(String.fromCharCode.apply(String,a)),a=[]);var s=t[l]|0;if((s&128)===0)a.push(s);else if((s&224)===192){var u=Q(t,l+1,o);if(u){l++;var c=(s&31)<<6|u&63;c>=128?a.push(c):a.push(e)}else a.push(e)}else if((s&240)===224){var d=Q(t,l+1,o),m=Q(t,l+2,o);if(d&&m){l+=2;var p=(s&15)<<12|(d&63)<<6|m&63;p>=2048&&!(55296<=p&&p<57344)?a.push(p):a.push(e)}else d&&l++,a.push(e)}else if((s&248)===240){var _=Q(t,l+1,o),f=Q(t,l+2,o),g=Q(t,l+3,o);if(_&&f&&g){l+=3;var h=(s&7)<<18|(_&63)<<12|(f&63)<<6|g&63;if(h>=65536&&h<=1114111){var y=h-65536;a.push(55296|y>>10,56320|y&1023)}else a.push(e)}else _&&f?(l+=2,a.push(e)):(_&&l++,a.push(e))}else a.push(e)}var C=String.fromCharCode.apply(String,a);return i?(i.push(C),i.join("")):C}function x(e,t,n,r,o){return e.writeToView(t,n,r,o)}function $(e,t,n,r,o){return e.writeToBytes(t,n,r,o)}function P(e,t,n,r){e[t]=r}function N(e,t,n,r,o){e.setUint16(t,r,o)}function M(e,t,n,r,o){e.setInt16(t,r,o)}function w(e,t,n,r,o){e.setUint32(t,r,o)}function A(e,t,n,r,o){e.setInt32(t,r,o)}function F(e,t,n,r,o){var a=r<0,i=a?-r:r,l=Math.floor(i/4294967296),s=i-l*4294967296;a&&(l=~l,s===0?l++:s=-s),e.setUint32(o?t+4:t,l,o),e.setUint32(o?t:t+4,s,o)}function O(e,t,n,r,o){e.setFloat32(t,r,o)}function B(e,t,n,r,o){e.setFloat64(t,r,o)}function W(e,t,n,r,o){for(var a=r,i=o,l=t+n-1,s=t;s<l;s++)e[s]=128|i&127,i=a<<25|i>>>7,a>>>=7;e[l]=i}function q(e,t,n,r){for(var o=t,a=r.length,i=0;i<a;i++){var l=r.charCodeAt(i);if(l<128)e[o++]=l;else if(l<2048)e[o++]=192|l>>6,e[o++]=128|l&63;else if(l<55296||57344<=l)e[o++]=224|l>>12,e[o++]=128|l>>6&63,e[o++]=128|l&63;else if(55296<=l&&l<56320&&i+1!==a){var s=r.charCodeAt(i+1);if(56320<=s&&s<57344){i++;var u=65536+((l&1023)<<10|s&1023);e[o++]=240|u>>18,e[o++]=128|u>>12&63,e[o++]=128|u>>6&63,e[o++]=128|u&63}else e[o++]=239,e[o++]=191,e[o++]=189}else e[o++]=239,e[o++]=191,e[o++]=189}}function U(e,t,n,r,a){for(var i=o("WAHex").hexLongIsNegative(r),l=o("WAHex").hexLongToHex(r),s=0,u=0,c=0;c<16;c++)s=s<<4|u>>>28,u=u<<4|o("WAHex").hexAt(l,c);i&&(s=~s,u===0?s++:u=-u),e.setUint32(a?t+4:t,s,a),e.setUint32(a?t:t+4,u,a)}function V(e,t,n,r){for(var o=0;o<n;o++)e[t+o]=r[o]}function H(e,t){var n,r;for(e?(n=5,r=e>>>3):(n=1,r=t>>>7);r;)n++,r>>>=7;return n}function G(e,t,n,o){if(typeof e!="number"||e!==e||Math.floor(e)!==e||e<t||e>=n)throw r("err")(typeof e=="string"?'TyperError WriteError: string "'+e+'" is not a valid '+o:"TypeError WriteError: "+String(e)+" is not a valid "+o)}function z(e,t,n){var o=f(e,t,n),a;t>=0?a=t:a=e?t:4294967296+t;var i=n>=0?n:4294967296+n,l=a*4294967296+i;if(!o)throw r("err")("ReadError: integer exceeded 53 bits ("+l+")");return l}function j(e,t){return z(!0,e,t)}function K(e,t){return z(!1,e,t)}function Q(e,t,n){if(t>=n)return 0;var r=e[t]|0;return(r&192)===128?r:0}l.Binary=d,l.numUtf8Bytes=_,l.longFitsInDouble=f,l.parseInt64OrThrow=j,l.parseUint64OrThrow=K}),98);
|
|
206
|
+
__d("WACryptoSha256Builder",["WABinary"],(function(t,n,r,o,a,i,l){"use strict";var e=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=64,u=4,c=(function(){function t(){this.h0=0,this.h1=0,this.h2=0,this.h3=0,this.h4=0,this.h5=0,this.h6=0,this.h7=0,this.tail=new Uint8Array(0),this.size=0,this.reset()}var n=t.prototype;return n.reset=function(){this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225,this.tail=new Uint8Array(0),this.size=0},n.update=function(t){var e=new Uint8Array(this.tail.length+t.length);for(e.set(this.tail),e.set(t,this.tail.length),this.size+=t.length*8;e.length>=s;){var n=e.subarray(0,s);this.$1(n),e=e.slice(s)}return this.tail=e,this},n.$2=function(){var e=new Uint8Array(64);if(e.set(this.tail),e.set(new Uint8Array([128]),this.tail.length),this.tail.length+9>s){this.$1(e);var t=g(new Uint8Array(0),this.size);this.$1(t)}else{var n=g(e,this.size);this.$1(n)}},n.finish=function(){this.$2();var e=new(o("WABinary")).Binary;return e.writeUint32(this.h0),e.writeUint32(this.h1),e.writeUint32(this.h2),e.writeUint32(this.h3),e.writeUint32(this.h4),e.writeUint32(this.h5),e.writeUint32(this.h6),e.writeUint32(this.h7),this.reset(),e.readByteArrayView()},n.$1=function(n){for(var t=[],r=0;r<16;r++){var o=n.subarray(r*u,u*(r+1)),a=o[0]<<24|o[1]<<16|o[2]<<8|o[3];t.push(a)}for(var i=16;i<64;i++){var l=d(t[i-15]),s=m(t[i-2]),c=t[i-16]+(t[i-7]+l+s)>>>0;t.push(c)}for(var _=this.h0,f=this.h1,g=this.h2,h=this.h3,y=this.h4,C=this.h5,b=this.h6,v=this.h7,S=0;S<64;S++){var R=p(y,6)^p(y,11)^p(y,25),L=y&C^~y&b,E=p(_,2)^p(_,13)^p(_,22),k=_&f^_&g^f&g,I=v+R+L+e[S]+t[S],T=E+k;v=b,b=C,C=y,y=h+I>>>0,h=g,g=f,f=_,_=I+T>>>0}this.h0=this.h0+_>>>0,this.h1=this.h1+f>>>0,this.h2=this.h2+g>>>0,this.h3=this.h3+h>>>0,this.h4=this.h4+y>>>0,this.h5=this.h5+C>>>0,this.h6=this.h6+b>>>0,this.h7=this.h7+v>>>0},t})();function d(e){var t=p(e,7),n=p(e,18),r=_(e,3);return t^n^r}function m(e){var t=p(e,17),n=p(e,19),r=_(e,10);return t^n^r}function p(e,t){return e>>>t|e<<32-t}function _(e,t){return e>>>t}function f(e){return new Uint8Array(new Uint32Array([e]).buffer)}function g(e,t){var n=new Uint8Array(s);n.set(e);var r=f(t);return n.set(r.subarray(0,1),n.length-1),n.set(r.subarray(1,2),n.length-2),n.set(r.subarray(2,3),n.length-3),n.set(r.subarray(3,4),n.length-4),n.set(r.subarray(4,5),n.length-5),n.set(r.subarray(5,6),n.length-6),n.set(r.subarray(6,7),n.length-7),n.set(r.subarray(7,8),n.length-8),n}l.Sha256Builder=c,l.sigma0=d,l.sigma1=m,l.rotateRight=p,l.shiftRight=_}),98);
|
|
207
|
+
__d("WACryptoSha256BuilderV2",["WABinary"],(function(t,n,r,o,a,i,l){"use strict";var e=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=64,u=4,c=(function(){function t(){this.h0=0,this.h1=0,this.h2=0,this.h3=0,this.h4=0,this.h5=0,this.h6=0,this.h7=0,this.tail=new Uint8Array(0),this.size=BigInt(0),this.$1=new Int32Array(64),this.reset()}var n=t.prototype;return n.reset=function(){this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225,this.tail=new Uint8Array(0),this.size=BigInt(0)},n.update=function(t){var e=0;if(this.tail.length>0){var n=s-this.tail.length;if(t.length<n){var r=new Uint8Array(this.tail.length+t.length);return r.set(this.tail),r.set(t,this.tail.length),this.tail=r,this.size+=BigInt(t.length)*BigInt(8),this}var o=new Uint8Array(s);o.set(this.tail),o.set(t.subarray(0,n),this.tail.length),this.$2(o),e=n}for(;e+s<=t.length;)this.$2(t.subarray(e,e+s)),e+=s;return this.tail=e<t.length?t.slice(e):new Uint8Array(0),this.size+=BigInt(t.length)*BigInt(8),this},n.$3=function(){var e=new Uint8Array(64);if(e.set(this.tail),e.set(new Uint8Array([128]),this.tail.length),this.tail.length+9>s){this.$2(e);var t=f(new Uint8Array(0),this.size);this.$2(t)}else{var n=f(e,this.size);this.$2(n)}},n.finish=function(){this.$3();var e=new(o("WABinary")).Binary;return e.writeUint32(this.h0),e.writeUint32(this.h1),e.writeUint32(this.h2),e.writeUint32(this.h3),e.writeUint32(this.h4),e.writeUint32(this.h5),e.writeUint32(this.h6),e.writeUint32(this.h7),this.reset(),e.readByteArrayView()},n.$2=function(n){for(var t=this.$1,r=0;r<16;r++){var o=r*u;t[r]=n[o]<<24|n[o+1]<<16|n[o+2]<<8|n[o+3]}for(var a=16;a<64;a++){var i=d(t[a-15]),l=m(t[a-2]);t[a]=t[a-16]+(t[a-7]+i+l)>>>0}for(var s=this.h0,c=this.h1,_=this.h2,f=this.h3,g=this.h4,h=this.h5,y=this.h6,C=this.h7,b=0;b<64;b++){var v=p(g,6)^p(g,11)^p(g,25),S=g&h^~g&y,R=p(s,2)^p(s,13)^p(s,22),L=s&c^s&_^c&_,E=C+v+S+e[b]+t[b],k=R+L;C=y,y=h,h=g,g=f+E>>>0,f=_,_=c,c=s,s=E+k>>>0}this.h0=this.h0+s>>>0,this.h1=this.h1+c>>>0,this.h2=this.h2+_>>>0,this.h3=this.h3+f>>>0,this.h4=this.h4+g>>>0,this.h5=this.h5+h>>>0,this.h6=this.h6+y>>>0,this.h7=this.h7+C>>>0},t})();function d(e){var t=p(e,7),n=p(e,18),r=_(e,3);return t^n^r}function m(e){var t=p(e,17),n=p(e,19),r=_(e,10);return t^n^r}function p(e,t){return e>>>t|e<<32-t}function _(e,t){return e>>>t}function f(e,t){var n=new Uint8Array(s);n.set(e);var r=new DataView(n.buffer,n.byteOffset+n.length-8,8);return r.setBigUint64(0,t,!1),n}l.Sha256BuilderV2=c,l.sigma0=d,l.sigma1=m,l.rotateRight=p,l.shiftRight=_}),98);
|
|
208
|
+
__d("WACryptoSha256HmacBuilder",["WACryptoSha256Builder","WACryptoSha256BuilderV2","gkx"],(function(t,n,r,o,a,i,l){"use strict";function e(){return r("gkx")("24703")?new(o("WACryptoSha256BuilderV2")).Sha256BuilderV2:new(o("WACryptoSha256Builder")).Sha256Builder}var s=(function(){function t(t){this.$1=e(),this.$2=new Uint8Array(0),this.reset(t)}var n=t.prototype;return n.reset=function(n){this.$2=new Uint8Array(64),n.length>64?this.$2.set(e().update(n).finish(),0):this.$2.set(n,0);var t=this.$2.map(function(e){return e^54});this.$1=e().update(t)},n.update=function(t){return this.$1.update(t),this},n.finish=function(){var t=this.$2.map(function(e){return e^92}),n=this.$1.finish();return e().update(t).update(n).finish()},t})();l.Sha256HMacBuilder=s}),98);
|
|
209
|
+
__d("WACryptoHkdfSync",["WABinary","WACryptoSha256HmacBuilder","err"],(function(t,n,r,o,a,i,l){"use strict";var e=32,s=new Uint8Array(e),u=255*e;function c(e,t){return new(o("WACryptoSha256HmacBuilder")).Sha256HMacBuilder(t!=null?t:s).update(e).finish()}function d(t,n,a){if(a===void 0&&(a=new Uint8Array(0)),n<0||n>u)throw r("err")("HKDF::expand given bad length "+n);for(var i=Math.ceil(n/e),l=new Uint8Array(0),s=new(o("WABinary")).Binary,c=1;c<=i;c++)l=new(o("WACryptoSha256HmacBuilder")).Sha256HMacBuilder(t).update(o("WABinary").Binary.build(l,a,c).readByteArrayView()).finish(),s.writeByteArray(l);return s.readByteArrayView(n)}function m(e,t,n,r){return d(c(e,t),r,n)}l.hkdf=m}),98);
|
|
210
|
+
__d("WAWebBweModelHashes",[],(function(t,n,r,o,a,i){"use strict";var e="wa_bwe_pl_classifier_mobile",l={v7:7,v11:11,v12:12,v13:13,v14:14,v16:16,v17:17,v18:18,v19:19,v20:20,v21:21,v24:24,v25:25,v2002:2002,v3011:3011,v3012:3012,v3013:3013,v7012:7012,v7013:7013,prod_v1:5001,prod_v2:5002,prod_v4:5004,prod_v5:5005,prod_v6:5006,prod_v7:5007,prod_v8:5008,prod_v9:5009,prod_v10:5010,prod_v11:5011,prod_v12:5012,prod_v13:5013,prod_v14:5014,prod_v15:5015,prod_v16:5016,prod_v17:5017,prod_v18:5018,prod_v19:5019,prod_v20:5020,prod_v21:5021,prod_v22:5022,prod_v23:5023,prod_v24:5024,prod_v25:5025,prod_v26:5026,prod_v27:5027,prod_v28:5028,prod_v29:5029,prod_v30:5030,prod_v31:5031,prod_v35:5035,prod_v37:5037,prod_v38:5038,prod_v39:5039,prod_v40:5040,prod_v41:5041,prod_v42:5042,prod_v43:5043,prod_v46:5046,prod_v47:5047,prod_v48:5048,prod_v49:5049,prod_v50:5050,prod_v51:5051,prod_v52:5052,prod_v53:5053,prod_v54:5054,prod_v55:5055,prod_v56:5056,prod_v57:5057,prod_v58:5058,prod_v59:5059,prod_v60:5060,prod_v61:5061,prod_v62:5062,prod_v63:5063,prod_v64:5064,prod_v65:5065,prod_v66:5066,prod_v67:5067,prod_v68:5068,prod_v69:5069,prod_v70:5070,prod_v71:5071,prod_v72:5072,prod_v73:5073,prod_v74:5074,prod_v75:5075,prod_v76:5076,prod_v77:5077,prod_v78:5078,prod_v79:5079,prod_v80:5080,prod_v81:5081,prod_v82:5082,v8011:8011,undershoot_v2_temp:999999,undershoot_v3_temp:999998,undershoot_v4_temp:999996,undershoot_v5_40us:999994,undershoot_v5_20us:999993,undershoot_v5_30us:999992,undershoot_v6_40us:999991,undershoot_v6_30us:999990,undershoot_v7_40us:999899,undershoot_v7_30us:999898,undershoot_v7_40us_4feature:999897,undershoot_v8_40us:999896,undershoot_v9_40us:999895,undershoot_v10_40us:999894,undershoot_v11_40us_8feature:999892,undershoot_v12_40us_8f:999891,undershoot_v13_40us_8f_wifi:999888,undershoot_v13_40us_8f_cellular:999887,undershoot_v13_40us_8f_mix:999886,undershoot_v13_40us_7f_wifi:999885,undershoot_v13_40us_7f_cellular:999884,undershoot_v13_40us_7f_mix:999883,undershoot_v13_30us_8f_wifi:999882,undershoot_v13_30us_8f_mix:999881,undershoot_v13_30us_8f_cellular:999880,undershoot_v13_30us_8f_he_wifi:999879,undershoot_v13_40us_8f_he_wifi:999878,undershoot_v7_30us_7f_lab_iter1:999877,undershoot_v14_40us_8f_hehd:999876,undershoot_v14_30us_8f_hehd:999875,undershoot_v15_40us_8f_he_ppaimd:999857,undershoot_v15_30us_8f_he_ppaimd:999856,hard_samples_30pct_7f:999855,v999878_retrained_pt:899878,v999878_retrained_et:799878,tr_poc_v0:300001,"999876_hardsample_600":999604,"999876_hardsample_400":999605,"999876_hardsample_600_both_et":999623,"999876_hardsample_400_both_et":999624,v797801_no_delay_no_ml_et:797801,v797802_no_delay_no_ml_no_super_et:797802,v797803_no_delay_ml_et:797803,v797804_no_delay_ml_no_super_et:797804,"999851_et":799851,v999992_7f_et:797808,v799878_hardfp_ovst30_lb1000:797809,v799878_hardfp_ovst50_lb500:797810,v999623_hardfp_ovst50_lb500:797811,v900111:900111,v900112:900112,v900113:900113,v900114:900114,v900115:900115,v900116:900116,v999825:999825,v999826:999826,v999827:999827,v999828:999828,v999829:999829,v999830:999830,v999831:999831,v999832:999832,tr_poc_v0_et:300002,cong_v0:699e3,"999608_et":999638,tr_v1_et:300003,cong_v1_gen:699001,cong_v1_50:699002,cong_v1_frz:699003,tr_v1_et_fix:300004,labprodcluster:900118,v900119:900119,v900120:900120,v900121:900121,v900122:900122,v900123:900123,v900124:900124,v900125:900125,v900126:900126,v900127:900127,v900128:900128,v999800:999800,v900133:900133,v900134:900134,v900135:900135,v900136:900136,v900137:900137,v900138:900138,mlcong020:699020,mlcong021:699021,mlcong022:699022,mlcong023:699023,91e6:91e6,465803:465803,465100:465100,699030:699030,699042:699042,699045:699045,699047:699047,699048:699048,15e3:15e3,900212:900212,900211:900211,900209:900209,7780730:7780730,7780501:7780501,57903172:57903172,5790317:5790317,7780708:7780708,5790715:5790715,200002:200002,77900180:77900180,77900181:77900181,14e3:14e3,7781010:7781010},s={7:"b83952d8d1a00b244ea0c3d29f91a45cf49f79e8d59a08fc5cc48b992d242494",11:"86eefda8c400d301fc848138b9a10e8040f741fb8f85d27546ef1ed61a005349",12:"32838c9ae9b2af5d4771bace15a11f726dbf8d2d7226d0244a70121f2d34b625",13:"4bea7432024d23b58e33dfcd67390a7ad81aa7f5fde4760e444a8927b9840ac8",14:"ff80e4448577142aca12e1dd1cb5a6d3300e3c70aba455f3fa66edda6717622c",16:"1cf1122dd0ff0a17da56717adaa9a70bc4d5195cd1cbd2194fd22e496e0b793b",17:"ca50aceafef83b010cc437804f5987bce446002e673f00e23d8aa78b6d784e48",18:"8a0b6813f029314a399c1dc205ac56cace97f1e33a9d4a794d8fa639e75b6adf",19:"9cb6b4d354e9a223e556148a6feee761b00655766e808adc313b45280aba45a1",20:"0b93d10ee3cf83cc10a78e7fc277ec75b03a648e9ab2ef3c122a0ee085767022",21:"ebd3903ca2d4558a656ed57557f7d3caaa1db0680b2a5a8d9a7aa1685fea5e1c",24:"1c716e1089b9fc8e6aefe82054e5d06406c332cf98961795728c58b205f88db7",25:"5e5704dd36469e7dba07c432217538e3caf5eb6e248379b30527293de7f42513",2002:"65106216033d517a2dc044e7c98cda838a14e8d3a783b6a6e84024d01228b26b",3011:"220a911ffda4efb502dd14d7369fe5562ded06111903a0cdf8f5ef8f220c3d79",3012:"a413b407f6f4f8113d4ab976613b44715246f6e8cb8511029603087d4c09fafa",3013:"cd0f9e3d528b66f51cd535db1ee489e9733dcd50d379f038a39ca6fe52d3d399",7012:"e9a7d332c027133621b768255382be1524ba24e4b05deeffce47456307bdb539",7013:"157f66d21fa92c41017ffbff4f54d52e8e03af939efbc5fd2159b64f62e433ef",5001:"8fe82268826c9da8549c3c961e0b0190bb62eabb37ff07a13a3a6e1a60031ad4",5002:"7c2ce5af974e623a7e38631e9122a2d7eeb996e36c6b585dc4c0184908458f55",5004:"483a01be303eabf87252bfc67960623ca5aa5bb262677160d2c30be552c9f529",5005:"cf742e9f00d8cc2d2efa3f9122ffced10b6c7b7296d1ac64f7fc7b8411616c0e",5006:"5f2919b195414501d20ee49c11d615d3d6d0841877660614e23f9074e5332747",5007:"35ca6f46470caecabd46cb1bf922c6bf79df509b37acfc08e57046eaa3925d67",5008:"e6b0924be3d0e160f15ead0a170e0ac3bdc6ec5978fba0ffedead5da48dd04fe",5009:"c0b9582c501f1a81a34426cf7a8b3876bb0fea8e55399bf729e8b023fe722be7",5010:"d252527a4606baee3ce6ab9e35f0e90eeba4f67877258e48b74f00917aa40cd5",5011:"14b25c1a5ec0f19a1ad29aa79cbd607ab661581cfe753e215808d25ed33c5328",5012:"dd219d236aa08ace9427712cb12d9bbd10476c44861cc1687bd57212acd35e1f",5013:"a9c124278fe0edfba4f3314f403fc36ea9857ea66ae8c9af1d927a88932ce02a",5014:"b9f295c0718898aafe0561a379814552c7f0975a2fdd6eb3658913c86ac0d4c6",5015:"a1b24db180bc9814c007659b3095de643bd97cfb527f3004b16f295a619c5156",5016:"d3d0add11ebe0e28447f806fdc299247b2ee91041a9c6271e4bfcc9b3c12dd98",5017:"5f13d3f701f8ac25334190a2e028701c29ce95f58acc2415a4c01d72a7a16190",5018:"5f53f85dcc5c63d68632a5ec2fea3e1b32e8472169b58ee5fe27d25819cdb24f",5019:"c31372d1bb8f67803f6c80ba852663b69aa5b45c38669208573c3f3eeb103252",5020:"16dce42336e957d6f253da9650628db75c505ff6128c967c1d1742319f5d28f5",5021:"81fe230dc8ef12daa9be38e25f38b059fc5c4985e45ba645189cb4cfa3b14482",5022:"dd9d7c978f8cbbabcf866bd4a99c572ef3cb56ebb9296bc7b4ce4232045e2b32",5023:"8be7a7dcc0df9cb1cbcf80d2b3be510f781df8e56357dde08a9c0def4888468e",5024:"d2fb7088e9e7368d1bc6ac04b25e897e1cf5acc7a840de16097f22f896a68299",5025:"206229b86bab73793054b5ae7f7d8908f57612022bdb3d7aca77c25a0efea785",5026:"bab1d8f4843025c48446e23f7a8f0640a124968a6d806a9541b5b5e6bb73efd6",5027:"fa283ffe414872f2d8f62365197dd2d1fd1fcdb13bcde931bf9ee95e1910622f",5028:"cf7c4d52f08683d35965819fd56319e5c8b0bbf43f58e96022ff62f2a8db968d",5029:"a67c1bea1d03c9449acc26d1eb58d520282048a9812ba2bb6cb530c78c13d94c",5030:"3f9e4ef25635a41dd97c47c073aa94c8b8295f868aa84554a855b7e06a06e715",5031:"91f8b5c2deeabe1b64827514b9e30abf4a91a3fae97f9421575ef801476eaaae",5035:"fa49b2efc23d9b024733e262cadcdb678b8e749a4affa2e2436de4c88b10033a",5037:"4956322fe0c39f3e453faabd99febae72e6a29ee81a956219b28b5cffb326ced",5038:"041a4fbe368fd5fccb58dc3713b252ec3ee8303c62db655360203b97f8edf5c6",5039:"74e3115e931781ed54d18ceae76d3566e672d95e7e6a8b4513d591ca8b80c7b4",5040:"2b874d02c4cbac86472f2851a6d8b41868c30919078d0646750bf877f73efce5",5041:"12c3f40cdfff4cf6bddb1d413a5c8ad7a25c2b640841a0288435c22b9f500131",5042:"5028f39384893311e24e0ebfed16f915f2cc29f38dbb184890f1c3789a123db5",5043:"38c1447f8d63b1c58d9a688203cd0165da7050959de799ec0b69eb78fb15dd35",5046:"5dfc930f0b17a2919517995a7107ea13a15d20ac95916911ff93b07563dc72ff",5047:"3519ce37c67480d56ff3317bae0dd40586211580799fd3b7a274702aa1ecba6a",5048:"305994223e4404c518effc8d50013bfe2098f664f838858d86517730f6c788ea",5049:"c28b4868cd90dda56564ffc9f14966941ed67a577a4569530dfded48fccaa4e9",5050:"8174024f858d68db0089aa8d7730a448100949545826f673c4f59a6d2fd73f2e",5051:"2c99aae11fb90aed9c6376cd2251ae25c4121dd73ae6ae417a5917f253fa4327",5052:"e822a91f7d1eae30fbe9fbd641293248b71f9ffd90acaea5e7e46892e01db825",5053:"c465ed87a4936e5fb400968778dea138413aa05bacfdafdd4daafdcbd3c1c11f",5054:"dad4631253e0a1b4d1f9344bae7448a192865ac1f197d12a0edb0e9583921f22",5055:"ab460b204151dcfe041d4449d5a78d4c71f151b1a15830813c06a58638250627",5056:"5f808752623c1e361f41e031f56eceebd0bfb386eec9d33426ef271da59da095",5057:"a8c7ce55db71f11d2bfe9cd54e358d5834da6791ac06e50b4ad3cd6382f17863",5058:"84a085540169bf3a9e20c66882ea1768cc91ab25fdd7bb08b64228778d135253",5059:"2dfb9dcce80d45d01edbf6ba982dea5e0457f39b5c8892e2a17c881bd3573890",5060:"1538261eb08e72804330e4cb04c6a9f0c9fef824f8e34c0df0342477e863fdfc",5061:"1bf4b1dbf272c04f02300227287cd80d861c7ca8b1eb705b419d05ae1382ef10",5062:"c6bd4fdb72ec3bf67928874c335bfecd1696054208ac4c61c95902c96bda8b63",5063:"9d9b6898950778ffde678c8adb9a5a04badc845d17715f1e923ca5018fa09467",5064:"50fa8c8da578422d8e540a9bb5dd00062fe11a9feef347a282587f7a1023c2a5",5065:"15764ad761437a3eda69b25c226f3e18cf7bb8ae5c87eb235c23c1f60a2d82c0",5066:"b0efc7453914c1f22993cadb5438cf7c779508cff03e03fb1f852b4f02f2ed27",5067:"b0a3fced421896fa42f232780cb5c5768605df45fc3410907a7ad0db8208383e",5068:"1419cda3573a1b19976877badb18276abc81ec350df475b60e0810d68b2a1d00",5069:"f36cd5a1fe29157a8297175f6e7ef69295de740dcb1a5b6a517a1ea56bf330ef",5070:"154263e2f1ee00dcd5d736ece877633e7dd45acab036eb2ecd78fca9efb3dafa",5071:"82e9094f5666b134e4ea6aa2c56d73ac9a253036ce2a51489c20855028380312",5072:"19787b79045f4addbf2e0336cb4bf18a95da69c782481e7cdc1c68e3a74ba18e",5073:"fbeecd265a5576d8f232bdae7dde6dfaeadb3c8305f8e16fa59b9c6db036635c",5074:"491c0a9a88f28eebb7441816c789f5e54b75a724447ab1750ed30a1fc686adfe",5075:"f7cf0ac6fa0a6e9dca018ad52c4131f55a9442e64776355489746e0b59ba3096",5076:"72ece708f2d9cc559acba7cdb6748ed4ce1115f89c4b5c8d7c4adfdaa4bc43d8",5077:"8abf06430fca77714e6795b18b326c32e4ee351ea0f31c9a2298f7cebc72402b",5078:"8d282d547aa687e6e0ba1e38966299e5044683f9c106b3bc4c21f6091685f170",5079:"00267191c3087245a0a66b5d61637a40598a7da996da6f0ee141922fc08585c9",5080:"413cebe32cfc41cfc97cec21a0a8ea41514a9ab2951f798273d69e6b8728ca0c",5081:"f5ca04a9a159b4768f8b9cdf9521221340e2dde8ad8d5103c6a1fb3fb6e48885",5082:"500aa2b30ef21f59256f57b9f60ca8c56b88a1ca180c55ed4a357abe68a8921b",8011:"521b5c03b99607f8a3de6cd98a1543548c246820b2c8b3e121900c864c43ba8f",999998:"adf8701ce15dab4e106a692a3be6db34669c4d015afb742f0a60f9411221d99c",999999:"551381da90f20907804a40789a4968947cf9d596c62d7509189163a4f4c5f6c3",999996:"5d1c3e2c4bc3c156db5bad84de65cb915d611c511e0fd6c7a5fd3180e86aa598",999994:"6f6bde73f52d05c8b16f1a02661a9011a2da1756bcef16b2d3ddb7a115b49484",999993:"dc11ff081271a2d70b66d8152bef5c7eaedaed3b33eca73a6b16bb63961c54cd",999992:"24307bd2c514a0e3e75ce5a9bd620444f169cd4c5cfa4abf039fa01b2ea46167",999991:"ea38afaf2e5eba18658aa19dc895a4a916d623da35ae050e08b66e15f9ae0adf",999990:"11b7c5d9d85449d199fa3782ebd1b1d54f8dbd7599bfcf1a7b05708855b9d155",999899:"d1e13468b17a7cc1d097d184798ca480c4e3757f30f3dcb40a4cca3bf8f49223",999898:"6c959b2010b2288625f0b5cf6aa7923367a726717dd99a2bb1d2f892fcce57c5",999897:"9630f6ee22f38d9202d79de8b8ddd51aebfec6c88d1a483f28577ec293faa096",999896:"1c535e609c26bb45fa1559ebe74c70993e4788d6da9b7eadd1cec106c6c15b55",999895:"509e04de1d96438e6970bbe95da9e3aadc9ba51c5147a0702ec1173a89fddaa0",999894:"cc765267d4f6bab290b9e02f48cb7060ec973652b303571e08f17d28c9a0d71f",999892:"dc6c32ce506ae629d92d964546dd4e06a201eb1fe875564907ff711b522d6177",999891:"1fb6a1815e6efcad09819e66fabfc73a4df1f3e2ae0dca2c8d5283e581ad91b0",999888:"20729dfd80d42212704a9ee5d10cc5067eab4bfac648c7ea05be0e757a6ba499",999887:"709c065ef76cc292f4cfb5ea9cb51cb8a3e6b13f5bfc0e3573e10c8de2828c89",999886:"c022dfe3b6415dbb61f1af740884ad278a5c1227963eca89feb7b0645905c6de",999885:"fea6db1f313bda4583eec4a91f80675241921b75896daf7ddc902cc3ace8c0c6",999884:"0cc4ff7e6d3fdf1e239b14d684f20a11ad624022832dab41330cd6ff54bd7990",999883:"598150aaac93b08df8cdc31655341ac39bc285711c7958f03ff79dc8cab54ad5",999882:"acb79c0cc858c4c9f06afd7310eedf9bc37784db8efcc4813339f998dad7a69b",999881:"f19ee893f10f7f7eba622628da5dcc6b69e53da041e02218e5b1ea63df6206d5",999880:"04af28e411e94f658e7d606173cb65b06da70b4fb60e78fff79781e640e3857f",999879:"ad19fe3464c82a4b5863bced600e8ee85d862a31bde7a9d83f9a184caabff68d",999878:"939e550bf3fbdde2df43715b1ab0a66e7bb1a941b656c8f9058ca1c55fdea822",999877:"aaf3fe6789e6cae5e9f8003f3c3ce8d29b7b55307f991fe018cedc47c630c5fc",999876:"c128306c748fb925a5ed420f5b0412a9740204f1298d345e02fae0dcce46ca37",999875:"f907e4f504d31e228ffd6a4233ac4fc004c370307e6e603cc9bf0bbfe5d219d2",999857:"d9f0f7343681a1389fdace48918efa0b4faa36fefbe6dd8dbd9090c19039c2fd",999856:"59401a7f8d70d3b12cec94d03ec6becd7be855bbff9b2201a58c31bf678703b5",999855:"4221a6f44bd8eb7e01f6eaabd8977b7d4114ba13615d25992417fdbc7217847f",899878:"79ce28291607fe92854277857800bfade9e3ecc4c5a2701924ac346f6987de9d",799878:"6d2efe3d08de503151e2e00ef31d910c226f2a5fc1f8889b62722a32d699d2e5",797801:"c5fcb7eb2861151d15a42a1cde23c6c899fec6ba9e01617ea08ec080bf8cd691",797802:"2c4559bc133a34a068b55cf1e9cd83572e97f62d95aea50c60b60678ad24e442",797803:"dde382a4abaa682fe940c3099c48c85091dba036ef2005e226a2249795c30a86",797804:"eca7e01bf14083cf2a47cb2ba6c187aeb32555ee3d02d8bcba5188ec0e299e10",799851:"42f8e7cdff818a0e93ce441c7c90b36f1d4a8afa2ac5a137c9d364db9620b63b",797808:"3e59f2680b12f264a94016becbc6c17cfef3dcd397429e0be5459d13c560180a",797809:"d7b68ecc138b44ec4263431582ffe67e8090c860e0ef78b357a73cf4de742316",797810:"b657ae154186a387d1ca955dd8747d3fd12723cf7287e58e90e579643e4fa7aa",797811:"e3e67770ee6e0a941372809904fb719dde5874fd65ba2057f951517b317de7ba",900111:"b29b2f08996d14d26152e37f65bcbbc654bb43dd4b2c99637a4d403560fe4a6a",900112:"40ea7fa2af5aa334583730c08c36d12d01854fc0ca60fb4af62aec6150cb0e47",900113:"5580842fa542f220f0fa9cedf009cd62123631a0061c6e7f6ebc38357e533871",900114:"1b933fd47ea029b73135b7fc26d90802b03979a7be7d6c09866ff60fc1385c2b",900115:"9d12ef1cfd4e677424f83ef67fb3df709d1efe8b1cb53c0112947b89d25cd1a1",900116:"9e5802f463c8947110af63cd3ec1e86e9c6064c5bb1707603e274d32bcb311f9",999825:"490cccd4d2e6b91e02cf7c8b288f3911517389d9ce01a1128f6d2e7c433c4bed",999826:"9cedf630d4f551dfde4bf23e34832aa810b2bfea54780b76ba40eb53d2f9546f",999827:"d706c954de53419e6cd745e8a758abf59cd530893951e29fb573310c56fbf50a",999828:"27f4a9d2a03f0fb1a8a7ff879d344003e0e3e4c09313a3172de45fae2d83fc58",999829:"9ee194146ed086ad71511cd098f1d35fca73c764829c25796a507cff6f8ef7f6",999830:"4f0e0124db0b0da9867db225e72a660975fdd9c1f6dda4c4d9d435ca1bba3e68",999831:"c13ac6e078fb625f07d940dd3efea475121925fca97d26dbc5a77a252e08e0cd",999832:"858a85361c01b8b9f3c48606f0f9178d52a9d2a3e59431af3b3c49861d666998",300001:"ae2bcbcabf2690e0c779c8bf532632714f11fb795e5eebfe874c541d37e86f9a",999604:"c195a9eeb9fe30734e82a4caff0095bf0fb1f85af9993ab36187d359483047c4",999605:"7eae08ae71b8442cd2715d2d3d976fcb353224820cd5c220187f914de8b2dee6",999623:"93e5689de9a79af17cbc3a136f124d9966fc89e63c4660edca32a2f960e8e591",999624:"603dd9f29e659f26ec1852caf65d939db326d5915d2389ce564551330114185c",300002:"5924f30a5d742d1f7d07e9a140c71f1f952d3693f7e16082883eb58518f1a20d",699e3:"b5867d666ea2321718588dff2d64de7f9b51cd5c5fd2eeaf3bbe6c02fa546c6d",999638:"4bb16fbf7079805571c9b92d87ff24f5f2fe236d1d24213e1ebb31de712f7698",300003:"310c609836a6f23716b93984f91231b8067b717b867d4fabf5a079a016c34e65",699001:"f3f5c52977f50a7cda5bf2ee69695888483259cb713d11c5a593052cec26984a",699002:"71b53d4ad1a72281970002e673336f0b8b5efcdce9cbd8e7ab6d02eff1ea296f",699003:"34901b21bc01b156afb8d7ce27a83111aea59d5978d258c8515b0c839fd41c29",300004:"9136556c834d0293f180b65c3b9390522157e7f664adca0d16e4795b1f45798a",900118:"c2ecbe03d4f4fed2ccf1f4197f06e1aea6816154dc7c47638452a01aeeb960dc",900119:"5516d644894032e5fb30bdda12fa5f23fcaa4425ce0993358042801bad5d9e6c",900120:"715688e2f400868ff7f7e584783e1e52f9094fc5f1138ca96f31d1cd14baaa03",900121:"151780b529352249cb8633f025b8fa744f9a56cffae8996d3410befe177d5335",900122:"216e5e244eb165e9aa8baa2e9cb851247b69f136edf4dd5a39a53f5920c8460a",900123:"4f8f31a1bbf60cb64bffe24017a82aab19f837420f6c513cb71a9366324c8fb5",900124:"7248eeeb70cd8b27a59cf725032637b390580d77a8baf109009b012128fd7751",900125:"da30987d99e2b3b1cbabeeaac646ccd7c264d1aca19f1c6a2bc842fbb84b44a9",900126:"701138a87e1ded38f35a751eb124f1d0bf5e86a46ead233a1104aba1a14a70d0",900127:"fe7c7f425c53da3e2fb1d0c8b6ef072402a61c6618a1acacab2f6c7ae25754e9",900128:"6996d5222775d1bdfaab5625680b5eac1d8da98d7352542a172a6736fcd4b53c",999800:"4f9478119f4eb145be5b5919df301e3aab7aa23f791ea701d705e4bfd600d16d",900133:"1aff56c59f4bb366fd4672b011d48b16a231934472233cbdd57412bc4f5b97d9",900134:"adc9d127bf3577fb918dd72e4975f5adede6c787c4fa87a7216c78e2f73faa74",900135:"2414621211232c35590c80f419f3c0c9d47c66f6119201fe938e1dbb67bc81d6",900136:"5d874e7f726a8f4d830501ab12d0bcc27e81edba746d11289051c4c5183603f3",900137:"bfcf9bf967ef23bdafd5c8456f417489ee0cd15a8e1873425aee66ce721cec39",900138:"6a2b232b1867ae28ec2cf16ec4a9610d1f06d1830d57d7e9c9cbbc1d1c9bf338",699020:"36b31daa2f506e5e9a9771a8a9cefc227867f91ff20192564fe684b46213556e",699021:"6e260565af4cc6a6959aedef7e25f08db40141936decc81f2b65ae043a0d7069",699022:"e1d49c351c5529a359f53ff6e950fda5121fe33b3e4fafbc6f08d8c5d25ab44b",699023:"0cde66c008f05f34627845aca5e57eba7eafc5db8c8082a7aa7737146905c7e4",91e6:"1fb89e4bbd33a06be67e56309ef21bd71456603b52fc3ff02172a431314b5f1f",465803:"34fe4555ac66f82290ac038a251b3363088d4eb1922783ed774befc9aed69e5c",465100:"127164282f54ce4112f81618bda21a493fbda114ac71c2c51fefb4a410d70fc2",699030:"1d24f640ca3352115f909ff285ae119410b86ae3f310ef9ce9254abcaf7f3863",699042:"216a70b565e37c731c1752ea713dff8833980c6bd4d07bdbece8c8bce23b95ce",699045:"f5a58855b8c7112209d0a0b4aeb6af2f93f40526b04c28d4145cb15e56af5a08",699047:"62a7ef542c9f4b976a61c0736992c982ffe606b8d4c62eb4c40f0308f49f508b",699048:"d863c29dee151f46027631cb16ba6ce9fc30b4d3b467e23e09a01ebf5e4778c6",15e3:"bd25dac5bbc91a755ce80d3b96472f5d6425d35767de6e489dff0f6d21143373",900212:"49600b58ce3f1161de789850a8f56b9b72c0d32e3331aa4e2d7498d4724dcb6e",900211:"6a98bb6adcca2cf7be523fa27902dab1e9071097c8f98228ecaeeacef49cec66",900209:"e7afba460b60dee3305677f163931a63000f7d99fefb1d4748a22c1c01d26098",7780730:"9dde60c17e50dec409e70a362a74cc20cc293b7e59e53f5d59cbb15e3af1fd24",7780501:"5812d009b5f8404ebf89654c2bd3b4b14d83b007cba4def655ad5354445bbff5",57903172:"e82b93e9777e295e626f2b37a610c90817841bc72ca274181d2e56f131bf174f",5790317:"c0e7e9c6500a5440646047c01d3c43b19c61f72ffb322f7f9bd9e240f263a4c5",7780708:"73bcedadd4edbd2851669842d58c8dd99cc0c84341d3b5661cd36cb86a053156",5790715:"9acc076d666b201593107651f42a415f2d6c7eacf4c9def32dd9cda1ec8fca3e",200002:"ac95b5a0c3ece014bf98c9a431bedb11e19fc8b109d56efaa1f70ff59a58d77c",77900180:"ffa1978c57699cfc3bed3b34819e46b10ca583ec7668e92fec795ea4a8b0ec06",77900181:"ffa1978c57699cfc3bed3b34819e46b10ca583ec7668e92fec795ea4a8b0ec06",14e3:"65da0001e7b961b9fbfb4511e3fc8c8d2e7286064beb56ede38233dcb6978dcc",7781010:"9934277dfd02cf87ca5031b560a08d43f1f178cbf2aba43cc55441b84bd49ac0"};function u(e){var t;return(t=s[e])!=null?t:null}function c(e){if(Object.hasOwn(l,e))return l[e];var t=parseInt(e,10);return isNaN(t)?null:t}function d(e,t,n){var r=u(e);return r!=null?{type:"use-sha256",sha256Hash:r}:t?n!=null&&n!==""?{type:"use-md5",md5Hash:n}:{type:"skip"}:{type:"error",reason:"SHA-256 hash not found for version "+e+" and hash check is required"}}i.BWE_MODEL_NAME=e,i.getBweModelVersion=c,i.determineHashCheckMethod=d}),66);
|
|
211
|
+
__d("WALoggerUtils",["WAHex"],(function(t,n,r,o,a,i,l){"use strict";function e(e){if(typeof e=="string")return"'"+e+"'";if(e==null||typeof e!="object")return String(e);if(Array.isArray(e))return"["+e.join(",")+"]";if(e instanceof Uint8Array){if(e.length<64)return"<<"+s(e)+">>";var t=e.subarray(0,32);return"<<"+s(t)+", "+(e.length-t.length)+" more bytes>>"}else return e instanceof Error?e.name?"("+e.name+")":"":e.toString===Object.prototype.toString?JSON.stringify(e,function(e,t){return e?String(t):t}):String(e)}function s(e){for(var t=!0,n=e.length;t&&n;){var r=e[--n];t=32<=r&&r<127}return t?JSON.stringify(String.fromCharCode.apply(String,e)):o("WAHex").toHex(e)}function u(t,n){var r=[t[0]];return n.forEach(function(n,o){r.push(e(n),t[o+1])}),r.join("")}function c(e){return e}function d(e){return e*100+"%"}l.debugStr=e,l.rebuildTemplate=u,l.dynamicLoggingSampling=c,l.loggingSamplingAsString=d}),98);
|
|
212
|
+
__d("WATagsLogger",["Promise","WALoggerUtils","asyncToGeneratorRuntime"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c=new(s||(s=n("Promise")))(function(e){u=e});function d(){return m.apply(this,arguments)}function m(){return m=n("asyncToGeneratorRuntime").asyncToGenerator(function*(){yield c}),m.apply(this,arguments)}var p=null;function _(e){p=e,u==null||u(),u=null}var f={count:function(){},debug:function(){},info:function(){},logRestricted:function(){},warn:function(){},error:function(){},devConsole:function(){}};function g(){return p==null?f:p}function h(e){return{TAGS:function(n){return h([].concat(e,n))},COUNT:function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];var i=o("WALoggerUtils").rebuildTemplate(n,r),l={level:"COUNT",template:n,expressions:r,logString:i};return g().count(i,e,l),y(l)},DEV:function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];var i=o("WALoggerUtils").rebuildTemplate(n,r),l={level:"DEV",template:n,expressions:r,logString:i};return g().debug(i,e,l),y(l)},DEV_XMPP:function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];var i=o("WALoggerUtils").rebuildTemplate(n,r),l={level:"DEV_XMPP",template:n,expressions:r,logString:i};return g().logRestricted(i,e,l),y(l)},LOG:function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];var i=o("WALoggerUtils").rebuildTemplate(n,r),l={level:"LOG",template:n,expressions:r,logString:i};return g().info(i,e,l),y(l)},WARN:function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];var i=o("WALoggerUtils").rebuildTemplate(n,r),l={level:"WARN",template:n,expressions:r,logString:i};return g().warn(i,e,l),y(l)},ERROR:function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];var i=o("WALoggerUtils").rebuildTemplate(n,r),l={level:"ERROR",template:n,expressions:r,logString:i},s=void 0;for(var u of r)if(u instanceof Error){s=u;break}return s!=null?g().error(i,e,s,l):g().error(i,e,void 0,l),y(l)},CATCHING:function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];var i=o("WALoggerUtils").rebuildTemplate(n,r),l={level:"CATCHING",template:n,expressions:r,logString:i};return g().error(i,e,void 0,l),y(l)},EXPECTED_ERROR:function(n){for(var t=arguments.length,r=new Array(t>1?t-1:0),a=1;a<t;a++)r[a-1]=arguments[a];var i=o("WALoggerUtils").rebuildTemplate(n,r),l={level:"ERROR",template:n,expressions:r,logString:i,tags:[].concat(e)};return y(l)}}}function y(t){return{verbose:function(){return t.verbose=!0,y(t)},color:function(n){return t.color=n,y(t)},devConsole:function(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=g()).devConsole.apply(e,[t.level,t.logString,[]].concat(r)),y(t)},sendLogs:function(r,o){if(g().sendLogs!=null){var n,a;t.sendLogs={reason:r,sampling:o==null?void 0:o.sampling,sendLogsType:o==null?void 0:o.sendLogsType,separateEmployeeLog:o==null?void 0:o.separateEmployeeLog,employeeSampling:o==null?void 0:o.employeeSampling},(n=(a=g()).sendLogs)==null||n.call(a,t)}else if(t.level!=="ERROR"&&t.level!=="CATCHING")return h([]).ERROR(e||(e=babelHelpers.taggedTemplateLiteralLoose(["[","] ",""])),r,t.logString);return y(t)},tags:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(t.tags=n,g().tags!=null){var o,a;(o=(a=g()).tags)==null||o.call(a,n)}return y(t)},expect:function(n){var e,r,o,a,i,l;if(t.level!=="ERROR")return y(t);var s=void 0;for(var u of t.expressions)if(u instanceof Error){s=u;break}var c=(e=(r=(o=s)==null?void 0:o.message)!=null?r:(a=s)==null?void 0:a.name)!=null?e:(i=s)==null?void 0:i.description;for(var d of n)if(c!=null&&c.includes(d)){var m;return g().error(t.logString,[].concat((m=t.tags)!=null?m:[],["expected-error-log"]),s!=null?s:void 0,t),y(t)}return g().error(t.logString,(l=t==null?void 0:t.tags)!=null?l:[],s!=null?s:void 0,t),y(t)},catching:function(n){return t.expressions.push(n),y(t)}}}l.whenReady=d,l.initializeWaLogger=_,l.TAGS=h,l.getWaLoggerAdditionalOptions=y}),98);
|
|
213
|
+
__d("WALogger",["$InternalEnum","WATagsLogger"],(function(t,n,r,o,a,i,l){"use strict";var e=n("$InternalEnum").Mirrored(["UNCAUGHT_EXCEPTION_SAD","UNHANDLED_REJECTED_PROMISE_SAD","CRASH_OR_UNRECOVERABLE_ERROR_SAD","USER_FORCEFULLY_LOGGED_OUT_SAD","PERFORMANCE_OBSERVER_LONGTASK_SAD","UNCATEGORIZED_SAD","EXTREMELY_BAD_USER_EXPERIENCE_SAD","UNCAUGHT_EXCEPTION","UNHANDLED_REJECTED_PROMISE","MINOR_ISSUE","INVESTIGATION","COUNTING_STAT","UNCATEGORIZED"]),s=new Set([e.UNCATEGORIZED_SAD,e.UNCAUGHT_EXCEPTION_SAD,e.UNHANDLED_REJECTED_PROMISE_SAD,e.CRASH_OR_UNRECOVERABLE_ERROR_SAD,e.USER_FORCEFULLY_LOGGED_OUT_SAD,e.EXTREMELY_BAD_USER_EXPERIENCE_SAD,e.PERFORMANCE_OBSERVER_LONGTASK_SAD]),u=o("WATagsLogger").TAGS([]),c=u.COUNT,d=u.DEV,m=u.DEV_XMPP,p=u.ERROR,_=u.EXPECTED_ERROR,f=u.LOG,g=u.WARN;l.SendLogsType=e,l.SadSendLogsTypes=s,l.COUNT=c,l.DEV=d,l.DEV_XMPP=m,l.ERROR=p,l.EXPECTED_ERROR=_,l.LOG=f,l.WARN=g}),98);
|
|
214
|
+
__d("WAWebIDBFSStorageBackend",["Promise","WALogger","asyncToGeneratorRuntime"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c,d,m,p,_,f,g,h,y,C,b="WAWebIDBFSStorageBackend",v="/wa_voip_storage/ml_models",S=(function(){function t(e){e===void 0&&(e=v),this.$1=null,this.$2=!1,this.$4=!1,this.$5=[],this.$6=!1,this.$7=!1,this.$3=e}var r=t.prototype;return r.initialize=function(n){this.$1=n;var t=this.$8();if(t==null){o("WALogger").WARN(e||(e=babelHelpers.taggedTemplateLiteralLoose(["",": FS unavailable in WASM module, storage disabled"])),b);return}this.$2=!0},r.$8=function(){return this.$1==null?null:this.$1.FS},r.$9=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(){var e=this;if(this.$4)return new(C||(C=n("Promise")))(function(t){e.$5.push(t)});var t=this.$8();if(t==null)return o("WALogger").WARN(s||(s=babelHelpers.taggedTemplateLiteralLoose(["",": FS not available for sync"])),b),!1;this.$4=!0;try{yield new(C||(C=n("Promise")))(function(e,n){t.syncfs(!1,function(t){t?n(t):e()})});var r=this.$5;this.$5=[];for(var a of r)a(!0);return!0}catch(e){o("WALogger").WARN(u||(u=babelHelpers.taggedTemplateLiteralLoose(["",": Failed to sync to IndexedDB: ",""])),b,e instanceof Error?e.message:String(e));var i=this.$5;this.$5=[];for(var l of i)l(!1);return!1}finally{this.$4=!1,this.$5.length>0&&!this.$6&&(this.$6=!0,this.$9().finally(function(){e.$6=!1}))}});function t(){return e.apply(this,arguments)}return t})(),r.$10=function(t){if(!this.$7){try{t.mkdir(this.$3)}catch(e){}this.$7=!0}},r.$11=function(t,n){return this.$3+"/"+t+"_"+n},r.isReady=function(){return this.$2&&this.$1!=null},r.write=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t,n){if(!this.isReady()){o("WALogger").WARN(c||(c=babelHelpers.taggedTemplateLiteralLoose(["",": Storage backend not initialized, skipping write for "," v",""])),b,e,t);return}var r=this.$8();if(r==null){o("WALogger").WARN(d||(d=babelHelpers.taggedTemplateLiteralLoose(["",": FS not available, skipping write for "," v",""])),b,e,t);return}var a=this.$11(e,t);try{this.$10(r),r.writeFile(a,new Uint8Array(n)),yield this.$9()}catch(n){o("WALogger").WARN(m||(m=babelHelpers.taggedTemplateLiteralLoose(["",": Failed to write model "," v",": ",""])),b,e,t,n instanceof Error?n.message:String(n))}});function t(t,n,r){return e.apply(this,arguments)}return t})(),r.read=function(t,n){if(!this.isReady())return o("WALogger").WARN(p||(p=babelHelpers.taggedTemplateLiteralLoose(["",": Storage backend not initialized"])),b),null;var e=this.$8();if(e==null)return o("WALogger").WARN(_||(_=babelHelpers.taggedTemplateLiteralLoose(["",": FS not available"])),b),null;var r=this.$11(t,n);try{var a=e.readFile(r);return a.buffer}catch(e){return o("WALogger").WARN(f||(f=babelHelpers.taggedTemplateLiteralLoose(["",": Failed to read model "," v",": ",""])),b,t,n,e instanceof Error?e.message:String(e)),null}},r.delete=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t){if(!this.isReady()){o("WALogger").WARN(g||(g=babelHelpers.taggedTemplateLiteralLoose(["",": Storage backend not initialized, skipping delete for "," v",""])),b,e,t);return}var n=this.$8();if(n==null){o("WALogger").WARN(h||(h=babelHelpers.taggedTemplateLiteralLoose(["",": FS not available, skipping delete for "," v",""])),b,e,t);return}var r=this.$11(e,t);try{n.unlink(r),yield this.$9()}catch(e){}});function t(t,n){return e.apply(this,arguments)}return t})(),r.deleteMultiple=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){if(!(!this.isReady()||e.length===0)){var t=this.$8();if(t==null){o("WALogger").WARN(y||(y=babelHelpers.taggedTemplateLiteralLoose(["",": FS not available, skipping batch delete"])),b);return}for(var n of e){var r=n.modelName,a=n.version,i=this.$11(r,a);try{t.unlink(i)}catch(e){}}yield this.$9()}});function t(t){return e.apply(this,arguments)}return t})(),r.list=function(){if(!this.isReady())return[];var e=this.$8();if(e==null)return[];var t=[];try{var n=e.readdir(this.$3);for(var r of n)if(!(r==="."||r==="..")){var o=r.lastIndexOf("_");if(o!==-1){var a=r.substring(0,o),i=r.substring(o+1),l=parseInt(i,10);if(!isNaN(l))try{var s=this.$3+"/"+r,u=e.stat(s);t.push({modelName:a,version:l,fileSizeBytes:u.size})}catch(e){}}}}catch(e){}return t},r.getFilePath=function(t,n){if(!this.isReady())return null;var e=this.$8();if(e==null)return null;var r=this.$11(t,n);try{return e.stat(r),r}catch(e){return null}},t})();function R(e){return new S(e)}l.ML_MODEL_PERSIST_DIR=v,l.IDBFSStorageBackend=S,l.createIDBFSStorageBackend=R}),98);
|
|
215
|
+
__d("WAGetMediaDevicesSupportedConstraints",["WALogger"],(function(t,n,r,o,a,i,l){"use strict";var e;function s(){try{var t,n=(t=navigator.mediaDevices)==null?void 0:t.getSupportedConstraints();return n}catch(t){return o("WALogger").LOG(e||(e=babelHelpers.taggedTemplateLiteralLoose(["getSupportedConstraints is not supported in this browser. Error: ",""])),t),null}}l.getMediaDevicesSupportedConstraints=s}),98);
|
|
216
|
+
__d("WAWebVoipBrowserAudioStatus",["WAGetMediaDevicesSupportedConstraints","WALogger"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u=null;function c(e){u=e}function d(){return u}function m(){if(u==null){var t=o("WAGetMediaDevicesSupportedConstraints").getMediaDevicesSupportedConstraints(),n=(t==null?void 0:t.echoCancellation)===!0,r=(t==null?void 0:t.noiseSuppression)===!0,a=(t==null?void 0:t.autoGainControl)===!0;n||r||a?(u={echoCancellation:n,noiseSuppression:r,autoGainControl:a},o("WALogger").LOG(e||(e=babelHelpers.taggedTemplateLiteralLoose(["[preDetectBrowserAudioCapabilities] EC="," NS="," AGC=",""])),String(n),String(r),String(a))):o("WALogger").LOG(s||(s=babelHelpers.taggedTemplateLiteralLoose(["[preDetectBrowserAudioCapabilities] no AEC/NS/AGC support"])))}}l.setBrowserAudioProcessingApplied=c,l.getBrowserAudioProcessingApplied=d,l.preDetectBrowserAudioCapabilities=m}),98);
|
|
217
|
+
__d("WAWebVoipContactLookupSyncBridge",[],(function(t,n,r,o,a,i){"use strict";var e=0,l=1,s=8,u=5e3,c=Reflect.get(globalThis,"Atomics"),d=function(t,n,r,o){return c.wait(t,n,r,o)};function m(){var e=new SharedArrayBuffer(s),t=new Int32Array(e);return{buffer:t.buffer,view:t}}function p(t,n,r,o,a){r===void 0&&(r=d),o===void 0&&(o=u);var i=m(),s=i.buffer,p=i.view;c.store(p,e,0),c.store(p,l,0),n({type:"waWasmWorkerCompatibleCallback",__name:"contactLookupSyncRequest",jid:t,buffer:s});var _=r(p,e,0,o);if(_==="timed-out")return a==null||a({jid:t,outcome:"timed-out",timeoutMs:o}),!1;var f=c.load(p,l)===1;return a==null||a({jid:t,outcome:f?"known":"unknown",timeoutMs:o}),f}i.resolveParticipantKnownContactSync=p}),66);
|
|
218
|
+
__d("SecurePostMessage",["invariant"],(function(t,n,r,o,a,i,l){"use strict";var e="*",s={sendMessageToSpecificOrigin:function(n,r,o,a){o!==e||l(0,21157),n.postMessage(r,o,a)},sendMessageForCurrentOrigin:function(t,n){t.postMessage(n)},sendMessageAllowAnyOrigin_UNSAFE:function(n,r,o){n.postMessage(r,e,o)}};a.exports=s}),null);
|
|
219
|
+
__d("WAWebVoipJsWorkerMessageHandlerHelpers",[],(function(t,n,r,o,a,i){function e(e,t){try{globalThis.postMessage({type:"waWasmWorkerCompatibleCallback",__name:"loggingCallback",level:e,message:t})}catch(e){}}function l(e,t){var n,r=t,o=r.error,a={bufferedAmount:e.bufferedAmount,eventType:(n=r.type)!=null?n:"error",readyState:e.readyState};return(o==null?void 0:o.name)!=null&&(a.errorName=o.name),(o==null?void 0:o.message)!=null&&(a.errorMessage=o.message),(o==null?void 0:o.errorDetail)!=null&&(a.errorDetail=o.errorDetail),(o==null?void 0:o.sctpCauseCode)!=null&&(a.sctpCauseCode=o.sctpCauseCode),(o==null?void 0:o.sentAlert)!=null&&(a.sentAlert=o.sentAlert),(o==null?void 0:o.receivedAlert)!=null&&(a.receivedAlert=o.receivedAlert),a}function s(e){var t=["eventType="+e.eventType,"readyState="+e.readyState,"bufferedAmount="+String(e.bufferedAmount)];return e.errorName!=null&&t.push("name="+e.errorName),e.errorMessage!=null&&t.push("message="+e.errorMessage),e.errorDetail!=null&&t.push("errorDetail="+e.errorDetail),e.sctpCauseCode!=null&&t.push("sctpCauseCode="+String(e.sctpCauseCode)),e.sentAlert!=null&&t.push("sentAlert="+String(e.sentAlert)),e.receivedAlert!=null&&t.push("receivedAlert="+String(e.receivedAlert)),t.join(", ")}function u(e){if(e.byteLength<2)return!1;var t=new Uint8Array(e);return(t[0]&192)===0}var c=8,d=5,m=3480,p=3478;function _(e,t,n){return e[t%n]}function f(e,t,n){var r=_(e,t,n),o=_(e,t+1,n);return r+o*256}function g(e,t,n,r){var o=new Uint8Array(n),a=t%r,i=a+n;if(i<=r)o.set(e.subarray(a,i));else{var l=r-a;o.set(e.subarray(a,r)),o.set(e.subarray(0,n-l),l)}return o}function h(e,t,n){var r;return n?r=t:r=t===m||t===p?m:t,e.includes(":")?"["+e+"]:"+r:e+":"+r}i.logToPhysicalLogs=e,i.getDataChannelErrorDetails=l,i.formatDataChannelErrorDetails=s,i.isStunPacket=u,i.RING_BUFFER_HEADER_BYTES=c,i.RING_BUFFER_ENTRY_HEADER_BYTES=d,i.TRUE_WEB_CLIENT_RELAY_PORT=m,i.FAUX_WEB_CLIENT_RELAY_PORT=p,i.readRingByte=_,i.readRingU16LE=f,i.readRingBytes=g,i.getConnectionIdFromIpPort=h}),66);
|
|
220
|
+
__d("WAWebVoipStatsTracker",[],(function(t,n,r,o,a,i){"use strict";var e=1e4;function l(e){return{min:e,max:e,total:e,samples:1}}var s=(function(){function e(){this.$1=new Map,this.$2=null,this.$3=null}var t=e.prototype;return t.record=function(t,n){var e=this.$1.get(t);e==null?this.$1.set(t,l(n)):(e.min=Math.min(e.min,n),e.max=Math.max(e.max,n),e.total+=n,e.samples++)},t.getStats=function(t){return this.$1.get(t)},t.getMostActiveId=function(){var e=null,t=0;for(var n of this.$1){var r=n[0],o=n[1];o.samples>t&&(t=o.samples,e=r)}return e},t.formatStats=function(t){var e=this.$1.get(t);if(e==null||e.samples===0)return null;var n=Math.round(e.total/e.samples);return"min="+e.min+", max="+e.max+", avg="+n+", samples="+e.samples},t.formatSummary=function(){var e=this.getMostActiveId();if(e==null)return null;var t=this.$1.get(e);if(t==null||t.samples===0)return null;var n=Math.round(t.total/t.samples);return t.samples+" samples, min="+t.min+", max="+t.max+", avg="+n},t.resetAll=function(){for(var e of this.$1.values())e.min=1/0,e.max=0,e.total=0,e.samples=0},t.remove=function(t){this.$1.delete(t)},t.clear=function(){this.$1.clear()},t.startPolling=function(t){var e=this;this.$3==null&&(this.$2=t,this.$3=globalThis.setInterval(function(){t.onInterval(e),t.resetPerInterval===!0&&e.resetAll()},t.intervalMs))},t.stopPolling=function(){this.$3!=null&&(globalThis.clearInterval(this.$3),this.$3=null),this.$2=null;var e=this.formatSummary();return this.clear(),e},t.isPolling=function(){return this.$3!=null},e})();i.DEFAULT_POLL_INTERVAL_MS=e,i.VoipStatsTracker=s}),66);
|
|
221
|
+
__d("WAWebBackendApi",["Promise","err"],(function(t,n,r,o,a,i,l){var e,s=null;function u(e,t,n){if(!s)throw r("err")("fireAndForget called before setApi!");s.fireAndForget(e,t,n)}function c(t,o,a){return s?s.sendAndReceive(t,o,a):(e||(e=n("Promise"))).reject(r("err")("sendAndReceive called before setApi!"))}function d(e){s=e}function m(e,t){u("event",e,t)}function p(e,t){return c("event",e,t)}l.fireAndForgetInternalDoNotUse=u,l.sendAndReceiveInternalDoNotUse=c,l.setApi=d,l.frontendFireAndForget=m,l.frontendSendAndReceive=p}),98);
|
|
222
|
+
__d("WAWebVoipJsWorkerThread",["WAWebBackendApi","WorkerMessagePort","asyncToGeneratorRuntime"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(){function e(e){this.$1=e,this.$2=e.startJsWorkerThread(),this.$3=e.getJsWorkerPThreadId(this.$2),this.worker=o("WorkerMessagePort").CastWorkerMessagePort(e.PThread.pthreads[this.$3])}e.create=(function(){var t=n("asyncToGeneratorRuntime").asyncToGenerator(function*(){var t=yield o("WAWebBackendApi").frontendSendAndReceive("initializeVoipWasm");return new e(t)});function r(){return t.apply(this,arguments)}return r})();var r=e.prototype;return r.joinJsWorkerThread=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(){var e=this,n=this.$1.tryJoinJsWorkerThread(this.$2);if(n!==0)return t.setTimeout(function(){return e.joinJsWorkerThread()},100)});function r(){return e.apply(this,arguments)}return r})(),r.shutdown=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(){this.worker.postMessage({type:"cmd",cmd:"jsWorkerCmd",jsWorkerCmd:"shutdown"}),yield this.joinJsWorkerThread()});function t(){return e.apply(this,arguments)}return t})(),e})();l.default=e}),98);
|
|
223
|
+
__d("WAWebVoipMediaEnums",["$InternalEnum"],(function(t,n,r,o,a,i){var e=n("$InternalEnum")({Unknown:0,Normal:1,Rotate90:2,Rotate180:3,Rotate270:4}),l=n("$InternalEnum")({NV12:0,I420:1,RGB24:2,RGBA:3,H264:100,UNKNOWN:-1});function s(e){return e===l.NV12?"NV12":e===l.I420?"I420":e===l.RGBA?"RGBA":null}function u(e,t,n,r){var o,a,i=(o=globalThis.screen)==null?void 0:o.orientation,l=i!=null?(i.angle%360+360)%360:0,s=(a=i==null?void 0:i.type)!=null?a:"";if(l===0&&s.startsWith("landscape"))return 0;var u=e>t,c=n>r,d=l===90||l===270,m=d?!c:c;return u!==m?1:0}function c(t,n){var r,o;n===void 0&&(n=!1);var a=(r=globalThis.screen)==null?void 0:r.orientation,i=a!=null?(a.angle%360+360)%360:0,l=Math.floor(i/90)%4,s=n?(t-l+4)%4:(t+l)%4;return s===0?e.Normal:(o=e.cast(s+1))!=null?o:e.Normal}function d(e){return e==="NV12"?l.NV12:e==="I420"?l.I420:e==="RGBA"?l.RGBA:l.UNKNOWN}i.Orientation=e,i.WAWebVoipVideoFormat=l,i.videoFrameFormatFromFormatEnum=s,i.detectSensorOffset=u,i.computeVideoOrientation=c,i.formatEnumFromVideoFrameFormat=d}),66);
|
|
224
|
+
__d("isEmptyObject",[],(function(t,n,r,o,a,i){"use strict";function e(e){for(var t in e)return!1;return!0}i.default=e}),66);
|
|
225
|
+
__d("WAWebEventEmitter",["err","isEmptyObject"],(function(t,n,r,o,a,i,l){var e=/\s+/,s=0,u=(function(){function t(){}var n=t.prototype;return n.on=function(t,n,o){if(n==null)return this;if(typeof n!="function")throw r("err")("Callback parameter passed is not a function");return this.$2.apply(this,[this.on].concat(Array.prototype.slice.call(arguments)))?this:(this.$3(t).push({callback:n,context:o}),this)},n.once=function(t,n,r){if(n==null)return this;if(this.$2.apply(this,[this.once].concat(Array.prototype.slice.call(arguments))))return this;var e=this,o=!1,a=function(){o||(o=!0,e.off(t,a),n.apply(this,arguments))};return a._callback=n,this.on(t,a,r)},n.off=function(t,n,r){var e=this.eventMap;if(!e)return this;if(this.$2.apply(this,[this.off].concat(Array.prototype.slice.call(arguments))))return this;if(!t&&n==null&&r==null)return this.eventMap=void 0,this;for(var o=t?[t]:Object.keys(e),a=0;a<o.length;a++){var i=o[a],l=e[i];if(l){if(e[i]=[],n!=null||r!=null)for(var s=0;s<l.length;s++){var u=l[s];(n&&n!==u.callback&&n!==u.callback._callback||r!=null&&u.context!==r)&&e[i].push(u)}e[i].length||delete e[i]}}return this},n.trigger=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(!this.eventMap)return this;if(this.$2.apply(this,[this.trigger].concat(Array.prototype.slice.call(arguments))))return this;var o=this.$4(t),a=this.$4("all");return o&&this.$5(o,n),a&&this.$5(a,arguments),this},n.stopListening=function(t,n,o){var e,a=this.$1;if(!a)return this;var i=t==null?void 0:t.listenId,l=i?(e={},e[i]=t,e):a,s=!n&&!o;for(var u in l){var c=l[u];c.off(n,o,this);var d=c.eventMap;(s||!d||r("isEmptyObject")(d))&&delete a[u]}return(!this.$1||r("isEmptyObject")(this.$1))&&(this.$1=void 0),this},n.listenTo=function(t,n,r){return r==null?this:(this.$6(t),t.on(n,r,this),this)},n.listenToOnce=function(t,n,r){return this.$6(t),t.once(n,r,this),this},n.listenToAndRun=function(t,n,r){return this.listenTo.apply(this,arguments),r.apply(this),this},n.isListening=function(t){var e=this.eventMap;return e?typeof t=="string"?!!e[t]:r("isEmptyObject")(e):!1},n.$6=function(t){var e=this.$1||(this.$1={}),n=t.listenId||(t.listenId="l"+ ++s);e[n]=t},n.$3=function(t){var e=this.eventMap||(this.eventMap={});return e[t]||(e[t]=[])},n.$4=function(t){if(t){var e=this.eventMap;if(e)return e[t]}},n.$2=function(n,r){if(e.test(r)){for(var t=r.split(e),o=arguments.length,a=new Array(o>2?o-2:0),i=2;i<o;i++)a[i-2]=arguments[i];for(var l=0;l<t.length;l++)n.call.apply(n,[this,t[l]].concat(a));return!0}return!1},n.$5=function(t,n){var e,r,o=-1,a=t.length,i=n[0],l=n[1],s=n[2];e:{if(n.length===0){for(;++o<a;){var u;e=t[o],r=(u=e.context)!=null?u:this,e.callback.call(r)}break e}if(n.length===1){for(;++o<a;){var c;e=t[o],r=(c=e.context)!=null?c:this,e.callback.call(r,i)}break e}if(n.length===2){for(;++o<a;){var d;e=t[o],r=(d=e.context)!=null?d:this,e.callback.call(r,i,l)}break e}if(n.length===3){for(;++o<a;){var m;e=t[o],r=(m=e.context)!=null?m:this,e.callback.call(r,i,l,s)}break e}{for(;++o<a;){var p;e=t[o],r=(p=e.context)!=null?p:this,e.callback.apply(r,n)}break e}}},n.bind=function(t,n,r){return this.on.apply(this,arguments)},n.unbind=function(t,n,r){return this.off.apply(this,arguments)},n.removeListener=function(t,n,r){return this.off.apply(this,arguments)},n.removeAllListeners=function(){return this.off()},t})();l.default=u}),98);
|
|
226
|
+
__d("WAWebTypedEventEmitter",["WAWebEventEmitter"],(function(t,n,r,o,a,i,l){var e=(function(){function e(){this.eventEmitter=new(r("WAWebEventEmitter"))}var t=e.prototype;return t.trigger=function(t,n){return this.eventEmitter.trigger(t,n),this},t.on=function(t,n){return this.eventEmitter.on(t,n),this},t.once=function(t,n){return this.eventEmitter.once(t,n),this},t.off=function(t,n){return this.eventEmitter.off(t,n),this},e})();l.default=e}),98);
|
|
227
|
+
__d("WAWebVoipPopoutWindowState",["WAWebTypedEventEmitter"],(function(t,n,r,o,a,i,l){"use strict";var e=new(r("WAWebTypedEventEmitter")),s="wa-web-main",u=!1,c=null,d=!1,m=!1;function p(){return u}function _(e){u=e}function f(){return d}function g(t){d!==t&&(d=t,e.trigger("popoutWindowOpeningChanged",{isOpening:t}))}function h(){return m}function y(){m=!0}function C(){m=!1}function b(){if(c==null||!u)return!1;try{return!(c.document.hidden||c.innerWidth<=0||c.innerHeight<=0)}catch(e){return!1}}function v(){return c}function S(e){c=e}function R(){if(c==null)return!1;try{return!L(c)}catch(e){return!1}}function L(e){return e!=null&&typeof e=="object"&&"closed"in e&&e.closed===!0}l.WAWebVoipUiPopoutWindowEventEmitter=e,l.MAIN_WINDOW_NAME=s,l.getIsCallActiveInPopoutWindow=p,l.setIsCallActiveInPopoutWindow=_,l.getIsPopoutWindowOpening=f,l.setIsPopoutWindowOpening=g,l.getIsPopoutUiReady=h,l.markPopoutUiReady=y,l.resetPopoutUiReady=C,l.getIsPopoutWindowActiveAndVisible=b,l.getPopoutWindow=v,l.setPopoutWindow=S,l.isPopoutWindowAlive=R}),98);
|
|
228
|
+
__d("WAWebVoipVideoFrameConsumedSignal",[],(function(t,n,r,o,a,i){"use strict";var e=new Set;function l(t){return e.add(t),function(){e.delete(t)}}function s(){e.forEach(function(e){return e()})}i.subscribeToVideoFrameConsumed=l,i.notifyVideoFrameConsumed=s}),66);
|
|
229
|
+
__d("WAWebVoipVideoFrameCtor",[],(function(t,n,r,o,a,i){"use strict";function e(){return globalThis.VideoFrame}i.default=e}),66);
|
|
230
|
+
__d("WAWebNoop",[],(function(t,n,r,o,a,i){"use strict";var e=function(){},l=e;i.default=l}),66);
|
|
231
|
+
__d("WAWebVoipVideoRendererInterface",["$InternalEnum","WAWebNoop"],(function(t,n,r,o,a,i,l){var e=n("$InternalEnum")({DEFAULT:0,RASTER:1,VIDEOFRAME:2,WEBGL:3,WEBCODECS_H264:4,WEBGPU:5}),s=n("$InternalEnum")({MAIN_THREAD:1,SINGLE_WORKER:2,WORKER_PER_CANVAS:3,POOLED_WORKERS:4}),u="selfPreviewJid";l.WAWebVoipVideoRendererType=e,l.WAWebVoipVideoRendererThreadingMode=s,l.selfPreviewJid=u,l.onRenderCallbackNoop=r("WAWebNoop")}),98);
|
|
232
|
+
__d("WAWebVoipWebCodecsEncoderState",["WALogger","asyncToGeneratorRuntime"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c="avc1.42001f",d=new Map,m=!1,p=new Set;function _(e){var t=e.streamId;d.set(t,e);for(var n of p)try{n(e)}catch(e){}}function f(e){var t;return e===void 0&&(e=0),(t=d.get(e))!=null?t:null}function g(){return new Map(d)}function h(){return m}function y(e){o("WALogger").LOG(s||(s=babelHelpers.taggedTemplateLiteralLoose(["voip: [webcodec-encode] setEnabled: ",""])),e),m=e}function C(e){return p.add(e),function(){p.delete(e)}}function b(){return v.apply(this,arguments)}function v(){return v=n("asyncToGeneratorRuntime").asyncToGenerator(function*(){if(typeof window.VideoEncoder!="function")return!1;try{var e=yield window.VideoEncoder.isConfigSupported({codec:c,width:320,height:240,latencyMode:"realtime",bitrateMode:"constant",avc:{format:"annexb"}});return e.supported===!0}catch(e){return o("WALogger").LOG(u||(u=babelHelpers.taggedTemplateLiteralLoose(["voip: [webcodec-encode] isConfigSupported check failed: ",""])),e),!1}}),v.apply(this,arguments)}function S(){d.clear(),p.clear()}l.WEBCODECS_H264_CODEC=c,l.updateWebCodecsEncodeParams=_,l.getWebCodecsEncodeParams=f,l.getAllWebCodecsEncodeParams=g,l.isWebCodecsEncoderEnabled=h,l.setWebCodecsEncoderEnabled=y,l.subscribeToEncodeParamsChanges=C,l.checkEncoderSupport=b,l.resetWebCodecsEncoderState=S}),98);
|
|
233
|
+
__d("WAWebVoipVideoCaptureOffThread",["$InternalEnum","WALogger","WAWebVoipJsWorkerThread","WAWebVoipMediaEnums","WAWebVoipPopoutWindowState","WAWebVoipVideoFrameConsumedSignal","WAWebVoipVideoFrameCtor","WAWebVoipVideoRendererInterface","WAWebVoipWebCodecsEncoderState","asyncToGeneratorRuntime","err"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c,d,m,p,_,f,g,h,y,C,b,v,S,R,L,E,k,I,T,D,x,$,P,N,M,w,A,F,O,B,W,q,U,V,H,G;function z(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];self.WhatsAppVoipWasmWorkerCompatibleCallbacks.loggingCallback({level:3,message:String.raw.apply(String,[{raw:e}].concat(n))})}function j(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];self.WhatsAppVoipWasmWorkerCompatibleCallbacks.loggingCallback({level:1,message:String.raw.apply(String,[{raw:e}].concat(n))})}var K="orientation",Q=n("$InternalEnum").Mirrored(["Uninitialized","Initializing","Ready","Error"]),X=(function(){function t(){this.thread=null,this.track=null,this.$1=null,this.$2=null,this.$3=0,this.$4=0,this.$5=0,this.$6=null,this.$7=!1,this.$8=!0,this.$9=null,this.$10=null,this.$11=null,this.$12=null,this.$13=null,this.$14=!1,this.$15=!1,this.$16=0,this.$17=-1,this.$18=-1,this.$19=0}var a=t.prototype;return a.startVideoCapture=(function(){var t=n("asyncToGeneratorRuntime").asyncToGenerator(function*(t){var n,a=this,i=t.height,l=t.maxFps,b=t.onVideoDataFnType,v=t.stream,S=t.width,R="voip: wasm: [AV:startVideoCapture (offthread)]";o("WALogger").LOG(e||(e=babelHelpers.taggedTemplateLiteralLoose(["",""])),R);var L={width:S,height:i,maxFps:l},E=o("WAWebVoipWebCodecsEncoderState").isWebCodecsEncoderEnabled(),k=E,I="requestVideoFrameCallback"in HTMLVideoElement.prototype;o("WALogger").LOG(s||(s=babelHelpers.taggedTemplateLiteralLoose([""," capture path: webcodecs="," videoElement="," rVFC="," MSTP=",""])),R,String(E),String(k),String(I),String(!k&&"MediaStreamTrackProcessor"in window)),this.track=v.getVideoTracks()[0];var T=(n=this.track)==null||n.getSettings==null||(n=n.getSettings())==null?void 0:n.facingMode,D=T==="environment";o("WALogger").LOG(u||(u=babelHelpers.taggedTemplateLiteralLoose([""," got video track, facingMode=",""])),R,T!=null?T:"unknown");var x=null;if(k)o("WALogger").LOG(c||(c=babelHelpers.taggedTemplateLiteralLoose([""," using video-element capture (WebCodecs)"])),R);else if("MediaStreamTrackProcessor"in window){var $=this.track;if($==null){o("WALogger").ERROR(d||(d=babelHelpers.taggedTemplateLiteralLoose([""," track is null when creating MediaStreamTrackProcessor"])),R).sendLogs("voip: off-thread: track null for processor");return}x={readable:yield new MediaStreamTrackProcessor({track:$}).readable},o("WALogger").LOG(m||(m=babelHelpers.taggedTemplateLiteralLoose([""," (Chrome) got MediaStreamTrackProcessor readable"])),R)}else{var P=this.track;if(P==null){o("WALogger").ERROR(p||(p=babelHelpers.taggedTemplateLiteralLoose([""," track is null for Safari capture path"])),R).sendLogs("voip: off-thread: track null for safari");return}x={track:P},this.track=null}var N=yield r("WAWebVoipJsWorkerThread").create();this.thread=N,o("WALogger").LOG(_||(_=babelHelpers.taggedTemplateLiteralLoose([""," Created worker thread"])),R),this.$4=S,this.$5=i,this.$3=0,o("WALogger").LOG(f||(f=babelHelpers.taggedTemplateLiteralLoose([""," trackNative=","x"," isBackCamera=",""])),R,this.$4,this.$5,String(D));var M=o("WAWebVoipMediaEnums").computeVideoOrientation(0,D);o("WALogger").LOG(g||(g=babelHelpers.taggedTemplateLiteralLoose([""," initial device orientation: ",""])),R,M),N.worker.postMessage({type:"jsWorkerCmd",jsWorkerCmd:"startVideoCapture",params:L,captureObject:x,onVideoDataFnType:b,useWebCodecsEncoder:E,videoElementCapture:k,initialOrientationValue:M,isScreenShare:b==="onDesktopCaptureDataFromJs"},x!=null?Object.values(x):[]),o("WALogger").LOG(h||(h=babelHelpers.taggedTemplateLiteralLoose([""," Sent startVideoCapture message to worker thread"])),R);var w=function(){var e=o("WAWebVoipMediaEnums").computeVideoOrientation(a.$3,D),t=globalThis.screen,n=t!=null?t[K]:null,r=n==null?void 0:n.angle;o("WALogger").LOG(y||(y=babelHelpers.taggedTemplateLiteralLoose([""," [orient] screenAngle="," sent="," sensorOffset="," isBackCamera=",""])),R,String(r),e,a.$3,String(D)),N.worker.postMessage({type:"jsWorkerCmd",jsWorkerCmd:"updateDeviceOrientation",orientationValue:e})};this.$2=w,window.addEventListener("orientationchange",w);try{var A=globalThis.screen,F=A!=null?A[K]:null;F==null||F.addEventListener("change",w)}catch(e){}if(w(),this.$1!=null&&this.$1(),E){this.$1=o("WAWebVoipWebCodecsEncoderState").subscribeToEncodeParamsChanges(function(e){N.worker.postMessage({type:"jsWorkerCmd",jsWorkerCmd:"updateWebCodecsEncodeParams",params:e})});var O=o("WAWebVoipWebCodecsEncoderState").getAllWebCodecsEncodeParams();for(var B of O){var W=B[0],q=B[1];o("WALogger").LOG(C||(C=babelHelpers.taggedTemplateLiteralLoose([""," seeding encode params for stream ",": ","x"," ","bps ","fps"])),R,W,q.targetWidth,q.targetHeight,q.targetBitrateBps,q.targetFps),N.worker.postMessage({type:"jsWorkerCmd",jsWorkerCmd:"updateWebCodecsEncodeParams",params:q})}}k&&this.$20(v,N,I)});function a(e){return t.apply(this,arguments)}return a})(),a.$20=function(t,n,r){var e,a,i=this,l="voip: [AV:videoElementCapture]";this.$7=!1,this.$8=!0,this.$14=!1,this.$15=!1,this.$17=-1,this.$18=-1;var s=(e=(a=o("WAWebVoipPopoutWindowState").getPopoutWindow())==null?void 0:a.document)!=null?e:null,u=s!=null?s:document,c=u.createElement("video");o("WALogger").LOG(b||(b=babelHelpers.taggedTemplateLiteralLoose([""," video element owner: ",""])),l,s!=null?"popout":"main"),c.srcObject=t,c.autoplay=!0,c.muted=!0,c.playsInline=!0,this.$6=c,c.addEventListener("loadedmetadata",function(){i.$3=o("WAWebVoipMediaEnums").detectSensorOffset(i.$4,i.$5,c.videoWidth,c.videoHeight),o("WALogger").LOG(v||(v=babelHelpers.taggedTemplateLiteralLoose(["voip: [orient] sensorOffset cached: "," track=","x"," videoEl=","x",""])),i.$3,i.$4,i.$5,c.videoWidth,c.videoHeight),i.$2!=null&&i.$2()},{once:!0}),c.addEventListener("resize",function(){i.$2!=null&&i.$2()}),this.$9!=null&&this.$9(),this.$9=o("WAWebVoipVideoFrameConsumedSignal").subscribeToVideoFrameConsumed(function(){i.$8=!0});var d=33,m=++this.$16,p=function(t){if(!(i.$7||t!==i.$16)&&(i.$21(c,n),!(i.$7||t!==i.$16))){var e=document.visibilityState==="visible",a=o("WAWebVoipPopoutWindowState").getIsPopoutWindowActiveAndVisible(),l=e||a,u=s!=null?a:e;if(r&&u)c.requestVideoFrameCallback(function(e,n){var r=n.presentationTime;i.$17=typeof r=="number"?r:-1;var o=n.captureTime;i.$18=typeof o=="number"?o:-1,p(t)});else if(l){var m;i.$17=-1,i.$18=-1;var _=a&&(m=o("WAWebVoipPopoutWindowState").getPopoutWindow())!=null?m:window;_.requestAnimationFrame(function(){return p(t)})}else i.$17=-1,i.$18=-1,i.$13=window.setTimeout(function(){return p(t)},d)}},_=function(){o("WALogger").LOG(S||(S=babelHelpers.taggedTemplateLiteralLoose([""," video element playing, rVFC=",""])),l,String(r)),p(m)};this.$11=function(){var e=document.visibilityState==="visible";o("WALogger").LOG(R||(R=babelHelpers.taggedTemplateLiteralLoose([""," visibility changed: ",""])),l,e?"visible":"hidden"),i.$17=-1,i.$18=-1,i.$13!=null&&(window.clearTimeout(i.$13),i.$13=null);var t=++i.$16;i.$7||p(t)},document.addEventListener("visibilitychange",this.$11),this.$12=function(e){o("WALogger").LOG(L||(L=babelHelpers.taggedTemplateLiteralLoose([""," popout visibility changed: "," active="," hasWindow=",""])),l,e.visibilityState,String(e.isCallActiveInPopoutWindow),String(e.hasPopoutWindow)),i.$17=-1,i.$18=-1,i.$13!=null&&(window.clearTimeout(i.$13),i.$13=null);var t=++i.$16;i.$7||p(t)},o("WAWebVoipPopoutWindowState").WAWebVoipUiPopoutWindowEventEmitter.on("popoutWindowVisibilityChanged",this.$12),c.play().then(_,function(e){o("WALogger").ERROR(E||(E=babelHelpers.taggedTemplateLiteralLoose([""," video element play failed, retrying: ",""])),l,e),i.$10=window.setTimeout(function(){i.$10=null,!i.$7&&c.play().then(_,function(e){o("WALogger").ERROR(k||(k=babelHelpers.taggedTemplateLiteralLoose([""," play retry failed, no frames: ",""])),l,e)})},500)})},a.$21=function(t,n){if(this.$8&&!(t.readyState<t.HAVE_CURRENT_DATA||t.videoWidth===0||t.videoHeight===0))try{var e=window.performance;try{var a,i=t.ownerDocument.defaultView;e=(a=i==null?void 0:i.performance)!=null?a:window.performance}catch(e){this.$14||(o("WALogger").LOG(I||(I=babelHelpers.taggedTemplateLiteralLoose(["voip: [AV:capture-skew] owner-window performance unavailable, using main window performance: ",""])),e),this.$14=!0)}var l=e.now(),s=e.timeOrigin,u=typeof s=="number"&&s>0,c=u?s:Date.now()-l;!u&&!this.$15&&(o("WALogger").LOG(T||(T=babelHelpers.taggedTemplateLiteralLoose(["voip: [AV:capture-skew] performance.timeOrigin unavailable, using Date.now fallback"]))),this.$15=!0);var d=l,m="construct";this.$18>0?(d=this.$18,m="capture"):this.$17>0&&(d=this.$17,m="presentation");var p=c+d,_=r("WAWebVoipVideoFrameCtor")();if(_==null)return;var f=new _(t,{timestamp:Math.round(p*1e3)});if(this.$19++,this.$19%150===0){var g=this.$17>0?(l-this.$17).toFixed(1)+"ms":"n/a",h=this.$18>0?(l-this.$18).toFixed(1)+"ms":"n/a";o("WALogger").LOG(D||(D=babelHelpers.taggedTemplateLiteralLoose(["voip: [AV:capture-skew] video frame#"," presentToConstruct="," captureToConstruct="," tsSource="," tsEpochMs="," nowMs=",""])),this.$19,g,h,m,p.toFixed(2),l.toFixed(2))}this.$8=!1,n.worker.postMessage({type:"jsWorkerCmd",jsWorkerCmd:"deliverVideoFrame",frame:f},[f])}catch(e){o("WALogger").ERROR(x||(x=babelHelpers.taggedTemplateLiteralLoose(["voip: [AV:videoElementCapture] frame capture failed, stopping loop: ",""])),e),this.$7=!0}},a.stopVideoCapture=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(){var e="voip: stopVideoCapture (offthread)";if(o("WALogger").LOG($||($=babelHelpers.taggedTemplateLiteralLoose(["",""])),e),this.$7=!0,this.$6!=null&&(this.$6.srcObject=null,this.$6=null),this.$9!=null&&(this.$9(),this.$9=null),this.$10!=null&&(window.clearTimeout(this.$10),this.$10=null),this.$13!=null&&(window.clearTimeout(this.$13),this.$13=null),this.$11!=null&&(document.removeEventListener("visibilitychange",this.$11),this.$11=null),this.$12!=null&&(o("WAWebVoipPopoutWindowState").WAWebVoipUiPopoutWindowEventEmitter.off("popoutWindowVisibilityChanged",this.$12),this.$12=null),this.$2!=null){window.removeEventListener("orientationchange",this.$2);try{var t;(t=screen)==null||(t=t.orientation)==null||t.removeEventListener("change",this.$2)}catch(e){}this.$2=null}this.$1!=null&&(this.$1(),this.$1=null);try{if(this.thread!=null){var n=this.thread;n.worker.postMessage({type:"jsWorkerCmd",jsWorkerCmd:"stopVideoCapture"}),yield n.joinJsWorkerThread()}}finally{this.track!=null&&(this.track.stop(),this.track=null)}});function t(){return e.apply(this,arguments)}return t})(),t})(),Y=!1,J=1;function Z(e){e!==J&&z(P||(P=babelHelpers.taggedTemplateLiteralLoose(["voip: [orient] worker orientation changed: "," -> ",""])),J,e),J=e}var ee=!1,te=new Map;function ne(){return Y}function re(e){Y=e}function oe(){return J}function ae(e){J=e}function ie(e){var t=e.rotation;if(ee||(ee=!0,z(N||(N=babelHelpers.taggedTemplateLiteralLoose(["voip: [orient] frame.rotation="," currentWorkerOrientation=",""])),String(t),J)),typeof t=="number"&&t!==0){var n=Math.floor(t/90)%4;return n+1}return J}var le=null;function se(e){le=e}function ue(e){var t=le;if(t==null){e.close();return}t(e).catch(function(e){j(M||(M=babelHelpers.taggedTemplateLiteralLoose(["voip: [webcodec-encode] deliverVideoFrame error: ",""])),e)}).finally(function(){try{e.close()}catch(e){}globalThis.postMessage({type:"waWasmWorkerCompatibleCallback",__name:"videoFrameConsumed"})})}function ce(e,t,n,r,o){return de.apply(this,arguments)}function de(){return de=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t,a,i,l){var s="voip: wasm: [AV:startVideoCaptureInWorker]";try{var u=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){try{var n=o("WAWebVoipMediaEnums").formatEnumFromVideoFrameFormat(e.format);if(n!==o("WAWebVoipMediaEnums").WAWebVoipVideoFormat.NV12){var l;throw r("err")("Unsupported video frame format "+((l=e.format)!=null?l:"null"))}var u=ie(e);p<3&&(p++,z(F||(F=babelHelpers.taggedTemplateLiteralLoose([""," [orient] frame#"," orientation="," frameSize=","x",""])),s,p,u,t.width,t.height)),yield e.copyTo(m),a.GROWABLE_HEAP_U8().set(m,d),a[i](d,c,t.width,t.height,t.maxFps,n,u),self.WhatsAppVoipWasmWorkerCompatibleCallbacks.onVideoFrameWasmToJs({userJid:o("WAWebVoipVideoRendererInterface").selfPreviewJid,frameBuffer:m.buffer,width:t.width,height:t.height,format:n,orientation:u,timestamp:0,isKeyFrame:!1})}catch(e){j(O||(O=babelHelpers.taggedTemplateLiteralLoose([""," video processing error: ",""])),s,e)}});return function(n){return e.apply(this,arguments)}})();z(w||(w=babelHelpers.taggedTemplateLiteralLoose(["",""])),s),Y=!1,l!=null&&(J=l,z(A||(A=babelHelpers.taggedTemplateLiteralLoose([""," initial orientation: ",""])),s,l));var c=Math.floor(t.width*t.height*1.5),d=a._malloc(c),m=new Uint8Array(c),p=0;try{var _=e.readable||(yield new MediaStreamTrackProcessor({track:e.track}).readable);z(B||(B=babelHelpers.taggedTemplateLiteralLoose([""," got MediaStreamTrackProcessor readable"])),s);var f=_.getReader();for(z(W||(W=babelHelpers.taggedTemplateLiteralLoose([""," starting capture loop"])),s);!Y;){var g=yield f.read(),h=g.done,y=g.value;try{if(h||!y){Y=!0;break}yield u(y)}finally{y&&y.close()}}}finally{a._free(d)}}catch(e){j(q||(q=babelHelpers.taggedTemplateLiteralLoose([""," video capture error: ",""])),s,e)}finally{try{a.exitJsWorkerThread()}catch(e){j(U||(U=babelHelpers.taggedTemplateLiteralLoose([""," exitJsWorkerThread error: ",""])),s,e)}z(V||(V=babelHelpers.taggedTemplateLiteralLoose([""," exit capture worker thread"])),s)}}),de.apply(this,arguments)}function me(){return pe.apply(this,arguments)}function pe(){return pe=n("asyncToGeneratorRuntime").asyncToGenerator(function*(){var e="voip: wasm: [AV:stopVideoCaptureInWorker]";z(H||(H=babelHelpers.taggedTemplateLiteralLoose(["",""])),e),Y=!0,J=1,te.clear(),ee=!1,z(G||(G=babelHelpers.taggedTemplateLiteralLoose([""," completed successfully"])),e)}),pe.apply(this,arguments)}l.CaptureInitState=Q,l.WAWebVoipVideoCaptureOffThread=X,l.updateDeviceOrientationInWorker=Z,l.encodedFrameOrientations=te,l.getStopCapture=ne,l.updateStopCapture=re,l.getCurrentWorkerOrientation=oe,l.updateCurrentWorkerOrientation=ae,l.getFrameOrientation=ie,l.registerCaptureAndEncodeFn=se,l.deliverVideoFrameToWorker=ue,l.startVideoCaptureInWorker=ce,l.stopVideoCaptureInWorker=me}),98);
|
|
234
|
+
__d("WAWebVoipWasmHeapBuffer",[],(function(t,n,r,o,a,i){"use strict";function e(){return{ptr:0,size:0}}function l(e,t,n){return t.size<n&&(t.ptr!==0&&e._free(t.ptr),t.ptr=e._malloc(n),t.size=t.ptr!==0?n:0),t.ptr}function s(e,t){if(t.ptr!==0){try{e._free(t.ptr)}catch(e){}t.ptr=0,t.size=0}}i.createHeapBufferState=e,i.ensureHeapBuffer=l,i.freeHeapBuffer=s}),66);
|
|
235
|
+
__d("WAWebVoipWebCodecsEncoder",["Promise","WAWebVoipMediaEnums","WAWebVoipVideoCaptureOffThread","WAWebVoipVideoFrameCtor","WAWebVoipVideoRendererInterface","WAWebVoipWebCodecsEncoderState","asyncToGeneratorRuntime"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c,d,m,p,_,f,g,h,y,C,b,v,S,R,L,E,k,I,T,D,x,$,P,N,M,w,A,F,O,B,W,q,U,V,H,G;function z(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];self.WhatsAppVoipWasmWorkerCompatibleCallbacks.loggingCallback({level:3,message:String.raw.apply(String,[{raw:e}].concat(n))})}function j(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];self.WhatsAppVoipWasmWorkerCompatibleCallbacks.loggingCallback({level:1,message:String.raw.apply(String,[{raw:e}].concat(n))})}var K=new Map,Q=5e3,X=3e3,Y=3,J=1e3,Z=4e3,ee=null,te=null;function ne(){try{var e=new OffscreenCanvas(4,2),t=e.getContext("2d");if(t==null)return!1;t.fillStyle="#ff0000",t.fillRect(0,0,2,2),t.fillStyle="#0000ff",t.fillRect(2,0,2,2);var n=new VideoFrame(e,{timestamp:0}),r=new OffscreenCanvas(2,2),o=r.getContext("2d");if(o==null)return n.close(),!1;o.drawImage(n,0,0,2,2,0,0,2,2),n.close();var a=o.getImageData(1,1,1,1).data;return a[0]>200&&a[2]<50}catch(e){return!1}}function re(){return{encoder:null,frameCounter:0,lastKeyFrameTime:0,currentBitrate:5e5,currentWidth:640,currentHeight:480,currentFps:30,requestKeyframe:!1,rateControlInitialized:!1,fpsPacingCredit:0,fpsPacingLastFrameTime:0,fpsPacingDropCount:0,fpsPacingEncodeCount:0,encodeStartTimes:new Map,latencyMin:1/0,latencyMax:0,latencySum:0,latencyCount:0,latencyLastLogTime:0,consecutiveFatalErrors:0,lastFatalErrorTime:0,portDetached:!1,lastPortAvailable:!1,reattachFailures:0,lastReattachFailureTime:0,cropCanvas:null,cropCanvasCtx:null}}function oe(e){return e&-2}function ae(e){return{codec:o("WAWebVoipWebCodecsEncoderState").WEBCODECS_H264_CODEC,width:e.currentWidth,height:e.currentHeight,bitrate:e.currentBitrate,framerate:e.currentFps,latencyMode:"realtime",bitrateMode:"constant",avc:{format:"annexb"}}}function ie(e){return e<=0?0:Math.min(J*Math.pow(2,e-1),Z)}function le(t,n){var r="voip: [webcodec-encode][stream="+t+"]";return new VideoEncoder({output:function(i,l){var a,s,u,c,d;n.consecutiveFatalErrors=0;var m=n.encodeStartTimes.get(i.timestamp),p=0;if(m!=null){n.encodeStartTimes.delete(i.timestamp);var _=Date.now();if(p=_-m,n.latencyMin=Math.min(n.latencyMin,p),n.latencyMax=Math.max(n.latencyMax,p),n.latencySum+=p,n.latencyCount++,_-n.latencyLastLogTime>=Q){var f=n.latencyCount>0?(n.latencySum/n.latencyCount).toFixed(1):"0";z(e||(e=babelHelpers.taggedTemplateLiteralLoose([""," encode latency (5s): min=","ms max=","ms avg=","ms ("," frames) pacing=","enc/","drop@","fps"])),r,n.latencyMin,n.latencyMax,f,n.latencyCount,n.fpsPacingEncodeCount,n.fpsPacingDropCount,n.currentFps),n.latencyMin=1/0,n.latencyMax=0,n.latencySum=0,n.latencyCount=0,n.fpsPacingEncodeCount=0,n.fpsPacingDropCount=0,n.latencyLastLogTime=_}}var g=(a=l==null||(s=l.decoderConfig)==null?void 0:s.codedWidth)!=null?a:n.currentWidth,h=(u=l==null||(c=l.decoderConfig)==null?void 0:c.codedHeight)!=null?u:n.currentHeight,y=(d=o("WAWebVoipVideoCaptureOffThread").encodedFrameOrientations.get(i.timestamp))!=null?d:o("WAWebVoipVideoCaptureOffThread").getCurrentWorkerOrientation();Ie(t,n,i,g,h,p,y)},error:(function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t})(function(e){n.encoder=null,n.consecutiveFatalErrors++,n.lastFatalErrorTime=Date.now(),n.consecutiveFatalErrors>Y?j(s||(s=babelHelpers.taggedTemplateLiteralLoose([""," encoder fatal error, max recovery attempts (",") exceeded: ",""])),r,Y,e.message):j(u||(u=babelHelpers.taggedTemplateLiteralLoose([""," encoder fatal error, will attempt recovery (","/","): ",""])),r,n.consecutiveFatalErrors,Y,e.message)})})}function se(e){var t=K.get(e);if((t==null?void 0:t.encoder)!=null)try{t.encoder.close()}catch(e){}K.delete(e)}function ue(){for(var e of Array.from(K.keys()))se(e);fe=null,ge=null}function ce(e,t){var n="voip: [webcodec-encode][stream="+e+"]";if(t.encoder!=null&&t.encoder.state==="configured")return t.encoder;if(t.consecutiveFatalErrors===0||t.consecutiveFatalErrors>Y||Date.now()-t.lastFatalErrorTime<J)return null;z(c||(c=babelHelpers.taggedTemplateLiteralLoose([""," recreating encoder after fatal error (attempt ","/",")"])),n,t.consecutiveFatalErrors,Y);var r=null;try{return r=le(e,t),r.configure(ae(t)),t.encoder=r,t.requestKeyframe=!0,r}catch(e){if(r!=null)try{r.close()}catch(e){}return t.consecutiveFatalErrors++,t.lastFatalErrorTime=Date.now(),j(d||(d=babelHelpers.taggedTemplateLiteralLoose([""," encoder recovery failed (","/","): ",""])),n,t.consecutiveFatalErrors,Y,e),null}}function de(e){var t=e.visibleRect;return{x:t!=null?Math.max(0,Math.floor(t.x)):0,y:t!=null?Math.max(0,Math.floor(t.y)):0}}function me(e,t){var n=r("WAWebVoipVideoFrameCtor")();return n==null?e:new n(e,t)}function pe(e){var t=e.displayWidth,n=e.displayHeight,r=de(e),o=r.x,a=r.y;return e.codedWidth===t&&e.codedHeight===n&&o===0&&a===0?e:me(e,{visibleRect:{x:o,y:a,width:t,height:n},displayWidth:t,displayHeight:n})}function _e(e,t,n,r,o,a,i){return me(e,{visibleRect:{x:t,y:n,width:r,height:o},displayWidth:a,displayHeight:i})}var fe=null,ge=null;function he(e,t,n,r){if(e!=null&&e.width===n&&e.height===r)return[e,t];var o=new OffscreenCanvas(n,r);return[o,o.getContext("2d")]}function ye(e,t,n,r,o,a,i,l,s,u){var c,d=he(fe,ge,t,n);fe=d[0],ge=d[1];var p=he(u.cropCanvas,u.cropCanvasCtx,l,s),_=p[0],f=p[1];u.cropCanvas=_,u.cropCanvasCtx=f;var g=ge,h=f,y=fe;return g==null||h==null||y==null?(j(m||(m=babelHelpers.taggedTemplateLiteralLoose(["voip: [webcodec-encode] cropFrame canvas context unavailable, clearing for retry"]))),fe=null,ge=null,u.cropCanvas=null,u.cropCanvasCtx=null,null):(g.drawImage(e,0,0,t,n),h.drawImage(y,r,o,a,i,0,0,l,s),new VideoFrame(_,{timestamp:e.timestamp,duration:(c=e.duration)!=null?c:void 0}))}function Ce(e,t,n,r){var o=e.displayWidth,a=e.displayHeight;if(t<=0||n<=0||o<=0||a<=0)return e;var i=oe(Math.max(t,2)),l=oe(Math.max(n,2)),s=pe(e),u=o/a,c=i/l;if(Math.abs(u-c)<.01)return s;var d,m,p,_;if(u>c?(_=a,p=Math.round(a*c),d=Math.round((o-p)/2),m=0):(p=o,_=Math.round(o/c),d=0,m=Math.round((a-_)/2)),d&=-2,m&=-2,p&=-2,_&=-2,p=Math.min(p,o-d),_=Math.min(_,a-m),p<=0||_<=0)return s;var f;return te===!0?f=_e(s,d,m,p,_,i,l):f=ye(s,o,a,d,m,p,_,i,l,r),f!=null&&s!==e&&s.close(),f!=null?f:s}function be(e){var t=Date.now(),n=e.fpsPacingLastFrameTime>0?t-e.fpsPacingLastFrameTime:0;e.fpsPacingLastFrameTime=t;var r=Math.max(e.currentFps,1);return n>0&&n<1e3?e.fpsPacingCredit+=r*n/1e3:e.fpsPacingCredit=1,e.fpsPacingCredit<1?(e.fpsPacingDropCount++,!1):(e.fpsPacingCredit-=1,e.fpsPacingCredit=Math.min(e.fpsPacingCredit,1),e.fpsPacingEncodeCount++,!0)}function ve(e){var t=Date.now(),n=t-e.lastKeyFrameTime;return e.requestKeyframe||n>X||e.frameCounter===0}function Se(e){var t=e.streamId,n="voip: [webcodec-encode][stream="+t+"]",r=K.get(t);r==null&&(r=re(),K.set(t,r),ee!=null&&t>0&&(r.currentBitrate=e.targetBitrateBps,r.currentWidth=oe(e.targetWidth),r.currentHeight=oe(e.targetHeight),r.currentFps=Math.max(e.targetFps,1),r.encoder=le(t,r),r.encoder.configure(ae(r)),z(p||(p=babelHelpers.taggedTemplateLiteralLoose([""," encoder created and configured: ","x"," ","bps ","fps"])),n,r.currentWidth,r.currentHeight,r.currentBitrate,r.currentFps))),r.rateControlInitialized||(r.rateControlInitialized=!0,z(_||(_=babelHelpers.taggedTemplateLiteralLoose([""," rate control initialized, encoding can begin"])),n));var a=oe(e.targetWidth),i=oe(e.targetHeight),l=Math.max(e.targetFps,1),s=a!==r.currentWidth||i!==r.currentHeight||e.targetBitrateBps!==r.currentBitrate||l!==r.currentFps;if(e.requestKeyframe&&(r.requestKeyframe=!0),s&&r.encoder!=null&&r.encoder.state==="configured"){z(f||(f=babelHelpers.taggedTemplateLiteralLoose([""," reconfiguring: ","x"," bitrate="," fps=",""])),n,a,i,e.targetBitrateBps,l);try{r.encoder.configure({codec:o("WAWebVoipWebCodecsEncoderState").WEBCODECS_H264_CODEC,width:a,height:i,bitrate:e.targetBitrateBps,framerate:l,latencyMode:"realtime",bitrateMode:"constant",avc:{format:"annexb"}}),r.currentBitrate=e.targetBitrateBps,r.currentWidth=a,r.currentHeight=i,r.currentFps=l}catch(e){j(g||(g=babelHelpers.taggedTemplateLiteralLoose([""," reconfigure failed: ",""])),n,e)}}else r.currentBitrate=e.targetBitrateBps,r.currentWidth=a,r.currentHeight=i,r.currentFps=l}function Re(e){return Le.apply(this,arguments)}function Le(){return Le=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){for(var t of K){var n=t[0],r=t[1],o=r.encoder;if(o!=null){try{o.state!=="closed"&&(yield o.flush(),o.close())}catch(t){j(v||(v=babelHelpers.taggedTemplateLiteralLoose([""," error closing encoder stream=",": ",""])),e,n,t)}r.encoder=null}}K.clear()}),Le.apply(this,arguments)}function Ee(e,t,n,r,o,a){return ke.apply(this,arguments)}function ke(){return ke=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e,t,r,a,i,l){a===void 0&&(a=!1),l===void 0&&(l=!1);var s="voip: [webcodec-encode]";try{var u=(function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){try{var t=e.displayWidth,n=e.displayHeight;!l&&!m&&(m=!0,z(I||(I=babelHelpers.taggedTemplateLiteralLoose([""," camera dimensions: ","x",", reporting to VoIP stack"])),s,t,n),r.setVideoPreviewSize(t,n)),l&&(t!==p||n!==_)&&(p=t,_=n,z(T||(T=babelHelpers.taggedTemplateLiteralLoose([""," screen share capture size changed: ","x",""])),s,t,n),r.setScreenShareCaptureSize(t,n));var a=o("WAWebVoipMediaEnums").formatEnumFromVideoFrameFormat(e.format),i=e.format==="BGRA";if(f<g){var u,c,d,y,C;f++,z(D||(D=babelHelpers.taggedTemplateLiteralLoose([""," frame[","] format="," coded=","x"," display=","x"," colorSpace=","/",""])),s,f,(u=e.format)!=null?u:"null",e.codedWidth,e.codedHeight,e.displayWidth,e.displayHeight,(c=(d=e.colorSpace)==null?void 0:d.primaries)!=null?c:"unknown",(y=(C=e.colorSpace)==null?void 0:C.transfer)!=null?y:"unknown")}try{if(a===o("WAWebVoipMediaEnums").WAWebVoipVideoFormat.NV12||a===o("WAWebVoipMediaEnums").WAWebVoipVideoFormat.I420||a===o("WAWebVoipMediaEnums").WAWebVoipVideoFormat.RGBA||i){var b=oe(e.displayWidth),v=oe(e.displayHeight),S=de(e),R=S.x,L=S.y,E=e.allocationSize();if((h.buffer.byteLength===0||h.byteLength<E)&&(h=new Uint8Array(E)),e.codedWidth!==b||e.codedHeight!==v||R!==0||L!==0?yield e.copyTo(h,{rect:{x:R,y:L,width:b,height:v}}):yield e.copyTo(h),i)for(var k=0;k<h.length;k+=4){var A=h[k];h[k]=h[k+2],h[k+2]=A}self.WhatsAppVoipWasmWorkerCompatibleCallbacks.onVideoFrameWasmToJs({userJid:o("WAWebVoipVideoRendererInterface").selfPreviewJid,frameBuffer:h.buffer,width:b,height:v,format:i?o("WAWebVoipMediaEnums").WAWebVoipVideoFormat.RGBA:a,orientation:o("WAWebVoipVideoCaptureOffThread").getFrameOrientation(e),timestamp:0,isKeyFrame:!1})}else if(f<g){var F;z(x||(x=babelHelpers.taggedTemplateLiteralLoose([""," skipping self-preview: unrecognized frame format=",""])),s,(F=e.format)!=null?F:"null")}}catch(e){f<g&&j($||($=babelHelpers.taggedTemplateLiteralLoose([""," self-preview error: ",""])),s,e)}var O=o("WAWebVoipVideoCaptureOffThread").getFrameOrientation(e);o("WAWebVoipVideoCaptureOffThread").encodedFrameOrientations.set(e.timestamp,O);var B=r.getEncodedVideoPortMask();for(var W of K){var q=W[0],U=W[1],V=(B&1<<q)!==0;if(V)if(U.portDetached){U.lastPortAvailable=!0;var H=ie(U.reattachFailures);if(H>0&&Date.now()-U.lastReattachFailureTime<H)continue;z(N||(N=babelHelpers.taggedTemplateLiteralLoose([""," stream "," port reattached, recreating encoder"])),s,q);var G=null;try{G=le(q,U),G.configure(ae(U)),U.encoder=G,U.requestKeyframe=!0,U.portDetached=!1,U.reattachFailures=0,U.consecutiveFatalErrors=0,U.lastReattachFailureTime=0}catch(e){if(G!=null)try{G.close()}catch(e){}U.reattachFailures++,U.lastReattachFailureTime=Date.now(),j(M||(M=babelHelpers.taggedTemplateLiteralLoose([""," stream "," reattach failed (attempt ","), will retry in ","ms: ",""])),s,q,U.reattachFailures,ie(U.reattachFailures),e)}}else U.lastPortAvailable=!0;else{if(!U.portDetached){if(z(P||(P=babelHelpers.taggedTemplateLiteralLoose([""," stream "," port detached, closing encoder"])),s,q),U.encoder!=null){try{U.encoder.close()}catch(e){}U.encoder=null}U.portDetached=!0}U.lastPortAvailable&&(U.reattachFailures=0,U.lastReattachFailureTime=0),U.lastPortAvailable=!1}}for(var Q of K){var X=Q[0],Y=Q[1];if(!Y.portDetached&&Y.rateControlInitialized){var J=ce(X,Y);if(J!=null&&be(Y)){var Z=ve(Y),ee=e.clone(),te=Ce(ee,Y.currentWidth,Y.currentHeight,Y);try{Y.encodeStartTimes.set(e.timestamp,Date.now()),J.encode(te,{keyFrame:Z})}finally{te!==ee&&te.close(),ee.close()}Y.frameCounter++,Z&&(Y.lastKeyFrameTime=Date.now(),Y.requestKeyframe=!1)}}}var ne=150;if(o("WAWebVoipVideoCaptureOffThread").encodedFrameOrientations.size>ne*2)for(var re=Array.from(o("WAWebVoipVideoCaptureOffThread").encodedFrameOrientations.keys()),se=re.length-ne,ue=0;ue<se;ue++)o("WAWebVoipVideoCaptureOffThread").encodedFrameOrientations.delete(re[ue])}catch(e){j(w||(w=babelHelpers.taggedTemplateLiteralLoose([""," encode error: ",""])),s,e)}});return function(n){return e.apply(this,arguments)}})();z(S||(S=babelHelpers.taggedTemplateLiteralLoose([""," starting capture ","x","@","fps"])),s,t.width,t.height,t.maxFps),o("WAWebVoipVideoCaptureOffThread").updateStopCapture(!1),ee=r,i!=null&&(o("WAWebVoipVideoCaptureOffThread").updateCurrentWorkerOrientation(i),z(R||(R=babelHelpers.taggedTemplateLiteralLoose([""," initial orientation: ",""])),s,i)),te==null&&(te=ne(),z(L||(L=babelHelpers.taggedTemplateLiteralLoose([""," visibleRect crop probe: ",""])),s,te?"supported (fast path)":"broken (canvas workaround)"));var c=0;ue();var d=re();d.lastKeyFrameTime=Date.now(),d.currentWidth=oe(t.width),d.currentHeight=oe(t.height),d.currentFps=Math.max(t.maxFps,1),d.latencyLastLogTime=Date.now(),K.set(c,d),(t.width!==d.currentWidth||t.height!==d.currentHeight)&&z(E||(E=babelHelpers.taggedTemplateLiteralLoose([""," normalized odd dimensions: ","x"," -> ","x",""])),s,t.width,t.height,d.currentWidth,d.currentHeight);var m=!1,p=0,_=0,f=0,g=5,h=new Uint8Array(Math.floor(t.width*t.height*1.5));if(d.encoder=le(c,d),d.encoder.configure(ae(d)),z(k||(k=babelHelpers.taggedTemplateLiteralLoose([""," encoder configured: codec="," bitrate=",""])),s,o("WAWebVoipWebCodecsEncoderState").WEBCODECS_H264_CODEC,d.currentBitrate),a)o("WAWebVoipVideoCaptureOffThread").registerCaptureAndEncodeFn(u),z(A||(A=babelHelpers.taggedTemplateLiteralLoose([""," video-element mode: encoder ready, waiting for frames"])),s),yield new(G||(G=n("Promise")))(function(e){var t=function(){o("WAWebVoipVideoCaptureOffThread").getStopCapture()?e():globalThis.setTimeout(t,200)};t()}),z(F||(F=babelHelpers.taggedTemplateLiteralLoose([""," video-element mode: stop requested"])),s),o("WAWebVoipVideoCaptureOffThread").registerCaptureAndEncodeFn(null),yield Re(s);else if(e!=null)try{var y=e.readable||(yield new MediaStreamTrackProcessor({track:e.track}).readable);z(O||(O=babelHelpers.taggedTemplateLiteralLoose([""," got MediaStreamTrackProcessor readable"])),s);var C=y.getReader();for(z(B||(B=babelHelpers.taggedTemplateLiteralLoose([""," starting capture loop"])),s);!o("WAWebVoipVideoCaptureOffThread").getStopCapture();){var b=yield C.read(),v=b.done,Q=b.value;try{if(v||!Q){o("WAWebVoipVideoCaptureOffThread").updateStopCapture(!0);break}yield u(Q)}finally{Q==null||Q.close()}}z(W||(W=babelHelpers.taggedTemplateLiteralLoose([""," finished capture loop"])),s)}finally{e.track&&e.track.stop(),yield Re(s)}else j(q||(q=babelHelpers.taggedTemplateLiteralLoose([""," captureObject is null in non-videoElement mode"])),s),yield Re(s)}catch(e){j(U||(U=babelHelpers.taggedTemplateLiteralLoose([""," capture error: ",""])),s,e)}finally{ee=null;try{r.exitJsWorkerThread()}catch(e){j(V||(V=babelHelpers.taggedTemplateLiteralLoose([""," exitJsWorkerThread error: ",""])),s,e)}z(H||(H=babelHelpers.taggedTemplateLiteralLoose([""," exit capture worker thread"])),s)}}),ke.apply(this,arguments)}function Ie(e,t,n,r,o,a,i){var l="voip: [webcodec-encode][stream="+e+"]",s=ee;if(s==null){j(h||(h=babelHelpers.taggedTemplateLiteralLoose([""," handleEncodedChunk called with no voipWasm"])),l);return}try{var u=new Uint8Array(n.byteLength);n.copyTo(u);var c=n.type==="key",d=n.timestamp/1e3,m=Date.now()-d;c&&z(y||(y=babelHelpers.taggedTemplateLiteralLoose([""," encoded keyframe: size="," captureTsMs="," captureToEncodedMs="," ","x",""])),l,u.byteLength,d.toFixed(2),m.toFixed(1),r,o);var p=s._malloc(u.byteLength),_=0;try{s.GROWABLE_HEAP_U8().set(u,p),_=s.onEncodedVideoDataFromJsForStream(e,p,u.byteLength,r,o,d,c,a,i)}finally{s._free(p)}c&&(t.lastKeyFrameTime=Date.now()),_===1&&(z(C||(C=babelHelpers.taggedTemplateLiteralLoose([""," WASM requested keyframe (initial frames dropped)"])),l),t.requestKeyframe=!0)}catch(e){j(b||(b=babelHelpers.taggedTemplateLiteralLoose([""," error handling encoded chunk: ",""])),l,e)}}l.updateWebCodecsEncoderParams=Se,l.startVideoCaptureWithWebCodecsEncoderInWorker=Ee}),98);
|
|
236
|
+
__d("WAWebVoipNativeStackTraceLogger",["WALogger"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c,d;function m(t,n){try{if(typeof n=="object"&&n!=null&&"excPtr"in n&&typeof n.excPtr=="number"){var r=t,a=r==null?void 0:r.getExceptionMessage;if(a!=null){var i=a(n.excPtr),l=i[0],m=i[1];o("WALogger").ERROR(e||(e=babelHelpers.taggedTemplateLiteralLoose(["voip: [WASM Crash - MAIN] Native C++ exception: ",": ",""])),l,m)}else o("WALogger").ERROR(s||(s=babelHelpers.taggedTemplateLiteralLoose(["voip: [WASM-MAIN] C++ exc ptr="," getExceptionMessage N/A"])),String(n.excPtr))}else n instanceof WebAssembly.RuntimeError&&o("WALogger").ERROR(u||(u=babelHelpers.taggedTemplateLiteralLoose(["voip: [WASM Crash - MAIN] WebAssembly.RuntimeError"]))).catching(n);n!=null&&typeof n=="object"&&"stack"in n&&o("WALogger").ERROR(c||(c=babelHelpers.taggedTemplateLiteralLoose(["voip: [WASM Crash - MAIN] JavaScript stack trace"]))).catching(n)}catch(e){o("WALogger").ERROR(d||(d=babelHelpers.taggedTemplateLiteralLoose(["voip: [WASM Crash - MAIN] Failed to log native stack trace"]))).catching(e)}}l.logNativeStackTrace=m}),98);
|
|
237
|
+
__d("WAWebVoipWorkerHandler",["WAWebVoipNativeStackTraceLogger","WAWebVoipWasmHeapBuffer","err"],(function(t,n,r,o,a,i,l){"use strict";function e(e,t){var n=new e.StringList;return Array.isArray(t)&&t.forEach(function(e){n.push_back(String(e))}),n}function s(e,t){var n=new e.IntList;return Array.isArray(t)&&t.forEach(function(e){n.push_back(Number(e))}),n}function u(e,t){var n=new e.Uint8List;if(t instanceof ArrayBuffer){var r=new Uint8Array(t);r.forEach(function(e){return n.push_back(e)})}return n}var c=o("WAWebVoipWasmHeapBuffer").createHeapBufferState();function d(e){return String(e!=null?e:"")}function m(e){return Number(e!=null?e:0)}function p(e){return!!e}function _(e,t){if(!(t==null||typeof t!="object")){var n=t;for(var r of Object.keys(n)){var o=n[r];if(!(o==null||typeof o!="object")){var a=o.type,i=o.value;a==="bool"?e.setABPropBool(r,p(i)):a==="string"?e.setABPropString(r,d(i)):e.setABPropInt(r,m(i))}}}}function f(t,n,a){e:{if(n==="setHideMyIp"){t.setHideMyIp(p(a.hideMyIp));return}if(n==="notifyWebP2PChannelReady"){t.notifyWebP2PChannelReady(p(a.active),p(a.useIPv6));return}if(n==="voipInit"){_(t,a.abProps),t.initVoipStack(d(a.selfJid),d(a.selfUserJid),d(a.selfLid));return}if(n==="startCall"){var i=e(t,a.deviceJids),l=u(t,a.tcToken);try{t.startVoipCall(d(a.peerJid),i,d(a.callId),p(a.useVideo),d(a.phoneNumberJid),p(a.isFromDialer),l)}finally{i.delete(),l.delete()}return}if(n==="startGroupCall"){var f=e(t,a.pnUserJids),g=e(t,a.lidUserJids),h=e(t,a.deviceJidsCsv);try{return t.startVoipGroupCall(f,g,h,d(a.callId),p(a.useVideo),d(a.groupJid),p(a.isLightWeight),d(a.scheduleId),d(a.chatName),d(a.chatIcon),m(a.callFromUI),m(a.lobbyEntryType),d(a.username))}finally{f.delete(),g.delete(),h.delete()}break e}if(n==="acceptCall"){t.acceptCall(p(a.isMicEnabled),p(a.isCameraEnabled));return}if(n==="rejectCall"){t.rejectCall();return}if(n==="endCall"){t.endCall(m(a.endCallReason),p(a.sendTerminate));return}if(n==="rejectCallWithoutCallContext"){t.rejectCallWithoutCallContext(d(a.callId),p(a.isGroupCall),d(a.peerJid),d(a.callCreatorJid),d(a.reason),m(a.retryCount),m(a.registration));return}if(n==="joinOngoingCall"){var y=e(t,a.groupParticipantsPnUserJid),C=e(t,a.groupParticipantsLidUserJid),b=e(t,a.groupParticipantsDeviceJidsCsv);try{return t.joinVoipOngoingCall(d(a.callId),d(a.callCreatorJid),d(a.initialPeerJid),y,C,b,p(a.hasVideo),d(a.groupJid),m(a.initialGroupTransactionId),p(a.callCreatorIsNotContact),d(a.callLinkCode),p(a.isLightweight),d(a.scheduledId),p(a.joinAndAccept),d(a.chatName),m(a.lobbyEntryType),p(a.isDeviceSwitch))}finally{y.delete(),C.delete(),b.delete()}break e}if(n==="previewCallLink")return t.previewCallLink(d(a.token),p(a.videoEnabled),m(a.lobbyEntryType),d(a.username));if(n==="joinCallLink")return t.joinCallLink();if(n==="previewAndJoinCallLink")return t.previewAndJoinCallLink(d(a.token),p(a.videoEnabled),m(a.lobbyEntryType),d(a.username));if(n==="handleIncomingSignalingOffer"){var v=u(t,a.tcToken);try{t.handleIncomingSignalingOffer(d(a.b64Stanza),d(a.msgPlatform),d(a.msgVersion),d(a.msgEStr),d(a.msgTStr),p(a.msgOffline),p(a.isOfferNotContact),d(a.peerJid),v)}finally{v.delete()}return}if(n==="handleIncomingSignalingMessage"){var S=u(t,a.tcToken);try{t.handleIncomingSignalingMessage(d(a.b64Stanza),d(a.msgPlatform),d(a.msgVersion),d(a.msgEStr),d(a.msgTStr),p(a.msgOffline),d(a.peerJid),S)}finally{S.delete()}return}if(n==="handleIncomingSignalingAck"){var R=u(t,a.tcToken);try{t.handleIncomingSignalingAck(d(a.b64Stanza),d(a.ackInfoError),d(a.ackInfoType),d(a.peerJid),R)}finally{R.delete()}return}if(n==="handleIncomingSignalingReceipt"){var L=u(t,a.tcToken);try{t.handleIncomingSignalingReceipt(d(a.b64Stanza),d(a.peerJid),L)}finally{L.delete()}return}if(n==="resendOfferOnDecryptionFailure"){t.resendOfferOnDecryptionFailure(d(a.peerJid),d(a.callId));return}if(n==="resendEncRekeyRetry"){t.resendEncRekeyRetry(d(a.peerJid),m(a.retryCount));return}if(n==="handleOnTransportMessage"){var E=a.packet;if(E instanceof ArrayBuffer){var k=new Uint8Array(E),I=o("WAWebVoipWasmHeapBuffer").ensureHeapBuffer(t,c,k.byteLength);t.GROWABLE_HEAP_U8().set(k,I),t.handleOnMessageFromHeap(I,k.byteLength,d(a.ip),m(a.port))}return}if(n==="setCallMute")return t.setCallMute(p(a.enable));if(n==="setCallVideoMute")return t.setCallVideoMute(p(a.enable));if(n==="videoStreamPause")return t.videoStreamPause();if(n==="videoStreamResume")return t.videoStreamResume();if(n==="broadcastVideoState")return t.broadcastVideoState();if(n==="sendReaction"){t.sendReaction(d(a.reaction));return}if(n==="raiseHand"){t.raiseHand(p(a.isHandRaised));return}if(n==="requestVideoUpgrade")return t.requestVideoUpgrade();if(n==="getCallInfo")return t.getCallInfo();if(n==="acceptPeerVideo")return t.acceptPeerVideo(d(a.jid));if(n==="requestPeerMute")return t.requestPeerMute(d(a.peerJid));if(n==="removeCallParticipant")return t.removeCallParticipant(d(a.peerJid));if(n==="waitingRoomAdmit")return t.waitingRoomAdmit(d(a.peerJid));if(n==="waitingRoomDeny")return t.waitingRoomDeny(d(a.peerJid));if(n==="waitingRoomAdmitAll")return t.waitingRoomAdmitAll();if(n==="waitingRoomToggleActiveCall")return t.waitingRoomToggleActiveCall(p(a.enabled));if(n==="startScreenShare")return t.startScreenShare();if(n==="stopScreenShare")return t.stopScreenShare();if(n==="startVideoPreview")return t.startVideoPreview(d(a.callId),d(a.selfJid));if(n==="requestKeyFrame")return t.requestKeyFrame(d(a.userJid));if(n==="updateParticipantsRxSubscription"){var T=e(t,a.participantJids),D=s(t,a.videoQualities);try{return t.updateParticipantsRxSubscription(T,D)}finally{T.delete(),D.delete()}break e}if(n==="updateNetworkMedium"){t.updateNetworkMedium(m(a.networkMedium),0);return}if(n==="getNetworkConditionerState"){var x=t.isTxNetworkConditionerOn(),$=t.isRxNetworkConditionerOn(),P=null,N=null;return x&&(P=t.getCurrentTxNetworkConditionerParameters()),$&&(N=t.getCurrentRxNetworkConditionerParameters()),{isTxOn:x,isRxOn:$,txParams:P,rxParams:N};break e}if(n==="getShortStatisticString")return t.getShortStatisticString();if(n==="getDebugStatisticString")return t.getDebugStatisticString();if(n==="getVoipParam")return t.getVoipParam(d(a.paramPath));if(n==="inviteToCall"){var M=e(t,a.deviceJids);try{return t.inviteToCall(d(a.invitedParticipantPnUserJid),d(a.invitedParticipantLidUserJid),M)}finally{M.delete()}break e}if(n==="checkOngoingCalls"){var w=e(t,a.callIds),A=e(t,a.callCreatorJids);try{t.checkOngoingCalls(w,A)}finally{w.delete(),A.delete()}return}if(n==="sendWebP2PTransport"){t.sendWebP2PTransport(d(a.callId),d(a.ufrag),d(a.pwd),d(a.algo),d(a.fingerprint),d(a.candidatesJson));return}throw r("err")("voip: [WorkerHandler] Unknown method: "+n)}}function g(e,t){e.onmessage=function(n){var r=n.data;if(!(r==null||typeof r!="object")){var a=Number(r.id),i=String(r.method),l=r.args!=null&&typeof r.args=="object"?r.args:{};try{var s=f(t,i,l);a!==-1&&e.postMessage({id:a,result:s,error:void 0})}catch(n){o("WAWebVoipNativeStackTraceLogger").logNativeStackTrace(t,n);var u=n instanceof Error?n.message:String(n);e.postMessage({id:a,result:void 0,error:u})}}},e.start()}l.setupVoipRpcOnPort=g}),98);
|
|
238
|
+
__d("WAWebVoipJsWorkerMessageHandler",["SecurePostMessage","WAWebVoipJsWorkerMessageHandlerHelpers","WAWebVoipStatsTracker","WAWebVoipVideoCaptureOffThread","WAWebVoipWasmHeapBuffer","WAWebVoipWebCodecsEncoder","WAWebVoipWorkerHandler"],(function(t,n,r,o,a,i,l){var e=new Map,s=new Map,u=!1,c=1e4,d=null,m=null,p=0,_=!1,f=null,g=0,h=0,y=!1,C=new(o("WAWebVoipStatsTracker")).VoipStatsTracker,b=20,v=0,S=0;function R(e,t){var n=t.bufferedAmount;y&&C.record(e,n),n>S&&(S=n);var r=Date.now();if(r-v>=b){var o;v=r,(o=O)==null||o.updateSctpBufferedAmount==null||o.updateSctpBufferedAmount(S,n),S=0}}function L(){y&&(C.isPolling()||C.startPolling({intervalMs:o("WAWebVoipStatsTracker").DEFAULT_POLL_INTERVAL_MS,resetPerInterval:!0,onInterval:function(n){var t=n.getMostActiveId();if(t!=null){var r=e.get(t);if(r!=null&&r.channel.readyState==="open"){var a,i=r.channel.bufferedAmount,l=(a=n.formatStats(t))!=null?a:"N/A";o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(3,"voip: [SctpStats] "+t+" bufferedAmount="+i+" ("+l+")")}}}}))}function E(){var e=C.stopPolling();e!=null&&o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(3,"voip: [SctpStats] Call bufferedAmount summary: "+e)}function k(e){e.noFirstResponseWatchdog!=null&&(self.clearTimeout(e.noFirstResponseWatchdog),e.noFirstResponseWatchdog=null)}function I(e){e.rxStallWatchdog!=null&&(self.clearTimeout(e.rxStallWatchdog),e.rxStallWatchdog=null)}function T(e,t,n){I(t);var r=n!=null?n:c;t.rxStallWatchdog=self.setTimeout(function(){t.rxStallWatchdog=null;var n=Date.now(),r=n-t.lastRxPacketTime;r>=c?D(e):T(e,t,c-r)},r)}function D(t){var n=e.get(t);if(!(n==null||n.lastRxPacketTime===0||!n.receivedMedia||n.channel.readyState!=="open")){var r=Date.now()-n.lastRxPacketTime;o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(1,"voip: [DCThread] Channel "+t+" rx_stall_timeout after "+r+"ms without RX (threshold="+c+"ms, readyState="+n.channel.readyState+", bufferedAmount="+n.channel.bufferedAmount+")");var a=G(t,"error","rx_stall_timeout");if(a!=null)try{a.channel.close()}catch(e){}}}function x(e,t){t.noFirstResponseWatchdog!=null||t.stats.firstSendTime===0||t.stats.firstResponseRecvTime!==0||t.channel.readyState!=="open"||(t.noFirstResponseWatchdog=self.setTimeout(function(){t.noFirstResponseWatchdog=null,z(e)},c))}function $(e,t,n){t.stats.sentPackets++,t.stats.sentBytes+=n,t.stats.firstSendTime===0&&(t.stats.firstSendTime=Date.now(),x(e,t))}var P=new TextDecoder;function N(){if(_){var t=d,n=m;if(!(t==null||n==null))for(var r=Atomics.load(t,0),a=Atomics.load(t,1);a!==r;){var i=o("WAWebVoipJsWorkerMessageHandlerHelpers").readRingU16LE(n,a,p);if(i<o("WAWebVoipJsWorkerMessageHandlerHelpers").RING_BUFFER_ENTRY_HEADER_BYTES+1||i>p){""+i+a,Atomics.store(t,1,r);break}var l=o("WAWebVoipJsWorkerMessageHandlerHelpers").readRingU16LE(n,a+2,p),c=o("WAWebVoipJsWorkerMessageHandlerHelpers").readRingByte(n,a+4,p),f=i-o("WAWebVoipJsWorkerMessageHandlerHelpers").RING_BUFFER_ENTRY_HEADER_BYTES-c;if(f<0||o("WAWebVoipJsWorkerMessageHandlerHelpers").RING_BUFFER_ENTRY_HEADER_BYTES+c>i){""+i+c,Atomics.store(t,1,r);break}var y=a+o("WAWebVoipJsWorkerMessageHandlerHelpers").RING_BUFFER_ENTRY_HEADER_BYTES,C=o("WAWebVoipJsWorkerMessageHandlerHelpers").readRingBytes(n,y,c,p),b=P.decode(C),v=a+o("WAWebVoipJsWorkerMessageHandlerHelpers").RING_BUFFER_ENTRY_HEADER_BYTES+c,S=o("WAWebVoipJsWorkerMessageHandlerHelpers").readRingBytes(n,v,f,p),L=o("WAWebVoipJsWorkerMessageHandlerHelpers").getConnectionIdFromIpPort(b,l,u),E=e.get(L);if(E!=null&&E.channel.readyState==="open")try{E.channel.send(S),R(L,E.channel),$(L,E,f),g++}catch(e){h++;break}else if(E!=null)E.txBuffer.push(S.buffer),E.stats.txBufferedPackets++;else{var k=s.get(L);k==null&&(k=[],s.set(L,k)),k.push(S.buffer)}var I=(a+i)%p;Atomics.store(t,1,I),a=I,r=Atomics.load(t,0)}}}function M(){function e(){if(_){try{N()}catch(e){}f=self.setTimeout(e,0)}}e()}function w(e,t,n){_&&A(),m=new Uint8Array(e,t+o("WAWebVoipJsWorkerMessageHandlerHelpers").RING_BUFFER_HEADER_BYTES,n),d=new Uint32Array(e,t,2),p=n,g=0,h=0,_=!0,M(),""+n}function A(){if(_)try{N()}catch(e){}_=!1,f!=null&&(self.clearTimeout(f),f=null),d!=null&&o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(3,"voip: [DCThread] Ring buffer stats - sent: "+g+", dropped: "+h),d=null,m=null}function F(t,n,r){var a=o("WAWebVoipJsWorkerMessageHandlerHelpers").getConnectionIdFromIpPort(t,n,u),i=e.get(a);if(i==null)return!1;var l=i.channel;if(l.readyState!=="open"){var s=r instanceof ArrayBuffer?r:new Uint8Array(r).buffer;return i.txBuffer.push(s),i.stats.txBufferedPackets++,!0}try{var c=r instanceof ArrayBuffer?r:new Uint8Array(r).buffer,d=c.byteLength;return l.send(c),R(a,l),$(a,i,d),!0}catch(e){return!1}}var O=null;function B(t,n){var r=e.get(t);if(r==null){""+t;return}r.stats.receivedPackets++,r.stats.receivedBytes+=n.byteLength,r.lastRxPacketTime=Date.now(),r.stats.firstResponseRecvTime===0&&(r.stats.firstResponseRecvTime=r.lastRxPacketTime,k(r)),!r.receivedMedia&&!o("WAWebVoipJsWorkerMessageHandlerHelpers").isStunPacket(n)&&(r.receivedMedia=!0,T(t,r));var a=O;if(a==null){r.rxBuffer.push(n);return}var i=n.byteLength,l=o("WAWebVoipWasmHeapBuffer").ensureHeapBuffer(a,r.wasmBuffer,i);if(l===0){o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(1,"voip: [DCThread] Failed to allocate WASM heap memory for packet (size="+i+", rxBuffered="+r.rxBuffer.length+")"),r.rxBuffer.push(n);return}try{var s=new Uint8Array(n);a.GROWABLE_HEAP_U8().set(s,l),a.handleOnMessageFromHeap(l,i,r.ip,r.port)}catch(e){}}function W(t){var n=e.get(t);if(n!=null){var r=n.channel;if(r.readyState==="open")for(;n.txBuffer.length>0;){var a=n.txBuffer[0];if(a!=null){var i=a.byteLength;try{r.send(a),n.txBuffer.shift(),$(t,n,i)}catch(e){o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(1,"voip: [DCThread] Error sending buffered TX packet: "+String(e));break}}else n.txBuffer.shift()}}}function q(t){var n=e.get(t);if(!(n==null||O==null)){var r=n.rxBuffer.splice(0);for(var o of r)o!=null&&B(t,o)}}function U(t,n){var r=n.channel;r.onmessage=function(e){var n=e.data;n instanceof ArrayBuffer&&B(t,n),N()},r.onopen=function(){try{globalThis.postMessage({type:"waWasmWorkerCompatibleCallback",__name:"dataChannelStateCallback",event:"open",connectionId:t})}catch(e){}W(t),q(t)},r.onclose=function(){e.has(t)&&G(t,"close")},r.onerror=function(n){var a=o("WAWebVoipJsWorkerMessageHandlerHelpers").getDataChannelErrorDetails(r,n);o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(1,"voip: [DCThread] Channel "+t+" error: "+o("WAWebVoipJsWorkerMessageHandlerHelpers").formatDataChannelErrorDetails(a)),e.has(t)&&G(t,"error")}}function V(t,n,r){var o=e.get(t);if(o!=null)try{globalThis.postMessage(babelHelpers.extends({type:"waWasmWorkerCompatibleCallback",__name:"dataChannelStateCallback",event:n,connectionId:t},n==="error"&&r!=null?{errorReason:r}:{},{stats:{sentPackets:o.stats.sentPackets,sentBytes:o.stats.sentBytes,receivedPackets:o.stats.receivedPackets,receivedBytes:o.stats.receivedBytes,firstSendTime:o.stats.firstSendTime,firstResponseRecvTime:o.stats.firstResponseRecvTime}}))}catch(e){}}function H(t){var n=e.get(t);n!=null&&o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(3,"voip: [DCThread] Channel "+t+" stats - sent: "+n.stats.sentPackets+" ("+n.stats.sentBytes+" bytes), received: "+n.stats.receivedPackets+" ("+n.stats.receivedBytes+" bytes), txBuffered: "+n.stats.txBufferedPackets)}function G(t,n,r){var a=e.get(t);return a==null?null:(k(a),I(a),H(t),V(t,n,r),O!=null&&o("WAWebVoipWasmHeapBuffer").freeHeapBuffer(O,a.wasmBuffer),e.delete(t),C.remove(t),e.size===0&&E(),a)}function z(t){var n=e.get(t);if(!(n==null||n.stats.firstSendTime===0||n.stats.firstResponseRecvTime!==0||n.channel.readyState!=="open")){var r=Date.now()-n.stats.firstSendTime;o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(1,"voip: [DCThread] Channel "+t+" no_first_response_timeout after "+r+"ms (threshold="+c+"ms, readyState="+n.channel.readyState+", bufferedAmount="+n.channel.bufferedAmount+")");var a=G(t,"error","no_first_response_timeout");if(a!=null)try{a.channel.close()}catch(e){}}}function j(t,n,r,a,i,l){var u={channel:r,ip:a,port:i,rxBuffer:[],txBuffer:[],noFirstResponseWatchdog:null,rxStallWatchdog:null,lastRxPacketTime:0,receivedMedia:!1,wasmBuffer:o("WAWebVoipWasmHeapBuffer").createHeapBufferState(),stats:{sentPackets:0,sentBytes:0,receivedPackets:0,receivedBytes:0,txBufferedPackets:0,firstSendTime:0,firstResponseRecvTime:0}};e.set(n,u);var c=s.get(n);if(c!=null){s.delete(n);for(var d of c)u.txBuffer.push(d),u.stats.txBufferedPackets++}U(n,u),y=l,L()}function K(t,n){var r=e.get(t);if(r!=null){var a=r.channel;if(a.readyState!=="open"){r.txBuffer.push(n),r.stats.txBufferedPackets++;return}var i=n.byteLength;try{a.send(n),R(t,a),$(t,r,i)}catch(e){o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(1,"voip: [DCThread] Error sending packet: "+String(e))}}}function Q(t){if(t!=null){var n=e.get(t);if(n!=null){G(t,"close");try{n.channel.close()}catch(e){}}}else{var r=[];for(var o of Array.from(e.entries())){var a=o[0],i=o[1];G(a,"close"),r.push(i.channel)}for(var l of r)try{l.close()}catch(e){}}}function X(e,t){if(O==null&&(O=e),t.jsWorkerCmd==="shutdown"){E(),A(),s.clear(),Q(),O=null;try{e.exitJsWorkerThread()}catch(e){o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(2,"voip: [JsWorkerThread] exitJsWorkerThread error (expected during teardown): "+String(e))}}else if(t.jsWorkerCmd!=="ping"){if(t.jsWorkerCmd==="startVideoCapture")t.useWebCodecsEncoder===!0?o("WAWebVoipWebCodecsEncoder").startVideoCaptureWithWebCodecsEncoderInWorker(t.captureObject,t.params,e,t.videoElementCapture,t.initialOrientationValue,t.isScreenShare===!0).catch(function(e){o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(2,"voip: [AV:startVideoCaptureWithWebCodecsEncoderInWorker] unhandled error: "+String(e))}):t.captureObject!=null?o("WAWebVoipVideoCaptureOffThread").startVideoCaptureInWorker(t.captureObject,t.params,e,t.onVideoDataFnType,t.initialOrientationValue).catch(function(e){o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(2,"voip: [AV:startVideoCaptureInWorker] unhandled error: "+String(e))}):o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(2,"voip: [AV:startVideoCaptureInWorker] captureObject is null");else if(t.jsWorkerCmd==="stopVideoCapture")o("WAWebVoipVideoCaptureOffThread").stopVideoCaptureInWorker().catch(function(e){o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(2,"voip: [AV:stopVideoCaptureInWorker] unhandled error: "+String(e))});else if(t.jsWorkerCmd==="updateWebCodecsEncodeParams")o("WAWebVoipWebCodecsEncoder").updateWebCodecsEncoderParams(t.params);else if(t.jsWorkerCmd==="updateDeviceOrientation")o("WAWebVoipVideoCaptureOffThread").updateDeviceOrientationInWorker(t.orientationValue);else if(t.jsWorkerCmd==="deliverVideoFrame")o("WAWebVoipVideoCaptureOffThread").deliverVideoFrameToWorker(t.frame);else if(t.jsWorkerCmd==="startVoipRpc"){o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(3,"voip: [JsWorkerThread] startVoipRpc received token="+t.token);try{o("WAWebVoipWorkerHandler").setupVoipRpcOnPort(t.rpcPort,e)}catch(e){o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(1,"voip: [JsWorkerThread] startVoipRpc setup failed token="+t.token+": "+String(e)),t.rpcPort.close();return}o("WAWebVoipJsWorkerMessageHandlerHelpers").logToPhysicalLogs(3,"voip: [JsWorkerThread] startVoipRpc ready token="+t.token),r("SecurePostMessage").sendMessageForCurrentOrigin(self,{type:"voipRpcReady",token:t.token})}else if(t.jsWorkerCmd==="transferDataChannel")j(e,t.connectionId,t.channel,t.ip,t.port,t.enableStats);else if(t.jsWorkerCmd==="sendPacket")K(t.connectionId,t.data);else if(t.jsWorkerCmd==="closeDataChannel")Q(t.connectionId);else if(t.jsWorkerCmd==="initRingBuffer")w(t.heapBuffer,t.heapBufferOffset,t.dataSize);else if(t.jsWorkerCmd==="shutdownRingBuffer")A();else if(t.jsWorkerCmd==="setRemoveRelayPortOverride")u=t.enabled;else if(t.jsWorkerCmd==="setSctpTimeoutMs")c=t.ms;else if(t.jsWorkerCmd==="updateIceRtt"){var n;((n=O)==null?void 0:n.updateIceRtt)!=null&&O.updateIceRtt(t.rttMs,t.relayIp,t.relayPort)}}}l.trySendDirectOnTransferredChannel=F,l.handleJsWorkerMessage=X}),98);
|
|
239
|
+
__d("WAResolvable",["Promise"],(function(t,n,r,o,a,i){"use strict";var e,l=(function(){function t(){var t=this;this.$1=function(){},this.$2=!1,this.isSettled=!1,this.promise=new(e||(e=n("Promise")))(function(e){t.$1=e})}var r=t.prototype;return r.resolve=function(t){this.$2=!0,this.isSettled=!0,this.$1(t)},r.reject=function(r){this.isSettled=!0,this.resolve((e||(e=n("Promise"))).reject(r))},r.resolveWasCalled=function(){return this.$2},t})();i.Resolvable=l}),66);
|
|
240
|
+
__d("WAWebPonyfillsIdleCallback",[],(function(t,n,r,o,a,i){function e(e){var t=self.setTimeout(function(){var t=Date.now();e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1);return t}function l(e){self.clearTimeout(e)}var s=window.requestIdleCallback,u=window.cancelIdleCallback,c="requestIdleCallback"in window?s.bind(window):e.bind(window),d="cancelIdleCallback"in window?u.bind(window):l.bind(window);i.requestIdleCallback=c,i.cancelIdleCallback=d}),66);
|
|
241
|
+
__d("once",[],(function(t,n,r,o,a,i){"use strict";function e(e){var t=l(e);for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function l(e){var t=e,n,r=function(){if(t){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];n=t.apply(this,r),t=null}return n};return r}i.default=e}),66);
|
|
242
|
+
__d("WAWebVoipPersistentFS",["Promise","WALogger","WAResolvable","WAWebPonyfillsIdleCallback","asyncToGeneratorRuntime","err","once"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u,c,d,m,p,_,f,g="/wa_voip_storage",h=1e3,y=10,C=!1,b=null,v=!1,S=null,R=0,L=null,E=5e3,k=2;function I(e,t){return new(f||(f=n("Promise")))(function(n,o){var a=!1,i=window.setTimeout(function(){a||(a=!0,o(r("err")("[IDBFS] syncfs timed out after "+E+"ms")))},E);e.syncfs(t,function(e){a||(a=!0,window.clearTimeout(i),e?o(e):n())})})}var T=r("once")((function(){var t=n("asyncToGeneratorRuntime").asyncToGenerator(function*(t){var a=t.FS;if(!a)throw r("err")("[IDBFS] FS not available in WASM module");try{a.mkdir(g)}catch(e){}a.mount(a.filesystems.IDBFS,{},g);for(var i=function*(){try{return yield I(a,!0),C=!0,o("WALogger").LOG(e||(e=babelHelpers.taggedTemplateLiteralLoose(["voip: [IDBFS] syncfs succeeded on attempt ",""])),u+1),{v:void 0}}catch(e){if(u<k){var t=(u+1)*1e4;o("WALogger").LOG(s||(s=babelHelpers.taggedTemplateLiteralLoose(["voip: [IDBFS] syncfs attempt "," failed, retry in ","ms"])),u+1,t),yield new(f||(f=n("Promise")))(function(e){window.setTimeout(function(){o("WAWebPonyfillsIdleCallback").requestIdleCallback(function(){return e()})},t)})}else throw e}},l,u=0;u<=k;u++)if(l=yield*i(),l)return l.v});return function(e){return t.apply(this,arguments)}})());function D(e){return x.apply(this,arguments)}function x(){return x=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){if(!C)throw r("err")("[IDBFS] Persistent FS not initialized");if(b!=null)return b.promise;var t=new(o("WAResolvable")).Resolvable;b=t;try{var n=e.FS;if(!n)throw r("err")("[IDBFS] FS not available in WASM module");yield I(n,!1),t.resolve()}catch(e){throw t.reject(e),e}finally{b=null}}),x.apply(this,arguments)}function $(){return g}function P(){!v||S==null||o("WAWebPonyfillsIdleCallback").requestIdleCallback(function(){var e=S;if(!(!v||e==null)){var t=Date.now();D(e).then(function(){var e=Date.now()-t;R++,R%y===0&&o("WALogger").LOG(u||(u=babelHelpers.taggedTemplateLiteralLoose(["voip: [IDBFS] Periodic sync #"," completed in ","ms"])),R,e)}).catch(function(e){R++,o("WALogger").ERROR(c||(c=babelHelpers.taggedTemplateLiteralLoose(["voip: [IDBFS] Periodic sync #"," failed: ",""])),R,e)}).finally(function(){v&&window.setTimeout(P,h)})}})}function N(){v&&S!=null&&o("WALogger").LOG(d||(d=babelHelpers.taggedTemplateLiteralLoose(["voip: [IDBFS] page unload, skipping final sync (last periodic sync #",")"])),R)}function M(e){if(v){o("WALogger").LOG(m||(m=babelHelpers.taggedTemplateLiteralLoose(["voip: [IDBFS] Periodic sync already running, skipping start"])));return}R=0,v=!0,S=e,o("WALogger").LOG(p||(p=babelHelpers.taggedTemplateLiteralLoose(["voip: [IDBFS] Starting periodic sync (target interval: ","ms)"])),h),P(),typeof window!="undefined"&&(window.addEventListener("beforeunload",N),L=function(){window.removeEventListener("beforeunload",N)})}function w(){v&&(o("WALogger").LOG(_||(_=babelHelpers.taggedTemplateLiteralLoose(["voip: [IDBFS] Stopping periodic sync after "," syncs"])),R),v=!1,S=null,L!=null&&(L(),L=null))}l.initPersistentFS=T,l.syncPersistentFS=D,l.getVoipPersistentDirectoryPath=$,l.startPeriodicVoipSync=M,l.stopPeriodicVoipSync=w}),98);
|
|
243
|
+
__d("WAWebVoipWebWasmLoader.worker",["Promise","WorkerBundleResource","WorkerClient","WorkerMessagePort","bx"],(function(t,n,r,o,a,i,l){var e=["type","__name"],s,u,c=r("bx").getURL(r("bx")("32180"),{cacheBreaker:"1778490132531"}),d=(function(){var t=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return function(r){var a=this;r===void 0&&(r={});function i(){return B.buffer!=G.buffer&&te(),G}function l(){return B.buffer!=G.buffer&&te(),z}function d(){return B.buffer!=G.buffer&&te(),j}function m(){return B.buffer!=G.buffer&&te(),K}function p(){return B.buffer!=G.buffer&&te(),Q}function _(){return B.buffer!=G.buffer&&te(),X}function f(){return B.buffer!=G.buffer&&te(),Y}function g(){return B.buffer!=G.buffer&&te(),ee}var h=r,y,C;h.ready=new(u||(u=n("Promise")))(function(e,t){y=e,C=t}),["_malloc","_free","__emscripten_thread_init","__emscripten_thread_exit","__emscripten_thread_crashed","__emscripten_thread_mailbox_await","__emscripten_tls_init","_pthread_self","checkMailbox","establishStackSpace","invokeEntryPoint","PThread","getExceptionMessage","___get_exception_message","_on_call_event_js_sync","_wasm_throw_ml_abort","_set_ml_inference_flag","_patch_abort_for_ml_inference","_get_persistent_directory_path_js","_get_bwe_ml_model_path_js","_get_random_bytes_js","_is_participant_known_contact_js","_renderVideoFrame_js","_sendSignalingXMPP_js_sync","_fflush","_call_sendto","___indirect_function_table","_call_init_capture_driver_js_sync","_call_start_capture_js_sync","_call_stop_capture_js_sync","_call_init_playback_driver_js_sync","_call_start_playback_js_sync","_call_stop_playback_js_sync","_query_browser_audio_processing_status_js_sync","_call_start_desktop_capture_js_sync","_call_stop_desktop_capture_js_sync","_call_start_video_capture_js_sync","_call_stop_video_capture_js_sync","_loggingCallback_js_sync","__embind_initialize_bindings","__emscripten_check_mailbox","___start_em_js","___stop_em_js","___start_em_asm","___stop_em_asm","onRuntimeInitialized"].forEach(function(e){Object.getOwnPropertyDescriptor(h.ready,e)||Object.defineProperty(h.ready,e,{get:function(){return Ee("You are getting "+e+" 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")},set:function(){return Ee("You are setting "+e+" 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 b=Object.assign({},h),v=[],S="./this.program",R=function(t,n){throw n},L=typeof window=="object",E=typeof importScripts=="function",k=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",I=!L&&!k&&!E;if(h.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");var T=h.ENVIRONMENT_IS_PTHREAD||!1,D="";function x(e){return h.locateFile?h.locateFile(e,D):D+e}var $,P,N,M;if(I){if(typeof process=="object"&&typeof n=="function"||typeof window=="object"||typeof importScripts=="function")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?)");typeof read!="undefined"&&($=read),N=function(t){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(t));var e=read(t,"binary");return H(typeof e=="object"),e},P=function(t,n,r){setTimeout(function(){return n(N(t))})},typeof clearTimeout=="undefined"&&(globalThis.clearTimeout=function(e){}),typeof setTimeout=="undefined"&&(globalThis.setTimeout=function(e){return typeof e=="function"?e():Ee()}),typeof scriptArgs!="undefined"?v=scriptArgs:typeof arguments!="undefined"&&(v=arguments),typeof quit=="function"&&(R=function(t,n){throw setTimeout(function(){if(!(n instanceof ft)){var e=n;n&&typeof n=="object"&&n.stack&&(e=[n,n.stack]),A("exiting due to exception: "+e)}quit(t)}),n}),typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)}else if(L||E){if(E?D=self.location.href:typeof document!="undefined"&&document.currentScript&&(D=document.currentScript.src),t&&(D=t),D.indexOf("blob:")!==0?D=D.substr(0,D.replace(/[?#].*/,"").lastIndexOf("/")+1):D="",!(typeof window=="object"||typeof importScripts=="function"))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?)");$=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.send(null),e.responseText},E&&(N=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),P=function(t,n,r){var e=new XMLHttpRequest;e.open("GET",t,!0),e.responseType="arraybuffer",e.onload=function(){if(e.status==200||e.status==0&&e.response){n(e.response);return}r()},e.onerror=r,e.send(null)},M=function(t){return document.title=t}}else throw new Error("environment detection error");var w=h.print||console.log.bind(console),A=h.printErr||console.error.bind(console);Object.assign(h,b),b=null,Ci(),h.arguments&&(v=h.arguments),Be("arguments","arguments_"),h.thisProgram&&(S=h.thisProgram),Be("thisProgram","thisProgram"),h.quit&&(R=h.quit),Be("quit","quit_"),H(typeof h.memoryInitializerPrefixURL=="undefined","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),H(typeof h.pthreadMainPrefixURL=="undefined","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),H(typeof h.cdInitializerPrefixURL=="undefined","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),H(typeof h.filePackagePrefixURL=="undefined","Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),H(typeof h.read=="undefined","Module.read option was removed (modify read_ in JS)"),H(typeof h.readAsync=="undefined","Module.readAsync option was removed (modify readAsync in JS)"),H(typeof h.readBinary=="undefined","Module.readBinary option was removed (modify readBinary in JS)"),H(typeof h.setWindowTitle=="undefined","Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),H(typeof h.TOTAL_MEMORY=="undefined","Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Be("asm","wasmExports"),Be("read","read_"),Be("readAsync","readAsync"),Be("readBinary","readBinary"),Be("setWindowTitle","setWindowTitle"),H(L||E||k,"Pthreads do not work in this environment yet (need Web Workers, or an alternative to them)"),H(!k,"node environment detected but not enabled at build time. Add 'node' to `-sENVIRONMENT` to enable."),H(!I,"shell environment detected but not enabled at build time. Add 'shell' to `-sENVIRONMENT` to enable.");var F;h.wasmBinary&&(F=h.wasmBinary),Be("wasmBinary","wasmBinary");var O=h.noExitRuntime||!0;Be("noExitRuntime","noExitRuntime"),typeof WebAssembly!="object"&&Ee("no native wasm support detected");var B,W,q,U=!1,V;function H(e,t){e||Ee("Assertion failed"+(t?": "+t:""))}var G,z,j,K,Q,X,Y,J,Z,ee;function te(){var e=B.buffer;h.HEAP8=G=new Int8Array(e),h.HEAP16=j=new Int16Array(e),h.HEAP32=Q=new Int32Array(e),h.HEAPU8=z=new Uint8Array(e),h.HEAPU16=K=new Uint16Array(e),h.HEAPU32=X=new Uint32Array(e),h.HEAPF32=Y=new Float32Array(e),h.HEAPF64=ee=new Float64Array(e),h.HEAP64=J=new BigInt64Array(e),h.HEAPU64=Z=new BigUint64Array(e)}H(!h.STACK_SIZE,"STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time"),H(typeof Int32Array!="undefined"&&typeof Float64Array!="undefined"&&Int32Array.prototype.subarray!=null&&Int32Array.prototype.set!=null,"JS engine does not provide full typed array support");var ne=h.INITIAL_MEMORY||10485760;if(Be("INITIAL_MEMORY","INITIAL_MEMORY"),H(ne>=1048576,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+ne+"! (STACK_SIZE=1048576)"),T)B=h.wasmMemory;else if(h.wasmMemory)B=h.wasmMemory;else if(B=new WebAssembly.Memory({initial:ne/65536,maximum:2147483648/65536,shared:!0}),!(B.buffer instanceof SharedArrayBuffer))throw A("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),k&&A("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");te(),ne=B.buffer.byteLength,H(ne%65536===0);var re;function oe(){var e=Hi();H((e&3)==0),e==0&&(e+=4),_()[e>>2]=34821223,_()[e+4>>2]=2310721022,_()[0]=1668509029}function ae(){if(!U){var e=Hi();e==0&&(e+=4);var t=_()[e>>2],n=_()[e+4>>2];(t!=34821223||n!=2310721022)&&Ee("Stack overflow! Stack cookie has been overwritten at "+en(e)+", expected hex dwords 0x89BACDFE and 0x2135467, but received "+en(n)+" "+en(t)),_()[0]!=1668509029&&Ee("Runtime error: The application has corrupted its heap memory area (address zero)!")}}(function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,t[0]!==115||t[1]!==99)throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"})();var ie=[],le=[],se=[],ue=!1,ce=0;function de(){return O||ce>0}function me(){if(H(!T),h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)fe(h.preRun.shift());rn(ie)}function pe(){H(!ue),ue=!0,!T&&(ae(),!h.noFSInit&&!Kt.init.initialized&&Kt.init(),Kt.ignorePermissions=!1,Nt.init(),rn(le))}function _e(){if(ae(),!T){if(h.postRun)for(typeof h.postRun=="function"&&(h.postRun=[h.postRun]);h.postRun.length;)he(h.postRun.shift());rn(se)}}function fe(e){ie.unshift(e)}function ge(e){le.unshift(e)}function he(e){se.unshift(e)}H(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),H(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),H(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),H(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 ye=0,Ce=null,be=null,ve={};function Se(e){for(var t=e;;){if(!ve[e])return e;e=t+Math.random()}}function Re(e){ye++,h.monitorRunDependencies&&h.monitorRunDependencies(ye),e?(H(!ve[e]),ve[e]=1,Ce===null&&typeof setInterval!="undefined"&&(Ce=setInterval(function(){if(U){clearInterval(Ce),Ce=null;return}var e=!1;for(var t in ve)e||(e=!0,A("still waiting on run dependencies:")),A("dependency: "+t);e&&A("(end of list)")},1e4))):A("warning: run dependency added without ID")}function Le(e){if(ye--,h.monitorRunDependencies&&h.monitorRunDependencies(ye),e?(H(ve[e]),delete ve[e]):A("warning: run dependency removed without ID"),ye==0&&(Ce!==null&&(clearInterval(Ce),Ce=null),be)){var t=be;be=null,t()}}function Ee(e){h.onAbort&&h.onAbort(e),e="Aborted("+e+")",A(e),U=!0,V=1;var t=new WebAssembly.RuntimeError(e);throw C(t),t}var ke="data:application/octet-stream;base64,";function Ie(e){return e.startsWith(ke)}function Te(e){return e.startsWith("file://")}function De(e){return function(){H(ue,"native function `"+e+"` called before runtime initialization");var t=W[e];return H(t,"exported native function `"+e+"` not found"),t.apply(null,arguments)}}var xe=(function(e){function t(){return e.apply(this,arguments)||this}return babelHelpers.inheritsLoose(t,e),t})(babelHelpers.wrapNativeSuper(Error)),$e=(function(e){function t(){return e.apply(this,arguments)||this}return babelHelpers.inheritsLoose(t,e),t})(xe),Pe=(function(e){function t(t){var n;n=e.call(this,t)||this,n.excPtr=t;var r=un(t);return n.name=r[0],n.message=r[1],n}return babelHelpers.inheritsLoose(t,e),t})(xe),Ne=c;function Me(e){if(e==Ne&&F)return new Uint8Array(F);if(N)return N(e);throw"both async and sync fetching of the wasm failed"}function we(e){return!F&&(L||E)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(function(t){if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(function(){return Me(e)}):(u||(u=n("Promise"))).resolve().then(function(){return Me(e)})}function Ae(e,t,n){return we(e).then(function(e){return WebAssembly.instantiate(e,t)}).then(function(e){return e}).then(n,function(e){A("failed to asynchronously prepare wasm: "+e),Te(Ne)&&A("warning: Loading from a file URI ("+Ne+") 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"),Ee(e)})}function Fe(e,t,n,r){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!Ie(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(function(e){var o=WebAssembly.instantiateStreaming(e,n);return o.then(r,function(e){return A("wasm streaming compile failed: "+e),A("falling back to ArrayBuffer instantiation"),Ae(t,n,r)})}):Ae(t,n,r)}function Oe(){var e={env:bi,wasi_snapshot_preview1:bi};function t(e,t){var n=e.exports;return W=n,mn(W._emscripten_tls_init),re=W.__indirect_function_table,H(re,"table not found in wasm exports"),ge(W.__wasm_call_ctors),q=t,Le("wasm-instantiate"),n}Re("wasm-instantiate");var n=h;function r(e){H(h===n,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"),n=null,t(e.instance,e.module)}if(h.instantiateWasm)try{return h.instantiateWasm(e,t)}catch(e){A("Module.instantiateWasm callback failed with error: "+e),C(e)}return Fe(F,Ne,e,r).catch(C),{}}function Be(e,t,n){n===void 0&&(n=!0),Object.getOwnPropertyDescriptor(h,e)||Object.defineProperty(h,e,{configurable:!0,get:function(){var r=n?" (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)":"";Ee("`Module."+e+"` has been replaced by `"+t+"`"+r)}})}function We(e){Object.getOwnPropertyDescriptor(h,e)&&Ee("`Module."+e+"` was supplied but `"+e+"` not included in INCOMING_MODULE_JS_API")}function qe(e){return e==="FS_createPath"||e==="FS_createDataFile"||e==="FS_createPreloadedFile"||e==="FS_unlink"||e==="addRunDependency"||e==="FS_createLazyFile"||e==="FS_createDevice"||e==="removeRunDependency"}function Ue(e,t){typeof globalThis!="undefined"&&Object.defineProperty(globalThis,e,{configurable:!0,get:function(){pn("`"+e+"` is not longer defined by emscripten. "+t)}})}Ue("buffer","Please use HEAP8.buffer or wasmMemory.buffer");function Ve(e){typeof globalThis!="undefined"&&!Object.getOwnPropertyDescriptor(globalThis,e)&&Object.defineProperty(globalThis,e,{configurable:!0,get:function(){var t="`"+e+"` is a library symbol and not included by default; add it to your library.js __deps or to DEFAULT_LIBRARY_FUNCS_TO_INCLUDE on the command line",n=e;n.startsWith("_")||(n="$"+e),t+=" (e.g. -sDEFAULT_LIBRARY_FUNCS_TO_INCLUDE='"+n+"')",qe(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),pn(t)}}),He(e)}function He(e){Object.getOwnPropertyDescriptor(h,e)||Object.defineProperty(h,e,{configurable:!0,get:function(){var t="'"+e+"' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)";qe(e)&&(t+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"),Ee(t)}})}function Ge(e){console.warn.apply(console,arguments)}var ze={1287659:function(){return Date.now()},1287682:function(t,n){var e="voip: [WasmTimestampCalibration] backgrounding detected: skew_old="+t.toFixed(1)+"ms, skew_new="+n.toFixed(1)+"ms, delta="+(n-t).toFixed(1)+"ms";self.WhatsAppVoipWasmWorkerCompatibleCallbacks.loggingCallback({level:2,message:e})}};function je(e,t){var n=t?Qt(t):"";self.WhatsAppVoipWasmWorkerCompatibleCallbacks.onCallEvent({eventType:e,userData:"",eventDataJson:n})}function Ke(e){self.__inMLInference=e}function Qe(){var e=Ee;Ee=function(n){if(self.__inMLInference&&h._wasm_throw_ml_abort){h.onAbort&&h.onAbort(n),n="Aborted("+n+")",A(n);var t=Dt(n)+1,r=Zi(),o=tl(t);On(n,o,t),h._wasm_throw_ml_abort(o),el(r);return}e(n)}}function Xe(){var e=self.WhatsAppVoipWasmWorkerCompatibleCallbacks.getPersistentDirectoryPath();if(e){var t=Dt(e)+1,n=Li(t);return On(e,n,t),n}return null}function Ye(e){var t=e?Qt(e):null,n=self.WhatsAppVoipWasmWorkerCompatibleCallbacks.getBweModelPath({versionName:t});if(n){var r=Dt(n)+1,o=Li(r);return On(n,o,r),o}return null}function Je(e,t){if(t==null){var n=new Error("get_random_bytes_js: rawBytesPtr is null");throw n.stack,n}var r=new Uint8Array(e),o=self.crypto.getRandomValues(r);ci(o,t)}function Ze(e){var t=Qt(e);return self.WhatsAppVoipWasmWorkerCompatibleCallbacks.isParticipantKnownContact({jid:t})}function et(e,t,n,r,o,a,i,s,u){var c=l(),d=new Uint8Array(n);d.set(c.subarray(t,t+n));var m=Qt(e);self.WhatsAppVoipWasmWorkerCompatibleCallbacks&&self.WhatsAppVoipWasmWorkerCompatibleCallbacks.onVideoFrameWasmToJs&&self.WhatsAppVoipWasmWorkerCompatibleCallbacks.onVideoFrameWasmToJs({userJid:m,frameBuffer:d.buffer,width:r,height:o,orientation:a,format:i,timestamp:s,isKeyFrame:u})}function tt(e,t,n,r){var o=l(),a=new Uint8Array(r);a.set(o.subarray(n,n+r));var i=Qt(t),s=Qt(e);self.WhatsAppVoipWasmWorkerCompatibleCallbacks.onSignalingXmpp({peerJid:s,callId:i,xmlPayload:a})}function nt(e,t,n,r){var o=l(),a=o.length;if(e<0||e>=a||t<0||e+t>a)return ERROR(s||(s=babelHelpers.taggedTemplateLiteralLoose(["voip: call_sendto: Invalid buffer access - buf: ",", len: ",", heapSize: ",""])),e,t,a),-1;var i=o.subarray(e,e+t);return self.WhatsAppVoipWasmWorkerCompatibleCallbacks.sendDataToRelay({data:i,len:t,ip:Qt(n),port:r})}function rt(e,t,n,r){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.initCaptureDriverJS({sample_rate:e,channels:t,bits_per_sample:n,frames_per_chunk:r})}function ot(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.startCaptureJS()}function at(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.stopCaptureJS()}function it(e,t,n,r){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.initPlaybackDriverJS({sample_rate:e,channels:t,bits_per_sample:n,frames_per_chunk:r})}function lt(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.startPlaybackJS()}function st(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.stopPlaybackJS()}function ut(){return self.WhatsAppVoipWasmWorkerCompatibleCallbacks.getBrowserAudioProcessingStatus()}function ct(e,t,n){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.startDesktopCaptureJS({width:e,height:t,max_fps:n})}function dt(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.stopDesktopCaptureJS()}function mt(e,t,n,r,o){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.startVideoCaptureJS({camera_id:Qt(e),width:t,height:n,max_fps:r,isAVUpgrade:!!o})}function pt(){self.WhatsAppVoipWasmWorkerCompatibleCallbacks.stopVideoCaptureJS()}function _t(e,t){var n=t?Qt(t).trim():"";self.WhatsAppVoipWasmWorkerCompatibleCallbacks.loggingCallback({level:e,message:n})}function ft(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}var gt=function(t){t.terminate(),t.removeAllMessageListeners("cmd"),t.addMessageListener("cmd",function(e){var n=e.cmd;A('received "'+n+'" command from terminated worker: '+t.workerID)})};function ht(e){H(!T,"Internal Error! killThread() can only ever be called from main application thread!"),H(e,"Internal Error! Null pthread_ptr in killThread!");var t=nn.pthreads[e];delete nn.pthreads[e],gt(t),Gi(e),nn.runningWorkers.splice(nn.runningWorkers.indexOf(t),1),t.pthread_ptr=0}function yt(e){H(!T,"Internal Error! cancelThread() can only ever be called from main application thread!"),H(e,"Internal Error! Null pthread_ptr in cancelThread!");var t=nn.pthreads[e];t.postMessage({cmd:"cancel",type:"cmd"})}function Ct(e){H(!T,"Internal Error! cleanupThread() can only ever be called from main application thread!"),H(e,"Internal Error! Null pthread_ptr in cleanupThread!");var t=nn.pthreads[e];H(t),nn.returnWorkerToPool(t)}var bt=function(t,n){return l().fill(0,t,t+n),t};function vt(e){H(!T,"Internal Error! spawnThread() can only ever be called from main application thread!"),H(e.pthread_ptr,"Internal error, no pthread ptr!");var t=nn.getNewWorker();if(!t)return 6;H(!t.pthread_ptr,"Internal error!"),nn.runningWorkers.push(t),nn.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var n={cmd:"run",start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};return t.postMessage(babelHelpers.extends({},n,{type:"cmd"}),e.transferList),0}var St={isAbs:function(t){return t.charAt(0)==="/"},splitPath:function(t){var e=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return e.exec(t).slice(1)},normalizeArray:function(t,n){for(var e=0,r=t.length-1;r>=0;r--){var o=t[r];o==="."?t.splice(r,1):o===".."?(t.splice(r,1),e++):e&&(t.splice(r,1),e--)}if(n)for(;e;e--)t.unshift("..");return t},normalize:function(t){var e=St.isAbs(t),n=t.substr(-1)==="/";return t=St.normalizeArray(t.split("/").filter(function(e){return!!e}),!e).join("/"),!t&&!e&&(t="."),t&&n&&(t+="/"),(e?"/":"")+t},dirname:function(t){var e=St.splitPath(t),n=e[0],r=e[1];return!n&&!r?".":(r&&(r=r.substr(0,r.length-1)),n+r)},basename:function(t){if(t==="/")return"/";t=St.normalize(t),t=t.replace(/\/$/,"");var e=t.lastIndexOf("/");return e===-1?t:t.substr(e+1)},join:function(){var e=Array.prototype.slice.call(arguments);return St.normalize(e.join("/"))},join2:function(t,n){return St.normalize(t+"/"+n)}},Rt=function(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return function(e){return e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),e};Ee("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: (array) => { for (var i = 0; i < array.length; i++) array[i] = (Math.random()*256)|0 } };")},Lt=function(t){return(Lt=Rt())(t)},Et={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:Kt.cwd();if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t=St.isAbs(r)}return e=St.normalizeArray(e.split("/").filter(function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."},relative:function(t,n){t=Et.resolve(t).substr(1),n=Et.resolve(n).substr(1);function e(e){for(var t=0;t<e.length&&e[t]==="";t++);for(var n=e.length-1;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}for(var r=e(t.split("/")),o=e(n.split("/")),a=Math.min(r.length,o.length),i=a,l=0;l<a;l++)if(r[l]!==o[l]){i=l;break}for(var s=[],l=i;l<r.length;l++)s.push("..");return s=s.concat(o.slice(i)),s.join("/")}},kt=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0,It=function(t,n,r){for(var e=n+r,o=n;t[o]&&!(o>=e);)++o;if(o-n>16&&t.buffer&&kt)return kt.decode(t.slice(n,o));for(var a="";n<o;){var i=t[n++];if(!(i&128)){a+=String.fromCharCode(i);continue}var l=t[n++]&63;if((i&224)==192){a+=String.fromCharCode((i&31)<<6|l);continue}var s=t[n++]&63;if((i&240)==224?i=(i&15)<<12|l<<6|s:((i&248)!=240&&pn("Invalid UTF-8 leading byte "+en(i)+" encountered when deserializing a UTF-8 string in wasm memory to a JS string!"),i=(i&7)<<18|l<<12|s<<6|t[n++]&63),i<65536)a+=String.fromCharCode(i);else{var u=i-65536;a+=String.fromCharCode(55296|u>>10,56320|u&1023)}}return a},Tt=[],Dt=function(t){for(var e=0,n=0;n<t.length;++n){var r=t.charCodeAt(n);r<=127?e++:r<=2047?e+=2:r>=55296&&r<=57343?(e+=4,++n):e+=3}return e},xt=function(t,n,r,o){if(H(typeof t=="string"),!(o>0))return 0;for(var e=r,a=r+o-1,i=0;i<t.length;++i){var l=t.charCodeAt(i);if(l>=55296&&l<=57343){var s=t.charCodeAt(++i);l=65536+((l&1023)<<10)|s&1023}if(l<=127){if(r>=a)break;n[r++]=l}else if(l<=2047){if(r+1>=a)break;n[r++]=192|l>>6,n[r++]=128|l&63}else if(l<=65535){if(r+2>=a)break;n[r++]=224|l>>12,n[r++]=128|l>>6&63,n[r++]=128|l&63}else{if(r+3>=a)break;l>1114111&&pn("Invalid Unicode code point "+en(l)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."),n[r++]=240|l>>18,n[r++]=128|l>>12&63,n[r++]=128|l>>6&63,n[r++]=128|l&63}}return n[r]=0,r-e};function $t(e,t,n){var r=n>0?n:Dt(e)+1,o=new Array(r),a=xt(e,o,0,o.length);return t&&(o.length=a),o}var Pt=function(){if(!Tt.length){var e=null;if(typeof window!="undefined"&&typeof window.prompt=="function"?(e=window.prompt("Input: "),e!==null&&(e+="\n")):typeof readline=="function"&&(e=readline(),e!==null&&(e+="\n")),!e)return null;Tt=$t(e,!0)}return Tt.shift()},Nt={ttys:[],init:function(){},shutdown:function(){},register:function(t,n){Nt.ttys[t]={input:[],output:[],ops:n},Kt.registerDevice(t,Nt.stream_ops)},stream_ops:{open:function(t){var e=Nt.ttys[t.node.rdev];if(!e)throw new Kt.ErrnoError(43);t.tty=e,t.seekable=!1},close:function(t){t.tty.ops.fsync(t.tty)},fsync:function(t){t.tty.ops.fsync(t.tty)},read:function(t,n,r,o,a){if(!t.tty||!t.tty.ops.get_char)throw new Kt.ErrnoError(60);for(var e=0,i=0;i<o;i++){var l;try{l=t.tty.ops.get_char(t.tty)}catch(e){throw new Kt.ErrnoError(29)}if(l===void 0&&e===0)throw new Kt.ErrnoError(6);if(l==null)break;e++,n[r+i]=l}return e&&(t.node.timestamp=Date.now()),e},write:function(t,n,r,o,a){if(!t.tty||!t.tty.ops.put_char)throw new Kt.ErrnoError(60);try{for(var e=0;e<o;e++)t.tty.ops.put_char(t.tty,n[r+e])}catch(e){throw new Kt.ErrnoError(29)}return o&&(t.node.timestamp=Date.now()),e}},default_tty_ops:{get_char:function(t){return Pt()},put_char:function(t,n){n===null||n===10?(w(It(t.output,0)),t.output=[]):n!=0&&t.output.push(n)},fsync:function(t){t.output&&t.output.length>0&&(w(It(t.output,0)),t.output=[])},ioctl_tcgets:function(t){return{c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},ioctl_tcsets:function(t,n,r){return 0},ioctl_tiocgwinsz:function(t){return[24,80]}},default_tty1_ops:{put_char:function(t,n){n===null||n===10?(A(It(t.output,0)),t.output=[]):n!=0&&t.output.push(n)},fsync:function(t){t.output&&t.output.length>0&&(A(It(t.output,0)),t.output=[])}}},Mt=function(t,n){return H(n,"alignment argument is required"),Math.ceil(t/n)*n},wt=function(t){t=Mt(t,65536);var e=Mi(65536,t);return e?bt(e,t):0},At={ops_table:null,mount:function(t){return At.createNode(null,"/",16895,0)},createNode:function(t,n,r,o){if(Kt.isBlkdev(r)||Kt.isFIFO(r))throw new Kt.ErrnoError(63);At.ops_table||(At.ops_table={dir:{node:{getattr:At.node_ops.getattr,setattr:At.node_ops.setattr,lookup:At.node_ops.lookup,mknod:At.node_ops.mknod,rename:At.node_ops.rename,unlink:At.node_ops.unlink,rmdir:At.node_ops.rmdir,readdir:At.node_ops.readdir,symlink:At.node_ops.symlink},stream:{llseek:At.stream_ops.llseek}},file:{node:{getattr:At.node_ops.getattr,setattr:At.node_ops.setattr},stream:{llseek:At.stream_ops.llseek,read:At.stream_ops.read,write:At.stream_ops.write,allocate:At.stream_ops.allocate,mmap:At.stream_ops.mmap,msync:At.stream_ops.msync}},link:{node:{getattr:At.node_ops.getattr,setattr:At.node_ops.setattr,readlink:At.node_ops.readlink},stream:{}},chrdev:{node:{getattr:At.node_ops.getattr,setattr:At.node_ops.setattr},stream:Kt.chrdev_stream_ops}});var e=Kt.createNode(t,n,r,o);return Kt.isDir(e.mode)?(e.node_ops=At.ops_table.dir.node,e.stream_ops=At.ops_table.dir.stream,e.contents={}):Kt.isFile(e.mode)?(e.node_ops=At.ops_table.file.node,e.stream_ops=At.ops_table.file.stream,e.usedBytes=0,e.contents=null):Kt.isLink(e.mode)?(e.node_ops=At.ops_table.link.node,e.stream_ops=At.ops_table.link.stream):Kt.isChrdev(e.mode)&&(e.node_ops=At.ops_table.chrdev.node,e.stream_ops=At.ops_table.chrdev.stream),e.timestamp=Date.now(),t&&(t.contents[n]=e,t.timestamp=e.timestamp),e},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,n){var e=t.contents?t.contents.length:0;if(!(e>=n)){var r=1024*1024;n=Math.max(n,e*(e<r?2:1.125)>>>0),e!=0&&(n=Math.max(n,256));var o=t.contents;t.contents=new Uint8Array(n),t.usedBytes>0&&t.contents.set(o.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,n){if(t.usedBytes!=n)if(n==0)t.contents=null,t.usedBytes=0;else{var e=t.contents;t.contents=new Uint8Array(n),e&&t.contents.set(e.subarray(0,Math.min(n,t.usedBytes))),t.usedBytes=n}},node_ops:{getattr:function(t){var e={};return e.dev=Kt.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,Kt.isDir(t.mode)?e.size=4096:Kt.isFile(t.mode)?e.size=t.usedBytes:Kt.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,n){n.mode!==void 0&&(t.mode=n.mode),n.timestamp!==void 0&&(t.timestamp=n.timestamp),n.size!==void 0&&At.resizeFileStorage(t,n.size)},lookup:function(t,n){throw Kt.genericErrors[44]},mknod:function(t,n,r,o){return At.createNode(t,n,r,o)},rename:function(t,n,r){if(Kt.isDir(t.mode)){var e;try{e=Kt.lookupNode(n,r)}catch(e){}if(e)for(var o in e.contents)throw new Kt.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=r,n.contents[r]=t,n.timestamp=t.parent.timestamp,t.parent=n},unlink:function(t,n){delete t.contents[n],t.timestamp=Date.now()},rmdir:function(t,n){var e=Kt.lookupNode(t,n);for(var r in e.contents)throw new Kt.ErrnoError(55);delete t.contents[n],t.timestamp=Date.now()},readdir:function(t){var e=[".",".."];for(var n in t.contents)Object.prototype.hasOwnProperty.call(t.contents,n)&&e.push(n);return e},symlink:function(t,n,r){var e=At.createNode(t,n,41471,0);return e.link=r,e},readlink:function(t){if(!Kt.isLink(t.mode))throw new Kt.ErrnoError(28);return t.link}},stream_ops:{read:function(t,n,r,o,a){var e=t.node.contents;if(a>=t.node.usedBytes)return 0;var i=Math.min(t.node.usedBytes-a,o);if(H(i>=0),i>8&&e.subarray)n.set(e.subarray(a,a+i),r);else for(var l=0;l<i;l++)n[r+l]=e[a+l];return i},write:function(t,n,r,o,a,l){if(H(!(n instanceof ArrayBuffer)),n.buffer===i().buffer&&(l=!1),!o)return 0;var e=t.node;if(e.timestamp=Date.now(),n.subarray&&(!e.contents||e.contents.subarray)){if(l)return H(a===0,"canOwn must imply no weird position inside the file"),e.contents=n.subarray(r,r+o),e.usedBytes=o,o;if(e.usedBytes===0&&a===0)return e.contents=n.slice(r,r+o),e.usedBytes=o,o;if(a+o<=e.usedBytes)return e.contents.set(n.subarray(r,r+o),a),o}if(At.expandFileStorage(e,a+o),e.contents.subarray&&n.subarray)e.contents.set(n.subarray(r,r+o),a);else for(var s=0;s<o;s++)e.contents[a+s]=n[r+s];return e.usedBytes=Math.max(e.usedBytes,a+o),o},llseek:function(t,n,r){var e=n;if(r===1?e+=t.position:r===2&&Kt.isFile(t.node.mode)&&(e+=t.node.usedBytes),e<0)throw new Kt.ErrnoError(28);return e},allocate:function(t,n,r){At.expandFileStorage(t.node,n+r),t.node.usedBytes=Math.max(t.node.usedBytes,n+r)},mmap:function(t,n,r,o,a){if(!Kt.isFile(t.node.mode))throw new Kt.ErrnoError(43);var e,l,s=t.node.contents;if(!(a&2)&&s.buffer===i().buffer)l=!1,e=s.byteOffset;else{if((r>0||r+n<s.length)&&(s.subarray?s=s.subarray(r,r+n):s=Array.prototype.slice.call(s,r,r+n)),l=!0,e=wt(n),!e)throw new Kt.ErrnoError(48);i().set(s,e)}return{ptr:e,allocated:l}},msync:function(t,n,r,o,a){return At.stream_ops.write(t,n,0,o,r,!1),0}}},Ft=function(t,n,r,o){var e=o?"":Se("al "+t);P(t,function(r){H(r,'Loading data file "'+t+'" failed (no arrayBuffer).'),n(new Uint8Array(r)),e&&Le(e)},function(e){if(r)r();else throw'Loading data file "'+t+'" failed.'}),e&&Re(e)},Ot=h.preloadPlugins||[];function Bt(e,t,n,r){typeof Ra!="undefined"&&Ra.init();var o=!1;return Ot.forEach(function(a){o||a.canHandle(t)&&(a.handle(e,t,n,r),o=!0)}),o}function Wt(e,t,n,r,o,a,i,l,s,u){var c=t?Et.resolve(St.join2(e,t)):e,d=Se("cp "+c);function m(n){function m(n){u&&u(),l||Kt.createDataFile(e,t,n,r,o,s),a&&a(),Le(d)}Bt(n,c,m,function(){i&&i(),Le(d)})||m(n)}Re(d),typeof n=="string"?Ft(n,function(e){return m(e)},i):m(n)}function qt(e){var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},n=t[e];if(typeof n=="undefined")throw new Error("Unknown file open mode: "+e);return n}function Ut(e,t){var n=0;return e&&(n|=365),t&&(n|=146),n}var Vt={dbs:{},indexedDB:(function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t})(function(){if(typeof indexedDB!="undefined")return indexedDB;var e=null;return typeof window=="object"&&(e=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB),H(e,"IDBFS used, but indexedDB not supported"),e}),DB_VERSION:21,DB_STORE_NAME:"FILE_DATA",mount:function(t){return At.mount.apply(null,arguments)},syncfs:function(t,n,r){Vt.getLocalSet(t,function(e,o){if(e)return r(e);Vt.getRemoteSet(t,function(e,t){if(e)return r(e);var a=n?t:o,i=n?o:t;Vt.reconcile(a,i,r)})})},quit:function(){Object.values(Vt.dbs).forEach(function(e){return e.close()}),Vt.dbs={}},getDB:function(t,n){var e=Vt.dbs[t];if(e)return n(null,e);var r;try{r=Vt.indexedDB().open(t,Vt.DB_VERSION)}catch(e){return n(e)}if(!r)return n("Unable to connect to IndexedDB");r.onupgradeneeded=function(e){var t=e.target.result,n=e.target.transaction,r;t.objectStoreNames.contains(Vt.DB_STORE_NAME)?r=n.objectStore(Vt.DB_STORE_NAME):r=t.createObjectStore(Vt.DB_STORE_NAME),r.indexNames.contains("timestamp")||r.createIndex("timestamp","timestamp",{unique:!1})},r.onsuccess=function(){e=r.result,Vt.dbs[t]=e,n(null,e)},r.onerror=function(e){n(e.target.error),e.preventDefault()}},getLocalSet:function(t,n){var e={};function r(e){return e!=="."&&e!==".."}function o(e){return function(t){return St.join2(e,t)}}for(var a=Kt.readdir(t.mountpoint).filter(r).map(o(t.mountpoint));a.length;){var i=a.pop(),l;try{l=Kt.stat(i)}catch(e){return n(e)}Kt.isDir(l.mode)&&a.push.apply(a,Kt.readdir(i).filter(r).map(o(i))),e[i]={timestamp:l.mtime}}return n(null,{type:"local",entries:e})},getRemoteSet:function(t,n){var e={};Vt.getDB(t.mountpoint,function(t,r){if(t)return n(t);try{var o=r.transaction([Vt.DB_STORE_NAME],"readonly");o.onerror=function(e){n(e.target.error),e.preventDefault()};var a=o.objectStore(Vt.DB_STORE_NAME),i=a.index("timestamp");i.openKeyCursor().onsuccess=function(t){var o=t.target.result;if(!o)return n(null,{type:"remote",db:r,entries:e});e[o.primaryKey]={timestamp:o.key},o.continue()}}catch(e){return n(e)}})},loadLocalEntry:function(t,n){var e,r;try{var o=Kt.lookupPath(t);r=o.node,e=Kt.stat(t)}catch(e){return n(e)}return Kt.isDir(e.mode)?n(null,{timestamp:e.mtime,mode:e.mode}):Kt.isFile(e.mode)?(r.contents=At.getFileDataAsTypedArray(r),n(null,{timestamp:e.mtime,mode:e.mode,contents:r.contents})):n(new Error("node type not supported"))},storeLocalEntry:function(t,n,r){try{if(Kt.isDir(n.mode))Kt.mkdirTree(t,n.mode);else if(Kt.isFile(n.mode))Kt.writeFile(t,n.contents,{canOwn:!0});else return r(new Error("node type not supported"));Kt.chmod(t,n.mode),Kt.utime(t,n.timestamp,n.timestamp)}catch(e){return r(e)}r(null)},removeLocalEntry:function(t,n){try{var e=Kt.stat(t);Kt.isDir(e.mode)?Kt.rmdir(t):Kt.isFile(e.mode)&&Kt.unlink(t)}catch(e){return n(e)}n(null)},loadRemoteEntry:function(t,n,r){var e=t.get(n);e.onsuccess=function(e){r(null,e.target.result)},e.onerror=function(e){r(e.target.error),e.preventDefault()}},storeRemoteEntry:function(t,n,r,o){try{var e=t.put(r,n)}catch(e){o(e);return}e.onsuccess=function(){o(null)},e.onerror=function(e){o(e.target.error),e.preventDefault()}},removeRemoteEntry:function(t,n,r){var e=t.delete(n);e.onsuccess=function(){r(null)},e.onerror=function(e){r(e.target.error),e.preventDefault()}},reconcile:function(t,n,r){var e=0,o=[];Object.keys(t.entries).forEach(function(r){var a=t.entries[r],i=n.entries[r];(!i||a.timestamp.getTime()!=i.timestamp.getTime())&&(o.push(r),e++)});var i=[];if(Object.keys(n.entries).forEach(function(n){t.entries[n]||(i.push(n),e++)}),!e)return r(null);var l=!1,s=t.type==="remote"?t.db:n.db,u=s.transaction([Vt.DB_STORE_NAME],"readwrite"),c=u.objectStore(Vt.DB_STORE_NAME);function d(e){if(e&&!l)return l=!0,r(e)}u.onerror=function(e){d(a.error),e.preventDefault()},u.oncomplete=function(e){l||r(null)},o.sort().forEach(function(e){n.type==="local"?Vt.loadRemoteEntry(c,e,function(t,n){if(t)return d(t);Vt.storeLocalEntry(e,n,d)}):Vt.loadLocalEntry(e,function(t,n){if(t)return d(t);Vt.storeRemoteEntry(c,e,n,d)})}),i.sort().reverse().forEach(function(e){n.type==="local"?Vt.removeLocalEntry(e,d):Vt.removeRemoteEntry(c,e,d)})}},Ht={0:"Success",1:"Arg list too long",2:"Permission denied",3:"Address already in use",4:"Address not available",5:"Address family not supported by protocol family",6:"No more processes",7:"Socket already connected",8:"Bad file number",9:"Trying to read unreadable message",10:"Mount device busy",11:"Operation canceled",12:"No children",13:"Connection aborted",14:"Connection refused",15:"Connection reset by peer",16:"File locking deadlock error",17:"Destination address required",18:"Math arg out of domain of func",19:"Quota exceeded",20:"File exists",21:"Bad address",22:"File too large",23:"Host is unreachable",24:"Identifier removed",25:"Illegal byte sequence",26:"Connection already in progress",27:"Interrupted system call",28:"Invalid argument",29:"I/O error",30:"Socket is already connected",31:"Is a directory",32:"Too many symbolic links",33:"Too many open files",34:"Too many links",35:"Message too long",36:"Multihop attempted",37:"File or path name too long",38:"Network interface is not configured",39:"Connection reset by network",40:"Network is unreachable",41:"Too many open files in system",42:"No buffer space available",43:"No such device",44:"No such file or directory",45:"Exec format error",46:"No record locks available",47:"The link has been severed",48:"Not enough core",49:"No message of desired type",50:"Protocol not available",51:"No space left on device",52:"Function not implemented",53:"Socket is not connected",54:"Not a directory",55:"Directory not empty",56:"State not recoverable",57:"Socket operation on non-socket",59:"Not a typewriter",60:"No such device or address",61:"Value too large for defined data type",62:"Previous owner died",63:"Not super-user",64:"Broken pipe",65:"Protocol error",66:"Unknown protocol",67:"Protocol wrong type for socket",68:"Math result not representable",69:"Read only file system",70:"Illegal seek",71:"No such process",72:"Stale file handle",73:"Connection timed out",74:"Text file busy",75:"Cross-device link",100:"Device not a stream",101:"Bad font file fmt",102:"Invalid slot",103:"Invalid request code",104:"No anode",105:"Block device required",106:"Channel number out of range",107:"Level 3 halted",108:"Level 3 reset",109:"Link number out of range",110:"Protocol driver not attached",111:"No CSI structure available",112:"Level 2 halted",113:"Invalid exchange",114:"Invalid request descriptor",115:"Exchange full",116:"No data (for no delay io)",117:"Timer expired",118:"Out of streams resources",119:"Machine is not on the network",120:"Package not installed",121:"The object is remote",122:"Advertise error",123:"Srmount error",124:"Communication error on send",125:"Cross mount point (not really error)",126:"Given log. name not unique",127:"f.d. invalid for this operation",128:"Remote address changed",129:"Can access a needed shared lib",130:"Accessing a corrupted shared lib",131:".lib section in a.out corrupted",132:"Attempting to link in too many libs",133:"Attempting to exec a shared library",135:"Streams pipe error",136:"Too many users",137:"Socket type not supported",138:"Not supported",139:"Protocol family not supported",140:"Can't send after socket shutdown",141:"Too many references",142:"Host is down",148:"No medium (in tape drive)",156:"Level 2 not synchronized"},Gt={};function zt(e){return pn("warning: build with -sDEMANGLE_SUPPORT to link in libcxxabi demangling"),e}function jt(e){var t=/\b_Z[\w\d_]+/g;return e.replace(t,function(e){var t=zt(e);return e===t?e:t+" ["+e+"]"})}var Kt={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function(t,n){if(n===void 0&&(n={}),t=Et.resolve(t),!t)return{path:"",node:null};var e={follow_mount:!0,recurse_count:0};if(n=Object.assign(e,n),n.recurse_count>8)throw new Kt.ErrnoError(32);for(var r=t.split("/").filter(function(e){return!!e}),o=Kt.root,a="/",i=0;i<r.length;i++){var l=i===r.length-1;if(l&&n.parent)break;if(o=Kt.lookupNode(o,r[i]),a=St.join2(a,r[i]),Kt.isMountpoint(o)&&(!l||l&&n.follow_mount)&&(o=o.mounted.root),!l||n.follow)for(var s=0;Kt.isLink(o.mode);){var u=Kt.readlink(a);a=Et.resolve(St.dirname(a),u);var c=Kt.lookupPath(a,{recurse_count:n.recurse_count+1});if(o=c.node,s++>40)throw new Kt.ErrnoError(32)}}return{path:a,node:o}},getPath:function(t){for(var e;;){if(Kt.isRoot(t)){var n=t.mount.mountpoint;return e?n[n.length-1]!=="/"?n+"/"+e:n+e:n}e=e?t.name+"/"+e:t.name,t=t.parent}},hashName:function(t,n){for(var e=0,r=0;r<n.length;r++)e=(e<<5)-e+n.charCodeAt(r)|0;return(t+e>>>0)%Kt.nameTable.length},hashAddNode:function(t){var e=Kt.hashName(t.parent.id,t.name);t.name_next=Kt.nameTable[e],Kt.nameTable[e]=t},hashRemoveNode:function(t){var e=Kt.hashName(t.parent.id,t.name);if(Kt.nameTable[e]===t)Kt.nameTable[e]=t.name_next;else for(var n=Kt.nameTable[e];n;){if(n.name_next===t){n.name_next=t.name_next;break}n=n.name_next}},lookupNode:function(t,n){var e=Kt.mayLookup(t);if(e)throw new Kt.ErrnoError(e,t);for(var r=Kt.hashName(t.id,n),o=Kt.nameTable[r];o;o=o.name_next){var a=o.name;if(o.parent.id===t.id&&a===n)return o}return Kt.lookup(t,n)},createNode:function(t,n,r,o){H(typeof t=="object");var e=new Kt.FSNode(t,n,r,o);return Kt.hashAddNode(e),e},destroyNode:function(t){Kt.hashRemoveNode(t)},isRoot:function(t){return t===t.parent},isMountpoint:function(t){return!!t.mounted},isFile:function(t){return(t&61440)===32768},isDir:function(t){return(t&61440)===16384},isLink:function(t){return(t&61440)===40960},isChrdev:function(t){return(t&61440)===8192},isBlkdev:function(t){return(t&61440)===24576},isFIFO:function(t){return(t&61440)===4096},isSocket:function(t){return(t&49152)===49152},flagsToPermissionString:function(t){var e=["r","w","rw"][t&3];return t&512&&(e+="w"),e},nodePermissions:function(t,n){return Kt.ignorePermissions?0:n.includes("r")&&!(t.mode&292)||n.includes("w")&&!(t.mode&146)||n.includes("x")&&!(t.mode&73)?2:0},mayLookup:function(t){var e=Kt.nodePermissions(t,"x");return e||(t.node_ops.lookup?0:2)},mayCreate:function(t,n){try{var e=Kt.lookupNode(t,n);return 20}catch(e){}return Kt.nodePermissions(t,"wx")},mayDelete:function(t,n,r){var e;try{e=Kt.lookupNode(t,n)}catch(e){return e.errno}var o=Kt.nodePermissions(t,"wx");if(o)return o;if(r){if(!Kt.isDir(e.mode))return 54;if(Kt.isRoot(e)||Kt.getPath(e)===Kt.cwd())return 10}else if(Kt.isDir(e.mode))return 31;return 0},mayOpen:function(t,n){return t?Kt.isLink(t.mode)?32:Kt.isDir(t.mode)&&(Kt.flagsToPermissionString(n)!=="r"||n&512)?31:Kt.nodePermissions(t,Kt.flagsToPermissionString(n)):44},MAX_OPEN_FDS:4096,nextfd:function(){for(var e=0;e<=Kt.MAX_OPEN_FDS;e++)if(!Kt.streams[e])return e;throw new Kt.ErrnoError(33)},getStreamChecked:function(t){var e=Kt.getStream(t);if(!e)throw new Kt.ErrnoError(8);return e},getStream:function(t){return Kt.streams[t]},createStream:function(t,n){return n===void 0&&(n=-1),Kt.FSStream||(Kt.FSStream=function(){this.shared={}},Kt.FSStream.prototype={},Object.defineProperties(Kt.FSStream.prototype,{object:{get:function(){return this.node},set:function(t){this.node=t}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(t){this.shared.flags=t}},position:{get:function(){return this.shared.position},set:function(t){this.shared.position=t}}})),t=Object.assign(new Kt.FSStream,t),n==-1&&(n=Kt.nextfd()),t.fd=n,Kt.streams[n]=t,t},closeStream:function(t){Kt.streams[t]=null},chrdev_stream_ops:{open:function(t){var e=Kt.getDevice(t.node.rdev);t.stream_ops=e.stream_ops,t.stream_ops.open&&t.stream_ops.open(t)},llseek:function(){throw new Kt.ErrnoError(70)}},major:function(t){return t>>8},minor:function(t){return t&255},makedev:function(t,n){return t<<8|n},registerDevice:function(t,n){Kt.devices[t]={stream_ops:n}},getDevice:function(t){return Kt.devices[t]},getMounts:function(t){for(var e=[],n=[t];n.length;){var r=n.pop();e.push(r),n.push.apply(n,r.mounts)}return e},syncfs:function(t,n){typeof t=="function"&&(n=t,t=!1),Kt.syncFSRequests++,Kt.syncFSRequests>1&&A("warning: "+Kt.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=Kt.getMounts(Kt.root.mount),r=0;function o(e){return H(Kt.syncFSRequests>0),Kt.syncFSRequests--,n(e)}function a(t){if(t)return a.errored?void 0:(a.errored=!0,o(t));++r>=e.length&&o(null)}e.forEach(function(e){if(!e.type.syncfs)return a(null);e.type.syncfs(e,t,a)})},mount:function(t,n,r){if(typeof t=="string")throw t;var e=r==="/",o=!r,a;if(e&&Kt.root)throw new Kt.ErrnoError(10);if(!e&&!o){var i=Kt.lookupPath(r,{follow_mount:!1});if(r=i.path,a=i.node,Kt.isMountpoint(a))throw new Kt.ErrnoError(10);if(!Kt.isDir(a.mode))throw new Kt.ErrnoError(54)}var l={type:t,opts:n,mountpoint:r,mounts:[]},s=t.mount(l);return s.mount=l,l.root=s,e?Kt.root=s:a&&(a.mounted=l,a.mount&&a.mount.mounts.push(l)),s},unmount:function(t){var e=Kt.lookupPath(t,{follow_mount:!1});if(!Kt.isMountpoint(e.node))throw new Kt.ErrnoError(28);var n=e.node,r=n.mounted,o=Kt.getMounts(r);Object.keys(Kt.nameTable).forEach(function(e){for(var t=Kt.nameTable[e];t;){var n=t.name_next;o.includes(t.mount)&&Kt.destroyNode(t),t=n}}),n.mounted=null;var a=n.mount.mounts.indexOf(r);H(a!==-1),n.mount.mounts.splice(a,1)},lookup:function(t,n){return t.node_ops.lookup(t,n)},mknod:function(t,n,r){var e=Kt.lookupPath(t,{parent:!0}),o=e.node,a=St.basename(t);if(!a||a==="."||a==="..")throw new Kt.ErrnoError(28);var i=Kt.mayCreate(o,a);if(i)throw new Kt.ErrnoError(i);if(!o.node_ops.mknod)throw new Kt.ErrnoError(63);return o.node_ops.mknod(o,a,n,r)},create:function(t,n){return n=n!==void 0?n:438,n&=4095,n|=32768,Kt.mknod(t,n,0)},mkdir:function(t,n){return n=n!==void 0?n:511,n&=1023,n|=16384,Kt.mknod(t,n,0)},mkdirTree:function(t,n){for(var e=t.split("/"),r="",o=0;o<e.length;++o)if(e[o]){r+="/"+e[o];try{Kt.mkdir(r,n)}catch(e){if(e.errno!=20)throw e}}},mkdev:function(t,n,r){return typeof r=="undefined"&&(r=n,n=438),n|=8192,Kt.mknod(t,n,r)},symlink:function(t,n){if(!Et.resolve(t))throw new Kt.ErrnoError(44);var e=Kt.lookupPath(n,{parent:!0}),r=e.node;if(!r)throw new Kt.ErrnoError(44);var o=St.basename(n),a=Kt.mayCreate(r,o);if(a)throw new Kt.ErrnoError(a);if(!r.node_ops.symlink)throw new Kt.ErrnoError(63);return r.node_ops.symlink(r,o,t)},rename:function(t,n){var e=St.dirname(t),r=St.dirname(n),o=St.basename(t),a=St.basename(n),i,l,s;if(i=Kt.lookupPath(t,{parent:!0}),l=i.node,i=Kt.lookupPath(n,{parent:!0}),s=i.node,!l||!s)throw new Kt.ErrnoError(44);if(l.mount!==s.mount)throw new Kt.ErrnoError(75);var u=Kt.lookupNode(l,o),c=Et.relative(t,r);if(c.charAt(0)!==".")throw new Kt.ErrnoError(28);if(c=Et.relative(n,e),c.charAt(0)!==".")throw new Kt.ErrnoError(55);var d;try{d=Kt.lookupNode(s,a)}catch(e){}if(u!==d){var m=Kt.isDir(u.mode),p=Kt.mayDelete(l,o,m);if(p)throw new Kt.ErrnoError(p);if(p=d?Kt.mayDelete(s,a,m):Kt.mayCreate(s,a),p)throw new Kt.ErrnoError(p);if(!l.node_ops.rename)throw new Kt.ErrnoError(63);if(Kt.isMountpoint(u)||d&&Kt.isMountpoint(d))throw new Kt.ErrnoError(10);if(s!==l&&(p=Kt.nodePermissions(l,"w"),p))throw new Kt.ErrnoError(p);Kt.hashRemoveNode(u);try{l.node_ops.rename(u,s,a)}catch(e){throw e}finally{Kt.hashAddNode(u)}}},rmdir:function(t){var e=Kt.lookupPath(t,{parent:!0}),n=e.node,r=St.basename(t),o=Kt.lookupNode(n,r),a=Kt.mayDelete(n,r,!0);if(a)throw new Kt.ErrnoError(a);if(!n.node_ops.rmdir)throw new Kt.ErrnoError(63);if(Kt.isMountpoint(o))throw new Kt.ErrnoError(10);n.node_ops.rmdir(n,r),Kt.destroyNode(o)},readdir:function(t){var e=Kt.lookupPath(t,{follow:!0}),n=e.node;if(!n.node_ops.readdir)throw new Kt.ErrnoError(54);return n.node_ops.readdir(n)},unlink:function(t){var e=Kt.lookupPath(t,{parent:!0}),n=e.node;if(!n)throw new Kt.ErrnoError(44);var r=St.basename(t),o=Kt.lookupNode(n,r),a=Kt.mayDelete(n,r,!1);if(a)throw new Kt.ErrnoError(a);if(!n.node_ops.unlink)throw new Kt.ErrnoError(63);if(Kt.isMountpoint(o))throw new Kt.ErrnoError(10);n.node_ops.unlink(n,r),Kt.destroyNode(o)},readlink:function(t){var e=Kt.lookupPath(t),n=e.node;if(!n)throw new Kt.ErrnoError(44);if(!n.node_ops.readlink)throw new Kt.ErrnoError(28);return Et.resolve(Kt.getPath(n.parent),n.node_ops.readlink(n))},stat:function(t,n){var e=Kt.lookupPath(t,{follow:!n}),r=e.node;if(!r)throw new Kt.ErrnoError(44);if(!r.node_ops.getattr)throw new Kt.ErrnoError(63);return r.node_ops.getattr(r)},lstat:function(t){return Kt.stat(t,!0)},chmod:function(t,n,r){var e;if(typeof t=="string"){var o=Kt.lookupPath(t,{follow:!r});e=o.node}else e=t;if(!e.node_ops.setattr)throw new Kt.ErrnoError(63);e.node_ops.setattr(e,{mode:n&4095|e.mode&-4096,timestamp:Date.now()})},lchmod:function(t,n){Kt.chmod(t,n,!0)},fchmod:function(t,n){var e=Kt.getStreamChecked(t);Kt.chmod(e.node,n)},chown:function(t,n,r,o){var e;if(typeof t=="string"){var a=Kt.lookupPath(t,{follow:!o});e=a.node}else e=t;if(!e.node_ops.setattr)throw new Kt.ErrnoError(63);e.node_ops.setattr(e,{timestamp:Date.now()})},lchown:function(t,n,r){Kt.chown(t,n,r,!0)},fchown:function(t,n,r){var e=Kt.getStreamChecked(t);Kt.chown(e.node,n,r)},truncate:function(t,n){if(n<0)throw new Kt.ErrnoError(28);var e;if(typeof t=="string"){var r=Kt.lookupPath(t,{follow:!0});e=r.node}else e=t;if(!e.node_ops.setattr)throw new Kt.ErrnoError(63);if(Kt.isDir(e.mode))throw new Kt.ErrnoError(31);if(!Kt.isFile(e.mode))throw new Kt.ErrnoError(28);var o=Kt.nodePermissions(e,"w");if(o)throw new Kt.ErrnoError(o);e.node_ops.setattr(e,{size:n,timestamp:Date.now()})},ftruncate:function(t,n){var e=Kt.getStreamChecked(t);if((e.flags&2097155)===0)throw new Kt.ErrnoError(28);Kt.truncate(e.node,n)},utime:function(t,n,r){var e=Kt.lookupPath(t,{follow:!0}),o=e.node;o.node_ops.setattr(o,{timestamp:Math.max(n,r)})},open:function(t,n,r){if(t==="")throw new Kt.ErrnoError(44);n=typeof n=="string"?qt(n):n,r=typeof r=="undefined"?438:r,n&64?r=r&4095|32768:r=0;var e;if(typeof t=="object")e=t;else{t=St.normalize(t);try{var o=Kt.lookupPath(t,{follow:!(n&131072)});e=o.node}catch(e){}}var a=!1;if(n&64)if(e){if(n&128)throw new Kt.ErrnoError(20)}else e=Kt.mknod(t,r,0),a=!0;if(!e)throw new Kt.ErrnoError(44);if(Kt.isChrdev(e.mode)&&(n&=-513),n&65536&&!Kt.isDir(e.mode))throw new Kt.ErrnoError(54);if(!a){var i=Kt.mayOpen(e,n);if(i)throw new Kt.ErrnoError(i)}n&512&&!a&&Kt.truncate(e,0),n&=-131713;var l=Kt.createStream({node:e,path:Kt.getPath(e),flags:n,seekable:!0,position:0,stream_ops:e.stream_ops,ungotten:[],error:!1});return l.stream_ops.open&&l.stream_ops.open(l),h.logReadFiles&&!(n&1)&&(Kt.readFiles||(Kt.readFiles={}),t in Kt.readFiles||(Kt.readFiles[t]=1)),l},close:function(t){if(Kt.isClosed(t))throw new Kt.ErrnoError(8);t.getdents&&(t.getdents=null);try{t.stream_ops.close&&t.stream_ops.close(t)}catch(e){throw e}finally{Kt.closeStream(t.fd)}t.fd=null},isClosed:function(t){return t.fd===null},llseek:function(t,n,r){if(Kt.isClosed(t))throw new Kt.ErrnoError(8);if(!t.seekable||!t.stream_ops.llseek)throw new Kt.ErrnoError(70);if(r!=0&&r!=1&&r!=2)throw new Kt.ErrnoError(28);return t.position=t.stream_ops.llseek(t,n,r),t.ungotten=[],t.position},read:function(t,n,r,o,a){if(H(r>=0),o<0||a<0)throw new Kt.ErrnoError(28);if(Kt.isClosed(t))throw new Kt.ErrnoError(8);if((t.flags&2097155)===1)throw new Kt.ErrnoError(8);if(Kt.isDir(t.node.mode))throw new Kt.ErrnoError(31);if(!t.stream_ops.read)throw new Kt.ErrnoError(28);var e=typeof a!="undefined";if(!e)a=t.position;else if(!t.seekable)throw new Kt.ErrnoError(70);var i=t.stream_ops.read(t,n,r,o,a);return e||(t.position+=i),i},write:function(t,n,r,o,a,i){if(H(r>=0),o<0||a<0)throw new Kt.ErrnoError(28);if(Kt.isClosed(t))throw new Kt.ErrnoError(8);if((t.flags&2097155)===0)throw new Kt.ErrnoError(8);if(Kt.isDir(t.node.mode))throw new Kt.ErrnoError(31);if(!t.stream_ops.write)throw new Kt.ErrnoError(28);t.seekable&&t.flags&1024&&Kt.llseek(t,0,2);var e=typeof a!="undefined";if(!e)a=t.position;else if(!t.seekable)throw new Kt.ErrnoError(70);var l=t.stream_ops.write(t,n,r,o,a,i);return e||(t.position+=l),l},allocate:function(t,n,r){if(Kt.isClosed(t))throw new Kt.ErrnoError(8);if(n<0||r<=0)throw new Kt.ErrnoError(28);if((t.flags&2097155)===0)throw new Kt.ErrnoError(8);if(!Kt.isFile(t.node.mode)&&!Kt.isDir(t.node.mode))throw new Kt.ErrnoError(43);if(!t.stream_ops.allocate)throw new Kt.ErrnoError(138);t.stream_ops.allocate(t,n,r)},mmap:function(t,n,r,o,a){if((o&2)!==0&&(a&2)===0&&(t.flags&2097155)!==2)throw new Kt.ErrnoError(2);if((t.flags&2097155)===1)throw new Kt.ErrnoError(2);if(!t.stream_ops.mmap)throw new Kt.ErrnoError(43);return t.stream_ops.mmap(t,n,r,o,a)},msync:function(t,n,r,o,a){return H(r>=0),t.stream_ops.msync?t.stream_ops.msync(t,n,r,o,a):0},munmap:function(t){return 0},ioctl:function(t,n,r){if(!t.stream_ops.ioctl)throw new Kt.ErrnoError(59);return t.stream_ops.ioctl(t,n,r)},readFile:function(t,n){if(n===void 0&&(n={}),n.flags=n.flags||0,n.encoding=n.encoding||"binary",n.encoding!=="utf8"&&n.encoding!=="binary")throw new Error('Invalid encoding type "'+n.encoding+'"');var e,r=Kt.open(t,n.flags),o=Kt.stat(t),a=o.size,i=new Uint8Array(a);return Kt.read(r,i,0,a,0),n.encoding==="utf8"?e=It(i,0):n.encoding==="binary"&&(e=i),Kt.close(r),e},writeFile:function(t,n,r){r===void 0&&(r={}),r.flags=r.flags||577;var e=Kt.open(t,r.flags,r.mode);if(typeof n=="string"){var o=new Uint8Array(Dt(n)+1),a=xt(n,o,0,o.length);Kt.write(e,o,0,a,void 0,r.canOwn)}else if(ArrayBuffer.isView(n))Kt.write(e,n,0,n.byteLength,void 0,r.canOwn);else throw new Error("Unsupported data type");Kt.close(e)},cwd:function(){return Kt.currentPath},chdir:function(t){var e=Kt.lookupPath(t,{follow:!0});if(e.node===null)throw new Kt.ErrnoError(44);if(!Kt.isDir(e.node.mode))throw new Kt.ErrnoError(54);var n=Kt.nodePermissions(e.node,"x");if(n)throw new Kt.ErrnoError(n);Kt.currentPath=e.path},createDefaultDirectories:function(){Kt.mkdir("/tmp"),Kt.mkdir("/home"),Kt.mkdir("/home/web_user")},createDefaultDevices:function(){Kt.mkdir("/dev"),Kt.registerDevice(Kt.makedev(1,3),{read:function(){return 0},write:function(t,n,r,o,a){return o}}),Kt.mkdev("/dev/null",Kt.makedev(1,3)),Nt.register(Kt.makedev(5,0),Nt.default_tty_ops),Nt.register(Kt.makedev(6,0),Nt.default_tty1_ops),Kt.mkdev("/dev/tty",Kt.makedev(5,0)),Kt.mkdev("/dev/tty1",Kt.makedev(6,0));var e=new Uint8Array(1024),t=0,n=function(){return t===0&&(t=Lt(e).byteLength),e[--t]};Kt.createDevice("/dev","random",n),Kt.createDevice("/dev","urandom",n),Kt.mkdir("/dev/shm"),Kt.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){Kt.mkdir("/proc");var e=Kt.mkdir("/proc/self");Kt.mkdir("/proc/self/fd"),Kt.mount({mount:function(){var t=Kt.createNode(e,"fd",16895,73);return t.node_ops={lookup:function(t,n){var e=+n,r=Kt.getStreamChecked(e),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return r.path}}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:function(){h.stdin?Kt.createDevice("/dev","stdin",h.stdin):Kt.symlink("/dev/tty","/dev/stdin"),h.stdout?Kt.createDevice("/dev","stdout",null,h.stdout):Kt.symlink("/dev/tty","/dev/stdout"),h.stderr?Kt.createDevice("/dev","stderr",null,h.stderr):Kt.symlink("/dev/tty1","/dev/stderr");var e=Kt.open("/dev/stdin",0),t=Kt.open("/dev/stdout",1),n=Kt.open("/dev/stderr",1);H(e.fd===0,"invalid handle for stdin ("+e.fd+")"),H(t.fd===1,"invalid handle for stdout ("+t.fd+")"),H(n.fd===2,"invalid handle for stderr ("+n.fd+")")},ensureErrnoError:function(){Kt.ErrnoError||(Kt.ErrnoError=function(t,n){this.name="ErrnoError",this.node=n,this.setErrno=function(e){this.errno=e;for(var t in Gt)if(Gt[t]===e){this.code=t;break}},this.setErrno(t),this.message=Ht[t],this.stack&&(Object.defineProperty(this,"stack",{value:new Error().stack,writable:!0}),this.stack=jt(this.stack))},Kt.ErrnoError.prototype=new Error,Kt.ErrnoError.prototype.constructor=Kt.ErrnoError,[44].forEach(function(e){Kt.genericErrors[e]=new Kt.ErrnoError(e),Kt.genericErrors[e].stack="<generic error, no stack>"}))},staticInit:function(){Kt.ensureErrnoError(),Kt.nameTable=new Array(4096),Kt.mount(At,{},"/"),Kt.createDefaultDirectories(),Kt.createDefaultDevices(),Kt.createSpecialDirectories(),Kt.filesystems={MEMFS:At,IDBFS:Vt}},init:function(t,n,r){H(!Kt.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)"),Kt.init.initialized=!0,Kt.ensureErrnoError(),h.stdin=t||h.stdin,h.stdout=n||h.stdout,h.stderr=r||h.stderr,Kt.createStandardStreams()},quit:function(){Kt.init.initialized=!1,Ii(0);for(var e=0;e<Kt.streams.length;e++){var t=Kt.streams[e];t&&Kt.close(t)}},findObject:function(t,n){var e=Kt.analyzePath(t,n);return e.exists?e.object:null},analyzePath:function(t,n){try{var e=Kt.lookupPath(t,{follow:!n});t=e.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 e=Kt.lookupPath(t,{parent:!0});r.parentExists=!0,r.parentPath=e.path,r.parentObject=e.node,r.name=St.basename(t),e=Kt.lookupPath(t,{follow:!n}),r.exists=!0,r.path=e.path,r.object=e.node,r.name=e.node.name,r.isRoot=e.path==="/"}catch(e){r.error=e.errno}return r},createPath:function(t,n,r,o){t=typeof t=="string"?t:Kt.getPath(t);for(var e=n.split("/").reverse();e.length;){var a=e.pop();if(a){var i=St.join2(t,a);try{Kt.mkdir(i)}catch(e){}t=i}}return i},createFile:function(t,n,r,o,a){var e=St.join2(typeof t=="string"?t:Kt.getPath(t),n),i=Ut(o,a);return Kt.create(e,i)},createDataFile:function(t,n,r,o,a,i){var e=n;t&&(t=typeof t=="string"?t:Kt.getPath(t),e=n?St.join2(t,n):t);var l=Ut(o,a),s=Kt.create(e,l);if(r){if(typeof r=="string"){for(var u=new Array(r.length),c=0,d=r.length;c<d;++c)u[c]=r.charCodeAt(c);r=u}Kt.chmod(s,l|146);var m=Kt.open(s,577);Kt.write(m,r,0,r.length,0,i),Kt.close(m),Kt.chmod(s,l)}return s},createDevice:function(t,n,r,o){var e=St.join2(typeof t=="string"?t:Kt.getPath(t),n),a=Ut(!!r,!!o);Kt.createDevice.major||(Kt.createDevice.major=64);var i=Kt.makedev(Kt.createDevice.major++,0);return Kt.registerDevice(i,{open:function(t){t.seekable=!1},close:function(t){o&&o.buffer&&o.buffer.length&&o(10)},read:function(t,n,o,a,i){for(var e=0,l=0;l<a;l++){var s;try{s=r()}catch(e){throw new Kt.ErrnoError(29)}if(s===void 0&&e===0)throw new Kt.ErrnoError(6);if(s==null)break;e++,n[o+l]=s}return e&&(t.node.timestamp=Date.now()),e},write:function(t,n,r,a,i){for(var e=0;e<a;e++)try{o(n[r+e])}catch(e){throw new Kt.ErrnoError(29)}return a&&(t.node.timestamp=Date.now()),e}}),Kt.mkdev(e,a,i)},forceLoadFile:function(t){if(t.isDevice||t.isFolder||t.link||t.contents)return!0;if(typeof XMLHttpRequest!="undefined")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($)try{t.contents=$t($(t.url),!0),t.usedBytes=t.contents.length}catch(e){throw new Kt.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:function(t,n,r,o,a){function e(){this.lengthKnown=!1,this.chunks=[]}if(e.prototype.get=function(t){if(!(t>this.length-1||t<0)){var e=t%this.chunkSize,n=t/this.chunkSize|0;return this.getter(n)[e]}},e.prototype.setDataGetter=function(t){this.getter=t},e.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||e.status===304))throw new Error("Couldn't load "+r+". Status: "+e.status);var t=Number(e.getResponseHeader("Content-length")),n,o=(n=e.getResponseHeader("Accept-Ranges"))&&n==="bytes",a=(n=e.getResponseHeader("Content-Encoding"))&&n==="gzip",i=1024*1024;o||(i=t);var l=function(n,o){if(n>o)throw new Error("invalid range ("+n+", "+o+") or no bytes requested!");if(o>t-1)throw new Error("only "+t+" bytes available! programmer error!");var e=new XMLHttpRequest;if(e.open("GET",r,!1),t!==i&&e.setRequestHeader("Range","bytes="+n+"-"+o),e.responseType="arraybuffer",e.overrideMimeType&&e.overrideMimeType("text/plain; charset=x-user-defined"),e.send(null),!(e.status>=200&&e.status<300||e.status===304))throw new Error("Couldn't load "+r+". Status: "+e.status);return e.response!==void 0?new Uint8Array(e.response||[]):$t(e.responseText||"",!0)},s=this;s.setDataGetter(function(e){var n=e*i,r=(e+1)*i-1;if(r=Math.min(r,t-1),typeof s.chunks[e]=="undefined"&&(s.chunks[e]=l(n,r)),typeof s.chunks[e]=="undefined")throw new Error("doXHR failed!");return s.chunks[e]}),(a||!t)&&(i=t=1,t=this.getter(0).length,i=t,w("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=t,this._chunkSize=i,this.lengthKnown=!0},typeof XMLHttpRequest!="undefined"){if(!E)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var l=new e;Object.defineProperties(l,{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:l}}else var s={isDevice:!1,url:r};var u=Kt.createFile(t,n,s,o,a);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={},d=Object.keys(u.stream_ops);d.forEach(function(e){var t=u.stream_ops[e];c[e]=function(){return Kt.forceLoadFile(u),t.apply(null,arguments)}});function m(e,t,n,r,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,r);if(H(i>=0),a.slice)for(var l=0;l<i;l++)t[n+l]=a[o+l];else for(var l=0;l<i;l++)t[n+l]=a.get(o+l);return i}return c.read=function(e,t,n,r,o){return Kt.forceLoadFile(u),m(e,t,n,r,o)},c.mmap=function(e,t,n,r,o){Kt.forceLoadFile(u);var a=wt(t);if(!a)throw new Kt.ErrnoError(48);return m(e,i(),a,t,n),{ptr:a,allocated:!0}},u.stream_ops=c,u},absolutePath:function(){Ee("FS.absolutePath has been removed; use PATH_FS.resolve instead")},createFolder:function(){Ee("FS.createFolder has been removed; use FS.mkdir instead")},createLink:function(){Ee("FS.createLink has been removed; use FS.symlink instead")},joinPath:function(){Ee("FS.joinPath has been removed; use PATH.join instead")},mmapAlloc:function(){Ee("FS.mmapAlloc has been replaced by the top level function mmapAlloc")},standardizePath:function(){Ee("FS.standardizePath has been removed; use PATH.normalize instead")}},Qt=function(t,n){return H(typeof t=="number"),t?It(l(),t,n):""},Xt={DEFAULT_POLLMASK:5,calculateAt:function(t,n,r){if(St.isAbs(n))return n;var e;if(t===-100)e=Kt.cwd();else{var o=Xt.getStreamFromFD(t);e=o.path}if(n.length==0){if(!r)throw new Kt.ErrnoError(44);return e}return St.join2(e,n)},doStat:function(t,n,r){try{var e=t(n)}catch(e){if(e&&e.node&&St.normalize(n)!==St.normalize(Kt.getPath(e.node)))return-54;throw e}p()[r>>2]=e.dev,p()[r+4>>2]=e.mode,_()[r+8>>2]=e.nlink,p()[r+12>>2]=e.uid,p()[r+16>>2]=e.gid,p()[r+20>>2]=e.rdev,J[r+24>>3]=BigInt(e.size),p()[r+32>>2]=4096,p()[r+36>>2]=e.blocks;var o=e.atime.getTime(),a=e.mtime.getTime(),i=e.ctime.getTime();return J[r+40>>3]=BigInt(Math.floor(o/1e3)),_()[r+48>>2]=o%1e3*1e3,J[r+56>>3]=BigInt(Math.floor(a/1e3)),_()[r+64>>2]=a%1e3*1e3,J[r+72>>3]=BigInt(Math.floor(i/1e3)),_()[r+80>>2]=i%1e3*1e3,J[r+88>>3]=BigInt(e.ino),0},doMsync:function(t,n,r,o,a){if(!Kt.isFile(n.node.mode))throw new Kt.ErrnoError(43);if(o&2)return 0;var e=l().slice(t,t+r);Kt.msync(n,e,a,r,o)},varargs:void 0,get:function(){H(Xt.varargs!=null),Xt.varargs+=4;var e=p()[Xt.varargs-4>>2];return e},getStr:function(t){var e=Qt(t);return e},getStreamFromFD:function(t){var e=Kt.getStreamChecked(t);return e}};function Yt(e){if(T)return Pa(1,1,e);V=e,de()||(nn.terminateAllThreads(),h.onExit&&h.onExit(e),U=!0),R(e,new ft(e))}var Jt=function(t,n){if(V=t,Mu(),T)throw H(!n),an(t),"unwind";if(de()&&!n){var e="program exited (with status: "+t+"), but keepRuntimeAlive() is set (counter="+ce+") due to an async operation, so halting execution but not exiting the runtime or preventing further async execution (you can use emscripten_force_exit, if you want to force a true shutdown)";C(e),A(e)}Yt(t)},Zt=Jt,en=function(t){return H(typeof t=="number"),t>>>=0,"0x"+t.toString(16).padStart(8,"0")},tn=function(t){if(t instanceof ft||t=="unwind")return V;ae(),t instanceof WebAssembly.RuntimeError&&nl()<=0&&A("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 1048576)"),R(1,t)},nn={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},nextWorkerID:1,debugInit:function(){function e(){var e=0;return ue&&typeof Pi!="undefined"&&(e=Pi()),"w:"+(h.workerID||0)+",t:"+en(e)+": "}var t=Ge;Ge=function(r){return t(e()+r)}},init:function(){nn.debugInit(),T?nn.initWorker():nn.initMainThread()},initMainThread:function(){for(var e=typeof h.pthreadPoolSizeOverride=="number"?h.pthreadPoolSizeOverride:20;e--;)nn.allocateUnusedWorker();fe(function(){Re("loading-workers");var e=15e3,t=!1,n=function(o){if(!t){t=!0,clearTimeout(r);var n=0;try{if(o){var a=[],i=[];for(var l of nn.unusedWorkers)l.loaded?a.push(l):i.push(l);for(var l of i)try{gt(l)}catch(e){A("voip: ThreadPoolManager: failed to terminate timed-out pthread worker "+l.workerID+": "+e)}n=i.length,nn.unusedWorkers=a,A("voip: ThreadPoolManager: pthread worker prewarm timed out after "+e+"ms; continuing with "+a.length+" ready workers")}}finally{Le("loading-workers")}}},r=setTimeout(function(){return n(!0)},e);nn.loadWasmModuleToAllWorkers(function(){return n(!1)})})},initWorker:function(){O=!1},setExitStatus:function(t){V=t},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:function(){H(!T,"Internal Error! terminateAllThreads() can only ever be called from main application thread!");for(var e of nn.runningWorkers)gt(e);for(var e of nn.unusedWorkers)gt(e);nn.unusedWorkers=[],nn.runningWorkers=[],nn.pthreads=[]},returnWorkerToPool:function(t){var e=t.pthread_ptr;delete nn.pthreads[e],nn.unusedWorkers.push(t),nn.runningWorkers.splice(nn.runningWorkers.indexOf(t),1),t.pthread_ptr=0,Gi(e)},receiveObjectTransfer:function(t){},threadInitTLS:function(){nn.tlsInitFunctions.forEach(function(e){return e()})},loadWasmModuleToWorker:function(o){return new(u||(u=n("Promise")))(function(n){o.addMessageListener("cmd",function(e){var t=e,r=t.cmd;if(t.targetThread&&t.targetThread!=Pi()){var a=nn.pthreads[t.targetThread];a?a.postMessage(babelHelpers.extends({},t,{type:"cmd"}),t.transferList):A('Internal error! Worker sent a message "'+r+'" to target pthread '+t.targetThread+", but that thread no longer exists!");return}r==="checkMailbox"?Vo():r==="spawnThread"?vt(t):r==="cleanupThread"?Ct(t.thread):r==="killThread"?ht(t.thread):r==="cancelThread"?yt(t.thread):r==="loaded"?(o.loaded=!0,n(o)):r==="alert"?alert("Thread "+t.threadId+": "+t.text):t.target==="setimmediate"?o.postMessage(babelHelpers.extends({},t,{type:"cmd"})):r==="callHandler"?h[t.handler].apply(h,t.args):r&&A("worker sent an unknown command "+r)}),o.addMessageListener("waWasmWorkerCompatibleCallback",function(t){var n=t.type,r=t.__name,o=babelHelpers.objectWithoutPropertiesLoose(t,e);a.WhatsAppVoipWasmWorkerCompatibleCallbacks[r](o)}),o.onerror=function(e){var t="worker sent an error!";throw o.pthread_ptr&&(t="Pthread "+en(o.pthread_ptr)+" sent an error!"),A(t+" "+e.filename+":"+e.lineno+": "+e.message),e},H(B instanceof WebAssembly.Memory,"WebAssembly memory should have been loaded by now!"),H(q instanceof WebAssembly.Module,"WebAssembly Module should have been loaded by now!");var r=[],i=["onExit","onAbort","print","printErr"];for(var l of i)Object.prototype.hasOwnProperty.call(h,l)&&r.push(l);o.workerID=nn.nextWorkerID++,o.postMessage({cmd:"load",handlers:r,urlOrBlob:h.mainScriptUrlOrBlob||t,wasmMemory:B,wasmModule:q,workerID:o.workerID,wasmVariant:"prod-nonlab",type:"cmd"})})},loadWasmModuleToAllWorkers:function(t){if(T)return t();var e=(u||(u=n("Promise"))).all(nn.unusedWorkers.map(nn.loadWasmModuleToWorker));e.then(t)},allocateUnusedWorker:function(){var e,t=o("WorkerBundleResource").createDedicatedWebWorker(WAWebVoipWebWasmWorkerResource);e=new(o("WorkerMessagePort")).WorkerMessagePort(t,"WAWebVoipWebWasmWorker"),o("WorkerClient").init(e),nn.unusedWorkers.push(e)},getNewWorker:function(){return nn.unusedWorkers.length==0&&(A("Tried to spawn a new thread, but the thread pool is exhausted.\nThis might result in a deadlock unless some threads eventually exit or the code explicitly breaks out to the event loop.\nIf you want to increase the pool size, use setting `-sPTHREAD_POOL_SIZE=...`.\nIf you want to throw an explicit error instead of the risk of deadlocking in those cases, use setting `-sPTHREAD_POOL_SIZE_STRICT=2`."),nn.allocateUnusedWorker(),nn.loadWasmModuleToWorker(nn.unusedWorkers[0])),nn.unusedWorkers.pop()}};h.PThread=nn;var rn=function(t){for(;t.length>0;)t.shift()(h)};function on(){var e=Pi(),t=p()[e+52>>2],n=p()[e+56>>2],r=t-n;H(t!=0),H(r!=0),H(t>r,"stackHigh must be higher then stackLow"),Yi(t,r),el(t),oe()}h.establishStackSpace=on;function an(e){if(T)return Pa(2,0,e);Zt(e)}var ln=function(t){var e=Zi(),n=t();return el(e),n},sn=function(t){return ln(function(){var e=tl(4),n=tl(4);al(t,e,n);var r=_()[e>>2],o=_()[n>>2],a=Qt(r);Ei(r);var i;return o&&(i=Qt(o),Ei(o)),[a,i]})};function un(e){return sn(e)}h.getExceptionMessage=un;var cn=function(t){return re.get(t)};function dn(e,t){var n=cn(e)(t);ae();function r(e){de()?nn.setExitStatus(e):zi(e)}r(n)}h.invokeEntryPoint=dn;function mn(e){nn.tlsInitFunctions.push(e)}var pn=function(t){pn.shown||(pn.shown={}),pn.shown[t]||(pn.shown[t]=1,A(t))},_n=function(t,n,r,o){Ee("Assertion failed: "+Qt(t)+", at: "+[n?Qt(n):"unknown filename",r,o?Qt(o):"unknown function"])},fn=[],gn=0;function hn(e){var t=new bn(e);return t.get_caught()||(t.set_caught(!0),gn--),t.set_rethrown(!1),fn.push(t),ol(t.excPtr),t.get_exception_ptr()}var yn=0;function Cn(){Ki(0,0),H(fn.length>0);var e=fn.pop();rl(e.excPtr),yn=0}function bn(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){_()[this.ptr+4>>2]=e},this.get_type=function(){return _()[this.ptr+4>>2]},this.set_destructor=function(e){_()[this.ptr+8>>2]=e},this.get_destructor=function(){return _()[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,i()[this.ptr+12>>0]=e},this.get_caught=function(){return i()[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,i()[this.ptr+13>>0]=e},this.get_rethrown=function(){return i()[this.ptr+13>>0]!=0},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){_()[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _()[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=ll(this.get_type());if(e)return _()[this.excPtr>>2];var t=this.get_adjusted_ptr();return t!==0?t:this.excPtr}}function vn(e){throw yn||(yn=new Pe(e)),yn}var Sn=function(t){var e=yn&&yn.excPtr;if(!e)return Qi(0),0;var n=new bn(e);n.set_adjusted_ptr(e);var r=n.get_type();if(!r)return Qi(0),e;for(var o in t){var a=t[o];if(a===0||a===r)break;var i=n.ptr+16;if(il(a,r,i))return Qi(a),e}return Qi(r),e},Rn=function(){return Sn([])},Ln=function(t){return Sn([t])},En=function(t,n){return Sn([t,n])};function kn(e){var t=new bn(e).get_exception_ptr();return t}function In(){var e=fn.pop();e||Ee("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(fn.push(e),e.set_rethrown(!0),e.set_caught(!1),gn++),yn=new Pe(t),yn}function Tn(e,t,n){var r=new bn(e);throw r.init(t,n),yn=new Pe(e),gn++,yn}function Dn(){return gn}function xn(e){Fi(e,!E,1,!L,1048576,!1),nn.threadInitTLS()}function $n(e){T?postMessage({cmd:"cleanupThread",thread:e,type:"cmd"}):Ct(e)}function Pn(e,t,n,r){return T?Pa(3,1,e,t,n,r):Nn(e,t,n,r)}function Nn(e,t,n,r){if(typeof SharedArrayBuffer=="undefined")return A("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var o=[],a=0;if(T&&(o.length===0||a))return Pn(e,t,n,r);var i={startRoutine:n,pthread_ptr:e,arg:r,transferList:o};return T?(i.cmd="spawnThread",postMessage(babelHelpers.extends({},i,{type:"cmd"}),o),0):vt(i)}function Mn(e){if(T)return Pa(4,1,e);try{return e=Xt.getStr(e),Kt.chdir(e),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}var wn=function(t){return p()[Ti()>>2]=t,t};function An(e,t,n){if(T)return Pa(5,1,e,t,n);Xt.varargs=n;try{var r=Xt.getStreamFromFD(e);switch(t){case 0:{var o=Xt.get();if(o<0)return-28;var a;return a=Kt.createStream(r,o),a.fd}case 1:case 2:return 0;case 3:return r.flags;case 4:{var o=Xt.get();return r.flags|=o,0}case 5:{var o=Xt.get(),i=0;return d()[o+i>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return wn(28),-1;default:return-28}}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Fn(e,t){if(T)return Pa(6,1,e,t);try{var n=Xt.getStreamFromFD(e);return Xt.doStat(Kt.stat,n.path,t)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}var On=function(t,n,r){return H(typeof r=="number","stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),xt(t,l(),n,r)};function Bn(e,t,n){if(T)return Pa(7,1,e,t,n);try{var r=Xt.getStreamFromFD(e);r.getdents||(r.getdents=Kt.readdir(r.path));for(var o=280,a=0,l=Kt.llseek(r,0,1),s=Math.floor(l/o);s<r.getdents.length&&a+o<=n;){var u,c,m=r.getdents[s];if(m===".")u=r.node.id,c=4;else if(m===".."){var p=Kt.lookupPath(r.path,{parent:!0});u=p.node.id,c=4}else{var _=Kt.lookupNode(r.node,m);u=_.id,c=Kt.isChrdev(_.mode)?2:Kt.isDir(_.mode)?4:Kt.isLink(_.mode)?10:8}H(u),J[t+a>>3]=BigInt(u),J[t+a+8>>3]=BigInt((s+1)*o),d()[t+a+16>>1]=280,i()[t+a+18>>0]=c,On(m,t+a+19,256),a+=o,s+=1}return Kt.llseek(r,s*o,0),a}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Wn(e,t,n){if(T)return Pa(8,1,e,t,n);Xt.varargs=n;try{var r=Xt.getStreamFromFD(e);switch(t){case 21509:return r.tty?0:-59;case 21505:{if(!r.tty)return-59;if(r.tty.ops.ioctl_tcgets){var o=r.tty.ops.ioctl_tcgets(r),a=Xt.get();p()[a>>2]=o.c_iflag||0,p()[a+4>>2]=o.c_oflag||0,p()[a+8>>2]=o.c_cflag||0,p()[a+12>>2]=o.c_lflag||0;for(var l=0;l<32;l++)i()[a+l+17>>0]=o.c_cc[l]||0;return 0}return 0}case 21510:case 21511:case 21512:return r.tty?0:-59;case 21506:case 21507:case 21508:{if(!r.tty)return-59;if(r.tty.ops.ioctl_tcsets){for(var a=Xt.get(),s=p()[a>>2],u=p()[a+4>>2],c=p()[a+8>>2],m=p()[a+12>>2],_=[],l=0;l<32;l++)_.push(i()[a+l+17>>0]);return r.tty.ops.ioctl_tcsets(r.tty,t,{c_iflag:s,c_oflag:u,c_cflag:c,c_lflag:m,c_cc:_})}return 0}case 21519:{if(!r.tty)return-59;var a=Xt.get();return p()[a>>2]=0,0}case 21520:return r.tty?-28:-59;case 21531:{var a=Xt.get();return Kt.ioctl(r,t,a)}case 21523:{if(!r.tty)return-59;if(r.tty.ops.ioctl_tiocgwinsz){var f=r.tty.ops.ioctl_tiocgwinsz(r.tty),a=Xt.get();d()[a>>1]=f[0],d()[a+2>>1]=f[1]}return 0}case 21524:return r.tty?0:-59;case 21515:return r.tty?0:-59;default:return-28}}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function qn(e,t){if(T)return Pa(9,1,e,t);try{return e=Xt.getStr(e),Xt.doStat(Kt.lstat,e,t)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Un(e,t,n){if(T)return Pa(10,1,e,t,n);try{return t=Xt.getStr(t),t=Xt.calculateAt(e,t),t=St.normalize(t),t[t.length-1]==="/"&&(t=t.substr(0,t.length-1)),Kt.mkdir(t,n,0),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Vn(e,t,n,r){if(T)return Pa(11,1,e,t,n,r);try{t=Xt.getStr(t);var o=r&256,a=r&4096;return r=r&-6401,H(!r,"unknown flags in __syscall_newfstatat: "+r),t=Xt.calculateAt(e,t,a),Xt.doStat(o?Kt.lstat:Kt.stat,t,n)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Hn(e,t,n,r){if(T)return Pa(12,1,e,t,n,r);Xt.varargs=r;try{t=Xt.getStr(t),t=Xt.calculateAt(e,t);var o=r?Xt.get():0;return Kt.open(t,n,o).fd}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function Gn(e,t){if(T)return Pa(13,1,e,t);try{return e=Xt.getStr(e),Xt.doStat(Kt.stat,e,t)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function zn(e,t,n){if(T)return Pa(14,1,e,t,n);try{return t=Xt.getStr(t),t=Xt.calculateAt(e,t),n===0?Kt.unlink(t):n===512?Kt.rmdir(t):Ee("Invalid flags passed to unlinkat"),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function jn(e){if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e}function Kn(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Qn=e}var Qn=void 0;function Xn(e){for(var t="",n=e;l()[n];)t+=Qn[l()[n++]];return t}var Yn={},Jn={},Zn={},er=void 0;function tr(e){throw new er(e)}var nr=void 0;function rr(e){throw new nr(e)}function or(e,t,n){e.forEach(function(e){Zn[e]=t});function r(t){var r=n(t);r.length!==e.length&&rr("Mismatched type converter count");for(var o=0;o<e.length;++o)ir(e[o],r[o])}var o=new Array(t.length),a=[],i=0;t.forEach(function(e,t){Object.prototype.hasOwnProperty.call(Jn,e)?o[t]=Jn[e]:(a.push(e),Object.prototype.hasOwnProperty.call(Yn,e)||(Yn[e]=[]),Yn[e].push(function(){o[t]=Jn[e],++i,i===a.length&&r(o)}))}),a.length===0&&r(o)}function ar(e,t,n){n===void 0&&(n={});var r=t.name;if(e||tr('type "'+r+'" must have a positive integer typeid pointer'),Object.prototype.hasOwnProperty.call(Jn,e)){if(n.ignoreDuplicateRegistrations)return;tr("Cannot register type '"+r+"' twice")}if(Jn[e]=t,delete Zn[e],Object.prototype.hasOwnProperty.call(Yn,e)){var o=Yn[e];delete Yn[e],o.forEach(function(e){return e()})}}function ir(e,t,n){if(n===void 0&&(n={}),!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return ar(e,t,n)}function lr(e,t,n){switch(t){case 0:return n?function(t){return i()[t]}:function(t){return l()[t]};case 1:return n?function(t){return d()[t>>1]}:function(t){return m()[t>>1]};case 2:return n?function(t){return p()[t>>2]}:function(t){return _()[t>>2]};case 3:return n?function(t){return J[t>>3]}:function(t){return Z[t>>3]};default:throw new TypeError("Unknown integer type: "+e)}}function sr(e,t,n,r,o){t=Xn(t);var a=ur(n),i=t.indexOf("u")!=-1;i&&(o=(BigInt(1)<<BigInt(64))-BigInt(1)),ir(e,{name:t,fromWireType:function(t){return t},toWireType:function(n,a){if(typeof a!="bigint"&&typeof a!="number")throw new TypeError('Cannot convert "'+jn(a)+'" to '+this.name);if(a<r||a>o)throw new TypeError('Passing a number "'+jn(a)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+r+", "+o+"]!");return a},argPackAdvance:8,readValueFromPointer:lr(t,a,!i),destructorFunction:null})}function ur(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 cr(e,t,n,r,o){var a=ur(n);t=Xn(t),ir(e,{name:t,fromWireType:function(t){return!!t},toWireType:function(t,n){return n?r:o},argPackAdvance:8,readValueFromPointer:function(r){var e;if(n===1)e=i();else if(n===2)e=d();else if(n===4)e=p();else throw new TypeError("Unknown boolean type size: "+t);return this.fromWireType(e[r>>a])},destructorFunction:null,jsType:"boolean"})}function dr(e){if(!(this instanceof Or)||!(e instanceof Or))return!1;for(var t=this.$$.ptrType.registeredClass,n=this.$$.ptr,r=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)o=r.upcast(o),r=r.baseClass;return t===r&&n===o}function mr(e){return{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}function pr(e){function t(e){return e.$$.ptrType.registeredClass.name}tr(t(e)+" instance already deleted")}var _r=!1;function fr(e){}function gr(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}function hr(e){e.count.value-=1;var t=e.count.value===0;t&&gr(e)}function yr(e,t,n){if(t===n)return e;if(n.baseClass===void 0)return null;var r=yr(e,t,n.baseClass);return r===null?null:n.downcast(r)}var Cr={};function br(){return Object.keys(Ir).length}function vr(){var e=[];for(var t in Ir)Object.prototype.hasOwnProperty.call(Ir,t)&&e.push(Ir[t]);return e}var Sr=[];function Rr(){for(;Sr.length;){var e=Sr.pop();e.$$.deleteScheduled=!1,e.delete()}}var Lr=void 0;function Er(e){Lr=e,Sr.length&&Lr&&Lr(Rr)}function kr(){h.getInheritedInstanceCount=br,h.getLiveInheritedInstances=vr,h.flushPendingDeletes=Rr,h.setDelayFunction=Er}var Ir={};function Tr(e,t){for(t===void 0&&tr("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}function Dr(e,t){return t=Tr(e,t),Ir[t]}function xr(e,t){(!t.ptrType||!t.ptr)&&rr("makeClassHandle requires ptr and ptrType");var n=!!t.smartPtrType,r=!!t.smartPtr;return n!==r&&rr("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Pr(Object.create(e,{$$:{value:t}}))}function $r(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=Dr(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function o(){return this.isSmartPointer?xr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):xr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=this.registeredClass.getActualType(t),i=Cr[a];if(!i)return o.call(this);var l;this.isConst?l=i.constPointerType:l=i.pointerType;var s=yr(t,this.registeredClass,l.registeredClass);return s===null?o.call(this):this.isSmartPointer?xr(l.registeredClass.instancePrototype,{ptrType:l,ptr:s,smartPtrType:this,smartPtr:e}):xr(l.registeredClass.instancePrototype,{ptrType:l,ptr:s})}var Pr=function(t){return typeof FinalizationRegistry=="undefined"?(Pr=function(t){return t},t):(_r=new FinalizationRegistry(function(e){e.leakWarning.stack.replace(/^Error: /,""),hr(e.$$)}),Pr=function(t){var e=t.$$,n=!!e.smartPtr;if(n){var r={$$:e},o=e.ptrType.registeredClass;r.leakWarning=new Error("Embind found a leaked C++ instance "+o.name+" <"+en(e.ptr)+">.\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,$r),_r.register(t,r,t)}return t},fr=function(t){return _r.unregister(t)},Pr(t))};function Nr(){if(this.$$.ptr||pr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Pr(Object.create(Object.getPrototypeOf(this),{$$:{value:mr(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function Mr(){this.$$.ptr||pr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&tr("Object already scheduled for deletion"),fr(this),hr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function wr(){return!this.$$.ptr}function Ar(){return this.$$.ptr||pr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&tr("Object already scheduled for deletion"),Sr.push(this),Sr.length===1&&Lr&&Lr(Rr),this.$$.deleteScheduled=!0,this}function Fr(){Or.prototype.isAliasOf=dr,Or.prototype.clone=Nr,Or.prototype.delete=Mr,Or.prototype.isDeleted=wr,Or.prototype.deleteLater=Ar}function Or(){}var Br=48,Wr=57;function qr(e){if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=Br&&t<=Wr?"_"+e:e}function Ur(e,t){var n;return e=qr(e),(n={},n[e]=function(){return t.apply(this,arguments)},n)[e]}function Vr(e,t,n){if(e[t].overloadTable===void 0){var r=e[t];e[t]=function(){return Object.prototype.hasOwnProperty.call(e[t].overloadTable,arguments.length)||tr("Function '"+n+"' 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[r.argCount]=r}}function Hr(e,t,n){Object.prototype.hasOwnProperty.call(h,e)?((n===void 0||h[e].overloadTable!==void 0&&h[e].overloadTable[n]!==void 0)&&tr("Cannot register public name '"+e+"' twice"),Vr(h,e,e),Object.prototype.hasOwnProperty.call(h,n)&&tr("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),h[e].overloadTable[n]=t):(h[e]=t,n!==void 0&&(h[e].numArguments=n))}function Gr(e,t,n,r,o,a,i,l){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=l,this.pureVirtualFunctions=[]}function zr(e,t,n){for(;t!==n;)t.upcast||tr("Expected null or instance of "+n.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function jr(e,t){if(t===null)return this.isReference&&tr("null is not a valid "+this.name),0;t.$$||tr('Cannot pass "'+jn(t)+'" as a '+this.name),t.$$.ptr||tr("Cannot pass deleted object as a pointer of type "+this.name);var n=t.$$.ptrType.registeredClass,r=zr(t.$$.ptr,n,this.registeredClass);return r}function Kr(e,t){var n;if(t===null)return this.isReference&&tr("null is not a valid "+this.name),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;t.$$||tr('Cannot pass "'+jn(t)+'" as a '+this.name),t.$$.ptr||tr("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&tr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;if(n=zr(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&tr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:tr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var o=t.clone();n=this.rawShare(n,vo.toHandle(function(){o.delete()})),e!==null&&e.push(this.rawDestructor,n)}break;default:tr("Unsupporting sharing policy")}return n}function Qr(e,t){if(t===null)return this.isReference&&tr("null is not a valid "+this.name),0;t.$$||tr('Cannot pass "'+jn(t)+'" as a '+this.name),t.$$.ptr||tr("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&tr("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass,r=zr(t.$$.ptr,n,this.registeredClass);return r}function Xr(e){return this.fromWireType(p()[e>>2])}function Yr(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Jr(e){this.rawDestructor&&this.rawDestructor(e)}function Zr(e){e!==null&&e.delete()}function eo(){to.prototype.getPointee=Yr,to.prototype.destructor=Jr,to.prototype.argPackAdvance=8,to.prototype.readValueFromPointer=Xr,to.prototype.deleteObject=Zr,to.prototype.fromWireType=$r}function to(e,t,n,r,o,a,i,l,s,u,c){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=l,this.rawConstructor=s,this.rawShare=u,this.rawDestructor=c,!o&&t.baseClass===void 0?r?(this.toWireType=jr,this.destructorFunction=null):(this.toWireType=Qr,this.destructorFunction=null):this.toWireType=Kr}function no(e,t,n){Object.prototype.hasOwnProperty.call(h,e)||rr("Replacing nonexistant public symbol"),h[e].overloadTable!==void 0&&n!==void 0?h[e].overloadTable[n]=t:(h[e]=t,h[e].argCount=n)}function ro(e,t){e=Xn(e);function n(){return cn(t)}var r=n();return typeof r!="function"&&tr("unknown function pointer with signature "+e+": "+t),r}function oo(e,t){var n=Ur(t,function(e){this.name=t,this.message=e;var n=new Error(e).stack;n!==void 0&&(this.stack=this.toString()+"\n"+n.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:this.name+": "+this.message},n}var ao=void 0;function io(e){var t=wi(e),n=Xn(t);return Ei(t),n}function lo(e,t){var n=[],r={};function o(e){if(!r[e]&&!Jn[e]){if(Zn[e]){Zn[e].forEach(o);return}n.push(e),r[e]=!0}}throw t.forEach(o),new ao(e+": "+n.map(io).join([", "]))}function so(e,t,n,r,o,a,i,l,s,u,c,d,m){c=Xn(c),a=ro(o,a),l&&(l=ro(i,l)),u&&(u=ro(s,u)),m=ro(d,m);var p=qr(c);Hr(p,function(){lo("Cannot construct "+c+" due to unbound types",[r])}),or([e,t,n],r?[r]:[],function(t){t=t[0];var n,o;r?(n=t.registeredClass,o=n.instancePrototype):o=Or.prototype;var i=Ur(p,function(){if(Object.getPrototypeOf(this)!==s)throw new er("Use 'new' to construct "+c);if(d.constructor_body===void 0)throw new er(c+" has no accessible constructor");var e=d.constructor_body[arguments.length];if(e===void 0)throw new er("Tried to invoke ctor of "+c+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(d.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)}),s=Object.create(o,{constructor:{value:i}});i.prototype=s;var d=new Gr(c,i,s,m,n,a,l,u);d.baseClass&&(d.baseClass.__derivedClasses===void 0&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var _=new to(c,d,!0,!1,!1),f=new to(c+"*",d,!1,!1,!1),g=new to(c+" const*",d,!1,!0,!1);return Cr[e]={pointerType:f,constPointerType:g},no(p,i),[_,f,g]})}function uo(e,t){for(var n=[],r=0;r<e;r++)n.push(_()[t+r*4>>2]);return n}function co(e){for(;e.length;){var t=e.pop(),n=e.pop();n(t)}}function mo(e,t,n,r,o,a){var i=t.length;i<2&&tr("argTypes array size mismatch! Must at least get return value and 'this' types!"),H(!a,"Async bindings are only supported with JSPI.");for(var l=t[1]!==null&&n!==null,s=!1,u=1;u<t.length;++u)if(t[u]!==null&&t[u].destructorFunction===void 0){s=!0;break}var c=t[0].name!=="void",d=i-2,m=new Array(d),p=[],_=[];return function(){arguments.length!==d&&tr("function "+e+" called with "+arguments.length+" arguments, expected "+d+" args!"),_.length=0;var n;p.length=l?2:1,p[0]=o,l&&(n=t[1].toWireType(_,this),p[1]=n);for(var a=0;a<d;++a)m[a]=t[a+2].toWireType(_,arguments[a]),p.push(m[a]);var i=r.apply(null,p);function u(e){if(s)co(_);else for(var r=l?1:2;r<t.length;r++){var o=r===1?n:m[r-2];t[r].destructorFunction!==null&&t[r].destructorFunction(o)}if(c)return t[0].fromWireType(e)}return u(i)}}function po(e,t,n,r,o,a){H(t>0);var i=uo(t,n);o=ro(r,o),or([],[e],function(e){e=e[0];var n="constructor "+e.name;if(e.registeredClass.constructor_body===void 0&&(e.registeredClass.constructor_body=[]),e.registeredClass.constructor_body[t-1]!==void 0)throw new er("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=function(){lo("Cannot construct "+e.name+" due to unbound types",i)},or([],i,function(r){return r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=mo(n,r,null,o,a),[]}),[]})}function _o(e,t,n,r,o,a,i,l,s){var u=uo(n,r);t=Xn(t),a=ro(o,a),or([],[e],function(e){e=e[0];var r=e.name+"."+t;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),l&&e.registeredClass.pureVirtualFunctions.push(t);function o(){lo("Cannot call "+r+" due to unbound types",u)}var c=e.registeredClass.instancePrototype,d=c[t];return d===void 0||d.overloadTable===void 0&&d.className!==e.name&&d.argCount===n-2?(o.argCount=n-2,o.className=e.name,c[t]=o):(Vr(c,t,r),c[t].overloadTable[n-2]=o),or([],u,function(o){var l=mo(r,o,e,a,i,s);return c[t].overloadTable===void 0?(l.argCount=n-2,c[t]=l):c[t].overloadTable[n-2]=l,[]}),[]})}function fo(){Object.assign(go.prototype,{get:function(t){return H(this.allocated[t]!==void 0,"invalid handle: "+t),this.allocated[t]},has:function(t){return this.allocated[t]!==void 0},allocate:function(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free:function(t){H(this.allocated[t]!==void 0),this.allocated[t]=void 0,this.freelist.push(t)}})}function go(){this.allocated=[void 0],this.freelist=[]}var ho=new go;function yo(e){e>=ho.reserved&&--ho.get(e).refcount===0&&ho.free(e)}function Co(){for(var e=0,t=ho.reserved;t<ho.allocated.length;++t)ho.allocated[t]!==void 0&&++e;return e}function bo(){ho.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),ho.reserved=ho.allocated.length,h.count_emval_handles=Co}var vo={toValue:function(t){return t||tr("Cannot use deleted val. handle = "+t),ho.get(t).value},toHandle:function(t){switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return ho.allocate({refcount:1,value:t})}}};function So(e,t){t=Xn(t),ir(e,{name:t,fromWireType:function(t){var e=vo.toValue(t);return yo(t),e},toWireType:function(t,n){return vo.toHandle(n)},argPackAdvance:8,readValueFromPointer:Xr,destructorFunction:null})}function Ro(e,t){switch(t){case 2:return function(e){return this.fromWireType(f()[e>>2])};case 3:return function(e){return this.fromWireType(g()[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function Lo(e,t,n){var r=ur(n);t=Xn(t),ir(e,{name:t,fromWireType:function(t){return t},toWireType:function(t,n){if(typeof n!="number"&&typeof n!="boolean")throw new TypeError("Cannot convert "+jn(n)+" to "+this.name);return n},argPackAdvance:8,readValueFromPointer:Ro(t,r),destructorFunction:null,jsType:"number"})}function Eo(e,t,n,r,o,a,i){var l=uo(t,n);e=Xn(e),o=ro(r,o),Hr(e,function(){lo("Cannot call "+e+" due to unbound types",l)},t-1),or([],l,function(n){var r=[n[0],null].concat(n.slice(1));return no(e,mo(e,r,null,o,a,i),t-1),h.__WA_INVOKER_FUNCS==null&&(h.__WA_INVOKER_FUNCS=new Map),h.__WA_INVOKER_FUNCS.set(e,{argTypes:n.slice(1),returnType:n[0]}),[]})}function ko(e,t,n,r,o){t=Xn(t),o===-1&&(o=4294967295);var a=ur(n),i=function(t){return t};if(r===0){var l=32-8*n;i=function(t){return t<<l>>>l}}var s=t.includes("unsigned"),u=function(n,a){if(typeof n!="number"&&typeof n!="boolean")throw new TypeError('Cannot convert "'+jn(n)+'" to '+a);if(n<r||n>o)throw new TypeError('Passing a number "'+jn(n)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+r+", "+o+"]!")},c;s?c=function(t,n){return u(n,this.name),n>>>0}:c=function(t,n){return u(n,this.name),n},ir(e,{name:t,fromWireType:i,toWireType:c,argPackAdvance:8,readValueFromPointer:lr(t,a,r!==0),destructorFunction:null,jsType:"number"})}function Io(e,t,n){var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array],o=r[t];function a(e){e=e>>2;var t=_(),n=t[e],r=t[e+1];return new o(t.buffer,r,n)}n=Xn(n),ir(e,{name:n,fromWireType:a,argPackAdvance:8,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})}function To(e,t){t=Xn(t);var n=t==="std::string";ir(e,{name:t,fromWireType:function(t){var e=_()[t>>2],r=t+4,o;if(n)for(var a=r,i=0;i<=e;++i){var s=r+i;if(i==e||l()[s]==0){var u=s-a,c=Qt(a,u);o===void 0?o=c:(o+="\0",o+=c),a=s+1}}else{for(var d=new Array(e),i=0;i<e;++i)d[i]=String.fromCharCode(l()[r+i]);o=d.join("")}return Ei(t),o},toWireType:function(t,r){r instanceof ArrayBuffer&&(r=new Uint8Array(r));var e,o=typeof r=="string";o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||tr("Cannot pass non-string to std::string"),n&&o?e=Dt(r):e=r.length;var a=Li(4+e+1),i=a+4;if(_()[a>>2]=e,n&&o)On(r,i,e+1);else if(o)for(var s=0;s<e;++s){var u=r.charCodeAt(s);u>255&&(Ei(i),tr("String has UTF-16 code units that do not fit in 8 bits")),l()[i+s]=u}else for(var s=0;s<e;++s)l()[i+s]=r[s];return t!==null&&t.push(Ei,a),a},argPackAdvance:8,readValueFromPointer:Xr,destructorFunction:function(t){Ei(t)},jsType:"string"})}var Do=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0,xo=function(t,n){H(t%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var e=t,r=e>>1,o=r+n/2;!(r>=o)&&m()[r];)++r;if(e=r<<1,e-t>32&&Do)return Do.decode(l().slice(t,e));for(var a="",i=0;!(i>=n/2);++i){var s=d()[t+i*2>>1];if(s==0)break;a+=String.fromCharCode(s)}return a},$o=function(t,n,r){if(H(n%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),H(typeof r=="number","stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var e=n,o=r<t.length*2?r/2:t.length,a=0;a<o;++a){var i=t.charCodeAt(a);d()[n>>1]=i,n+=2}return d()[n>>1]=0,n-e},Po=function(t){return t.length*2},No=function(t,n){H(t%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var e=0,r="";!(e>=n/4);){var o=p()[t+e*4>>2];if(o==0)break;if(++e,o>=65536){var a=o-65536;r+=String.fromCharCode(55296|a>>10,56320|a&1023)}else r+=String.fromCharCode(o)}return r},Mo=function(t,n,r){if(H(n%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),H(typeof r=="number","stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),r===void 0&&(r=2147483647),r<4)return 0;for(var e=n,o=e+r-4,a=0;a<t.length;++a){var i=t.charCodeAt(a);if(i>=55296&&i<=57343){var l=t.charCodeAt(++a);i=65536+((i&1023)<<10)|l&1023}if(p()[n>>2]=i,n+=4,n+4>o)break}return p()[n>>2]=0,n-e},wo=function(t){for(var e=0,n=0;n<t.length;++n){var r=t.charCodeAt(n);r>=55296&&r<=57343&&++n,e+=4}return e},Ao=function(t,n,r){r=Xn(r);var e,o,a,i,l;n===2?(e=xo,o=$o,i=Po,a=function(){return m()},l=1):n===4&&(e=No,o=Mo,i=wo,a=function(){return _()},l=2),ir(t,{name:r,fromWireType:function(r){for(var t=_()[r>>2],o=a(),i,s=r+4,u=0;u<=t;++u){var c=r+4+u*n;if(u==t||o[c>>l]==0){var d=c-s,m=e(s,d);i===void 0?i=m:(i+="\0",i+=m),s=c+n}}return Ei(r),i},toWireType:function(t,a){typeof a!="string"&&tr("Cannot pass non-string to C++ string type "+r);var e=i(a),s=Li(4+e+n);return _()[s>>2]=e>>l,o(a,s+4,e+n),t!==null&&t.push(Ei,s),s},argPackAdvance:8,readValueFromPointer:Xr,destructorFunction:function(t){Ei(t)}})};function Fo(e,t){t=Xn(t),ir(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:function(){},toWireType:function(t,n){},jsType:"void"})}var Oo=!0,Bo=function(){return Oo},Wo=function(){if(!de())try{T?zi(V):Zt(V)}catch(e){tn(e)}},qo=function(t){if(U){A("user callback triggered after runtime exited or application aborted. Ignoring.");return}try{t(),Wo()}catch(e){tn(e)}};function Uo(e){if(typeof Atomics.waitAsync=="function"){var t=Atomics.waitAsync(p(),e>>2,e);H(t.async),t.value.then(Vo);var n=e+128;Atomics.store(p(),n>>2,1)}}h.__emscripten_thread_mailbox_await=Uo;var Vo=function(){var e=Pi();e&&(Uo(e),qo(function(){return ji()}))};h.checkMailbox=Vo;var Ho=function(t,n,r){if(t==n)setTimeout(function(){return Vo()});else if(T)postMessage({targetThread:t,cmd:"checkMailbox",type:"cmd"});else{var e=nn.pthreads[t];if(!e){A("Cannot send message to thread with ID "+t+", unknown thread ID!");return}e.postMessage({cmd:"checkMailbox",type:"cmd"})}};function Go(e,t,n){return A("emscripten_set_offscreencanvas_size: Build with -sOFFSCREENCANVAS_SUPPORT=1 to enable transferring canvases to pthreads."),-1}function zo(e){}var jo=function(){throw new $e};function Ko(e){e>4&&(ho.get(e).refcount+=1)}function Qo(e,t){var n=Jn[e];return n===void 0&&tr(t+" has unknown type "+io(e)),n}function Xo(e,t){e=Qo(e,"_emval_take_value");var n=e.readValueFromPointer(t);return vo.toHandle(n)}var Yo=9007199254740992,Jo=-9007199254740992;function Zo(e){return e<Jo||e>Yo?NaN:Number(e)}function ea(e,t){e=Zo(e),t=Zo(t);var n=new Date(e*1e3);p()[t>>2]=n.getUTCSeconds(),p()[t+4>>2]=n.getUTCMinutes(),p()[t+8>>2]=n.getUTCHours(),p()[t+12>>2]=n.getUTCDate(),p()[t+16>>2]=n.getUTCMonth(),p()[t+20>>2]=n.getUTCFullYear()-1900,p()[t+24>>2]=n.getUTCDay();var r=Date.UTC(n.getUTCFullYear(),0,1,0,0,0,0),o=(n.getTime()-r)/(1e3*60*60*24)|0;p()[t+28>>2]=o}var ta=function(t){return t%4===0&&(t%100!==0||t%400===0)},na=[0,31,60,91,121,152,182,213,244,274,305,335],ra=[0,31,59,90,120,151,181,212,243,273,304,334],oa=function(t){var e=ta(t.getFullYear()),n=e?na:ra,r=n[t.getMonth()]+t.getDate()-1;return r};function aa(e,t){e=Zo(e),t=Zo(t);var n=new Date(e*1e3);p()[t>>2]=n.getSeconds(),p()[t+4>>2]=n.getMinutes(),p()[t+8>>2]=n.getHours(),p()[t+12>>2]=n.getDate(),p()[t+16>>2]=n.getMonth(),p()[t+20>>2]=n.getFullYear()-1900,p()[t+24>>2]=n.getDay();var r=oa(n)|0;p()[t+28>>2]=r,p()[t+36>>2]=-(n.getTimezoneOffset()*60);var o=new Date(n.getFullYear(),0,1),a=new Date(n.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),l=(a!=i&&n.getTimezoneOffset()==Math.min(i,a))|0;p()[t+32>>2]=l}var ia=function(t){t=Zo(t);var e=(function(){var e=new Date(p()[t+20>>2]+1900,p()[t+16>>2],p()[t+12>>2],p()[t+8>>2],p()[t+4>>2],p()[t>>2],0),n=p()[t+32>>2],r=e.getTimezoneOffset(),o=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1).getTimezoneOffset(),i=o.getTimezoneOffset(),l=Math.min(i,a);if(n<0)p()[t+32>>2]=+(a!=i&&l==r);else if(n>0!=(l==r)){var s=Math.max(i,a),u=n>0?l:s;e.setTime(e.getTime()+(u-r)*6e4)}p()[t+24>>2]=e.getDay();var c=oa(e)|0;return p()[t+28>>2]=c,p()[t>>2]=e.getSeconds(),p()[t+4>>2]=e.getMinutes(),p()[t+8>>2]=e.getHours(),p()[t+12>>2]=e.getDate(),p()[t+16>>2]=e.getMonth(),p()[t+20>>2]=e.getYear(),e.getTime()/1e3})();return BigInt(e)};function la(e,t,n,r,o,a,i){if(T)return Pa(15,1,e,t,n,r,o,a,i);e=Zo(e),o=Zo(o),a=Zo(a),i=Zo(i);try{if(isNaN(o))return 61;var l=Xt.getStreamFromFD(r),s=Kt.mmap(l,e,o,t,n),u=s.ptr;return p()[a>>2]=s.allocated,_()[i>>2]=u,0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}function sa(e,t,n,r,o,a){if(T)return Pa(16,1,e,t,n,r,o,a);e=Zo(e),t=Zo(t),a=Zo(a);try{if(isNaN(a))return 61;var i=Xt.getStreamFromFD(o);n&2&&Xt.doMsync(e,i,t,r,a),Kt.munmap(i)}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return-e.errno}}var ua=function(t){var e=Dt(t)+1,n=Li(e);return n&&On(t,n,e),n},ca=function(t,n,r){var e=new Date().getFullYear(),o=new Date(e,0,1),a=new Date(e,6,1),i=o.getTimezoneOffset(),l=a.getTimezoneOffset(),s=Math.max(i,l);_()[t>>2]=s*60,p()[n>>2]=+(i!=l);function u(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}var c=u(o),d=u(a),m=ua(c),f=ua(d);l<i?(_()[r>>2]=m,_()[r+4>>2]=f):(_()[r>>2]=f,_()[r+4>>2]=m)},da=function(){Ee("native code called abort()")},ma=[],pa=function(t,n){H(Array.isArray(ma)),H(n%16==0),ma.length=0;var e;for(n>>=2;e=l()[t++];){var r=String.fromCharCode(e),o=["d","f","i"];o.push("j"),H(o.includes(r),"Invalid character "+e+'("'+r+'") in readEmAsmArgs! Use only ['+o+'], and do not specify "v" for void return argument.'),n+=e!=105&n,ma.push(e==105?p()[n]:(e==106?J:g())[n++>>1]),++n}return ma},_a=function(t,n,r){var e=pa(n,r);return Object.prototype.hasOwnProperty.call(ze,t)||Ee("No EM_ASM constant found at address "+t),ze[t].apply(null,e)},fa=function(t,n,r){return _a(t,n,r)},ga=function(t,n,r){return _a(t,n,r)},ha=function(){ce+=1},ya=function(){H(ce>0),ce-=1},Ca=function(t,n){return ha(),setTimeout(function(){ya(),qo(t)},n)};function ba(e,t){if(Ra.mainLoop.timingMode=e,Ra.mainLoop.timingValue=t,!Ra.mainLoop.func)return A("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(Ra.mainLoop.running||(ha(),Ra.mainLoop.running=!0),e==0)Ra.mainLoop.scheduler=function(){var e=Math.max(0,Ra.mainLoop.tickStartTime+t-va())|0;setTimeout(Ra.mainLoop.runner,e)},Ra.mainLoop.method="timeout";else if(e==1)Ra.mainLoop.scheduler=function(){Ra.requestAnimationFrame(Ra.mainLoop.runner)},Ra.mainLoop.method="rAF";else if(e==2){if(typeof setImmediate=="undefined"){var n=[],r="setimmediate",o=function(t){(t.data===r||t.data.target===r)&&(t.stopPropagation(),n.shift()())};addEventListener("message",o,!0),setImmediate=function(t){n.push(t),E?(h.setImmediates===void 0&&(h.setImmediates=[]),h.setImmediates.push(t),postMessage({target:r,type:"cmd"})):postMessage(babelHelpers.extends({},r,{type:"cmd"}),"*")}}Ra.mainLoop.scheduler=function(){setImmediate(Ra.mainLoop.runner)},Ra.mainLoop.method="immediate"}return 0}var va;va=function(){return performance.timeOrigin+performance.now()};function Sa(e,t,n,r,o){H(!Ra.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."),Ra.mainLoop.func=e,Ra.mainLoop.arg=r;var a=Ra.mainLoop.currentlyRunningMainloop;function i(){return a<Ra.mainLoop.currentlyRunningMainloop?(ya(),!1):!0}if(Ra.mainLoop.running=!1,Ra.mainLoop.runner=function(){if(!U){if(Ra.mainLoop.queue.length>0){var t=Date.now(),n=Ra.mainLoop.queue.shift();if(n.func(n.arg),Ra.mainLoop.remainingBlockers){var r=Ra.mainLoop.remainingBlockers,o=r%1==0?r-1:Math.floor(r);n.counted?Ra.mainLoop.remainingBlockers=o:(o=o+.5,Ra.mainLoop.remainingBlockers=(8*r+o)/9)}if(w('main loop blocker "'+n.name+'" took '+(Date.now()-t)+" ms"),Ra.mainLoop.updateStatus(),!i())return;setTimeout(Ra.mainLoop.runner,0);return}if(i()){if(Ra.mainLoop.currentFrameNumber=Ra.mainLoop.currentFrameNumber+1|0,Ra.mainLoop.timingMode==1&&Ra.mainLoop.timingValue>1&&Ra.mainLoop.currentFrameNumber%Ra.mainLoop.timingValue!=0){Ra.mainLoop.scheduler();return}else Ra.mainLoop.timingMode==0&&(Ra.mainLoop.tickStartTime=va());Ra.mainLoop.method==="timeout"&&h.ctx&&(pn("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!"),Ra.mainLoop.method=""),Ra.mainLoop.runIter(e),ae(),i()&&(typeof SDL=="object"&&SDL.audio&&SDL.audio.queueNewAudioData&&SDL.audio.queueNewAudioData(),Ra.mainLoop.scheduler())}}},o||(t&&t>0?ba(0,1e3/t):ba(1,1),Ra.mainLoop.scheduler()),n)throw"unwind"}var Ra={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Ra.mainLoop.scheduler=null,Ra.mainLoop.currentlyRunningMainloop++},resume:function(){Ra.mainLoop.currentlyRunningMainloop++;var e=Ra.mainLoop.timingMode,t=Ra.mainLoop.timingValue,n=Ra.mainLoop.func;Ra.mainLoop.func=null,Sa(n,0,!1,Ra.mainLoop.arg,!0),ba(e,t),Ra.mainLoop.scheduler()},updateStatus:function(){if(h.setStatus){var e=h.statusMessage||"Please wait...",t=Ra.mainLoop.remainingBlockers,n=Ra.mainLoop.expectedBlockers;t?t<n?h.setStatus(e+" ("+(n-t)+"/"+n+")"):h.setStatus(e):h.setStatus("")}},runIter:function(t){if(!U){if(h.preMainLoop){var e=h.preMainLoop();if(e===!1)return}qo(t),h.postMainLoop&&h.postMainLoop()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init:function(){if(Ra.initted)return;Ra.initted=!0;var e={};e.canHandle=function(t){return!h.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(t)},e.handle=function(t,n,r,o){var e=new Blob([t],{type:Ra.getMimetype(n)});e.size!==t.length&&(e=new Blob([new Uint8Array(t).buffer],{type:Ra.getMimetype(n)}));var a=URL.createObjectURL(e);H(typeof a=="string","createObjectURL must return a url as a string");var i=new Image;i.onload=function(){H(i.complete,"Image "+n+" could not be decoded");var e=document.createElement("canvas");e.width=i.width,e.height=i.height;var o=e.getContext("2d");o.drawImage(i,0,0),gi[n]=e,URL.revokeObjectURL(a),r&&r(t)},i.onerror=function(e){w("Image "+a+" could not be decoded"),o&&o()},i.src=a},Ot.push(e);var t={};t.canHandle=function(t){return!h.noAudioDecoding&&t.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},t.handle=function(t,n,r,o){var e=!1;function a(o){e||(e=!0,hi[n]=o,r&&r(t))}var i=new Blob([t],{type:Ra.getMimetype(n)}),l=URL.createObjectURL(i);H(typeof l=="string","createObjectURL must return a url as a string");var s=new Audio;s.addEventListener("canplaythrough",function(){return a(s)},!1),s.onerror=function(o){if(e)return;A("warning: browser could not fully decode audio "+n+", trying slower base64 approach");function r(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="=",r="",o=0,a=0,i=0;i<e.length;i++)for(o=o<<8|e[i],a+=8;a>=6;){var l=o>>a-6&63;a-=6,r+=t[l]}return a==2?(r+=t[(o&3)<<4],r+=n+n):a==4&&(r+=t[(o&15)<<2],r+=n),r}s.src="data:audio/x-"+n.substr(-3)+";base64,"+r(t),a(s)},s.src=l,Ca(function(){a(s)},1e4)},Ot.push(t);function n(){Ra.pointerLock=document.pointerLockElement===h.canvas||document.mozPointerLockElement===h.canvas||document.webkitPointerLockElement===h.canvas||document.msPointerLockElement===h.canvas}var r=h.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),h.elementPointerLock&&r.addEventListener("click",function(e){!Ra.pointerLock&&h.canvas.requestPointerLock&&(h.canvas.requestPointerLock(),e.preventDefault())},!1))},createContext:function(t,n,r,o){if(n&&h.ctx&&t==h.canvas)return h.ctx;var e,a;if(n){var i={antialias:!1,alpha:!1,majorVersion:1};if(o)for(var l in o)i[l]=o[l];typeof GL!="undefined"&&(a=GL.createContext(t,i),a&&(e=GL.getContext(a).GLctx))}else e=t.getContext("2d");return e?(r&&(n||H(typeof GLctx=="undefined","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),h.ctx=e,n&&GL.makeContextCurrent(a),h.useWebGL=n,Ra.moduleContextCreatedCallbacks.forEach(function(e){return e()}),Ra.init()),e):null},destroyContext:function(t,n,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(t,n){Ra.lockPointer=t,Ra.resizeCanvas=n,typeof Ra.lockPointer=="undefined"&&(Ra.lockPointer=!0),typeof Ra.resizeCanvas=="undefined"&&(Ra.resizeCanvas=!1);var e=h.canvas;function r(){Ra.isFullscreen=!1;var t=e.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===t?(e.exitFullscreen=Ra.exitFullscreen,Ra.lockPointer&&e.requestPointerLock(),Ra.isFullscreen=!0,Ra.resizeCanvas?Ra.setFullscreenCanvasSize():Ra.updateCanvasDimensions(e)):(t.parentNode.insertBefore(e,t),t.parentNode.removeChild(t),Ra.resizeCanvas?Ra.setWindowedCanvasSize():Ra.updateCanvasDimensions(e)),h.onFullScreen&&h.onFullScreen(Ra.isFullscreen),h.onFullscreen&&h.onFullscreen(Ra.isFullscreen)}Ra.fullscreenHandlersInstalled||(Ra.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",r,!1),document.addEventListener("mozfullscreenchange",r,!1),document.addEventListener("webkitfullscreenchange",r,!1),document.addEventListener("MSFullscreenChange",r,!1));var o=document.createElement("div");e.parentNode.insertBefore(o,e),o.appendChild(e),o.requestFullscreen=o.requestFullscreen||o.mozRequestFullScreen||o.msRequestFullscreen||(o.webkitRequestFullscreen?function(){return o.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(o.webkitRequestFullScreen?function(){return o.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),o.requestFullscreen()},requestFullScreen:function(){Ee("Module.requestFullScreen has been replaced by Module.requestFullscreen (without a capital S)")},exitFullscreen:function(){if(!Ra.isFullscreen)return!1;var e=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){};return e.apply(document,[]),!0},nextRAF:0,fakeRequestAnimationFrame:function(t){var e=Date.now();if(Ra.nextRAF===0)Ra.nextRAF=e+1e3/60;else for(;e+2>=Ra.nextRAF;)Ra.nextRAF+=1e3/60;var n=Math.max(Ra.nextRAF-e,0);setTimeout(t,n)},requestAnimationFrame:(function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t})(function(e){if(typeof requestAnimationFrame=="function"){requestAnimationFrame(e);return}var t=Ra.fakeRequestAnimationFrame;t(e)}),safeSetTimeout:function(t,n){return Ca(t,n)},safeRequestAnimationFrame:function(t){return ha(),Ra.requestAnimationFrame(function(){ya(),qo(t)})},getMimetype:function(t){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[t.substr(t.lastIndexOf(".")+1)]},getUserMedia:function(t){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(t)},getMovementX:function(t){return t.movementX||t.mozMovementX||t.webkitMovementX||0},getMovementY:function(t){return t.movementY||t.mozMovementY||t.webkitMovementY||0},getMouseWheelDelta:function(t){var e=0;switch(t.type){case"DOMMouseScroll":e=t.detail/3;break;case"mousewheel":e=t.wheelDelta/120;break;case"wheel":switch(e=t.deltaY,t.deltaMode){case 0:e/=100;break;case 1:e/=3;break;case 2:e*=80;break;default:throw"unrecognized mouse wheel delta mode: "+t.deltaMode}break;default:throw"unrecognized mouse wheel event: "+t.type}return e},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(t){if(Ra.pointerLock)t.type!="mousemove"&&"mozMovementX"in t?Ra.mouseMovementX=Ra.mouseMovementY=0:(Ra.mouseMovementX=Ra.getMovementX(t),Ra.mouseMovementY=Ra.getMovementY(t)),typeof SDL!="undefined"?(Ra.mouseX=SDL.mouseX+Ra.mouseMovementX,Ra.mouseY=SDL.mouseY+Ra.mouseMovementY):(Ra.mouseX+=Ra.mouseMovementX,Ra.mouseY+=Ra.mouseMovementY);else{var e=h.canvas.getBoundingClientRect(),n=h.canvas.width,r=h.canvas.height,o=typeof window.scrollX!="undefined"?window.scrollX:window.pageXOffset,a=typeof window.scrollY!="undefined"?window.scrollY:window.pageYOffset;if(H(typeof o!="undefined"&&typeof a!="undefined","Unable to retrieve scroll position, mouse positions likely broken."),t.type==="touchstart"||t.type==="touchend"||t.type==="touchmove"){var i=t.touch;if(i===void 0)return;var l=i.pageX-(o+e.left),s=i.pageY-(a+e.top);l=l*(n/e.width),s=s*(r/e.height);var u={x:l,y:s};if(t.type==="touchstart")Ra.lastTouches[i.identifier]=u,Ra.touches[i.identifier]=u;else if(t.type==="touchend"||t.type==="touchmove"){var c=Ra.touches[i.identifier];c||(c=u),Ra.lastTouches[i.identifier]=c,Ra.touches[i.identifier]=u}return}var d=t.pageX-(o+e.left),m=t.pageY-(a+e.top);d=d*(n/e.width),m=m*(r/e.height),Ra.mouseMovementX=d-Ra.mouseX,Ra.mouseMovementY=m-Ra.mouseY,Ra.mouseX=d,Ra.mouseY=m}},resizeListeners:[],updateResizeListeners:function(){var e=h.canvas;Ra.resizeListeners.forEach(function(t){return t(e.width,e.height)})},setCanvasSize:function(t,n,r){var e=h.canvas;Ra.updateCanvasDimensions(e,t,n),r||Ra.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL!="undefined"){var e=_()[SDL.screen>>2];e=e|8388608,p()[SDL.screen>>2]=e}Ra.updateCanvasDimensions(h.canvas),Ra.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL!="undefined"){var e=_()[SDL.screen>>2];e=e&-8388609,p()[SDL.screen>>2]=e}Ra.updateCanvasDimensions(h.canvas),Ra.updateResizeListeners()},updateCanvasDimensions:function(t,n,r){n&&r?(t.widthNative=n,t.heightNative=r):(n=t.widthNative,r=t.heightNative);var e=n,o=r;if(h.forcedAspectRatio&&h.forcedAspectRatio>0&&(e/o<h.forcedAspectRatio?e=Math.round(o*h.forcedAspectRatio):o=Math.round(e/h.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===t.parentNode&&typeof screen!="undefined"){var a=Math.min(screen.width/e,screen.height/o);e=Math.round(e*a),o=Math.round(o*a)}Ra.resizeCanvas?(t.width!=e&&(t.width=e),t.height!=o&&(t.height=o),typeof t.style!="undefined"&&(t.style.removeProperty("width"),t.style.removeProperty("height"))):(t.width!=n&&(t.width=n),t.height!=r&&(t.height=r),typeof t.style!="undefined"&&(e!=n||o!=r?(t.style.setProperty("width",e+"px","important"),t.style.setProperty("height",o+"px","important")):(t.style.removeProperty("width"),t.style.removeProperty("height"))))}};function La(e,t,n){function r(){cn(e)(t)}n>=0?Ca(r,n):Ra.safeRequestAnimationFrame(r)}function Ea(){E||pn("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")}var ka=function(t){H(typeof t=="number"),Qt(t)};function Ia(){return Date.now()}var Ta=function(){throw ha(),"unwind"},Da=function(){return 2147483648},xa=function(){return Da()};function $a(){return navigator.hardwareConcurrency}function Pa(e,t){var n=arguments.length-2,r=arguments,o=19;if(n>o)throw"proxyToMainThread: Too many arguments "+n+" to proxied function idx="+e+", maximum supported is "+o;return ln(function(){for(var o=n*2,a=tl(o*8),i=a>>3,l=0;l<n;l++){var s=r[2+l];typeof s=="bigint"?(J[i+2*l]=BigInt(1),J[i+2*l+1]=s):(J[i+2*l]=BigInt(0),g()[i+2*l+1]=s)}return qi(e,o,a,t)})}var Na=[];function Ma(e,t,n,r){nn.currentProxiedOperationCallerThread=t,n/=2,Na.length=n;for(var o=r>>3,a=0;a<n;a++)J[o+2*a]?Na[a]=J[o+2*a+1]:Na[a]=g()[o+2*a+1];var i=e<0,l=i?ze[-e-1]:yi[e];return H(l.length==n,"Call args mismatch in emscripten_receive_on_main_thread_js"),l.apply(null,Na)}var wa=function(t){var e=B.buffer,n=t-e.byteLength+65535>>>16;try{return B.grow(n),te(),1}catch(n){A("growMemory: Attempted to grow heap from "+e.byteLength+" bytes to "+t+" bytes, but got error: "+n)}},Aa=function(t){var e=l().length;if(t>>>=0,t<=e)return!1;var n=Da();if(t>n)return A("Cannot enlarge memory, asked to go up to "+t+" bytes, but the limit is "+n+" bytes!"),!1;for(var r=function(t,n){return t+(n-t%n)%n},o=1;o<=4;o*=2){var a=e*(1+.2/o);a=Math.min(a,t+100663296);var i=Math.min(n,r(Math.max(t,a),65536)),s=wa(i);if(s)return!0}return A("Failed to grow the heap from "+e+" bytes to "+i+" bytes, not enough memory!"),!1},Fa=ya,Oa=ha,Ba={},Wa=function(){return S||"./this.program"},qa=function(){if(!qa.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Wa()};for(var n in Ba)Ba[n]===void 0?delete t[n]:t[n]=Ba[n];var r=[];for(var n in t)r.push(n+"="+t[n]);qa.strings=r}return qa.strings},Ua=function(t,n){for(var e=0;e<t.length;++e)H(t.charCodeAt(e)===(t.charCodeAt(e)&255)),i()[n++>>0]=t.charCodeAt(e);i()[n>>0]=0};function Va(e,t){if(T)return Pa(17,1,e,t);var n=0;return qa().forEach(function(r,o){var a=t+n;_()[e+o*4>>2]=a,Ua(r,a),n+=r.length+1}),0}function Ha(e,t){if(T)return Pa(18,1,e,t);var n=qa();_()[e>>2]=n.length;var r=0;return n.forEach(function(e){r+=e.length+1}),_()[t>>2]=r,0}function Ga(e){if(T)return Pa(19,1,e);try{var t=Xt.getStreamFromFD(e);return Kt.close(t),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}var za=function(t,n,r,o){for(var e=0,a=0;a<r;a++){var l=_()[n>>2],s=_()[n+4>>2];n+=8;var u=Kt.read(t,i(),l,s,o);if(u<0)return-1;if(e+=u,u<s)break;typeof o!="undefined"&&(o+=u)}return e};function ja(e,t,n,r,o){if(T)return Pa(20,1,e,t,n,r,o);t=Zo(t),n=Zo(n),r=Zo(r),o=Zo(o);try{if(isNaN(r))return 61;var a=Xt.getStreamFromFD(e),i=za(a,t,n,r);return _()[o>>2]=i,0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}function Ka(e,t,n,r){if(T)return Pa(21,1,e,t,n,r);try{var o=Xt.getStreamFromFD(e),a=za(o,t,n);return _()[r>>2]=a,0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}function Qa(e,t,n,r){if(T)return Pa(22,1,e,t,n,r);t=Zo(t),r=Zo(r);try{if(isNaN(t))return 61;var o=Xt.getStreamFromFD(e);return Kt.llseek(o,t,n),J[r>>3]=BigInt(o.position),o.getdents&&t===0&&n===0&&(o.getdents=null),0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}var Xa=function(t,n,r,o){for(var e=0,a=0;a<r;a++){var l=_()[n>>2],s=_()[n+4>>2];n+=8;var u=Kt.write(t,i(),l,s,o);if(u<0)return-1;e+=u,typeof o!="undefined"&&(o+=u)}return e};function Ya(e,t,n,r){if(T)return Pa(23,1,e,t,n,r);try{var o=Xt.getStreamFromFD(e),a=Xa(o,t,n);return _()[r>>2]=a,0}catch(e){if(typeof Kt=="undefined"||e.name!=="ErrnoError")throw e;return e.errno}}var Ja=function(t,n){return Lt(l().subarray(t,t+n)),0},Za=function(t){for(var e=t.split("."),n=0;n<4;n++){var r=Number(e[n]);if(isNaN(r))return null;e[n]=r}return(e[0]|e[1]<<8|e[2]<<16|e[3]<<24)>>>0},ei=function(t){return parseInt(t)},ti=function(t){var e,n,r,o,a=/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i,i=[];if(!a.test(t))return null;if(t==="::")return[0,0,0,0,0,0,0,0];for(t.startsWith("::")?t=t.replace("::","Z:"):t=t.replace("::",":Z:"),t.indexOf(".")>0?(t=t.replace(new RegExp("[.]","g"),":"),e=t.split(":"),e[e.length-4]=ei(e[e.length-4])+ei(e[e.length-3])*256,e[e.length-3]=ei(e[e.length-2])+ei(e[e.length-1])*256,e=e.slice(0,e.length-2)):e=t.split(":"),r=0,o=0,n=0;n<e.length;n++)if(typeof e[n]=="string")if(e[n]==="Z"){for(o=0;o<8-e.length+1;o++)i[n+o]=0;r=o-1}else i[n+r]=$i(parseInt(e[n],16));else i[n+r]=e[n];return[i[1]<<16|i[0],i[3]<<16|i[2],i[5]<<16|i[4],i[7]<<16|i[6]]},ni={address_map:{id:1,addrs:{},names:{}},lookup_name:function(t){var e=Za(t);if(e!==null||(e=ti(t),e!==null))return t;var n;if(ni.address_map.addrs[t])n=ni.address_map.addrs[t];else{var r=ni.address_map.id++;H(r<65535,"exceeded max address mappings of 65535"),n="172.29."+(r&255)+"."+(r&65280),ni.address_map.names[n]=t,ni.address_map.addrs[t]=n}return n},lookup_addr:function(t){return ni.address_map.names[t]?ni.address_map.names[t]:null}},ri=function(t){var e=Li(20),n=ua(t);_()[e>>2]=n;var r=Li(4);_()[r>>2]=0,_()[e+4>>2]=r;var o=2;p()[e+8>>2]=o,p()[e+12>>2]=4;var a=Li(12);return _()[a>>2]=a+8,_()[a+4>>2]=0,p()[a+8>>2]=Za(ni.lookup_name(t)),_()[e+16>>2]=a,e};function oi(e){return T?Pa(24,1,e):ri(Qt(e))}function ai(e){return e}var ii=function(t,n){for(var e=0,r=0;r<=n;e+=t[r++]);return e},li=[31,29,31,30,31,30,31,31,30,31,30,31],si=[31,28,31,30,31,30,31,31,30,31,30,31],ui=function(t,n){for(var e=new Date(t.getTime());n>0;){var r=ta(e.getFullYear()),o=e.getMonth(),a=(r?li:si)[o];if(n>a-e.getDate())n-=a-e.getDate()+1,e.setDate(1),o<11?e.setMonth(o+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1));else return e.setDate(e.getDate()+n),e}return e},ci=function(t,n){H(t.length>=0,"writeArrayToMemory array must have a length (should be an array or typed array)"),i().set(t,n)},di=function(t,n,r,o){var e=p()[o+40>>2],a={tm_sec:p()[o>>2],tm_min:p()[o+4>>2],tm_hour:p()[o+8>>2],tm_mday:p()[o+12>>2],tm_mon:p()[o+16>>2],tm_year:p()[o+20>>2],tm_wday:p()[o+24>>2],tm_yday:p()[o+28>>2],tm_isdst:p()[o+32>>2],tm_gmtoff:p()[o+36>>2],tm_zone:e?Qt(e):""},i=Qt(r),l={"%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 s in l)i=i.replace(new RegExp(s,"g"),l[s]);var u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(e,t,n){for(var r=typeof e=="number"?e.toString():e||"";r.length<t;)r=n[0]+r;return r}function m(e,t){return d(e,t,"0")}function _(e,t){function n(e){return e<0?-1:e>0?1:0}var r;return(r=n(e.getFullYear()-t.getFullYear()))===0&&(r=n(e.getMonth()-t.getMonth()))===0&&(r=n(e.getDate()-t.getDate())),r}function f(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function g(e){var t=ui(new Date(e.tm_year+1900,0,1),e.tm_yday),n=new Date(t.getFullYear(),0,4),r=new Date(t.getFullYear()+1,0,4),o=f(n),a=f(r);return _(o,t)<=0?_(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var h={"%a":function(t){return u[t.tm_wday].substring(0,3)},"%A":function(t){return u[t.tm_wday]},"%b":function(t){return c[t.tm_mon].substring(0,3)},"%B":function(t){return c[t.tm_mon]},"%C":function(t){var e=t.tm_year+1900;return m(e/100|0,2)},"%d":function(t){return m(t.tm_mday,2)},"%e":function(t){return d(t.tm_mday,2," ")},"%g":function(t){return g(t).toString().substring(2)},"%G":function(t){return g(t)},"%H":function(t){return m(t.tm_hour,2)},"%I":function(t){var e=t.tm_hour;return e==0?e=12:e>12&&(e-=12),m(e,2)},"%j":function(t){return m(t.tm_mday+ii(ta(t.tm_year+1900)?li:si,t.tm_mon-1),3)},"%m":function(t){return m(t.tm_mon+1,2)},"%M":function(t){return m(t.tm_min,2)},"%n":function(){return"\n"},"%p":function(t){return t.tm_hour>=0&&t.tm_hour<12?"AM":"PM"},"%S":function(t){return m(t.tm_sec,2)},"%t":function(){return" "},"%u":function(t){return t.tm_wday||7},"%U":function(t){var e=t.tm_yday+7-t.tm_wday;return m(Math.floor(e/7),2)},"%V":function(t){var e=Math.floor((t.tm_yday+7-(t.tm_wday+6)%7)/7);if((t.tm_wday+371-t.tm_yday-2)%7<=2&&e++,e){if(e==53){var r=(t.tm_wday+371-t.tm_yday)%7;r!=4&&(r!=3||!ta(t.tm_year))&&(e=1)}}else{e=52;var n=(t.tm_wday+7-t.tm_yday-1)%7;(n==4||n==5&&ta(t.tm_year%400-1))&&e++}return m(e,2)},"%w":function(t){return t.tm_wday},"%W":function(t){var e=t.tm_yday+7-(t.tm_wday+6)%7;return m(Math.floor(e/7),2)},"%y":function(t){return(t.tm_year+1900).toString().substring(2)},"%Y":function(t){return t.tm_year+1900},"%z":function(t){var e=t.tm_gmtoff,n=e>=0;return e=Math.abs(e)/60,e=e/60*100+e%60,(n?"+":"-")+("0000"+e).slice(-4)},"%Z":function(t){return t.tm_zone},"%%":function(){return"%"}};i=i.replace(/%%/g,"\0\0");for(var s in h)i.includes(s)&&(i=i.replace(new RegExp(s,"g"),h[s](a)));i=i.replace(/\0\0/g,"%");var y=$t(i,!1);return y.length>n?0:(ci(y,t),y.length-1)},mi=function(t,n,r,o,a){return di(t,n,r,o)};nn.init();var pi=function(t,n,r,o){t||(t=this),this.parent=t,this.mount=t.mount,this.mounted=null,this.id=Kt.nextInode++,this.name=n,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=o},_i=365,fi=146;Object.defineProperties(pi.prototype,{read:{get:function(){return(this.mode&_i)===_i},set:function(t){t?this.mode|=_i:this.mode&=~_i}},write:{get:function(){return(this.mode&fi)===fi},set:function(t){t?this.mode|=fi:this.mode&=~fi}},isFolder:{get:function(){return Kt.isDir(this.mode)}},isDevice:{get:function(){return Kt.isChrdev(this.mode)}}}),Kt.FSNode=pi,Kt.createPreloadedFile=Wt,Kt.staticInit(),Gt={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},Kn(),er=h.BindingError=(function(e){function t(t){var n;return n=e.call(this,t)||this,n.name="BindingError",n}return babelHelpers.inheritsLoose(t,e),t})(babelHelpers.wrapNativeSuper(Error)),nr=h.InternalError=(function(e){function t(t){var n;return n=e.call(this,t)||this,n.name="InternalError",n}return babelHelpers.inheritsLoose(t,e),t})(babelHelpers.wrapNativeSuper(Error)),Fr(),kr(),eo(),ao=h.UnboundTypeError=oo(Error,"UnboundTypeError"),fo(),bo(),h.requestFullscreen=function(t,n){Ra.requestFullscreen(t,n)},h.requestFullScreen=function(){Ra.requestFullScreen()},h.requestAnimationFrame=function(t){Ra.requestAnimationFrame(t)},h.setCanvasSize=function(t,n,r){Ra.setCanvasSize(t,n,r)},h.pauseMainLoop=function(){Ra.mainLoop.pause()},h.resumeMainLoop=function(){Ra.mainLoop.resume()},h.getUserMedia=function(){Ra.getUserMedia()},h.createContext=function(t,n,r,o){return Ra.createContext(t,n,r,o)};var gi={},hi={},yi=[null,Yt,an,Pn,Mn,An,Fn,Bn,Wn,qn,Un,Vn,Hn,Gn,zn,la,sa,Va,Ha,Ga,ja,Ka,Qa,Ya,oi];function Ci(){We("fetchSettings")}var bi={__assert_fail:_n,__cxa_begin_catch:hn,__cxa_end_catch:Cn,__cxa_find_matching_catch_2:Rn,__cxa_find_matching_catch_3:Ln,__cxa_find_matching_catch_4:En,__cxa_get_exception_ptr:kn,__cxa_rethrow:In,__cxa_throw:Tn,__cxa_uncaught_exceptions:Dn,__emscripten_init_main_thread_js:xn,__emscripten_thread_cleanup:$n,__pthread_create_js:Nn,__resumeException:vn,__syscall_chdir:Mn,__syscall_fcntl64:An,__syscall_fstat64:Fn,__syscall_getdents64:Bn,__syscall_ioctl:Wn,__syscall_lstat64:qn,__syscall_mkdirat:Un,__syscall_newfstatat:Vn,__syscall_openat:Hn,__syscall_stat64:Gn,__syscall_unlinkat:zn,_embind_register_bigint:sr,_embind_register_bool:cr,_embind_register_class:so,_embind_register_class_constructor:po,_embind_register_class_function:_o,_embind_register_emval:So,_embind_register_float:Lo,_embind_register_function:Eo,_embind_register_integer:ko,_embind_register_memory_view:Io,_embind_register_std_string:To,_embind_register_std_wstring:Ao,_embind_register_void:Fo,_emscripten_get_now_is_monotonic:Bo,_emscripten_notify_mailbox_postmessage:Ho,_emscripten_set_offscreencanvas_size:Go,_emscripten_thread_mailbox_await:Uo,_emscripten_thread_set_strongref:zo,_emscripten_throw_longjmp:jo,_emval_decref:yo,_emval_incref:Ko,_emval_take_value:Xo,_gmtime_js:ea,_localtime_js:aa,_mktime_js:ia,_mmap_js:la,_munmap_js:sa,_tzset_js:ca,abort:da,call_init_capture_driver_js_sync:rt,call_init_playback_driver_js_sync:it,call_sendto:nt,call_start_capture_js_sync:ot,call_start_desktop_capture_js_sync:ct,call_start_playback_js_sync:lt,call_start_video_capture_js_sync:mt,call_stop_capture_js_sync:at,call_stop_desktop_capture_js_sync:dt,call_stop_playback_js_sync:st,call_stop_video_capture_js_sync:pt,emscripten_asm_const_double:fa,emscripten_asm_const_int:ga,emscripten_async_call:La,emscripten_check_blocking_allowed:Ea,emscripten_console_error:ka,emscripten_date_now:Ia,emscripten_exit_with_live_runtime:Ta,emscripten_get_heap_max:xa,emscripten_get_now:va,emscripten_num_logical_cores:$a,emscripten_receive_on_main_thread_js:Ma,emscripten_resize_heap:Aa,emscripten_runtime_keepalive_pop:Fa,emscripten_runtime_keepalive_push:Oa,environ_get:Va,environ_sizes_get:Ha,exit:Zt,fd_close:Ga,fd_pread:ja,fd_read:Ka,fd_seek:Qa,fd_write:Ya,get_bwe_ml_model_path_js:Ye,get_persistent_directory_path_js:Xe,get_random_bytes_js:Je,getentropy:Ja,gethostbyname:oi,invoke_d:vu,invoke_diii:ku,invoke_fii:rs,invoke_fiii:Eu,invoke_fiiiiii:ou,invoke_i:dl,invoke_ii:pl,invoke_iid:hu,invoke_iidi:Su,invoke_iidii:uu,invoke_iidjjjidjjjdjjji:jl,invoke_iidjjjii:ts,invoke_iidjjjiii:Ql,invoke_iiffiii:as,invoke_iiffiiiii:os,invoke_iifi:Gs,invoke_iii:_l,invoke_iiid:Cu,invoke_iiifi:Us,invoke_iiii:gl,invoke_iiiidd:pu,invoke_iiiifiii:cs,invoke_iiiifiiiiii:ps,invoke_iiiii:bl,invoke_iiiiid:Ru,invoke_iiiiii:kl,invoke_iiiiiii:hl,invoke_iiiiiiii:Ll,invoke_iiiiiiiii:vl,invoke_iiiiiiiiii:Rl,invoke_iiiiiiiiiiffiii:is,invoke_iiiiiiiiiii:Al,invoke_iiiiiiiiiiii:ms,invoke_iiiiiiiiiiiiffiii:us,invoke_iiiiiiiiiiiii:_s,invoke_iiiiiiiiiiiiii:$l,invoke_iiiiiiiiiiiiiiffiiiii:ds,invoke_iiiiiiiiiiiiiii:Ds,invoke_iiiiiiiiiiiiiiiffiiiii:ls,invoke_iiiiiiiiiiiiiiiiiffiiiii:ss,invoke_iiiiiiiiiiiiiiiiii:Pl,invoke_iiiiiiiiiiji:Wl,invoke_iiiiiiiiij:Es,invoke_iiiiiiiij:Ss,invoke_iiiiiiij:ys,invoke_iiiiiiijjii:Fs,invoke_iiiiiij:Rs,invoke_iiiiiijiiii:ks,invoke_iiiiiijjijiiiiiiiiii:Bs,invoke_iiiiij:au,invoke_iiiiijjii:Zl,invoke_iiiiijjiii:es,invoke_iiiiijjjii:Yl,invoke_iiiiijjjiii:Jl,invoke_iiiij:bs,invoke_iiiijiii:lu,invoke_iiiijiiji:Gl,invoke_iiiijjii:ns,invoke_iiiijjiii:Xl,invoke_iiij:Cs,invoke_iiijddddddd:eu,invoke_iiiji:Bl,invoke_iiijii:Fl,invoke_iiijiiji:Hl,invoke_iiijji:Vl,invoke_iiijjiiii:Qs,invoke_iij:ws,invoke_iiji:Is,invoke_iijii:Ls,invoke_iijiii:ru,invoke_iijijijiji:gu,invoke_iijj:Ys,invoke_iijjjiiii:js,invoke_iijjjj:zs,invoke_iijjjji:Zs,invoke_ij:su,invoke_iji:_u,invoke_j:Nl,invoke_ji:fs,invoke_jii:Os,invoke_jiii:Sl,invoke_jiiii:Lu,invoke_jiiiiiiii:vs,invoke_jiiiiiji:Ts,invoke_jiij:Js,invoke_jij:Ws,invoke_v:fl,invoke_vd:bu,invoke_vi:yl,invoke_vid:fu,invoke_viddjjii:Ks,invoke_vif:gs,invoke_vii:ml,invoke_viid:iu,invoke_viif:Tu,invoke_viii:cl,invoke_viiii:Cl,invoke_viiiii:El,invoke_viiiiii:xl,invoke_viiiiiidiii:Ul,invoke_viiiiiii:Dl,invoke_viiiiiiiddiii:Ol,invoke_viiiiiiii:Tl,invoke_viiiiiiiii:Il,invoke_viiiiiiiiii:ql,invoke_viiiiiiiiiiii:hs,invoke_viiiiiiiiiiiii:du,invoke_viiiiiiiiiiiiiii:Iu,invoke_viiiiiiiiiiiiiiiiiiiiiiiiiiiiiii:tu,invoke_viiiiiiij:cu,invoke_viiiiij:Vs,invoke_viiiiiji:yu,invoke_viiiij:Hs,invoke_viiij:xs,invoke_viiiji:zl,invoke_viij:As,invoke_viiji:$s,invoke_viijii:Ps,invoke_viijiiii:Ms,invoke_viijj:mu,invoke_viijjdiii:Kl,invoke_vij:Ns,invoke_viji:nu,invoke_vijiiiii:Ml,invoke_vijj:qs,invoke_vijji:Xs,invoke_vjiiiiii:wl,is_participant_known_contact_js:Ze,llvm_eh_typeid_for:ai,loggingCallback_js_sync:_t,memory:B||h.wasmMemory,on_call_event_js_sync:je,patch_abort_for_ml_inference:Qe,query_browser_audio_processing_status_js_sync:ut,renderVideoFrame_js:et,sendSignalingXMPP_js_sync:tt,set_ml_inference_flag:Ke,strftime_l:mi},vi=Oe(),Si=De("__wasm_call_ctors"),Ri=De("__cxa_free_exception"),Li=h._malloc=De("malloc"),Ei=h._free=De("free"),ki=h._wasm_throw_ml_abort=De("wasm_throw_ml_abort"),Ii=h._fflush=De("fflush"),Ti=De("__errno_location"),Di=De("ntohs"),xi=De("htonl"),$i=De("htons"),Pi=h._pthread_self=function(){return(Pi=h._pthread_self=W.pthread_self)()},Ni=h.__emscripten_tls_init=De("_emscripten_tls_init"),Mi=De("emscripten_builtin_memalign"),wi=De("__getTypeName"),Ai=h.__embind_initialize_bindings=De("_embind_initialize_bindings"),Fi=h.__emscripten_thread_init=De("_emscripten_thread_init"),Oi=h.__emscripten_thread_crashed=De("_emscripten_thread_crashed"),Bi=De("emscripten_main_thread_process_queued_calls"),Wi=De("emscripten_main_runtime_thread_id"),qi=De("_emscripten_run_in_main_runtime_thread_js"),Ui=De("emscripten_dispatch_to_thread_"),Vi=function(){return(Vi=W.emscripten_stack_get_base)()},Hi=function(){return(Hi=W.emscripten_stack_get_end)()},Gi=De("_emscripten_thread_free_data"),zi=h.__emscripten_thread_exit=De("_emscripten_thread_exit"),ji=h.__emscripten_check_mailbox=De("_emscripten_check_mailbox"),Ki=De("setThrew"),Qi=De("setTempRet0"),Xi=function(){return(Xi=W.emscripten_stack_init)()},Yi=function(t,n){return(Yi=W.emscripten_stack_set_limits)(t,n)},Ji=function(){return(Ji=W.emscripten_stack_get_free)()},Zi=De("stackSave"),el=De("stackRestore"),tl=De("stackAlloc"),nl=function(){return(nl=W.emscripten_stack_get_current)()},rl=De("__cxa_decrement_exception_refcount"),ol=De("__cxa_increment_exception_refcount"),al=h.___get_exception_message=De("__get_exception_message"),il=De("__cxa_can_catch"),ll=De("__cxa_is_pointer_type"),sl=h.___start_em_js=1282364,ul=h.___stop_em_js=1287659;function cl(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function dl(e){var t=Zi();try{return cn(e)()}catch(e){if(el(t),!(e instanceof xe))throw e;Ki(1,0)}}function ml(e,t,n){var r=Zi();try{cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function pl(e,t){var n=Zi();try{return cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;Ki(1,0)}}function _l(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function fl(e){var t=Zi();try{cn(e)()}catch(e){if(el(t),!(e instanceof xe))throw e;Ki(1,0)}}function gl(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function hl(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function yl(e,t){var n=Zi();try{cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;Ki(1,0)}}function Cl(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function bl(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function vl(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Sl(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Rl(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function Ll(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function El(e,t,n,r,o,a){var i=Zi();try{cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function kl(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Il(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function Tl(e,t,n,r,o,a,i,l,s){var u=Zi();try{cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Dl(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function xl(e,t,n,r,o,a,i){var l=Zi();try{cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function $l(e,t,n,r,o,a,i,l,s,u,c,d,m,p){var _=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p)}catch(e){if(el(_),!(e instanceof xe))throw e;Ki(1,0)}}function Pl(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h){var y=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h)}catch(e){if(el(y),!(e instanceof xe))throw e;Ki(1,0)}}function Nl(e){var t=Zi();try{return cn(e)()}catch(e){if(el(t),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Ml(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function wl(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function Al(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Fl(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Ol(e,t,n,r,o,a,i,l,s,u,c,d,m){var p=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m)}catch(e){if(el(p),!(e instanceof xe))throw e;Ki(1,0)}}function Bl(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Wl(e,t,n,r,o,a,i,l,s,u,c,d){var m=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d)}catch(e){if(el(m),!(e instanceof xe))throw e;Ki(1,0)}}function ql(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Ul(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Vl(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Hl(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function Gl(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function zl(e,t,n,r,o,a){var i=Zi();try{cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function jl(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f){var g=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f)}catch(e){if(el(g),!(e instanceof xe))throw e;Ki(1,0)}}function Kl(e,t,n,r,o,a,i,l,s){var u=Zi();try{cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Ql(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Xl(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Yl(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function Jl(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Zl(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function es(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function ts(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function ns(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function rs(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function os(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function as(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function is(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_){var f=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_)}catch(e){if(el(f),!(e instanceof xe))throw e;Ki(1,0)}}function ls(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v){var S=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v)}catch(e){if(el(S),!(e instanceof xe))throw e;Ki(1,0)}}function ss(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v,S,R){var L=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v,S,R)}catch(e){if(el(L),!(e instanceof xe))throw e;Ki(1,0)}}function us(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g){var h=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g)}catch(e){if(el(h),!(e instanceof xe))throw e;Ki(1,0)}}function cs(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function ds(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b){var v=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b)}catch(e){if(el(v),!(e instanceof xe))throw e;Ki(1,0)}}function ms(e,t,n,r,o,a,i,l,s,u,c,d){var m=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d)}catch(e){if(el(m),!(e instanceof xe))throw e;Ki(1,0)}}function ps(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function _s(e,t,n,r,o,a,i,l,s,u,c,d,m){var p=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m)}catch(e){if(el(p),!(e instanceof xe))throw e;Ki(1,0)}}function fs(e,t){var n=Zi();try{return cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function gs(e,t,n){var r=Zi();try{cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function hs(e,t,n,r,o,a,i,l,s,u,c,d,m){var p=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m)}catch(e){if(el(p),!(e instanceof xe))throw e;Ki(1,0)}}function ys(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function Cs(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function bs(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function vs(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Ss(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Rs(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function Ls(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Es(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function ks(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Is(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Ts(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Ds(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_){var f=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_)}catch(e){if(el(f),!(e instanceof xe))throw e;Ki(1,0)}}function xs(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function $s(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Ps(e,t,n,r,o,a){var i=Zi();try{cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Ns(e,t,n){var r=Zi();try{cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function Ms(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function ws(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function As(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Fs(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function Os(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Bs(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C){var b=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C)}catch(e){if(el(b),!(e instanceof xe))throw e;Ki(1,0)}}function Ws(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function qs(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Us(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Vs(e,t,n,r,o,a,i){var l=Zi();try{cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function Hs(e,t,n,r,o,a){var i=Zi();try{cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Gs(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function zs(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function js(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Ks(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function Qs(e,t,n,r,o,a,i,l,s){var u=Zi();try{return cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function Xs(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function Ys(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Js(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Zs(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function eu(e,t,n,r,o,a,i,l,s,u,c){var d=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u,c)}catch(e){if(el(d),!(e instanceof xe))throw e;Ki(1,0)}}function tu(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v,S,R,L,E,k,I,T,D,x,$){var P=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f,g,h,y,C,b,v,S,R,L,E,k,I,T,D,x,$)}catch(e){if(el(P),!(e instanceof xe))throw e;Ki(1,0)}}function nu(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function ru(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function ou(e,t,n,r,o,a,i){var l=Zi();try{return cn(e)(t,n,r,o,a,i)}catch(e){if(el(l),!(e instanceof xe))throw e;Ki(1,0)}}function au(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function iu(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function lu(e,t,n,r,o,a,i,l){var s=Zi();try{return cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function su(e,t){var n=Zi();try{return cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;Ki(1,0)}}function uu(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function cu(e,t,n,r,o,a,i,l,s){var u=Zi();try{cn(e)(t,n,r,o,a,i,l,s)}catch(e){if(el(u),!(e instanceof xe))throw e;Ki(1,0)}}function du(e,t,n,r,o,a,i,l,s,u,c,d,m,p){var _=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p)}catch(e){if(el(_),!(e instanceof xe))throw e;Ki(1,0)}}function mu(e,t,n,r,o){var a=Zi();try{cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;Ki(1,0)}}function pu(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function _u(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function fu(e,t,n){var r=Zi();try{cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function gu(e,t,n,r,o,a,i,l,s,u){var c=Zi();try{return cn(e)(t,n,r,o,a,i,l,s,u)}catch(e){if(el(c),!(e instanceof xe))throw e;Ki(1,0)}}function hu(e,t,n){var r=Zi();try{return cn(e)(t,n)}catch(e){if(el(r),!(e instanceof xe))throw e;Ki(1,0)}}function yu(e,t,n,r,o,a,i,l){var s=Zi();try{cn(e)(t,n,r,o,a,i,l)}catch(e){if(el(s),!(e instanceof xe))throw e;Ki(1,0)}}function Cu(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function bu(e,t){var n=Zi();try{cn(e)(t)}catch(e){if(el(n),!(e instanceof xe))throw e;Ki(1,0)}}function vu(e){var t=Zi();try{return cn(e)()}catch(e){if(el(t),!(e instanceof xe))throw e;Ki(1,0)}}function Su(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Ru(e,t,n,r,o,a){var i=Zi();try{return cn(e)(t,n,r,o,a)}catch(e){if(el(i),!(e instanceof xe))throw e;Ki(1,0)}}function Lu(e,t,n,r,o){var a=Zi();try{return cn(e)(t,n,r,o)}catch(e){if(el(a),!(e instanceof xe))throw e;return Ki(1,0),BigInt(0)}}function Eu(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function ku(e,t,n,r){var o=Zi();try{return cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}function Iu(e,t,n,r,o,a,i,l,s,u,c,d,m,p,_,f){var g=Zi();try{cn(e)(t,n,r,o,a,i,l,s,u,c,d,m,p,_,f)}catch(e){if(el(g),!(e instanceof xe))throw e;Ki(1,0)}}function Tu(e,t,n,r){var o=Zi();try{cn(e)(t,n,r)}catch(e){if(el(o),!(e instanceof xe))throw e;Ki(1,0)}}h.keepRuntimeAlive=de,h.wasmMemory=B,h.GROWABLE_HEAP_U8=l,h.GROWABLE_HEAP_F32=f,h.ExitStatus=ft,h.FS=Kt,h.PThread=nn,h.registeredTypes=Jn;var Du=["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","inetNtop4","inetNtop6","readSockaddr","writeSockaddr","getCallstack","emscriptenLog","convertPCtoSourceLocation","runMainThreadEmAsm","jstoi_s","listenOnce","autoResumeAudioContext","getDynCaller","dynCall","setWasmTableEntry","asmjsMangle","getNativeTypeSize","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","getCFunc","ccall","cwrap","uleb128Encode","sigToWasmTypes","generateFuncType","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","reallyNegative","unSign","strLen","reSign","formatString","intArrayToString","AsciiToString","stringToUTF8OnStack","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","findCanvasEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","battery","registerBatteryEventCallback","setCanvasElementSizeCallingThread","setCanvasElementSizeMainThread","setCanvasElementSize","getCanvasSizeCallingThread","getCanvasSizeMainThread","getCanvasElementSize","jsStackTrace","stackTrace","checkWasiClock","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","createDyncallWrapper","setImmediateWrapped","clearImmediateWrapped","polyfillSetImmediate","getPromise","makePromise","idsToPromises","makePromiseCallback","getSocketFromFD","getSocketAddress","_setNetworkCallback","heapObjectForWebGLType","heapAccessShiftForWebGLHeap","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","__glGenObject","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","emscripten_webgl_destroy_context_before_on_calling_thread","registerWebGlEventCallback","runAndAbortIfError","SDL_unicode","SDL_ttfContext","SDL_audio","GLFW_Window","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","registerInheritedInstance","unregisterInheritedInstance","enumReadValueFromPointer","validateThis","getStringOrSymbol","craftEmvalAllocator","emval_get_global","emval_lookupTypes","emval_allocateDestructors","emval_addMethodCaller"];Du.forEach(Ve);var xu=["run","addOnPreRun","addOnInit","addOnPreMain","addOnExit","addOnPostRun","addRunDependency","removeRunDependency","FS_createFolder","FS_createPath","FS_createDataFile","FS_createLazyFile","FS_createLink","FS_createDevice","FS_unlink","out","err","callMain","abort","wasmTable","wasmExports","stackAlloc","stackSave","stackRestore","getTempRet0","setTempRet0","GROWABLE_HEAP_I8","GROWABLE_HEAP_I16","GROWABLE_HEAP_U16","GROWABLE_HEAP_I32","GROWABLE_HEAP_U32","GROWABLE_HEAP_F64","writeStackCookie","checkStackCookie","MAX_INT53","MIN_INT53","bigintToI53Checked","ptrToString","zeroMemory","exitJS","getHeapMax","growMemory","ENV","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","isLeapYear","ydayFromDate","arraySum","addDays","ERRNO_CODES","ERRNO_MESSAGES","setErrNo","inetPton4","inetPton6","DNS","getHostByName","Protocols","Sockets","initRandomFill","randomFill","timers","warnOnce","UNWIND_CACHE","readEmAsmArgsArray","readEmAsmArgs","runEmAsmFunction","jstoi_q","getExecutableName","getWasmTableEntry","handleException","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","safeSetTimeout","asyncLoad","alignMemory","mmapAlloc","handleAllocatorInit","HandleAllocator","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","intArrayFromString","stringToAscii","UTF16Decoder","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","stringToNewUTF8","writeArrayToMemory","JSEvents","specialHTMLTargets","currentFullscreenStrategy","restoreOldWindowedStyle","demangle","demangleAll","getEnvStrings","doReadv","doWritev","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","ExceptionInfo","findMatchingCatch","getExceptionMessageCommon","incrementExceptionRefcount","decrementExceptionRefcount","getExceptionMessage","Browser","setMainLoop","wget","SYSCALLS","preloadPlugins","FS_createPreloadedFile","FS_modeStringToFlags","FS_getMode","FS_stdin_getChar_buffer","FS_stdin_getChar","MEMFS","TTY","PIPEFS","SOCKFS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","emscripten_webgl_power_preferences","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","GLFW","allocateUTF8","allocateUTF8OnStack","terminateWorker","killThread","cleanupThread","registerTLSInit","cancelThread","spawnThread","exitOnMainThread","proxyToMainThread","emscripten_receive_on_main_thread_js_callArgs","invokeEntryPoint","checkMailbox","InternalError","BindingError","throwInternalError","throwBindingError","awaitingDependencies","typeDependencies","tupleRegistrations","structRegistrations","sharedRegisterType","whenDependentTypesAreResolved","embind_charCodes","embind_init_charCodes","readLatin1String","getTypeName","heap32VectorToArray","requireRegisteredType","UnboundTypeError","PureVirtualError","init_embind","throwUnboundTypeError","ensureOverloadTable","exposePublicSymbol","replacePublicSymbol","extendError","createNamedFunction","embindRepr","registeredInstances","getBasestPointer","getInheritedInstance","getInheritedInstanceCount","getLiveInheritedInstances","registeredPointers","registerType","getShiftFromSize","integerReadValueFromPointer","floatReadValueFromPointer","simpleReadValueFromPointer","runDestructors","craftInvokerFunction","embind__requireFunction","genericPointerToWireType","constNoSmartPtrRawPointerToWireType","nonConstNoSmartPtrRawPointerToWireType","init_RegisteredPointer","RegisteredPointer","RegisteredPointer_getPointee","RegisteredPointer_destructor","RegisteredPointer_deleteObject","RegisteredPointer_fromWireType","runDestructor","releaseClassHandle","finalizationRegistry","detachFinalizer_deps","detachFinalizer","attachFinalizer","makeClassHandle","init_ClassHandle","ClassHandle","ClassHandle_isAliasOf","throwInstanceAlreadyDeleted","ClassHandle_clone","ClassHandle_delete","deletionQueue","ClassHandle_isDeleted","ClassHandle_deleteLater","flushPendingDeletes","delayFunction","setDelayFunction","RegisteredClass","shallowCopyInternalPointer","downcastPointer","upcastPointer","char_0","char_9","makeLegalFunctionName","emval_handles","emval_symbols","init_emval","count_emval_handles","Emval","emval_newers","emval_methodCallers","emval_registeredMethods","IDBFS"];xu.forEach(He);var $u;be=function e(){$u||Nu(),$u||(be=e)};function Pu(){H(!T),Xi(),oe()}function Nu(){if(ye>0)return;if(T||Pu(),T){y(h),pe(),startWorker(h);return}if(me(),ye>0)return;function e(){$u||($u=!0,h.calledRun=!0,!U&&(pe(),y(h),h.onRuntimeInitialized&&h.onRuntimeInitialized(),H(!h._main,'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'),_e()))}h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},1),e()},1)):e(),ae()}function Mu(){var e=w,t=A,n=!1;w=A=function(t){n=!0};try{Ii(0),["stdout","stderr"].forEach(function(e){var t=Kt.analyzePath("/dev/"+e);if(t){var r=t.object,o=r.rdev,a=Nt.ttys[o];a&&a.output&&a.output.length&&(n=!0)}})}catch(e){}w=e,A=t,n&&pn("stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the Emscripten FAQ), or make sure to emit a newline when you printf etc.")}if(h.preInit)for(typeof h.preInit=="function"&&(h.preInit=[h.preInit]);h.preInit.length>0;)h.preInit.pop()();return Nu(),r.ready}})();typeof l=="object"&&typeof i=="object"?i.exports=d:typeof define=="function"&&define.amd&&define([],function(){return d})}),34);
|
|
244
|
+
__d("WorkerBanzaiLazyQueueChannelWorker",["BanzaiLazyQueue","WorkerFuncChannel"],(function(t,n,r,o,a,i,l){"use strict";function e(e){var t=o("WorkerFuncChannel").importChannel({queuePost:null},e,"banzai_lazyqueue_channel");r("BanzaiLazyQueue").onQueue.add(function(){s(t)}),s(t)}function s(e){r("BanzaiLazyQueue").flushQueue().forEach(function(t){e.queuePost.apply(e,t)})}l.init=e}),98);
|
|
245
|
+
__d("WorkerSelf",["WorkerBanzaiLazyQueueChannelWorker","WorkerFuncChannel","WorkerQPLChannel"],(function(t,n,r,o,a,i,l){"use strict";function e(e){o("WorkerFuncChannel").activateChannels(e,"worker","client"),o("WorkerBanzaiLazyQueueChannelWorker").init(e),o("WorkerQPLChannel").setMessagePort(e)}l.init=e}),98);
|
|
246
|
+
__d("RequireDeferredFactoryEvent",["$InternalEnum"],(function(t,n,r,o,a,i){var e=n("$InternalEnum")({SUPPORT_DATA:"sd",CSS:"css"}),l=e;i.default=l}),66);
|
|
247
|
+
__d("ifRequired",[],(function(t,n,r,o,a,i){function e(e,t,n){var r,a;if((r=o)==null||r.call(null,[e],function(e){a=e}),a&&t)return t(a);if(!a&&n)return n()}i.default=e}),66);
|
|
248
|
+
__d("ifRequireable",["ifRequired"],(function(t,n,r,o,a,i,l){function e(e,t,n){return r("ifRequired").call(null,e,t,n)}l.default=e}),98);
|
|
249
|
+
__d("requireWeak",[],(function(t,n,r,o,a,i){function e(e,t){var n;(n=o)==null||n.call(null,[e],t)}i.default=e}),66);
|
|
250
|
+
__d("RequireDeferredReference",["CallbackDependencyManager","Promise","RequireDeferredFactoryEvent","ifRequireable","ifRequired","performanceNow","promiseDone","requireWeak"],(function(t,n,r,o,a,i,l){"use strict";var e,s,u=1,c=2,d=16,m=u|c|d,p=null;function _(){return p==null&&(p=new(r("CallbackDependencyManager"))),p}function f(e,t){return e+":"+t}var g=new Set,h=(function(){function t(e){this.$1=e}var o=t.prototype;return o.setRequireDeferredForDisplay=function(t){this.$2=t},o.isRequireDeferredForDisplay=function(){return this.$2},o.getModuleId=function(){var e=this.$1;return e},o.getModuleIdAsRef=function(){return this.$1},o.preload=function(){},o.getModuleIfRequired=function(){return r("ifRequired").call(null,this.$1,function(e){return e})},o.getModuleIfRequireable=function(){return r("ifRequireable").call(null,this.$1,function(e){return e})},o.isAvailableInSSR_DO_NOT_USE=function(){return!0},o.$3=function(t){var e=this,n=r("ifRequireable")("InteractionTracingMetrics",function(t){return t.currentInteractionLogger().addRequireDeferred(e.getModuleId(),(s||(s=r("performanceNow")))())}),o=!1,a=function(a,i){n==null||n((s||(s=r("performanceNow")))(),i),o||t(a)};return r("ifRequireable").call(null,this.$1,function(e){return a(e,!0)},function(){r("requireWeak").call(null,e.$1,function(e){return a(e,!1)})}),{remove:function(){o=!0}}},o.load=function(){var t=this;return new(e||(e=n("Promise")))(function(e){return t.$3(e)})},o.__setRef=function(t){return this},o.onReadyImmediately=function(t){return this.$3(t)},o.onReady=function(o){var t=!1,a=this.$3(function(a){r("promiseDone")((e||(e=n("Promise"))).resolve().then(function(){t||o(a)}))});return{remove:function(){t=!0,a.remove()}}},o.loadImmediately=function(t){return this.$3(t)},t.getRDModuleName_DO_NOT_USE=function(t){return"rd:"+t},t.unblock=function(o,a){var e=_(),i=function(i){g.has(i)||(g.add(i),e.registerCallback(function(){define(t.getRDModuleName_DO_NOT_USE(i),[i],function(){n.call(null,i)},m)},Array.from(r("RequireDeferredFactoryEvent").members(),function(e){return f(i,e)}))),e.satisfyPersistentDependency(f(i,a))};for(var l of o)i(l)},t})();l.default=h}),98);
|
|
251
|
+
__d("RDRequireDeferredReference",["RequireDeferredReference"],(function(t,n,r,o,a,i,l){"use strict";var e=(function(e){function t(){return e.apply(this,arguments)||this}babelHelpers.inheritsLoose(t,e),t.disableForSSR_DO_NOT_USE=function(){this.$RDRequireDeferredReference$p_1=!1};var n=t.prototype;return n.isAvailableInSSR_DO_NOT_USE=function(){return this.constructor.$RDRequireDeferredReference$p_1},t})(r("RequireDeferredReference"));e.$RDRequireDeferredReference$p_1=!0,l.default=e}),98);
|
|
252
|
+
__d("requireDeferred",["RDRequireDeferredReference"],(function(t,n,r,o,a,i,l){"use strict";var e={};function s(t,n){e[t]=n}function u(t){return e[t]}function c(e){var t=u(e);if(t)return t;var n=new(r("RDRequireDeferredReference"))(e);return n.setRequireDeferredForDisplay(!1),s(e,n),n}l.default=c}),98);
|
|
253
|
+
__d("WAWebVoipWebWasmWorker",["WABinary","WACryptoHkdfSync","WACryptoSha256HmacBuilder","WAWebBweModelHashes","WAWebIDBFSStorageBackend","WAWebVoipBrowserAudioStatus","WAWebVoipContactLookupSyncBridge","WAWebVoipJsWorkerMessageHandler","WAWebVoipPersistentFS","WAWebVoipWebWasmLoader.worker","WorkerMessagePort","WorkerSelf","asyncToGeneratorRuntime","getErrorSafe","nullthrows","requireDeferred"],(function(t,n,r,o,a,i,l){"use strict";var e=r("requireDeferred")("WAWebVoipWebWasmLoader_ProdLab_internal.worker").__setRef("WAWebVoipWebWasmWorker"),s=r("requireDeferred")("WAWebVoipWebWasmLoader_ProdLabvideo_internal.worker").__setRef("WAWebVoipWebWasmWorker");function u(e){return c.apply(this,arguments)}function c(){return c=n("asyncToGeneratorRuntime").asyncToGenerator(function*(t){var n=t==="prod-lab"?e:t==="prod-labvideo"?s:null;return n!=null?n.load():r("WAWebVoipWebWasmLoader.worker")}),c.apply(this,arguments)}var d=new(o("WorkerMessagePort")).WorkerSyncedMessagePort(self,"VoipWebWasmWorker");o("WorkerSelf").init(d),self.WhatsAppVoipWasmWorkerCompatibleCallbacks={onSignalingXmpp:function(t){var e=t.callId,n=t.peerJid,r=t.xmlPayload;d.postMessage({type:"waWasmWorkerCompatibleCallback",__name:"onSignalingXmpp",peerJid:n,callId:e,xmlPayload:r})},onCallEvent:function(t){var e=t.eventDataJson,n=t.eventType,r=t.userData;d.postMessage({type:"waWasmWorkerCompatibleCallback",__name:"onCallEvent",eventType:n,userData:r,eventDataJson:e})},sendDataToRelay:function(t){var e=t.data,n=t.ip,r=t.len,a=t.port;try{var i=o("WAWebVoipJsWorkerMessageHandler").trySendDirectOnTransferredChannel(n,a,e);if(i)return}catch(e){}d.postMessage({type:"waWasmWorkerCompatibleCallback",__name:"sendDataToRelay",data:e,len:r,ip:n,port:a})},loggingCallback:function(t){d.postMessage(babelHelpers.extends({type:"waWasmWorkerCompatibleCallback",__name:"loggingCallback"},t))},initCaptureDriverJS:function(t){d.postMessage(babelHelpers.extends({type:"waWasmWorkerCompatibleCallback",__name:"initCaptureDriverJS"},t))},startCaptureJS:function(){d.postMessage({type:"waWasmWorkerCompatibleCallback",__name:"startCaptureJS"})},stopCaptureJS:function(){d.postMessage({type:"waWasmWorkerCompatibleCallback",__name:"stopCaptureJS"})},initPlaybackDriverJS:function(t){d.postMessage(babelHelpers.extends({type:"waWasmWorkerCompatibleCallback",__name:"initPlaybackDriverJS"},t))},startPlaybackJS:function(){d.postMessage({type:"waWasmWorkerCompatibleCallback",__name:"startPlaybackJS"})},stopPlaybackJS:function(){d.postMessage({type:"waWasmWorkerCompatibleCallback",__name:"stopPlaybackJS"})},startVideoCaptureJS:function(t){d.postMessage(babelHelpers.extends({type:"waWasmWorkerCompatibleCallback",__name:"startVideoCaptureJS"},t))},stopVideoCaptureJS:function(){d.postMessage({type:"waWasmWorkerCompatibleCallback",__name:"stopVideoCaptureJS"})},onVideoFrameWasmToJs:function(t){var e=t.format,n=t.frameBuffer,r=t.height,o=t.isKeyFrame,a=t.orientation,i=t.timestamp,l=t.userJid,s=t.width;d.postMessage({type:"waWasmWorkerCompatibleCallback",__name:"onVideoFrameWasmToJs",userJid:l,frameBuffer:n,width:s,height:r,orientation:a,format:e,timestamp:i,isKeyFrame:o},[n])},startDesktopCaptureJS:function(t){d.postMessage(babelHelpers.extends({type:"waWasmWorkerCompatibleCallback",__name:"startDesktopCaptureJS"},t))},stopDesktopCaptureJS:function(){d.postMessage({type:"waWasmWorkerCompatibleCallback",__name:"stopDesktopCaptureJS"})},dataChannelStateCallback:function(t){d.postMessage(babelHelpers.extends({type:"waWasmWorkerCompatibleCallback",__name:"dataChannelStateCallback"},t))},cryptoHkdfExtractWithSaltAndExpand:function(t){var e=t.info_,n=t.key_,r=t.length,a=t.salt_,i=new Uint8Array(n),l=a?new Uint8Array(a):void 0,s=o("WABinary").Binary.build(e).readByteArrayView();return o("WACryptoHkdfSync").hkdf(i,l,s,r)},hmacSha256KeyGenerator:function(t){var e=t.data_,n=t.key_,r=new Uint8Array(e),a=new Uint8Array(n);return new(o("WACryptoSha256HmacBuilder")).Sha256HMacBuilder(a).update(r).finish()},isParticipantKnownContact:function(t){return o("WAWebVoipContactLookupSyncBridge").resolveParticipantKnownContactSync(t.jid,function(e){d.postMessage(e)},void 0,void 0,function(e){var t=e.jid,n=e.outcome,r=e.timeoutMs,o=3,a=n;n==="timed-out"&&(o=2,a="timed out after "+String(r)+"ms"),self.WhatsAppVoipWasmWorkerCompatibleCallbacks.loggingCallback({level:o,message:"voip: [Worker] isParticipantKnownContact(sync): "+t+" "+a})})},getBrowserAudioProcessingStatus:function(){var e=o("WAWebVoipBrowserAudioStatus").getBrowserAudioProcessingApplied();return e!=null?(e.echoCancellation?1:0)+(e.noiseSuppression?2:0)+(e.autoGainControl?4:0):7},getPersistentDirectoryPath:function(){return o("WAWebVoipPersistentFS").getVoipPersistentDirectoryPath()},getBweModelPath:function(t){var e=t.versionName,n=o("WAWebBweModelHashes").getBweModelVersion(e);return n==null?null:o("WAWebIDBFSStorageBackend").ML_MODEL_PERSIST_DIR+"/"+o("WAWebBweModelHashes").BWE_MODEL_NAME+"_"+n},videoFrameConsumed:function(){d.postMessage({type:"waWasmWorkerCompatibleCallback",__name:"videoFrameConsumed"})}},o("WAWebVoipBrowserAudioStatus").preDetectBrowserAudioCapabilities();var m={},p=!1;function _(e,t){if(!e)throw"Assertion failed: "+t}function f(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.slice().join(" ")}function g(){for(var e,t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var a=r.slice().join(" ");postMessage({cmd:"alert",text:a,threadId:(e=(t=m)._pthread_self)==null?void 0:e.call(t)})}var h=f;self.alert=g;var y;m.instantiateWasm=function(e,t){var n=r("nullthrows")(m.wasmModule);m.wasmModule=null;var o=new WebAssembly.Instance(n,e);return t(o)},self.onunhandledrejection=function(e){var t;throw(t=e.reason)!=null?t:e};function C(e){try{if(typeof e=="object"&&e!=null&&"excPtr"in e&&typeof e.excPtr=="number"){var t=m.getExceptionMessage;if(t!=null){var n=t(e.excPtr),r=n[0],o=n[1];self.WhatsAppVoipWasmWorkerCompatibleCallbacks.loggingCallback({level:1,message:"voip: [WASM Crash - WORKER] Native C++ exception: "+r+": "+o})}}else e instanceof WebAssembly.RuntimeError&&self.WhatsAppVoipWasmWorkerCompatibleCallbacks.loggingCallback({level:1,message:"voip: [WASM Crash - WORKER] WebAssembly.RuntimeError: "+String(e.message)});e!=null&&typeof e=="object"&&"stack"in e&&self.WhatsAppVoipWasmWorkerCompatibleCallbacks.loggingCallback({level:1,message:"voip: [WASM Crash - WORKER] JavaScript stack trace: "+String(e.stack)})}catch(e){h("Failed to log native stack trace: "+String(e))}}function b(e){try{if(e.cmd==="load"){var t=e.handlers,a=e.wasmMemory,i=e.wasmModule,l=e.wasmVariant,s=e.workerID,c=[],f=function(t){c.push(t)};d.removeMessageListener("cmd",b),d.addMessageListener("cmd",f);var g=!1,v=!1,S=function(){if(g&&v){d.postMessage({type:"cmd",cmd:"loaded"});for(var e of c)b(e);d.removeMessageListener("cmd",f),d.addMessageListener("cmd",b)}};self.startWorker=function(e){m=e,g=!0,S()},m.wasmModule=i;var R=function(t){m[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];d.postMessage({type:"cmd",cmd:"callHandler",callHandler:{handler:t,args:n}})}};for(var L of t)R(L);m.wasmMemory=a,m.buffer=m.wasmMemory.buffer,m.workerID=s,m.ENVIRONMENT_IS_PTHREAD=!0,m.onAbort=function(e){h("[VoIP WASM] onAbort: "+String(e))},u(l).then(function(e){return e(m)}).then((function(){var e=n("asyncToGeneratorRuntime").asyncToGenerator(function*(e){y=e,v=!0,S()});return function(t){return e.apply(this,arguments)}})())}else if(e.cmd==="run"){var E,k,I,T,D,x,$,P,N=e.pthread_ptr;if((E=(k=m).__emscripten_thread_init)==null||E.call(k,N,0,0,1),(I=(T=m).__emscripten_thread_mailbox_await)==null||I.call(T,N),_(!!N,"pthread_ptr is required in event "+e.cmd),(D=(x=m).establishStackSpace)==null||D.call(x),($=m.PThread)==null||$.receiveObjectTransfer(e),(P=m.PThread)==null||P.threadInitTLS(),!p){var M,w;(M=(w=m).__embind_initialize_bindings)==null||M.call(w),p=!0}try{var A,F;(A=(F=m).invokeEntryPoint)==null||A.call(F,e.start_routine,e.arg)}catch(e){if(e!=="unwind")throw e}}else if(e.cmd==="cancel"){var O,B;if((O=(B=m)._pthread_self)!=null&&O.call(B)){var W,q;(W=(q=m).__emscripten_thread_exit)==null||W.call(q,-1)}}else if(e.target!=="setimmediate")if(e.cmd==="checkMailbox"){if(p){var U,V;(U=(V=m).checkMailbox)==null||U.call(V)}}else e.cmd==="jsWorkerCmd"?o("WAWebVoipJsWorkerMessageHandler").handleJsWorkerMessage(y,e):e.cmd&&(h("worker.js received unknown command "+e.cmd),h(e))}catch(e){var H=r("getErrorSafe")(e);if(h("worker.js onmessage() captured an uncaught exception: "+String(e)),H.stack&&h(H.stack),C(e),m.__emscripten_thread_crashed){var G,z;(G=(z=m).__emscripten_thread_crashed)==null||G.call(z)}if(e instanceof WebAssembly.RuntimeError)h("[VoIP WASM] RuntimeError suppressed: "+e.message);else throw e}}d.addMessageListener("cmd",b),d.addMessageListener("jsWorkerCmd",function(e){try{o("WAWebVoipJsWorkerMessageHandler").handleJsWorkerMessage(y,e)}catch(e){throw h("worker.js jsWorkerCmd handler captured an uncaught exception: "+String(e)),e!=null&&typeof e=="object"&&"stack"in e&&h(String(e.stack)),C(e),e}});function v(){}l.default=v}),98);
|
|
254
|
+
__d("MetaConfigMap",[],(function(t,n,r,o,a,i){"use strict";var e={},l={add:function(n,r){for(var t in n)r&&r.entry++,t in e?r&&r.dup_entry++:e[t]=n[t]},get:function(n){return e[n]}},s=l;i.default=s}),66);
|
|
255
|
+
__d("ix",["invariant"],(function(t,n,r,o,a,i,l,s){var e={},u=new Set;function c(t){var n=e[t];return n||s(0,11798,t),n}c.add=function(t,n){var r=!1;for(var o in t)n&&n.entry++,o in e?n&&n.dup_entry++:(t[o].loggingID=o,e[o]=t[o])},c.getUsedPaths_ONLY_FOR_REACT_FLIGHT=function(){return t.__flight_execution_mode_DO_NOT_USE==="flight"||s(0,34547),Array.from(u)},c.getAllPaths=function(){var t=new Set;return Object.values(e).map(function(e){if((e==null?void 0:e.sprited)===0)return e.uri;if((e==null?void 0:e.sprited)===1)return e._spi;if((e==null?void 0:e.sprited)===2)return e.spi}).forEach(function(e){return e!=null&&t.add(e)}),t},l.default=c}),98);
|
|
256
|
+
__d("qex",["invariant","BanzaiLazyQueue"],(function(t,n,r,o,a,i,l,s){"use strict";var e={},u={},c={_:function(n){var t=e[n];t!=null||s(0,11799,n);var r=t.l,a=t.r;return r!=null&&!u[n]&&(u[n]=!0,o("BanzaiLazyQueue").queuePost("qex",{l:r})),a},add:function(n,r){for(var t in n)r&&r.entry++,t in e?r&&r.dup_entry++:e[t]=n[t]}},d=c;l.default=d}),98);
|
|
257
|
+
__d("HasteSupportData",["ix","MetaConfigMap","QPLHasteSupportDataStorage","bx","getFalcoLogPolicy_DO_NOT_USE","gkx","justknobx","qex"],(function(t,n,r,o,a,i,l,s){"use strict";function e(e,t){var n=e.bxData,o=e.clpData,a=e.gkxData,i=e.ixData,l=e.justknobxData,u=e.metaconfigData,c=e.qexData,d=e.qplData;n!=null&&r("bx").add(n,t),o!=null&&r("getFalcoLogPolicy_DO_NOT_USE").add(o,t),a!=null&&r("gkx").add(a,t),i!=null&&s.add(i,t),u!=null&&r("MetaConfigMap").add(u,t),c!=null&&r("qex").add(c,t),d!=null&&r("QPLHasteSupportDataStorage").add(d,t),l!=null&&r("justknobx").add(l,t)}l.handle=e}),98);
|
|
258
|
+
__d("BitMap",[],(function(t,n,r,o,a,i){var e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_",l=(function(){function e(){this.$1=[],this.$2=null}var t=e.prototype;return t.set=function(t){return this.$2!=null&&!this.$1[t]&&(this.$2=null),this.$1[t]=1,this},t.toString=function(){for(var e=[],t=0;t<this.$1.length;t++)e.push(this.$1[t]?1:0);return e.length?u(e.join("")):""},t.toCompressedString=function(){if(this.$1.length===0)return"";if(this.$2!=null)return this.$2;for(var e=[],t=1,n=this.$1[0]||0,r=n.toString(2),o=1;o<this.$1.length;o++){var a=this.$1[o]||0;a===n?t++:(e.push(s(t)),n=a,t=1)}return t&&e.push(s(t)),this.$2=u(r+e.join(""))},e})();function s(e){var t=e.toString(2),n="0".repeat(t.length-1);return n+t}function u(t){for(var n=(t+"00000").match(/[01]{6}/g),r="",o=0;n!=null&&o<n.length;o++)r+=e[parseInt(n[o],2)];return r}i.default=l}),66);
|
|
259
|
+
__d("ge",[],(function(t,n,r,o,a,i){function e(e,t,n){return typeof e!="string"?e:t?l(e,t,n):document.getElementById(e)}function l(e,t,n){var r,o,a;if(s(t)==e)return t;if(t.getElementsByTagName){for(o=t.getElementsByTagName(n||"*"),a=0;a<o.length;a++)if(s(o[a])==e)return o[a]}else for(o=t.childNodes,a=0;a<o.length;a++)if(r=l(e,o[a]),r)return r;return null}function s(e){return e.getAttribute?e.getAttribute("id"):null}i.default=e}),66);
|
|
260
|
+
__d("memoize",["invariant"],(function(t,n,r,o,a,i,l,s){function e(e){var t=e,n;return function(){return!arguments.length||s(0,4494),t&&(n=t(),t=null),n}}l.default=e}),98);
|
|
261
|
+
__d("replaceTransportMarkers",["BanzaiLazyQueue","ge","memoize"],(function(t,n,r,o,a,i,l){var e=new Set;function s(t,a,i){var l=i!==void 0?a[i]:a,u;if(Array.isArray(l))for(u=0;u<l.length;u++)s(t,l,u);else if(l&&typeof l=="object")if(l.__m)l.__lazy?a[i]=r("memoize")(n.bind(null,l.__m)):a[i]=n.call(null,l.__m);else if(l.__jsr)a[i]=new(n.call(null,"JSResourceReferenceImpl"))(l.__jsr).__setRef("replaceTransportMarkers");else if(l.__dr)a[i]=new(n.call(null,"RequireDeferredReference"))(l.__dr).__setRef("replaceTransportMarkers");else if(l.__rc)l.__rc[0]===null?a[i]=null:a[i]=n.call(null,l.__rc[0]),l.__rc[1]&&(e.has(l.__rc[1])||(e.add(l.__rc[1]),o("BanzaiLazyQueue").queuePost("require_cond_exposure_logging",{identifier:l.__rc[1]})));else if(l.__e)a[i]=r("ge")(l.__e);else if(l.__rel)a[i]=t.relativeTo;else if(l.__bigPipeContext)a[i]=t.bigPipeContext;else if(l.__bbox)a[i]=l.__bbox;else{for(var c in l)s(t,l,c);if(l.__map)a[i]=new Map(l.__map);else if(l.__set)a[i]=new Set(l.__set);else if(l.__imm){var d=l.__imm,m=d.method,p=d.value;a[i]=n.call(null,"immutable")[m](p)}}}l.default=s}),98);
|
|
262
|
+
__d("ServerJSDefine",["BitMap","replaceTransportMarkers"],(function(t,n,r,o,a,i,l){var e=2,s=8,u=new(r("BitMap")),c={getLoadedModuleHash:function(){return u.toCompressedString()},getModuleNameAndHash:function(t){var e=t.split("@");return{hash:e[1],name:e[0]}},handleDefine:function(n,o,a,i,l){i>=0&&u.set(i),define(n,o,function(t,o,s,u,c){var e={data:a};if(r("replaceTransportMarkers")({relativeTo:l},e),i===-42){var d=a!=null&&typeof a=="object"&&a.__throw8367__,m=new Error(n+": "+(typeof d=="string"?d:""));throw m.stack,m}c.exports=e.data},e|s)},handleDefines:function(t,n){t.forEach(function(e){var t;n!=null?t=[].concat(e,[n]):t=[].concat(e,[null]),c.handleDefine.apply(null,t)})}},d=c;l.default=d}),98);
|
|
263
|
+
__d("WorkerBootstrap",["HasteSupportData","ServerJSDefine"],(function(t,n,r,o,a,i,l){"use strict";function e(e){Object.keys(e).forEach(function(t){r("ServerJSDefine").handleDefine(t,[],e[t],-1,null)})}function s(t,r){var i,l;t.hsdp&&o("HasteSupportData").handle(t.hsdp);var s=(i=(l=t.jsmods)!=null?l:t.dynamicModules)!=null?i:{};e(s);var u=n.call(null,r);if(t.rds!=null&&t.rds.length>0&&a.call(null,t.rds,function(){}),typeof u=="function"||u!==null)try{for(var c=arguments.length,d=new Array(c>2?c-2:0),m=2;m<c;m++)d[m-2]=arguments[m];u.apply(void 0,d)}catch(e){}}function u(e){var t=e;if(typeof t=="function"||t!==null)try{t()}catch(e){}}l.initDynamicModules=e,l.start=s,l.startServerJS=u}),98);
|
|
264
|
+
__d("clearTimeoutBlue",[],(function(t,n,r,o,a,i){var e=t.__fbNativeClearTimeout||t.clearTimeout;function l(t){e(t)}i.default=l}),66);
|
|
265
|
+
__d("clearTimeoutWWW",["cr:806696"],(function(t,n,r,o,a,i,l){"use strict";l.default=n("cr:806696")}),98);
|
|
266
|
+
__d("clearTimeoutWWWOrMobile",["cr:7386"],(function(t,n,r,o,a,i,l){l.default=n("cr:7386")}),98);
|
|
267
|
+
__d("setTimeoutAcrossTransitionsBlue",["TimeSlice"],(function(t,n,r,o,a,i,l){var e=t.__fbNativeSetTimeout||t.setTimeout;function s(n,o){for(var a=r("TimeSlice").guard(n,"setTimeout",{propagationType:r("TimeSlice").PropagationType.CONTINUATION,registerCallStack:!0}),i=arguments.length,l=new Array(i>2?i-2:0),s=2;s<i;s++)l[s-2]=arguments[s];return Function.prototype.apply.call(e,t,[a,o].concat(l))}l.default=s}),98);
|
|
268
|
+
__d("setTimeoutAcrossTransitionsWWW",["cr:986633"],(function(t,n,r,o,a,i,l){l.default=n("cr:986633")}),98);
|
|
269
|
+
__d("setTimeoutAcrossTransitions",["cr:7391"],(function(t,n,r,o,a,i,l){l.default=n("cr:7391")}),98);
|
|
270
|
+
__d("setTimeoutBlue",["TimeSlice","TimerStorage","setTimeoutAcrossTransitions"],(function(t,n,r,o,a,i,l){function e(e,t){var n,o=function(){r("TimerStorage").unset(r("TimerStorage").TIMEOUT,n);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];Function.prototype.apply.call(e,this,o)};r("TimeSlice").copyGuardForWrapper(e,o);for(var a=arguments.length,i=new Array(a>2?a-2:0),l=2;l<a;l++)i[l-2]=arguments[l];return n=r("setTimeoutAcrossTransitions").apply(void 0,[o,t].concat(i)),r("TimerStorage").set(r("TimerStorage").TIMEOUT,n),n}l.default=e}),98);
|
|
271
|
+
__d("setTimeoutWWW",["cr:807042"],(function(t,n,r,o,a,i,l){l.default=n("cr:807042")}),98);
|
|
272
|
+
__d("setTimeoutWWWOrMobile",["cr:7390"],(function(t,n,r,o,a,i,l){l.default=n("cr:7390")}),98);
|
|
273
|
+
function StartBundle(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=require.call(null,"WorkerBootstrap")).start.apply(t,[e,"WAWebVoipWebWasmWorker"].concat(r))}
|