scanbot-web-sdk 6.0.0-dev.2 → 6.0.0-dev.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.
Files changed (152) hide show
  1. package/@types/consume-type.d.ts +2 -1
  2. package/@types/core/bridge/common.d.ts +1 -1
  3. package/@types/core/bridge/compiled/BarcodeConfigs.d.ts +231 -231
  4. package/@types/core/bridge/compiled/BarcodeScannerTypes.d.ts +13 -11
  5. package/@types/core/bridge/compiled/CreditCardTypes.d.ts +82 -0
  6. package/@types/core/bridge/compiled/DocumentDetectorTypes.d.ts +52 -44
  7. package/@types/core/bridge/compiled/DocumentQualityAnalyzerTypes.d.ts +17 -17
  8. package/@types/core/bridge/compiled/FrameAccumulationTypes.d.ts +41 -0
  9. package/@types/core/bridge/compiled/GDRTypes.d.ts +38 -0
  10. package/@types/core/bridge/compiled/GenericDocument.d.ts +40 -12
  11. package/@types/core/bridge/compiled/GenericDocumentRecognizerConfigs.d.ts +182 -0
  12. package/@types/core/bridge/compiled/GenericDocumentRecognizerTypes.d.ts +7 -28
  13. package/@types/core/bridge/compiled/GenericDocumentTypes.d.ts +38 -0
  14. package/@types/core/bridge/compiled/ImageProcessorTypes.d.ts +5 -5
  15. package/@types/core/bridge/compiled/MedicalCertificateTypes.d.ts +2 -2
  16. package/@types/core/bridge/compiled/ParametricFilters.d.ts +9 -5
  17. package/@types/core/bridge/compiled/TiffTypes.d.ts +6 -5
  18. package/@types/core/bridge/worker-bridge.d.ts +604 -40
  19. package/@types/core/worker/ScanbotSDK.Core.d.ts +29 -18
  20. package/@types/core-types.d.ts +4 -1
  21. package/@types/cropping-view.d.ts +1 -1
  22. package/@types/document-scanner-view.d.ts +4 -2
  23. package/@types/index.d.ts +40 -4
  24. package/@types/model/barcode/barcode-result.d.ts +12 -2
  25. package/@types/model/barcode/barcode.d.ts +2 -1
  26. package/@types/model/camera-info.d.ts +3 -2
  27. package/@types/model/configuration/barcode-scanner-configuration.d.ts +7 -4
  28. package/@types/model/configuration/cropping-view-configuration.d.ts +5 -0
  29. package/@types/model/configuration/document-scanner-configuration.d.ts +4 -10
  30. package/@types/model/configuration/generic-document-recognizer-configuration.d.ts +1 -1
  31. package/@types/model/configuration/initialization-options.d.ts +8 -0
  32. package/@types/model/configuration/mrz-scanner-configuration.d.ts +1 -1
  33. package/@types/model/configuration/scanner-configuration.d.ts +7 -0
  34. package/@types/model/configuration/selection-overlay-configuration.d.ts +2 -2
  35. package/@types/model/configuration/view-finder-scanner-configuration.d.ts +1 -1
  36. package/@types/model/error/media-error.d.ts +1 -0
  37. package/@types/scanbot-sdk.d.ts +360 -54
  38. package/@types/service/document-quality-analyzer.d.ts +1 -1
  39. package/@types/service/generic-document-recognizer.d.ts +3 -1
  40. package/@types/service/simple-mrz-recognizer.d.ts +3 -1
  41. package/@types/service/text-data-recognizer.d.ts +3 -1
  42. package/@types/service/tiff-generator.d.ts +1 -1
  43. package/@types/ui2/common.d.ts +8 -0
  44. package/@types/ui2/configuration/ActionBarConfiguration.d.ts +30 -30
  45. package/@types/ui2/configuration/ArTrackingOverlayConfiguration.d.ts +220 -220
  46. package/@types/ui2/configuration/BarcodeInfoMapping.d.ts +51 -51
  47. package/@types/ui2/configuration/BarcodeItemMapper.d.ts +2 -2
  48. package/@types/ui2/configuration/BarcodeRecognizerConfiguration.d.ts +34 -34
  49. package/@types/ui2/configuration/BarcodeScannerConfiguration.d.ts +168 -168
  50. package/@types/ui2/configuration/BarcodeScannerTypes.d.ts +1 -6
  51. package/@types/ui2/configuration/BarcodeScannerUIResult.d.ts +29 -0
  52. package/@types/ui2/configuration/BarcodeTextLocalization.d.ts +124 -69
  53. package/@types/ui2/configuration/BarcodeTypes.d.ts +1 -1
  54. package/@types/ui2/configuration/BarcodeUseCase.d.ts +4 -3
  55. package/@types/ui2/configuration/CameraConfiguration.d.ts +32 -32
  56. package/@types/ui2/configuration/CameraPermission.d.ts +33 -33
  57. package/@types/ui2/configuration/Common.d.ts +190 -190
  58. package/@types/ui2/configuration/CommonFieldType.d.ts +1 -0
  59. package/@types/ui2/configuration/FindAndPickScanningModeUseCase.d.ts +364 -12
  60. package/@types/ui2/configuration/GenericDocument.d.ts +1 -0
  61. package/@types/ui2/configuration/MultipleScanningModeUseCase.d.ts +488 -488
  62. package/@types/ui2/configuration/ScanbotAlertDialog.d.ts +27 -27
  63. package/@types/ui2/configuration/SingleScanningModeUseCase.d.ts +169 -169
  64. package/@types/ui2/configuration/TopBarConfiguration.d.ts +36 -36
  65. package/@types/ui2/configuration/UserGuidanceConfiguration.d.ts +16 -16
  66. package/@types/ui2/configuration/ViewFinderConfiguration.d.ts +45 -45
  67. package/@types/ui2/configuration.d.ts +2 -1
  68. package/@types/ui2/controllers/barcode-scanner-controller.d.ts +2 -2
  69. package/@types/ui2/controllers/multiple-scanning-mode-controller.d.ts +4 -2
  70. package/@types/ui2/controllers/single-scanning-mode-controller.d.ts +4 -2
  71. package/@types/ui2/model/counted-barcodes.d.ts +17 -20
  72. package/@types/ui2/scanbot-sdk-ui.d.ts +2 -2
  73. package/@types/ui2/scanbot-ui-library.d.ts +3 -2
  74. package/@types/ui2/utils/barcode-mapper/expected-barcode-mapper.d.ts +13 -0
  75. package/@types/ui2/utils/barcode-mapper/i-barcode-mapper.d.ts +17 -0
  76. package/@types/ui2/utils/{barcode-mapper.d.ts → barcode-mapper/user-barcode-mapper.d.ts} +4 -16
  77. package/@types/ui2/utils/find-and-pick.ts/expected-barcode-counter.d.ts +7 -0
  78. package/@types/ui2/utils/styled-badge.d.ts +1 -1
  79. package/@types/ui2/views/ar/ar-badge.d.ts +18 -0
  80. package/@types/ui2/views/ar/ar-overlay-barcode-info.d.ts +5 -1
  81. package/@types/ui2/views/ar/vertical-positions.d.ts +12 -0
  82. package/@types/ui2/views/barcode-info/barcode-info.d.ts +3 -1
  83. package/@types/ui2/views/barcode-scanner.d.ts +5 -5
  84. package/@types/ui2/views/dialog/base/confirmation-dialog.d.ts +20 -0
  85. package/@types/ui2/views/dialog/count-edit-dialog.d.ts +3 -3
  86. package/@types/ui2/views/dialog/find-and-pick-submit-dialog.d.ts +10 -0
  87. package/@types/ui2/views/drawer/barcode-result-drawer.d.ts +1 -1
  88. package/@types/ui2/views/drawer/barcode-result-sidebar.d.ts +10 -0
  89. package/@types/ui2/views/drawer/counting-button.d.ts +1 -1
  90. package/@types/ui2/views/drawer/subviews/barcode-drawer-empty-state.d.ts +1 -1
  91. package/@types/ui2/views/drawer/subviews/barcode-list-item.d.ts +4 -4
  92. package/@types/ui2/views/drawer/subviews/barcode-list.d.ts +8 -1
  93. package/@types/ui2/views/drawer/subviews/drawer-header-content.d.ts +1 -1
  94. package/@types/utils/barcode-utils.d.ts +10 -0
  95. package/@types/utils/browser-cameras.d.ts +92 -0
  96. package/@types/utils/dto/Polygon.d.ts +2 -1
  97. package/@types/utils/stats.d.ts +4 -0
  98. package/@types/utils/video-stream.d.ts +3 -3
  99. package/@types/utils/video-to-image-data/two-d-video-to-image-data.d.ts +8 -0
  100. package/@types/utils/video-to-image-data/video-to-image-data.d.ts +5 -0
  101. package/@types/utils/video-to-image-data/webgl-video-to-image-data.d.ts +21 -0
  102. package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +1 -0
  103. package/@types/view/scanbot-camera-view.d.ts +9 -3
  104. package/@types/worker/worker-bridge.d.ts +607 -44
  105. package/bundle/ScanbotSDK.min.js +5 -5
  106. package/bundle/ScanbotSDK.ui2.min.js +16 -16
  107. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  108. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  109. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  110. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  111. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  112. package/bundle/bin/barcode-scanner/ScanbotSDK.Core-simd.js +1 -1
  113. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
  114. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.js +1 -1
  115. package/bundle/bin/complete/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  116. package/bundle/bin/complete/ScanbotSDK.Asm-simd.wasm +0 -0
  117. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  118. package/bundle/bin/complete/ScanbotSDK.Core-simd-threads.js +1 -1
  119. package/bundle/bin/complete/ScanbotSDK.Core-simd.js +1 -1
  120. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
  121. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.js +1 -1
  122. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd-threads.wasm +0 -0
  123. package/bundle/bin/document-scanner/ScanbotSDK.Asm-simd.wasm +0 -0
  124. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  125. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd-threads.js +1 -1
  126. package/bundle/bin/document-scanner/ScanbotSDK.Core-simd.js +1 -1
  127. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
  128. package/package.json +2 -2
  129. package/@types/core/bridge/compiled_schemas_v3/BarcodeConfigs.d.ts +0 -973
  130. package/@types/core/bridge/compiled_schemas_v3/BarcodeScannerTypes.d.ts +0 -183
  131. package/@types/core/bridge/compiled_schemas_v3/BarcodeTypes.d.ts +0 -183
  132. package/@types/core/bridge/compiled_schemas_v3/CheckRecognizerTypes.d.ts +0 -29
  133. package/@types/core/bridge/compiled_schemas_v3/CommonFieldType.d.ts +0 -59
  134. package/@types/core/bridge/compiled_schemas_v3/DocumentDetectorTypes.d.ts +0 -196
  135. package/@types/core/bridge/compiled_schemas_v3/DocumentQualityAnalyzerTypes.d.ts +0 -105
  136. package/@types/core/bridge/compiled_schemas_v3/EhicTypes.d.ts +0 -218
  137. package/@types/core/bridge/compiled_schemas_v3/FrameUtilities.d.ts +0 -18
  138. package/@types/core/bridge/compiled_schemas_v3/GenericDocument.d.ts +0 -198
  139. package/@types/core/bridge/compiled_schemas_v3/GenericDocumentRecognizerTypes.d.ts +0 -104
  140. package/@types/core/bridge/compiled_schemas_v3/GenericTextLineScannerTypes.d.ts +0 -165
  141. package/@types/core/bridge/compiled_schemas_v3/Geometry.d.ts +0 -49
  142. package/@types/core/bridge/compiled_schemas_v3/ImageProcessorTypes.d.ts +0 -13
  143. package/@types/core/bridge/compiled_schemas_v3/LicensePlateScannerTypes.d.ts +0 -67
  144. package/@types/core/bridge/compiled_schemas_v3/MRZTypes.d.ts +0 -52
  145. package/@types/core/bridge/compiled_schemas_v3/MedicalCertificateTypes.d.ts +0 -306
  146. package/@types/core/bridge/compiled_schemas_v3/OcrElements.d.ts +0 -129
  147. package/@types/core/bridge/compiled_schemas_v3/ParametricFilters.d.ts +0 -186
  148. package/@types/core/bridge/compiled_schemas_v3/PdfConfig.d.ts +0 -197
  149. package/@types/core/bridge/compiled_schemas_v3/TiffTypes.d.ts +0 -183
  150. package/@types/ui2/configuration/BarcodeItem.d.ts +0 -6
  151. package/@types/ui2/configuration/utils.d.ts +0 -6
  152. /package/@types/ui2/views/dialog/{styled-dialog.d.ts → base/styled-dialog.d.ts} +0 -0
@@ -1 +1 @@
1
- var initModule=(()=>{var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(t={}){function e(){return T.buffer!=S.buffer&&I(),S}function n(){return T.buffer!=S.buffer&&I(),F}function o(){return T.buffer!=S.buffer&&I(),A}function a(){return T.buffer!=S.buffer&&I(),D}function i(){return T.buffer!=S.buffer&&I(),M}function s(){return T.buffer!=S.buffer&&I(),W}function u(){return T.buffer!=S.buffer&&I(),O}var c,l,f=t;f.ready=new Promise(((r,t)=>{c=r,l=t}));var d,h,p,m=Object.assign({},f),v="./this.program",y=(r,t)=>{throw t},w=f.ENVIRONMENT_IS_PTHREAD||!1,g="";function _(r){return f.locateFile?f.locateFile(r,g):g+r}g=self.location.href,r&&(g=r),g=0!==g.indexOf("blob:")?g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1):"",d=r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText},p=r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},h=(r,t,e)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):e()},n.onerror=e,n.send(null)};var b,E=f.print||console.log.bind(console),k=f.printErr||console.error.bind(console);Object.assign(f,m),m=null,f.arguments&&f.arguments,f.thisProgram&&(v=f.thisProgram),f.quit&&(y=f.quit),f.wasmBinary&&(b=f.wasmBinary);var T,C,$=f.noExitRuntime||!0;"object"!=typeof WebAssembly&&Z("no native wasm support detected");var P,S,F,A,D,M,W,j,O,x=!1;function R(r,t){r||Z(t)}function I(){var r=T.buffer;f.HEAP8=S=new Int8Array(r),f.HEAP16=A=new Int16Array(r),f.HEAPU8=F=new Uint8Array(r),f.HEAPU16=D=new Uint16Array(r),f.HEAP32=M=new Int32Array(r),f.HEAPU32=W=new Uint32Array(r),f.HEAPF32=j=new Float32Array(r),f.HEAPF64=O=new Float64Array(r)}var N,z=f.INITIAL_MEMORY||134217728;if(R(z>=4194304,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+z+"! (STACK_SIZE=4194304)"),w)T=f.wasmMemory;else if(f.wasmMemory)T=f.wasmMemory;else if(!((T=new WebAssembly.Memory({initial:z/65536,maximum:32768,shared:!0})).buffer instanceof SharedArrayBuffer))throw k("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"),Error("bad memory");I(),z=T.buffer.byteLength;var U=[],H=[],L=[],B=0;function V(){return $||B>0}function Y(){!0,w||(f.noFSInit||Cr.init.initialized||Cr.init(),Cr.ignorePermissions=!1,_r.init(),Mr(H))}function q(r){U.unshift(r)}var X=0,G=null,K=null;function Q(r){X++,f.monitorRunDependencies&&f.monitorRunDependencies(X)}function J(r){if(X--,f.monitorRunDependencies&&f.monitorRunDependencies(X),0==X&&(null!==G&&(clearInterval(G),G=null),K)){var t=K;K=null,t()}}function Z(r){f.onAbort&&f.onAbort(r),k(r="Aborted("+r+")"),x=!0,P=1,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw l(t),t}var rr,tr,er;function nr(r){return r.startsWith("data:application/octet-stream;base64,")}function or(r){if(r==rr&&b)return new Uint8Array(b);if(p)return p(r);throw"both async and sync fetching of the wasm failed"}function ar(r,t,e){return function(r){return b||"function"!=typeof fetch?Promise.resolve().then((()=>or(r))):fetch(r,{credentials:"same-origin"}).then((t=>{if(!t.ok)throw"failed to load wasm binary file at '"+r+"'";return t.arrayBuffer()})).catch((()=>or(r)))}(r).then((r=>WebAssembly.instantiate(r,t))).then((r=>r)).then(e,(r=>{k(`failed to asynchronously prepare wasm: ${r}`),Z(r)}))}nr(rr="ScanbotSDK.Asm-simd-threads.wasm")||(rr=_(rr));var ir={8928580:r=>nn(function(){return this[$r(r)].toString()}.apply((0,eval)("(()=>this)()")))};function sr(r){this.name="ExitStatus",this.message=`Program terminated with exit(${r})`,this.status=r}var ur=r=>{r.terminate(),r.onmessage=r=>{}},cr=r=>{var t=Dr.pthreads[r];R(t),Dr.returnWorkerToPool(t)},lr=r=>{var t=Dr.getNewWorker();if(!t)return 6;Dr.runningWorkers.push(t),Dr.pthreads[r.pthread_ptr]=t,t.pthread_ptr=r.pthread_ptr;var e={cmd:"run",start_routine:r.startRoutine,arg:r.arg,pthread_ptr:r.pthread_ptr};return t.postMessage(e,r.transferList),0},fr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,t)=>{for(var e=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e;e--)r.unshift("..");return r},normalize:r=>{var t=fr.isAbs(r),e="/"===r.substr(-1);return(r=fr.normalizeArray(r.split("/").filter((r=>!!r)),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r},dirname:r=>{var t=fr.splitPath(r),e=t[0],n=t[1];return e||n?(n&&(n=n.substr(0,n.length-1)),e+n):"."},basename:r=>{if("/"===r)return"/";var t=(r=(r=fr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?r:r.substr(t+1)},join:function(){var r=Array.prototype.slice.call(arguments);return fr.normalize(r.join("/"))},join2:(r,t)=>fr.normalize(r+"/"+t)},dr=r=>(dr=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return r=>(r.set(crypto.getRandomValues(new Uint8Array(r.byteLength))),r);Z("initRandomDevice")})())(r),hr={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:Cr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,t=fr.isAbs(n)}return(t?"/":"")+(r=fr.normalizeArray(r.split("/").filter((r=>!!r)),!t).join("/"))||"."},relative:(r,t)=>{function e(r){for(var t=0;t<r.length&&""===r[t];t++);for(var e=r.length-1;e>=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=hr.resolve(r).substr(1),t=hr.resolve(t).substr(1);for(var n=e(r.split("/")),o=e(t.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},pr="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,mr=(r,t,e)=>{for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.buffer&&pr)return pr.decode(r.buffer instanceof SharedArrayBuffer?r.slice(t,o):r.subarray(t,o));for(var a="";t<o;){var i=r[t++];if(128&i){var s=63&r[t++];if(192!=(224&i)){var u=63&r[t++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&r[t++])<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},vr=[],yr=r=>{for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++e):t+=3}return t},wr=(r,t,e,n)=>{if(!(n>0))return 0;for(var o=e,a=e+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i);if(s<=127){if(e>=a)break;t[e++]=s}else if(s<=2047){if(e+1>=a)break;t[e++]=192|s>>6,t[e++]=128|63&s}else if(s<=65535){if(e+2>=a)break;t[e++]=224|s>>12,t[e++]=128|s>>6&63,t[e++]=128|63&s}else{if(e+3>=a)break;t[e++]=240|s>>18,t[e++]=128|s>>12&63,t[e++]=128|s>>6&63,t[e++]=128|63&s}}return t[e]=0,e-o};function gr(r,t,e){var n=e>0?e:yr(r)+1,o=new Array(n),a=wr(r,o,0,o.length);return t&&(o.length=a),o}var _r={ttys:[],init(){},shutdown(){},register(r,t){_r.ttys[r]={input:[],output:[],ops:t},Cr.registerDevice(r,_r.stream_ops)},stream_ops:{open(r){var t=_r.ttys[r.node.rdev];if(!t)throw new Cr.ErrnoError(43);r.tty=t,r.seekable=!1},close(r){r.tty.ops.fsync(r.tty)},fsync(r){r.tty.ops.fsync(r.tty)},read(r,t,e,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Cr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new Cr.ErrnoError(29)}if(void 0===s&&0===a)throw new Cr.ErrnoError(6);if(null==s)break;a++,t[e+i]=s}return a&&(r.node.timestamp=Date.now()),a},write(r,t,e,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Cr.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,t[e+a])}catch(r){throw new Cr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:r=>(()=>{if(!vr.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;vr=gr(r,!0)}return vr.shift()})(),put_char(r,t){null===t||10===t?(E(mr(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},fsync(r){r.output&&r.output.length>0&&(E(mr(r.output,0)),r.output=[])},ioctl_tcgets:r=>({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:(r,t,e)=>0,ioctl_tiocgwinsz:r=>[24,80]},default_tty1_ops:{put_char(r,t){null===t||10===t?(k(mr(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},fsync(r){r.output&&r.output.length>0&&(k(mr(r.output,0)),r.output=[])}}},br=r=>{r=((r,t)=>Math.ceil(r/t)*t)(r,65536);var t=_n(65536,r);return t?((r,t)=>(n().fill(0,r,r+t),r))(t,r):0},Er={ops_table:null,mount:r=>Er.createNode(null,"/",16895,0),createNode(r,t,e,n){if(Cr.isBlkdev(e)||Cr.isFIFO(e))throw new Cr.ErrnoError(63);Er.ops_table||(Er.ops_table={dir:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr,lookup:Er.node_ops.lookup,mknod:Er.node_ops.mknod,rename:Er.node_ops.rename,unlink:Er.node_ops.unlink,rmdir:Er.node_ops.rmdir,readdir:Er.node_ops.readdir,symlink:Er.node_ops.symlink},stream:{llseek:Er.stream_ops.llseek}},file:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr},stream:{llseek:Er.stream_ops.llseek,read:Er.stream_ops.read,write:Er.stream_ops.write,allocate:Er.stream_ops.allocate,mmap:Er.stream_ops.mmap,msync:Er.stream_ops.msync}},link:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr,readlink:Er.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr},stream:Cr.chrdev_stream_ops}});var o=Cr.createNode(r,t,e,n);return Cr.isDir(o.mode)?(o.node_ops=Er.ops_table.dir.node,o.stream_ops=Er.ops_table.dir.stream,o.contents={}):Cr.isFile(o.mode)?(o.node_ops=Er.ops_table.file.node,o.stream_ops=Er.ops_table.file.stream,o.usedBytes=0,o.contents=null):Cr.isLink(o.mode)?(o.node_ops=Er.ops_table.link.node,o.stream_ops=Er.ops_table.link.stream):Cr.isChrdev(o.mode)&&(o.node_ops=Er.ops_table.chrdev.node,o.stream_ops=Er.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[t]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:r=>r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0),expandFileStorage(r,t){var e=r.contents?r.contents.length:0;if(!(e>=t)){t=Math.max(t,e*(e<1048576?2:1.125)>>>0),0!=e&&(t=Math.max(t,256));var n=r.contents;r.contents=new Uint8Array(t),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage(r,t){if(r.usedBytes!=t)if(0==t)r.contents=null,r.usedBytes=0;else{var e=r.contents;r.contents=new Uint8Array(t),e&&r.contents.set(e.subarray(0,Math.min(t,r.usedBytes))),r.usedBytes=t}},node_ops:{getattr(r){var t={};return t.dev=Cr.isChrdev(r.mode)?r.id:1,t.ino=r.id,t.mode=r.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=r.rdev,Cr.isDir(r.mode)?t.size=4096:Cr.isFile(r.mode)?t.size=r.usedBytes:Cr.isLink(r.mode)?t.size=r.link.length:t.size=0,t.atime=new Date(r.timestamp),t.mtime=new Date(r.timestamp),t.ctime=new Date(r.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr(r,t){void 0!==t.mode&&(r.mode=t.mode),void 0!==t.timestamp&&(r.timestamp=t.timestamp),void 0!==t.size&&Er.resizeFileStorage(r,t.size)},lookup(r,t){throw Cr.genericErrors[44]},mknod:(r,t,e,n)=>Er.createNode(r,t,e,n),rename(r,t,e){if(Cr.isDir(r.mode)){var n;try{n=Cr.lookupNode(t,e)}catch(r){}if(n)for(var o in n.contents)throw new Cr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=e,t.contents[e]=r,t.timestamp=r.parent.timestamp,r.parent=t},unlink(r,t){delete r.contents[t],r.timestamp=Date.now()},rmdir(r,t){var e=Cr.lookupNode(r,t);for(var n in e.contents)throw new Cr.ErrnoError(55);delete r.contents[t],r.timestamp=Date.now()},readdir(r){var t=[".",".."];for(var e in r.contents)r.contents.hasOwnProperty(e)&&t.push(e);return t},symlink(r,t,e){var n=Er.createNode(r,t,41471,0);return n.link=e,n},readlink(r){if(!Cr.isLink(r.mode))throw new Cr.ErrnoError(28);return r.link}},stream_ops:{read(r,t,e,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)t.set(a.subarray(o,o+i),e);else for(var s=0;s<i;s++)t[e+s]=a[o+s];return i},write(r,t,n,o,a,i){if(t.buffer===e().buffer&&(i=!1),!o)return 0;var s=r.node;if(s.timestamp=Date.now(),t.subarray&&(!s.contents||s.contents.subarray)){if(i)return s.contents=t.subarray(n,n+o),s.usedBytes=o,o;if(0===s.usedBytes&&0===a)return s.contents=t.slice(n,n+o),s.usedBytes=o,o;if(a+o<=s.usedBytes)return s.contents.set(t.subarray(n,n+o),a),o}if(Er.expandFileStorage(s,a+o),s.contents.subarray&&t.subarray)s.contents.set(t.subarray(n,n+o),a);else for(var u=0;u<o;u++)s.contents[a+u]=t[n+u];return s.usedBytes=Math.max(s.usedBytes,a+o),o},llseek(r,t,e){var n=t;if(1===e?n+=r.position:2===e&&Cr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Cr.ErrnoError(28);return n},allocate(r,t,e){Er.expandFileStorage(r.node,t+e),r.node.usedBytes=Math.max(r.node.usedBytes,t+e)},mmap(r,t,n,o,a){if(!Cr.isFile(r.node.mode))throw new Cr.ErrnoError(43);var i,s,u=r.node.contents;if(2&a||u.buffer!==e().buffer){if((n>0||n+t<u.length)&&(u=u.subarray?u.subarray(n,n+t):Array.prototype.slice.call(u,n,n+t)),s=!0,!(i=br(t)))throw new Cr.ErrnoError(48);e().set(u,i)}else s=!1,i=u.byteOffset;return{ptr:i,allocated:s}},msync:(r,t,e,n,o)=>(Er.stream_ops.write(r,t,0,n,e,!1),0)}},kr=f.preloadPlugins||[],Tr=(r,t)=>{var e=0;return r&&(e|=365),t&&(e|=146),e},Cr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(r,t={}){if(!(r=hr.resolve(r)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new Cr.ErrnoError(32);for(var e=r.split("/").filter((r=>!!r)),n=Cr.root,o="/",a=0;a<e.length;a++){var i=a===e.length-1;if(i&&t.parent)break;if(n=Cr.lookupNode(n,e[a]),o=fr.join2(o,e[a]),Cr.isMountpoint(n)&&(!i||i&&t.follow_mount)&&(n=n.mounted.root),!i||t.follow)for(var s=0;Cr.isLink(n.mode);){var u=Cr.readlink(o);if(o=hr.resolve(fr.dirname(o),u),n=Cr.lookupPath(o,{recurse_count:t.recurse_count+1}).node,s++>40)throw new Cr.ErrnoError(32)}}return{path:o,node:n}},getPath(r){for(var t;;){if(Cr.isRoot(r)){var e=r.mount.mountpoint;return t?"/"!==e[e.length-1]?`${e}/${t}`:e+t:e}t=t?`${r.name}/${t}`:r.name,r=r.parent}},hashName(r,t){for(var e=0,n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n)|0;return(r+e>>>0)%Cr.nameTable.length},hashAddNode(r){var t=Cr.hashName(r.parent.id,r.name);r.name_next=Cr.nameTable[t],Cr.nameTable[t]=r},hashRemoveNode(r){var t=Cr.hashName(r.parent.id,r.name);if(Cr.nameTable[t]===r)Cr.nameTable[t]=r.name_next;else for(var e=Cr.nameTable[t];e;){if(e.name_next===r){e.name_next=r.name_next;break}e=e.name_next}},lookupNode(r,t){var e=Cr.mayLookup(r);if(e)throw new Cr.ErrnoError(e,r);for(var n=Cr.hashName(r.id,t),o=Cr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===t)return o}return Cr.lookup(r,t)},createNode(r,t,e,n){var o=new Cr.FSNode(r,t,e,n);return Cr.hashAddNode(o),o},destroyNode(r){Cr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagsToPermissionString(r){var t=["r","w","rw"][3&r];return 512&r&&(t+="w"),t},nodePermissions:(r,t)=>Cr.ignorePermissions||(!t.includes("r")||292&r.mode)&&(!t.includes("w")||146&r.mode)&&(!t.includes("x")||73&r.mode)?0:2,mayLookup(r){var t=Cr.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate(r,t){try{Cr.lookupNode(r,t);return 20}catch(r){}return Cr.nodePermissions(r,"wx")},mayDelete(r,t,e){var n;try{n=Cr.lookupNode(r,t)}catch(r){return r.errno}var o=Cr.nodePermissions(r,"wx");if(o)return o;if(e){if(!Cr.isDir(n.mode))return 54;if(Cr.isRoot(n)||Cr.getPath(n)===Cr.cwd())return 10}else if(Cr.isDir(n.mode))return 31;return 0},mayOpen:(r,t)=>r?Cr.isLink(r.mode)?32:Cr.isDir(r.mode)&&("r"!==Cr.flagsToPermissionString(t)||512&t)?31:Cr.nodePermissions(r,Cr.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=Cr.MAX_OPEN_FDS;r++)if(!Cr.streams[r])return r;throw new Cr.ErrnoError(33)},getStreamChecked(r){var t=Cr.getStream(r);if(!t)throw new Cr.ErrnoError(8);return t},getStream:r=>Cr.streams[r],createStream:(r,t=-1)=>(Cr.FSStream||(Cr.FSStream=function(){this.shared={}},Cr.FSStream.prototype={},Object.defineProperties(Cr.FSStream.prototype,{object:{get(){return this.node},set(r){this.node=r}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(r){this.shared.flags=r}},position:{get(){return this.shared.position},set(r){this.shared.position=r}}})),r=Object.assign(new Cr.FSStream,r),-1==t&&(t=Cr.nextfd()),r.fd=t,Cr.streams[t]=r,r),closeStream(r){Cr.streams[r]=null},chrdev_stream_ops:{open(r){var t=Cr.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek(){throw new Cr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,t)=>r<<8|t,registerDevice(r,t){Cr.devices[r]={stream_ops:t}},getDevice:r=>Cr.devices[r],getMounts(r){for(var t=[],e=[r];e.length;){var n=e.pop();t.push(n),e.push.apply(e,n.mounts)}return t},syncfs(r,t){"function"==typeof r&&(t=r,r=!1),Cr.syncFSRequests++,Cr.syncFSRequests>1&&k(`warning: ${Cr.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var e=Cr.getMounts(Cr.root.mount),n=0;function o(r){return Cr.syncFSRequests--,t(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=e.length&&o(null)}e.forEach((t=>{if(!t.type.syncfs)return a(null);t.type.syncfs(t,r,a)}))},mount(r,t,e){var n,o="/"===e,a=!e;if(o&&Cr.root)throw new Cr.ErrnoError(10);if(!o&&!a){var i=Cr.lookupPath(e,{follow_mount:!1});if(e=i.path,n=i.node,Cr.isMountpoint(n))throw new Cr.ErrnoError(10);if(!Cr.isDir(n.mode))throw new Cr.ErrnoError(54)}var s={type:r,opts:t,mountpoint:e,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Cr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(r){var t=Cr.lookupPath(r,{follow_mount:!1});if(!Cr.isMountpoint(t.node))throw new Cr.ErrnoError(28);var e=t.node,n=e.mounted,o=Cr.getMounts(n);Object.keys(Cr.nameTable).forEach((r=>{for(var t=Cr.nameTable[r];t;){var e=t.name_next;o.includes(t.mount)&&Cr.destroyNode(t),t=e}})),e.mounted=null;var a=e.mount.mounts.indexOf(n);e.mount.mounts.splice(a,1)},lookup:(r,t)=>r.node_ops.lookup(r,t),mknod(r,t,e){var n=Cr.lookupPath(r,{parent:!0}).node,o=fr.basename(r);if(!o||"."===o||".."===o)throw new Cr.ErrnoError(28);var a=Cr.mayCreate(n,o);if(a)throw new Cr.ErrnoError(a);if(!n.node_ops.mknod)throw new Cr.ErrnoError(63);return n.node_ops.mknod(n,o,t,e)},create:(r,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,Cr.mknod(r,t,0)),mkdir:(r,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,Cr.mknod(r,t,0)),mkdirTree(r,t){for(var e=r.split("/"),n="",o=0;o<e.length;++o)if(e[o]){n+="/"+e[o];try{Cr.mkdir(n,t)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,t,e)=>("undefined"==typeof e&&(e=t,t=438),t|=8192,Cr.mknod(r,t,e)),symlink(r,t){if(!hr.resolve(r))throw new Cr.ErrnoError(44);var e=Cr.lookupPath(t,{parent:!0}).node;if(!e)throw new Cr.ErrnoError(44);var n=fr.basename(t),o=Cr.mayCreate(e,n);if(o)throw new Cr.ErrnoError(o);if(!e.node_ops.symlink)throw new Cr.ErrnoError(63);return e.node_ops.symlink(e,n,r)},rename(r,t){var e,n,o=fr.dirname(r),a=fr.dirname(t),i=fr.basename(r),s=fr.basename(t);if(e=Cr.lookupPath(r,{parent:!0}).node,n=Cr.lookupPath(t,{parent:!0}).node,!e||!n)throw new Cr.ErrnoError(44);if(e.mount!==n.mount)throw new Cr.ErrnoError(75);var u,c=Cr.lookupNode(e,i),l=hr.relative(r,a);if("."!==l.charAt(0))throw new Cr.ErrnoError(28);if("."!==(l=hr.relative(t,o)).charAt(0))throw new Cr.ErrnoError(55);try{u=Cr.lookupNode(n,s)}catch(r){}if(c!==u){var f=Cr.isDir(c.mode),d=Cr.mayDelete(e,i,f);if(d)throw new Cr.ErrnoError(d);if(d=u?Cr.mayDelete(n,s,f):Cr.mayCreate(n,s))throw new Cr.ErrnoError(d);if(!e.node_ops.rename)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(c)||u&&Cr.isMountpoint(u))throw new Cr.ErrnoError(10);if(n!==e&&(d=Cr.nodePermissions(e,"w")))throw new Cr.ErrnoError(d);Cr.hashRemoveNode(c);try{e.node_ops.rename(c,n,s)}catch(r){throw r}finally{Cr.hashAddNode(c)}}},rmdir(r){var t=Cr.lookupPath(r,{parent:!0}).node,e=fr.basename(r),n=Cr.lookupNode(t,e),o=Cr.mayDelete(t,e,!0);if(o)throw new Cr.ErrnoError(o);if(!t.node_ops.rmdir)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(n))throw new Cr.ErrnoError(10);t.node_ops.rmdir(t,e),Cr.destroyNode(n)},readdir(r){var t=Cr.lookupPath(r,{follow:!0}).node;if(!t.node_ops.readdir)throw new Cr.ErrnoError(54);return t.node_ops.readdir(t)},unlink(r){var t=Cr.lookupPath(r,{parent:!0}).node;if(!t)throw new Cr.ErrnoError(44);var e=fr.basename(r),n=Cr.lookupNode(t,e),o=Cr.mayDelete(t,e,!1);if(o)throw new Cr.ErrnoError(o);if(!t.node_ops.unlink)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(n))throw new Cr.ErrnoError(10);t.node_ops.unlink(t,e),Cr.destroyNode(n)},readlink(r){var t=Cr.lookupPath(r).node;if(!t)throw new Cr.ErrnoError(44);if(!t.node_ops.readlink)throw new Cr.ErrnoError(28);return hr.resolve(Cr.getPath(t.parent),t.node_ops.readlink(t))},stat(r,t){var e=Cr.lookupPath(r,{follow:!t}).node;if(!e)throw new Cr.ErrnoError(44);if(!e.node_ops.getattr)throw new Cr.ErrnoError(63);return e.node_ops.getattr(e)},lstat:r=>Cr.stat(r,!0),chmod(r,t,e){var n;"string"==typeof r?n=Cr.lookupPath(r,{follow:!e}).node:n=r;if(!n.node_ops.setattr)throw new Cr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod(r,t){Cr.chmod(r,t,!0)},fchmod(r,t){var e=Cr.getStreamChecked(r);Cr.chmod(e.node,t)},chown(r,t,e,n){var o;"string"==typeof r?o=Cr.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new Cr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(r,t,e){Cr.chown(r,t,e,!0)},fchown(r,t,e){var n=Cr.getStreamChecked(r);Cr.chown(n.node,t,e)},truncate(r,t){if(t<0)throw new Cr.ErrnoError(28);var e;"string"==typeof r?e=Cr.lookupPath(r,{follow:!0}).node:e=r;if(!e.node_ops.setattr)throw new Cr.ErrnoError(63);if(Cr.isDir(e.mode))throw new Cr.ErrnoError(31);if(!Cr.isFile(e.mode))throw new Cr.ErrnoError(28);var n=Cr.nodePermissions(e,"w");if(n)throw new Cr.ErrnoError(n);e.node_ops.setattr(e,{size:t,timestamp:Date.now()})},ftruncate(r,t){var e=Cr.getStreamChecked(r);if(0==(2097155&e.flags))throw new Cr.ErrnoError(28);Cr.truncate(e.node,t)},utime(r,t,e){var n=Cr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,e)})},open(r,t,e){if(""===r)throw new Cr.ErrnoError(44);var n;if(e="undefined"==typeof e?438:e,e=64&(t="string"==typeof t?(r=>{var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[r];if("undefined"==typeof t)throw new Error(`Unknown file open mode: ${r}`);return t})(t):t)?4095&e|32768:0,"object"==typeof r)n=r;else{r=fr.normalize(r);try{n=Cr.lookupPath(r,{follow:!(131072&t)}).node}catch(r){}}var o=!1;if(64&t)if(n){if(128&t)throw new Cr.ErrnoError(20)}else n=Cr.mknod(r,e,0),o=!0;if(!n)throw new Cr.ErrnoError(44);if(Cr.isChrdev(n.mode)&&(t&=-513),65536&t&&!Cr.isDir(n.mode))throw new Cr.ErrnoError(54);if(!o){var a=Cr.mayOpen(n,t);if(a)throw new Cr.ErrnoError(a)}512&t&&!o&&Cr.truncate(n,0),t&=-131713;var i=Cr.createStream({node:n,path:Cr.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!f.logReadFiles||1&t||(Cr.readFiles||(Cr.readFiles={}),r in Cr.readFiles||(Cr.readFiles[r]=1)),i},close(r){if(Cr.isClosed(r))throw new Cr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{Cr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek(r,t,e){if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Cr.ErrnoError(70);if(0!=e&&1!=e&&2!=e)throw new Cr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,t,e),r.ungotten=[],r.position},read(r,t,e,n,o){if(n<0||o<0)throw new Cr.ErrnoError(28);if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(1==(2097155&r.flags))throw new Cr.ErrnoError(8);if(Cr.isDir(r.node.mode))throw new Cr.ErrnoError(31);if(!r.stream_ops.read)throw new Cr.ErrnoError(28);var a="undefined"!=typeof o;if(a){if(!r.seekable)throw new Cr.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,t,e,n,o);return a||(r.position+=i),i},write(r,t,e,n,o,a){if(n<0||o<0)throw new Cr.ErrnoError(28);if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(0==(2097155&r.flags))throw new Cr.ErrnoError(8);if(Cr.isDir(r.node.mode))throw new Cr.ErrnoError(31);if(!r.stream_ops.write)throw new Cr.ErrnoError(28);r.seekable&&1024&r.flags&&Cr.llseek(r,0,2);var i="undefined"!=typeof o;if(i){if(!r.seekable)throw new Cr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,t,e,n,o,a);return i||(r.position+=s),s},allocate(r,t,e){if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(t<0||e<=0)throw new Cr.ErrnoError(28);if(0==(2097155&r.flags))throw new Cr.ErrnoError(8);if(!Cr.isFile(r.node.mode)&&!Cr.isDir(r.node.mode))throw new Cr.ErrnoError(43);if(!r.stream_ops.allocate)throw new Cr.ErrnoError(138);r.stream_ops.allocate(r,t,e)},mmap(r,t,e,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&r.flags))throw new Cr.ErrnoError(2);if(1==(2097155&r.flags))throw new Cr.ErrnoError(2);if(!r.stream_ops.mmap)throw new Cr.ErrnoError(43);return r.stream_ops.mmap(r,t,e,n,o)},msync:(r,t,e,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,t,e,n,o):0,munmap:r=>0,ioctl(r,t,e){if(!r.stream_ops.ioctl)throw new Cr.ErrnoError(59);return r.stream_ops.ioctl(r,t,e)},readFile(r,t={}){if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error(`Invalid encoding type "${t.encoding}"`);var e,n=Cr.open(r,t.flags),o=Cr.stat(r).size,a=new Uint8Array(o);return Cr.read(n,a,0,o,0),"utf8"===t.encoding?e=mr(a,0):"binary"===t.encoding&&(e=a),Cr.close(n),e},writeFile(r,t,e={}){e.flags=e.flags||577;var n=Cr.open(r,e.flags,e.mode);if("string"==typeof t){var o=new Uint8Array(yr(t)+1),a=wr(t,o,0,o.length);Cr.write(n,o,0,a,void 0,e.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Cr.write(n,t,0,t.byteLength,void 0,e.canOwn)}Cr.close(n)},cwd:()=>Cr.currentPath,chdir(r){var t=Cr.lookupPath(r,{follow:!0});if(null===t.node)throw new Cr.ErrnoError(44);if(!Cr.isDir(t.node.mode))throw new Cr.ErrnoError(54);var e=Cr.nodePermissions(t.node,"x");if(e)throw new Cr.ErrnoError(e);Cr.currentPath=t.path},createDefaultDirectories(){Cr.mkdir("/tmp"),Cr.mkdir("/home"),Cr.mkdir("/home/web_user")},createDefaultDevices(){Cr.mkdir("/dev"),Cr.registerDevice(Cr.makedev(1,3),{read:()=>0,write:(r,t,e,n,o)=>n}),Cr.mkdev("/dev/null",Cr.makedev(1,3)),_r.register(Cr.makedev(5,0),_r.default_tty_ops),_r.register(Cr.makedev(6,0),_r.default_tty1_ops),Cr.mkdev("/dev/tty",Cr.makedev(5,0)),Cr.mkdev("/dev/tty1",Cr.makedev(6,0));var r=new Uint8Array(1024),t=0,e=()=>(0===t&&(t=dr(r).byteLength),r[--t]);Cr.createDevice("/dev","random",e),Cr.createDevice("/dev","urandom",e),Cr.mkdir("/dev/shm"),Cr.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Cr.mkdir("/proc");var r=Cr.mkdir("/proc/self");Cr.mkdir("/proc/self/fd"),Cr.mount({mount(){var t=Cr.createNode(r,"fd",16895,73);return t.node_ops={lookup(r,t){var e=+t,n=Cr.getStreamChecked(e),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams(){f.stdin?Cr.createDevice("/dev","stdin",f.stdin):Cr.symlink("/dev/tty","/dev/stdin"),f.stdout?Cr.createDevice("/dev","stdout",null,f.stdout):Cr.symlink("/dev/tty","/dev/stdout"),f.stderr?Cr.createDevice("/dev","stderr",null,f.stderr):Cr.symlink("/dev/tty1","/dev/stderr");Cr.open("/dev/stdin",0),Cr.open("/dev/stdout",1),Cr.open("/dev/stderr",1)},ensureErrnoError(){Cr.ErrnoError||(Cr.ErrnoError=function(r,t){this.name="ErrnoError",this.node=t,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Cr.ErrnoError.prototype=new Error,Cr.ErrnoError.prototype.constructor=Cr.ErrnoError,[44].forEach((r=>{Cr.genericErrors[r]=new Cr.ErrnoError(r),Cr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit(){Cr.ensureErrnoError(),Cr.nameTable=new Array(4096),Cr.mount(Er,{},"/"),Cr.createDefaultDirectories(),Cr.createDefaultDevices(),Cr.createSpecialDirectories(),Cr.filesystems={MEMFS:Er}},init(r,t,e){Cr.init.initialized=!0,Cr.ensureErrnoError(),f.stdin=r||f.stdin,f.stdout=t||f.stdout,f.stderr=e||f.stderr,Cr.createStandardStreams()},quit(){Cr.init.initialized=!1;for(var r=0;r<Cr.streams.length;r++){var t=Cr.streams[r];t&&Cr.close(t)}},findObject(r,t){var e=Cr.analyzePath(r,t);return e.exists?e.object:null},analyzePath(r,t){try{r=(n=Cr.lookupPath(r,{follow:!t})).path}catch(r){}var e={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Cr.lookupPath(r,{parent:!0});e.parentExists=!0,e.parentPath=n.path,e.parentObject=n.node,e.name=fr.basename(r),n=Cr.lookupPath(r,{follow:!t}),e.exists=!0,e.path=n.path,e.object=n.node,e.name=n.node.name,e.isRoot="/"===n.path}catch(r){e.error=r.errno}return e},createPath(r,t,e,n){r="string"==typeof r?r:Cr.getPath(r);for(var o=t.split("/").reverse();o.length;){var a=o.pop();if(a){var i=fr.join2(r,a);try{Cr.mkdir(i)}catch(r){}r=i}}return i},createFile(r,t,e,n,o){var a=fr.join2("string"==typeof r?r:Cr.getPath(r),t),i=Tr(n,o);return Cr.create(a,i)},createDataFile(r,t,e,n,o,a){var i=t;r&&(r="string"==typeof r?r:Cr.getPath(r),i=t?fr.join2(r,t):r);var s=Tr(n,o),u=Cr.create(i,s);if(e){if("string"==typeof e){for(var c=new Array(e.length),l=0,f=e.length;l<f;++l)c[l]=e.charCodeAt(l);e=c}Cr.chmod(u,146|s);var d=Cr.open(u,577);Cr.write(d,e,0,e.length,0,a),Cr.close(d),Cr.chmod(u,s)}return u},createDevice(r,t,e,n){var o=fr.join2("string"==typeof r?r:Cr.getPath(r),t),a=Tr(!!e,!!n);Cr.createDevice.major||(Cr.createDevice.major=64);var i=Cr.makedev(Cr.createDevice.major++,0);return Cr.registerDevice(i,{open(r){r.seekable=!1},close(r){n&&n.buffer&&n.buffer.length&&n(10)},read(r,t,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=e()}catch(r){throw new Cr.ErrnoError(29)}if(void 0===u&&0===i)throw new Cr.ErrnoError(6);if(null==u)break;i++,t[n+s]=u}return i&&(r.node.timestamp=Date.now()),i},write(r,t,e,o,a){for(var i=0;i<o;i++)try{n(t[e+i])}catch(r){throw new Cr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),Cr.mkdev(o,a,i)},forceLoadFile(r){if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!d)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=gr(d(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new Cr.ErrnoError(29)}},createLazyFile(r,t,n,o,a){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var t=r%this.chunkSize,e=r/this.chunkSize|0;return this.getter(e)[t]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",n,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+n+". Status: "+r.status);var t,e=Number(r.getResponseHeader("Content-length")),o=(t=r.getResponseHeader("Accept-Ranges"))&&"bytes"===t,a=(t=r.getResponseHeader("Content-Encoding"))&&"gzip"===t,i=1048576;o||(i=e);var s=this;s.setDataGetter((r=>{var t=r*i,o=(r+1)*i-1;if(o=Math.min(o,e-1),"undefined"==typeof s.chunks[r]&&(s.chunks[r]=((r,t)=>{if(r>t)throw new Error("invalid range ("+r+", "+t+") or no bytes requested!");if(t>e-1)throw new Error("only "+e+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",n,!1),e!==i&&o.setRequestHeader("Range","bytes="+r+"-"+t),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+n+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):gr(o.responseText||"",!0)})(t,o)),"undefined"==typeof s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!a&&e||(i=e=1,e=this.getter(0).length,i=e,E("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=e,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){0;var s=new i;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var u={isDevice:!1,contents:s}}else u={isDevice:!1,url:n};var c=Cr.createFile(r,t,u,o,a);u.contents?c.contents=u.contents:u.url&&(c.contents=null,c.url=u.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var l={};function f(r,t,e,n,o){var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)t[e+s]=a[o+s];else for(s=0;s<i;s++)t[e+s]=a.get(o+s);return i}return Object.keys(c.stream_ops).forEach((r=>{var t=c.stream_ops[r];l[r]=function(){return Cr.forceLoadFile(c),t.apply(null,arguments)}})),l.read=(r,t,e,n,o)=>(Cr.forceLoadFile(c),f(r,t,e,n,o)),l.mmap=(r,t,n,o,a)=>{Cr.forceLoadFile(c);var i=br(t);if(!i)throw new Cr.ErrnoError(48);return f(r,e(),i,t,n),{ptr:i,allocated:!0}},c.stream_ops=l,c}},$r=(r,t)=>r?mr(n(),r,t):"",Pr={DEFAULT_POLLMASK:5,calculateAt(r,t,e){if(fr.isAbs(t))return t;var n;-100===r?n=Cr.cwd():n=Pr.getStreamFromFD(r).path;if(0==t.length){if(!e)throw new Cr.ErrnoError(44);return n}return fr.join2(n,t)},doStat(r,t,e){try{var n=r(t)}catch(r){if(r&&r.node&&fr.normalize(t)!==fr.normalize(Cr.getPath(r.node)))return-54;throw r}i()[e>>2]=n.dev,i()[e+4>>2]=n.mode,s()[e+8>>2]=n.nlink,i()[e+12>>2]=n.uid,i()[e+16>>2]=n.gid,i()[e+20>>2]=n.rdev,er=[n.size>>>0,(tr=n.size,+Math.abs(tr)>=1?tr>0?+Math.floor(tr/4294967296)>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],i()[e+24>>2]=er[0],i()[e+28>>2]=er[1],i()[e+32>>2]=4096,i()[e+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),u=n.ctime.getTime();return er=[Math.floor(o/1e3)>>>0,(tr=Math.floor(o/1e3),+Math.abs(tr)>=1?tr>0?+Math.floor(tr/4294967296)>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],i()[e+40>>2]=er[0],i()[e+44>>2]=er[1],s()[e+48>>2]=o%1e3*1e3,er=[Math.floor(a/1e3)>>>0,(tr=Math.floor(a/1e3),+Math.abs(tr)>=1?tr>0?+Math.floor(tr/4294967296)>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],i()[e+56>>2]=er[0],i()[e+60>>2]=er[1],s()[e+64>>2]=a%1e3*1e3,er=[Math.floor(u/1e3)>>>0,(tr=Math.floor(u/1e3),+Math.abs(tr)>=1?tr>0?+Math.floor(tr/4294967296)>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],i()[e+72>>2]=er[0],i()[e+76>>2]=er[1],s()[e+80>>2]=u%1e3*1e3,er=[n.ino>>>0,(tr=n.ino,+Math.abs(tr)>=1?tr>0?+Math.floor(tr/4294967296)>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],i()[e+88>>2]=er[0],i()[e+92>>2]=er[1],0},doMsync(r,t,e,o,a){if(!Cr.isFile(t.node.mode))throw new Cr.ErrnoError(43);if(2&o)return 0;var i=n().slice(r,r+e);Cr.msync(t,i,a,e,o)},varargs:void 0,get(){var r=i()[Pr.varargs>>2];return Pr.varargs+=4,r},getp:()=>Pr.get(),getStr:r=>$r(r),getStreamFromFD:r=>Cr.getStreamChecked(r)};function Sr(r){if(w)return $e(0,1,r);P=r,V()||(Dr.terminateAllThreads(),f.onExit&&f.onExit(r),x=!0),y(r,new sr(r))}var Fr=(r,t)=>{if(P=r,w)throw Wr(r),"unwind";Sr(r)},Ar=r=>{if(r instanceof sr||"unwind"==r)return P;y(1,r)},Dr={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){w?Dr.initWorker():Dr.initMainThread()},initMainThread(){for(var r=Math.min(4,Math.max(1,navigator.hardwareConcurrency-1));r--;)Dr.allocateUnusedWorker();q((()=>{Q(),Dr.loadWasmModuleToAllWorkers((()=>J()))}))},initWorker(){$=!1},setExitStatus:r=>{P=r},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var r of Dr.runningWorkers)ur(r);for(var r of Dr.unusedWorkers)ur(r);Dr.unusedWorkers=[],Dr.runningWorkers=[],Dr.pthreads=[]},returnWorkerToPool:r=>{var t=r.pthread_ptr;delete Dr.pthreads[t],Dr.unusedWorkers.push(r),Dr.runningWorkers.splice(Dr.runningWorkers.indexOf(r),1),r.pthread_ptr=0,Tn(t)},receiveObjectTransfer(r){},threadInitTLS(){Dr.tlsInitFunctions.forEach((r=>r()))},loadWasmModuleToWorker:t=>new Promise((e=>{t.onmessage=r=>{var n=r.data,o=n.cmd;if(n.targetThread&&n.targetThread!=wn()){var a=Dr.pthreads[n.targetThread];a?a.postMessage(n,n.transferList):k(`Internal error! Worker sent a message "${o}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else{var i;"checkMailbox"===o?Te():"spawnThread"===o?lr(n):"cleanupThread"===o?cr(n.thread):"killThread"===o?(r=>{var t=Dr.pthreads[r];delete Dr.pthreads[r],ur(t),Tn(r),Dr.runningWorkers.splice(Dr.runningWorkers.indexOf(t),1),t.pthread_ptr=0})(n.thread):"cancelThread"===o?(i=n.thread,Dr.pthreads[i].postMessage({cmd:"cancel"})):"loaded"===o?(t.loaded=!0,e(t)):"alert"===o?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?t.postMessage(n):"callHandler"===o?f[n.handler](...n.args):o&&k(`worker sent an unknown command ${o}`)}},t.onerror=r=>{throw k(`worker sent an error! ${r.filename}:${r.lineno}: ${r.message}`),r};var n=[];for(var o of["onExit","onAbort","print","printErr"])f.hasOwnProperty(o)&&n.push(o);t.postMessage({cmd:"load",handlers:n,urlOrBlob:f.mainScriptUrlOrBlob||r,wasmMemory:T,wasmModule:C})})),loadWasmModuleToAllWorkers(r){if(w)return r();Promise.all(Dr.unusedWorkers.map(Dr.loadWasmModuleToWorker)).then(r)},allocateUnusedWorker(){var r,t=_("ScanbotSDK.Asm-simd-threads.worker.js");r=new Worker(t),Dr.unusedWorkers.push(r)},getNewWorker:()=>(0==Dr.unusedWorkers.length&&(Dr.allocateUnusedWorker(),Dr.loadWasmModuleToWorker(Dr.unusedWorkers[0])),Dr.unusedWorkers.pop())};f.PThread=Dr;var Mr=r=>{for(;r.length>0;)r.shift()(f)};function Wr(r){if(w)return $e(1,0,r);Fr(r)}f.establishStackSpace=()=>{var r=wn(),t=i()[r+52>>2],e=i()[r+56>>2];Sn(t,t-e),An(t)};var jr=r=>N.get(r);f.invokeEntryPoint=(r,t)=>{!function(r){V()?Dr.setExitStatus(r):Cn(r)}(jr(r)(t))};var Or=r=>{Dr.tlsInitFunctions.push(r)},xr=[],Rr=0,Ir=0;function Nr(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){s()[this.ptr+4>>2]=r},this.get_type=function(){return s()[this.ptr+4>>2]},this.set_destructor=function(r){s()[this.ptr+8>>2]=r},this.get_destructor=function(){return s()[this.ptr+8>>2]},this.set_caught=function(r){r=r?1:0,e()[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=e()[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,e()[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=e()[this.ptr+13>>0]},this.init=function(r,t){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(t)},this.set_adjusted_ptr=function(r){s()[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return s()[this.ptr+16>>2]},this.get_exception_ptr=function(){if(On(this.get_type()))return s()[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}var zr=r=>{var t=Ir;if(!t)return gn(0),0;var e=new Nr(t);e.set_adjusted_ptr(t);var n=e.get_type();if(!n)return gn(0),t;for(var o in r){var a=r[o];if(0===a||a===n)break;var i=e.ptr+16;if(jn(a,n,i))return gn(a),t}return gn(n),t},Ur=()=>{var r=xr.pop();r||Z("no exception to throw");var t=r.excPtr;throw r.get_rethrown()||(xr.push(r),r.set_rethrown(!0),r.set_caught(!1),Rr++),Ir=t};function Hr(r,t,e,n){return w?$e(2,1,r,t,e,n):Lr(r,t,e,n)}var Lr=(r,t,e,n)=>{if("undefined"==typeof SharedArrayBuffer)return k("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var o=[];if(w&&0===o.length)return Hr(r,t,e,n);var a={startRoutine:e,pthread_ptr:r,arg:n,transferList:o};return w?(a.cmd="spawnThread",postMessage(a,o),0):lr(a)};function Br(r,t,e,n,o){if(w)return $e(3,1,r,t,e,n,o);try{for(var a=0,s=t?i()[t>>2]:0,u=t?i()[t+4>>2]:0,c=e?i()[e>>2]:0,l=e?i()[e+4>>2]:0,f=n?i()[n>>2]:0,d=n?i()[n+4>>2]:0,h=0,p=0,m=0,v=0,y=0,g=0,_=(t?i()[t>>2]:0)|(e?i()[e>>2]:0)|(n?i()[n>>2]:0),b=(t?i()[t+4>>2]:0)|(e?i()[e+4>>2]:0)|(n?i()[n+4>>2]:0),E=function(r,t,e,n){return r<32?t&n:e&n},k=0;k<r;k++){var T=1<<k%32;if(E(k,_,b,T)){var C=Pr.getStreamFromFD(k),$=Pr.DEFAULT_POLLMASK;if(C.stream_ops.poll){var P=-1;if(o)P=1e3*((t?i()[o>>2]:0)+(t?i()[o+8>>2]:0)/1e6);$=C.stream_ops.poll(C,P)}1&$&&E(k,s,u,T)&&(k<32?h|=T:p|=T,a++),4&$&&E(k,c,l,T)&&(k<32?m|=T:v|=T,a++),2&$&&E(k,f,d,T)&&(k<32?y|=T:g|=T,a++)}}return t&&(i()[t>>2]=h,i()[t+4>>2]=p),e&&(i()[e>>2]=m,i()[e+4>>2]=v),n&&(i()[n>>2]=y,i()[n+4>>2]=g),a}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Vr(r,t,e){if(w)return $e(4,1,r,t,e);Pr.varargs=e;try{var n=Pr.getStreamFromFD(r);switch(t){case 0:if((a=Pr.get())<0)return-28;for(;Cr.streams[a];)a++;return Cr.createStream(n,a).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var a=Pr.get();return n.flags|=a,0;case 5:a=Pr.getp();return o()[a+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return s=28,i()[yn()>>2]=s,-1}}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}var s}function Yr(r,t){if(w)return $e(5,1,r,t);try{var e=Pr.getStreamFromFD(r);return Pr.doStat(Cr.stat,e.path,t)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function qr(r,t,n){if(w)return $e(6,1,r,t,n);Pr.varargs=n;try{var a=Pr.getStreamFromFD(r);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return a.tty?0:-59;case 21505:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcgets){var s=a.tty.ops.ioctl_tcgets(a),u=Pr.getp();i()[u>>2]=s.c_iflag||0,i()[u+4>>2]=s.c_oflag||0,i()[u+8>>2]=s.c_cflag||0,i()[u+12>>2]=s.c_lflag||0;for(var c=0;c<32;c++)e()[u+c+17>>0]=s.c_cc[c]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcsets){u=Pr.getp();var l=i()[u>>2],f=i()[u+4>>2],d=i()[u+8>>2],h=i()[u+12>>2],p=[];for(c=0;c<32;c++)p.push(e()[u+c+17>>0]);return a.tty.ops.ioctl_tcsets(a.tty,t,{c_iflag:l,c_oflag:f,c_cflag:d,c_lflag:h,c_cc:p})}return 0;case 21519:if(!a.tty)return-59;u=Pr.getp();return i()[u>>2]=0,0;case 21520:return a.tty?-28:-59;case 21531:u=Pr.getp();return Cr.ioctl(a,t,u);case 21523:if(!a.tty)return-59;if(a.tty.ops.ioctl_tiocgwinsz){var m=a.tty.ops.ioctl_tiocgwinsz(a.tty);u=Pr.getp();o()[u>>1]=m[0],o()[u+2>>1]=m[1]}return 0;default:return-28}}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Xr(r,t,e,n){if(w)return $e(8,1,r,t,e,n);try{t=Pr.getStr(t);var o=256&n,a=4096&n;return n&=-6401,t=Pr.calculateAt(r,t,a),Pr.doStat(o?Cr.lstat:Cr.stat,t,e)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Gr(r,t,e,n){if(w)return $e(9,1,r,t,e,n);Pr.varargs=n;try{t=Pr.getStr(t),t=Pr.calculateAt(r,t);var o=n?Pr.get():0;return Cr.open(t,e,o).fd}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Kr(r){if(w)return $e(10,1,r);try{return r=Pr.getStr(r),Cr.rmdir(r),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Qr(r,t){if(w)return $e(11,1,r,t);try{return r=Pr.getStr(r),Pr.doStat(Cr.stat,r,t)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Jr(r,t,e){if(w)return $e(12,1,r,t,e);try{return t=Pr.getStr(t),t=Pr.calculateAt(r,t),0===e?Cr.unlink(t):512===e?Cr.rmdir(t):Z("Invalid flags passed to unlinkat"),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}var Zr={},rt=r=>{for(;r.length;){var t=r.pop();r.pop()(t)}};function tt(r){return this.fromWireType(i()[r>>2])}var et={},nt={},ot={},at=void 0,it=r=>{throw new at(r)},st=(r,t,e)=>{function n(t){var n=e(t);n.length!==r.length&&it("Mismatched type converter count");for(var o=0;o<r.length;++o)dt(r[o],n[o])}r.forEach((function(r){ot[r]=t}));var o=new Array(t.length),a=[],i=0;t.forEach(((r,t)=>{nt.hasOwnProperty(r)?o[t]=nt[r]:(a.push(r),et.hasOwnProperty(r)||(et[r]=[]),et[r].push((()=>{o[t]=nt[r],++i===a.length&&n(o)})))})),0===a.length&&n(o)},ut=void 0,ct=r=>{for(var t="",e=r;n()[e];)t+=ut[n()[e++]];return t},lt=void 0,ft=r=>{throw new lt(r)};function dt(r,t,e={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(r,t,e={}){var n=t.name;if(r||ft(`type "${n}" must have a positive integer typeid pointer`),nt.hasOwnProperty(r)){if(e.ignoreDuplicateRegistrations)return;ft(`Cannot register type '${n}' twice`)}if(nt[r]=t,delete ot[r],et.hasOwnProperty(r)){var o=et[r];delete et[r],o.forEach((r=>r()))}}(r,t,e)}var ht=8;function pt(r){if(!(this instanceof xt))return!1;if(!(r instanceof xt))return!1;for(var t=this.$$.ptrType.registeredClass,e=this.$$.ptr,n=r.$$.ptrType.registeredClass,o=r.$$.ptr;t.baseClass;)e=t.upcast(e),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&e===o}var mt=r=>{ft(r.$$.ptrType.registeredClass.name+" instance already deleted")},vt=!1,yt=r=>{},wt=r=>{r.count.value-=1,0===r.count.value&&(r=>{r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr)})(r)},gt=(r,t,e)=>{if(t===e)return r;if(void 0===e.baseClass)return null;var n=gt(r,t,e.baseClass);return null===n?null:e.downcast(n)},_t={},bt=()=>Object.keys(Pt).length,Et=()=>{var r=[];for(var t in Pt)Pt.hasOwnProperty(t)&&r.push(Pt[t]);return r},kt=[],Tt=()=>{for(;kt.length;){var r=kt.pop();r.$$.deleteScheduled=!1,r.delete()}},Ct=void 0,$t=r=>{Ct=r,kt.length&&Ct&&Ct(Tt)},Pt={},St=(r,t)=>(t=((r,t)=>{for(void 0===t&&ft("ptr should not be undefined");r.baseClass;)t=r.upcast(t),r=r.baseClass;return t})(r,t),Pt[t]),Ft=(r,t)=>(t.ptrType&&t.ptr||it("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!==!!t.smartPtr&&it("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Dt(Object.create(r,{$$:{value:t}})));function At(r){var t=this.getPointee(r);if(!t)return this.destructor(r),null;var e=St(this.registeredClass,t);if(void 0!==e){if(0===e.$$.count.value)return e.$$.ptr=t,e.$$.smartPtr=r,e.clone();var n=e.clone();return this.destructor(r),n}function o(){return this.isSmartPointer?Ft(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:r}):Ft(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var a,i=this.registeredClass.getActualType(t),s=_t[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=gt(t,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?Ft(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:r}):Ft(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}var Dt=r=>"undefined"==typeof FinalizationRegistry?(Dt=r=>r,r):(vt=new FinalizationRegistry((r=>{wt(r.$$)})),Dt=r=>{var t=r.$$;if(!!t.smartPtr){var e={$$:t};vt.register(r,e,r)}return r},yt=r=>vt.unregister(r),Dt(r));function Mt(){if(this.$$.ptr||mt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r,t=Dt(Object.create(Object.getPrototypeOf(this),{$$:{value:(r=this.$$,{count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Wt(){this.$$.ptr||mt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ft("Object already scheduled for deletion"),yt(this),wt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function jt(){return!this.$$.ptr}function Ot(){return this.$$.ptr||mt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&ft("Object already scheduled for deletion"),kt.push(this),1===kt.length&&Ct&&Ct(Tt),this.$$.deleteScheduled=!0,this}function xt(){}var Rt=r=>{if(void 0===r)return"_unknown";var t=(r=r.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?`_${r}`:r};function It(r,t){return{[r=Rt(r)]:function(){return t.apply(this,arguments)}}[r]}var Nt=(r,t,e)=>{if(void 0===r[t].overloadTable){var n=r[t];r[t]=function(){return r[t].overloadTable.hasOwnProperty(arguments.length)||ft(`Function '${e}' called with an invalid number of arguments (${arguments.length}) - expects one of (${r[t].overloadTable})!`),r[t].overloadTable[arguments.length].apply(this,arguments)},r[t].overloadTable=[],r[t].overloadTable[n.argCount]=n}},zt=(r,t,e)=>{f.hasOwnProperty(r)?((void 0===e||void 0!==f[r].overloadTable&&void 0!==f[r].overloadTable[e])&&ft(`Cannot register public name '${r}' twice`),Nt(f,r,r),f.hasOwnProperty(e)&&ft(`Cannot register multiple overloads of a function with the same number of arguments (${e})!`),f[r].overloadTable[e]=t):(f[r]=t,void 0!==e&&(f[r].numArguments=e))};function Ut(r,t,e,n,o,a,i,s){this.name=r,this.constructor=t,this.instancePrototype=e,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var Ht=(r,t,e)=>{for(;t!==e;)t.upcast||ft(`Expected null or instance of ${e.name}, got an instance of ${t.name}`),r=t.upcast(r),t=t.baseClass;return r};function Lt(r,t){if(null===t)return this.isReference&&ft(`null is not a valid ${this.name}`),0;t.$$||ft(`Cannot pass "${fe(t)}" as a ${this.name}`),t.$$.ptr||ft(`Cannot pass deleted object as a pointer of type ${this.name}`);var e=t.$$.ptrType.registeredClass;return Ht(t.$$.ptr,e,this.registeredClass)}function Bt(r,t){var e;if(null===t)return this.isReference&&ft(`null is not a valid ${this.name}`),this.isSmartPointer?(e=this.rawConstructor(),null!==r&&r.push(this.rawDestructor,e),e):0;t.$$||ft(`Cannot pass "${fe(t)}" as a ${this.name}`),t.$$.ptr||ft(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&ft(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;if(e=Ht(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&ft("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?e=t.$$.smartPtr:ft(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:e=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)e=t.$$.smartPtr;else{var o=t.clone();e=this.rawShare(e,le.toHandle((()=>o.delete()))),null!==r&&r.push(this.rawDestructor,e)}break;default:ft("Unsupporting sharing policy")}return e}function Vt(r,t){if(null===t)return this.isReference&&ft(`null is not a valid ${this.name}`),0;t.$$||ft(`Cannot pass "${fe(t)}" as a ${this.name}`),t.$$.ptr||ft(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&ft(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var e=t.$$.ptrType.registeredClass;return Ht(t.$$.ptr,e,this.registeredClass)}function Yt(r){return this.fromWireType(s()[r>>2])}function qt(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r}function Xt(r){this.rawDestructor&&this.rawDestructor(r)}var Gt=r=>{null!==r&&r.delete()};function Kt(r,t,e,n,o,a,i,s,u,c,l){this.name=r,this.registeredClass=t,this.isReference=e,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==t.baseClass?this.toWireType=Bt:n?(this.toWireType=Lt,this.destructorFunction=null):(this.toWireType=Vt,this.destructorFunction=null)}var Qt=(r,t,e)=>{f.hasOwnProperty(r)||it("Replacing nonexistant public symbol"),void 0!==f[r].overloadTable&&void 0!==e?f[r].overloadTable[e]=t:(f[r]=t,f[r].argCount=e)},Jt=(r,t,e)=>r.includes("j")?((r,t,e)=>{var n=f["dynCall_"+r];return e&&e.length?n.apply(null,[t].concat(e)):n.call(null,t)})(r,t,e):jr(t).apply(null,e),Zt=(r,t)=>{var e,n,o,a=(r=ct(r)).includes("j")?(e=r,n=t,o=[],function(){return o.length=0,Object.assign(o,arguments),Jt(e,n,o)}):jr(t);return"function"!=typeof a&&ft(`unknown function pointer with signature ${r}: ${t}`),a},re=void 0,te=r=>{var t=bn(r),e=ct(t);return vn(t),e},ee=(r,t)=>{var e=[],n={};throw t.forEach((function r(t){n[t]||nt[t]||(ot[t]?ot[t].forEach(r):(e.push(t),n[t]=!0))})),new re(`${r}: `+e.map(te).join([", "]))},ne=(r,t)=>{for(var e=[],n=0;n<r;n++)e.push(s()[t+4*n>>2]);return e};function oe(r,t){if(!(r instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof r} which is not a function`);var e=It(r.name||"unknownFunctionName",(function(){}));e.prototype=r.prototype;var n=new e,o=r.apply(n,t);return o instanceof Object?o:n}function ae(r,t,e,n,o,a){var i=t.length;i<2&&ft("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==t[1]&&null!==e,u=!1,c=1;c<t.length;++c)if(null!==t[c]&&void 0===t[c].destructorFunction){u=!0;break}var l="void"!==t[0].name,f="",d="";for(c=0;c<i-2;++c)f+=(0!==c?", ":"")+"arg"+c,d+=(0!==c?", ":"")+"arg"+c+"Wired";var h=`\n return function ${Rt(r)}(${f}) {\n if (arguments.length !== ${i-2}) {\n throwBindingError('function ${r} called with ' + arguments.length + ' arguments, expected ${i-2}');\n }`;u&&(h+="var destructors = [];\n");var p=u?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[ft,n,o,rt,t[0],t[1]];s&&(h+="var thisWired = classParam.toWireType("+p+", this);\n");for(c=0;c<i-2;++c)h+="var arg"+c+"Wired = argType"+c+".toWireType("+p+", arg"+c+"); // "+t[c+2].name+"\n",m.push("argType"+c),v.push(t[c+2]);if(s&&(d="thisWired"+(d.length>0?", ":"")+d),h+=(l||a?"var rv = ":"")+"invoker(fn"+(d.length>0?", ":"")+d+");\n",u)h+="runDestructors(destructors);\n";else for(c=s?1:2;c<t.length;++c){var y=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==t[c].destructorFunction&&(h+=y+"_dtor("+y+"); // "+t[c].name+"\n",m.push(y+"_dtor"),v.push(t[c].destructorFunction))}return l&&(h+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h+="}\n",m.push(h),oe(Function,m).apply(null,v)}function ie(){this.allocated=[void 0],this.freelist=[]}var se=new ie,ue=r=>{r>=se.reserved&&0==--se.get(r).refcount&&se.free(r)},ce=()=>{for(var r=0,t=se.reserved;t<se.allocated.length;++t)void 0!==se.allocated[t]&&++r;return r},le={toValue:r=>(r||ft("Cannot use deleted val. handle = "+r),se.get(r).value),toHandle:r=>{switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return se.allocate({refcount:1,value:r})}}},fe=r=>{if(null===r)return"null";var t=typeof r;return"object"===t||"array"===t||"function"===t?r.toString():""+r},de=(r,t)=>{switch(t){case 4:return function(r){return this.fromWireType((T.buffer!=S.buffer&&I(),j)[r>>2])};case 8:return function(r){return this.fromWireType(u()[r>>3])};default:throw new TypeError(`invalid float width (${t}): ${r}`)}},he=(r,t,u)=>{switch(t){case 1:return u?r=>e()[r>>0]:r=>n()[r>>0];case 2:return u?r=>o()[r>>1]:r=>a()[r>>1];case 4:return u?r=>i()[r>>2]:r=>s()[r>>2];default:throw new TypeError(`invalid integer width (${t}): ${r}`)}},pe=(r,t,e)=>wr(r,n(),t,e),me="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,ve=(r,t)=>{for(var e=r,i=e>>1,s=i+t/2;!(i>=s)&&a()[i];)++i;if((e=i<<1)-r>32&&me)return me.decode(n().slice(r,e));for(var u="",c=0;!(c>=t/2);++c){var l=o()[r+2*c>>1];if(0==l)break;u+=String.fromCharCode(l)}return u},ye=(r,t,e)=>{if(void 0===e&&(e=2147483647),e<2)return 0;for(var n=t,a=(e-=2)<2*r.length?e/2:r.length,i=0;i<a;++i){var s=r.charCodeAt(i);o()[t>>1]=s,t+=2}return o()[t>>1]=0,t-n},we=r=>2*r.length,ge=(r,t)=>{for(var e=0,n="";!(e>=t/4);){var o=i()[r+4*e>>2];if(0==o)break;if(++e,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},_e=(r,t,e)=>{if(void 0===e&&(e=2147483647),e<4)return 0;for(var n=t,o=n+e-4,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a);if(i()[t>>2]=s,(t+=4)+4>o)break}return i()[t>>2]=0,t-n},be=r=>{for(var t=0,e=0;e<r.length;++e){var n=r.charCodeAt(e);n>=55296&&n<=57343&&++e,t+=4}return t},Ee=r=>{if(!x)try{r(),(()=>{if(!V())try{w?Cn(P):Fr(P)}catch(r){Ar(r)}})()}catch(r){Ar(r)}},ke=r=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync(i(),r>>2,r).value.then(Te);var t=r+128;Atomics.store(i(),t>>2,1)}};f.__emscripten_thread_mailbox_await=ke;var Te=()=>{var r=wn();r&&(ke(r),Ee((()=>$n())))};f.checkMailbox=Te;var Ce=r=>{var t=Fn(),e=r();return An(t),e},$e=function(r,t){var e=arguments.length-2,n=arguments;return Ce((()=>{for(var o=e,a=Dn(8*o),i=a>>3,s=0;s<e;s++){var c=n[2+s];u()[i+s]=c}return kn(r,o,a,t)}))},Pe=[],Se=(r,t)=>{var e=nt[r];return void 0===e&&ft(t+" has unknown type "+te(r)),e},Fe={},Ae=r=>{var t=Fe[r];return void 0===t?ct(r):t},De=[],Me=()=>"object"==typeof globalThis?globalThis:Function("return this")(),We=[],je=(r,t)=>t+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*t:NaN;var Oe=r=>r%4==0&&(r%100!=0||r%400==0),xe=[0,31,60,91,121,152,182,213,244,274,305,335],Re=[0,31,59,90,120,151,181,212,243,273,304,334];function Ie(r,t,e,n,o,a,u,c){if(w)return $e(13,1,r,t,e,n,o,a,u,c);var l=je(o,a);try{if(isNaN(l))return 61;var f=Pr.getStreamFromFD(n),d=Cr.mmap(f,r,l,t,e),h=d.ptr;return i()[u>>2]=d.allocated,s()[c>>2]=h,0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Ne(r,t,e,n,o,a,i){if(w)return $e(14,1,r,t,e,n,o,a,i);var s=je(a,i);try{if(isNaN(s))return 61;var u=Pr.getStreamFromFD(o);2&e&&Pr.doMsync(r,u,t,n,s),Cr.munmap(u)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}var ze,Ue=r=>{var t=yr(r)+1,e=mn(t);return e&&pe(r,e,t),e},He=[],Le=(r,t,e)=>{var o=((r,t)=>{var e;for(He.length=0;e=n()[r++];)t+=105!=e&&t%8?4:0,He.push(105==e?i()[t>>2]:u()[t>>3]),t+=105==e?4:8;return He})(t,e);return ir[r].apply(null,o)};ze=()=>performance.timeOrigin+performance.now();var Be=r=>{var t=(r-T.buffer.byteLength+65535)/65536;try{return T.grow(t),I(),1}catch(r){}},Ve={},Ye=()=>{if(!Ye.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:v||"./this.program"};for(var t in Ve)void 0===Ve[t]?delete r[t]:r[t]=Ve[t];var e=[];for(var t in r)e.push(`${t}=${r[t]}`);Ye.strings=e}return Ye.strings},qe=function(r,t){if(w)return $e(15,1,r,t);var n=0;return Ye().forEach(((o,a)=>{var i=t+n;s()[r+4*a>>2]=i,((r,t)=>{for(var n=0;n<r.length;++n)e()[t++>>0]=r.charCodeAt(n);e()[t>>0]=0})(o,i),n+=o.length+1})),0},Xe=function(r,t){if(w)return $e(16,1,r,t);var e=Ye();s()[r>>2]=e.length;var n=0;return e.forEach((r=>n+=r.length+1)),s()[t>>2]=n,0};function Ge(r){if(w)return $e(17,1,r);try{var t=Pr.getStreamFromFD(r);return Cr.close(t),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}function Ke(r,t){if(w)return $e(18,1,r,t);try{var n=Pr.getStreamFromFD(r),a=n.tty?2:Cr.isDir(n.mode)?3:Cr.isLink(n.mode)?7:4;return e()[t>>0]=a,o()[t+2>>1]=0,er=[0,(tr=0,+Math.abs(tr)>=1?tr>0?+Math.floor(tr/4294967296)>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],i()[t+8>>2]=er[0],i()[t+12>>2]=er[1],er=[0,(tr=0,+Math.abs(tr)>=1?tr>0?+Math.floor(tr/4294967296)>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],i()[t+16>>2]=er[0],i()[t+20>>2]=er[1],0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}function Qe(r,t,n,o){if(w)return $e(19,1,r,t,n,o);try{var a=((r,t,n,o)=>{for(var a=0,i=0;i<n;i++){var u=s()[t>>2],c=s()[t+4>>2];t+=8;var l=Cr.read(r,e(),u,c,o);if(l<0)return-1;if(a+=l,l<c)break;"undefined"!=typeof o&&(o+=l)}return a})(Pr.getStreamFromFD(r),t,n);return s()[o>>2]=a,0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}function Je(r,t,e,n,o){if(w)return $e(20,1,r,t,e,n,o);var a=je(t,e);try{if(isNaN(a))return 61;var s=Pr.getStreamFromFD(r);return Cr.llseek(s,a,n),er=[s.position>>>0,(tr=s.position,+Math.abs(tr)>=1?tr>0?+Math.floor(tr/4294967296)>>>0:~~+Math.ceil((tr-+(~~tr>>>0))/4294967296)>>>0:0)],i()[o>>2]=er[0],i()[o+4>>2]=er[1],s.getdents&&0===a&&0===n&&(s.getdents=null),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}function Ze(r,t,n,o){if(w)return $e(21,1,r,t,n,o);try{var a=((r,t,n,o)=>{for(var a=0,i=0;i<n;i++){var u=s()[t>>2],c=s()[t+4>>2];t+=8;var l=Cr.write(r,e(),u,c,o);if(l<0)return-1;a+=l,"undefined"!=typeof o&&(o+=l)}return a})(Pr.getStreamFromFD(r),t,n);return s()[o>>2]=a,0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}var rn=[31,29,31,30,31,30,31,31,30,31,30,31],tn=[31,28,31,30,31,30,31,31,30,31,30,31],en=(r,t,n,o)=>{var a=s()[o+40>>2],u={tm_sec:i()[o>>2],tm_min:i()[o+4>>2],tm_hour:i()[o+8>>2],tm_mday:i()[o+12>>2],tm_mon:i()[o+16>>2],tm_year:i()[o+20>>2],tm_wday:i()[o+24>>2],tm_yday:i()[o+28>>2],tm_isdst:i()[o+32>>2],tm_gmtoff:i()[o+36>>2],tm_zone:a?$r(a):""},c=$r(n),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 f in l)c=c.replace(new RegExp(f,"g"),l[f]);var d=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function p(r,t,e){for(var n="number"==typeof r?r.toString():r||"";n.length<t;)n=e[0]+n;return n}function m(r,t){return p(r,t,"0")}function v(r,t){function e(r){return r<0?-1:r>0?1:0}var n;return 0===(n=e(r.getFullYear()-t.getFullYear()))&&0===(n=e(r.getMonth()-t.getMonth()))&&(n=e(r.getDate()-t.getDate())),n}function y(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function w(r){var t=((r,t)=>{for(var e=new Date(r.getTime());t>0;){var n=Oe(e.getFullYear()),o=e.getMonth(),a=(n?rn:tn)[o];if(!(t>a-e.getDate()))return e.setDate(e.getDate()+t),e;t-=a-e.getDate()+1,e.setDate(1),o<11?e.setMonth(o+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return e})(new Date(r.tm_year+1900,0,1),r.tm_yday),e=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=y(e),a=y(n);return v(o,t)<=0?v(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var g={"%a":r=>d[r.tm_wday].substring(0,3),"%A":r=>d[r.tm_wday],"%b":r=>h[r.tm_mon].substring(0,3),"%B":r=>h[r.tm_mon],"%C":r=>m((r.tm_year+1900)/100|0,2),"%d":r=>m(r.tm_mday,2),"%e":r=>p(r.tm_mday,2," "),"%g":r=>w(r).toString().substring(2),"%G":r=>w(r),"%H":r=>m(r.tm_hour,2),"%I":r=>{var t=r.tm_hour;return 0==t?t=12:t>12&&(t-=12),m(t,2)},"%j":r=>m(r.tm_mday+((r,t)=>{for(var e=0,n=0;n<=t;e+=r[n++]);return e})(Oe(r.tm_year+1900)?rn:tn,r.tm_mon-1),3),"%m":r=>m(r.tm_mon+1,2),"%M":r=>m(r.tm_min,2),"%n":()=>"\n","%p":r=>r.tm_hour>=0&&r.tm_hour<12?"AM":"PM","%S":r=>m(r.tm_sec,2),"%t":()=>"\t","%u":r=>r.tm_wday||7,"%U":r=>{var t=r.tm_yday+7-r.tm_wday;return m(Math.floor(t/7),2)},"%V":r=>{var t=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&t++,t){if(53==t){var e=(r.tm_wday+371-r.tm_yday)%7;4==e||3==e&&Oe(r.tm_year)||(t=1)}}else{t=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&Oe(r.tm_year%400-1))&&t++}return m(t,2)},"%w":r=>r.tm_wday,"%W":r=>{var t=r.tm_yday+7-(r.tm_wday+6)%7;return m(Math.floor(t/7),2)},"%y":r=>(r.tm_year+1900).toString().substring(2),"%Y":r=>r.tm_year+1900,"%z":r=>{var t=r.tm_gmtoff,e=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(e?"+":"-")+String("0000"+t).slice(-4)},"%Z":r=>r.tm_zone,"%%":()=>"%"};for(var f in c=c.replace(/%%/g,"\0\0"),g)c.includes(f)&&(c=c.replace(new RegExp(f,"g"),g[f](u)));var _,b,E=gr(c=c.replace(/\0\0/g,"%"),!1);return E.length>t?0:(_=E,b=r,e().set(_,b),E.length-1)},nn=Ue;Dr.init();var on,an,sn,un=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Cr.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n},cn=365,ln=146;Object.defineProperties(un.prototype,{read:{get:function(){return(this.mode&cn)===cn},set:function(r){r?this.mode|=cn:this.mode&=-366}},write:{get:function(){return(this.mode&ln)===ln},set:function(r){r?this.mode|=ln:this.mode&=-147}},isFolder:{get:function(){return Cr.isDir(this.mode)}},isDevice:{get:function(){return Cr.isChrdev(this.mode)}}}),Cr.FSNode=un,Cr.createPreloadedFile=(r,t,e,n,o,a,i,s,u,c)=>{var l=t?hr.resolve(fr.join2(r,t)):r;function f(e){function f(e){c&&c(),s||Cr.createDataFile(r,t,e,n,o,u),a&&a(),J()}((r,t,e,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return kr.forEach((a=>{o||a.canHandle(t)&&(a.handle(r,t,e,n),o=!0)})),o})(e,l,f,(()=>{i&&i(),J()}))||f(e)}Q(),"string"==typeof e?((r,t,e,n)=>{var o=n?"":`al ${r}`;h(r,(e=>{R(e,`Loading data file "${r}" failed (no arrayBuffer).`),t(new Uint8Array(e)),o&&J()}),(t=>{if(!e)throw`Loading data file "${r}" failed.`;e()})),o&&Q()})(e,(r=>f(r)),i):f(e)},Cr.staticInit(),at=f.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},(()=>{for(var r=new Array(256),t=0;t<256;++t)r[t]=String.fromCharCode(t);ut=r})(),lt=f.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},xt.prototype.isAliasOf=pt,xt.prototype.clone=Mt,xt.prototype.delete=Wt,xt.prototype.isDeleted=jt,xt.prototype.deleteLater=Ot,f.getInheritedInstanceCount=bt,f.getLiveInheritedInstances=Et,f.flushPendingDeletes=Tt,f.setDelayFunction=$t,Kt.prototype.getPointee=qt,Kt.prototype.destructor=Xt,Kt.prototype.argPackAdvance=ht,Kt.prototype.readValueFromPointer=Yt,Kt.prototype.deleteObject=Gt,Kt.prototype.fromWireType=At,re=f.UnboundTypeError=(on=Error,(sn=It(an="UnboundTypeError",(function(r){this.name=an,this.message=r;var t=new Error(r).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(on.prototype),sn.prototype.constructor=sn,sn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},sn),Object.assign(ie.prototype,{get(r){return this.allocated[r]},has(r){return void 0!==this.allocated[r]},allocate(r){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=r,t},free(r){this.allocated[r]=void 0,this.freelist.push(r)}}),se.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),se.reserved=se.allocated.length,f.count_emval_handles=ce;var fn,dn=[Sr,Wr,Hr,Br,Vr,Yr,qr,function(r,t){if(w)return $e(7,1,r,t);try{return r=Pr.getStr(r),Pr.doStat(Cr.lstat,r,t)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}},Xr,Gr,Kr,Qr,Jr,Ie,Ne,qe,Xe,Ge,Ke,Qe,Je,Ze],hn={p:(r,t,e,n)=>{Z(`Assertion failed: ${$r(r)}, at: `+[t?$r(t):"unknown filename",e,n?$r(n):"unknown function"])},v:r=>{var t=new Nr(r);return t.get_caught()||(t.set_caught(!0),Rr--),t.set_rethrown(!1),xr.push(t),Wn(t.excPtr),t.get_exception_ptr()},Zb:()=>{if(!xr.length)return 0;var r=xr[xr.length-1];return Wn(r.excPtr),r.excPtr},B:()=>{Pn(0,0);var r=xr.pop();Mn(r.excPtr),Ir=0},b:()=>zr([]),i:r=>zr([r]),x:(r,t)=>zr([r,t]),Za:Ur,Yb:r=>{if(r){var t=new Nr(r);xr.push(t),t.set_rethrown(!0),Ur()}},r:(r,t,e)=>{throw new Nr(r).init(t,e),Rr++,Ir=r},_b:()=>Rr,kc:r=>{En(r,!1,1,!0,4194304,!1),Dr.threadInitTLS()},$a:r=>{w?postMessage({cmd:"cleanupThread",thread:r}):cr(r)},hc:Lr,d:r=>{throw Ir||(Ir=r),Ir},ec:Br,cb:Vr,qc:Yr,rc:qr,oc:Xr,db:Gr,fc:Kr,pc:Qr,gc:Jr,Db:r=>{var t=Zr[r];delete Zr[r];var e=t.rawConstructor,n=t.rawDestructor,o=t.fields,a=o.map((r=>r.getterReturnType)).concat(o.map((r=>r.setterArgumentType)));st([r],a,(r=>{var a={};return o.forEach(((t,e)=>{var n=t.fieldName,i=r[e],s=t.getter,u=t.getterContext,c=r[e+o.length],l=t.setter,f=t.setterContext;a[n]={read:r=>i.fromWireType(s(u,r)),write:(r,t)=>{var e=[];l(f,r,c.toWireType(e,t)),rt(e)}}})),[{name:t.name,fromWireType:r=>{var t={};for(var e in a)t[e]=a[e].read(r);return n(r),t},toWireType:(r,t)=>{for(var o in a)if(!(o in t))throw new TypeError(`Missing field: "${o}"`);var i=e();for(o in a)a[o].write(i,t[o]);return null!==r&&r.push(n,i),i},argPackAdvance:ht,readValueFromPointer:tt,destructorFunction:n}]}))},Pb:(r,t,e,n,o)=>{},wc:(r,t,e,o)=>{dt(r,{name:t=ct(t),fromWireType:function(r){return!!r},toWireType:function(r,t){return t?e:o},argPackAdvance:ht,readValueFromPointer:function(r){return this.fromWireType(n()[r])},destructorFunction:null})},ba:(r,t,e,n,o,a,i,s,u,c,l,f,d)=>{l=ct(l),a=Zt(o,a),s&&(s=Zt(i,s)),c&&(c=Zt(u,c)),d=Zt(f,d);var h=Rt(l);zt(h,(function(){ee(`Cannot construct ${l} due to unbound types`,[n])})),st([r,t,e],n?[n]:[],(function(t){var e,o;t=t[0],o=n?(e=t.registeredClass).instancePrototype:xt.prototype;var i=It(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new lt("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new lt(l+" has no accessible constructor");var r=f.constructor_body[arguments.length];if(void 0===r)throw new lt(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(f.constructor_body).toString()}) parameters instead!`);return r.apply(this,arguments)})),u=Object.create(o,{constructor:{value:i}});i.prototype=u;var f=new Ut(l,i,u,d,e,a,s,c);f.baseClass&&(void 0===f.baseClass.__derivedClasses&&(f.baseClass.__derivedClasses=[]),f.baseClass.__derivedClasses.push(f));var p=new Kt(l,f,!0,!1,!1),m=new Kt(l+"*",f,!1,!1,!1),v=new Kt(l+" const*",f,!1,!0,!1);return _t[r]={pointerType:m,constPointerType:v},Qt(h,i),[p,m,v]}))},aa:(r,t,e,n,o,a)=>{var i=ne(t,e);o=Zt(n,o),st([],[r],(function(r){var e=`constructor ${(r=r[0]).name}`;if(void 0===r.registeredClass.constructor_body&&(r.registeredClass.constructor_body=[]),void 0!==r.registeredClass.constructor_body[t-1])throw new lt(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${r.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return r.registeredClass.constructor_body[t-1]=()=>{ee(`Cannot construct ${r.name} due to unbound types`,i)},st([],i,(n=>(n.splice(1,0,null),r.registeredClass.constructor_body[t-1]=ae(e,n,null,o,a),[]))),[]}))},V:(r,t,e,n,o,a,i,s,u)=>{var c=ne(e,n);t=ct(t),a=Zt(o,a),st([],[r],(function(r){var n=`${(r=r[0]).name}.${t}`;function o(){ee(`Cannot call ${n} due to unbound types`,c)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&r.registeredClass.pureVirtualFunctions.push(t);var l=r.registeredClass.instancePrototype,f=l[t];return void 0===f||void 0===f.overloadTable&&f.className!==r.name&&f.argCount===e-2?(o.argCount=e-2,o.className=r.name,l[t]=o):(Nt(l,t,n),l[t].overloadTable[e-2]=o),st([],c,(function(o){var s=ae(n,o,r,a,i,u);return void 0===l[t].overloadTable?(s.argCount=e-2,l[t]=s):l[t].overloadTable[e-2]=s,[]})),[]}))},vc:(r,t)=>{dt(r,{name:t=ct(t),fromWireType:r=>{var t=le.toValue(r);return ue(r),t},toWireType:(r,t)=>le.toHandle(t),argPackAdvance:ht,readValueFromPointer:tt,destructorFunction:null})},fb:(r,t,e)=>{dt(r,{name:t=ct(t),fromWireType:r=>r,toWireType:(r,t)=>t,argPackAdvance:ht,readValueFromPointer:de(t,e),destructorFunction:null})},Z:(r,t,e,n,o,a,i)=>{var s=ne(t,e);r=ct(r),o=Zt(n,o),zt(r,(function(){ee(`Cannot call ${r} due to unbound types`,s)}),t-1),st([],s,(function(e){var n=[e[0],null].concat(e.slice(1));return Qt(r,ae(r,n,null,o,a,i),t-1),[]}))},ca:(r,t,e,n,o)=>{t=ct(t),-1===o&&(o=4294967295);var a=r=>r;if(0===n){var i=32-8*e;a=r=>r<<i>>>i}var s=t.includes("unsigned");dt(r,{name:t,fromWireType:a,toWireType:s?function(r,t){return this.name,t>>>0}:function(r,t){return this.name,t},argPackAdvance:ht,readValueFromPointer:he(t,e,0!==n),destructorFunction:null})},P:(r,t,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function a(r){var t=s()[r>>2],n=s()[r+4>>2];return new o(e().buffer,n,t)}dt(r,{name:n=ct(n),fromWireType:a,argPackAdvance:ht,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},eb:(r,t)=>{var e="std::string"===(t=ct(t));dt(r,{name:t,fromWireType:r=>{var t,o=s()[r>>2],a=r+4;if(e)for(var i=a,u=0;u<=o;++u){var c=a+u;if(u==o||0==n()[c]){var l=$r(i,c-i);void 0===t?t=l:(t+=String.fromCharCode(0),t+=l),i=c+1}}else{var f=new Array(o);for(u=0;u<o;++u)f[u]=String.fromCharCode(n()[a+u]);t=f.join("")}return vn(r),t},toWireType:(r,t)=>{var o;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var a="string"==typeof t;a||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||ft("Cannot pass non-string to std::string"),o=e&&a?yr(t):t.length;var i=mn(4+o+1),u=i+4;if(s()[i>>2]=o,e&&a)pe(t,u,o+1);else if(a)for(var c=0;c<o;++c){var l=t.charCodeAt(c);l>255&&(vn(u),ft("String has UTF-16 code units that do not fit in 8 bits")),n()[u+c]=l}else for(c=0;c<o;++c)n()[u+c]=t[c];return null!==r&&r.push(vn,i),i},argPackAdvance:ht,readValueFromPointer:Yt,destructorFunction:r=>vn(r)})},Pa:(r,t,e)=>{var n,o,i,u,c;e=ct(e),2===t?(n=ve,o=ye,u=we,i=()=>a(),c=1):4===t&&(n=ge,o=_e,u=be,i=()=>s(),c=2),dt(r,{name:e,fromWireType:r=>{for(var e,o=s()[r>>2],a=i(),u=r+4,l=0;l<=o;++l){var f=r+4+l*t;if(l==o||0==a[f>>c]){var d=n(u,f-u);void 0===e?e=d:(e+=String.fromCharCode(0),e+=d),u=f+t}}return vn(r),e},toWireType:(r,n)=>{"string"!=typeof n&&ft(`Cannot pass non-string to C++ string type ${e}`);var a=u(n),i=mn(4+a+t);return s()[i>>2]=a>>c,o(n,i+4,a+t),null!==r&&r.push(vn,i),i},argPackAdvance:ht,readValueFromPointer:tt,destructorFunction:r=>vn(r)})},Eb:(r,t,e,n,o,a)=>{Zr[r]={name:ct(t),rawConstructor:Zt(e,n),rawDestructor:Zt(o,a),fields:[]}},Cb:(r,t,e,n,o,a,i,s,u,c)=>{Zr[r].fields.push({fieldName:ct(t),getterReturnType:e,getter:Zt(n,o),getterContext:a,setterArgumentType:i,setter:Zt(s,u),setterContext:c})},xc:(r,t)=>{dt(r,{isVoid:!0,name:t=ct(t),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,t)=>{}})},uc:()=>true,cc:(r,t,e)=>{if(r==t)setTimeout((()=>Te()));else if(w)postMessage({targetThread:r,cmd:"checkMailbox"});else{var n=Dr.pthreads[r];if(!n)return;n.postMessage({cmd:"checkMailbox"})}},ic:(r,t,e,n)=>{Pe.length=e;for(var o=n>>3,a=0;a<e;a++)Pe[a]=u()[o+a];var i=r<0?ir[-r-1]:dn[r];Dr.currentProxiedOperationCallerThread=t;var s=i.apply(null,Pe);return Dr.currentProxiedOperationCallerThread=0,s},jc:ke,tc:r=>{},$b:()=>{throw 1/0},la:(r,t,e)=>{r=le.toValue(r),t=Se(t,"emval::as");var n=[],o=le.toHandle(n);return s()[e>>2]=o,t.toWireType(n,r)},Ma:(r,t,e,n,o)=>(r=De[r])(t=le.toValue(t),e=Ae(e),(r=>{var t=[];return s()[r>>2]=le.toHandle(t),t})(n),o),La:(r,t,e,n)=>{(r=De[r])(t=le.toValue(t),e=Ae(e),null,n)},yc:ue,yb:r=>0===r?le.toHandle(Me()):(r=Ae(r),le.toHandle(Me()[r])),ka:(r,t)=>{var e=((r,t)=>{for(var e=new Array(r),n=0;n<r;++n)e[n]=Se(s()[t+4*n>>2],"parameter "+n);return e})(r,t),n=e[0],o=n.name+"_$"+e.slice(1).map((function(r){return r.name})).join("_")+"$",a=We[o];if(void 0!==a)return a;for(var i=["retType"],u=[n],c="",l=0;l<r-1;++l)c+=(0!==l?", ":"")+"arg"+l,i.push("argType"+l),u.push(e[1+l]);var f="return function "+Rt("methodCaller_"+o)+"(handle, name, destructors, args) {\n",d=0;for(l=0;l<r-1;++l)f+=" var arg"+l+" = argType"+l+".readValueFromPointer(args"+(d?"+"+d:"")+");\n",d+=e[l+1].argPackAdvance;f+=" var rv = handle[name]("+c+");\n";for(l=0;l<r-1;++l)e[l+1].deleteObject&&(f+=" argType"+l+".deleteObject(arg"+l+");\n");n.isVoid||(f+=" return retType.toWireType(destructors, rv);\n"),f+="};\n",i.push(f);var h,p,m=oe(Function,i).apply(null,u);return h=m,p=De.length,De.push(h),a=p,We[o]=a,a},Tb:(r,t)=>(r=le.toValue(r),t=le.toValue(t),le.toHandle(r[t])),s:r=>{r>4&&(se.get(r).refcount+=1)},L:()=>le.toHandle([]),da:r=>le.toHandle(Ae(r)),y:()=>le.toHandle({}),Fb:r=>{var t=le.toValue(r);rt(t),ue(r)},Fc:(r,t,e)=>{r=le.toValue(r),t=le.toValue(t),e=le.toValue(e),r[t]=e},$:(r,t)=>{var e=(r=Se(r,"_emval_take_value")).readValueFromPointer(t);return le.toHandle(e)},Mb:function(r,t,e){var n=je(r,t),o=new Date(1e3*n);i()[e>>2]=o.getUTCSeconds(),i()[e+4>>2]=o.getUTCMinutes(),i()[e+8>>2]=o.getUTCHours(),i()[e+12>>2]=o.getUTCDate(),i()[e+16>>2]=o.getUTCMonth(),i()[e+20>>2]=o.getUTCFullYear()-1900,i()[e+24>>2]=o.getUTCDay();var a=Date.UTC(o.getUTCFullYear(),0,1,0,0,0,0),s=(o.getTime()-a)/864e5|0;i()[e+28>>2]=s},Nb:function(r,t,e){var n=je(r,t),o=new Date(1e3*n);i()[e>>2]=o.getSeconds(),i()[e+4>>2]=o.getMinutes(),i()[e+8>>2]=o.getHours(),i()[e+12>>2]=o.getDate(),i()[e+16>>2]=o.getMonth(),i()[e+20>>2]=o.getFullYear()-1900,i()[e+24>>2]=o.getDay();var a=0|(r=>(Oe(r.getFullYear())?xe:Re)[r.getMonth()]+r.getDate()-1)(o);i()[e+28>>2]=a,i()[e+36>>2]=-60*o.getTimezoneOffset();var s=new Date(o.getFullYear(),0,1),u=new Date(o.getFullYear(),6,1).getTimezoneOffset(),c=s.getTimezoneOffset(),l=0|(u!=c&&o.getTimezoneOffset()==Math.min(c,u));i()[e+32>>2]=l},Kb:Ie,Lb:Ne,bc:(r,t,e)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),u=o.getTimezoneOffset(),c=a.getTimezoneOffset(),l=Math.max(u,c);function f(r){var t=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}s()[r>>2]=60*l,i()[t>>2]=Number(u!=c);var d=f(o),h=f(a),p=Ue(d),m=Ue(h);c<u?(s()[e>>2]=p,s()[e+4>>2]=m):(s()[e>>2]=m,s()[e+4>>2]=p)},F:()=>{Z("")},zb:(r,t,e)=>Le(r,t,e),ab:()=>{},ra:()=>Date.now(),sc:()=>{throw B+=1,"unwind"},dc:()=>2147483648,Y:ze,hb:()=>navigator.hardwareConcurrency,ac:r=>{var t=n().length;if((r>>>=0)<=t)return!1;var e=2147483648;if(r>e)return!1;for(var o,a,i=1;i<=4;i*=2){var s=t*(1+.2/i);s=Math.min(s,r+100663296);var u=Math.min(e,(o=Math.max(r,s))+((a=65536)-o%a)%a);if(Be(u))return!0}return!1},mc:qe,nc:Xe,gb:Fr,Oa:Ge,lc:Ke,bb:Qe,Ob:Je,Na:Ze,Bb:function(){return nn(location.toString())},Wb:(r,t)=>(dr(n().subarray(r,r+t)),0),Ab:function(){return nn((r=Yn,self[r(268,"R8YN")][r(261,"qY8s")]()));var r},_:function(r,t){var e=Fn();try{return jr(r)(t)}catch(r){if(An(e),r!==r+0)throw r;Pn(1,0)}},Ec:function(r,t,e){var n=Fn();try{return jr(r)(t,e)}catch(r){if(An(n),r!==r+0)throw r;Pn(1,0)}},ob:function(r,t,e){var n=Fn();try{return jr(r)(t,e)}catch(r){if(An(n),r!==r+0)throw r;Pn(1,0)}},U:function(r,t,e,n,o,a){var i=Fn();try{return jr(r)(t,e,n,o,a)}catch(r){if(An(i),r!==r+0)throw r;Pn(1,0)}},G:function(r,t,e,n){var o=Fn();try{return jr(r)(t,e,n)}catch(r){if(An(o),r!==r+0)throw r;Pn(1,0)}},Sa:function(r,t,e,n,o,a){var i=Fn();try{return jr(r)(t,e,n,o,a)}catch(r){if(An(i),r!==r+0)throw r;Pn(1,0)}},ub:function(r,t,e,n,o,a,i,s){var u=Fn();try{return jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},Hc:function(r,t){var e=Fn();try{return jr(r)(t)}catch(r){if(An(e),r!==r+0)throw r;Pn(1,0)}},t:function(r,t){var e=Fn();try{return jr(r)(t)}catch(r){if(An(e),r!==r+0)throw r;Pn(1,0)}},Ca:function(r,t,e){var n=Fn();try{return jr(r)(t,e)}catch(r){if(An(n),r!==r+0)throw r;Pn(1,0)}},E:function(r,t,e){var n=Fn();try{return jr(r)(t,e)}catch(r){if(An(n),r!==r+0)throw r;Pn(1,0)}},na:function(r,t,e,n){var o=Fn();try{return jr(r)(t,e,n)}catch(r){if(An(o),r!==r+0)throw r;Pn(1,0)}},X:function(r,t,e,n){var o=Fn();try{return jr(r)(t,e,n)}catch(r){if(An(o),r!==r+0)throw r;Pn(1,0)}},pa:function(r,t,e,n,o){var a=Fn();try{return jr(r)(t,e,n,o)}catch(r){if(An(a),r!==r+0)throw r;Pn(1,0)}},w:function(r){var t=Fn();try{return jr(r)()}catch(r){if(An(t),r!==r+0)throw r;Pn(1,0)}},j:function(r,t){var e=Fn();try{return jr(r)(t)}catch(r){if(An(e),r!==r+0)throw r;Pn(1,0)}},pb:function(r,t,e){var n=Fn();try{return jr(r)(t,e)}catch(r){if(An(n),r!==r+0)throw r;Pn(1,0)}},ib:function(r,t,e,n){var o=Fn();try{return jr(r)(t,e,n)}catch(r){if(An(o),r!==r+0)throw r;Pn(1,0)}},wa:function(r,t,e){var n=Fn();try{return jr(r)(t,e)}catch(r){if(An(n),r!==r+0)throw r;Pn(1,0)}},Ic:function(r,t,e,n){var o=Fn();try{return jr(r)(t,e,n)}catch(r){if(An(o),r!==r+0)throw r;Pn(1,0)}},Kc:function(r,t,e,n,o){var a=Fn();try{return jr(r)(t,e,n,o)}catch(r){if(An(a),r!==r+0)throw r;Pn(1,0)}},Jc:function(r,t,e,n,o,a,i,s){var u=Fn();try{return jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},Oc:function(r,t,e,n,o,a,i,s,u){var c=Fn();try{return jr(r)(t,e,n,o,a,i,s,u)}catch(r){if(An(c),r!==r+0)throw r;Pn(1,0)}},c:function(r,t,e){var n=Fn();try{return jr(r)(t,e)}catch(r){if(An(n),r!==r+0)throw r;Pn(1,0)}},Ua:function(r,t,e,n){var o=Fn();try{return jr(r)(t,e,n)}catch(r){if(An(o),r!==r+0)throw r;Pn(1,0)}},Gc:function(r,t,e,n,o){var a=Fn();try{return jr(r)(t,e,n,o)}catch(r){if(An(a),r!==r+0)throw r;Pn(1,0)}},h:function(r,t,e,n){var o=Fn();try{return jr(r)(t,e,n)}catch(r){if(An(o),r!==r+0)throw r;Pn(1,0)}},ga:function(r,t,e,n,o){var a=Fn();try{return jr(r)(t,e,n,o)}catch(r){if(An(a),r!==r+0)throw r;Pn(1,0)}},ya:function(r,t,e,n,o){var a=Fn();try{return jr(r)(t,e,n,o)}catch(r){if(An(a),r!==r+0)throw r;Pn(1,0)}},l:function(r,t,e,n,o){var a=Fn();try{return jr(r)(t,e,n,o)}catch(r){if(An(a),r!==r+0)throw r;Pn(1,0)}},_a:function(r,t,e,n,o,a){var i=Fn();try{return jr(r)(t,e,n,o,a)}catch(r){if(An(i),r!==r+0)throw r;Pn(1,0)}},kb:function(r,t,e,n,o,a,i){var s=Fn();try{return jr(r)(t,e,n,o,a,i)}catch(r){if(An(s),r!==r+0)throw r;Pn(1,0)}},o:function(r,t,e,n,o,a){var i=Fn();try{return jr(r)(t,e,n,o,a)}catch(r){if(An(i),r!==r+0)throw r;Pn(1,0)}},C:function(r,t,e,n,o,a,i){var s=Fn();try{return jr(r)(t,e,n,o,a,i)}catch(r){if(An(s),r!==r+0)throw r;Pn(1,0)}},mb:function(r,t,e,n,o,a,i,s){var u=Fn();try{return jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},ua:function(r,t,e,n,o,a,i,s){var u=Fn();try{return jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},K:function(r,t,e,n,o,a,i,s,u){var c=Fn();try{return jr(r)(t,e,n,o,a,i,s,u)}catch(r){if(An(c),r!==r+0)throw r;Pn(1,0)}},ha:function(r,t,e,n,o,a,i,s,u,c){var l=Fn();try{return jr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(An(l),r!==r+0)throw r;Pn(1,0)}},Ka:function(r,t,e,n,o,a,i,s,u,c,l){var f=Fn();try{return jr(r)(t,e,n,o,a,i,s,u,c,l)}catch(r){if(An(f),r!==r+0)throw r;Pn(1,0)}},Ea:function(r,t,e,n,o,a,i,s,u,c,l,f){var d=Fn();try{return jr(r)(t,e,n,o,a,i,s,u,c,l,f)}catch(r){if(An(d),r!==r+0)throw r;Pn(1,0)}},Hb:function(r,t,e,n,o,a,i){var s=Fn();try{return Ln(r,t,e,n,o,a,i)}catch(r){if(An(s),r!==r+0)throw r;Pn(1,0)}},Ub:function(r,t,e,n){var o=Fn();try{return In(r,t,e,n)}catch(r){if(An(o),r!==r+0)throw r;Pn(1,0)}},Jb:function(r){var t=Fn();try{return Un(r)}catch(r){if(An(t),r!==r+0)throw r;Pn(1,0)}},Vb:function(r,t){var e=Fn();try{return xn(r,t)}catch(r){if(An(e),r!==r+0)throw r;Pn(1,0)}},Ib:function(r,t,e){var n=Fn();try{return Hn(r,t,e)}catch(r){if(An(n),r!==r+0)throw r;Pn(1,0)}},Sb:function(r,t,e,n){var o=Fn();try{return Nn(r,t,e,n)}catch(r){if(An(o),r!==r+0)throw r;Pn(1,0)}},Gb:function(r,t,e,n,o){var a=Fn();try{return Bn(r,t,e,n,o)}catch(r){if(An(a),r!==r+0)throw r;Pn(1,0)}},n:function(r){var t=Fn();try{jr(r)()}catch(r){if(An(t),r!==r+0)throw r;Pn(1,0)}},e:function(r,t){var e=Fn();try{jr(r)(t)}catch(r){if(An(e),r!==r+0)throw r;Pn(1,0)}},Fa:function(r,t,e){var n=Fn();try{jr(r)(t,e)}catch(r){if(An(n),r!==r+0)throw r;Pn(1,0)}},Ga:function(r,t,e,n){var o=Fn();try{jr(r)(t,e,n)}catch(r){if(An(o),r!==r+0)throw r;Pn(1,0)}},ma:function(r,t,e,n,o,a,i,s){var u=Fn();try{jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},qa:function(r,t,e){var n=Fn();try{jr(r)(t,e)}catch(r){if(An(n),r!==r+0)throw r;Pn(1,0)}},Ya:function(r,t,e,n,o,a,i){var s=Fn();try{jr(r)(t,e,n,o,a,i)}catch(r){if(An(s),r!==r+0)throw r;Pn(1,0)}},f:function(r,t,e){var n=Fn();try{jr(r)(t,e)}catch(r){if(An(n),r!==r+0)throw r;Pn(1,0)}},I:function(r,t,e,n){var o=Fn();try{jr(r)(t,e,n)}catch(r){if(An(o),r!==r+0)throw r;Pn(1,0)}},Ba:function(r,t,e,n,o){var a=Fn();try{jr(r)(t,e,n,o)}catch(r){if(An(a),r!==r+0)throw r;Pn(1,0)}},Qa:function(r,t,e,n,o,a){var i=Fn();try{jr(r)(t,e,n,o,a)}catch(r){if(An(i),r!==r+0)throw r;Pn(1,0)}},Lc:function(r,t,e,n,o,a,i,s){var u=Fn();try{jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},xa:function(r,t,e,n,o,a,i){var s=Fn();try{jr(r)(t,e,n,o,a,i)}catch(r){if(An(s),r!==r+0)throw r;Pn(1,0)}},S:function(r,t,e,n,o,a,i,s){var u=Fn();try{jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},Ha:function(r,t,e,n,o){var a=Fn();try{jr(r)(t,e,n,o)}catch(r){if(An(a),r!==r+0)throw r;Pn(1,0)}},Ac:function(r,t,e,n,o,a,i,s){var u=Fn();try{jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},N:function(r,t,e,n){var o=Fn();try{jr(r)(t,e,n)}catch(r){if(An(o),r!==r+0)throw r;Pn(1,0)}},ja:function(r,t,e,n,o){var a=Fn();try{jr(r)(t,e,n,o)}catch(r){if(An(a),r!==r+0)throw r;Pn(1,0)}},Nc:function(r,t,e,n,o,a,i,s,u){var c=Fn();try{jr(r)(t,e,n,o,a,i,s,u)}catch(r){if(An(c),r!==r+0)throw r;Pn(1,0)}},Aa:function(r,t,e,n,o){var a=Fn();try{jr(r)(t,e,n,o)}catch(r){if(An(a),r!==r+0)throw r;Pn(1,0)}},ea:function(r,t,e,n,o,a){var i=Fn();try{jr(r)(t,e,n,o,a)}catch(r){if(An(i),r!==r+0)throw r;Pn(1,0)}},Va:function(r,t,e,n,o,a,i,s){var u=Fn();try{jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},Xa:function(r,t,e,n,o,a,i,s,u){var c=Fn();try{jr(r)(t,e,n,o,a,i,s,u)}catch(r){if(An(c),r!==r+0)throw r;Pn(1,0)}},g:function(r,t,e,n){var o=Fn();try{jr(r)(t,e,n)}catch(r){if(An(o),r!==r+0)throw r;Pn(1,0)}},nb:function(r,t,e,n,o){var a=Fn();try{jr(r)(t,e,n,o)}catch(r){if(An(a),r!==r+0)throw r;Pn(1,0)}},z:function(r,t,e,n,o,a){var i=Fn();try{jr(r)(t,e,n,o,a)}catch(r){if(An(i),r!==r+0)throw r;Pn(1,0)}},vb:function(r,t,e,n,o,a,i){var s=Fn();try{jr(r)(t,e,n,o,a,i)}catch(r){if(An(s),r!==r+0)throw r;Pn(1,0)}},Mc:function(r,t,e,n,o,a,i,s,u,c,l){var f=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c,l)}catch(r){if(An(f),r!==r+0)throw r;Pn(1,0)}},A:function(r,t,e,n,o,a,i){var s=Fn();try{jr(r)(t,e,n,o,a,i)}catch(r){if(An(s),r!==r+0)throw r;Pn(1,0)}},sa:function(r,t,e,n,o,a){var i=Fn();try{jr(r)(t,e,n,o,a)}catch(r){if(An(i),r!==r+0)throw r;Pn(1,0)}},H:function(r,t,e,n,o){var a=Fn();try{jr(r)(t,e,n,o)}catch(r){if(An(a),r!==r+0)throw r;Pn(1,0)}},ta:function(r,t,e,n,o,a,i){var s=Fn();try{jr(r)(t,e,n,o,a,i)}catch(r){if(An(s),r!==r+0)throw r;Pn(1,0)}},va:function(r,t,e,n,o,a,i,s,u,c){var l=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(An(l),r!==r+0)throw r;Pn(1,0)}},qb:function(r,t,e,n,o,a,i,s){var u=Fn();try{jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},W:function(r,t,e,n,o,a){var i=Fn();try{jr(r)(t,e,n,o,a)}catch(r){if(An(i),r!==r+0)throw r;Pn(1,0)}},rb:function(r,t,e,n,o,a,i){var s=Fn();try{jr(r)(t,e,n,o,a,i)}catch(r){if(An(s),r!==r+0)throw r;Pn(1,0)}},Wa:function(r,t,e,n,o,a,i,s,u){var c=Fn();try{jr(r)(t,e,n,o,a,i,s,u)}catch(r){if(An(c),r!==r+0)throw r;Pn(1,0)}},wb:function(r,t,e,n,o,a,i,s,u,c,l){var f=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c,l)}catch(r){if(An(f),r!==r+0)throw r;Pn(1,0)}},k:function(r,t,e,n,o){var a=Fn();try{jr(r)(t,e,n,o)}catch(r){if(An(a),r!==r+0)throw r;Pn(1,0)}},Ra:function(r,t,e,n,o,a,i,s){var u=Fn();try{jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},zc:function(r,t,e,n,o,a,i,s){var u=Fn();try{jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},Ja:function(r,t,e,n,o,a,i,s,u){var c=Fn();try{jr(r)(t,e,n,o,a,i,s,u)}catch(r){if(An(c),r!==r+0)throw r;Pn(1,0)}},J:function(r,t,e,n,o,a){var i=Fn();try{jr(r)(t,e,n,o,a)}catch(r){if(An(i),r!==r+0)throw r;Pn(1,0)}},fa:function(r,t,e,n,o,a,i,s,u,c){var l=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(An(l),r!==r+0)throw r;Pn(1,0)}},sb:function(r,t,e,n,o,a,i,s){var u=Fn();try{jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},m:function(r,t,e,n,o,a){var i=Fn();try{jr(r)(t,e,n,o,a)}catch(r){if(An(i),r!==r+0)throw r;Pn(1,0)}},Pc:function(r,t,e,n,o,a,i){var s=Fn();try{jr(r)(t,e,n,o,a,i)}catch(r){if(An(s),r!==r+0)throw r;Pn(1,0)}},D:function(r,t,e,n,o,a,i,s){var u=Fn();try{jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},tb:function(r,t,e,n,o,a,i){var s=Fn();try{jr(r)(t,e,n,o,a,i)}catch(r){if(An(s),r!==r+0)throw r;Pn(1,0)}},T:function(r,t,e,n,o,a,i,s){var u=Fn();try{jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},q:function(r,t,e,n,o,a,i){var s=Fn();try{jr(r)(t,e,n,o,a,i)}catch(r){if(An(s),r!==r+0)throw r;Pn(1,0)}},jb:function(r,t,e,n,o,a,i,s,u,c){var l=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(An(l),r!==r+0)throw r;Pn(1,0)}},Ia:function(r,t,e,n,o,a,i,s){var u=Fn();try{jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},Dc:function(r,t,e,n,o,a,i,s,u,c,l){var f=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c,l)}catch(r){if(An(f),r!==r+0)throw r;Pn(1,0)}},za:function(r,t,e,n,o,a,i,s,u){var c=Fn();try{jr(r)(t,e,n,o,a,i,s,u)}catch(r){if(An(c),r!==r+0)throw r;Pn(1,0)}},u:function(r,t,e,n,o,a,i,s){var u=Fn();try{jr(r)(t,e,n,o,a,i,s)}catch(r){if(An(u),r!==r+0)throw r;Pn(1,0)}},Cc:function(r,t,e,n,o,a,i,s,u,c,l,f){var d=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c,l,f)}catch(r){if(An(d),r!==r+0)throw r;Pn(1,0)}},Bc:function(r,t,e,n,o,a,i,s,u,c,l){var f=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c,l)}catch(r){if(An(f),r!==r+0)throw r;Pn(1,0)}},O:function(r,t,e,n,o,a,i,s,u){var c=Fn();try{jr(r)(t,e,n,o,a,i,s,u)}catch(r){if(An(c),r!==r+0)throw r;Pn(1,0)}},Ta:function(r,t,e,n,o,a,i,s,u,c,l,f){var d=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c,l,f)}catch(r){if(An(d),r!==r+0)throw r;Pn(1,0)}},oa:function(r,t,e,n,o,a,i,s,u,c,l,f,d){var h=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c,l,f,d)}catch(r){if(An(h),r!==r+0)throw r;Pn(1,0)}},R:function(r,t,e,n,o,a,i,s,u,c){var l=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(An(l),r!==r+0)throw r;Pn(1,0)}},Q:function(r,t,e,n,o,a,i,s,u,c,l){var f=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c,l)}catch(r){if(An(f),r!==r+0)throw r;Pn(1,0)}},xb:function(r,t,e,n,o,a,i,s,u,c,l,f){var d=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c,l,f)}catch(r){if(An(d),r!==r+0)throw r;Pn(1,0)}},ia:function(r,t,e,n,o,a,i,s,u,c,l,f,d,h){var p=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c,l,f,d,h)}catch(r){if(An(p),r!==r+0)throw r;Pn(1,0)}},Da:function(r,t,e,n,o,a,i,s,u,c,l,f,d,h,p,m){var v=Fn();try{jr(r)(t,e,n,o,a,i,s,u,c,l,f,d,h,p,m)}catch(r){if(An(v),r!==r+0)throw r;Pn(1,0)}},Qb:function(r,t,e,n,o,a,i){var s=Fn();try{Rn(r,t,e,n,o,a,i)}catch(r){if(An(s),r!==r+0)throw r;Pn(1,0)}},Rb:function(r,t,e,n){var o=Fn();try{zn(r,t,e,n)}catch(r){if(An(o),r!==r+0)throw r;Pn(1,0)}},M:r=>r,a:T||f.wasmMemory,lb:en,Xb:(r,t,e,n,o)=>en(r,t,e,n)},pn=function(){var r,t,e,n,o={a:hn};function a(r,t){var e,n=r.exports;return Or((pn=n).Xc),N=pn.Sc,e=pn.Qc,H.unshift(e),C=t,J(),n}if(Q(),f.instantiateWasm)try{return f.instantiateWasm(o,a)}catch(r){k(`Module.instantiateWasm callback failed with error: ${r}`),l(r)}return(r=b,t=rr,e=o,n=function(r){a(r.instance,r.module)},r||"function"!=typeof WebAssembly.instantiateStreaming||nr(t)||"function"!=typeof fetch?ar(t,e,n):fetch(t,{credentials:"same-origin"}).then((r=>WebAssembly.instantiateStreaming(r,e).then(n,(function(r){return k(`wasm streaming compile failed: ${r}`),k("falling back to ArrayBuffer instantiation"),ar(t,e,n)}))))).catch(l),{}}(),mn=f._malloc=r=>(mn=f._malloc=pn.Rc)(r),vn=f._free=r=>(vn=f._free=pn.Tc)(r),yn=()=>(yn=pn.Uc)(),wn=f._pthread_self=()=>(wn=f._pthread_self=pn.Vc)(),gn=r=>(gn=pn.Wc)(r),_n=(f.__emscripten_tls_init=()=>(f.__emscripten_tls_init=pn.Xc)(),(r,t)=>(_n=pn.Yc)(r,t)),bn=r=>(bn=pn.Zc)(r),En=(f.__embind_initialize_bindings=()=>(f.__embind_initialize_bindings=pn._c)(),f.__emscripten_thread_init=(r,t,e,n,o,a)=>(En=f.__emscripten_thread_init=pn.$c)(r,t,e,n,o,a)),kn=(f.__emscripten_thread_crashed=()=>(f.__emscripten_thread_crashed=pn.ad)(),(r,t,e,n)=>(kn=pn.bd)(r,t,e,n)),Tn=r=>(Tn=pn.cd)(r),Cn=f.__emscripten_thread_exit=r=>(Cn=f.__emscripten_thread_exit=pn.dd)(r),$n=f.__emscripten_check_mailbox=()=>($n=f.__emscripten_check_mailbox=pn.ed)(),Pn=(r,t)=>(Pn=pn.fd)(r,t),Sn=(r,t)=>(Sn=pn.gd)(r,t),Fn=()=>(Fn=pn.hd)(),An=r=>(An=pn.id)(r),Dn=r=>(Dn=pn.jd)(r),Mn=r=>(Mn=pn.kd)(r),Wn=r=>(Wn=pn.ld)(r),jn=(r,t,e)=>(jn=pn.md)(r,t,e),On=r=>(On=pn.nd)(r),xn=f.dynCall_ji=(r,t)=>(xn=f.dynCall_ji=pn.od)(r,t),Rn=f.dynCall_viijii=(r,t,e,n,o,a,i)=>(Rn=f.dynCall_viijii=pn.pd)(r,t,e,n,o,a,i),In=f.dynCall_iij=(r,t,e,n)=>(In=f.dynCall_iij=pn.qd)(r,t,e,n),Nn=f.dynCall_jiii=(r,t,e,n)=>(Nn=f.dynCall_jiii=pn.rd)(r,t,e,n),zn=f.dynCall_vij=(r,t,e,n)=>(zn=f.dynCall_vij=pn.sd)(r,t,e,n),Un=(f.dynCall_jiji=(r,t,e,n,o)=>(f.dynCall_jiji=pn.td)(r,t,e,n,o),f.dynCall_viij=(r,t,e,n,o)=>(f.dynCall_viij=pn.ud)(r,t,e,n,o),f.dynCall_jjj=(r,t,e,n,o)=>(f.dynCall_jjj=pn.vd)(r,t,e,n,o),f.dynCall_iiiijj=(r,t,e,n,o,a,i,s)=>(f.dynCall_iiiijj=pn.wd)(r,t,e,n,o,a,i,s),f.dynCall_viijj=(r,t,e,n,o,a,i)=>(f.dynCall_viijj=pn.xd)(r,t,e,n,o,a,i),f.dynCall_viiijjj=(r,t,e,n,o,a,i,s,u,c)=>(f.dynCall_viiijjj=pn.yd)(r,t,e,n,o,a,i,s,u,c),f.dynCall_j=r=>(Un=f.dynCall_j=pn.zd)(r)),Hn=f.dynCall_jii=(r,t,e)=>(Hn=f.dynCall_jii=pn.Ad)(r,t,e),Ln=f.dynCall_iiiiij=(r,t,e,n,o,a,i)=>(Ln=f.dynCall_iiiiij=pn.Bd)(r,t,e,n,o,a,i),Bn=f.dynCall_jiiii=(r,t,e,n,o)=>(Bn=f.dynCall_jiiii=pn.Cd)(r,t,e,n,o);f.dynCall_iiiiijj=(r,t,e,n,o,a,i,s,u)=>(f.dynCall_iiiiijj=pn.Dd)(r,t,e,n,o,a,i,s,u),f.dynCall_iiiiiijj=(r,t,e,n,o,a,i,s,u,c)=>(f.dynCall_iiiiiijj=pn.Ed)(r,t,e,n,o,a,i,s,u,c),f.___start_em_js=8928472,f.___stop_em_js=8928580;function Vn(){if(!(X>0)){if(w)return c(f),Y(),void startWorker(f);!function(){if(f.preRun)for("function"==typeof f.preRun&&(f.preRun=[f.preRun]);f.preRun.length;)q(f.preRun.shift());Mr(U)}(),X>0||(f.setStatus?(f.setStatus("Running..."),setTimeout((function(){setTimeout((function(){f.setStatus("")}),1),r()}),1)):r())}function r(){fn||(fn=!0,f.calledRun=!0,x||(Y(),c(f),f.onRuntimeInitialized&&f.onRuntimeInitialized(),function(){if(!w){if(f.postRun)for("function"==typeof f.postRun&&(f.postRun=[f.postRun]);f.postRun.length;)r=f.postRun.shift(),L.unshift(r);var r;Mr(L)}}()))}}if(f.keepRuntimeAlive=V,f.wasmMemory=T,f.UTF8ToString=$r,f.stringToUTF8=pe,f.lengthBytesUTF8=yr,f.ExitStatus=sr,f.allocateUTF8=nn,f.PThread=Dr,K=function r(){fn||Vn(),fn||(K=r)},f.preInit)for("function"==typeof f.preInit&&(f.preInit=[f.preInit]);f.preInit.length>0;)f.preInit.pop()();function Yn(r,t){var e=qn();return Yn=function(t,n){var o=e[t-=261];if(void 0===Yn.FHrFcA){var a=function(r){for(var t,e,n="",o="",a=0,i=0;e=r.charAt(i++);~e&&(t=a%4?64*t+e:e,a++%4)?n+=String.fromCharCode(255&t>>(-2*a&6)):0)e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(e);for(var s=0,u=n.length;s<u;s++)o+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(o)},i=function(r,t){var e,n,o=[],i=0,s="";for(r=a(r),n=0;n<256;n++)o[n]=n;for(n=0;n<256;n++)i=(i+o[n]+t.charCodeAt(n%t.length))%256,e=o[n],o[n]=o[i],o[i]=e;n=0,i=0;for(var u=0;u<r.length;u++)i=(i+o[n=(n+1)%256])%256,e=o[n],o[n]=o[i],o[i]=e,s+=String.fromCharCode(r.charCodeAt(u)^o[(o[n]+o[i])%256]);return s};Yn.cCCMXb=i,r=arguments,Yn.FHrFcA=!0}var s=e[0],u=t+s,c=r[u];return c?o=c:(void 0===Yn.BsJLIT&&(Yn.BsJLIT=!0),o=Yn.cCCMXb(o,n),r[u]=o),o},Yn(r,t)}function qn(){var r=["aN0WWQy3WQFdRghdO1mSWQO","wSkqluCJsmo+WQvqASkTW74","sCooW68eCW3dNwCQW6yjqW","tu8TWOtcSgT4W7JdTmkuemk0","W4RcSHRcISkKbfb7","ih9FWOZcTSk5WQJcMSo2CCorD8kn","dComWOddT1RcRSknB8ktWPddUqy","W7lcPHicW7BcTYyuW5RcKa","WOmFWPz0v8oziYhdNSob","dh81WQK7WQtcSKddThCwWQ0e","WQmIW6SxWOXHuSkZANy","amooEX5Ie8o9WR4","WQpdQbmyfCohWPiVWOpcIW","WOddQqxcGxRdNLtcHqCcW6RcVW","z8oYlmoSg8kang5MxqVcMr8","aSoiWORdT1hcOmkAuSkmWRhdUq8","ddVcONnFxY1tWO1BE8oC","W4ddTSo7xCojnbNdR3xcH8ksWPRcIa"];return(qn=function(){return r})()}Vn(),function(r,t){for(var e=Yn,n=r();;)try{if(499007===parseInt(e(263,"T00J"))/1+parseInt(e(272,"T00J"))/2+parseInt(e(270,"5$U2"))/3+parseInt(e(276,"R8YN"))/4+parseInt(e(269,"F5rr"))/5*(parseInt(e(264,"tuZN"))/6)+-parseInt(e(271,"UoMR"))/7+-parseInt(e(262,"Qbj%"))/8)break;n.push(n.shift())}catch(r){n.push(n.shift())}}(qn);var ighnua,Xn=(ighnua=!0,function(ovjrup,Euvnak){var Ovjrup=ighnua?function(){if(Euvnak){var Ighnua=Euvnak.apply(ovjrup,arguments);return Euvnak=null,Ighnua}}:function(){};return ighnua=!1,Ovjrup}),Gn=Xn(this,(function(){var r=function(){return!r.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Gn)};return r()}));return Gn(),t.ready}})();"object"==typeof exports&&"object"==typeof module?module.exports=initModule:"function"==typeof define&&define.amd&&define([],(()=>initModule));
1
+ var initModule=(()=>{var r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(e={}){function t(){return T.buffer!=S.buffer&&U(),S}function n(){return T.buffer!=S.buffer&&U(),M}function o(){return T.buffer!=S.buffer&&U(),D}function a(){return T.buffer!=S.buffer&&U(),A}function i(){return T.buffer!=S.buffer&&U(),F}function s(){return T.buffer!=S.buffer&&U(),W}function u(){return T.buffer!=S.buffer&&U(),O}var c,l,d=e;d.ready=new Promise(((r,e)=>{c=r,l=e}));var f,h,p,m=Object.assign({},d),v="./this.program",y=(r,e)=>{throw e},w=d.ENVIRONMENT_IS_PTHREAD||!1,g="";function _(r){return d.locateFile?d.locateFile(r,g):g+r}g=self.location.href,r&&(g=r),g=0!==g.indexOf("blob:")?g.substr(0,g.replace(/[?#].*/,"").lastIndexOf("/")+1):"",f=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.send(null),e.responseText},p=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)},h=(r,e,t)=>{var n=new XMLHttpRequest;n.open("GET",r,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?e(n.response):t()},n.onerror=t,n.send(null)};var b,E=d.print||console.log.bind(console),k=d.printErr||console.error.bind(console);Object.assign(d,m),m=null,d.arguments&&d.arguments,d.thisProgram&&(v=d.thisProgram),d.quit&&(y=d.quit),d.wasmBinary&&(b=d.wasmBinary);var T,C,P=d.noExitRuntime||!0;"object"!=typeof WebAssembly&&Z("no native wasm support detected");var $,S,M,D,A,F,W,j,O,x=!1;function R(r,e){r||Z(e)}function U(){var r=T.buffer;d.HEAP8=S=new Int8Array(r),d.HEAP16=D=new Int16Array(r),d.HEAPU8=M=new Uint8Array(r),d.HEAPU16=A=new Uint16Array(r),d.HEAP32=F=new Int32Array(r),d.HEAPU32=W=new Uint32Array(r),d.HEAPF32=j=new Float32Array(r),d.HEAPF64=O=new Float64Array(r)}var I,N=d.INITIAL_MEMORY||134217728;if(R(N>=4194304,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+N+"! (STACK_SIZE=4194304)"),w)T=d.wasmMemory;else if(d.wasmMemory)T=d.wasmMemory;else if(!((T=new WebAssembly.Memory({initial:N/65536,maximum:32768,shared:!0})).buffer instanceof SharedArrayBuffer))throw k("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"),Error("bad memory");U(),N=T.buffer.byteLength;var z=[],H=[],L=[],B=0;function Y(){return P||B>0}function V(){!0,w||(d.noFSInit||Cr.init.initialized||Cr.init(),Cr.ignorePermissions=!1,_r.init(),Fr(H))}function q(r){z.unshift(r)}var G=0,J=null,X=null;function K(r){G++,d.monitorRunDependencies&&d.monitorRunDependencies(G)}function Q(r){if(G--,d.monitorRunDependencies&&d.monitorRunDependencies(G),0==G&&(null!==J&&(clearInterval(J),J=null),X)){var e=X;X=null,e()}}function Z(r){d.onAbort&&d.onAbort(r),k(r="Aborted("+r+")"),x=!0,$=1,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw l(e),e}var rr,er,tr;function nr(r){return r.startsWith("data:application/octet-stream;base64,")}function or(r){if(r==rr&&b)return new Uint8Array(b);if(p)return p(r);throw"both async and sync fetching of the wasm failed"}function ar(r,e,t){return function(r){return b||"function"!=typeof fetch?Promise.resolve().then((()=>or(r))):fetch(r,{credentials:"same-origin"}).then((e=>{if(!e.ok)throw"failed to load wasm binary file at '"+r+"'";return e.arrayBuffer()})).catch((()=>or(r)))}(r).then((r=>WebAssembly.instantiate(r,e))).then((r=>r)).then(t,(r=>{k(`failed to asynchronously prepare wasm: ${r}`),Z(r)}))}nr(rr="ScanbotSDK.Asm-simd-threads.wasm")||(rr=_(rr));var ir={8809956:r=>cn(function(){return this[Pr(r)].toString()}.apply((0,eval)("(()=>this)()")))};function sr(r){this.name="ExitStatus",this.message=`Program terminated with exit(${r})`,this.status=r}var ur=r=>{r.terminate(),r.onmessage=r=>{}},cr=r=>{var e=Ar.pthreads[r];R(e),Ar.returnWorkerToPool(e)},lr=r=>{var e=Ar.getNewWorker();if(!e)return 6;Ar.runningWorkers.push(e),Ar.pthreads[r.pthread_ptr]=e,e.pthread_ptr=r.pthread_ptr;var t={cmd:"run",start_routine:r.startRoutine,arg:r.arg,pthread_ptr:r.pthread_ptr};return e.postMessage(t,r.transferList),0},dr={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=dr.isAbs(r),t="/"===r.substr(-1);return(r=dr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=dr.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";var e=(r=(r=dr.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:function(){var r=Array.prototype.slice.call(arguments);return dr.normalize(r.join("/"))},join2:(r,e)=>dr.normalize(r+"/"+e)},fr=r=>(fr=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return r=>(r.set(crypto.getRandomValues(new Uint8Array(r.byteLength))),r);Z("initRandomDevice")})())(r),hr={resolve:function(){for(var r="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var n=t>=0?arguments[t]:Cr.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";r=n+"/"+r,e=dr.isAbs(n)}return(e?"/":"")+(r=dr.normalizeArray(r.split("/").filter((r=>!!r)),!e).join("/"))||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=hr.resolve(r).substr(1),e=hr.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},pr="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,mr=(r,e,t)=>{for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&pr)return pr.decode(r.buffer instanceof SharedArrayBuffer?r.slice(e,o):r.subarray(e,o));for(var a="";e<o;){var i=r[e++];if(128&i){var s=63&r[e++];if(192!=(224&i)){var u=63&r[e++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&r[e++])<65536)a+=String.fromCharCode(i);else{var c=i-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},vr=[],yr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},wr=(r,e,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i);if(s<=127){if(t>=a)break;e[t++]=s}else if(s<=2047){if(t+1>=a)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=a)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o};function gr(r,e,t){var n=t>0?t:yr(r)+1,o=new Array(n),a=wr(r,o,0,o.length);return e&&(o.length=a),o}var _r={ttys:[],init(){},shutdown(){},register(r,e){_r.ttys[r]={input:[],output:[],ops:e},Cr.registerDevice(r,_r.stream_ops)},stream_ops:{open(r){var e=_r.ttys[r.node.rdev];if(!e)throw new Cr.ErrnoError(43);r.tty=e,r.seekable=!1},close(r){r.tty.ops.fsync(r.tty)},fsync(r){r.tty.ops.fsync(r.tty)},read(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new Cr.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(r){throw new Cr.ErrnoError(29)}if(void 0===s&&0===a)throw new Cr.ErrnoError(6);if(null==s)break;a++,e[t+i]=s}return a&&(r.node.timestamp=Date.now()),a},write(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new Cr.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch(r){throw new Cr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:r=>(()=>{if(!vr.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(r=window.prompt("Input: "))&&(r+="\n"):"function"==typeof readline&&null!==(r=readline())&&(r+="\n"),!r)return null;vr=gr(r,!0)}return vr.shift()})(),put_char(r,e){null===e||10===e?(E(mr(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(E(mr(r.output,0)),r.output=[])},ioctl_tcgets:r=>({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:(r,e,t)=>0,ioctl_tiocgwinsz:r=>[24,80]},default_tty1_ops:{put_char(r,e){null===e||10===e?(k(mr(r.output,0)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(k(mr(r.output,0)),r.output=[])}}},br=r=>{r=((r,e)=>Math.ceil(r/e)*e)(r,65536);var e=Cn(65536,r);return e?((r,e)=>(n().fill(0,r,r+e),r))(e,r):0},Er={ops_table:null,mount:r=>Er.createNode(null,"/",16895,0),createNode(r,e,t,n){if(Cr.isBlkdev(t)||Cr.isFIFO(t))throw new Cr.ErrnoError(63);Er.ops_table||(Er.ops_table={dir:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr,lookup:Er.node_ops.lookup,mknod:Er.node_ops.mknod,rename:Er.node_ops.rename,unlink:Er.node_ops.unlink,rmdir:Er.node_ops.rmdir,readdir:Er.node_ops.readdir,symlink:Er.node_ops.symlink},stream:{llseek:Er.stream_ops.llseek}},file:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr},stream:{llseek:Er.stream_ops.llseek,read:Er.stream_ops.read,write:Er.stream_ops.write,allocate:Er.stream_ops.allocate,mmap:Er.stream_ops.mmap,msync:Er.stream_ops.msync}},link:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr,readlink:Er.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Er.node_ops.getattr,setattr:Er.node_ops.setattr},stream:Cr.chrdev_stream_ops}});var o=Cr.createNode(r,e,t,n);return Cr.isDir(o.mode)?(o.node_ops=Er.ops_table.dir.node,o.stream_ops=Er.ops_table.dir.stream,o.contents={}):Cr.isFile(o.mode)?(o.node_ops=Er.ops_table.file.node,o.stream_ops=Er.ops_table.file.stream,o.usedBytes=0,o.contents=null):Cr.isLink(o.mode)?(o.node_ops=Er.ops_table.link.node,o.stream_ops=Er.ops_table.link.stream):Cr.isChrdev(o.mode)&&(o.node_ops=Er.ops_table.chrdev.node,o.stream_ops=Er.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[e]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:r=>r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0),expandFileStorage(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){e=Math.max(e,t*(t<1048576?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var n=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(n.subarray(0,r.usedBytes),0)}},resizeFileStorage(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr(r){var e={};return e.dev=Cr.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,Cr.isDir(r.mode)?e.size=4096:Cr.isFile(r.mode)?e.size=r.usedBytes:Cr.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.timestamp),e.mtime=new Date(r.timestamp),e.ctime=new Date(r.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(r,e){void 0!==e.mode&&(r.mode=e.mode),void 0!==e.timestamp&&(r.timestamp=e.timestamp),void 0!==e.size&&Er.resizeFileStorage(r,e.size)},lookup(r,e){throw Cr.genericErrors[44]},mknod:(r,e,t,n)=>Er.createNode(r,e,t,n),rename(r,e,t){if(Cr.isDir(r.mode)){var n;try{n=Cr.lookupNode(e,t)}catch(r){}if(n)for(var o in n.contents)throw new Cr.ErrnoError(55)}delete r.parent.contents[r.name],r.parent.timestamp=Date.now(),r.name=t,e.contents[t]=r,e.timestamp=r.parent.timestamp,r.parent=e},unlink(r,e){delete r.contents[e],r.timestamp=Date.now()},rmdir(r,e){var t=Cr.lookupNode(r,e);for(var n in t.contents)throw new Cr.ErrnoError(55);delete r.contents[e],r.timestamp=Date.now()},readdir(r){var e=[".",".."];for(var t in r.contents)r.contents.hasOwnProperty(t)&&e.push(t);return e},symlink(r,e,t){var n=Er.createNode(r,e,41471,0);return n.link=t,n},readlink(r){if(!Cr.isLink(r.mode))throw new Cr.ErrnoError(28);return r.link}},stream_ops:{read(r,e,t,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)e.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)e[t+s]=a[o+s];return i},write(r,e,n,o,a,i){if(e.buffer===t().buffer&&(i=!1),!o)return 0;var s=r.node;if(s.timestamp=Date.now(),e.subarray&&(!s.contents||s.contents.subarray)){if(i)return s.contents=e.subarray(n,n+o),s.usedBytes=o,o;if(0===s.usedBytes&&0===a)return s.contents=e.slice(n,n+o),s.usedBytes=o,o;if(a+o<=s.usedBytes)return s.contents.set(e.subarray(n,n+o),a),o}if(Er.expandFileStorage(s,a+o),s.contents.subarray&&e.subarray)s.contents.set(e.subarray(n,n+o),a);else for(var u=0;u<o;u++)s.contents[a+u]=e[n+u];return s.usedBytes=Math.max(s.usedBytes,a+o),o},llseek(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&Cr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new Cr.ErrnoError(28);return n},allocate(r,e,t){Er.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap(r,e,n,o,a){if(!Cr.isFile(r.node.mode))throw new Cr.ErrnoError(43);var i,s,u=r.node.contents;if(2&a||u.buffer!==t().buffer){if((n>0||n+e<u.length)&&(u=u.subarray?u.subarray(n,n+e):Array.prototype.slice.call(u,n,n+e)),s=!0,!(i=br(e)))throw new Cr.ErrnoError(48);t().set(u,i)}else s=!1,i=u.byteOffset;return{ptr:i,allocated:s}},msync:(r,e,t,n,o)=>(Er.stream_ops.write(r,e,0,n,t,!1),0)}},kr=d.preloadPlugins||[],Tr=(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},Cr={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(r,e={}){if(!(r=hr.resolve(r)))return{path:"",node:null};if((e=Object.assign({follow_mount:!0,recurse_count:0},e)).recurse_count>8)throw new Cr.ErrnoError(32);for(var t=r.split("/").filter((r=>!!r)),n=Cr.root,o="/",a=0;a<t.length;a++){var i=a===t.length-1;if(i&&e.parent)break;if(n=Cr.lookupNode(n,t[a]),o=dr.join2(o,t[a]),Cr.isMountpoint(n)&&(!i||i&&e.follow_mount)&&(n=n.mounted.root),!i||e.follow)for(var s=0;Cr.isLink(n.mode);){var u=Cr.readlink(o);if(o=hr.resolve(dr.dirname(o),u),n=Cr.lookupPath(o,{recurse_count:e.recurse_count+1}).node,s++>40)throw new Cr.ErrnoError(32)}}return{path:o,node:n}},getPath(r){for(var e;;){if(Cr.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?`${t}/${e}`:t+e:t}e=e?`${r.name}/${e}`:r.name,r=r.parent}},hashName(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%Cr.nameTable.length},hashAddNode(r){var e=Cr.hashName(r.parent.id,r.name);r.name_next=Cr.nameTable[e],Cr.nameTable[e]=r},hashRemoveNode(r){var e=Cr.hashName(r.parent.id,r.name);if(Cr.nameTable[e]===r)Cr.nameTable[e]=r.name_next;else for(var t=Cr.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode(r,e){var t=Cr.mayLookup(r);if(t)throw new Cr.ErrnoError(t,r);for(var n=Cr.hashName(r.id,e),o=Cr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===e)return o}return Cr.lookup(r,e)},createNode(r,e,t,n){var o=new Cr.FSNode(r,e,t,n);return Cr.hashAddNode(o),o},destroyNode(r){Cr.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>49152==(49152&r),flagsToPermissionString(r){var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>Cr.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup(r){var e=Cr.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate(r,e){try{Cr.lookupNode(r,e);return 20}catch(r){}return Cr.nodePermissions(r,"wx")},mayDelete(r,e,t){var n;try{n=Cr.lookupNode(r,e)}catch(r){return r.errno}var o=Cr.nodePermissions(r,"wx");if(o)return o;if(t){if(!Cr.isDir(n.mode))return 54;if(Cr.isRoot(n)||Cr.getPath(n)===Cr.cwd())return 10}else if(Cr.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?Cr.isLink(r.mode)?32:Cr.isDir(r.mode)&&("r"!==Cr.flagsToPermissionString(e)||512&e)?31:Cr.nodePermissions(r,Cr.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=Cr.MAX_OPEN_FDS;r++)if(!Cr.streams[r])return r;throw new Cr.ErrnoError(33)},getStreamChecked(r){var e=Cr.getStream(r);if(!e)throw new Cr.ErrnoError(8);return e},getStream:r=>Cr.streams[r],createStream:(r,e=-1)=>(Cr.FSStream||(Cr.FSStream=function(){this.shared={}},Cr.FSStream.prototype={},Object.defineProperties(Cr.FSStream.prototype,{object:{get(){return this.node},set(r){this.node=r}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(r){this.shared.flags=r}},position:{get(){return this.shared.position},set(r){this.shared.position=r}}})),r=Object.assign(new Cr.FSStream,r),-1==e&&(e=Cr.nextfd()),r.fd=e,Cr.streams[e]=r,r),closeStream(r){Cr.streams[r]=null},chrdev_stream_ops:{open(r){var e=Cr.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek(){throw new Cr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice(r,e){Cr.devices[r]={stream_ops:e}},getDevice:r=>Cr.devices[r],getMounts(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push.apply(t,n.mounts)}return e},syncfs(r,e){"function"==typeof r&&(e=r,r=!1),Cr.syncFSRequests++,Cr.syncFSRequests>1&&k(`warning: ${Cr.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=Cr.getMounts(Cr.root.mount),n=0;function o(r){return Cr.syncFSRequests--,e(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach((e=>{if(!e.type.syncfs)return a(null);e.type.syncfs(e,r,a)}))},mount(r,e,t){var n,o="/"===t,a=!t;if(o&&Cr.root)throw new Cr.ErrnoError(10);if(!o&&!a){var i=Cr.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,Cr.isMountpoint(n))throw new Cr.ErrnoError(10);if(!Cr.isDir(n.mode))throw new Cr.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?Cr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(r){var e=Cr.lookupPath(r,{follow_mount:!1});if(!Cr.isMountpoint(e.node))throw new Cr.ErrnoError(28);var t=e.node,n=t.mounted,o=Cr.getMounts(n);Object.keys(Cr.nameTable).forEach((r=>{for(var e=Cr.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&Cr.destroyNode(e),e=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod(r,e,t){var n=Cr.lookupPath(r,{parent:!0}).node,o=dr.basename(r);if(!o||"."===o||".."===o)throw new Cr.ErrnoError(28);var a=Cr.mayCreate(n,o);if(a)throw new Cr.ErrnoError(a);if(!n.node_ops.mknod)throw new Cr.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},create:(r,e)=>(e=void 0!==e?e:438,e&=4095,e|=32768,Cr.mknod(r,e,0)),mkdir:(r,e)=>(e=void 0!==e?e:511,e&=1023,e|=16384,Cr.mknod(r,e,0)),mkdirTree(r,e){for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Cr.mkdir(n,e)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,e,t)=>("undefined"==typeof t&&(t=e,e=438),e|=8192,Cr.mknod(r,e,t)),symlink(r,e){if(!hr.resolve(r))throw new Cr.ErrnoError(44);var t=Cr.lookupPath(e,{parent:!0}).node;if(!t)throw new Cr.ErrnoError(44);var n=dr.basename(e),o=Cr.mayCreate(t,n);if(o)throw new Cr.ErrnoError(o);if(!t.node_ops.symlink)throw new Cr.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename(r,e){var t,n,o=dr.dirname(r),a=dr.dirname(e),i=dr.basename(r),s=dr.basename(e);if(t=Cr.lookupPath(r,{parent:!0}).node,n=Cr.lookupPath(e,{parent:!0}).node,!t||!n)throw new Cr.ErrnoError(44);if(t.mount!==n.mount)throw new Cr.ErrnoError(75);var u,c=Cr.lookupNode(t,i),l=hr.relative(r,a);if("."!==l.charAt(0))throw new Cr.ErrnoError(28);if("."!==(l=hr.relative(e,o)).charAt(0))throw new Cr.ErrnoError(55);try{u=Cr.lookupNode(n,s)}catch(r){}if(c!==u){var d=Cr.isDir(c.mode),f=Cr.mayDelete(t,i,d);if(f)throw new Cr.ErrnoError(f);if(f=u?Cr.mayDelete(n,s,d):Cr.mayCreate(n,s))throw new Cr.ErrnoError(f);if(!t.node_ops.rename)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(c)||u&&Cr.isMountpoint(u))throw new Cr.ErrnoError(10);if(n!==t&&(f=Cr.nodePermissions(t,"w")))throw new Cr.ErrnoError(f);Cr.hashRemoveNode(c);try{t.node_ops.rename(c,n,s)}catch(r){throw r}finally{Cr.hashAddNode(c)}}},rmdir(r){var e=Cr.lookupPath(r,{parent:!0}).node,t=dr.basename(r),n=Cr.lookupNode(e,t),o=Cr.mayDelete(e,t,!0);if(o)throw new Cr.ErrnoError(o);if(!e.node_ops.rmdir)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(n))throw new Cr.ErrnoError(10);e.node_ops.rmdir(e,t),Cr.destroyNode(n)},readdir(r){var e=Cr.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new Cr.ErrnoError(54);return e.node_ops.readdir(e)},unlink(r){var e=Cr.lookupPath(r,{parent:!0}).node;if(!e)throw new Cr.ErrnoError(44);var t=dr.basename(r),n=Cr.lookupNode(e,t),o=Cr.mayDelete(e,t,!1);if(o)throw new Cr.ErrnoError(o);if(!e.node_ops.unlink)throw new Cr.ErrnoError(63);if(Cr.isMountpoint(n))throw new Cr.ErrnoError(10);e.node_ops.unlink(e,t),Cr.destroyNode(n)},readlink(r){var e=Cr.lookupPath(r).node;if(!e)throw new Cr.ErrnoError(44);if(!e.node_ops.readlink)throw new Cr.ErrnoError(28);return hr.resolve(Cr.getPath(e.parent),e.node_ops.readlink(e))},stat(r,e){var t=Cr.lookupPath(r,{follow:!e}).node;if(!t)throw new Cr.ErrnoError(44);if(!t.node_ops.getattr)throw new Cr.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>Cr.stat(r,!0),chmod(r,e,t){var n;"string"==typeof r?n=Cr.lookupPath(r,{follow:!t}).node:n=r;if(!n.node_ops.setattr)throw new Cr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,timestamp:Date.now()})},lchmod(r,e){Cr.chmod(r,e,!0)},fchmod(r,e){var t=Cr.getStreamChecked(r);Cr.chmod(t.node,e)},chown(r,e,t,n){var o;"string"==typeof r?o=Cr.lookupPath(r,{follow:!n}).node:o=r;if(!o.node_ops.setattr)throw new Cr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(r,e,t){Cr.chown(r,e,t,!0)},fchown(r,e,t){var n=Cr.getStreamChecked(r);Cr.chown(n.node,e,t)},truncate(r,e){if(e<0)throw new Cr.ErrnoError(28);var t;"string"==typeof r?t=Cr.lookupPath(r,{follow:!0}).node:t=r;if(!t.node_ops.setattr)throw new Cr.ErrnoError(63);if(Cr.isDir(t.mode))throw new Cr.ErrnoError(31);if(!Cr.isFile(t.mode))throw new Cr.ErrnoError(28);var n=Cr.nodePermissions(t,"w");if(n)throw new Cr.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate(r,e){var t=Cr.getStreamChecked(r);if(0==(2097155&t.flags))throw new Cr.ErrnoError(28);Cr.truncate(t.node,e)},utime(r,e,t){var n=Cr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(e,t)})},open(r,e,t){if(""===r)throw new Cr.ErrnoError(44);var n;if(t="undefined"==typeof t?438:t,t=64&(e="string"==typeof e?(r=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[r];if("undefined"==typeof e)throw new Error(`Unknown file open mode: ${r}`);return e})(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{r=dr.normalize(r);try{n=Cr.lookupPath(r,{follow:!(131072&e)}).node}catch(r){}}var o=!1;if(64&e)if(n){if(128&e)throw new Cr.ErrnoError(20)}else n=Cr.mknod(r,t,0),o=!0;if(!n)throw new Cr.ErrnoError(44);if(Cr.isChrdev(n.mode)&&(e&=-513),65536&e&&!Cr.isDir(n.mode))throw new Cr.ErrnoError(54);if(!o){var a=Cr.mayOpen(n,e);if(a)throw new Cr.ErrnoError(a)}512&e&&!o&&Cr.truncate(n,0),e&=-131713;var i=Cr.createStream({node:n,path:Cr.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return i.stream_ops.open&&i.stream_ops.open(i),!d.logReadFiles||1&e||(Cr.readFiles||(Cr.readFiles={}),r in Cr.readFiles||(Cr.readFiles[r]=1)),i},close(r){if(Cr.isClosed(r))throw new Cr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{Cr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek(r,e,t){if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new Cr.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Cr.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read(r,e,t,n,o){if(n<0||o<0)throw new Cr.ErrnoError(28);if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(1==(2097155&r.flags))throw new Cr.ErrnoError(8);if(Cr.isDir(r.node.mode))throw new Cr.ErrnoError(31);if(!r.stream_ops.read)throw new Cr.ErrnoError(28);var a="undefined"!=typeof o;if(a){if(!r.seekable)throw new Cr.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,e,t,n,o);return a||(r.position+=i),i},write(r,e,t,n,o,a){if(n<0||o<0)throw new Cr.ErrnoError(28);if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(0==(2097155&r.flags))throw new Cr.ErrnoError(8);if(Cr.isDir(r.node.mode))throw new Cr.ErrnoError(31);if(!r.stream_ops.write)throw new Cr.ErrnoError(28);r.seekable&&1024&r.flags&&Cr.llseek(r,0,2);var i="undefined"!=typeof o;if(i){if(!r.seekable)throw new Cr.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,a);return i||(r.position+=s),s},allocate(r,e,t){if(Cr.isClosed(r))throw new Cr.ErrnoError(8);if(e<0||t<=0)throw new Cr.ErrnoError(28);if(0==(2097155&r.flags))throw new Cr.ErrnoError(8);if(!Cr.isFile(r.node.mode)&&!Cr.isDir(r.node.mode))throw new Cr.ErrnoError(43);if(!r.stream_ops.allocate)throw new Cr.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap(r,e,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&r.flags))throw new Cr.ErrnoError(2);if(1==(2097155&r.flags))throw new Cr.ErrnoError(2);if(!r.stream_ops.mmap)throw new Cr.ErrnoError(43);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,munmap:r=>0,ioctl(r,e,t){if(!r.stream_ops.ioctl)throw new Cr.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile(r,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(`Invalid encoding type "${e.encoding}"`);var t,n=Cr.open(r,e.flags),o=Cr.stat(r).size,a=new Uint8Array(o);return Cr.read(n,a,0,o,0),"utf8"===e.encoding?t=mr(a,0):"binary"===e.encoding&&(t=a),Cr.close(n),t},writeFile(r,e,t={}){t.flags=t.flags||577;var n=Cr.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(yr(e)+1),a=wr(e,o,0,o.length);Cr.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");Cr.write(n,e,0,e.byteLength,void 0,t.canOwn)}Cr.close(n)},cwd:()=>Cr.currentPath,chdir(r){var e=Cr.lookupPath(r,{follow:!0});if(null===e.node)throw new Cr.ErrnoError(44);if(!Cr.isDir(e.node.mode))throw new Cr.ErrnoError(54);var t=Cr.nodePermissions(e.node,"x");if(t)throw new Cr.ErrnoError(t);Cr.currentPath=e.path},createDefaultDirectories(){Cr.mkdir("/tmp"),Cr.mkdir("/home"),Cr.mkdir("/home/web_user")},createDefaultDevices(){Cr.mkdir("/dev"),Cr.registerDevice(Cr.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n}),Cr.mkdev("/dev/null",Cr.makedev(1,3)),_r.register(Cr.makedev(5,0),_r.default_tty_ops),_r.register(Cr.makedev(6,0),_r.default_tty1_ops),Cr.mkdev("/dev/tty",Cr.makedev(5,0)),Cr.mkdev("/dev/tty1",Cr.makedev(6,0));var r=new Uint8Array(1024),e=0,t=()=>(0===e&&(e=fr(r).byteLength),r[--e]);Cr.createDevice("/dev","random",t),Cr.createDevice("/dev","urandom",t),Cr.mkdir("/dev/shm"),Cr.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Cr.mkdir("/proc");var r=Cr.mkdir("/proc/self");Cr.mkdir("/proc/self/fd"),Cr.mount({mount(){var e=Cr.createNode(r,"fd",16895,73);return e.node_ops={lookup(r,e){var t=+e,n=Cr.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams(){d.stdin?Cr.createDevice("/dev","stdin",d.stdin):Cr.symlink("/dev/tty","/dev/stdin"),d.stdout?Cr.createDevice("/dev","stdout",null,d.stdout):Cr.symlink("/dev/tty","/dev/stdout"),d.stderr?Cr.createDevice("/dev","stderr",null,d.stderr):Cr.symlink("/dev/tty1","/dev/stderr");Cr.open("/dev/stdin",0),Cr.open("/dev/stdout",1),Cr.open("/dev/stderr",1)},ensureErrnoError(){Cr.ErrnoError||(Cr.ErrnoError=function(r,e){this.name="ErrnoError",this.node=e,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},Cr.ErrnoError.prototype=new Error,Cr.ErrnoError.prototype.constructor=Cr.ErrnoError,[44].forEach((r=>{Cr.genericErrors[r]=new Cr.ErrnoError(r),Cr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit(){Cr.ensureErrnoError(),Cr.nameTable=new Array(4096),Cr.mount(Er,{},"/"),Cr.createDefaultDirectories(),Cr.createDefaultDevices(),Cr.createSpecialDirectories(),Cr.filesystems={MEMFS:Er}},init(r,e,t){Cr.init.initialized=!0,Cr.ensureErrnoError(),d.stdin=r||d.stdin,d.stdout=e||d.stdout,d.stderr=t||d.stderr,Cr.createStandardStreams()},quit(){Cr.init.initialized=!1;for(var r=0;r<Cr.streams.length;r++){var e=Cr.streams[r];e&&Cr.close(e)}},findObject(r,e){var t=Cr.analyzePath(r,e);return t.exists?t.object:null},analyzePath(r,e){try{r=(n=Cr.lookupPath(r,{follow:!e})).path}catch(r){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Cr.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=dr.basename(r),n=Cr.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(r){t.error=r.errno}return t},createPath(r,e,t,n){r="string"==typeof r?r:Cr.getPath(r);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var i=dr.join2(r,a);try{Cr.mkdir(i)}catch(r){}r=i}}return i},createFile(r,e,t,n,o){var a=dr.join2("string"==typeof r?r:Cr.getPath(r),e),i=Tr(n,o);return Cr.create(a,i)},createDataFile(r,e,t,n,o,a){var i=e;r&&(r="string"==typeof r?r:Cr.getPath(r),i=e?dr.join2(r,e):r);var s=Tr(n,o),u=Cr.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}Cr.chmod(u,146|s);var f=Cr.open(u,577);Cr.write(f,t,0,t.length,0,a),Cr.close(f),Cr.chmod(u,s)}return u},createDevice(r,e,t,n){var o=dr.join2("string"==typeof r?r:Cr.getPath(r),e),a=Tr(!!t,!!n);Cr.createDevice.major||(Cr.createDevice.major=64);var i=Cr.makedev(Cr.createDevice.major++,0);return Cr.registerDevice(i,{open(r){r.seekable=!1},close(r){n&&n.buffer&&n.buffer.length&&n(10)},read(r,e,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(r){throw new Cr.ErrnoError(29)}if(void 0===u&&0===i)throw new Cr.ErrnoError(6);if(null==u)break;i++,e[n+s]=u}return i&&(r.node.timestamp=Date.now()),i},write(r,e,t,o,a){for(var i=0;i<o;i++)try{n(e[t+i])}catch(r){throw new Cr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),Cr.mkdev(o,a,i)},forceLoadFile(r){if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!f)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=gr(f(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new Cr.ErrnoError(29)}},createLazyFile(r,e,n,o,a){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}},i.prototype.setDataGetter=function(r){this.getter=r},i.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",n,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+n+". Status: "+r.status);var e,t=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;o||(i=t);var s=this;s.setDataGetter((r=>{var e=r*i,o=(r+1)*i-1;if(o=Math.min(o,t-1),"undefined"==typeof s.chunks[r]&&(s.chunks[r]=((r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>t-1)throw new Error("only "+t+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",n,!1),t!==i&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+n+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):gr(o.responseText||"",!0)})(e,o)),"undefined"==typeof s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!a&&t||(i=t=1,t=this.getter(0).length,i=t,E("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=t,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){0;var s=new i;Object.defineProperties(s,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var u={isDevice:!1,contents:s}}else u={isDevice:!1,url:n};var c=Cr.createFile(r,e,u,o,a);u.contents?c.contents=u.contents:u.url&&(c.contents=null,c.url=u.url),Object.defineProperties(c,{usedBytes:{get:function(){return this.contents.length}}});var l={};function d(r,e,t,n,o){var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)e[t+s]=a[o+s];else for(s=0;s<i;s++)e[t+s]=a.get(o+s);return i}return Object.keys(c.stream_ops).forEach((r=>{var e=c.stream_ops[r];l[r]=function(){return Cr.forceLoadFile(c),e.apply(null,arguments)}})),l.read=(r,e,t,n,o)=>(Cr.forceLoadFile(c),d(r,e,t,n,o)),l.mmap=(r,e,n,o,a)=>{Cr.forceLoadFile(c);var i=br(e);if(!i)throw new Cr.ErrnoError(48);return d(r,t(),i,e,n),{ptr:i,allocated:!0}},c.stream_ops=l,c}},Pr=(r,e)=>r?mr(n(),r,e):"",$r={DEFAULT_POLLMASK:5,calculateAt(r,e,t){if(dr.isAbs(e))return e;var n;-100===r?n=Cr.cwd():n=$r.getStreamFromFD(r).path;if(0==e.length){if(!t)throw new Cr.ErrnoError(44);return n}return dr.join2(n,e)},doStat(r,e,t){try{var n=r(e)}catch(r){if(r&&r.node&&dr.normalize(e)!==dr.normalize(Cr.getPath(r.node)))return-54;throw r}i()[t>>2]=n.dev,i()[t+4>>2]=n.mode,s()[t+8>>2]=n.nlink,i()[t+12>>2]=n.uid,i()[t+16>>2]=n.gid,i()[t+20>>2]=n.rdev,tr=[n.size>>>0,(er=n.size,+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+24>>2]=tr[0],i()[t+28>>2]=tr[1],i()[t+32>>2]=4096,i()[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),u=n.ctime.getTime();return tr=[Math.floor(o/1e3)>>>0,(er=Math.floor(o/1e3),+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+40>>2]=tr[0],i()[t+44>>2]=tr[1],s()[t+48>>2]=o%1e3*1e3,tr=[Math.floor(a/1e3)>>>0,(er=Math.floor(a/1e3),+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+56>>2]=tr[0],i()[t+60>>2]=tr[1],s()[t+64>>2]=a%1e3*1e3,tr=[Math.floor(u/1e3)>>>0,(er=Math.floor(u/1e3),+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+72>>2]=tr[0],i()[t+76>>2]=tr[1],s()[t+80>>2]=u%1e3*1e3,tr=[n.ino>>>0,(er=n.ino,+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[t+88>>2]=tr[0],i()[t+92>>2]=tr[1],0},doMsync(r,e,t,o,a){if(!Cr.isFile(e.node.mode))throw new Cr.ErrnoError(43);if(2&o)return 0;var i=n().slice(r,r+t);Cr.msync(e,i,a,t,o)},varargs:void 0,get(){var r=i()[$r.varargs>>2];return $r.varargs+=4,r},getp:()=>$r.get(),getStr:r=>Pr(r),getStreamFromFD:r=>Cr.getStreamChecked(r)};function Sr(r){if(w)return Pt(0,1,r);$=r,Y()||(Ar.terminateAllThreads(),d.onExit&&d.onExit(r),x=!0),y(r,new sr(r))}var Mr=(r,e)=>{if($=r,w)throw Wr(r),"unwind";Sr(r)},Dr=r=>{if(r instanceof sr||"unwind"==r)return $;y(1,r)},Ar={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init(){w?Ar.initWorker():Ar.initMainThread()},initMainThread(){for(var r=Math.min(4,Math.max(1,navigator.hardwareConcurrency-1));r--;)Ar.allocateUnusedWorker();q((()=>{K(),Ar.loadWasmModuleToAllWorkers((()=>Q()))}))},initWorker(){P=!1},setExitStatus:r=>{$=r},terminateAllThreads__deps:["$terminateWorker"],terminateAllThreads:()=>{for(var r of Ar.runningWorkers)ur(r);for(var r of Ar.unusedWorkers)ur(r);Ar.unusedWorkers=[],Ar.runningWorkers=[],Ar.pthreads=[]},returnWorkerToPool:r=>{var e=r.pthread_ptr;delete Ar.pthreads[e],Ar.unusedWorkers.push(r),Ar.runningWorkers.splice(Ar.runningWorkers.indexOf(r),1),r.pthread_ptr=0,Mn(e)},receiveObjectTransfer(r){},threadInitTLS(){Ar.tlsInitFunctions.forEach((r=>r()))},loadWasmModuleToWorker:e=>new Promise((t=>{e.onmessage=r=>{var n=r.data,o=n.cmd;if(n.targetThread&&n.targetThread!=kn()){var a=Ar.pthreads[n.targetThread];a?a.postMessage(n,n.transferList):k(`Internal error! Worker sent a message "${o}" to target pthread ${n.targetThread}, but that thread no longer exists!`)}else{var i;"checkMailbox"===o?Tt():"spawnThread"===o?lr(n):"cleanupThread"===o?cr(n.thread):"killThread"===o?(r=>{var e=Ar.pthreads[r];delete Ar.pthreads[r],ur(e),Mn(r),Ar.runningWorkers.splice(Ar.runningWorkers.indexOf(e),1),e.pthread_ptr=0})(n.thread):"cancelThread"===o?(i=n.thread,Ar.pthreads[i].postMessage({cmd:"cancel"})):"loaded"===o?(e.loaded=!0,t(e)):"alert"===o?alert(`Thread ${n.threadId}: ${n.text}`):"setimmediate"===n.target?e.postMessage(n):"callHandler"===o?d[n.handler](...n.args):o&&k(`worker sent an unknown command ${o}`)}},e.onerror=r=>{throw k(`worker sent an error! ${r.filename}:${r.lineno}: ${r.message}`),r};var n=[];for(var o of["onExit","onAbort","print","printErr"])d.hasOwnProperty(o)&&n.push(o);e.postMessage({cmd:"load",handlers:n,urlOrBlob:d.mainScriptUrlOrBlob||r,wasmMemory:T,wasmModule:C})})),loadWasmModuleToAllWorkers(r){if(w)return r();Promise.all(Ar.unusedWorkers.map(Ar.loadWasmModuleToWorker)).then(r)},allocateUnusedWorker(){var r,e=_("ScanbotSDK.Asm-simd-threads.worker.js");r=new Worker(e),Ar.unusedWorkers.push(r)},getNewWorker:()=>(0==Ar.unusedWorkers.length&&(Ar.allocateUnusedWorker(),Ar.loadWasmModuleToWorker(Ar.unusedWorkers[0])),Ar.unusedWorkers.pop())};d.PThread=Ar;var Fr=r=>{for(;r.length>0;)r.shift()(d)};function Wr(r){if(w)return Pt(1,0,r);Mr(r)}d.establishStackSpace=()=>{var r=kn(),e=i()[r+52>>2],t=i()[r+56>>2];Wn(e,e-t),On(e)};var jr=r=>I.get(r);d.invokeEntryPoint=(r,e)=>{!function(r){Y()?Ar.setExitStatus(r):Dn(r)}(jr(r)(e))};var Or=r=>{Ar.tlsInitFunctions.push(r)},xr=[],Rr=0,Ur=0;function Ir(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){s()[this.ptr+4>>2]=r},this.get_type=function(){return s()[this.ptr+4>>2]},this.set_destructor=function(r){s()[this.ptr+8>>2]=r},this.get_destructor=function(){return s()[this.ptr+8>>2]},this.set_caught=function(r){r=r?1:0,t()[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=t()[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,t()[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=t()[this.ptr+13>>0]},this.init=function(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)},this.set_adjusted_ptr=function(r){s()[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return s()[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Nn(this.get_type()))return s()[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}var Nr=r=>{var e=Ur;if(!e)return Tn(0),0;var t=new Ir(e);t.set_adjusted_ptr(e);var n=t.get_type();if(!n)return Tn(0),e;for(var o in r){var a=r[o];if(0===a||a===n)break;var i=t.ptr+16;if(In(a,n,i))return Tn(a),e}return Tn(n),e},zr=()=>{var r=xr.pop();r||Z("no exception to throw");var e=r.excPtr;throw r.get_rethrown()||(xr.push(r),r.set_rethrown(!0),r.set_caught(!1),Rr++),Ur=e};function Hr(r,e,t,n){return w?Pt(2,1,r,e,t,n):Lr(r,e,t,n)}var Lr=(r,e,t,n)=>{if("undefined"==typeof SharedArrayBuffer)return k("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var o=[];if(w&&0===o.length)return Hr(r,e,t,n);var a={startRoutine:t,pthread_ptr:r,arg:n,transferList:o};return w?(a.cmd="spawnThread",postMessage(a,o),0):lr(a)};function Br(r,e,t,n,o){if(w)return Pt(3,1,r,e,t,n,o);try{for(var a=0,s=e?i()[e>>2]:0,u=e?i()[e+4>>2]:0,c=t?i()[t>>2]:0,l=t?i()[t+4>>2]:0,d=n?i()[n>>2]:0,f=n?i()[n+4>>2]:0,h=0,p=0,m=0,v=0,y=0,g=0,_=(e?i()[e>>2]:0)|(t?i()[t>>2]:0)|(n?i()[n>>2]:0),b=(e?i()[e+4>>2]:0)|(t?i()[t+4>>2]:0)|(n?i()[n+4>>2]:0),E=function(r,e,t,n){return r<32?e&n:t&n},k=0;k<r;k++){var T=1<<k%32;if(E(k,_,b,T)){var C=$r.getStreamFromFD(k),P=$r.DEFAULT_POLLMASK;if(C.stream_ops.poll){var $=-1;if(o)$=1e3*((e?i()[o>>2]:0)+(e?i()[o+8>>2]:0)/1e6);P=C.stream_ops.poll(C,$)}1&P&&E(k,s,u,T)&&(k<32?h|=T:p|=T,a++),4&P&&E(k,c,l,T)&&(k<32?m|=T:v|=T,a++),2&P&&E(k,d,f,T)&&(k<32?y|=T:g|=T,a++)}}return e&&(i()[e>>2]=h,i()[e+4>>2]=p),t&&(i()[t>>2]=m,i()[t+4>>2]=v),n&&(i()[n>>2]=y,i()[n+4>>2]=g),a}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Yr(r,e,t){if(w)return Pt(4,1,r,e,t);$r.varargs=t;try{var n=$r.getStreamFromFD(r);switch(e){case 0:if((a=$r.get())<0)return-28;for(;Cr.streams[a];)a++;return Cr.createStream(n,a).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var a=$r.get();return n.flags|=a,0;case 5:a=$r.getp();return o()[a+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return s=28,i()[En()>>2]=s,-1}}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}var s}function Vr(r,e){if(w)return Pt(5,1,r,e);try{var t=$r.getStreamFromFD(r);return $r.doStat(Cr.stat,t.path,e)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function qr(r,e,n){if(w)return Pt(6,1,r,e,n);$r.varargs=n;try{var a=$r.getStreamFromFD(r);switch(e){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return a.tty?0:-59;case 21505:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcgets){var s=a.tty.ops.ioctl_tcgets(a),u=$r.getp();i()[u>>2]=s.c_iflag||0,i()[u+4>>2]=s.c_oflag||0,i()[u+8>>2]=s.c_cflag||0,i()[u+12>>2]=s.c_lflag||0;for(var c=0;c<32;c++)t()[u+c+17>>0]=s.c_cc[c]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!a.tty)return-59;if(a.tty.ops.ioctl_tcsets){u=$r.getp();var l=i()[u>>2],d=i()[u+4>>2],f=i()[u+8>>2],h=i()[u+12>>2],p=[];for(c=0;c<32;c++)p.push(t()[u+c+17>>0]);return a.tty.ops.ioctl_tcsets(a.tty,e,{c_iflag:l,c_oflag:d,c_cflag:f,c_lflag:h,c_cc:p})}return 0;case 21519:if(!a.tty)return-59;u=$r.getp();return i()[u>>2]=0,0;case 21520:return a.tty?-28:-59;case 21531:u=$r.getp();return Cr.ioctl(a,e,u);case 21523:if(!a.tty)return-59;if(a.tty.ops.ioctl_tiocgwinsz){var m=a.tty.ops.ioctl_tiocgwinsz(a.tty);u=$r.getp();o()[u>>1]=m[0],o()[u+2>>1]=m[1]}return 0;default:return-28}}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Gr(r,e,t,n){if(w)return Pt(8,1,r,e,t,n);try{e=$r.getStr(e);var o=256&n,a=4096&n;return n&=-6401,e=$r.calculateAt(r,e,a),$r.doStat(o?Cr.lstat:Cr.stat,e,t)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Jr(r,e,t,n){if(w)return Pt(9,1,r,e,t,n);$r.varargs=n;try{e=$r.getStr(e),e=$r.calculateAt(r,e);var o=n?$r.get():0;return Cr.open(e,t,o).fd}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Xr(r){if(w)return Pt(10,1,r);try{return r=$r.getStr(r),Cr.rmdir(r),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Kr(r,e){if(w)return Pt(11,1,r,e);try{return r=$r.getStr(r),$r.doStat(Cr.stat,r,e)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Qr(r,e,t){if(w)return Pt(12,1,r,e,t);try{return e=$r.getStr(e),e=$r.calculateAt(r,e),0===t?Cr.unlink(e):512===t?Cr.rmdir(e):Z("Invalid flags passed to unlinkat"),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}var Zr={},re=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function ee(r){return this.fromWireType(i()[r>>2])}var te={},ne={},oe={},ae=void 0,ie=r=>{throw new ae(r)},se=(r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&ie("Mismatched type converter count");for(var o=0;o<r.length;++o)fe(r[o],n[o])}r.forEach((function(r){oe[r]=e}));var o=new Array(e.length),a=[],i=0;e.forEach(((r,e)=>{ne.hasOwnProperty(r)?o[e]=ne[r]:(a.push(r),te.hasOwnProperty(r)||(te[r]=[]),te[r].push((()=>{o[e]=ne[r],++i===a.length&&n(o)})))})),0===a.length&&n(o)},ue=void 0,ce=r=>{for(var e="",t=r;n()[t];)e+=ue[n()[t++]];return e},le=void 0,de=r=>{throw new le(r)};function fe(r,e,t={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(r,e,t={}){var n=e.name;if(r||de(`type "${n}" must have a positive integer typeid pointer`),ne.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;de(`Cannot register type '${n}' twice`)}if(ne[r]=e,delete oe[r],te.hasOwnProperty(r)){var o=te[r];delete te[r],o.forEach((r=>r()))}}(r,e,t)}var he=8;function pe(r){if(!(this instanceof xe))return!1;if(!(r instanceof xe))return!1;for(var e=this.$$.ptrType.registeredClass,t=this.$$.ptr,n=r.$$.ptrType.registeredClass,o=r.$$.ptr;e.baseClass;)t=e.upcast(t),e=e.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return e===n&&t===o}var me=r=>{de(r.$$.ptrType.registeredClass.name+" instance already deleted")},ve=!1,ye=r=>{},we=r=>{r.count.value-=1,0===r.count.value&&(r=>{r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr)})(r)},ge=(r,e,t)=>{if(e===t)return r;if(void 0===t.baseClass)return null;var n=ge(r,e,t.baseClass);return null===n?null:t.downcast(n)},_e={},be=()=>Object.keys($e).length,Ee=()=>{var r=[];for(var e in $e)$e.hasOwnProperty(e)&&r.push($e[e]);return r},ke=[],Te=()=>{for(;ke.length;){var r=ke.pop();r.$$.deleteScheduled=!1,r.delete()}},Ce=void 0,Pe=r=>{Ce=r,ke.length&&Ce&&Ce(Te)},$e={},Se=(r,e)=>(e=((r,e)=>{for(void 0===e&&de("ptr should not be undefined");r.baseClass;)e=r.upcast(e),r=r.baseClass;return e})(r,e),$e[e]),Me=(r,e)=>(e.ptrType&&e.ptr||ie("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!==!!e.smartPtr&&ie("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ae(Object.create(r,{$$:{value:e}})));function De(r){var e=this.getPointee(r);if(!e)return this.destructor(r),null;var t=Se(this.registeredClass,e);if(void 0!==t){if(0===t.$$.count.value)return t.$$.ptr=e,t.$$.smartPtr=r,t.clone();var n=t.clone();return this.destructor(r),n}function o(){return this.isSmartPointer?Me(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:r}):Me(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var a,i=this.registeredClass.getActualType(e),s=_e[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=ge(e,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?Me(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:r}):Me(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}var Ae=r=>"undefined"==typeof FinalizationRegistry?(Ae=r=>r,r):(ve=new FinalizationRegistry((r=>{we(r.$$)})),Ae=r=>{var e=r.$$;if(!!e.smartPtr){var t={$$:e};ve.register(r,t,r)}return r},ye=r=>ve.unregister(r),Ae(r));function Fe(){if(this.$$.ptr||me(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r,e=Ae(Object.create(Object.getPrototypeOf(this),{$$:{value:(r=this.$$,{count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function We(){this.$$.ptr||me(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&de("Object already scheduled for deletion"),ye(this),we(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function je(){return!this.$$.ptr}function Oe(){return this.$$.ptr||me(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&de("Object already scheduled for deletion"),ke.push(this),1===ke.length&&Ce&&Ce(Te),this.$$.deleteScheduled=!0,this}function xe(){}var Re=r=>{if(void 0===r)return"_unknown";var e=(r=r.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?`_${r}`:r};function Ue(r,e){return{[r=Re(r)]:function(){return e.apply(this,arguments)}}[r]}var Ie=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(){return r[e].overloadTable.hasOwnProperty(arguments.length)||de(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[arguments.length].apply(this,arguments)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},Ne=(r,e,t)=>{d.hasOwnProperty(r)?((void 0===t||void 0!==d[r].overloadTable&&void 0!==d[r].overloadTable[t])&&de(`Cannot register public name '${r}' twice`),Ie(d,r,r),d.hasOwnProperty(t)&&de(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),d[r].overloadTable[t]=e):(d[r]=e,void 0!==t&&(d[r].numArguments=t))};function ze(r,e,t,n,o,a,i,s){this.name=r,this.constructor=e,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=o,this.getActualType=a,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var He=(r,e,t)=>{for(;e!==t;)e.upcast||de(`Expected null or instance of ${t.name}, got an instance of ${e.name}`),r=e.upcast(r),e=e.baseClass;return r};function Le(r,e){if(null===e)return this.isReference&&de(`null is not a valid ${this.name}`),0;e.$$||de(`Cannot pass "${dt(e)}" as a ${this.name}`),e.$$.ptr||de(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=e.$$.ptrType.registeredClass;return He(e.$$.ptr,t,this.registeredClass)}function Be(r,e){var t;if(null===e)return this.isReference&&de(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),null!==r&&r.push(this.rawDestructor,t),t):0;e.$$||de(`Cannot pass "${dt(e)}" as a ${this.name}`),e.$$.ptr||de(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&de(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(t=He(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&de("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?t=e.$$.smartPtr:de(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)t=e.$$.smartPtr;else{var o=e.clone();t=this.rawShare(t,lt.toHandle((()=>o.delete()))),null!==r&&r.push(this.rawDestructor,t)}break;default:de("Unsupporting sharing policy")}return t}function Ye(r,e){if(null===e)return this.isReference&&de(`null is not a valid ${this.name}`),0;e.$$||de(`Cannot pass "${dt(e)}" as a ${this.name}`),e.$$.ptr||de(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&de(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var t=e.$$.ptrType.registeredClass;return He(e.$$.ptr,t,this.registeredClass)}function Ve(r){return this.fromWireType(s()[r>>2])}function qe(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r}function Ge(r){this.rawDestructor&&this.rawDestructor(r)}var Je=r=>{null!==r&&r.delete()};function Xe(r,e,t,n,o,a,i,s,u,c,l){this.name=r,this.registeredClass=e,this.isReference=t,this.isConst=n,this.isSmartPointer=o,this.pointeeType=a,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=l,o||void 0!==e.baseClass?this.toWireType=Be:n?(this.toWireType=Le,this.destructorFunction=null):(this.toWireType=Ye,this.destructorFunction=null)}var Ke=(r,e,t)=>{d.hasOwnProperty(r)||ie("Replacing nonexistant public symbol"),void 0!==d[r].overloadTable&&void 0!==t?d[r].overloadTable[t]=e:(d[r]=e,d[r].argCount=t)},Qe=(r,e,t)=>r.includes("j")?((r,e,t)=>{var n=d["dynCall_"+r];return t&&t.length?n.apply(null,[e].concat(t)):n.call(null,e)})(r,e,t):jr(e).apply(null,t),Ze=(r,e)=>{var t,n,o,a=(r=ce(r)).includes("j")?(t=r,n=e,o=[],function(){return o.length=0,Object.assign(o,arguments),Qe(t,n,o)}):jr(e);return"function"!=typeof a&&de(`unknown function pointer with signature ${r}: ${e}`),a},rt=void 0,et=r=>{var e=Pn(r),t=ce(e);return bn(e),t},tt=(r,e)=>{var t=[],n={};throw e.forEach((function r(e){n[e]||ne[e]||(oe[e]?oe[e].forEach(r):(t.push(e),n[e]=!0))})),new rt(`${r}: `+t.map(et).join([", "]))},nt=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(s()[e+4*n>>2]);return t};function ot(r,e){if(!(r instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof r} which is not a function`);var t=Ue(r.name||"unknownFunctionName",(function(){}));t.prototype=r.prototype;var n=new t,o=r.apply(n,e);return o instanceof Object?o:n}function at(r,e,t,n,o,a){var i=e.length;i<2&&de("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==e[1]&&null!==t,u=!1,c=1;c<e.length;++c)if(null!==e[c]&&void 0===e[c].destructorFunction){u=!0;break}var l="void"!==e[0].name,d="",f="";for(c=0;c<i-2;++c)d+=(0!==c?", ":"")+"arg"+c,f+=(0!==c?", ":"")+"arg"+c+"Wired";var h=`\n return function ${Re(r)}(${d}) {\n if (arguments.length !== ${i-2}) {\n throwBindingError('function ${r} called with ' + arguments.length + ' arguments, expected ${i-2}');\n }`;u&&(h+="var destructors = [];\n");var p=u?"destructors":"null",m=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],v=[de,n,o,re,e[0],e[1]];s&&(h+="var thisWired = classParam.toWireType("+p+", this);\n");for(c=0;c<i-2;++c)h+="var arg"+c+"Wired = argType"+c+".toWireType("+p+", arg"+c+"); // "+e[c+2].name+"\n",m.push("argType"+c),v.push(e[c+2]);if(s&&(f="thisWired"+(f.length>0?", ":"")+f),h+=(l||a?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",u)h+="runDestructors(destructors);\n";else for(c=s?1:2;c<e.length;++c){var y=1===c?"thisWired":"arg"+(c-2)+"Wired";null!==e[c].destructorFunction&&(h+=y+"_dtor("+y+"); // "+e[c].name+"\n",m.push(y+"_dtor"),v.push(e[c].destructorFunction))}return l&&(h+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),h+="}\n",m.push(h),ot(Function,m).apply(null,v)}function it(){this.allocated=[void 0],this.freelist=[]}var st=new it,ut=r=>{r>=st.reserved&&0==--st.get(r).refcount&&st.free(r)},ct=()=>{for(var r=0,e=st.reserved;e<st.allocated.length;++e)void 0!==st.allocated[e]&&++r;return r},lt={toValue:r=>(r||de("Cannot use deleted val. handle = "+r),st.get(r).value),toHandle:r=>{switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return st.allocate({refcount:1,value:r})}}},dt=r=>{if(null===r)return"null";var e=typeof r;return"object"===e||"array"===e||"function"===e?r.toString():""+r},ft=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType((T.buffer!=S.buffer&&U(),j)[r>>2])};case 8:return function(r){return this.fromWireType(u()[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},ht=(r,e,u)=>{switch(e){case 1:return u?r=>t()[r>>0]:r=>n()[r>>0];case 2:return u?r=>o()[r>>1]:r=>a()[r>>1];case 4:return u?r=>i()[r>>2]:r=>s()[r>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},pt=(r,e,t)=>wr(r,n(),e,t),mt="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,vt=(r,e)=>{for(var t=r,i=t>>1,s=i+e/2;!(i>=s)&&a()[i];)++i;if((t=i<<1)-r>32&&mt)return mt.decode(n().slice(r,t));for(var u="",c=0;!(c>=e/2);++c){var l=o()[r+2*c>>1];if(0==l)break;u+=String.fromCharCode(l)}return u},yt=(r,e,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=e,a=(t-=2)<2*r.length?t/2:r.length,i=0;i<a;++i){var s=r.charCodeAt(i);o()[e>>1]=s,e+=2}return o()[e>>1]=0,e-n},wt=r=>2*r.length,gt=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var o=i()[r+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},_t=(r,e,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=e,o=n+t-4,a=0;a<r.length;++a){var s=r.charCodeAt(a);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&r.charCodeAt(++a);if(i()[e>>2]=s,(e+=4)+4>o)break}return i()[e>>2]=0,e-n},bt=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},Et=r=>{if(!x)try{r(),(()=>{if(!Y())try{w?Dn($):Mr($)}catch(r){Dr(r)}})()}catch(r){Dr(r)}},kt=r=>{if("function"==typeof Atomics.waitAsync){Atomics.waitAsync(i(),r>>2,r).value.then(Tt);var e=r+128;Atomics.store(i(),e>>2,1)}};d.__emscripten_thread_mailbox_await=kt;var Tt=()=>{var r=kn();r&&(kt(r),Et((()=>An())))};d.checkMailbox=Tt;var Ct=r=>{var e=jn(),t=r();return On(e),t},Pt=function(r,e){var t=arguments.length-2,n=arguments;return Ct((()=>{for(var o=t,a=xn(8*o),i=a>>3,s=0;s<t;s++){var c=n[2+s];u()[i+s]=c}return Sn(r,o,a,e)}))},$t=[],St=(r,e)=>{var t=ne[r];return void 0===t&&de(e+" has unknown type "+et(r)),t},Mt={},Dt=r=>{var e=Mt[r];return void 0===e?ce(r):e},At=[],Ft=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Wt=[],jt=(r,e)=>e+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*e:NaN;var Ot=r=>r%4==0&&(r%100!=0||r%400==0),xt=[0,31,60,91,121,152,182,213,244,274,305,335],Rt=[0,31,59,90,120,151,181,212,243,273,304,334],Ut=r=>(Ot(r.getFullYear())?xt:Rt)[r.getMonth()]+r.getDate()-1;function It(r,e,t,n,o,a,u,c){if(w)return Pt(13,1,r,e,t,n,o,a,u,c);var l=jt(o,a);try{if(isNaN(l))return 61;var d=$r.getStreamFromFD(n),f=Cr.mmap(d,r,l,e,t),h=f.ptr;return i()[u>>2]=f.allocated,s()[c>>2]=h,0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}function Nt(r,e,t,n,o,a,i){if(w)return Pt(14,1,r,e,t,n,o,a,i);var s=jt(a,i);try{if(isNaN(s))return 61;var u=$r.getStreamFromFD(o);2&t&&$r.doMsync(r,u,e,n,s),Cr.munmap(u)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}}var zt,Ht=r=>{var e=yr(r)+1,t=_n(e);return t&&pt(r,t,e),t},Lt=[],Bt=(r,e,t)=>{var o=((r,e)=>{var t;for(Lt.length=0;t=n()[r++];)e+=105!=t&&e%8?4:0,Lt.push(105==t?i()[e>>2]:u()[e>>3]),e+=105==t?4:8;return Lt})(e,t);return ir[r].apply(null,o)};zt=()=>performance.timeOrigin+performance.now();var Yt=r=>{Z("OOM")},Vt=r=>{var e=(r-T.buffer.byteLength+65535)/65536;try{return T.grow(e),U(),1}catch(r){}},qt={},Gt=()=>{if(!Gt.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:v||"./this.program"};for(var e in qt)void 0===qt[e]?delete r[e]:r[e]=qt[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);Gt.strings=t}return Gt.strings},Jt=function(r,e){if(w)return Pt(15,1,r,e);var n=0;return Gt().forEach(((o,a)=>{var i=e+n;s()[r+4*a>>2]=i,((r,e)=>{for(var n=0;n<r.length;++n)t()[e++>>0]=r.charCodeAt(n);t()[e>>0]=0})(o,i),n+=o.length+1})),0},Xt=function(r,e){if(w)return Pt(16,1,r,e);var t=Gt();s()[r>>2]=t.length;var n=0;return t.forEach((r=>n+=r.length+1)),s()[e>>2]=n,0};function Kt(r){if(w)return Pt(17,1,r);try{var e=$r.getStreamFromFD(r);return Cr.close(e),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}function Qt(r,e){if(w)return Pt(18,1,r,e);try{var n=$r.getStreamFromFD(r),a=n.tty?2:Cr.isDir(n.mode)?3:Cr.isLink(n.mode)?7:4;return t()[e>>0]=a,o()[e+2>>1]=0,tr=[0,(er=0,+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[e+8>>2]=tr[0],i()[e+12>>2]=tr[1],tr=[0,(er=0,+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[e+16>>2]=tr[0],i()[e+20>>2]=tr[1],0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}function Zt(r,e,n,o){if(w)return Pt(19,1,r,e,n,o);try{var a=((r,e,n,o)=>{for(var a=0,i=0;i<n;i++){var u=s()[e>>2],c=s()[e+4>>2];e+=8;var l=Cr.read(r,t(),u,c,o);if(l<0)return-1;if(a+=l,l<c)break;"undefined"!=typeof o&&(o+=l)}return a})($r.getStreamFromFD(r),e,n);return s()[o>>2]=a,0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}function rn(r,e,t,n,o){if(w)return Pt(20,1,r,e,t,n,o);var a=jt(e,t);try{if(isNaN(a))return 61;var s=$r.getStreamFromFD(r);return Cr.llseek(s,a,n),tr=[s.position>>>0,(er=s.position,+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)],i()[o>>2]=tr[0],i()[o+4>>2]=tr[1],s.getdents&&0===a&&0===n&&(s.getdents=null),0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}function en(r,e,n,o){if(w)return Pt(21,1,r,e,n,o);try{var a=((r,e,n,o)=>{for(var a=0,i=0;i<n;i++){var u=s()[e>>2],c=s()[e+4>>2];e+=8;var l=Cr.write(r,t(),u,c,o);if(l<0)return-1;a+=l,"undefined"!=typeof o&&(o+=l)}return a})($r.getStreamFromFD(r),e,n);return s()[o>>2]=a,0}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return r.errno}}var tn=(r,e)=>{for(var t=0,n=0;n<=e;t+=r[n++]);return t},nn=[31,29,31,30,31,30,31,31,30,31,30,31],on=[31,28,31,30,31,30,31,31,30,31,30,31],an=(r,e)=>{for(var t=new Date(r.getTime());e>0;){var n=Ot(t.getFullYear()),o=t.getMonth(),a=(n?nn:on)[o];if(!(e>a-t.getDate()))return t.setDate(t.getDate()+e),t;e-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t},sn=(r,e,n,o)=>{var a=s()[o+40>>2],u={tm_sec:i()[o>>2],tm_min:i()[o+4>>2],tm_hour:i()[o+8>>2],tm_mday:i()[o+12>>2],tm_mon:i()[o+16>>2],tm_year:i()[o+20>>2],tm_wday:i()[o+24>>2],tm_yday:i()[o+28>>2],tm_isdst:i()[o+32>>2],tm_gmtoff:i()[o+36>>2],tm_zone:a?Pr(a):""},c=Pr(n),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 d in l)c=c.replace(new RegExp(d,"g"),l[d]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function p(r,e,t){for(var n="number"==typeof r?r.toString():r||"";n.length<e;)n=t[0]+n;return n}function m(r,e){return p(r,e,"0")}function v(r,e){function t(r){return r<0?-1:r>0?1:0}var n;return 0===(n=t(r.getFullYear()-e.getFullYear()))&&0===(n=t(r.getMonth()-e.getMonth()))&&(n=t(r.getDate()-e.getDate())),n}function y(r){switch(r.getDay()){case 0:return new Date(r.getFullYear()-1,11,29);case 1:return r;case 2:return new Date(r.getFullYear(),0,3);case 3:return new Date(r.getFullYear(),0,2);case 4:return new Date(r.getFullYear(),0,1);case 5:return new Date(r.getFullYear()-1,11,31);case 6:return new Date(r.getFullYear()-1,11,30)}}function w(r){var e=an(new Date(r.tm_year+1900,0,1),r.tm_yday),t=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=y(t),a=y(n);return v(o,e)<=0?v(a,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var g={"%a":r=>f[r.tm_wday].substring(0,3),"%A":r=>f[r.tm_wday],"%b":r=>h[r.tm_mon].substring(0,3),"%B":r=>h[r.tm_mon],"%C":r=>m((r.tm_year+1900)/100|0,2),"%d":r=>m(r.tm_mday,2),"%e":r=>p(r.tm_mday,2," "),"%g":r=>w(r).toString().substring(2),"%G":r=>w(r),"%H":r=>m(r.tm_hour,2),"%I":r=>{var e=r.tm_hour;return 0==e?e=12:e>12&&(e-=12),m(e,2)},"%j":r=>m(r.tm_mday+tn(Ot(r.tm_year+1900)?nn:on,r.tm_mon-1),3),"%m":r=>m(r.tm_mon+1,2),"%M":r=>m(r.tm_min,2),"%n":()=>"\n","%p":r=>r.tm_hour>=0&&r.tm_hour<12?"AM":"PM","%S":r=>m(r.tm_sec,2),"%t":()=>"\t","%u":r=>r.tm_wday||7,"%U":r=>{var e=r.tm_yday+7-r.tm_wday;return m(Math.floor(e/7),2)},"%V":r=>{var e=Math.floor((r.tm_yday+7-(r.tm_wday+6)%7)/7);if((r.tm_wday+371-r.tm_yday-2)%7<=2&&e++,e){if(53==e){var t=(r.tm_wday+371-r.tm_yday)%7;4==t||3==t&&Ot(r.tm_year)||(e=1)}}else{e=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&Ot(r.tm_year%400-1))&&e++}return m(e,2)},"%w":r=>r.tm_wday,"%W":r=>{var e=r.tm_yday+7-(r.tm_wday+6)%7;return m(Math.floor(e/7),2)},"%y":r=>(r.tm_year+1900).toString().substring(2),"%Y":r=>r.tm_year+1900,"%z":r=>{var e=r.tm_gmtoff,t=e>=0;return e=(e=Math.abs(e)/60)/60*100+e%60,(t?"+":"-")+String("0000"+e).slice(-4)},"%Z":r=>r.tm_zone,"%%":()=>"%"};for(var d in c=c.replace(/%%/g,"\0\0"),g)c.includes(d)&&(c=c.replace(new RegExp(d,"g"),g[d](u)));var _,b,E=gr(c=c.replace(/\0\0/g,"%"),!1);return E.length>e?0:(_=E,b=r,t().set(_,b),E.length-1)},un=r=>parseInt(r),cn=Ht;Ar.init();var ln,dn,fn,hn=function(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=Cr.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},pn=365,mn=146;Object.defineProperties(hn.prototype,{read:{get:function(){return(this.mode&pn)===pn},set:function(r){r?this.mode|=pn:this.mode&=-366}},write:{get:function(){return(this.mode&mn)===mn},set:function(r){r?this.mode|=mn:this.mode&=-147}},isFolder:{get:function(){return Cr.isDir(this.mode)}},isDevice:{get:function(){return Cr.isChrdev(this.mode)}}}),Cr.FSNode=hn,Cr.createPreloadedFile=(r,e,t,n,o,a,i,s,u,c)=>{var l=e?hr.resolve(dr.join2(r,e)):r;function d(t){function d(t){c&&c(),s||Cr.createDataFile(r,e,t,n,o,u),a&&a(),Q()}((r,e,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return kr.forEach((a=>{o||a.canHandle(e)&&(a.handle(r,e,t,n),o=!0)})),o})(t,l,d,(()=>{i&&i(),Q()}))||d(t)}K(),"string"==typeof t?((r,e,t,n)=>{var o=n?"":`al ${r}`;h(r,(t=>{R(t,`Loading data file "${r}" failed (no arrayBuffer).`),e(new Uint8Array(t)),o&&Q()}),(e=>{if(!t)throw`Loading data file "${r}" failed.`;t()})),o&&K()})(t,(r=>d(r)),i):d(t)},Cr.staticInit(),ae=d.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},(()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);ue=r})(),le=d.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},xe.prototype.isAliasOf=pe,xe.prototype.clone=Fe,xe.prototype.delete=We,xe.prototype.isDeleted=je,xe.prototype.deleteLater=Oe,d.getInheritedInstanceCount=be,d.getLiveInheritedInstances=Ee,d.flushPendingDeletes=Te,d.setDelayFunction=Pe,Xe.prototype.getPointee=qe,Xe.prototype.destructor=Ge,Xe.prototype.argPackAdvance=he,Xe.prototype.readValueFromPointer=Ve,Xe.prototype.deleteObject=Je,Xe.prototype.fromWireType=De,rt=d.UnboundTypeError=(ln=Error,(fn=Ue(dn="UnboundTypeError",(function(r){this.name=dn,this.message=r;var e=new Error(r).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}))).prototype=Object.create(ln.prototype),fn.prototype.constructor=fn,fn.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},fn),Object.assign(it.prototype,{get(r){return this.allocated[r]},has(r){return void 0!==this.allocated[r]},allocate(r){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=r,e},free(r){this.allocated[r]=void 0,this.freelist.push(r)}}),st.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),st.reserved=st.allocated.length,d.count_emval_handles=ct;var vn,yn=[Sr,Wr,Hr,Br,Yr,Vr,qr,function(r,e){if(w)return Pt(7,1,r,e);try{return r=$r.getStr(r),$r.doStat(Cr.lstat,r,e)}catch(r){if("undefined"==typeof Cr||"ErrnoError"!==r.name)throw r;return-r.errno}},Gr,Jr,Xr,Kr,Qr,It,Nt,Jt,Xt,Kt,Qt,Zt,rn,en],wn={p:(r,e,t,n)=>{Z(`Assertion failed: ${Pr(r)}, at: `+[e?Pr(e):"unknown filename",t,n?Pr(n):"unknown function"])},v:r=>{var e=new Ir(r);return e.get_caught()||(e.set_caught(!0),Rr--),e.set_rethrown(!1),xr.push(e),Un(e.excPtr),e.get_exception_ptr()},Vb:()=>{if(!xr.length)return 0;var r=xr[xr.length-1];return Un(r.excPtr),r.excPtr},I:()=>{Fn(0,0);var r=xr.pop();Rn(r.excPtr),Ur=0},b:()=>Nr([]),i:r=>Nr([r]),x:(r,e)=>Nr([r,e]),_a:zr,Ub:r=>{if(r){var e=new Ir(r);xr.push(e),e.set_rethrown(!0),zr()}},r:(r,e,t)=>{throw new Ir(r).init(e,t),Rr++,Ur=r},Wb:()=>Rr,gc:r=>{$n(r,!1,1,!0,4194304,!1),Ar.threadInitTLS()},ab:r=>{w?postMessage({cmd:"cleanupThread",thread:r}):cr(r)},dc:Lr,e:r=>{throw Ur||(Ur=r),Ur},ac:Br,db:Yr,mc:Vr,nc:qr,kc:Gr,eb:Jr,bc:Xr,lc:Kr,cc:Qr,zb:r=>{var e=Zr[r];delete Zr[r];var t=e.rawConstructor,n=e.rawDestructor,o=e.fields,a=o.map((r=>r.getterReturnType)).concat(o.map((r=>r.setterArgumentType)));se([r],a,(r=>{var a={};return o.forEach(((e,t)=>{var n=e.fieldName,i=r[t],s=e.getter,u=e.getterContext,c=r[t+o.length],l=e.setter,d=e.setterContext;a[n]={read:r=>i.fromWireType(s(u,r)),write:(r,e)=>{var t=[];l(d,r,c.toWireType(t,e)),re(t)}}})),[{name:e.name,fromWireType:r=>{var e={};for(var t in a)e[t]=a[t].read(r);return n(r),e},toWireType:(r,e)=>{for(var o in a)if(!(o in e))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,e[o]);return null!==r&&r.push(n,i),i},argPackAdvance:he,readValueFromPointer:ee,destructorFunction:n}]}))},Mb:(r,e,t,n,o)=>{},sc:(r,e,t,o)=>{fe(r,{name:e=ce(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?t:o},argPackAdvance:he,readValueFromPointer:function(r){return this.fromWireType(n()[r])},destructorFunction:null})},da:(r,e,t,n,o,a,i,s,u,c,l,d,f)=>{l=ce(l),a=Ze(o,a),s&&(s=Ze(i,s)),c&&(c=Ze(u,c)),f=Ze(d,f);var h=Re(l);Ne(h,(function(){tt(`Cannot construct ${l} due to unbound types`,[n])})),se([r,e,t],n?[n]:[],(function(e){var t,o;e=e[0],o=n?(t=e.registeredClass).instancePrototype:xe.prototype;var i=Ue(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new le("Use 'new' to construct "+l);if(void 0===d.constructor_body)throw new le(l+" has no accessible constructor");var r=d.constructor_body[arguments.length];if(void 0===r)throw new le(`Tried to invoke ctor of ${l} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return r.apply(this,arguments)})),u=Object.create(o,{constructor:{value:i}});i.prototype=u;var d=new ze(l,i,u,f,t,a,s,c);d.baseClass&&(void 0===d.baseClass.__derivedClasses&&(d.baseClass.__derivedClasses=[]),d.baseClass.__derivedClasses.push(d));var p=new Xe(l,d,!0,!1,!1),m=new Xe(l+"*",d,!1,!1,!1),v=new Xe(l+" const*",d,!1,!0,!1);return _e[r]={pointerType:m,constPointerType:v},Ke(h,i),[p,m,v]}))},ca:(r,e,t,n,o,a)=>{var i=nt(e,t);o=Ze(n,o),se([],[r],(function(r){var t=`constructor ${(r=r[0]).name}`;if(void 0===r.registeredClass.constructor_body&&(r.registeredClass.constructor_body=[]),void 0!==r.registeredClass.constructor_body[e-1])throw new le(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${r.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return r.registeredClass.constructor_body[e-1]=()=>{tt(`Cannot construct ${r.name} due to unbound types`,i)},se([],i,(n=>(n.splice(1,0,null),r.registeredClass.constructor_body[e-1]=at(t,n,null,o,a),[]))),[]}))},W:(r,e,t,n,o,a,i,s,u)=>{var c=nt(t,n);e=ce(e),a=Ze(o,a),se([],[r],(function(r){var n=`${(r=r[0]).name}.${e}`;function o(){tt(`Cannot call ${n} due to unbound types`,c)}e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&r.registeredClass.pureVirtualFunctions.push(e);var l=r.registeredClass.instancePrototype,d=l[e];return void 0===d||void 0===d.overloadTable&&d.className!==r.name&&d.argCount===t-2?(o.argCount=t-2,o.className=r.name,l[e]=o):(Ie(l,e,n),l[e].overloadTable[t-2]=o),se([],c,(function(o){var s=at(n,o,r,a,i,u);return void 0===l[e].overloadTable?(s.argCount=t-2,l[e]=s):l[e].overloadTable[t-2]=s,[]})),[]}))},rc:(r,e)=>{fe(r,{name:e=ce(e),fromWireType:r=>{var e=lt.toValue(r);return ut(r),e},toWireType:(r,e)=>lt.toHandle(e),argPackAdvance:he,readValueFromPointer:ee,destructorFunction:null})},gb:(r,e,t)=>{fe(r,{name:e=ce(e),fromWireType:r=>r,toWireType:(r,e)=>e,argPackAdvance:he,readValueFromPointer:ft(e,t),destructorFunction:null})},_:(r,e,t,n,o,a,i)=>{var s=nt(e,t);r=ce(r),o=Ze(n,o),Ne(r,(function(){tt(`Cannot call ${r} due to unbound types`,s)}),e-1),se([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return Ke(r,at(r,n,null,o,a,i),e-1),[]}))},ea:(r,e,t,n,o)=>{e=ce(e),-1===o&&(o=4294967295);var a=r=>r;if(0===n){var i=32-8*t;a=r=>r<<i>>>i}var s=e.includes("unsigned");fe(r,{name:e,fromWireType:a,toWireType:s?function(r,e){return this.name,e>>>0}:function(r,e){return this.name,e},argPackAdvance:he,readValueFromPointer:ht(e,t,0!==n),destructorFunction:null})},O:(r,e,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function a(r){var e=s()[r>>2],n=s()[r+4>>2];return new o(t().buffer,n,e)}fe(r,{name:n=ce(n),fromWireType:a,argPackAdvance:he,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},fb:(r,e)=>{var t="std::string"===(e=ce(e));fe(r,{name:e,fromWireType:r=>{var e,o=s()[r>>2],a=r+4;if(t)for(var i=a,u=0;u<=o;++u){var c=a+u;if(u==o||0==n()[c]){var l=Pr(i,c-i);void 0===e?e=l:(e+=String.fromCharCode(0),e+=l),i=c+1}}else{var d=new Array(o);for(u=0;u<o;++u)d[u]=String.fromCharCode(n()[a+u]);e=d.join("")}return bn(r),e},toWireType:(r,e)=>{var o;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var a="string"==typeof e;a||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||de("Cannot pass non-string to std::string"),o=t&&a?yr(e):e.length;var i=_n(4+o+1),u=i+4;if(s()[i>>2]=o,t&&a)pt(e,u,o+1);else if(a)for(var c=0;c<o;++c){var l=e.charCodeAt(c);l>255&&(bn(u),de("String has UTF-16 code units that do not fit in 8 bits")),n()[u+c]=l}else for(c=0;c<o;++c)n()[u+c]=e[c];return null!==r&&r.push(bn,i),i},argPackAdvance:he,readValueFromPointer:Ve,destructorFunction:r=>bn(r)})},Pa:(r,e,t)=>{var n,o,i,u,c;t=ce(t),2===e?(n=vt,o=yt,u=wt,i=()=>a(),c=1):4===e&&(n=gt,o=_t,u=bt,i=()=>s(),c=2),fe(r,{name:t,fromWireType:r=>{for(var t,o=s()[r>>2],a=i(),u=r+4,l=0;l<=o;++l){var d=r+4+l*e;if(l==o||0==a[d>>c]){var f=n(u,d-u);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),u=d+e}}return bn(r),t},toWireType:(r,n)=>{"string"!=typeof n&&de(`Cannot pass non-string to C++ string type ${t}`);var a=u(n),i=_n(4+a+e);return s()[i>>2]=a>>c,o(n,i+4,a+e),null!==r&&r.push(bn,i),i},argPackAdvance:he,readValueFromPointer:ee,destructorFunction:r=>bn(r)})},Ab:(r,e,t,n,o,a)=>{Zr[r]={name:ce(e),rawConstructor:Ze(t,n),rawDestructor:Ze(o,a),fields:[]}},yb:(r,e,t,n,o,a,i,s,u,c)=>{Zr[r].fields.push({fieldName:ce(e),getterReturnType:t,getter:Ze(n,o),getterContext:a,setterArgumentType:i,setter:Ze(s,u),setterContext:c})},tc:(r,e)=>{fe(r,{isVoid:!0,name:e=ce(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,e)=>{}})},qc:()=>true,_b:(r,e,t)=>{if(r==e)setTimeout((()=>Tt()));else if(w)postMessage({targetThread:r,cmd:"checkMailbox"});else{var n=Ar.pthreads[r];if(!n)return;n.postMessage({cmd:"checkMailbox"})}},ec:(r,e,t,n)=>{$t.length=t;for(var o=n>>3,a=0;a<t;a++)$t[a]=u()[o+a];var i=r<0?ir[-r-1]:yn[r];Ar.currentProxiedOperationCallerThread=e;var s=i.apply(null,$t);return Ar.currentProxiedOperationCallerThread=0,s},fc:kt,pc:r=>{},Xb:()=>{throw 1/0},pa:(r,e,t)=>{r=lt.toValue(r),e=St(e,"emval::as");var n=[],o=lt.toHandle(n);return s()[t>>2]=o,e.toWireType(n,r)},Ma:(r,e,t,n,o)=>(r=At[r])(e=lt.toValue(e),t=Dt(t),(r=>{var e=[];return s()[r>>2]=lt.toHandle(e),e})(n),o),La:(r,e,t,n)=>{(r=At[r])(e=lt.toValue(e),t=Dt(t),null,n)},uc:ut,ub:r=>0===r?lt.toHandle(Ft()):(r=Dt(r),lt.toHandle(Ft()[r])),oa:(r,e)=>{var t=((r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=St(s()[e+4*n>>2],"parameter "+n);return t})(r,e),n=t[0],o=n.name+"_$"+t.slice(1).map((function(r){return r.name})).join("_")+"$",a=Wt[o];if(void 0!==a)return a;for(var i=["retType"],u=[n],c="",l=0;l<r-1;++l)c+=(0!==l?", ":"")+"arg"+l,i.push("argType"+l),u.push(t[1+l]);var d="return function "+Re("methodCaller_"+o)+"(handle, name, destructors, args) {\n",f=0;for(l=0;l<r-1;++l)d+=" var arg"+l+" = argType"+l+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=t[l+1].argPackAdvance;d+=" var rv = handle[name]("+c+");\n";for(l=0;l<r-1;++l)t[l+1].deleteObject&&(d+=" argType"+l+".deleteObject(arg"+l+");\n");n.isVoid||(d+=" return retType.toWireType(destructors, rv);\n"),d+="};\n",i.push(d);var h,p,m=ot(Function,i).apply(null,u);return h=m,p=At.length,At.push(h),a=p,Wt[o]=a,a},Pb:(r,e)=>(r=lt.toValue(r),e=lt.toValue(e),lt.toHandle(r[e])),t:r=>{r>4&&(st.get(r).refcount+=1)},Q:()=>lt.toHandle([]),fa:r=>lt.toHandle(Dt(r)),D:()=>lt.toHandle({}),Bb:r=>{var e=lt.toValue(r);re(e),ut(r)},Cc:(r,e,t)=>{r=lt.toValue(r),e=lt.toValue(e),t=lt.toValue(t),r[e]=t},$:(r,e)=>{var t=(r=St(r,"_emval_take_value")).readValueFromPointer(e);return lt.toHandle(t)},Ib:function(r,e,t){var n=jt(r,e),o=new Date(1e3*n);i()[t>>2]=o.getUTCSeconds(),i()[t+4>>2]=o.getUTCMinutes(),i()[t+8>>2]=o.getUTCHours(),i()[t+12>>2]=o.getUTCDate(),i()[t+16>>2]=o.getUTCMonth(),i()[t+20>>2]=o.getUTCFullYear()-1900,i()[t+24>>2]=o.getUTCDay();var a=Date.UTC(o.getUTCFullYear(),0,1,0,0,0,0),s=(o.getTime()-a)/864e5|0;i()[t+28>>2]=s},Jb:function(r,e,t){var n=jt(r,e),o=new Date(1e3*n);i()[t>>2]=o.getSeconds(),i()[t+4>>2]=o.getMinutes(),i()[t+8>>2]=o.getHours(),i()[t+12>>2]=o.getDate(),i()[t+16>>2]=o.getMonth(),i()[t+20>>2]=o.getFullYear()-1900,i()[t+24>>2]=o.getDay();var a=0|Ut(o);i()[t+28>>2]=a,i()[t+36>>2]=-60*o.getTimezoneOffset();var s=new Date(o.getFullYear(),0,1),u=new Date(o.getFullYear(),6,1).getTimezoneOffset(),c=s.getTimezoneOffset(),l=0|(u!=c&&o.getTimezoneOffset()==Math.min(c,u));i()[t+32>>2]=l},Kb:function(r){var e=(()=>{var e=new Date(i()[r+20>>2]+1900,i()[r+16>>2],i()[r+12>>2],i()[r+8>>2],i()[r+4>>2],i()[r>>2],0),t=i()[r+32>>2],n=e.getTimezoneOffset(),o=new Date(e.getFullYear(),0,1),a=new Date(e.getFullYear(),6,1).getTimezoneOffset(),s=o.getTimezoneOffset(),u=Math.min(s,a);if(t<0)i()[r+32>>2]=Number(a!=s&&u==n);else if(t>0!=(u==n)){var c=Math.max(s,a),l=t>0?u:c;e.setTime(e.getTime()+6e4*(l-n))}i()[r+24>>2]=e.getDay();var d=0|Ut(e);return i()[r+28>>2]=d,i()[r>>2]=e.getSeconds(),i()[r+4>>2]=e.getMinutes(),i()[r+8>>2]=e.getHours(),i()[r+12>>2]=e.getDate(),i()[r+16>>2]=e.getMonth(),i()[r+20>>2]=e.getYear(),e.getTime()/1e3})();return Tn((er=e,+Math.abs(er)>=1?er>0?+Math.floor(er/4294967296)>>>0:~~+Math.ceil((er-+(~~er>>>0))/4294967296)>>>0:0)),e>>>0},Gb:It,Hb:Nt,Zb:(r,e,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),u=o.getTimezoneOffset(),c=a.getTimezoneOffset(),l=Math.max(u,c);function d(r){var e=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return e?e[1]:"GMT"}s()[r>>2]=60*l,i()[e>>2]=Number(u!=c);var f=d(o),h=d(a),p=Ht(f),m=Ht(h);c<u?(s()[t>>2]=p,s()[t+4>>2]=m):(s()[t>>2]=m,s()[t+4>>2]=p)},E:()=>{Z("")},vb:(r,e,t)=>Bt(r,e,t),bb:()=>{},wa:()=>Date.now(),oc:()=>{throw B+=1,"unwind"},$b:()=>2147483648,Z:zt,ib:()=>navigator.hardwareConcurrency,Yb:r=>{var e=n().length;if((r>>>=0)<=e)return!1;var t=2147483648;r>t&&Yt();for(var o,a,i=1;i<=4;i*=2){var s=e*(1+.2/i);s=Math.min(s,r+100663296);var u=Math.min(t,(o=Math.max(r,s))+((a=65536)-o%a)%a);if(Vt(u))return!0}Yt()},ic:Jt,jc:Xt,hb:Mr,Oa:Kt,hc:Qt,cb:Zt,Lb:rn,Na:en,xb:function(){return cn(location.toString())},Tb:(r,e)=>(fr(n().subarray(r,r+e)),0),wb:function(){return cn((r=Kn,self[r(283,"hj(8")][r(276,"4T(s")]()));var r},ba:function(r,e){var t=jn();try{return jr(r)(e)}catch(r){if(On(t),r!==r+0)throw r;Fn(1,0)}},Ec:function(r,e,t){var n=jn();try{return jr(r)(e,t)}catch(r){if(On(n),r!==r+0)throw r;Fn(1,0)}},Ta:function(r,e,t){var n=jn();try{return jr(r)(e,t)}catch(r){if(On(n),r!==r+0)throw r;Fn(1,0)}},R:function(r,e,t,n,o,a){var i=jn();try{return jr(r)(e,t,n,o,a)}catch(r){if(On(i),r!==r+0)throw r;Fn(1,0)}},F:function(r,e,t,n){var o=jn();try{return jr(r)(e,t,n)}catch(r){if(On(o),r!==r+0)throw r;Fn(1,0)}},Sa:function(r,e,t,n,o,a){var i=jn();try{return jr(r)(e,t,n,o,a)}catch(r){if(On(i),r!==r+0)throw r;Fn(1,0)}},Dc:function(r,e){var t=jn();try{return jr(r)(e)}catch(r){if(On(t),r!==r+0)throw r;Fn(1,0)}},s:function(r,e){var t=jn();try{return jr(r)(e)}catch(r){if(On(t),r!==r+0)throw r;Fn(1,0)}},A:function(r,e,t){var n=jn();try{return jr(r)(e,t)}catch(r){if(On(n),r!==r+0)throw r;Fn(1,0)}},ra:function(r,e,t,n,o){var a=jn();try{return jr(r)(e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},Y:function(r,e,t,n){var o=jn();try{return jr(r)(e,t,n)}catch(r){if(On(o),r!==r+0)throw r;Fn(1,0)}},ua:function(r,e,t,n,o){var a=jn();try{return jr(r)(e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},Fc:function(r,e,t,n,o,a){var i=jn();try{return jr(r)(e,t,n,o,a)}catch(r){if(On(i),r!==r+0)throw r;Fn(1,0)}},w:function(r){var e=jn();try{return jr(r)()}catch(r){if(On(e),r!==r+0)throw r;Fn(1,0)}},j:function(r,e){var t=jn();try{return jr(r)(e)}catch(r){if(On(t),r!==r+0)throw r;Fn(1,0)}},Oc:function(r,e,t){var n=jn();try{return jr(r)(e,t)}catch(r){if(On(n),r!==r+0)throw r;Fn(1,0)}},jb:function(r,e,t,n){var o=jn();try{return jr(r)(e,t,n)}catch(r){if(On(o),r!==r+0)throw r;Fn(1,0)}},Ha:function(r,e,t){var n=jn();try{return jr(r)(e,t)}catch(r){if(On(n),r!==r+0)throw r;Fn(1,0)}},Hc:function(r,e,t,n){var o=jn();try{return jr(r)(e,t,n)}catch(r){if(On(o),r!==r+0)throw r;Fn(1,0)}},Jc:function(r,e,t,n,o){var a=jn();try{return jr(r)(e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},Ic:function(r,e,t,n,o,a,i,s){var u=jn();try{return jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},Nc:function(r,e,t,n,o,a,i,s,u){var c=jn();try{return jr(r)(e,t,n,o,a,i,s,u)}catch(r){if(On(c),r!==r+0)throw r;Fn(1,0)}},c:function(r,e,t){var n=jn();try{return jr(r)(e,t)}catch(r){if(On(n),r!==r+0)throw r;Fn(1,0)}},Va:function(r,e,t,n){var o=jn();try{return jr(r)(e,t,n)}catch(r){if(On(o),r!==r+0)throw r;Fn(1,0)}},Gc:function(r,e,t,n,o){var a=jn();try{return jr(r)(e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},h:function(r,e,t,n){var o=jn();try{return jr(r)(e,t,n)}catch(r){if(On(o),r!==r+0)throw r;Fn(1,0)}},ia:function(r,e,t,n,o){var a=jn();try{return jr(r)(e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},Ka:function(r,e,t,n,o){var a=jn();try{return jr(r)(e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},l:function(r,e,t,n,o){var a=jn();try{return jr(r)(e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},$a:function(r,e,t,n,o,a){var i=jn();try{return jr(r)(e,t,n,o,a)}catch(r){if(On(i),r!==r+0)throw r;Fn(1,0)}},lb:function(r,e,t,n,o,a,i){var s=jn();try{return jr(r)(e,t,n,o,a,i)}catch(r){if(On(s),r!==r+0)throw r;Fn(1,0)}},o:function(r,e,t,n,o,a){var i=jn();try{return jr(r)(e,t,n,o,a)}catch(r){if(On(i),r!==r+0)throw r;Fn(1,0)}},B:function(r,e,t,n,o,a,i){var s=jn();try{return jr(r)(e,t,n,o,a,i)}catch(r){if(On(s),r!==r+0)throw r;Fn(1,0)}},aa:function(r,e,t,n,o,a,i,s){var u=jn();try{return jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},K:function(r,e,t,n,o,a,i,s,u){var c=jn();try{return jr(r)(e,t,n,o,a,i,s,u)}catch(r){if(On(c),r!==r+0)throw r;Fn(1,0)}},ja:function(r,e,t,n,o,a,i,s,u,c){var l=jn();try{return jr(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(On(l),r!==r+0)throw r;Fn(1,0)}},ma:function(r,e,t,n,o,a,i,s,u,c,l){var d=jn();try{return jr(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(On(d),r!==r+0)throw r;Fn(1,0)}},Da:function(r,e,t,n,o,a,i,s,u,c,l,d){var f=jn();try{return jr(r)(e,t,n,o,a,i,s,u,c,l,d)}catch(r){if(On(f),r!==r+0)throw r;Fn(1,0)}},Db:function(r,e,t,n,o,a,i){var s=jn();try{return Gn(r,e,t,n,o,a,i)}catch(r){if(On(s),r!==r+0)throw r;Fn(1,0)}},Rb:function(r,e,t,n){var o=jn();try{return Ln(r,e,t,n)}catch(r){if(On(o),r!==r+0)throw r;Fn(1,0)}},Fb:function(r){var e=jn();try{return Vn(r)}catch(r){if(On(e),r!==r+0)throw r;Fn(1,0)}},Sb:function(r,e){var t=jn();try{return zn(r,e)}catch(r){if(On(t),r!==r+0)throw r;Fn(1,0)}},Eb:function(r,e,t){var n=jn();try{return qn(r,e,t)}catch(r){if(On(n),r!==r+0)throw r;Fn(1,0)}},Qb:function(r,e,t,n){var o=jn();try{return Bn(r,e,t,n)}catch(r){if(On(o),r!==r+0)throw r;Fn(1,0)}},Cb:function(r,e,t,n,o){var a=jn();try{return Jn(r,e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},m:function(r){var e=jn();try{jr(r)()}catch(r){if(On(e),r!==r+0)throw r;Fn(1,0)}},d:function(r,e){var t=jn();try{jr(r)(e)}catch(r){if(On(t),r!==r+0)throw r;Fn(1,0)}},Ea:function(r,e,t){var n=jn();try{jr(r)(e,t)}catch(r){if(On(n),r!==r+0)throw r;Fn(1,0)}},Fa:function(r,e,t,n){var o=jn();try{jr(r)(e,t,n)}catch(r){if(On(o),r!==r+0)throw r;Fn(1,0)}},qa:function(r,e,t,n,o,a,i,s){var u=jn();try{jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},va:function(r,e,t){var n=jn();try{jr(r)(e,t)}catch(r){if(On(n),r!==r+0)throw r;Fn(1,0)}},Za:function(r,e,t,n,o,a,i){var s=jn();try{jr(r)(e,t,n,o,a,i)}catch(r){if(On(s),r!==r+0)throw r;Fn(1,0)}},f:function(r,e,t){var n=jn();try{jr(r)(e,t)}catch(r){if(On(n),r!==r+0)throw r;Fn(1,0)}},G:function(r,e,t,n){var o=jn();try{jr(r)(e,t,n)}catch(r){if(On(o),r!==r+0)throw r;Fn(1,0)}},Ba:function(r,e,t,n,o){var a=jn();try{jr(r)(e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},Qa:function(r,e,t,n,o,a){var i=jn();try{jr(r)(e,t,n,o,a)}catch(r){if(On(i),r!==r+0)throw r;Fn(1,0)}},Kc:function(r,e,t,n,o,a,i,s){var u=jn();try{jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},ya:function(r,e,t,n,o,a,i){var s=jn();try{jr(r)(e,t,n,o,a,i)}catch(r){if(On(s),r!==r+0)throw r;Fn(1,0)}},U:function(r,e,t,n,o,a,i,s){var u=jn();try{jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},Ga:function(r,e,t,n,o){var a=jn();try{jr(r)(e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},xc:function(r,e,t,n,o,a,i,s){var u=jn();try{jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},M:function(r,e,t,n){var o=jn();try{jr(r)(e,t,n)}catch(r){if(On(o),r!==r+0)throw r;Fn(1,0)}},na:function(r,e,t,n,o){var a=jn();try{jr(r)(e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},Mc:function(r,e,t,n,o,a,i,s,u){var c=jn();try{jr(r)(e,t,n,o,a,i,s,u)}catch(r){if(On(c),r!==r+0)throw r;Fn(1,0)}},Aa:function(r,e,t,n,o){var a=jn();try{jr(r)(e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},ga:function(r,e,t,n,o,a){var i=jn();try{jr(r)(e,t,n,o,a)}catch(r){if(On(i),r!==r+0)throw r;Fn(1,0)}},Wa:function(r,e,t,n,o,a,i,s){var u=jn();try{jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},Ya:function(r,e,t,n,o,a,i,s,u){var c=jn();try{jr(r)(e,t,n,o,a,i,s,u)}catch(r){if(On(c),r!==r+0)throw r;Fn(1,0)}},g:function(r,e,t,n){var o=jn();try{jr(r)(e,t,n)}catch(r){if(On(o),r!==r+0)throw r;Fn(1,0)}},mb:function(r,e,t,n,o){var a=jn();try{jr(r)(e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},y:function(r,e,t,n,o,a){var i=jn();try{jr(r)(e,t,n,o,a)}catch(r){if(On(i),r!==r+0)throw r;Fn(1,0)}},rb:function(r,e,t,n,o,a,i){var s=jn();try{jr(r)(e,t,n,o,a,i)}catch(r){if(On(s),r!==r+0)throw r;Fn(1,0)}},Lc:function(r,e,t,n,o,a,i,s,u,c,l){var d=jn();try{jr(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(On(d),r!==r+0)throw r;Fn(1,0)}},z:function(r,e,t,n,o,a,i){var s=jn();try{jr(r)(e,t,n,o,a,i)}catch(r){if(On(s),r!==r+0)throw r;Fn(1,0)}},la:function(r,e,t,n,o,a){var i=jn();try{jr(r)(e,t,n,o,a)}catch(r){if(On(i),r!==r+0)throw r;Fn(1,0)}},H:function(r,e,t,n,o){var a=jn();try{jr(r)(e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},sa:function(r,e,t,n,o,a,i){var s=jn();try{jr(r)(e,t,n,o,a,i)}catch(r){if(On(s),r!==r+0)throw r;Fn(1,0)}},xa:function(r,e,t,n,o,a,i,s,u,c){var l=jn();try{jr(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(On(l),r!==r+0)throw r;Fn(1,0)}},nb:function(r,e,t,n,o,a,i,s){var u=jn();try{jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},X:function(r,e,t,n,o,a){var i=jn();try{jr(r)(e,t,n,o,a)}catch(r){if(On(i),r!==r+0)throw r;Fn(1,0)}},ob:function(r,e,t,n,o,a,i){var s=jn();try{jr(r)(e,t,n,o,a,i)}catch(r){if(On(s),r!==r+0)throw r;Fn(1,0)}},Xa:function(r,e,t,n,o,a,i,s,u){var c=jn();try{jr(r)(e,t,n,o,a,i,s,u)}catch(r){if(On(c),r!==r+0)throw r;Fn(1,0)}},sb:function(r,e,t,n,o,a,i,s,u,c,l){var d=jn();try{jr(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(On(d),r!==r+0)throw r;Fn(1,0)}},k:function(r,e,t,n,o){var a=jn();try{jr(r)(e,t,n,o)}catch(r){if(On(a),r!==r+0)throw r;Fn(1,0)}},Ra:function(r,e,t,n,o,a,i,s){var u=jn();try{jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},vc:function(r,e,t,n,o,a,i,s){var u=jn();try{jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},Ja:function(r,e,t,n,o,a,i,s,u){var c=jn();try{jr(r)(e,t,n,o,a,i,s,u)}catch(r){if(On(c),r!==r+0)throw r;Fn(1,0)}},J:function(r,e,t,n,o,a){var i=jn();try{jr(r)(e,t,n,o,a)}catch(r){if(On(i),r!==r+0)throw r;Fn(1,0)}},ha:function(r,e,t,n,o,a,i,s,u,c){var l=jn();try{jr(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(On(l),r!==r+0)throw r;Fn(1,0)}},pb:function(r,e,t,n,o,a,i,s){var u=jn();try{jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},n:function(r,e,t,n,o,a){var i=jn();try{jr(r)(e,t,n,o,a)}catch(r){if(On(i),r!==r+0)throw r;Fn(1,0)}},Pc:function(r,e,t,n,o,a,i){var s=jn();try{jr(r)(e,t,n,o,a,i)}catch(r){if(On(s),r!==r+0)throw r;Fn(1,0)}},C:function(r,e,t,n,o,a,i,s){var u=jn();try{jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},qb:function(r,e,t,n,o,a,i){var s=jn();try{jr(r)(e,t,n,o,a,i)}catch(r){if(On(s),r!==r+0)throw r;Fn(1,0)}},V:function(r,e,t,n,o,a,i,s){var u=jn();try{jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},q:function(r,e,t,n,o,a,i){var s=jn();try{jr(r)(e,t,n,o,a,i)}catch(r){if(On(s),r!==r+0)throw r;Fn(1,0)}},kb:function(r,e,t,n,o,a,i,s,u,c){var l=jn();try{jr(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(On(l),r!==r+0)throw r;Fn(1,0)}},Ia:function(r,e,t,n,o,a,i,s){var u=jn();try{jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},Bc:function(r,e,t,n,o,a,i,s,u,c,l){var d=jn();try{jr(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(On(d),r!==r+0)throw r;Fn(1,0)}},za:function(r,e,t,n,o,a,i,s,u){var c=jn();try{jr(r)(e,t,n,o,a,i,s,u)}catch(r){if(On(c),r!==r+0)throw r;Fn(1,0)}},u:function(r,e,t,n,o,a,i,s){var u=jn();try{jr(r)(e,t,n,o,a,i,s)}catch(r){if(On(u),r!==r+0)throw r;Fn(1,0)}},Ac:function(r,e,t,n,o,a,i,s,u,c,l,d){var f=jn();try{jr(r)(e,t,n,o,a,i,s,u,c,l,d)}catch(r){if(On(f),r!==r+0)throw r;Fn(1,0)}},zc:function(r,e,t,n,o,a,i,s,u,c,l){var d=jn();try{jr(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(On(d),r!==r+0)throw r;Fn(1,0)}},L:function(r,e,t,n,o,a,i,s,u){var c=jn();try{jr(r)(e,t,n,o,a,i,s,u)}catch(r){if(On(c),r!==r+0)throw r;Fn(1,0)}},Ua:function(r,e,t,n,o,a,i,s,u,c,l,d){var f=jn();try{jr(r)(e,t,n,o,a,i,s,u,c,l,d)}catch(r){if(On(f),r!==r+0)throw r;Fn(1,0)}},S:function(r,e,t,n,o,a,i,s,u,c){var l=jn();try{jr(r)(e,t,n,o,a,i,s,u,c)}catch(r){if(On(l),r!==r+0)throw r;Fn(1,0)}},ta:function(r,e,t,n,o,a,i,s,u,c,l,d,f,h){var p=jn();try{jr(r)(e,t,n,o,a,i,s,u,c,l,d,f,h)}catch(r){if(On(p),r!==r+0)throw r;Fn(1,0)}},P:function(r,e,t,n,o,a,i,s,u,c,l){var d=jn();try{jr(r)(e,t,n,o,a,i,s,u,c,l)}catch(r){if(On(d),r!==r+0)throw r;Fn(1,0)}},tb:function(r,e,t,n,o,a,i,s,u,c,l,d){var f=jn();try{jr(r)(e,t,n,o,a,i,s,u,c,l,d)}catch(r){if(On(f),r!==r+0)throw r;Fn(1,0)}},ka:function(r,e,t,n,o,a,i,s,u,c,l,d,f,h){var p=jn();try{jr(r)(e,t,n,o,a,i,s,u,c,l,d,f,h)}catch(r){if(On(p),r!==r+0)throw r;Fn(1,0)}},Ca:function(r,e,t,n,o,a,i,s,u,c,l,d,f,h,p,m){var v=jn();try{jr(r)(e,t,n,o,a,i,s,u,c,l,d,f,h,p,m)}catch(r){if(On(v),r!==r+0)throw r;Fn(1,0)}},Nb:function(r,e,t,n,o,a,i){var s=jn();try{Hn(r,e,t,n,o,a,i)}catch(r){if(On(s),r!==r+0)throw r;Fn(1,0)}},Ob:function(r,e,t,n){var o=jn();try{Yn(r,e,t,n)}catch(r){if(On(o),r!==r+0)throw r;Fn(1,0)}},N:r=>r,a:T||d.wasmMemory,yc:sn,T:(r,e,t,n,o)=>sn(r,e,t,n),wc:(r,e,t)=>{for(var n=Pr(e),o="\\!@#$^&*()+=-[]/{}|:<>?,.",a=0,s=o.length;a<s;++a)n=n.replace(new RegExp("\\"+o[a],"g"),"\\"+o[a]);var u={"%A":"%a","%B":"%b","%c":"%a %b %d %H:%M:%S %Y","%D":"%m\\/%d\\/%y","%e":"%d","%F":"%Y-%m-%d","%h":"%b","%R":"%H\\:%M","%r":"%I\\:%M\\:%S\\s%p","%T":"%H\\:%M\\:%S","%x":"%m\\/%d\\/(?:%y|%Y)","%X":"%H\\:%M\\:%S"};for(var c in u)n=n.replace(c,u[c]);var l={"%a":"(?:Sun(?:day)?)|(?:Mon(?:day)?)|(?:Tue(?:sday)?)|(?:Wed(?:nesday)?)|(?:Thu(?:rsday)?)|(?:Fri(?:day)?)|(?:Sat(?:urday)?)","%b":"(?:Jan(?:uary)?)|(?:Feb(?:ruary)?)|(?:Mar(?:ch)?)|(?:Apr(?:il)?)|May|(?:Jun(?:e)?)|(?:Jul(?:y)?)|(?:Aug(?:ust)?)|(?:Sep(?:tember)?)|(?:Oct(?:ober)?)|(?:Nov(?:ember)?)|(?:Dec(?:ember)?)","%C":"\\d\\d","%d":"0[1-9]|[1-9](?!\\d)|1\\d|2\\d|30|31","%H":"\\d(?!\\d)|[0,1]\\d|20|21|22|23","%I":"\\d(?!\\d)|0\\d|10|11|12","%j":"00[1-9]|0?[1-9](?!\\d)|0?[1-9]\\d(?!\\d)|[1,2]\\d\\d|3[0-6]\\d","%m":"0[1-9]|[1-9](?!\\d)|10|11|12","%M":"0\\d|\\d(?!\\d)|[1-5]\\d","%n":"\\s","%p":"AM|am|PM|pm|A\\.M\\.|a\\.m\\.|P\\.M\\.|p\\.m\\.","%S":"0\\d|\\d(?!\\d)|[1-5]\\d|60","%U":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%W":"0\\d|\\d(?!\\d)|[1-4]\\d|50|51|52|53","%w":"[0-6]","%y":"\\d\\d","%Y":"\\d\\d\\d\\d","%%":"%","%t":"\\s"};for(var d in l)n=n.replace(d,"("+d+l[d]+")");var f=[];for(a=n.indexOf("%");a>=0;a=n.indexOf("%"))f.push(n[a+1]),n=n.replace(new RegExp("\\%"+n[a+1],"g"),"");var h=new RegExp("^"+n,"i").exec(Pr(r));if(h){var p,m=function(){function r(r,e,t){return"number"!=typeof r||isNaN(r)?e:r>=e?r<=t?r:t:e}return{year:r(i()[t+20>>2]+1900,1970,9999),month:r(i()[t+16>>2],0,11),day:r(i()[t+12>>2],1,31),hour:r(i()[t+8>>2],0,23),min:r(i()[t+4>>2],0,59),sec:r(i()[t>>2],0,59)}}(),v=r=>{var e=f.indexOf(r);if(e>=0)return h[e+1]};if((p=v("S"))&&(m.sec=un(p)),(p=v("M"))&&(m.min=un(p)),p=v("H"))m.hour=un(p);else if(p=v("I")){var y=un(p);(p=v("p"))&&(y+="P"===p.toUpperCase()[0]?12:0),m.hour=y}if(p=v("Y"))m.year=un(p);else if(p=v("y")){var w=un(p);(p=v("C"))?w+=100*un(p):w+=w<69?2e3:1900,m.year=w}if((p=v("m"))?m.month=un(p)-1:(p=v("b"))&&(m.month={JAN:0,FEB:1,MAR:2,APR:3,MAY:4,JUN:5,JUL:6,AUG:7,SEP:8,OCT:9,NOV:10,DEC:11}[p.substring(0,3).toUpperCase()]||0),p=v("d"))m.day=un(p);else if(p=v("j"))for(var g=un(p),_=Ot(m.year),b=0;b<12;++b){var E=tn(_?nn:on,b-1);g<=E+(_?nn:on)[b]&&(m.day=g-E)}else if(p=v("a")){var k=p.substring(0,3).toUpperCase();if(p=v("U")){var T={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6}[k],C=un(p);$=0===(P=new Date(m.year,0,1)).getDay()?an(P,T+7*(C-1)):an(P,7-P.getDay()+T+7*(C-1)),m.day=$.getDate(),m.month=$.getMonth()}else if(p=v("W")){var P,$;T={MON:0,TUE:1,WED:2,THU:3,FRI:4,SAT:5,SUN:6}[k],C=un(p);$=1===(P=new Date(m.year,0,1)).getDay()?an(P,T+7*(C-1)):an(P,7-P.getDay()+1+T+7*(C-1)),m.day=$.getDate(),m.month=$.getMonth()}}var S=new Date(m.year,m.month,m.day,m.hour,m.min,m.sec,0);return i()[t>>2]=S.getSeconds(),i()[t+4>>2]=S.getMinutes(),i()[t+8>>2]=S.getHours(),i()[t+12>>2]=S.getDate(),i()[t+16>>2]=S.getMonth(),i()[t+20>>2]=S.getFullYear()-1900,i()[t+24>>2]=S.getDay(),i()[t+28>>2]=tn(Ot(S.getFullYear())?nn:on,S.getMonth()-1)+S.getDate()-1,i()[t+32>>2]=0,r+gr(h[0]).length-1}return 0}},gn=function(){var r,e,t,n,o={a:wn};function a(r,e){var t,n=r.exports;return Or((gn=n).Xc),I=gn.Sc,t=gn.Qc,H.unshift(t),C=e,Q(),n}if(K(),d.instantiateWasm)try{return d.instantiateWasm(o,a)}catch(r){k(`Module.instantiateWasm callback failed with error: ${r}`),l(r)}return(r=b,e=rr,t=o,n=function(r){a(r.instance,r.module)},r||"function"!=typeof WebAssembly.instantiateStreaming||nr(e)||"function"!=typeof fetch?ar(e,t,n):fetch(e,{credentials:"same-origin"}).then((r=>WebAssembly.instantiateStreaming(r,t).then(n,(function(r){return k(`wasm streaming compile failed: ${r}`),k("falling back to ArrayBuffer instantiation"),ar(e,t,n)}))))).catch(l),{}}(),_n=d._malloc=r=>(_n=d._malloc=gn.Rc)(r),bn=d._free=r=>(bn=d._free=gn.Tc)(r),En=()=>(En=gn.Uc)(),kn=d._pthread_self=()=>(kn=d._pthread_self=gn.Vc)(),Tn=r=>(Tn=gn.Wc)(r),Cn=(d.__emscripten_tls_init=()=>(d.__emscripten_tls_init=gn.Xc)(),(r,e)=>(Cn=gn.Yc)(r,e)),Pn=r=>(Pn=gn.Zc)(r),$n=(d.__embind_initialize_bindings=()=>(d.__embind_initialize_bindings=gn._c)(),d.__emscripten_thread_init=(r,e,t,n,o,a)=>($n=d.__emscripten_thread_init=gn.$c)(r,e,t,n,o,a)),Sn=(d.__emscripten_thread_crashed=()=>(d.__emscripten_thread_crashed=gn.ad)(),(r,e,t,n)=>(Sn=gn.bd)(r,e,t,n)),Mn=r=>(Mn=gn.cd)(r),Dn=d.__emscripten_thread_exit=r=>(Dn=d.__emscripten_thread_exit=gn.dd)(r),An=d.__emscripten_check_mailbox=()=>(An=d.__emscripten_check_mailbox=gn.ed)(),Fn=(r,e)=>(Fn=gn.fd)(r,e),Wn=(r,e)=>(Wn=gn.gd)(r,e),jn=()=>(jn=gn.hd)(),On=r=>(On=gn.id)(r),xn=r=>(xn=gn.jd)(r),Rn=r=>(Rn=gn.kd)(r),Un=r=>(Un=gn.ld)(r),In=(r,e,t)=>(In=gn.md)(r,e,t),Nn=r=>(Nn=gn.nd)(r),zn=d.dynCall_ji=(r,e)=>(zn=d.dynCall_ji=gn.od)(r,e),Hn=d.dynCall_viijii=(r,e,t,n,o,a,i)=>(Hn=d.dynCall_viijii=gn.pd)(r,e,t,n,o,a,i),Ln=d.dynCall_iij=(r,e,t,n)=>(Ln=d.dynCall_iij=gn.qd)(r,e,t,n),Bn=d.dynCall_jiii=(r,e,t,n)=>(Bn=d.dynCall_jiii=gn.rd)(r,e,t,n),Yn=d.dynCall_vij=(r,e,t,n)=>(Yn=d.dynCall_vij=gn.sd)(r,e,t,n),Vn=(d.dynCall_jiji=(r,e,t,n,o)=>(d.dynCall_jiji=gn.td)(r,e,t,n,o),d.dynCall_viij=(r,e,t,n,o)=>(d.dynCall_viij=gn.ud)(r,e,t,n,o),d.dynCall_jjj=(r,e,t,n,o)=>(d.dynCall_jjj=gn.vd)(r,e,t,n,o),d.dynCall_iiiijj=(r,e,t,n,o,a,i,s)=>(d.dynCall_iiiijj=gn.wd)(r,e,t,n,o,a,i,s),d.dynCall_viijj=(r,e,t,n,o,a,i)=>(d.dynCall_viijj=gn.xd)(r,e,t,n,o,a,i),d.dynCall_viiijjj=(r,e,t,n,o,a,i,s,u,c)=>(d.dynCall_viiijjj=gn.yd)(r,e,t,n,o,a,i,s,u,c),d.dynCall_j=r=>(Vn=d.dynCall_j=gn.zd)(r)),qn=d.dynCall_jii=(r,e,t)=>(qn=d.dynCall_jii=gn.Ad)(r,e,t),Gn=d.dynCall_iiiiij=(r,e,t,n,o,a,i)=>(Gn=d.dynCall_iiiiij=gn.Bd)(r,e,t,n,o,a,i),Jn=d.dynCall_jiiii=(r,e,t,n,o)=>(Jn=d.dynCall_jiiii=gn.Cd)(r,e,t,n,o);d.dynCall_iiiiijj=(r,e,t,n,o,a,i,s,u)=>(d.dynCall_iiiiijj=gn.Dd)(r,e,t,n,o,a,i,s,u),d.dynCall_iiiiiijj=(r,e,t,n,o,a,i,s,u,c)=>(d.dynCall_iiiiiijj=gn.Ed)(r,e,t,n,o,a,i,s,u,c),d.___start_em_js=8809848,d.___stop_em_js=8809956;function Xn(){if(!(G>0)){if(w)return c(d),V(),void startWorker(d);!function(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)q(d.preRun.shift());Fr(z)}(),G>0||(d.setStatus?(d.setStatus("Running..."),setTimeout((function(){setTimeout((function(){d.setStatus("")}),1),r()}),1)):r())}function r(){vn||(vn=!0,d.calledRun=!0,x||(V(),c(d),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(!w){if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)r=d.postRun.shift(),L.unshift(r);var r;Fr(L)}}()))}}if(d.keepRuntimeAlive=Y,d.wasmMemory=T,d.UTF8ToString=Pr,d.stringToUTF8=pt,d.lengthBytesUTF8=yr,d.ExitStatus=sr,d.allocateUTF8=cn,d.PThread=Ar,X=function r(){vn||Xn(),vn||(X=r)},d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Kn(r,e){var t=Qn();return Kn=function(e,n){var o=t[e-=273];if(void 0===Kn.CiFOut){var a=function(r){for(var e,t,n="",o="",a=0,i=0;t=r.charAt(i++);~t&&(e=a%4?64*e+t:t,a++%4)?n+=String.fromCharCode(255&e>>(-2*a&6)):0)t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(t);for(var s=0,u=n.length;s<u;s++)o+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(o)},i=function(r,e){var t,n,o=[],i=0,s="";for(r=a(r),n=0;n<256;n++)o[n]=n;for(n=0;n<256;n++)i=(i+o[n]+e.charCodeAt(n%e.length))%256,t=o[n],o[n]=o[i],o[i]=t;n=0,i=0;for(var u=0;u<r.length;u++)i=(i+o[n=(n+1)%256])%256,t=o[n],o[n]=o[i],o[i]=t,s+=String.fromCharCode(r.charCodeAt(u)^o[(o[n]+o[i])%256]);return s};Kn.JUoSSl=i,r=arguments,Kn.CiFOut=!0}var s=t[0],u=e+s,c=r[u];return c?o=c:(void 0===Kn.PYLFbg&&(Kn.PYLFbg=!0),o=Kn.JUoSSl(o,n),r[u]=o),o},Kn(r,e)}function Qn(){var r=["WQ17i8oZW4hdPmkvW49gWPRdGSouka","W6KLWPimWP7dKH/cUKmYW7S","dmk2W45iWPb2W6pcHGG","WPL2WQ7cUmkkWPbcdmo/W6tdUSoDWRa","kexdKZhcN0RcJCouxmo0WPddQG","W7W6WRFdTSoocIW","wwmdW5ZdP2ifESoE","DSoGpSk8W5vMoCkz","nmktWO7cGvfpWPtcMuFdTYe","h8kvWQFcS8kglCkdtSoAfwO","W6vnymkimwfLW50WWPJcJa","bCkXW4OxW60bWR/cRstdR8kAW48v","WOv2WQpdQeldLqZcGJfMWQ1Ooq","W7X+WQ9ssez2","e23dU8kfW40LWOxdUa","WP55WR4lAHux","ttlcR8kfW7O5WPVdR8oW","WQdcJCo/W4Kbp8kdac4BWOdcRKZcOW","nmoAWOnkW6GnWRpcPCkwW59RWPBcHq","WPmUpmkxWQLXW6JcP0BcQXTK","WQPYlmkHWRhcQCoCW7Pb","W7iBWQn+W4i2W6hcLmo7W7lcI8odW7hcUq","WQdcJ8o+W4uboCkhEZiCWP/cJeC","WPjrWP83rYON"];return(Qn=function(){return r})()}Xn(),function(r,e){for(var t=Kn,n=r();;)try{if(786528===-parseInt(t(288,"vSHe"))/1+parseInt(t(277,"PH]U"))/2*(parseInt(t(285,"hj(8"))/3)+parseInt(t(281,"COvH"))/4+parseInt(t(282,"PjyQ"))/5*(parseInt(t(287,"#aMK"))/6)+-parseInt(t(295,"r$9B"))/7*(parseInt(t(279,"29p#"))/8)+parseInt(t(292,"k(FO"))/9*(-parseInt(t(280,"r$9B"))/10)+-parseInt(t(286,"6y#u"))/11)break;n.push(n.shift())}catch(r){n.push(n.shift())}}(Qn);var ighnua,Zn=(ighnua=!0,function(ovjrup,Euvnak){var Ovjrup=ighnua?function(){if(Euvnak){var Ighnua=Euvnak.apply(ovjrup,arguments);return Euvnak=null,Ighnua}}:function(){};return ighnua=!1,Ovjrup}),ro=Zn(this,(function(){var r=function(){return!r.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(ro)};return r()}));return ro(),e.ready}})();"object"==typeof exports&&"object"==typeof module?module.exports=initModule:"function"==typeof define&&define.amd&&define([],(()=>initModule));