scanbot-web-sdk 2.12.1-alpha.1 → 2.13.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/@types/barcode-scanner-view.d.ts +26 -0
  2. package/@types/model/barcode/barcode.d.ts +4 -1
  3. package/@types/model/configuration/barcode-scanner-configuration.d.ts +4 -1
  4. package/@types/model/configuration/base-configuration.d.ts +9 -1
  5. package/@types/model/configuration/selection-overlay-configuration.d.ts +3 -0
  6. package/@types/scanner-view.d.ts +1 -0
  7. package/@types/utils/colors.d.ts +6 -0
  8. package/@types/utils/date-utils.d.ts +3 -0
  9. package/@types/utils/dto/Point.d.ts +3 -0
  10. package/@types/utils/dto/Size.d.ts +4 -0
  11. package/@types/utils/image-utils.d.ts +2 -0
  12. package/@types/utils/view-utils.d.ts +2 -0
  13. package/@types/view/action-bar/bottom-action-bar.d.ts +8 -0
  14. package/@types/view/barcode-calculation/barcode-calculation-popup-list-item.d.ts +6 -0
  15. package/@types/view/barcode-calculation/barcode-calculation-popup-list.d.ts +8 -0
  16. package/@types/view/barcode-calculation/barcode-calculation-popup.d.ts +32 -0
  17. package/@types/view/barcode-calculation/scanned-image-with-overlay.d.ts +12 -0
  18. package/@types/view/barcode-calculation/styled-spinner.d.ts +3 -0
  19. package/@types/view/barcode-polygon/animated-barcode-selection-overlay.d.ts +11 -0
  20. package/@types/view/barcode-polygon/barcode-overlay.d.ts +9 -0
  21. package/@types/view/barcode-polygon/barcode-selection-overlay.d.ts +17 -0
  22. package/@types/view/barcode-polygon/barocode-polygon.d.ts +10 -0
  23. package/@types/view/scanbot-camera-view.d.ts +1 -0
  24. package/@types/view/shutter-button.d.ts +1 -0
  25. package/@types/view/utils/capturing-loader.d.ts +4 -0
  26. package/@types/view/utils/icons/bullets-burger.d.ts +4 -0
  27. package/@types/view/utils/icons/check-circle.d.ts +4 -0
  28. package/@types/view/utils/icons/replay.d.ts +4 -0
  29. package/@types/view/view-finder.d.ts +1 -0
  30. package/bundle/ScanbotSDK.min.js +5 -2
  31. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm +0 -0
  32. package/bundle/bin/barcode-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  33. package/bundle/bin/barcode-scanner/ScanbotSDK.Core.js +1 -1
  34. package/bundle/bin/complete/ScanbotSDK.Asm.wasm +0 -0
  35. package/bundle/bin/complete/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  36. package/bundle/bin/complete/ScanbotSDK.Core.js +1 -1
  37. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm +0 -0
  38. package/bundle/bin/document-scanner/ScanbotSDK.Asm.wasm-webpack-file-loader +0 -0
  39. package/bundle/bin/document-scanner/ScanbotSDK.Core.js +1 -1
  40. package/package.json +2 -2
@@ -1 +1 @@
1
- !function(r){var t={};function e(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=r,e.c=t,e.d=function(r,t,n){e.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:n})},e.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},e.t=function(r,t){if(1&t&&(r=e(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var o in r)e.d(n,o,function(t){return r[t]}.bind(null,o));return n},e.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(t,"a",t),t},e.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},e.p="",e(e.s=0)}([function(r,t,e){"use strict";var n=e(1);let o;const a="/tessdata",i={};function s(r){const t=Math.random().toString(36);return i[t]=r,t}function u(r){if(!i.hasOwnProperty(r))throw new Error(`Object ${r} does not exist`);return i[r]}function c(r){const t=u(r);t.delete&&t.delete(),delete i[r]}function l(r,t){for(let e in t){if(r===t[e])return e}}function f(r){if(!(r instanceof Array))throw new Error('languages must be an array of valid language codes, e.g. ["eng", "deu"]');return o.FS.analyzePath(a).exists||o.FS.mkdir(a),r.forEach((function(r){if(!o.FS.analyzePath("/tessdata/"+r+".traineddata").exists){let t=o.locateFile(`tessdata/${r}.traineddata`);o.FS.createLazyFile(a,r+".traineddata",t,!0,!1)}})),r.join("+")}const d={initialize:async function(r,t,n,a){const i=e(2),s={locateFile:function(r,e){let n;return n=t?function(r){return r.startsWith("http:")||r.startsWith("https:")}(t)?t:"":a,n+r}};return await i(s),o=s,o.initialize(r||"",n)},getLicenseInfo:function(){return o.getLicenseInfo()},applyFilter:function(r,t){return m(o.applyFilter(g(r),t),p)},rotateImageCcw:function(r,t){return m(o.rotateImageCcw(g(r),t),p)},cropAndRotateImageCcw:function(r,t,e){const n=function(r){const t=[];for(let e=0;e<r.length;++e)t.push(r[e].x,r[e].y);return t}(t);return m(o.cropAndRotateImageCcw(g(r),n,e),p)},detectDocument:async function(r,t,e){return await h(o.detectDocument(g(r),t,e))},detectDocumentOnImage:async function(r,t,e){return await d.detectDocument(r,t,e)},detectAndCropDocument:async function(r){return await h(o.detectAndCropDocument(g(r)))},createBarcodeRecognizer:async function(r){return s(new o.BarcodeRecognizer(r||{}))},recognizeBarcodes:async function(r,t,e){let n,a=!1;"string"==typeof r?n=u(r):(e=t,t=r,n=new o.BarcodeRecognizer(e),a=!0);try{const r=n.recognize(g(t),e||{});if(!r)return null;let i;return r.length?(i=r.map((r=>({format:l(r.format,o.BarcodeFormat),text:r.text,parsedText:r.parsedText,rawBytes:r.rawBytes.data.slice(),barcodeImage:p(r.barcodeImage)}))),r.forEach((r=>r.delete()))):i=[],{result:i,originalImage:t}}finally{a&&n.delete()}},beginPdf:async function(r){return s(new o.PdfGenerationContext(r||{}))},addPageToPdf:async function(r,t){m(u(r).addPage(t))},completePdf:async function(r){const t=m(u(r).complete(),p);return c(r),t},beginTiff:async function(r){const t=new o.TiffGenerationContext(r||{});return m(t.begin()),s(t)},addPageToTiff:async function(r,t){return m(u(r).addPage(g(t)))},completeTiff:async function(r){try{const t=u(r).complete();return m(t,p)}finally{c(r)}},createMRZRecognizer:async function(){return s(new o.MrzRecognizerContext)},recognizeMRZ:async function(r,t){return u(r).recognize(g(t))},createBlurDetector:function(){return s(new o.BlurDetectorContext)},estimateBlurriness:function(r,t){return m(u(r).estimateBlurriness(g(t)))},estimateBlurrinessOnBuffer:function(r,t){return d.estimateBlurriness(r,t)},releaseObject:async function(r){c(r)},createOcrEngine:async function(r){const t=f(r);return s(new o.TesseractOcrContext(a,t))},performOcr:async function(r,t){return u(r).performOcr(g(t))},createGenericTextLineScanner:async function(r){r.languages||(r.languages=["eng"]),r.languages=f(r.languages),r.tessdataPath=a;return s(new o.GenericTextLineScanner(r))},recognizeTextLine:async function(r,t){return u(r).recognize(g(t))},cleanTextLineRecognitionQueue:async function(r){u(r).cleanRecognitionQueue()}};async function h(r){if(!r)return{success:!1,detectionStatus:"Error_License"};const t=(e=r.detectionResult,w[e]?w[e]:e>=200?"Error_Unknown":"OK");var e;const n={detectionStatus:t,success:v(t)};return n.original=p(r.originalImageJpegData),n.success&&(n.cropped=p(r.croppedImageJpegData),n.polygon=function(r){if(r.length%2!=0)throw Error("pointCoords size is not even.");const t=[];for(let e=0;e<r.length;e+=2)t.push({x:r[e],y:r[e+1]});return t}(r.polygon.data),n.horizontalLines=y(r.horizontalLines.data),n.verticalLines=y(r.verticalLines.data)),r.delete(),n}function p(r){return r&&r.data&&r.data.slice()}function m(r,t){try{if(r.errorMessage){throw new Error(r.errorMessage)}return(t||(r=>r))(r.result)}finally{r.delete()}}function v(r){return"OK"===r.substr(0,2)}function y(r){const t=[];if(!r)return t;if(r.length%4!=0)throw Error("lineCoords size invalid.");for(let e=0;e<r.length;e+=4)t.push({p1:{x:r[e],y:r[e+1]},p2:{x:r[e+2],y:r[e+3]}});return t}function g(r){if(!r)throw new Error("null image data or buffer");return"number"==typeof r.width?r:{data:r,width:-1,height:-1}}const w={0:"NotAcquired",100:"OK",101:"OK_SmallSize",102:"OK_BadAngles",103:"OK_BadAspectRatio",104:"OK_OffCenter",200:"Error_NothingDetected",201:"Error_Brightness",202:"Error_Noise"};onmessage=function(r){const{command:t,args:e,ticket:a}=r.data;o||"initialize"===t?(async()=>await d[t].apply(null,e))().then((r=>{const t=(0,n.gatherTransferables)(r);self.postMessage({ticket:a,result:r},t)})).catch((r=>{const t="number"==typeof r?Error(o.stringFromException(r)):r;console.error(t),self.postMessage({ticket:a,error:t})})):self.postMessage({ticket:a,error:"WASM module not loaded yet."})}},function(r,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gatherTransferables=function(r,t){const e=[];return function r(n){if(!n)return;if(n.constructor===ImageData){const r={data:n.data.slice(),width:n.width,height:n.height};return e.push(r.data.buffer),r}if(n.constructor===ArrayBuffer){const r=t?n.slice(0):n;if(e.push(r),t)return n}else if(ArrayBuffer.isView(n)){let r;if(t){r=new(0,n.constructor)(n.buffer.slice(0))}else r=n;if(e.push(r.buffer),t)return n}else if(Array.isArray(n))for(let t=0;t<n.length;++t){const e=r(n[t]);e&&(n[t]=e)}else if(n.constructor===Object)for(const t in n)if(n.hasOwnProperty(t)){const e=r(n[t]);e&&(n[t]=e)}}(r),e}},function(r,t,e){"use strict";var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(r){var t,e,o=void 0!==(r=r||{})?r:{};o.ready=new Promise((function(r,n){t=r,e=n}));var a,i,s,u=Object.assign({},o),c=[],l="./this.program",f=(r,t)=>{throw t},d="";d=self.location.href,n&&(d=n),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText},s=r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},i=(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 h,p=o.print||console.log.bind(console),m=o.printErr||console.warn.bind(console);Object.assign(o,u),u=null,o.arguments&&(c=o.arguments),o.thisProgram&&(l=o.thisProgram),o.quit&&(f=o.quit),o.wasmBinary&&(h=o.wasmBinary);var v,y=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&G("no native wasm support detected");var g=!1;function w(r,t){r||G(t)}var _,b,E,k,T,P,C,S,D,F="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function A(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.buffer&&F)return F.decode(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}function j(r,t){return r?A(E,r,t):""}function M(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)),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 O(r,t,e){return M(r,E,t,e)}function $(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}function x(r){_=r,o.HEAP8=b=new Int8Array(r),o.HEAP16=k=new Int16Array(r),o.HEAP32=P=new Int32Array(r),o.HEAPU8=E=new Uint8Array(r),o.HEAPU16=T=new Uint16Array(r),o.HEAPU32=C=new Uint32Array(r),o.HEAPF32=S=new Float32Array(r),o.HEAPF64=D=new Float64Array(r)}o.INITIAL_MEMORY;var W,R,z,B,I,N=[],L=[],H=[],U=0,V=null,Y=null;function q(r){U++,o.monitorRunDependencies&&o.monitorRunDependencies(U)}function K(r){if(U--,o.monitorRunDependencies&&o.monitorRunDependencies(U),0==U&&(null!==V&&(clearInterval(V),V=null),Y)){var t=Y;Y=null,t()}}function G(r){o.onAbort&&o.onAbort(r),m(r="Aborted("+r+")"),g=!0,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw e(t),t}function J(r){return r.startsWith("data:application/octet-stream;base64,")}function X(r){try{if(r==R&&h)return new Uint8Array(h);if(s)return s(r);throw"both async and sync fetching of the wasm failed"}catch(r){G(r)}}J(R="ScanbotSDK.Asm.wasm")||(z=R,R=o.locateFile?o.locateFile(z,d):d+z);var Q={835232:r=>Qt(function(){return this[j(r)].toString()}.apply((0,eval)("(()=>this)()")))};function Z(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function rr(r){for(;r.length>0;)r.shift()(o)}var tr=[];function er(r){r.add_ref()}var nr=0;function or(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){C[this.ptr+4>>2]=r},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(r){C[this.ptr+8>>2]=r},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_refcount=function(r){P[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,b[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=b[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,b[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=b[this.ptr+13>>0]},this.init=function(r,t){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=P[this.ptr>>2];P[this.ptr>>2]=r+1},this.release_ref=function(){var r=P[this.ptr>>2];return P[this.ptr>>2]=r-1,1===r},this.set_adjusted_ptr=function(r){C[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Pe(this.get_type()))return C[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}function ar(r){return ve(new or(r).ptr)}var ir=[];function sr(r){var t=ir[r];return t||(r>=ir.length&&(ir.length=r+1),ir[r]=t=W.get(r)),t}function ur(r){if(r.release_ref()&&!r.get_rethrown()){var t=r.get_destructor();t&&sr(t)(r.excPtr),ar(r.excPtr)}}var cr=0;function lr(){var r=tr.pop();r||G("no exception to throw");var t=r.excPtr;throw r.get_rethrown()||(tr.push(r),r.set_rethrown(!0),r.set_caught(!1),nr++),cr=t,t}var 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={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:yr.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=dr.resolve(r).substr(1),t=dr.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("/")}};function hr(r,t,e){var n=e>0?e:$(r)+1,o=new Array(n),a=M(r,o,0,o.length);return t&&(o.length=a),o}var pr={ttys:[],init:function(){},shutdown:function(){},register:function(r,t){pr.ttys[r]={input:[],output:[],ops:t},yr.registerDevice(r,pr.stream_ops)},stream_ops:{open:function(r){var t=pr.ttys[r.node.rdev];if(!t)throw new yr.ErrnoError(43);r.tty=t,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.get_char)throw new yr.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 yr.ErrnoError(29)}if(void 0===s&&0===a)throw new yr.ErrnoError(6);if(null==s)break;a++,t[e+i]=s}return a&&(r.node.timestamp=Date.now()),a},write:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.put_char)throw new yr.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,t[e+a])}catch(r){throw new yr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(r){if(!r.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;r.input=hr(t,!0)}return r.input.shift()},put_char:function(r,t){null===t||10===t?(p(A(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},fsync:function(r){r.output&&r.output.length>0&&(p(A(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,t){null===t||10===t?(m(A(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},fsync:function(r){r.output&&r.output.length>0&&(m(A(r.output,0)),r.output=[])}}};function mr(r){r=function(r,t){return Math.ceil(r/t)*t}(r,65536);var t=_e(65536,r);return t?function(r,t){return E.fill(0,r,r+t),r}(t,r):0}var vr={ops_table:null,mount:function(r){return vr.createNode(null,"/",16895,0)},createNode:function(r,t,e,n){if(yr.isBlkdev(e)||yr.isFIFO(e))throw new yr.ErrnoError(63);vr.ops_table||(vr.ops_table={dir:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr,lookup:vr.node_ops.lookup,mknod:vr.node_ops.mknod,rename:vr.node_ops.rename,unlink:vr.node_ops.unlink,rmdir:vr.node_ops.rmdir,readdir:vr.node_ops.readdir,symlink:vr.node_ops.symlink},stream:{llseek:vr.stream_ops.llseek}},file:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr},stream:{llseek:vr.stream_ops.llseek,read:vr.stream_ops.read,write:vr.stream_ops.write,allocate:vr.stream_ops.allocate,mmap:vr.stream_ops.mmap,msync:vr.stream_ops.msync}},link:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr,readlink:vr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr},stream:yr.chrdev_stream_ops}});var o=yr.createNode(r,t,e,n);return yr.isDir(o.mode)?(o.node_ops=vr.ops_table.dir.node,o.stream_ops=vr.ops_table.dir.stream,o.contents={}):yr.isFile(o.mode)?(o.node_ops=vr.ops_table.file.node,o.stream_ops=vr.ops_table.file.stream,o.usedBytes=0,o.contents=null):yr.isLink(o.mode)?(o.node_ops=vr.ops_table.link.node,o.stream_ops=vr.ops_table.link.stream):yr.isChrdev(o.mode)&&(o.node_ops=vr.ops_table.chrdev.node,o.stream_ops=vr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[t]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(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:function(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:function(r){var t={};return t.dev=yr.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,yr.isDir(r.mode)?t.size=4096:yr.isFile(r.mode)?t.size=r.usedBytes:yr.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:function(r,t){void 0!==t.mode&&(r.mode=t.mode),void 0!==t.timestamp&&(r.timestamp=t.timestamp),void 0!==t.size&&vr.resizeFileStorage(r,t.size)},lookup:function(r,t){throw yr.genericErrors[44]},mknod:function(r,t,e,n){return vr.createNode(r,t,e,n)},rename:function(r,t,e){if(yr.isDir(r.mode)){var n;try{n=yr.lookupNode(t,e)}catch(r){}if(n)for(var o in n.contents)throw new yr.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:function(r,t){delete r.contents[t],r.timestamp=Date.now()},rmdir:function(r,t){var e=yr.lookupNode(r,t);for(var n in e.contents)throw new yr.ErrnoError(55);delete r.contents[t],r.timestamp=Date.now()},readdir:function(r){var t=[".",".."];for(var e in r.contents)r.contents.hasOwnProperty(e)&&t.push(e);return t},symlink:function(r,t,e){var n=vr.createNode(r,t,41471,0);return n.link=e,n},readlink:function(r){if(!yr.isLink(r.mode))throw new yr.ErrnoError(28);return r.link}},stream_ops:{read:function(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:function(r,t,e,n,o,a){if(t.buffer===b.buffer&&(a=!1),!n)return 0;var i=r.node;if(i.timestamp=Date.now(),t.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=t.subarray(e,e+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=t.slice(e,e+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(t.subarray(e,e+n),o),n}if(vr.expandFileStorage(i,o+n),i.contents.subarray&&t.subarray)i.contents.set(t.subarray(e,e+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=t[e+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(r,t,e){var n=t;if(1===e?n+=r.position:2===e&&yr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new yr.ErrnoError(28);return n},allocate:function(r,t,e){vr.expandFileStorage(r.node,t+e),r.node.usedBytes=Math.max(r.node.usedBytes,t+e)},mmap:function(r,t,e,n,o){if(!yr.isFile(r.node.mode))throw new yr.ErrnoError(43);var a,i,s=r.node.contents;if(2&o||s.buffer!==_){if((e>0||e+t<s.length)&&(s=s.subarray?s.subarray(e,e+t):Array.prototype.slice.call(s,e,e+t)),i=!0,!(a=mr(t)))throw new yr.ErrnoError(48);b.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:function(r,t,e,n,o){return vr.stream_ops.write(r,t,0,n,e,!1),0}}},yr={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=dr.resolve(yr.cwd(),r)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new yr.ErrnoError(32);for(var e=fr.normalizeArray(r.split("/").filter((r=>!!r)),!1),n=yr.root,o="/",a=0;a<e.length;a++){var i=a===e.length-1;if(i&&t.parent)break;if(n=yr.lookupNode(n,e[a]),o=fr.join2(o,e[a]),yr.isMountpoint(n)&&(!i||i&&t.follow_mount)&&(n=n.mounted.root),!i||t.follow)for(var s=0;yr.isLink(n.mode);){var u=yr.readlink(o);if(o=dr.resolve(fr.dirname(o),u),n=yr.lookupPath(o,{recurse_count:t.recurse_count+1}).node,s++>40)throw new yr.ErrnoError(32)}}return{path:o,node:n}},getPath:r=>{for(var t;;){if(yr.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)%yr.nameTable.length},hashAddNode:r=>{var t=yr.hashName(r.parent.id,r.name);r.name_next=yr.nameTable[t],yr.nameTable[t]=r},hashRemoveNode:r=>{var t=yr.hashName(r.parent.id,r.name);if(yr.nameTable[t]===r)yr.nameTable[t]=r.name_next;else for(var e=yr.nameTable[t];e;){if(e.name_next===r){e.name_next=r.name_next;break}e=e.name_next}},lookupNode:(r,t)=>{var e=yr.mayLookup(r);if(e)throw new yr.ErrnoError(e,r);for(var n=yr.hashName(r.id,t),o=yr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===t)return o}return yr.lookup(r,t)},createNode:(r,t,e,n)=>{var o=new yr.FSNode(r,t,e,n);return yr.hashAddNode(o),o},destroyNode:r=>{yr.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),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var t=yr.flagModes[r];if(void 0===t)throw new Error("Unknown file open mode: "+r);return t},flagsToPermissionString:r=>{var t=["r","w","rw"][3&r];return 512&r&&(t+="w"),t},nodePermissions:(r,t)=>yr.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=yr.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate:(r,t)=>{try{return yr.lookupNode(r,t),20}catch(r){}return yr.nodePermissions(r,"wx")},mayDelete:(r,t,e)=>{var n;try{n=yr.lookupNode(r,t)}catch(r){return r.errno}var o=yr.nodePermissions(r,"wx");if(o)return o;if(e){if(!yr.isDir(n.mode))return 54;if(yr.isRoot(n)||yr.getPath(n)===yr.cwd())return 10}else if(yr.isDir(n.mode))return 31;return 0},mayOpen:(r,t)=>r?yr.isLink(r.mode)?32:yr.isDir(r.mode)&&("r"!==yr.flagsToPermissionString(t)||512&t)?31:yr.nodePermissions(r,yr.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,t=yr.MAX_OPEN_FDS)=>{for(var e=r;e<=t;e++)if(!yr.streams[e])return e;throw new yr.ErrnoError(33)},getStream:r=>yr.streams[r],createStream:(r,t,e)=>{yr.FSStream||(yr.FSStream=function(){this.shared={}},yr.FSStream.prototype={},Object.defineProperties(yr.FSStream.prototype,{object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get:function(){return this.shared.position},set:function(r){this.shared.position=r}}})),r=Object.assign(new yr.FSStream,r);var n=yr.nextfd(t,e);return r.fd=n,yr.streams[n]=r,r},closeStream:r=>{yr.streams[r]=null},chrdev_stream_ops:{open:r=>{var t=yr.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new yr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,t)=>r<<8|t,registerDevice:(r,t)=>{yr.devices[r]={stream_ops:t}},getDevice:r=>yr.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),yr.syncFSRequests++,yr.syncFSRequests>1&&m("warning: "+yr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=yr.getMounts(yr.root.mount),n=0;function o(r){return yr.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&&yr.root)throw new yr.ErrnoError(10);if(!o&&!a){var i=yr.lookupPath(e,{follow_mount:!1});if(e=i.path,n=i.node,yr.isMountpoint(n))throw new yr.ErrnoError(10);if(!yr.isDir(n.mode))throw new yr.ErrnoError(54)}var s={type:r,opts:t,mountpoint:e,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?yr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var t=yr.lookupPath(r,{follow_mount:!1});if(!yr.isMountpoint(t.node))throw new yr.ErrnoError(28);var e=t.node,n=e.mounted,o=yr.getMounts(n);Object.keys(yr.nameTable).forEach((r=>{for(var t=yr.nameTable[r];t;){var e=t.name_next;o.includes(t.mount)&&yr.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=yr.lookupPath(r,{parent:!0}).node,o=fr.basename(r);if(!o||"."===o||".."===o)throw new yr.ErrnoError(28);var a=yr.mayCreate(n,o);if(a)throw new yr.ErrnoError(a);if(!n.node_ops.mknod)throw new yr.ErrnoError(63);return n.node_ops.mknod(n,o,t,e)},create:(r,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,yr.mknod(r,t,0)),mkdir:(r,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,yr.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{yr.mkdir(n,t)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,t,e)=>(void 0===e&&(e=t,t=438),t|=8192,yr.mknod(r,t,e)),symlink:(r,t)=>{if(!dr.resolve(r))throw new yr.ErrnoError(44);var e=yr.lookupPath(t,{parent:!0}).node;if(!e)throw new yr.ErrnoError(44);var n=fr.basename(t),o=yr.mayCreate(e,n);if(o)throw new yr.ErrnoError(o);if(!e.node_ops.symlink)throw new yr.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=yr.lookupPath(r,{parent:!0}).node,n=yr.lookupPath(t,{parent:!0}).node,!e||!n)throw new yr.ErrnoError(44);if(e.mount!==n.mount)throw new yr.ErrnoError(75);var u,c=yr.lookupNode(e,i),l=dr.relative(r,a);if("."!==l.charAt(0))throw new yr.ErrnoError(28);if("."!==(l=dr.relative(t,o)).charAt(0))throw new yr.ErrnoError(55);try{u=yr.lookupNode(n,s)}catch(r){}if(c!==u){var f=yr.isDir(c.mode),d=yr.mayDelete(e,i,f);if(d)throw new yr.ErrnoError(d);if(d=u?yr.mayDelete(n,s,f):yr.mayCreate(n,s))throw new yr.ErrnoError(d);if(!e.node_ops.rename)throw new yr.ErrnoError(63);if(yr.isMountpoint(c)||u&&yr.isMountpoint(u))throw new yr.ErrnoError(10);if(n!==e&&(d=yr.nodePermissions(e,"w")))throw new yr.ErrnoError(d);yr.hashRemoveNode(c);try{e.node_ops.rename(c,n,s)}catch(r){throw r}finally{yr.hashAddNode(c)}}},rmdir:r=>{var t=yr.lookupPath(r,{parent:!0}).node,e=fr.basename(r),n=yr.lookupNode(t,e),o=yr.mayDelete(t,e,!0);if(o)throw new yr.ErrnoError(o);if(!t.node_ops.rmdir)throw new yr.ErrnoError(63);if(yr.isMountpoint(n))throw new yr.ErrnoError(10);t.node_ops.rmdir(t,e),yr.destroyNode(n)},readdir:r=>{var t=yr.lookupPath(r,{follow:!0}).node;if(!t.node_ops.readdir)throw new yr.ErrnoError(54);return t.node_ops.readdir(t)},unlink:r=>{var t=yr.lookupPath(r,{parent:!0}).node;if(!t)throw new yr.ErrnoError(44);var e=fr.basename(r),n=yr.lookupNode(t,e),o=yr.mayDelete(t,e,!1);if(o)throw new yr.ErrnoError(o);if(!t.node_ops.unlink)throw new yr.ErrnoError(63);if(yr.isMountpoint(n))throw new yr.ErrnoError(10);t.node_ops.unlink(t,e),yr.destroyNode(n)},readlink:r=>{var t=yr.lookupPath(r).node;if(!t)throw new yr.ErrnoError(44);if(!t.node_ops.readlink)throw new yr.ErrnoError(28);return dr.resolve(yr.getPath(t.parent),t.node_ops.readlink(t))},stat:(r,t)=>{var e=yr.lookupPath(r,{follow:!t}).node;if(!e)throw new yr.ErrnoError(44);if(!e.node_ops.getattr)throw new yr.ErrnoError(63);return e.node_ops.getattr(e)},lstat:r=>yr.stat(r,!0),chmod:(r,t,e)=>{var n;if(!(n="string"==typeof r?yr.lookupPath(r,{follow:!e}).node:r).node_ops.setattr)throw new yr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,t)=>{yr.chmod(r,t,!0)},fchmod:(r,t)=>{var e=yr.getStream(r);if(!e)throw new yr.ErrnoError(8);yr.chmod(e.node,t)},chown:(r,t,e,n)=>{var o;if(!(o="string"==typeof r?yr.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new yr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,t,e)=>{yr.chown(r,t,e,!0)},fchown:(r,t,e)=>{var n=yr.getStream(r);if(!n)throw new yr.ErrnoError(8);yr.chown(n.node,t,e)},truncate:(r,t)=>{if(t<0)throw new yr.ErrnoError(28);var e;if(!(e="string"==typeof r?yr.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new yr.ErrnoError(63);if(yr.isDir(e.mode))throw new yr.ErrnoError(31);if(!yr.isFile(e.mode))throw new yr.ErrnoError(28);var n=yr.nodePermissions(e,"w");if(n)throw new yr.ErrnoError(n);e.node_ops.setattr(e,{size:t,timestamp:Date.now()})},ftruncate:(r,t)=>{var e=yr.getStream(r);if(!e)throw new yr.ErrnoError(8);if(0==(2097155&e.flags))throw new yr.ErrnoError(28);yr.truncate(e.node,t)},utime:(r,t,e)=>{var n=yr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,e)})},open:(r,t,e)=>{if(""===r)throw new yr.ErrnoError(44);var n;if(e=void 0===e?438:e,e=64&(t="string"==typeof t?yr.modeStringToFlags(t):t)?4095&e|32768:0,"object"==typeof r)n=r;else{r=fr.normalize(r);try{n=yr.lookupPath(r,{follow:!(131072&t)}).node}catch(r){}}var a=!1;if(64&t)if(n){if(128&t)throw new yr.ErrnoError(20)}else n=yr.mknod(r,e,0),a=!0;if(!n)throw new yr.ErrnoError(44);if(yr.isChrdev(n.mode)&&(t&=-513),65536&t&&!yr.isDir(n.mode))throw new yr.ErrnoError(54);if(!a){var i=yr.mayOpen(n,t);if(i)throw new yr.ErrnoError(i)}512&t&&!a&&yr.truncate(n,0),t&=-131713;var s=yr.createStream({node:n,path:yr.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&t||(yr.readFiles||(yr.readFiles={}),r in yr.readFiles||(yr.readFiles[r]=1)),s},close:r=>{if(yr.isClosed(r))throw new yr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{yr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,t,e)=>{if(yr.isClosed(r))throw new yr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new yr.ErrnoError(70);if(0!=e&&1!=e&&2!=e)throw new yr.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 yr.ErrnoError(28);if(yr.isClosed(r))throw new yr.ErrnoError(8);if(1==(2097155&r.flags))throw new yr.ErrnoError(8);if(yr.isDir(r.node.mode))throw new yr.ErrnoError(31);if(!r.stream_ops.read)throw new yr.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new yr.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 yr.ErrnoError(28);if(yr.isClosed(r))throw new yr.ErrnoError(8);if(0==(2097155&r.flags))throw new yr.ErrnoError(8);if(yr.isDir(r.node.mode))throw new yr.ErrnoError(31);if(!r.stream_ops.write)throw new yr.ErrnoError(28);r.seekable&&1024&r.flags&&yr.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new yr.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(yr.isClosed(r))throw new yr.ErrnoError(8);if(t<0||e<=0)throw new yr.ErrnoError(28);if(0==(2097155&r.flags))throw new yr.ErrnoError(8);if(!yr.isFile(r.node.mode)&&!yr.isDir(r.node.mode))throw new yr.ErrnoError(43);if(!r.stream_ops.allocate)throw new yr.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 yr.ErrnoError(2);if(1==(2097155&r.flags))throw new yr.ErrnoError(2);if(!r.stream_ops.mmap)throw new yr.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 yr.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=yr.open(r,t.flags),o=yr.stat(r).size,a=new Uint8Array(o);return yr.read(n,a,0,o,0),"utf8"===t.encoding?e=A(a,0):"binary"===t.encoding&&(e=a),yr.close(n),e},writeFile:(r,t,e={})=>{e.flags=e.flags||577;var n=yr.open(r,e.flags,e.mode);if("string"==typeof t){var o=new Uint8Array($(t)+1),a=M(t,o,0,o.length);yr.write(n,o,0,a,void 0,e.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");yr.write(n,t,0,t.byteLength,void 0,e.canOwn)}yr.close(n)},cwd:()=>yr.currentPath,chdir:r=>{var t=yr.lookupPath(r,{follow:!0});if(null===t.node)throw new yr.ErrnoError(44);if(!yr.isDir(t.node.mode))throw new yr.ErrnoError(54);var e=yr.nodePermissions(t.node,"x");if(e)throw new yr.ErrnoError(e);yr.currentPath=t.path},createDefaultDirectories:()=>{yr.mkdir("/tmp"),yr.mkdir("/home"),yr.mkdir("/home/web_user")},createDefaultDevices:()=>{yr.mkdir("/dev"),yr.registerDevice(yr.makedev(1,3),{read:()=>0,write:(r,t,e,n,o)=>n}),yr.mkdev("/dev/null",yr.makedev(1,3)),pr.register(yr.makedev(5,0),pr.default_tty_ops),pr.register(yr.makedev(6,0),pr.default_tty1_ops),yr.mkdev("/dev/tty",yr.makedev(5,0)),yr.mkdev("/dev/tty1",yr.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}return()=>G("randomDevice")}();yr.createDevice("/dev","random",r),yr.createDevice("/dev","urandom",r),yr.mkdir("/dev/shm"),yr.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{yr.mkdir("/proc");var r=yr.mkdir("/proc/self");yr.mkdir("/proc/self/fd"),yr.mount({mount:()=>{var t=yr.createNode(r,"fd",16895,73);return t.node_ops={lookup:(r,t)=>{var e=+t,n=yr.getStream(e);if(!n)throw new yr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?yr.createDevice("/dev","stdin",o.stdin):yr.symlink("/dev/tty","/dev/stdin"),o.stdout?yr.createDevice("/dev","stdout",null,o.stdout):yr.symlink("/dev/tty","/dev/stdout"),o.stderr?yr.createDevice("/dev","stderr",null,o.stderr):yr.symlink("/dev/tty1","/dev/stderr"),yr.open("/dev/stdin",0),yr.open("/dev/stdout",1),yr.open("/dev/stderr",1)},ensureErrnoError:()=>{yr.ErrnoError||(yr.ErrnoError=function(r,t){this.node=t,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},yr.ErrnoError.prototype=new Error,yr.ErrnoError.prototype.constructor=yr.ErrnoError,[44].forEach((r=>{yr.genericErrors[r]=new yr.ErrnoError(r),yr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{yr.ensureErrnoError(),yr.nameTable=new Array(4096),yr.mount(vr,{},"/"),yr.createDefaultDirectories(),yr.createDefaultDevices(),yr.createSpecialDirectories(),yr.filesystems={MEMFS:vr}},init:(r,t,e)=>{yr.init.initialized=!0,yr.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=t||o.stdout,o.stderr=e||o.stderr,yr.createStandardStreams()},quit:()=>{yr.init.initialized=!1;for(var r=0;r<yr.streams.length;r++){var t=yr.streams[r];t&&yr.close(t)}},getMode:(r,t)=>{var e=0;return r&&(e|=365),t&&(e|=146),e},findObject:(r,t)=>{var e=yr.analyzePath(r,t);return e.exists?e.object:null},analyzePath:(r,t)=>{try{r=(n=yr.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=yr.lookupPath(r,{parent:!0});e.parentExists=!0,e.parentPath=n.path,e.parentObject=n.node,e.name=fr.basename(r),n=yr.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:yr.getPath(r);for(var o=t.split("/").reverse();o.length;){var a=o.pop();if(a){var i=fr.join2(r,a);try{yr.mkdir(i)}catch(r){}r=i}}return i},createFile:(r,t,e,n,o)=>{var a=fr.join2("string"==typeof r?r:yr.getPath(r),t),i=yr.getMode(n,o);return yr.create(a,i)},createDataFile:(r,t,e,n,o,a)=>{var i=t;r&&(r="string"==typeof r?r:yr.getPath(r),i=t?fr.join2(r,t):r);var s=yr.getMode(n,o),u=yr.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}yr.chmod(u,146|s);var d=yr.open(u,577);yr.write(d,e,0,e.length,0,a),yr.close(d),yr.chmod(u,s)}return u},createDevice:(r,t,e,n)=>{var o=fr.join2("string"==typeof r?r:yr.getPath(r),t),a=yr.getMode(!!e,!!n);yr.createDevice.major||(yr.createDevice.major=64);var i=yr.makedev(yr.createDevice.major++,0);return yr.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 yr.ErrnoError(29)}if(void 0===u&&0===i)throw new yr.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 yr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),yr.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(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=hr(a(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new yr.ErrnoError(29)}},createLazyFile:(r,t,e,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.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]}},a.prototype.setDataGetter=function(r){this.getter=r},a.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",e,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+e+". Status: "+r.status);var t,n=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=n);var s=this;s.setDataGetter((r=>{var t=r*i,o=(r+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,t)=>{if(r>t)throw new Error("invalid range ("+r+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",e,!1),n!==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 "+e+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):hr(o.responseText||"",!0)})(t,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,p("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:e};var u=yr.createFile(r,t,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function l(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(u.stream_ops).forEach((r=>{var t=u.stream_ops[r];c[r]=function(){return yr.forceLoadFile(u),t.apply(null,arguments)}})),c.read=(r,t,e,n,o)=>(yr.forceLoadFile(u),l(r,t,e,n,o)),c.mmap=(r,t,e,n,o)=>{yr.forceLoadFile(u);var a=mr(t);if(!a)throw new yr.ErrnoError(48);return l(r,b,a,t,e),{ptr:a,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(r,t,e,n,o,a,s,u,c,l)=>{var f=t?dr.resolve(fr.join2(r,t)):r;function d(e){function i(e){l&&l(),u||yr.createDataFile(r,t,e,n,o,c),a&&a(),K()}Browser.handledByPreloadPlugin(e,f,i,(()=>{s&&s(),K()}))||i(e)}q(),"string"==typeof e?function(r,t,e,n){var o=n?"":"al "+r;i(r,(e=>{w(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),t(new Uint8Array(e)),o&&K()}),(t=>{if(!e)throw'Loading data file "'+r+'" failed.';e()})),o&&q()}(e,(r=>d(r)),s):d(e)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,t,e)=>{t=t||(()=>{}),e=e||(()=>{});var n=yr.indexedDB();try{var o=n.open(yr.DB_NAME(),yr.DB_VERSION)}catch(r){return e(r)}o.onupgradeneeded=()=>{p("creating db"),o.result.createObjectStore(yr.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([yr.DB_STORE_NAME],"readwrite"),a=n.objectStore(yr.DB_STORE_NAME),i=0,s=0,u=r.length;function c(){0==s?t():e()}r.forEach((r=>{var t=a.put(yr.analyzePath(r).object.contents,r);t.onsuccess=()=>{++i+s==u&&c()},t.onerror=()=>{s++,i+s==u&&c()}})),n.onerror=e},o.onerror=e},loadFilesFromDB:(r,t,e)=>{t=t||(()=>{}),e=e||(()=>{});var n=yr.indexedDB();try{var o=n.open(yr.DB_NAME(),yr.DB_VERSION)}catch(r){return e(r)}o.onupgradeneeded=e,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([yr.DB_STORE_NAME],"readonly")}catch(r){return void e(r)}var i=a.objectStore(yr.DB_STORE_NAME),s=0,u=0,c=r.length;function l(){0==u?t():e()}r.forEach((r=>{var t=i.get(r);t.onsuccess=()=>{yr.analyzePath(r).exists&&yr.unlink(r),yr.createDataFile(fr.dirname(r),fr.basename(r),t.result,!0,!0,!0),++s+u==c&&l()},t.onerror=()=>{u++,s+u==c&&l()}})),a.onerror=e},o.onerror=e}},gr={DEFAULT_POLLMASK:5,calculateAt:function(r,t,e){if(fr.isAbs(t))return t;var n;if(n=-100===r?yr.cwd():gr.getStreamFromFD(r).path,0==t.length){if(!e)throw new yr.ErrnoError(44);return n}return fr.join2(n,t)},doStat:function(r,t,e){try{var n=r(t)}catch(r){if(r&&r.node&&fr.normalize(t)!==fr.normalize(yr.getPath(r.node)))return-54;throw r}return P[e>>2]=n.dev,P[e+8>>2]=n.ino,P[e+12>>2]=n.mode,C[e+16>>2]=n.nlink,P[e+20>>2]=n.uid,P[e+24>>2]=n.gid,P[e+28>>2]=n.rdev,I=[n.size>>>0,(B=n.size,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],P[e+40>>2]=I[0],P[e+44>>2]=I[1],P[e+48>>2]=4096,P[e+52>>2]=n.blocks,I=[Math.floor(n.atime.getTime()/1e3)>>>0,(B=Math.floor(n.atime.getTime()/1e3),+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],P[e+56>>2]=I[0],P[e+60>>2]=I[1],C[e+64>>2]=0,I=[Math.floor(n.mtime.getTime()/1e3)>>>0,(B=Math.floor(n.mtime.getTime()/1e3),+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],P[e+72>>2]=I[0],P[e+76>>2]=I[1],C[e+80>>2]=0,I=[Math.floor(n.ctime.getTime()/1e3)>>>0,(B=Math.floor(n.ctime.getTime()/1e3),+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],P[e+88>>2]=I[0],P[e+92>>2]=I[1],C[e+96>>2]=0,I=[n.ino>>>0,(B=n.ino,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],P[e+104>>2]=I[0],P[e+108>>2]=I[1],0},doMsync:function(r,t,e,n,o){if(!yr.isFile(t.node.mode))throw new yr.ErrnoError(43);if(2&n)return 0;var a=E.slice(r,r+e);yr.msync(t,a,o,e,n)},varargs:void 0,get:function(){return gr.varargs+=4,P[gr.varargs-4>>2]},getStr:function(r){return j(r)},getStreamFromFD:function(r){var t=yr.getStream(r);if(!t)throw new yr.ErrnoError(8);return t}},wr="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking",_r={};function br(r){for(;r.length;){var t=r.pop();r.pop()(t)}}function Er(r){return this.fromWireType(P[r>>2])}var kr={},Tr={},Pr={};function Cr(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 Sr(r,t){return r=Cr(r),new Function("body","return function "+r+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Dr(r,t){var e=Sr(t,(function(r){this.name=t,this.message=r;var e=new Error(r).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},e}var Fr=void 0;function Ar(r){throw new Fr(r)}function jr(r,t,e){function n(t){var n=e(t);n.length!==r.length&&Ar("Mismatched type converter count");for(var o=0;o<r.length;++o)zr(r[o],n[o])}r.forEach((function(r){Pr[r]=t}));var o=new Array(t.length),a=[],i=0;t.forEach(((r,t)=>{Tr.hasOwnProperty(r)?o[t]=Tr[r]:(a.push(r),kr.hasOwnProperty(r)||(kr[r]=[]),kr[r].push((()=>{o[t]=Tr[r],++i===a.length&&n(o)})))})),0===a.length&&n(o)}var Mr={};function Or(r){switch(r){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+r)}}var $r=void 0;function xr(r){for(var t="",e=r;E[e];)t+=$r[E[e++]];return t}var Wr=void 0;function Rr(r){throw new Wr(r)}function zr(r,t,e={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(r||Rr('type "'+n+'" must have a positive integer typeid pointer'),Tr.hasOwnProperty(r)){if(e.ignoreDuplicateRegistrations)return;Rr("Cannot register type '"+n+"' twice")}if(Tr[r]=t,delete Pr[r],kr.hasOwnProperty(r)){var o=kr[r];delete kr[r],o.forEach((r=>r()))}}function Br(r){if(!(this instanceof st))return!1;if(!(r instanceof st))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}function Ir(r){Rr(r.$$.ptrType.registeredClass.name+" instance already deleted")}var Nr=!1;function Lr(r){}function Hr(r){r.count.value-=1,0===r.count.value&&function(r){r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr)}(r)}function Ur(r,t,e){if(t===e)return r;if(void 0===e.baseClass)return null;var n=Ur(r,t,e.baseClass);return null===n?null:e.downcast(n)}var Vr={};function Yr(){return Object.keys(Qr).length}function qr(){var r=[];for(var t in Qr)Qr.hasOwnProperty(t)&&r.push(Qr[t]);return r}var Kr=[];function Gr(){for(;Kr.length;){var r=Kr.pop();r.$$.deleteScheduled=!1,r.delete()}}var Jr=void 0;function Xr(r){Jr=r,Kr.length&&Jr&&Jr(Gr)}var Qr={};function Zr(r,t){return t=function(r,t){for(void 0===t&&Rr("ptr should not be undefined");r.baseClass;)t=r.upcast(t),r=r.baseClass;return t}(r,t),Qr[t]}function rt(r,t){return t.ptrType&&t.ptr||Ar("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Ar("Both smartPtrType and smartPtr must be specified"),t.count={value:1},et(Object.create(r,{$$:{value:t}}))}function tt(r){var t=this.getPointee(r);if(!t)return this.destructor(r),null;var e=Zr(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?rt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:r}):rt(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var a,i=this.registeredClass.getActualType(t),s=Vr[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=Ur(t,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?rt(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:r}):rt(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}function et(r){return"undefined"==typeof FinalizationRegistry?(et=r=>r,r):(Nr=new FinalizationRegistry((r=>{Hr(r.$$)})),et=r=>{var t=r.$$;if(t.smartPtr){var e={$$:t};Nr.register(r,e,r)}return r},Lr=r=>Nr.unregister(r),et(r))}function nt(){if(this.$$.ptr||Ir(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r,t=et(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 ot(){this.$$.ptr||Ir(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Rr("Object already scheduled for deletion"),Lr(this),Hr(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function at(){return!this.$$.ptr}function it(){return this.$$.ptr||Ir(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Rr("Object already scheduled for deletion"),Kr.push(this),1===Kr.length&&Jr&&Jr(Gr),this.$$.deleteScheduled=!0,this}function st(){}function ut(r,t,e){if(void 0===r[t].overloadTable){var n=r[t];r[t]=function(){return r[t].overloadTable.hasOwnProperty(arguments.length)||Rr("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}}function ct(r,t,e){o.hasOwnProperty(r)?((void 0===e||void 0!==o[r].overloadTable&&void 0!==o[r].overloadTable[e])&&Rr("Cannot register public name '"+r+"' twice"),ut(o,r,r),o.hasOwnProperty(e)&&Rr("Cannot register multiple overloads of a function with the same number of arguments ("+e+")!"),o[r].overloadTable[e]=t):(o[r]=t,void 0!==e&&(o[r].numArguments=e))}function lt(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=[]}function ft(r,t,e){for(;t!==e;)t.upcast||Rr("Expected null or instance of "+e.name+", got an instance of "+t.name),r=t.upcast(r),t=t.baseClass;return r}function dt(r,t){if(null===t)return this.isReference&&Rr("null is not a valid "+this.name),0;t.$$||Rr('Cannot pass "'+Rt(t)+'" as a '+this.name),t.$$.ptr||Rr("Cannot pass deleted object as a pointer of type "+this.name);var e=t.$$.ptrType.registeredClass;return ft(t.$$.ptr,e,this.registeredClass)}function ht(r,t){var e;if(null===t)return this.isReference&&Rr("null is not a valid "+this.name),this.isSmartPointer?(e=this.rawConstructor(),null!==r&&r.push(this.rawDestructor,e),e):0;t.$$||Rr('Cannot pass "'+Rt(t)+'" as a '+this.name),t.$$.ptr||Rr("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&Rr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(e=ft(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Rr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?e=t.$$.smartPtr:Rr("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,$t.toHandle((function(){o.delete()}))),null!==r&&r.push(this.rawDestructor,e)}break;default:Rr("Unsupporting sharing policy")}return e}function pt(r,t){if(null===t)return this.isReference&&Rr("null is not a valid "+this.name),0;t.$$||Rr('Cannot pass "'+Rt(t)+'" as a '+this.name),t.$$.ptr||Rr("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&Rr("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var e=t.$$.ptrType.registeredClass;return ft(t.$$.ptr,e,this.registeredClass)}function mt(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r}function vt(r){this.rawDestructor&&this.rawDestructor(r)}function yt(r){null!==r&&r.delete()}function gt(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=ht:n?(this.toWireType=dt,this.destructorFunction=null):(this.toWireType=pt,this.destructorFunction=null)}function wt(r,t,e){o.hasOwnProperty(r)||Ar("Replacing nonexistant public symbol"),void 0!==o[r].overloadTable&&void 0!==e?o[r].overloadTable[e]=t:(o[r]=t,o[r].argCount=e)}function _t(r,t,e){return r.includes("j")?function(r,t,e){var n=o["dynCall_"+r];return e&&e.length?n.apply(null,[t].concat(e)):n.call(null,t)}(r,t,e):sr(t).apply(null,e)}function bt(r,t){var e,n,o,a=(r=xr(r)).includes("j")?(e=r,n=t,o=[],function(){return o.length=0,Object.assign(o,arguments),_t(e,n,o)}):sr(t);return"function"!=typeof a&&Rr("unknown function pointer with signature "+r+": "+t),a}var Et=void 0;function kt(r){var t=we(r),e=xr(t);return ve(t),e}function Tt(r,t){var e=[],n={};throw t.forEach((function r(t){n[t]||Tr[t]||(Pr[t]?Pr[t].forEach(r):(e.push(t),n[t]=!0))})),new Et(r+": "+e.map(kt).join([", "]))}function Pt(r,t){for(var e=[],n=0;n<r;n++)e.push(C[t+4*n>>2]);return e}function Ct(r,t){if(!(r instanceof Function))throw new TypeError("new_ called with constructor type "+typeof r+" which is not a function");var e=Sr(r.name||"unknownFunctionName",(function(){}));e.prototype=r.prototype;var n=new e,o=r.apply(n,t);return o instanceof Object?o:n}function St(r,t,e,n,o){var a=t.length;a<2&&Rr("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var i=null!==t[1]&&null!==e,s=!1,u=1;u<t.length;++u)if(null!==t[u]&&void 0===t[u].destructorFunction){s=!0;break}var c="void"!==t[0].name,l="",f="";for(u=0;u<a-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var d="return function "+Cr(r)+"("+l+") {\nif (arguments.length !== "+(a-2)+") {\nthrowBindingError('function "+r+" called with ' + arguments.length + ' arguments, expected "+(a-2)+" args!');\n}\n";s&&(d+="var destructors = [];\n");var h=s?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],m=[Rr,n,o,br,t[0],t[1]];for(i&&(d+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<a-2;++u)d+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+t[u+2].name+"\n",p.push("argType"+u),m.push(t[u+2]);if(i&&(f="thisWired"+(f.length>0?", ":"")+f),d+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)d+="runDestructors(destructors);\n";else for(u=i?1:2;u<t.length;++u){var v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==t[u].destructorFunction&&(d+=v+"_dtor("+v+"); // "+t[u].name+"\n",p.push(v+"_dtor"),m.push(t[u].destructorFunction))}return c&&(d+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),d+="}\n",p.push(d),Ct(Function,p).apply(null,m)}function Dt(r,t,e){return r instanceof Object||Rr(e+' with invalid "this": '+r),r instanceof t.registeredClass.constructor||Rr(e+' incompatible with "this" of type '+r.constructor.name),r.$$.ptr||Rr("cannot call emscripten binding method "+e+" on deleted object"),ft(r.$$.ptr,r.$$.ptrType.registeredClass,t.registeredClass)}var Ft=[],At=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function jt(r){r>4&&0==--At[r].refcount&&(At[r]=void 0,Ft.push(r))}function Mt(){for(var r=0,t=5;t<At.length;++t)void 0!==At[t]&&++r;return r}function Ot(){for(var r=5;r<At.length;++r)if(void 0!==At[r])return At[r];return null}var $t={toValue:r=>(r||Rr("Cannot use deleted val. handle = "+r),At[r].value),toHandle:r=>{switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Ft.length?Ft.pop():At.length;return At[t]={refcount:1,value:r},t}}};function xt(r,t,e){switch(t){case 0:return function(r){var t=e?b:E;return this.fromWireType(t[r])};case 1:return function(r){var t=e?k:T;return this.fromWireType(t[r>>1])};case 2:return function(r){var t=e?P:C;return this.fromWireType(t[r>>2])};default:throw new TypeError("Unknown integer type: "+r)}}function Wt(r,t){var e=Tr[r];return void 0===e&&Rr(t+" has unknown type "+kt(r)),e}function Rt(r){if(null===r)return"null";var t=typeof r;return"object"===t||"array"===t||"function"===t?r.toString():""+r}function zt(r,t){switch(t){case 2:return function(r){return this.fromWireType(S[r>>2])};case 3:return function(r){return this.fromWireType(D[r>>3])};default:throw new TypeError("Unknown float type: "+r)}}function Bt(r,t,e){switch(t){case 0:return e?function(r){return b[r]}:function(r){return E[r]};case 1:return e?function(r){return k[r>>1]}:function(r){return T[r>>1]};case 2:return e?function(r){return P[r>>2]}:function(r){return C[r>>2]};default:throw new TypeError("Unknown integer type: "+r)}}var It="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Nt(r,t){for(var e=r,n=e>>1,o=n+t/2;!(n>=o)&&T[n];)++n;if((e=n<<1)-r>32&&It)return It.decode(E.subarray(r,e));for(var a="",i=0;!(i>=t/2);++i){var s=k[r+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a}function Lt(r,t,e){if(void 0===e&&(e=2147483647),e<2)return 0;for(var n=t,o=(e-=2)<2*r.length?e/2:r.length,a=0;a<o;++a){var i=r.charCodeAt(a);k[t>>1]=i,t+=2}return k[t>>1]=0,t-n}function Ht(r){return 2*r.length}function Ut(r,t){for(var e=0,n="";!(e>=t/4);){var o=P[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}function Vt(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 i=r.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++a)),P[t>>2]=i,(t+=4)+4>o)break}return P[t>>2]=0,t-n}function Yt(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}var qt={};function Kt(r){var t=qt[r];return void 0===t?xr(r):t}var Gt=[];function Jt(){return"object"==typeof globalThis?globalThis:Function("return this")()}var Xt=[];function Qt(r){var t=$(r)+1,e=me(t);return e&&M(r,b,e,t),e}var Zt,re=[];function te(r){try{return v.grow(r-_.byteLength+65535>>>16),x(v.buffer),1}catch(r){}}Zt=()=>performance.now();var ee={};function ne(){if(!ne.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",_:l||"./this.program"};for(var t in ee)void 0===ee[t]?delete r[t]:r[t]=ee[t];var e=[];for(var t in r)e.push(t+"="+r[t]);ne.strings=e}return ne.strings}function oe(r){y||(o.onExit&&o.onExit(r),g=!0),f(r,new Z(r))}var ae=function(r,t){oe(r)};function ie(r){return r%4==0&&(r%100!=0||r%400==0)}var se=[31,29,31,30,31,30,31,31,30,31,30,31],ue=[31,28,31,30,31,30,31,31,30,31,30,31];function ce(r,t,e,n){var o=P[n+40>>2],a={tm_sec:P[n>>2],tm_min:P[n+4>>2],tm_hour:P[n+8>>2],tm_mday:P[n+12>>2],tm_mon:P[n+16>>2],tm_year:P[n+20>>2],tm_wday:P[n+24>>2],tm_yday:P[n+28>>2],tm_isdst:P[n+32>>2],tm_gmtoff:P[n+36>>2],tm_zone:o?j(o):""},i=j(e),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(r,t,e){for(var n="number"==typeof r?r.toString():r||"";n.length<t;)n=e[0]+n;return n}function d(r,t){return f(r,t,"0")}function h(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 p(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 m(r){var t=function(r,t){for(var e=new Date(r.getTime());t>0;){var n=ie(e.getFullYear()),o=e.getMonth(),a=(n?se:ue)[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=p(e),a=p(n);return h(o,t)<=0?h(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var v={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return l[r.tm_mon].substring(0,3)},"%B":function(r){return l[r.tm_mon]},"%C":function(r){return d((r.tm_year+1900)/100|0,2)},"%d":function(r){return d(r.tm_mday,2)},"%e":function(r){return f(r.tm_mday,2," ")},"%g":function(r){return m(r).toString().substring(2)},"%G":function(r){return m(r)},"%H":function(r){return d(r.tm_hour,2)},"%I":function(r){var t=r.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(r){return d(r.tm_mday+function(r,t){for(var e=0,n=0;n<=t;e+=r[n++]);return e}(ie(r.tm_year+1900)?se:ue,r.tm_mon-1),3)},"%m":function(r){return d(r.tm_mon+1,2)},"%M":function(r){return d(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return d(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var t=r.tm_yday+7-r.tm_wday;return d(Math.floor(t/7),2)},"%V":function(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&&ie(r.tm_year)||(t=1)}}else{t=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&ie(r.tm_year%400-1))&&t++}return d(t,2)},"%w":function(r){return r.tm_wday},"%W":function(r){var t=r.tm_yday+7-(r.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(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":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in i=i.replace(/%%/g,"\0\0"),v)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),v[u](a)));var y=hr(i=i.replace(/\0\0/g,"%"),!1);return y.length>t?0:(function(r,t){b.set(r,t)}(y,r),y.length-1)}var le=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=yr.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n},fe=365,de=146;Object.defineProperties(le.prototype,{read:{get:function(){return(this.mode&fe)===fe},set:function(r){r?this.mode|=fe:this.mode&=-366}},write:{get:function(){return(this.mode&de)===de},set:function(r){r?this.mode|=de:this.mode&=-147}},isFolder:{get:function(){return yr.isDir(this.mode)}},isDevice:{get:function(){return yr.isChrdev(this.mode)}}}),yr.FSNode=le,yr.staticInit(),Fr=o.InternalError=Dr(Error,"InternalError"),function(){for(var r=new Array(256),t=0;t<256;++t)r[t]=String.fromCharCode(t);$r=r}(),Wr=o.BindingError=Dr(Error,"BindingError"),st.prototype.isAliasOf=Br,st.prototype.clone=nt,st.prototype.delete=ot,st.prototype.isDeleted=at,st.prototype.deleteLater=it,o.getInheritedInstanceCount=Yr,o.getLiveInheritedInstances=qr,o.flushPendingDeletes=Gr,o.setDelayFunction=Xr,gt.prototype.getPointee=mt,gt.prototype.destructor=vt,gt.prototype.argPackAdvance=8,gt.prototype.readValueFromPointer=Er,gt.prototype.deleteObject=yt,gt.prototype.fromWireType=tt,Et=o.UnboundTypeError=Dr(Error,"UnboundTypeError"),o.count_emval_handles=Mt,o.get_first_emval=Ot;var he,pe={p:function(r){return me(r+24)+24},r:function(r){var t=new or(r);return t.get_caught()||(t.set_caught(!0),nr--),t.set_rethrown(!1),tr.push(t),er(t),t.get_exception_ptr()},nb:function(){if(!tr.length)return 0;var r=tr[tr.length-1];return er(r),r.excPtr},qa:function(r){r&&ur(new or(r))},t:function(){be(0),ur(tr.pop()),cr=0},a:function(){var r=cr;if(!r)return ge(0),0;var t=new or(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return ge(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(Te(o,e,a))return ge(o),r}return ge(e),r},f:function(){var r=cr;if(!r)return ge(0),0;var t=new or(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return ge(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(Te(o,e,a))return ge(o),r}return ge(e),r},n:function(){var r=cr;if(!r)return ge(0),0;var t=new or(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return ge(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(Te(o,e,a))return ge(o),r}return ge(e),r},y:ar,pa:function(r){r&&er(new or(r))},ma:lr,mb:function(r){if(r){var t=new or(r);tr.push(t),t.set_rethrown(!0),lr()}},q:function(r,t,e){throw new or(r).init(t,e),cr=r,nr++,r},ob:function(){return nr},d:function(r){throw cr||(cr=r),r},sb:function(r,t,e,n,o){try{for(var a=0,i=t?P[t>>2]:0,s=t?P[t+4>>2]:0,u=e?P[e>>2]:0,c=e?P[e+4>>2]:0,l=n?P[n>>2]:0,f=n?P[n+4>>2]:0,d=0,h=0,p=0,m=0,v=0,y=0,g=(t?P[t>>2]:0)|(e?P[e>>2]:0)|(n?P[n>>2]:0),w=(t?P[t+4>>2]:0)|(e?P[e+4>>2]:0)|(n?P[n+4>>2]:0),_=function(r,t,e,n){return r<32?t&n:e&n},b=0;b<r;b++){var E=1<<b%32;if(_(b,g,w,E)){var k=gr.getStreamFromFD(b),T=gr.DEFAULT_POLLMASK;k.stream_ops.poll&&(T=k.stream_ops.poll(k)),1&T&&_(b,i,s,E)&&(b<32?d|=E:h|=E,a++),4&T&&_(b,u,c,E)&&(b<32?p|=E:m|=E,a++),2&T&&_(b,l,f,E)&&(b<32?v|=E:y|=E,a++)}}return t&&(P[t>>2]=d,P[t+4>>2]=h),e&&(P[e>>2]=p,P[e+4>>2]=m),n&&(P[n>>2]=v,P[n+4>>2]=y),a}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},ta:function(r,t,e){gr.varargs=e;try{var n=gr.getStreamFromFD(r);switch(t){case 0:return(o=gr.get())<0?-28:yr.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=gr.get();return n.flags|=o,0;case 5:return o=gr.get(),k[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return a=28,P[ye()>>2]=a,-1}}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}var a},zb:function(r,t){try{var e=gr.getStreamFromFD(r);return gr.doStat(yr.stat,e.path,t)}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},Ab:function(r,t,e){gr.varargs=e;try{var n=gr.getStreamFromFD(r);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=gr.get();return P[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=gr.get(),yr.ioctl(n,t,o);default:return-28}}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},xb:function(r,t,e,n){try{t=gr.getStr(t);var o=256&n,a=4096&n;return n&=-4353,t=gr.calculateAt(r,t,a),gr.doStat(o?yr.lstat:yr.stat,t,e)}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},ua:function(r,t,e,n){gr.varargs=n;try{t=gr.getStr(t),t=gr.calculateAt(r,t);var o=n?gr.get():0;return yr.open(t,e,o).fd}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},tb:function(r){try{return r=gr.getStr(r),yr.rmdir(r),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},yb:function(r,t){try{return r=gr.getStr(r),gr.doStat(yr.stat,r,t)}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},ub:function(r,t,e){try{return t=gr.getStr(t),t=gr.calculateAt(r,t),0===e?yr.unlink(t):512===e?yr.rmdir(t):G("Invalid flags passed to unlinkat"),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},za:function(r){},Ba:function(r,t){G(wr)},Aa:function(r,t){G(wr)},Ya:function(r){var t=_r[r];delete _r[r];var e=t.elements,n=e.length,o=e.map((function(r){return r.getterReturnType})).concat(e.map((function(r){return r.setterArgumentType}))),a=t.rawConstructor,i=t.rawDestructor;jr([r],o,(function(r){return e.forEach(((t,e)=>{var o=r[e],a=t.getter,i=t.getterContext,s=r[e+n],u=t.setter,c=t.setterContext;t.read=r=>o.fromWireType(a(i,r)),t.write=(r,t)=>{var e=[];u(c,r,s.toWireType(e,t)),br(e)}})),[{name:t.name,fromWireType:function(r){for(var t=new Array(n),o=0;o<n;++o)t[o]=e[o].read(r);return i(r),t},toWireType:function(r,o){if(n!==o.length)throw new TypeError("Incorrect number of tuple elements for "+t.name+": expected="+n+", actual="+o.length);for(var s=a(),u=0;u<n;++u)e[u].write(s,o[u]);return null!==r&&r.push(i,s),s},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:i}]}))},Wa:function(r){var t=Mr[r];delete Mr[r];var e=t.rawConstructor,n=t.rawDestructor,o=t.fields;jr([r],o.map((r=>r.getterReturnType)).concat(o.map((r=>r.setterArgumentType))),(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)),br(e)}}})),[{name:t.name,fromWireType:function(r){var t={};for(var e in a)t[e]=a[e].read(r);return n(r),t},toWireType:function(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:8,readValueFromPointer:Er,destructorFunction:n}]}))},gb:function(r,t,e,n,o){},Da:function(r,t,e,n,o){var a=Or(e);zr(r,{name:t=xr(t),fromWireType:function(r){return!!r},toWireType:function(r,t){return t?n:o},argPackAdvance:8,readValueFromPointer:function(r){var n;if(1===e)n=b;else if(2===e)n=k;else{if(4!==e)throw new TypeError("Unknown boolean type size: "+t);n=P}return this.fromWireType(n[r>>a])},destructorFunction:null})},E:function(r,t,e,n,o,a,i,s,u,c,l,f,d){l=xr(l),a=bt(o,a),s&&(s=bt(i,s)),c&&(c=bt(u,c)),d=bt(f,d);var h=Cr(l);ct(h,(function(){Tt("Cannot construct "+l+" due to unbound types",[n])})),jr([r,t,e],n?[n]:[],(function(t){var e,o;t=t[0],o=n?(e=t.registeredClass).instancePrototype:st.prototype;var i=Sr(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new Wr("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new Wr(l+" has no accessible constructor");var r=f.constructor_body[arguments.length];if(void 0===r)throw new Wr("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 lt(l,i,u,d,e,a,s,c),p=new gt(l,f,!0,!1,!1),m=new gt(l+"*",f,!1,!1,!1),v=new gt(l+" const*",f,!1,!0,!1);return Vr[r]={pointerType:m,constPointerType:v},wt(h,i),[p,m,v]}))},ab:function(r,t,e,n,o,a){w(t>0);var i=Pt(t,e);o=bt(n,o),jr([],[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 Wr("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]=()=>{Tt("Cannot construct "+r.name+" due to unbound types",i)},jr([],i,(function(n){return n.splice(1,0,null),r.registeredClass.constructor_body[t-1]=St(e,n,null,o,a),[]})),[]}))},$a:function(r,t,e,n,o,a,i,s){var u=Pt(e,n);t=xr(t),a=bt(o,a),jr([],[r],(function(r){var n=(r=r[0]).name+"."+t;function o(){Tt("Cannot call "+n+" due to unbound types",u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&r.registeredClass.pureVirtualFunctions.push(t);var c=r.registeredClass.instancePrototype,l=c[t];return void 0===l||void 0===l.overloadTable&&l.className!==r.name&&l.argCount===e-2?(o.argCount=e-2,o.className=r.name,c[t]=o):(ut(c,t,n),c[t].overloadTable[e-2]=o),jr([],u,(function(o){var s=St(n,o,r,a,i);return void 0===c[t].overloadTable?(s.argCount=e-2,c[t]=s):c[t].overloadTable[e-2]=s,[]})),[]}))},w:function(r,t,e,n,o,a,i,s,u,c){t=xr(t),o=bt(n,o),jr([],[r],(function(r){var n=(r=r[0]).name+"."+t,l={get:function(){Tt("Cannot access "+n+" due to unbound types",[e,i])},enumerable:!0,configurable:!0};return l.set=u?()=>{Tt("Cannot access "+n+" due to unbound types",[e,i])}:r=>{Rr(n+" is a read-only property")},Object.defineProperty(r.registeredClass.instancePrototype,t,l),jr([],u?[e,i]:[e],(function(e){var i=e[0],l={get:function(){var t=Dt(this,r,n+" getter");return i.fromWireType(o(a,t))},enumerable:!0};if(u){u=bt(s,u);var f=e[1];l.set=function(t){var e=Dt(this,r,n+" setter"),o=[];u(c,e,f.toWireType(o,t)),br(o)}}return Object.defineProperty(r.registeredClass.instancePrototype,t,l),[]})),[]}))},Ca:function(r,t){zr(r,{name:t=xr(t),fromWireType:function(r){var t=$t.toValue(r);return jt(r),t},toWireType:function(r,t){return $t.toHandle(t)},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:null})},bb:function(r,t,e,n){var o=Or(e);function a(){}t=xr(t),a.values={},zr(r,{name:t,constructor:a,fromWireType:function(r){return this.constructor.values[r]},toWireType:function(r,t){return t.value},argPackAdvance:8,readValueFromPointer:xt(t,o,n),destructorFunction:null}),ct(t,a)},K:function(r,t,e){var n=Wt(r,"enum");t=xr(t);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:e},constructor:{value:Sr(n.name+"_"+t,(function(){}))}});o.values[e]=a,o[t]=a},fa:function(r,t,e){var n=Or(e);zr(r,{name:t=xr(t),fromWireType:function(r){return r},toWireType:function(r,t){return t},argPackAdvance:8,readValueFromPointer:zt(t,n),destructorFunction:null})},G:function(r,t,e,n,o,a){var i=Pt(t,e);r=xr(r),o=bt(n,o),ct(r,(function(){Tt("Cannot call "+r+" due to unbound types",i)}),t-1),jr([],i,(function(e){var n=[e[0],null].concat(e.slice(1));return wt(r,St(r,n,null,o,a),t-1),[]}))},F:function(r,t,e,n,o){t=xr(t),-1===o&&(o=4294967295);var a=Or(e),i=r=>r;if(0===n){var s=32-8*e;i=r=>r<<s>>>s}var u=t.includes("unsigned");zr(r,{name:t,fromWireType:i,toWireType:u?function(r,t){return this.name,t>>>0}:function(r,t){return this.name,t},argPackAdvance:8,readValueFromPointer:Bt(t,a,0!==n),destructorFunction:null})},z:function(r,t,e){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(r){var t=C,e=t[r>>=2],o=t[r+1];return new n(_,o,e)}zr(r,{name:e=xr(e),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},ea:function(r,t){var e="std::string"===(t=xr(t));zr(r,{name:t,fromWireType:function(r){var t,n=C[r>>2],o=r+4;if(e)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==E[s]){var u=j(a,s-a);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),a=s+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(E[o+i]);t=c.join("")}return ve(r),t},toWireType:function(r,t){var n;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||Rr("Cannot pass non-string to std::string"),n=e&&o?$(t):t.length;var a=me(4+n+1),i=a+4;if(C[a>>2]=n,e&&o)O(t,i,n+1);else if(o)for(var s=0;s<n;++s){var u=t.charCodeAt(s);u>255&&(ve(i),Rr("String has UTF-16 code units that do not fit in 8 bits")),E[i+s]=u}else for(s=0;s<n;++s)E[i+s]=t[s];return null!==r&&r.push(ve,a),a},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:function(r){ve(r)}})},_:function(r,t,e){var n,o,a,i,s;e=xr(e),2===t?(n=Nt,o=Lt,i=Ht,a=()=>T,s=1):4===t&&(n=Ut,o=Vt,i=Yt,a=()=>C,s=2),zr(r,{name:e,fromWireType:function(r){for(var e,o=C[r>>2],i=a(),u=r+4,c=0;c<=o;++c){var l=r+4+c*t;if(c==o||0==i[l>>s]){var f=n(u,l-u);void 0===e?e=f:(e+=String.fromCharCode(0),e+=f),u=l+t}}return ve(r),e},toWireType:function(r,n){"string"!=typeof n&&Rr("Cannot pass non-string to C++ string type "+e);var a=i(n),u=me(4+a+t);return C[u>>2]=a>>s,o(n,u+4,a+t),null!==r&&r.push(ve,u),u},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:function(r){ve(r)}})},_a:function(r,t,e,n,o,a){_r[r]={name:xr(t),rawConstructor:bt(e,n),rawDestructor:bt(o,a),elements:[]}},Za:function(r,t,e,n,o,a,i,s,u){_r[r].elements.push({getterReturnType:t,getter:bt(e,n),getterContext:o,setterArgumentType:a,setter:bt(i,s),setterContext:u})},da:function(r,t,e,n,o,a){Mr[r]={name:xr(t),rawConstructor:bt(e,n),rawDestructor:bt(o,a),fields:[]}},X:function(r,t,e,n,o,a,i,s,u,c){Mr[r].fields.push({fieldName:xr(t),getterReturnType:e,getter:bt(n,o),getterContext:a,setterArgumentType:i,setter:bt(s,u),setterContext:c})},Ea:function(r,t){zr(r,{isVoid:!0,name:t=xr(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(r,t){}})},va:function(){return!0},pb:function(){throw 1/0},Ra:function(r,t,e,n,o){return(r=Gt[r])(t=$t.toValue(t),e=Kt(e),function(r){var t=[];return C[r>>2]=$t.toHandle(t),t}(n),o)},S:jt,Ta:function(r){return 0===r?$t.toHandle(Jt()):(r=Kt(r),$t.toHandle(Jt()[r]))},Sa:function(r,t){var e=function(r,t){for(var e=new Array(r),n=0;n<r;++n)e[n]=Wt(C[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=Xt[o];if(void 0!==a)return a;for(var i=["retType"],s=[n],u="",c=0;c<r-1;++c)u+=(0!==c?", ":"")+"arg"+c,i.push("argType"+c),s.push(e[1+c]);var l="return function "+Cr("methodCaller_"+o)+"(handle, name, destructors, args) {\n",f=0;for(c=0;c<r-1;++c)l+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=e[c+1].argPackAdvance;for(l+=" var rv = handle[name]("+u+");\n",c=0;c<r-1;++c)e[c+1].deleteObject&&(l+=" argType"+c+".deleteObject(arg"+c+");\n");n.isVoid||(l+=" return retType.toWireType(destructors, rv);\n"),l+="};\n",i.push(l);var d,h,p=Ct(Function,i).apply(null,s);return d=p,h=Gt.length,Gt.push(d),a=h,Xt[o]=a,a},O:function(r){r>4&&(At[r].refcount+=1)},Qa:function(r){br($t.toValue(r)),jt(r)},Pa:function(r,t){var e=(r=Wt(r,"_emval_take_value")).readValueFromPointer(t);return $t.toHandle(e)},wa:function(r,t){var e,n=new Date(1e3*(C[(e=r)>>2]+4294967296*P[e+4>>2]));P[t>>2]=n.getSeconds(),P[t+4>>2]=n.getMinutes(),P[t+8>>2]=n.getHours(),P[t+12>>2]=n.getDate(),P[t+16>>2]=n.getMonth(),P[t+20>>2]=n.getFullYear()-1900,P[t+24>>2]=n.getDay();var o=new Date(n.getFullYear(),0,1),a=(n.getTime()-o.getTime())/864e5|0;P[t+28>>2]=a,P[t+36>>2]=-60*n.getTimezoneOffset();var i=new Date(n.getFullYear(),6,1).getTimezoneOffset(),s=o.getTimezoneOffset(),u=0|(i!=s&&n.getTimezoneOffset()==Math.min(s,i));P[t+32>>2]=u},xa:function r(t,e,n){r.called||(r.called=!0,function(r,t,e){var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),u=Math.max(i,s);function c(r){var t=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}P[r>>2]=60*u,P[t>>2]=Number(i!=s);var l=c(o),f=c(a),d=Qt(l),h=Qt(f);s<i?(C[e>>2]=d,C[e+4>>2]=h):(C[e>>2]=h,C[e+4>>2]=d)}(t,e,n))},i:function(){G("")},Ua:function(r,t,e){var n=function(r,t){var e;for(re.length=0,t>>=2;e=E[r++];)t+=105!=e&t,re.push(105==e?P[t]:D[t++>>1]),++t;return re}(t,e);return Q[r].apply(null,n)},P:function(){return Date.now()},rb:function(){return 2147483648},Y:Zt,ya:function(r,t,e){E.copyWithin(r,t,t+e)},qb:function(r){var t,e,n=E.length,o=2147483648;if((r>>>=0)>o)return!1;for(var a=1;a<=4;a*=2){var i=n*(1+.2/a);if(i=Math.min(i,r+100663296),te(Math.min(o,(t=Math.max(r,i))+((e=65536)-t%e)%e)))return!0}return!1},vb:function(r,t){var e=0;return ne().forEach((function(n,o){var a=t+e;C[r+4*o>>2]=a,function(r,t,e){for(var n=0;n<r.length;++n)b[t++>>0]=r.charCodeAt(n);e||(b[t>>0]=0)}(n,a),e+=n.length+1})),0},wb:function(r,t){var e=ne();C[r>>2]=e.length;var n=0;return e.forEach((function(r){n+=r.length+1})),C[t>>2]=n,0},ga:ae,Z:function(r){try{var t=gr.getStreamFromFD(r);return yr.close(t),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}},ra:function(r,t,e,n){try{var o=function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=C[t>>2],s=C[t+4>>2];t+=8;var u=yr.read(r,b,i,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(gr.getStreamFromFD(r),t,e);return C[n>>2]=o,0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}},fb:function(r,t,e,n,o){try{var a=(u=e)+2097152>>>0<4194305-!!(s=t)?(s>>>0)+4294967296*u:NaN;if(isNaN(a))return 61;var i=gr.getStreamFromFD(r);return yr.llseek(i,a,n),I=[i.position>>>0,(B=i.position,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],P[o>>2]=I[0],P[o+4>>2]=I[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}var s,u},sa:function(r,t,e,n){try{var o=function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=C[t>>2],s=C[t+4>>2];t+=8;var u=yr.write(r,b,i,s,n);if(u<0)return-1;o+=u}return o}(gr.getStreamFromFD(r),t,e);return C[n>>2]=o,0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}},Xa:function(){return Qt(location.toString())},Va:function(){return Qt((r=Oe,self[r(197,"c3k$")][r(185,"P6uo")]()));var r},ca:function(r,t,e){var n=Ee();try{return sr(r)(t,e)}catch(r){if(ke(n),r!==r+0)throw r;be(1,0)}},J:function(r,t,e,n,o,a){var i=Ee();try{return sr(r)(t,e,n,o,a)}catch(r){if(ke(i),r!==r+0)throw r;be(1,0)}},M:function(r,t,e,n){var o=Ee();try{return sr(r)(t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},ba:function(r,t,e,n,o){var a=Ee();try{return sr(r)(t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},T:function(r,t){var e=Ee();try{return sr(r)(t)}catch(r){if(ke(e),r!==r+0)throw r;be(1,0)}},na:function(r,t,e,n){var o=Ee();try{return sr(r)(t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},s:function(r){var t=Ee();try{return sr(r)()}catch(r){if(ke(t),r!==r+0)throw r;be(1,0)}},e:function(r,t){var e=Ee();try{return sr(r)(t)}catch(r){if(ke(e),r!==r+0)throw r;be(1,0)}},Na:function(r,t,e){var n=Ee();try{return sr(r)(t,e)}catch(r){if(ke(n),r!==r+0)throw r;be(1,0)}},c:function(r,t,e){var n=Ee();try{return sr(r)(t,e)}catch(r){if(ke(n),r!==r+0)throw r;be(1,0)}},k:function(r,t,e,n){var o=Ee();try{return sr(r)(t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},R:function(r,t,e,n,o){var a=Ee();try{return sr(r)(t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},l:function(r,t,e,n,o){var a=Ee();try{return sr(r)(t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},lb:function(r,t,e,n,o,a){var i=Ee();try{return sr(r)(t,e,n,o,a)}catch(r){if(ke(i),r!==r+0)throw r;be(1,0)}},La:function(r,t,e,n,o,a,i){var s=Ee();try{return sr(r)(t,e,n,o,a,i)}catch(r){if(ke(s),r!==r+0)throw r;be(1,0)}},u:function(r,t,e,n,o,a){var i=Ee();try{return sr(r)(t,e,n,o,a)}catch(r){if(ke(i),r!==r+0)throw r;be(1,0)}},A:function(r,t,e,n,o,a,i){var s=Ee();try{return sr(r)(t,e,n,o,a,i)}catch(r){if(ke(s),r!==r+0)throw r;be(1,0)}},oa:function(r,t,e,n,o,a,i,s){var u=Ee();try{return sr(r)(t,e,n,o,a,i,s)}catch(r){if(ke(u),r!==r+0)throw r;be(1,0)}},Fa:function(r,t,e,n,o,a,i,s,u,c){var l=Ee();try{return sr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(ke(l),r!==r+0)throw r;be(1,0)}},W:function(r,t,e,n,o,a,i,s,u,c,l,f){var d=Ee();try{return sr(r)(t,e,n,o,a,i,s,u,c,l,f)}catch(r){if(ke(d),r!==r+0)throw r;be(1,0)}},ib:function(r,t,e,n){var o=Ee();try{return De(r,t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},eb:function(r){var t=Ee();try{return Fe(r)}catch(r){if(ke(t),r!==r+0)throw r;be(1,0)}},jb:function(r,t){var e=Ee();try{return Ce(r,t)}catch(r){if(ke(e),r!==r+0)throw r;be(1,0)}},db:function(r,t,e){var n=Ee();try{return Ae(r,t,e)}catch(r){if(ke(n),r!==r+0)throw r;be(1,0)}},cb:function(r,t,e,n,o){var a=Ee();try{return je(r,t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},m:function(r){var t=Ee();try{sr(r)()}catch(r){if(ke(t),r!==r+0)throw r;be(1,0)}},h:function(r,t){var e=Ee();try{sr(r)(t)}catch(r){if(ke(e),r!==r+0)throw r;be(1,0)}},U:function(r,t,e){var n=Ee();try{sr(r)(t,e)}catch(r){if(ke(n),r!==r+0)throw r;be(1,0)}},ia:function(r,t,e,n){var o=Ee();try{sr(r)(t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},L:function(r,t,e,n,o,a,i,s){var u=Ee();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(ke(u),r!==r+0)throw r;be(1,0)}},Ja:function(r,t,e){var n=Ee();try{sr(r)(t,e)}catch(r){if(ke(n),r!==r+0)throw r;be(1,0)}},b:function(r,t,e){var n=Ee();try{sr(r)(t,e)}catch(r){if(ke(n),r!==r+0)throw r;be(1,0)}},Q:function(r,t,e,n){var o=Ee();try{sr(r)(t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},aa:function(r,t,e,n,o){var a=Ee();try{sr(r)(t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},Ka:function(r,t,e,n,o,a,i){var s=Ee();try{sr(r)(t,e,n,o,a,i)}catch(r){if(ke(s),r!==r+0)throw r;be(1,0)}},$:function(r,t,e,n,o,a,i,s){var u=Ee();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(ke(u),r!==r+0)throw r;be(1,0)}},Ma:function(r,t,e,n,o){var a=Ee();try{sr(r)(t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},Ga:function(r,t,e,n,o,a,i,s){var u=Ee();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(ke(u),r!==r+0)throw r;be(1,0)}},Ha:function(r,t,e,n){var o=Ee();try{sr(r)(t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},ja:function(r,t,e,n,o){var a=Ee();try{sr(r)(t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},ka:function(r,t,e,n,o,a){var i=Ee();try{sr(r)(t,e,n,o,a)}catch(r){if(ke(i),r!==r+0)throw r;be(1,0)}},g:function(r,t,e,n){var o=Ee();try{sr(r)(t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},N:function(r,t,e,n,o,a){var i=Ee();try{sr(r)(t,e,n,o,a)}catch(r){if(ke(i),r!==r+0)throw r;be(1,0)}},v:function(r,t,e,n,o,a,i){var s=Ee();try{sr(r)(t,e,n,o,a,i)}catch(r){if(ke(s),r!==r+0)throw r;be(1,0)}},j:function(r,t,e,n,o){var a=Ee();try{sr(r)(t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},o:function(r,t,e,n,o,a){var i=Ee();try{sr(r)(t,e,n,o,a)}catch(r){if(ke(i),r!==r+0)throw r;be(1,0)}},ha:function(r,t,e,n,o,a,i,s,u){var c=Ee();try{sr(r)(t,e,n,o,a,i,s,u)}catch(r){if(ke(c),r!==r+0)throw r;be(1,0)}},Ia:function(r,t,e,n,o,a,i){var s=Ee();try{sr(r)(t,e,n,o,a,i)}catch(r){if(ke(s),r!==r+0)throw r;be(1,0)}},C:function(r,t,e,n,o,a,i){var s=Ee();try{sr(r)(t,e,n,o,a,i)}catch(r){if(ke(s),r!==r+0)throw r;be(1,0)}},la:function(r,t,e,n,o,a,i,s,u,c){var l=Ee();try{sr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(ke(l),r!==r+0)throw r;be(1,0)}},x:function(r,t,e,n,o,a,i,s){var u=Ee();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(ke(u),r!==r+0)throw r;be(1,0)}},H:function(r,t,e,n,o,a,i,s,u){var c=Ee();try{sr(r)(t,e,n,o,a,i,s,u)}catch(r){if(ke(c),r!==r+0)throw r;be(1,0)}},D:function(r,t,e,n,o,a,i,s,u,c){var l=Ee();try{sr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(ke(l),r!==r+0)throw r;be(1,0)}},B:function(r,t,e,n,o,a,i,s,u,c,l){var f=Ee();try{sr(r)(t,e,n,o,a,i,s,u,c,l)}catch(r){if(ke(f),r!==r+0)throw r;be(1,0)}},V:function(r,t,e,n,o,a,i,s,u,c,l,f,d,h,p,m){var v=Ee();try{sr(r)(t,e,n,o,a,i,s,u,c,l,f,d,h,p,m)}catch(r){if(ke(v),r!==r+0)throw r;be(1,0)}},hb:function(r,t,e,n){var o=Ee();try{Se(r,t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},I:function(r){return r},Oa:ce,kb:function(r,t,e,n,o){return ce(r,t,e,n)}},me=(function(){var r={a:pe};function t(r,t){var e,n=r.exports;o.asm=n,x((v=o.asm.Bb).buffer),W=o.asm.Eb,e=o.asm.Cb,L.unshift(e),K()}function n(r){t(r.instance)}function a(t){return(h||"function"!=typeof fetch?Promise.resolve().then((function(){return X(R)})):fetch(R,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+R+"'";return r.arrayBuffer()})).catch((function(){return X(R)}))).then((function(t){return WebAssembly.instantiate(t,r)})).then((function(r){return r})).then(t,(function(r){m("failed to asynchronously prepare wasm: "+r),G(r)}))}if(q(),o.instantiateWasm)try{return o.instantiateWasm(r,t)}catch(r){m("Module.instantiateWasm callback failed with error: "+r),e(r)}(h||"function"!=typeof WebAssembly.instantiateStreaming||J(R)||"function"!=typeof fetch?a(n):fetch(R,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(n,(function(r){return m("wasm streaming compile failed: "+r),m("falling back to ArrayBuffer instantiation"),a(n)}))}))).catch(e)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.Cb).apply(null,arguments)},o._malloc=function(){return(me=o._malloc=o.asm.Db).apply(null,arguments)}),ve=o._free=function(){return(ve=o._free=o.asm.Fb).apply(null,arguments)},ye=o.___errno_location=function(){return(ye=o.___errno_location=o.asm.Gb).apply(null,arguments)},ge=o.setTempRet0=function(){return(ge=o.setTempRet0=o.asm.Hb).apply(null,arguments)},we=o.___getTypeName=function(){return(we=o.___getTypeName=o.asm.Ib).apply(null,arguments)},_e=(o.__embind_initialize_bindings=function(){return(o.__embind_initialize_bindings=o.asm.Jb).apply(null,arguments)},o._emscripten_builtin_memalign=function(){return(_e=o._emscripten_builtin_memalign=o.asm.Kb).apply(null,arguments)}),be=o._setThrew=function(){return(be=o._setThrew=o.asm.Lb).apply(null,arguments)},Ee=o.stackSave=function(){return(Ee=o.stackSave=o.asm.Mb).apply(null,arguments)},ke=o.stackRestore=function(){return(ke=o.stackRestore=o.asm.Nb).apply(null,arguments)},Te=o.___cxa_can_catch=function(){return(Te=o.___cxa_can_catch=o.asm.Ob).apply(null,arguments)},Pe=o.___cxa_is_pointer_type=function(){return(Pe=o.___cxa_is_pointer_type=o.asm.Pb).apply(null,arguments)},Ce=o.dynCall_ji=function(){return(Ce=o.dynCall_ji=o.asm.Qb).apply(null,arguments)},Se=o.dynCall_vij=function(){return(Se=o.dynCall_vij=o.asm.Rb).apply(null,arguments)},De=o.dynCall_iij=function(){return(De=o.dynCall_iij=o.asm.Sb).apply(null,arguments)},Fe=(o.dynCall_iiiijj=function(){return(o.dynCall_iiiijj=o.asm.Tb).apply(null,arguments)},o.dynCall_viijj=function(){return(o.dynCall_viijj=o.asm.Ub).apply(null,arguments)},o.dynCall_viiijjjj=function(){return(o.dynCall_viiijjjj=o.asm.Vb).apply(null,arguments)},o.dynCall_jjj=function(){return(o.dynCall_jjj=o.asm.Wb).apply(null,arguments)},o.dynCall_jiji=function(){return(o.dynCall_jiji=o.asm.Xb).apply(null,arguments)},o.dynCall_j=function(){return(Fe=o.dynCall_j=o.asm.Yb).apply(null,arguments)}),Ae=o.dynCall_jii=function(){return(Ae=o.dynCall_jii=o.asm.Zb).apply(null,arguments)},je=(o.dynCall_viijii=function(){return(o.dynCall_viijii=o.asm._b).apply(null,arguments)},o.dynCall_jiiii=function(){return(je=o.dynCall_jiiii=o.asm.$b).apply(null,arguments)});function Me(r){function e(){he||(he=!0,o.calledRun=!0,g||(o.noFSInit||yr.init.initialized||yr.init(),yr.ignorePermissions=!1,pr.init(),rr(L),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),H.unshift(r);var r;rr(H)}()))}r=r||c,U>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),N.unshift(r);var r;rr(N)}(),U>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.dynCall_iiiiij=function(){return(o.dynCall_iiiiij=o.asm.ac).apply(null,arguments)},o.dynCall_iiiiijj=function(){return(o.dynCall_iiiiijj=o.asm.bc).apply(null,arguments)},o.dynCall_iiiiiijj=function(){return(o.dynCall_iiiiiijj=o.asm.cc).apply(null,arguments)},o.___start_em_js=835124,o.___stop_em_js=835232,o.UTF8ToString=j,o.stringToUTF8=O,o.lengthBytesUTF8=$,o.allocateUTF8=Qt,Y=function r(){he||Me(),he||(Y=r)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Oe(r,t){var e=$e();return Oe=function(t,n){var o=e[t-=177];if(void 0===Oe.SYojJS){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};Oe.GsHvyl=i,r=arguments,Oe.SYojJS=!0}var s=e[0],u=t+s,c=r[u];return c?o=c:(void 0===Oe.TYjnpH&&(Oe.TYjnpH=!0),o=Oe.GsHvyl(o,n),r[u]=o),o},Oe(r,t)}function $e(){var r=["W4ldMSk8W7ZcHCoKea","WOW8bmk+W7ZdQ8k2o2f+hJNdGq","bHiuWOjODSkdWOJcKq","W4FcPmoBWR7dGCkYnmoWWO7dRmoqWOS","WPBdL8oHW4tcTYhdHCkiW5lcRtKsfW","kCk9ic/cH0mBEY/cQ8oahHa","iLVdR0ldKmkJW7/cHmkQA8k2","Amk5WQ8TW4uKgCoVBt7dJIdcOc0","WRtdI8kbvmoBWQzgAmoS","uINdIbWUtbvUW5LAWPqQ","W5HvWOhcV8o6hgu","W5FdVtrKW6P0WRXX","W5KIW5/dQmktDeJcJ2OKdCoG","zfRcQuFcPmkaW4xcNYJdI8o2W64","hmorW7nqWPyxDmozWRBcQutdSSkxfW","WPuLW4pcO8oPe8kQ","W6xcL8oHzsBcNCoH","CCorga5LW59joq","ASo0WPKmW6H3nvLnBa0","W4FcRmobWOVcL8ouW5tdVZOCzCoCWRq","W6JdO1XYtCoLfKJcS8kjaSk2","FxpdMSklFhmTWRjs","WPNcSYNcVCktWR3cNCoB","lmk6icVcGunpFdpcQCoMiW","Bmk+WQPnWOv7ESk4ua","W7lcLmoLumoKWPz+rG"];return($e=function(){return r})()}Me(),function(r,t){for(var e=Oe,n=r();;)try{if(755535==-parseInt(e(186,"j*qD"))/1*(parseInt(e(199,")kz&"))/2)+parseInt(e(188,"ocKs"))/3*(-parseInt(e(192,"3mhM"))/4)+-parseInt(e(195,"Wi8p"))/5*(-parseInt(e(201,"^zMy"))/6)+-parseInt(e(179,"iwws"))/7+parseInt(e(187,"K6Ge"))/8+parseInt(e(183,"0]Fi"))/9*(-parseInt(e(181,"D*IB"))/10)+parseInt(e(182,"FD!@"))/11*(parseInt(e(200,"co&M"))/12))break;n.push(n.shift())}catch(r){n.push(n.shift())}}($e);var ighnua,xe=(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}),We=xe(this,(function(){var r=function(){return!r.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(We)};return r()}));return We(),r.ready});r.exports=o}]);
1
+ !function(r){var t={};function e(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=r,e.c=t,e.d=function(r,t,n){e.o(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:n})},e.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},e.t=function(r,t){if(1&t&&(r=e(r)),8&t)return r;if(4&t&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&t&&"string"!=typeof r)for(var o in r)e.d(n,o,function(t){return r[t]}.bind(null,o));return n},e.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(t,"a",t),t},e.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},e.p="",e(e.s=0)}([function(r,t,e){"use strict";var n=e(1);let o;const a="/tessdata",i={};function s(r){const t=Math.random().toString(36);return i[t]=r,t}function u(r){if(!i.hasOwnProperty(r))throw new Error(`Object ${r} does not exist`);return i[r]}function c(r){const t=u(r);t.delete&&t.delete(),delete i[r]}function l(r,t){for(let e in t){if(r===t[e])return e}}function f(r){if(!(r instanceof Array))throw new Error('languages must be an array of valid language codes, e.g. ["eng", "deu"]');return o.FS.analyzePath(a).exists||o.FS.mkdir(a),r.forEach((function(r){if(!o.FS.analyzePath("/tessdata/"+r+".traineddata").exists){let t=o.locateFile(`tessdata/${r}.traineddata`);o.FS.createLazyFile(a,r+".traineddata",t,!0,!1)}})),r.join("+")}const d={initialize:async function(r,t,n,a){const i=e(2),s={locateFile:function(r,e){let n;return n=t?function(r){return r.startsWith("http:")||r.startsWith("https:")}(t)?t:"":a,n+r}};return await i(s),o=s,o.initialize(r||"",n)},getLicenseInfo:function(){return o.getLicenseInfo()},applyFilter:function(r,t){return m(o.applyFilter(g(r),t),p)},rotateImageCcw:function(r,t){return m(o.rotateImageCcw(g(r),t),p)},cropAndRotateImageCcw:function(r,t,e){const n=function(r){const t=[];for(let e=0;e<r.length;++e)t.push(r[e].x,r[e].y);return t}(t);return m(o.cropAndRotateImageCcw(g(r),n,e),p)},detectDocument:async function(r,t,e){return await h(o.detectDocument(g(r),t,e))},detectDocumentOnImage:async function(r,t,e){return await d.detectDocument(r,t,e)},detectAndCropDocument:async function(r){return await h(o.detectAndCropDocument(g(r)))},createBarcodeRecognizer:async function(r){return s(new o.BarcodeRecognizer(r||{}))},recognizeBarcodes:async function(r,t,e){let n,a=!1;"string"==typeof r?n=u(r):(e=t,t=r,n=new o.BarcodeRecognizer(e),a=!0);try{const r=n.recognize(g(t),e||{});if(!r)return null;let i;return r.length?(i=r.map((r=>({format:l(r.format,o.BarcodeFormat),text:r.text,parsedText:r.parsedText,rawBytes:r.rawBytes.data.slice(),quad:r.quad,barcodeImage:p(r.barcodeImage)}))),r.forEach((r=>r.delete()))):i=[],{result:i,originalImage:t}}finally{a&&n.delete()}},beginPdf:async function(r){return s(new o.PdfGenerationContext(r||{}))},addPageToPdf:async function(r,t){m(u(r).addPage(t))},completePdf:async function(r){const t=m(u(r).complete(),p);return c(r),t},beginTiff:async function(r){const t=new o.TiffGenerationContext(r||{});return m(t.begin()),s(t)},addPageToTiff:async function(r,t){return m(u(r).addPage(g(t)))},completeTiff:async function(r){try{const t=u(r).complete();return m(t,p)}finally{c(r)}},createMRZRecognizer:async function(){return s(new o.MrzRecognizerContext)},recognizeMRZ:async function(r,t){return u(r).recognize(g(t))},createBlurDetector:function(){return s(new o.BlurDetectorContext)},estimateBlurriness:function(r,t){return m(u(r).estimateBlurriness(g(t)))},estimateBlurrinessOnBuffer:function(r,t){return d.estimateBlurriness(r,t)},releaseObject:async function(r){c(r)},createOcrEngine:async function(r){const t=f(r);return s(new o.TesseractOcrContext(a,t))},performOcr:async function(r,t){return u(r).performOcr(g(t))},createGenericTextLineScanner:async function(r){r.languages||(r.languages=["eng"]),r.languages=f(r.languages),r.tessdataPath=a;return s(new o.GenericTextLineScanner(r))},recognizeTextLine:async function(r,t){return u(r).recognize(g(t))},cleanTextLineRecognitionQueue:async function(r){u(r).cleanRecognitionQueue()}};async function h(r){if(!r)return{success:!1,detectionStatus:"Error_License"};const t=(e=r.detectionResult,w[e]?w[e]:e>=200?"Error_Unknown":"OK");var e;const n={detectionStatus:t,success:v(t)};return n.original=p(r.originalImageJpegData),n.success&&(n.cropped=p(r.croppedImageJpegData),n.polygon=function(r){if(r.length%2!=0)throw Error("pointCoords size is not even.");const t=[];for(let e=0;e<r.length;e+=2)t.push({x:r[e],y:r[e+1]});return t}(r.polygon.data),n.horizontalLines=y(r.horizontalLines.data),n.verticalLines=y(r.verticalLines.data)),r.delete(),n}function p(r){return r&&r.data&&r.data.slice()}function m(r,t){try{if(r.errorMessage){throw new Error(r.errorMessage)}return(t||(r=>r))(r.result)}finally{r.delete()}}function v(r){return"OK"===r.substr(0,2)}function y(r){const t=[];if(!r)return t;if(r.length%4!=0)throw Error("lineCoords size invalid.");for(let e=0;e<r.length;e+=4)t.push({p1:{x:r[e],y:r[e+1]},p2:{x:r[e+2],y:r[e+3]}});return t}function g(r){if(!r)throw new Error("null image data or buffer");return"number"==typeof r.width?r:{data:r,width:-1,height:-1}}const w={0:"NotAcquired",100:"OK",101:"OK_SmallSize",102:"OK_BadAngles",103:"OK_BadAspectRatio",104:"OK_OffCenter",200:"Error_NothingDetected",201:"Error_Brightness",202:"Error_Noise"};onmessage=function(r){const{command:t,args:e,ticket:a}=r.data;o||"initialize"===t?(async()=>await d[t].apply(null,e))().then((r=>{const t=(0,n.gatherTransferables)(r);self.postMessage({ticket:a,result:r},t)})).catch((r=>{const t="number"==typeof r?Error(o.stringFromException(r)):r;console.error(t),self.postMessage({ticket:a,error:t})})):self.postMessage({ticket:a,error:"WASM module not loaded yet."})}},function(r,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gatherTransferables=function(r,t){const e=[];return function r(n){if(!n)return;if(n.constructor===ImageData){const r={data:n.data.slice(),width:n.width,height:n.height};return e.push(r.data.buffer),r}if(n.constructor===ArrayBuffer){const r=t?n.slice(0):n;if(e.push(r),t)return n}else if(ArrayBuffer.isView(n)){let r;if(t){r=new(0,n.constructor)(n.buffer.slice(0))}else r=n;if(e.push(r.buffer),t)return n}else if(Array.isArray(n))for(let t=0;t<n.length;++t){const e=r(n[t]);e&&(n[t]=e)}else if(n.constructor===Object)for(const t in n)if(n.hasOwnProperty(t)){const e=r(n[t]);e&&(n[t]=e)}}(r),e}},function(r,t,e){"use strict";var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(r){var t,e,o=void 0!==(r=r||{})?r:{};o.ready=new Promise((function(r,n){t=r,e=n}));var a,i,s,u=Object.assign({},o),c=[],l="./this.program",f=(r,t)=>{throw t},d="";d=self.location.href,n&&(d=n),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.send(null),t.responseText},s=r=>{var t=new XMLHttpRequest;return t.open("GET",r,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)},i=(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 h,p=o.print||console.log.bind(console),m=o.printErr||console.warn.bind(console);Object.assign(o,u),u=null,o.arguments&&(c=o.arguments),o.thisProgram&&(l=o.thisProgram),o.quit&&(f=o.quit),o.wasmBinary&&(h=o.wasmBinary);var v,y=o.noExitRuntime||!0;"object"!=typeof WebAssembly&&K("no native wasm support detected");var g=!1;function w(r,t){r||K(t)}var _,b,E,k,T,C,P,S,D,F="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function A(r,t,e){for(var n=t+e,o=t;r[o]&&!(o>=n);)++o;if(o-t>16&&r.buffer&&F)return F.decode(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}function j(r,t){return r?A(E,r,t):""}function M(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)),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 O(r,t,e){return M(r,E,t,e)}function $(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}function x(r){_=r,o.HEAP8=b=new Int8Array(r),o.HEAP16=k=new Int16Array(r),o.HEAP32=C=new Int32Array(r),o.HEAPU8=E=new Uint8Array(r),o.HEAPU16=T=new Uint16Array(r),o.HEAPU32=P=new Uint32Array(r),o.HEAPF32=S=new Float32Array(r),o.HEAPF64=D=new Float64Array(r)}o.INITIAL_MEMORY;var W,R,z,B,I,N=[],L=[],U=[],H=0,V=null,q=null;function Y(r){H++,o.monitorRunDependencies&&o.monitorRunDependencies(H)}function G(r){if(H--,o.monitorRunDependencies&&o.monitorRunDependencies(H),0==H&&(null!==V&&(clearInterval(V),V=null),q)){var t=q;q=null,t()}}function K(r){o.onAbort&&o.onAbort(r),m(r="Aborted("+r+")"),g=!0,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw e(t),t}function Z(r){return r.startsWith("data:application/octet-stream;base64,")}function Q(r){try{if(r==R&&h)return new Uint8Array(h);if(s)return s(r);throw"both async and sync fetching of the wasm failed"}catch(r){K(r)}}Z(R="ScanbotSDK.Asm.wasm")||(z=R,R=o.locateFile?o.locateFile(z,d):d+z);var X={833920:r=>Xt(function(){return this[j(r)].toString()}.apply((0,eval)("(()=>this)()")))};function J(r){this.name="ExitStatus",this.message="Program terminated with exit("+r+")",this.status=r}function rr(r){for(;r.length>0;)r.shift()(o)}var tr=[];function er(r){r.add_ref()}var nr=0;function or(r){this.excPtr=r,this.ptr=r-24,this.set_type=function(r){P[this.ptr+4>>2]=r},this.get_type=function(){return P[this.ptr+4>>2]},this.set_destructor=function(r){P[this.ptr+8>>2]=r},this.get_destructor=function(){return P[this.ptr+8>>2]},this.set_refcount=function(r){C[this.ptr>>2]=r},this.set_caught=function(r){r=r?1:0,b[this.ptr+12>>0]=r},this.get_caught=function(){return 0!=b[this.ptr+12>>0]},this.set_rethrown=function(r){r=r?1:0,b[this.ptr+13>>0]=r},this.get_rethrown=function(){return 0!=b[this.ptr+13>>0]},this.init=function(r,t){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var r=C[this.ptr>>2];C[this.ptr>>2]=r+1},this.release_ref=function(){var r=C[this.ptr>>2];return C[this.ptr>>2]=r-1,1===r},this.set_adjusted_ptr=function(r){P[this.ptr+16>>2]=r},this.get_adjusted_ptr=function(){return P[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Ce(this.get_type()))return P[this.excPtr>>2];var r=this.get_adjusted_ptr();return 0!==r?r:this.excPtr}}function ar(r){return ve(new or(r).ptr)}var ir=[];function sr(r){var t=ir[r];return t||(r>=ir.length&&(ir.length=r+1),ir[r]=t=W.get(r)),t}function ur(r){if(r.release_ref()&&!r.get_rethrown()){var t=r.get_destructor();t&&sr(t)(r.excPtr),ar(r.excPtr)}}var cr=0;function lr(){var r=tr.pop();r||K("no exception to throw");var t=r.excPtr;throw r.get_rethrown()||(tr.push(r),r.set_rethrown(!0),r.set_caught(!1),nr++),cr=t,t}var 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={resolve:function(){for(var r="",t=!1,e=arguments.length-1;e>=-1&&!t;e--){var n=e>=0?arguments[e]:yr.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=dr.resolve(r).substr(1),t=dr.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("/")}};function hr(r,t,e){var n=e>0?e:$(r)+1,o=new Array(n),a=M(r,o,0,o.length);return t&&(o.length=a),o}var pr={ttys:[],init:function(){},shutdown:function(){},register:function(r,t){pr.ttys[r]={input:[],output:[],ops:t},yr.registerDevice(r,pr.stream_ops)},stream_ops:{open:function(r){var t=pr.ttys[r.node.rdev];if(!t)throw new yr.ErrnoError(43);r.tty=t,r.seekable=!1},close:function(r){r.tty.ops.fsync(r.tty)},fsync:function(r){r.tty.ops.fsync(r.tty)},read:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.get_char)throw new yr.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 yr.ErrnoError(29)}if(void 0===s&&0===a)throw new yr.ErrnoError(6);if(null==s)break;a++,t[e+i]=s}return a&&(r.node.timestamp=Date.now()),a},write:function(r,t,e,n,o){if(!r.tty||!r.tty.ops.put_char)throw new yr.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,t[e+a])}catch(r){throw new yr.ErrnoError(29)}return n&&(r.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:function(r){if(!r.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;r.input=hr(t,!0)}return r.input.shift()},put_char:function(r,t){null===t||10===t?(p(A(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},fsync:function(r){r.output&&r.output.length>0&&(p(A(r.output,0)),r.output=[])}},default_tty1_ops:{put_char:function(r,t){null===t||10===t?(m(A(r.output,0)),r.output=[]):0!=t&&r.output.push(t)},fsync:function(r){r.output&&r.output.length>0&&(m(A(r.output,0)),r.output=[])}}};function mr(r){r=function(r,t){return Math.ceil(r/t)*t}(r,65536);var t=_e(65536,r);return t?function(r,t){return E.fill(0,r,r+t),r}(t,r):0}var vr={ops_table:null,mount:function(r){return vr.createNode(null,"/",16895,0)},createNode:function(r,t,e,n){if(yr.isBlkdev(e)||yr.isFIFO(e))throw new yr.ErrnoError(63);vr.ops_table||(vr.ops_table={dir:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr,lookup:vr.node_ops.lookup,mknod:vr.node_ops.mknod,rename:vr.node_ops.rename,unlink:vr.node_ops.unlink,rmdir:vr.node_ops.rmdir,readdir:vr.node_ops.readdir,symlink:vr.node_ops.symlink},stream:{llseek:vr.stream_ops.llseek}},file:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr},stream:{llseek:vr.stream_ops.llseek,read:vr.stream_ops.read,write:vr.stream_ops.write,allocate:vr.stream_ops.allocate,mmap:vr.stream_ops.mmap,msync:vr.stream_ops.msync}},link:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr,readlink:vr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:vr.node_ops.getattr,setattr:vr.node_ops.setattr},stream:yr.chrdev_stream_ops}});var o=yr.createNode(r,t,e,n);return yr.isDir(o.mode)?(o.node_ops=vr.ops_table.dir.node,o.stream_ops=vr.ops_table.dir.stream,o.contents={}):yr.isFile(o.mode)?(o.node_ops=vr.ops_table.file.node,o.stream_ops=vr.ops_table.file.stream,o.usedBytes=0,o.contents=null):yr.isLink(o.mode)?(o.node_ops=vr.ops_table.link.node,o.stream_ops=vr.ops_table.link.stream):yr.isChrdev(o.mode)&&(o.node_ops=vr.ops_table.chrdev.node,o.stream_ops=vr.ops_table.chrdev.stream),o.timestamp=Date.now(),r&&(r.contents[t]=o,r.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(r){return r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0)},expandFileStorage:function(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:function(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:function(r){var t={};return t.dev=yr.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,yr.isDir(r.mode)?t.size=4096:yr.isFile(r.mode)?t.size=r.usedBytes:yr.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:function(r,t){void 0!==t.mode&&(r.mode=t.mode),void 0!==t.timestamp&&(r.timestamp=t.timestamp),void 0!==t.size&&vr.resizeFileStorage(r,t.size)},lookup:function(r,t){throw yr.genericErrors[44]},mknod:function(r,t,e,n){return vr.createNode(r,t,e,n)},rename:function(r,t,e){if(yr.isDir(r.mode)){var n;try{n=yr.lookupNode(t,e)}catch(r){}if(n)for(var o in n.contents)throw new yr.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:function(r,t){delete r.contents[t],r.timestamp=Date.now()},rmdir:function(r,t){var e=yr.lookupNode(r,t);for(var n in e.contents)throw new yr.ErrnoError(55);delete r.contents[t],r.timestamp=Date.now()},readdir:function(r){var t=[".",".."];for(var e in r.contents)r.contents.hasOwnProperty(e)&&t.push(e);return t},symlink:function(r,t,e){var n=vr.createNode(r,t,41471,0);return n.link=e,n},readlink:function(r){if(!yr.isLink(r.mode))throw new yr.ErrnoError(28);return r.link}},stream_ops:{read:function(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:function(r,t,e,n,o,a){if(t.buffer===b.buffer&&(a=!1),!n)return 0;var i=r.node;if(i.timestamp=Date.now(),t.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=t.subarray(e,e+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=t.slice(e,e+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(t.subarray(e,e+n),o),n}if(vr.expandFileStorage(i,o+n),i.contents.subarray&&t.subarray)i.contents.set(t.subarray(e,e+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=t[e+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek:function(r,t,e){var n=t;if(1===e?n+=r.position:2===e&&yr.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new yr.ErrnoError(28);return n},allocate:function(r,t,e){vr.expandFileStorage(r.node,t+e),r.node.usedBytes=Math.max(r.node.usedBytes,t+e)},mmap:function(r,t,e,n,o){if(!yr.isFile(r.node.mode))throw new yr.ErrnoError(43);var a,i,s=r.node.contents;if(2&o||s.buffer!==_){if((e>0||e+t<s.length)&&(s=s.subarray?s.subarray(e,e+t):Array.prototype.slice.call(s,e,e+t)),i=!0,!(a=mr(t)))throw new yr.ErrnoError(48);b.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:function(r,t,e,n,o){return vr.stream_ops.write(r,t,0,n,e,!1),0}}},yr={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=dr.resolve(yr.cwd(),r)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new yr.ErrnoError(32);for(var e=fr.normalizeArray(r.split("/").filter((r=>!!r)),!1),n=yr.root,o="/",a=0;a<e.length;a++){var i=a===e.length-1;if(i&&t.parent)break;if(n=yr.lookupNode(n,e[a]),o=fr.join2(o,e[a]),yr.isMountpoint(n)&&(!i||i&&t.follow_mount)&&(n=n.mounted.root),!i||t.follow)for(var s=0;yr.isLink(n.mode);){var u=yr.readlink(o);if(o=dr.resolve(fr.dirname(o),u),n=yr.lookupPath(o,{recurse_count:t.recurse_count+1}).node,s++>40)throw new yr.ErrnoError(32)}}return{path:o,node:n}},getPath:r=>{for(var t;;){if(yr.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)%yr.nameTable.length},hashAddNode:r=>{var t=yr.hashName(r.parent.id,r.name);r.name_next=yr.nameTable[t],yr.nameTable[t]=r},hashRemoveNode:r=>{var t=yr.hashName(r.parent.id,r.name);if(yr.nameTable[t]===r)yr.nameTable[t]=r.name_next;else for(var e=yr.nameTable[t];e;){if(e.name_next===r){e.name_next=r.name_next;break}e=e.name_next}},lookupNode:(r,t)=>{var e=yr.mayLookup(r);if(e)throw new yr.ErrnoError(e,r);for(var n=yr.hashName(r.id,t),o=yr.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===t)return o}return yr.lookup(r,t)},createNode:(r,t,e,n)=>{var o=new yr.FSNode(r,t,e,n);return yr.hashAddNode(o),o},destroyNode:r=>{yr.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),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:r=>{var t=yr.flagModes[r];if(void 0===t)throw new Error("Unknown file open mode: "+r);return t},flagsToPermissionString:r=>{var t=["r","w","rw"][3&r];return 512&r&&(t+="w"),t},nodePermissions:(r,t)=>yr.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=yr.nodePermissions(r,"x");return t||(r.node_ops.lookup?0:2)},mayCreate:(r,t)=>{try{return yr.lookupNode(r,t),20}catch(r){}return yr.nodePermissions(r,"wx")},mayDelete:(r,t,e)=>{var n;try{n=yr.lookupNode(r,t)}catch(r){return r.errno}var o=yr.nodePermissions(r,"wx");if(o)return o;if(e){if(!yr.isDir(n.mode))return 54;if(yr.isRoot(n)||yr.getPath(n)===yr.cwd())return 10}else if(yr.isDir(n.mode))return 31;return 0},mayOpen:(r,t)=>r?yr.isLink(r.mode)?32:yr.isDir(r.mode)&&("r"!==yr.flagsToPermissionString(t)||512&t)?31:yr.nodePermissions(r,yr.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(r=0,t=yr.MAX_OPEN_FDS)=>{for(var e=r;e<=t;e++)if(!yr.streams[e])return e;throw new yr.ErrnoError(33)},getStream:r=>yr.streams[r],createStream:(r,t,e)=>{yr.FSStream||(yr.FSStream=function(){this.shared={}},yr.FSStream.prototype={},Object.defineProperties(yr.FSStream.prototype,{object:{get:function(){return this.node},set:function(r){this.node=r}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(r){this.shared.flags=r}},position:{get:function(){return this.shared.position},set:function(r){this.shared.position=r}}})),r=Object.assign(new yr.FSStream,r);var n=yr.nextfd(t,e);return r.fd=n,yr.streams[n]=r,r},closeStream:r=>{yr.streams[r]=null},chrdev_stream_ops:{open:r=>{var t=yr.getDevice(r.node.rdev);r.stream_ops=t.stream_ops,r.stream_ops.open&&r.stream_ops.open(r)},llseek:()=>{throw new yr.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,t)=>r<<8|t,registerDevice:(r,t)=>{yr.devices[r]={stream_ops:t}},getDevice:r=>yr.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),yr.syncFSRequests++,yr.syncFSRequests>1&&m("warning: "+yr.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var e=yr.getMounts(yr.root.mount),n=0;function o(r){return yr.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&&yr.root)throw new yr.ErrnoError(10);if(!o&&!a){var i=yr.lookupPath(e,{follow_mount:!1});if(e=i.path,n=i.node,yr.isMountpoint(n))throw new yr.ErrnoError(10);if(!yr.isDir(n.mode))throw new yr.ErrnoError(54)}var s={type:r,opts:t,mountpoint:e,mounts:[]},u=r.mount(s);return u.mount=s,s.root=u,o?yr.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:r=>{var t=yr.lookupPath(r,{follow_mount:!1});if(!yr.isMountpoint(t.node))throw new yr.ErrnoError(28);var e=t.node,n=e.mounted,o=yr.getMounts(n);Object.keys(yr.nameTable).forEach((r=>{for(var t=yr.nameTable[r];t;){var e=t.name_next;o.includes(t.mount)&&yr.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=yr.lookupPath(r,{parent:!0}).node,o=fr.basename(r);if(!o||"."===o||".."===o)throw new yr.ErrnoError(28);var a=yr.mayCreate(n,o);if(a)throw new yr.ErrnoError(a);if(!n.node_ops.mknod)throw new yr.ErrnoError(63);return n.node_ops.mknod(n,o,t,e)},create:(r,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,yr.mknod(r,t,0)),mkdir:(r,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,yr.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{yr.mkdir(n,t)}catch(r){if(20!=r.errno)throw r}}},mkdev:(r,t,e)=>(void 0===e&&(e=t,t=438),t|=8192,yr.mknod(r,t,e)),symlink:(r,t)=>{if(!dr.resolve(r))throw new yr.ErrnoError(44);var e=yr.lookupPath(t,{parent:!0}).node;if(!e)throw new yr.ErrnoError(44);var n=fr.basename(t),o=yr.mayCreate(e,n);if(o)throw new yr.ErrnoError(o);if(!e.node_ops.symlink)throw new yr.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=yr.lookupPath(r,{parent:!0}).node,n=yr.lookupPath(t,{parent:!0}).node,!e||!n)throw new yr.ErrnoError(44);if(e.mount!==n.mount)throw new yr.ErrnoError(75);var u,c=yr.lookupNode(e,i),l=dr.relative(r,a);if("."!==l.charAt(0))throw new yr.ErrnoError(28);if("."!==(l=dr.relative(t,o)).charAt(0))throw new yr.ErrnoError(55);try{u=yr.lookupNode(n,s)}catch(r){}if(c!==u){var f=yr.isDir(c.mode),d=yr.mayDelete(e,i,f);if(d)throw new yr.ErrnoError(d);if(d=u?yr.mayDelete(n,s,f):yr.mayCreate(n,s))throw new yr.ErrnoError(d);if(!e.node_ops.rename)throw new yr.ErrnoError(63);if(yr.isMountpoint(c)||u&&yr.isMountpoint(u))throw new yr.ErrnoError(10);if(n!==e&&(d=yr.nodePermissions(e,"w")))throw new yr.ErrnoError(d);yr.hashRemoveNode(c);try{e.node_ops.rename(c,n,s)}catch(r){throw r}finally{yr.hashAddNode(c)}}},rmdir:r=>{var t=yr.lookupPath(r,{parent:!0}).node,e=fr.basename(r),n=yr.lookupNode(t,e),o=yr.mayDelete(t,e,!0);if(o)throw new yr.ErrnoError(o);if(!t.node_ops.rmdir)throw new yr.ErrnoError(63);if(yr.isMountpoint(n))throw new yr.ErrnoError(10);t.node_ops.rmdir(t,e),yr.destroyNode(n)},readdir:r=>{var t=yr.lookupPath(r,{follow:!0}).node;if(!t.node_ops.readdir)throw new yr.ErrnoError(54);return t.node_ops.readdir(t)},unlink:r=>{var t=yr.lookupPath(r,{parent:!0}).node;if(!t)throw new yr.ErrnoError(44);var e=fr.basename(r),n=yr.lookupNode(t,e),o=yr.mayDelete(t,e,!1);if(o)throw new yr.ErrnoError(o);if(!t.node_ops.unlink)throw new yr.ErrnoError(63);if(yr.isMountpoint(n))throw new yr.ErrnoError(10);t.node_ops.unlink(t,e),yr.destroyNode(n)},readlink:r=>{var t=yr.lookupPath(r).node;if(!t)throw new yr.ErrnoError(44);if(!t.node_ops.readlink)throw new yr.ErrnoError(28);return dr.resolve(yr.getPath(t.parent),t.node_ops.readlink(t))},stat:(r,t)=>{var e=yr.lookupPath(r,{follow:!t}).node;if(!e)throw new yr.ErrnoError(44);if(!e.node_ops.getattr)throw new yr.ErrnoError(63);return e.node_ops.getattr(e)},lstat:r=>yr.stat(r,!0),chmod:(r,t,e)=>{var n;if(!(n="string"==typeof r?yr.lookupPath(r,{follow:!e}).node:r).node_ops.setattr)throw new yr.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(r,t)=>{yr.chmod(r,t,!0)},fchmod:(r,t)=>{var e=yr.getStream(r);if(!e)throw new yr.ErrnoError(8);yr.chmod(e.node,t)},chown:(r,t,e,n)=>{var o;if(!(o="string"==typeof r?yr.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new yr.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(r,t,e)=>{yr.chown(r,t,e,!0)},fchown:(r,t,e)=>{var n=yr.getStream(r);if(!n)throw new yr.ErrnoError(8);yr.chown(n.node,t,e)},truncate:(r,t)=>{if(t<0)throw new yr.ErrnoError(28);var e;if(!(e="string"==typeof r?yr.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new yr.ErrnoError(63);if(yr.isDir(e.mode))throw new yr.ErrnoError(31);if(!yr.isFile(e.mode))throw new yr.ErrnoError(28);var n=yr.nodePermissions(e,"w");if(n)throw new yr.ErrnoError(n);e.node_ops.setattr(e,{size:t,timestamp:Date.now()})},ftruncate:(r,t)=>{var e=yr.getStream(r);if(!e)throw new yr.ErrnoError(8);if(0==(2097155&e.flags))throw new yr.ErrnoError(28);yr.truncate(e.node,t)},utime:(r,t,e)=>{var n=yr.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,e)})},open:(r,t,e)=>{if(""===r)throw new yr.ErrnoError(44);var n;if(e=void 0===e?438:e,e=64&(t="string"==typeof t?yr.modeStringToFlags(t):t)?4095&e|32768:0,"object"==typeof r)n=r;else{r=fr.normalize(r);try{n=yr.lookupPath(r,{follow:!(131072&t)}).node}catch(r){}}var a=!1;if(64&t)if(n){if(128&t)throw new yr.ErrnoError(20)}else n=yr.mknod(r,e,0),a=!0;if(!n)throw new yr.ErrnoError(44);if(yr.isChrdev(n.mode)&&(t&=-513),65536&t&&!yr.isDir(n.mode))throw new yr.ErrnoError(54);if(!a){var i=yr.mayOpen(n,t);if(i)throw new yr.ErrnoError(i)}512&t&&!a&&yr.truncate(n,0),t&=-131713;var s=yr.createStream({node:n,path:yr.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&t||(yr.readFiles||(yr.readFiles={}),r in yr.readFiles||(yr.readFiles[r]=1)),s},close:r=>{if(yr.isClosed(r))throw new yr.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(r){throw r}finally{yr.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek:(r,t,e)=>{if(yr.isClosed(r))throw new yr.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new yr.ErrnoError(70);if(0!=e&&1!=e&&2!=e)throw new yr.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 yr.ErrnoError(28);if(yr.isClosed(r))throw new yr.ErrnoError(8);if(1==(2097155&r.flags))throw new yr.ErrnoError(8);if(yr.isDir(r.node.mode))throw new yr.ErrnoError(31);if(!r.stream_ops.read)throw new yr.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new yr.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 yr.ErrnoError(28);if(yr.isClosed(r))throw new yr.ErrnoError(8);if(0==(2097155&r.flags))throw new yr.ErrnoError(8);if(yr.isDir(r.node.mode))throw new yr.ErrnoError(31);if(!r.stream_ops.write)throw new yr.ErrnoError(28);r.seekable&&1024&r.flags&&yr.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new yr.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(yr.isClosed(r))throw new yr.ErrnoError(8);if(t<0||e<=0)throw new yr.ErrnoError(28);if(0==(2097155&r.flags))throw new yr.ErrnoError(8);if(!yr.isFile(r.node.mode)&&!yr.isDir(r.node.mode))throw new yr.ErrnoError(43);if(!r.stream_ops.allocate)throw new yr.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 yr.ErrnoError(2);if(1==(2097155&r.flags))throw new yr.ErrnoError(2);if(!r.stream_ops.mmap)throw new yr.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 yr.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=yr.open(r,t.flags),o=yr.stat(r).size,a=new Uint8Array(o);return yr.read(n,a,0,o,0),"utf8"===t.encoding?e=A(a,0):"binary"===t.encoding&&(e=a),yr.close(n),e},writeFile:(r,t,e={})=>{e.flags=e.flags||577;var n=yr.open(r,e.flags,e.mode);if("string"==typeof t){var o=new Uint8Array($(t)+1),a=M(t,o,0,o.length);yr.write(n,o,0,a,void 0,e.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");yr.write(n,t,0,t.byteLength,void 0,e.canOwn)}yr.close(n)},cwd:()=>yr.currentPath,chdir:r=>{var t=yr.lookupPath(r,{follow:!0});if(null===t.node)throw new yr.ErrnoError(44);if(!yr.isDir(t.node.mode))throw new yr.ErrnoError(54);var e=yr.nodePermissions(t.node,"x");if(e)throw new yr.ErrnoError(e);yr.currentPath=t.path},createDefaultDirectories:()=>{yr.mkdir("/tmp"),yr.mkdir("/home"),yr.mkdir("/home/web_user")},createDefaultDevices:()=>{yr.mkdir("/dev"),yr.registerDevice(yr.makedev(1,3),{read:()=>0,write:(r,t,e,n,o)=>n}),yr.mkdev("/dev/null",yr.makedev(1,3)),pr.register(yr.makedev(5,0),pr.default_tty_ops),pr.register(yr.makedev(6,0),pr.default_tty1_ops),yr.mkdev("/dev/tty",yr.makedev(5,0)),yr.mkdev("/dev/tty1",yr.makedev(6,0));var r=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var r=new Uint8Array(1);return()=>(crypto.getRandomValues(r),r[0])}return()=>K("randomDevice")}();yr.createDevice("/dev","random",r),yr.createDevice("/dev","urandom",r),yr.mkdir("/dev/shm"),yr.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{yr.mkdir("/proc");var r=yr.mkdir("/proc/self");yr.mkdir("/proc/self/fd"),yr.mount({mount:()=>{var t=yr.createNode(r,"fd",16895,73);return t.node_ops={lookup:(r,t)=>{var e=+t,n=yr.getStream(e);if(!n)throw new yr.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{o.stdin?yr.createDevice("/dev","stdin",o.stdin):yr.symlink("/dev/tty","/dev/stdin"),o.stdout?yr.createDevice("/dev","stdout",null,o.stdout):yr.symlink("/dev/tty","/dev/stdout"),o.stderr?yr.createDevice("/dev","stderr",null,o.stderr):yr.symlink("/dev/tty1","/dev/stderr"),yr.open("/dev/stdin",0),yr.open("/dev/stdout",1),yr.open("/dev/stderr",1)},ensureErrnoError:()=>{yr.ErrnoError||(yr.ErrnoError=function(r,t){this.node=t,this.setErrno=function(r){this.errno=r},this.setErrno(r),this.message="FS error"},yr.ErrnoError.prototype=new Error,yr.ErrnoError.prototype.constructor=yr.ErrnoError,[44].forEach((r=>{yr.genericErrors[r]=new yr.ErrnoError(r),yr.genericErrors[r].stack="<generic error, no stack>"})))},staticInit:()=>{yr.ensureErrnoError(),yr.nameTable=new Array(4096),yr.mount(vr,{},"/"),yr.createDefaultDirectories(),yr.createDefaultDevices(),yr.createSpecialDirectories(),yr.filesystems={MEMFS:vr}},init:(r,t,e)=>{yr.init.initialized=!0,yr.ensureErrnoError(),o.stdin=r||o.stdin,o.stdout=t||o.stdout,o.stderr=e||o.stderr,yr.createStandardStreams()},quit:()=>{yr.init.initialized=!1;for(var r=0;r<yr.streams.length;r++){var t=yr.streams[r];t&&yr.close(t)}},getMode:(r,t)=>{var e=0;return r&&(e|=365),t&&(e|=146),e},findObject:(r,t)=>{var e=yr.analyzePath(r,t);return e.exists?e.object:null},analyzePath:(r,t)=>{try{r=(n=yr.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=yr.lookupPath(r,{parent:!0});e.parentExists=!0,e.parentPath=n.path,e.parentObject=n.node,e.name=fr.basename(r),n=yr.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:yr.getPath(r);for(var o=t.split("/").reverse();o.length;){var a=o.pop();if(a){var i=fr.join2(r,a);try{yr.mkdir(i)}catch(r){}r=i}}return i},createFile:(r,t,e,n,o)=>{var a=fr.join2("string"==typeof r?r:yr.getPath(r),t),i=yr.getMode(n,o);return yr.create(a,i)},createDataFile:(r,t,e,n,o,a)=>{var i=t;r&&(r="string"==typeof r?r:yr.getPath(r),i=t?fr.join2(r,t):r);var s=yr.getMode(n,o),u=yr.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}yr.chmod(u,146|s);var d=yr.open(u,577);yr.write(d,e,0,e.length,0,a),yr.close(d),yr.chmod(u,s)}return u},createDevice:(r,t,e,n)=>{var o=fr.join2("string"==typeof r?r:yr.getPath(r),t),a=yr.getMode(!!e,!!n);yr.createDevice.major||(yr.createDevice.major=64);var i=yr.makedev(yr.createDevice.major++,0);return yr.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 yr.ErrnoError(29)}if(void 0===u&&0===i)throw new yr.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 yr.ErrnoError(29)}return o&&(r.node.timestamp=Date.now()),i}}),yr.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(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{r.contents=hr(a(r.url),!0),r.usedBytes=r.contents.length}catch(r){throw new yr.ErrnoError(29)}},createLazyFile:(r,t,e,n,o)=>{function a(){this.lengthKnown=!1,this.chunks=[]}if(a.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]}},a.prototype.setDataGetter=function(r){this.getter=r},a.prototype.cacheLength=function(){var r=new XMLHttpRequest;if(r.open("HEAD",e,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+e+". Status: "+r.status);var t,n=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=n);var s=this;s.setDataGetter((r=>{var t=r*i,o=(r+1)*i-1;if(o=Math.min(o,n-1),void 0===s.chunks[r]&&(s.chunks[r]=((r,t)=>{if(r>t)throw new Error("invalid range ("+r+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",e,!1),n!==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 "+e+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):hr(o.responseText||"",!0)})(t,o)),void 0===s.chunks[r])throw new Error("doXHR failed!");return s.chunks[r]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,p("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var i=new a;Object.defineProperties(i,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:i}}else s={isDevice:!1,url:e};var u=yr.createFile(r,t,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};function l(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(u.stream_ops).forEach((r=>{var t=u.stream_ops[r];c[r]=function(){return yr.forceLoadFile(u),t.apply(null,arguments)}})),c.read=(r,t,e,n,o)=>(yr.forceLoadFile(u),l(r,t,e,n,o)),c.mmap=(r,t,e,n,o)=>{yr.forceLoadFile(u);var a=mr(t);if(!a)throw new yr.ErrnoError(48);return l(r,b,a,t,e),{ptr:a,allocated:!0}},u.stream_ops=c,u},createPreloadedFile:(r,t,e,n,o,a,s,u,c,l)=>{var f=t?dr.resolve(fr.join2(r,t)):r;function d(e){function i(e){l&&l(),u||yr.createDataFile(r,t,e,n,o,c),a&&a(),G()}Browser.handledByPreloadPlugin(e,f,i,(()=>{s&&s(),G()}))||i(e)}Y(),"string"==typeof e?function(r,t,e,n){var o=n?"":"al "+r;i(r,(e=>{w(e,'Loading data file "'+r+'" failed (no arrayBuffer).'),t(new Uint8Array(e)),o&&G()}),(t=>{if(!e)throw'Loading data file "'+r+'" failed.';e()})),o&&Y()}(e,(r=>d(r)),s):d(e)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(r,t,e)=>{t=t||(()=>{}),e=e||(()=>{});var n=yr.indexedDB();try{var o=n.open(yr.DB_NAME(),yr.DB_VERSION)}catch(r){return e(r)}o.onupgradeneeded=()=>{p("creating db"),o.result.createObjectStore(yr.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([yr.DB_STORE_NAME],"readwrite"),a=n.objectStore(yr.DB_STORE_NAME),i=0,s=0,u=r.length;function c(){0==s?t():e()}r.forEach((r=>{var t=a.put(yr.analyzePath(r).object.contents,r);t.onsuccess=()=>{++i+s==u&&c()},t.onerror=()=>{s++,i+s==u&&c()}})),n.onerror=e},o.onerror=e},loadFilesFromDB:(r,t,e)=>{t=t||(()=>{}),e=e||(()=>{});var n=yr.indexedDB();try{var o=n.open(yr.DB_NAME(),yr.DB_VERSION)}catch(r){return e(r)}o.onupgradeneeded=e,o.onsuccess=()=>{var n=o.result;try{var a=n.transaction([yr.DB_STORE_NAME],"readonly")}catch(r){return void e(r)}var i=a.objectStore(yr.DB_STORE_NAME),s=0,u=0,c=r.length;function l(){0==u?t():e()}r.forEach((r=>{var t=i.get(r);t.onsuccess=()=>{yr.analyzePath(r).exists&&yr.unlink(r),yr.createDataFile(fr.dirname(r),fr.basename(r),t.result,!0,!0,!0),++s+u==c&&l()},t.onerror=()=>{u++,s+u==c&&l()}})),a.onerror=e},o.onerror=e}},gr={DEFAULT_POLLMASK:5,calculateAt:function(r,t,e){if(fr.isAbs(t))return t;var n;if(n=-100===r?yr.cwd():gr.getStreamFromFD(r).path,0==t.length){if(!e)throw new yr.ErrnoError(44);return n}return fr.join2(n,t)},doStat:function(r,t,e){try{var n=r(t)}catch(r){if(r&&r.node&&fr.normalize(t)!==fr.normalize(yr.getPath(r.node)))return-54;throw r}return C[e>>2]=n.dev,C[e+8>>2]=n.ino,C[e+12>>2]=n.mode,P[e+16>>2]=n.nlink,C[e+20>>2]=n.uid,C[e+24>>2]=n.gid,C[e+28>>2]=n.rdev,I=[n.size>>>0,(B=n.size,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[e+40>>2]=I[0],C[e+44>>2]=I[1],C[e+48>>2]=4096,C[e+52>>2]=n.blocks,I=[Math.floor(n.atime.getTime()/1e3)>>>0,(B=Math.floor(n.atime.getTime()/1e3),+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[e+56>>2]=I[0],C[e+60>>2]=I[1],P[e+64>>2]=0,I=[Math.floor(n.mtime.getTime()/1e3)>>>0,(B=Math.floor(n.mtime.getTime()/1e3),+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[e+72>>2]=I[0],C[e+76>>2]=I[1],P[e+80>>2]=0,I=[Math.floor(n.ctime.getTime()/1e3)>>>0,(B=Math.floor(n.ctime.getTime()/1e3),+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[e+88>>2]=I[0],C[e+92>>2]=I[1],P[e+96>>2]=0,I=[n.ino>>>0,(B=n.ino,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[e+104>>2]=I[0],C[e+108>>2]=I[1],0},doMsync:function(r,t,e,n,o){if(!yr.isFile(t.node.mode))throw new yr.ErrnoError(43);if(2&n)return 0;var a=E.slice(r,r+e);yr.msync(t,a,o,e,n)},varargs:void 0,get:function(){return gr.varargs+=4,C[gr.varargs-4>>2]},getStr:function(r){return j(r)},getStreamFromFD:function(r){var t=yr.getStream(r);if(!t)throw new yr.ErrnoError(8);return t}},wr="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking",_r={};function br(r){for(;r.length;){var t=r.pop();r.pop()(t)}}function Er(r){return this.fromWireType(C[r>>2])}var kr={},Tr={},Cr={};function Pr(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 Sr(r,t){return r=Pr(r),new Function("body","return function "+r+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function Dr(r,t){var e=Sr(t,(function(r){this.name=t,this.message=r;var e=new Error(r).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))}));return e.prototype=Object.create(r.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},e}var Fr=void 0;function Ar(r){throw new Fr(r)}function jr(r,t,e){function n(t){var n=e(t);n.length!==r.length&&Ar("Mismatched type converter count");for(var o=0;o<r.length;++o)zr(r[o],n[o])}r.forEach((function(r){Cr[r]=t}));var o=new Array(t.length),a=[],i=0;t.forEach(((r,t)=>{Tr.hasOwnProperty(r)?o[t]=Tr[r]:(a.push(r),kr.hasOwnProperty(r)||(kr[r]=[]),kr[r].push((()=>{o[t]=Tr[r],++i===a.length&&n(o)})))})),0===a.length&&n(o)}var Mr={};function Or(r){switch(r){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+r)}}var $r=void 0;function xr(r){for(var t="",e=r;E[e];)t+=$r[E[e++]];return t}var Wr=void 0;function Rr(r){throw new Wr(r)}function zr(r,t,e={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(r||Rr('type "'+n+'" must have a positive integer typeid pointer'),Tr.hasOwnProperty(r)){if(e.ignoreDuplicateRegistrations)return;Rr("Cannot register type '"+n+"' twice")}if(Tr[r]=t,delete Cr[r],kr.hasOwnProperty(r)){var o=kr[r];delete kr[r],o.forEach((r=>r()))}}function Br(r){if(!(this instanceof st))return!1;if(!(r instanceof st))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}function Ir(r){Rr(r.$$.ptrType.registeredClass.name+" instance already deleted")}var Nr=!1;function Lr(r){}function Ur(r){r.count.value-=1,0===r.count.value&&function(r){r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr)}(r)}function Hr(r,t,e){if(t===e)return r;if(void 0===e.baseClass)return null;var n=Hr(r,t,e.baseClass);return null===n?null:e.downcast(n)}var Vr={};function qr(){return Object.keys(Xr).length}function Yr(){var r=[];for(var t in Xr)Xr.hasOwnProperty(t)&&r.push(Xr[t]);return r}var Gr=[];function Kr(){for(;Gr.length;){var r=Gr.pop();r.$$.deleteScheduled=!1,r.delete()}}var Zr=void 0;function Qr(r){Zr=r,Gr.length&&Zr&&Zr(Kr)}var Xr={};function Jr(r,t){return t=function(r,t){for(void 0===t&&Rr("ptr should not be undefined");r.baseClass;)t=r.upcast(t),r=r.baseClass;return t}(r,t),Xr[t]}function rt(r,t){return t.ptrType&&t.ptr||Ar("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&Ar("Both smartPtrType and smartPtr must be specified"),t.count={value:1},et(Object.create(r,{$$:{value:t}}))}function tt(r){var t=this.getPointee(r);if(!t)return this.destructor(r),null;var e=Jr(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?rt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:r}):rt(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var a,i=this.registeredClass.getActualType(t),s=Vr[i];if(!s)return o.call(this);a=this.isConst?s.constPointerType:s.pointerType;var u=Hr(t,this.registeredClass,a.registeredClass);return null===u?o.call(this):this.isSmartPointer?rt(a.registeredClass.instancePrototype,{ptrType:a,ptr:u,smartPtrType:this,smartPtr:r}):rt(a.registeredClass.instancePrototype,{ptrType:a,ptr:u})}function et(r){return"undefined"==typeof FinalizationRegistry?(et=r=>r,r):(Nr=new FinalizationRegistry((r=>{Ur(r.$$)})),et=r=>{var t=r.$$;if(t.smartPtr){var e={$$:t};Nr.register(r,e,r)}return r},Lr=r=>Nr.unregister(r),et(r))}function nt(){if(this.$$.ptr||Ir(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r,t=et(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 ot(){this.$$.ptr||Ir(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Rr("Object already scheduled for deletion"),Lr(this),Ur(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function at(){return!this.$$.ptr}function it(){return this.$$.ptr||Ir(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Rr("Object already scheduled for deletion"),Gr.push(this),1===Gr.length&&Zr&&Zr(Kr),this.$$.deleteScheduled=!0,this}function st(){}function ut(r,t,e){if(void 0===r[t].overloadTable){var n=r[t];r[t]=function(){return r[t].overloadTable.hasOwnProperty(arguments.length)||Rr("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}}function ct(r,t,e){o.hasOwnProperty(r)?((void 0===e||void 0!==o[r].overloadTable&&void 0!==o[r].overloadTable[e])&&Rr("Cannot register public name '"+r+"' twice"),ut(o,r,r),o.hasOwnProperty(e)&&Rr("Cannot register multiple overloads of a function with the same number of arguments ("+e+")!"),o[r].overloadTable[e]=t):(o[r]=t,void 0!==e&&(o[r].numArguments=e))}function lt(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=[]}function ft(r,t,e){for(;t!==e;)t.upcast||Rr("Expected null or instance of "+e.name+", got an instance of "+t.name),r=t.upcast(r),t=t.baseClass;return r}function dt(r,t){if(null===t)return this.isReference&&Rr("null is not a valid "+this.name),0;t.$$||Rr('Cannot pass "'+Rt(t)+'" as a '+this.name),t.$$.ptr||Rr("Cannot pass deleted object as a pointer of type "+this.name);var e=t.$$.ptrType.registeredClass;return ft(t.$$.ptr,e,this.registeredClass)}function ht(r,t){var e;if(null===t)return this.isReference&&Rr("null is not a valid "+this.name),this.isSmartPointer?(e=this.rawConstructor(),null!==r&&r.push(this.rawDestructor,e),e):0;t.$$||Rr('Cannot pass "'+Rt(t)+'" as a '+this.name),t.$$.ptr||Rr("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&Rr("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(e=ft(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&Rr("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?e=t.$$.smartPtr:Rr("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,$t.toHandle((function(){o.delete()}))),null!==r&&r.push(this.rawDestructor,e)}break;default:Rr("Unsupporting sharing policy")}return e}function pt(r,t){if(null===t)return this.isReference&&Rr("null is not a valid "+this.name),0;t.$$||Rr('Cannot pass "'+Rt(t)+'" as a '+this.name),t.$$.ptr||Rr("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&Rr("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var e=t.$$.ptrType.registeredClass;return ft(t.$$.ptr,e,this.registeredClass)}function mt(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r}function vt(r){this.rawDestructor&&this.rawDestructor(r)}function yt(r){null!==r&&r.delete()}function gt(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=ht:n?(this.toWireType=dt,this.destructorFunction=null):(this.toWireType=pt,this.destructorFunction=null)}function wt(r,t,e){o.hasOwnProperty(r)||Ar("Replacing nonexistant public symbol"),void 0!==o[r].overloadTable&&void 0!==e?o[r].overloadTable[e]=t:(o[r]=t,o[r].argCount=e)}function _t(r,t,e){return r.includes("j")?function(r,t,e){var n=o["dynCall_"+r];return e&&e.length?n.apply(null,[t].concat(e)):n.call(null,t)}(r,t,e):sr(t).apply(null,e)}function bt(r,t){var e,n,o,a=(r=xr(r)).includes("j")?(e=r,n=t,o=[],function(){return o.length=0,Object.assign(o,arguments),_t(e,n,o)}):sr(t);return"function"!=typeof a&&Rr("unknown function pointer with signature "+r+": "+t),a}var Et=void 0;function kt(r){var t=we(r),e=xr(t);return ve(t),e}function Tt(r,t){var e=[],n={};throw t.forEach((function r(t){n[t]||Tr[t]||(Cr[t]?Cr[t].forEach(r):(e.push(t),n[t]=!0))})),new Et(r+": "+e.map(kt).join([", "]))}function Ct(r,t){for(var e=[],n=0;n<r;n++)e.push(P[t+4*n>>2]);return e}function Pt(r,t){if(!(r instanceof Function))throw new TypeError("new_ called with constructor type "+typeof r+" which is not a function");var e=Sr(r.name||"unknownFunctionName",(function(){}));e.prototype=r.prototype;var n=new e,o=r.apply(n,t);return o instanceof Object?o:n}function St(r,t,e,n,o){var a=t.length;a<2&&Rr("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var i=null!==t[1]&&null!==e,s=!1,u=1;u<t.length;++u)if(null!==t[u]&&void 0===t[u].destructorFunction){s=!0;break}var c="void"!==t[0].name,l="",f="";for(u=0;u<a-2;++u)l+=(0!==u?", ":"")+"arg"+u,f+=(0!==u?", ":"")+"arg"+u+"Wired";var d="return function "+Pr(r)+"("+l+") {\nif (arguments.length !== "+(a-2)+") {\nthrowBindingError('function "+r+" called with ' + arguments.length + ' arguments, expected "+(a-2)+" args!');\n}\n";s&&(d+="var destructors = [];\n");var h=s?"destructors":"null",p=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],m=[Rr,n,o,br,t[0],t[1]];for(i&&(d+="var thisWired = classParam.toWireType("+h+", this);\n"),u=0;u<a-2;++u)d+="var arg"+u+"Wired = argType"+u+".toWireType("+h+", arg"+u+"); // "+t[u+2].name+"\n",p.push("argType"+u),m.push(t[u+2]);if(i&&(f="thisWired"+(f.length>0?", ":"")+f),d+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",s)d+="runDestructors(destructors);\n";else for(u=i?1:2;u<t.length;++u){var v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==t[u].destructorFunction&&(d+=v+"_dtor("+v+"); // "+t[u].name+"\n",p.push(v+"_dtor"),m.push(t[u].destructorFunction))}return c&&(d+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),d+="}\n",p.push(d),Pt(Function,p).apply(null,m)}function Dt(r,t,e){return r instanceof Object||Rr(e+' with invalid "this": '+r),r instanceof t.registeredClass.constructor||Rr(e+' incompatible with "this" of type '+r.constructor.name),r.$$.ptr||Rr("cannot call emscripten binding method "+e+" on deleted object"),ft(r.$$.ptr,r.$$.ptrType.registeredClass,t.registeredClass)}var Ft=[],At=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function jt(r){r>4&&0==--At[r].refcount&&(At[r]=void 0,Ft.push(r))}function Mt(){for(var r=0,t=5;t<At.length;++t)void 0!==At[t]&&++r;return r}function Ot(){for(var r=5;r<At.length;++r)if(void 0!==At[r])return At[r];return null}var $t={toValue:r=>(r||Rr("Cannot use deleted val. handle = "+r),At[r].value),toHandle:r=>{switch(r){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=Ft.length?Ft.pop():At.length;return At[t]={refcount:1,value:r},t}}};function xt(r,t,e){switch(t){case 0:return function(r){var t=e?b:E;return this.fromWireType(t[r])};case 1:return function(r){var t=e?k:T;return this.fromWireType(t[r>>1])};case 2:return function(r){var t=e?C:P;return this.fromWireType(t[r>>2])};default:throw new TypeError("Unknown integer type: "+r)}}function Wt(r,t){var e=Tr[r];return void 0===e&&Rr(t+" has unknown type "+kt(r)),e}function Rt(r){if(null===r)return"null";var t=typeof r;return"object"===t||"array"===t||"function"===t?r.toString():""+r}function zt(r,t){switch(t){case 2:return function(r){return this.fromWireType(S[r>>2])};case 3:return function(r){return this.fromWireType(D[r>>3])};default:throw new TypeError("Unknown float type: "+r)}}function Bt(r,t,e){switch(t){case 0:return e?function(r){return b[r]}:function(r){return E[r]};case 1:return e?function(r){return k[r>>1]}:function(r){return T[r>>1]};case 2:return e?function(r){return C[r>>2]}:function(r){return P[r>>2]};default:throw new TypeError("Unknown integer type: "+r)}}var It="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function Nt(r,t){for(var e=r,n=e>>1,o=n+t/2;!(n>=o)&&T[n];)++n;if((e=n<<1)-r>32&&It)return It.decode(E.subarray(r,e));for(var a="",i=0;!(i>=t/2);++i){var s=k[r+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a}function Lt(r,t,e){if(void 0===e&&(e=2147483647),e<2)return 0;for(var n=t,o=(e-=2)<2*r.length?e/2:r.length,a=0;a<o;++a){var i=r.charCodeAt(a);k[t>>1]=i,t+=2}return k[t>>1]=0,t-n}function Ut(r){return 2*r.length}function Ht(r,t){for(var e=0,n="";!(e>=t/4);){var o=C[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}function Vt(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 i=r.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++a)),C[t>>2]=i,(t+=4)+4>o)break}return C[t>>2]=0,t-n}function qt(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}var Yt={};function Gt(r){var t=Yt[r];return void 0===t?xr(r):t}var Kt=[];function Zt(){return"object"==typeof globalThis?globalThis:Function("return this")()}var Qt=[];function Xt(r){var t=$(r)+1,e=me(t);return e&&M(r,b,e,t),e}var Jt,re=[];function te(r){try{return v.grow(r-_.byteLength+65535>>>16),x(v.buffer),1}catch(r){}}Jt=()=>performance.now();var ee={};function ne(){if(!ne.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",_:l||"./this.program"};for(var t in ee)void 0===ee[t]?delete r[t]:r[t]=ee[t];var e=[];for(var t in r)e.push(t+"="+r[t]);ne.strings=e}return ne.strings}function oe(r){y||(o.onExit&&o.onExit(r),g=!0),f(r,new J(r))}var ae=function(r,t){oe(r)};function ie(r){return r%4==0&&(r%100!=0||r%400==0)}var se=[31,29,31,30,31,30,31,31,30,31,30,31],ue=[31,28,31,30,31,30,31,31,30,31,30,31];function ce(r,t,e,n){var o=C[n+40>>2],a={tm_sec:C[n>>2],tm_min:C[n+4>>2],tm_hour:C[n+8>>2],tm_mday:C[n+12>>2],tm_mon:C[n+16>>2],tm_year:C[n+20>>2],tm_wday:C[n+24>>2],tm_yday:C[n+28>>2],tm_isdst:C[n+32>>2],tm_gmtoff:C[n+36>>2],tm_zone:o?j(o):""},i=j(e),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(r,t,e){for(var n="number"==typeof r?r.toString():r||"";n.length<t;)n=e[0]+n;return n}function d(r,t){return f(r,t,"0")}function h(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 p(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 m(r){var t=function(r,t){for(var e=new Date(r.getTime());t>0;){var n=ie(e.getFullYear()),o=e.getMonth(),a=(n?se:ue)[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=p(e),a=p(n);return h(o,t)<=0?h(a,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var v={"%a":function(r){return c[r.tm_wday].substring(0,3)},"%A":function(r){return c[r.tm_wday]},"%b":function(r){return l[r.tm_mon].substring(0,3)},"%B":function(r){return l[r.tm_mon]},"%C":function(r){return d((r.tm_year+1900)/100|0,2)},"%d":function(r){return d(r.tm_mday,2)},"%e":function(r){return f(r.tm_mday,2," ")},"%g":function(r){return m(r).toString().substring(2)},"%G":function(r){return m(r)},"%H":function(r){return d(r.tm_hour,2)},"%I":function(r){var t=r.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(r){return d(r.tm_mday+function(r,t){for(var e=0,n=0;n<=t;e+=r[n++]);return e}(ie(r.tm_year+1900)?se:ue,r.tm_mon-1),3)},"%m":function(r){return d(r.tm_mon+1,2)},"%M":function(r){return d(r.tm_min,2)},"%n":function(){return"\n"},"%p":function(r){return r.tm_hour>=0&&r.tm_hour<12?"AM":"PM"},"%S":function(r){return d(r.tm_sec,2)},"%t":function(){return"\t"},"%u":function(r){return r.tm_wday||7},"%U":function(r){var t=r.tm_yday+7-r.tm_wday;return d(Math.floor(t/7),2)},"%V":function(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&&ie(r.tm_year)||(t=1)}}else{t=52;var n=(r.tm_wday+7-r.tm_yday-1)%7;(4==n||5==n&&ie(r.tm_year%400-1))&&t++}return d(t,2)},"%w":function(r){return r.tm_wday},"%W":function(r){var t=r.tm_yday+7-(r.tm_wday+6)%7;return d(Math.floor(t/7),2)},"%y":function(r){return(r.tm_year+1900).toString().substring(2)},"%Y":function(r){return r.tm_year+1900},"%z":function(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":function(r){return r.tm_zone},"%%":function(){return"%"}};for(var u in i=i.replace(/%%/g,"\0\0"),v)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),v[u](a)));var y=hr(i=i.replace(/\0\0/g,"%"),!1);return y.length>t?0:(function(r,t){b.set(r,t)}(y,r),y.length-1)}var le=function(r,t,e,n){r||(r=this),this.parent=r,this.mount=r.mount,this.mounted=null,this.id=yr.nextInode++,this.name=t,this.mode=e,this.node_ops={},this.stream_ops={},this.rdev=n},fe=365,de=146;Object.defineProperties(le.prototype,{read:{get:function(){return(this.mode&fe)===fe},set:function(r){r?this.mode|=fe:this.mode&=-366}},write:{get:function(){return(this.mode&de)===de},set:function(r){r?this.mode|=de:this.mode&=-147}},isFolder:{get:function(){return yr.isDir(this.mode)}},isDevice:{get:function(){return yr.isChrdev(this.mode)}}}),yr.FSNode=le,yr.staticInit(),Fr=o.InternalError=Dr(Error,"InternalError"),function(){for(var r=new Array(256),t=0;t<256;++t)r[t]=String.fromCharCode(t);$r=r}(),Wr=o.BindingError=Dr(Error,"BindingError"),st.prototype.isAliasOf=Br,st.prototype.clone=nt,st.prototype.delete=ot,st.prototype.isDeleted=at,st.prototype.deleteLater=it,o.getInheritedInstanceCount=qr,o.getLiveInheritedInstances=Yr,o.flushPendingDeletes=Kr,o.setDelayFunction=Qr,gt.prototype.getPointee=mt,gt.prototype.destructor=vt,gt.prototype.argPackAdvance=8,gt.prototype.readValueFromPointer=Er,gt.prototype.deleteObject=yt,gt.prototype.fromWireType=tt,Et=o.UnboundTypeError=Dr(Error,"UnboundTypeError"),o.count_emval_handles=Mt,o.get_first_emval=Ot;var he,pe={o:function(r){return me(r+24)+24},s:function(r){var t=new or(r);return t.get_caught()||(t.set_caught(!0),nr--),t.set_rethrown(!1),tr.push(t),er(t),t.get_exception_ptr()},mb:function(){if(!tr.length)return 0;var r=tr[tr.length-1];return er(r),r.excPtr},pa:function(r){r&&ur(new or(r))},t:function(){be(0),ur(tr.pop()),cr=0},a:function(){var r=cr;if(!r)return ge(0),0;var t=new or(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return ge(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(Te(o,e,a))return ge(o),r}return ge(e),r},f:function(){var r=cr;if(!r)return ge(0),0;var t=new or(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return ge(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(Te(o,e,a))return ge(o),r}return ge(e),r},n:function(){var r=cr;if(!r)return ge(0),0;var t=new or(r);t.set_adjusted_ptr(r);var e=t.get_type();if(!e)return ge(0),r;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===e)break;var a=t.ptr+16;if(Te(o,e,a))return ge(o),r}return ge(e),r},x:ar,oa:function(r){r&&er(new or(r))},la:lr,lb:function(r){if(r){var t=new or(r);tr.push(t),t.set_rethrown(!0),lr()}},q:function(r,t,e){throw new or(r).init(t,e),cr=r,nr++,r},nb:function(){return nr},c:function(r){throw cr||(cr=r),r},rb:function(r,t,e,n,o){try{for(var a=0,i=t?C[t>>2]:0,s=t?C[t+4>>2]:0,u=e?C[e>>2]:0,c=e?C[e+4>>2]:0,l=n?C[n>>2]:0,f=n?C[n+4>>2]:0,d=0,h=0,p=0,m=0,v=0,y=0,g=(t?C[t>>2]:0)|(e?C[e>>2]:0)|(n?C[n>>2]:0),w=(t?C[t+4>>2]:0)|(e?C[e+4>>2]:0)|(n?C[n+4>>2]:0),_=function(r,t,e,n){return r<32?t&n:e&n},b=0;b<r;b++){var E=1<<b%32;if(_(b,g,w,E)){var k=gr.getStreamFromFD(b),T=gr.DEFAULT_POLLMASK;k.stream_ops.poll&&(T=k.stream_ops.poll(k)),1&T&&_(b,i,s,E)&&(b<32?d|=E:h|=E,a++),4&T&&_(b,u,c,E)&&(b<32?p|=E:m|=E,a++),2&T&&_(b,l,f,E)&&(b<32?v|=E:y|=E,a++)}}return t&&(C[t>>2]=d,C[t+4>>2]=h),e&&(C[e>>2]=p,C[e+4>>2]=m),n&&(C[n>>2]=v,C[n+4>>2]=y),a}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},sa:function(r,t,e){gr.varargs=e;try{var n=gr.getStreamFromFD(r);switch(t){case 0:return(o=gr.get())<0?-28:yr.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=gr.get();return n.flags|=o,0;case 5:return o=gr.get(),k[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return a=28,C[ye()>>2]=a,-1}}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}var a},yb:function(r,t){try{var e=gr.getStreamFromFD(r);return gr.doStat(yr.stat,e.path,t)}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},zb:function(r,t,e){gr.varargs=e;try{var n=gr.getStreamFromFD(r);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=gr.get();return C[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=gr.get(),yr.ioctl(n,t,o);default:return-28}}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},wb:function(r,t,e,n){try{t=gr.getStr(t);var o=256&n,a=4096&n;return n&=-4353,t=gr.calculateAt(r,t,a),gr.doStat(o?yr.lstat:yr.stat,t,e)}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},da:function(r,t,e,n){gr.varargs=n;try{t=gr.getStr(t),t=gr.calculateAt(r,t);var o=n?gr.get():0;return yr.open(t,e,o).fd}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},sb:function(r){try{return r=gr.getStr(r),yr.rmdir(r),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},xb:function(r,t){try{return r=gr.getStr(r),gr.doStat(yr.stat,r,t)}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},tb:function(r,t,e){try{return t=gr.getStr(t),t=gr.calculateAt(r,t),0===e?yr.unlink(t):512===e?yr.rmdir(t):K("Invalid flags passed to unlinkat"),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return-r.errno}},xa:function(r){},za:function(r,t){K(wr)},ya:function(r,t){K(wr)},Xa:function(r){var t=_r[r];delete _r[r];var e=t.elements,n=e.length,o=e.map((function(r){return r.getterReturnType})).concat(e.map((function(r){return r.setterArgumentType}))),a=t.rawConstructor,i=t.rawDestructor;jr([r],o,(function(r){return e.forEach(((t,e)=>{var o=r[e],a=t.getter,i=t.getterContext,s=r[e+n],u=t.setter,c=t.setterContext;t.read=r=>o.fromWireType(a(i,r)),t.write=(r,t)=>{var e=[];u(c,r,s.toWireType(e,t)),br(e)}})),[{name:t.name,fromWireType:function(r){for(var t=new Array(n),o=0;o<n;++o)t[o]=e[o].read(r);return i(r),t},toWireType:function(r,o){if(n!==o.length)throw new TypeError("Incorrect number of tuple elements for "+t.name+": expected="+n+", actual="+o.length);for(var s=a(),u=0;u<n;++u)e[u].write(s,o[u]);return null!==r&&r.push(i,s),s},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:i}]}))},Va:function(r){var t=Mr[r];delete Mr[r];var e=t.rawConstructor,n=t.rawDestructor,o=t.fields;jr([r],o.map((r=>r.getterReturnType)).concat(o.map((r=>r.setterArgumentType))),(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)),br(e)}}})),[{name:t.name,fromWireType:function(r){var t={};for(var e in a)t[e]=a[e].read(r);return n(r),t},toWireType:function(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:8,readValueFromPointer:Er,destructorFunction:n}]}))},fb:function(r,t,e,n,o){},Ba:function(r,t,e,n,o){var a=Or(e);zr(r,{name:t=xr(t),fromWireType:function(r){return!!r},toWireType:function(r,t){return t?n:o},argPackAdvance:8,readValueFromPointer:function(r){var n;if(1===e)n=b;else if(2===e)n=k;else{if(4!==e)throw new TypeError("Unknown boolean type size: "+t);n=C}return this.fromWireType(n[r>>a])},destructorFunction:null})},E:function(r,t,e,n,o,a,i,s,u,c,l,f,d){l=xr(l),a=bt(o,a),s&&(s=bt(i,s)),c&&(c=bt(u,c)),d=bt(f,d);var h=Pr(l);ct(h,(function(){Tt("Cannot construct "+l+" due to unbound types",[n])})),jr([r,t,e],n?[n]:[],(function(t){var e,o;t=t[0],o=n?(e=t.registeredClass).instancePrototype:st.prototype;var i=Sr(h,(function(){if(Object.getPrototypeOf(this)!==u)throw new Wr("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new Wr(l+" has no accessible constructor");var r=f.constructor_body[arguments.length];if(void 0===r)throw new Wr("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 lt(l,i,u,d,e,a,s,c),p=new gt(l,f,!0,!1,!1),m=new gt(l+"*",f,!1,!1,!1),v=new gt(l+" const*",f,!1,!0,!1);return Vr[r]={pointerType:m,constPointerType:v},wt(h,i),[p,m,v]}))},$a:function(r,t,e,n,o,a){w(t>0);var i=Ct(t,e);o=bt(n,o),jr([],[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 Wr("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]=()=>{Tt("Cannot construct "+r.name+" due to unbound types",i)},jr([],i,(function(n){return n.splice(1,0,null),r.registeredClass.constructor_body[t-1]=St(e,n,null,o,a),[]})),[]}))},_a:function(r,t,e,n,o,a,i,s){var u=Ct(e,n);t=xr(t),a=bt(o,a),jr([],[r],(function(r){var n=(r=r[0]).name+"."+t;function o(){Tt("Cannot call "+n+" due to unbound types",u)}t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&r.registeredClass.pureVirtualFunctions.push(t);var c=r.registeredClass.instancePrototype,l=c[t];return void 0===l||void 0===l.overloadTable&&l.className!==r.name&&l.argCount===e-2?(o.argCount=e-2,o.className=r.name,c[t]=o):(ut(c,t,n),c[t].overloadTable[e-2]=o),jr([],u,(function(o){var s=St(n,o,r,a,i);return void 0===c[t].overloadTable?(s.argCount=e-2,c[t]=s):c[t].overloadTable[e-2]=s,[]})),[]}))},v:function(r,t,e,n,o,a,i,s,u,c){t=xr(t),o=bt(n,o),jr([],[r],(function(r){var n=(r=r[0]).name+"."+t,l={get:function(){Tt("Cannot access "+n+" due to unbound types",[e,i])},enumerable:!0,configurable:!0};return l.set=u?()=>{Tt("Cannot access "+n+" due to unbound types",[e,i])}:r=>{Rr(n+" is a read-only property")},Object.defineProperty(r.registeredClass.instancePrototype,t,l),jr([],u?[e,i]:[e],(function(e){var i=e[0],l={get:function(){var t=Dt(this,r,n+" getter");return i.fromWireType(o(a,t))},enumerable:!0};if(u){u=bt(s,u);var f=e[1];l.set=function(t){var e=Dt(this,r,n+" setter"),o=[];u(c,e,f.toWireType(o,t)),br(o)}}return Object.defineProperty(r.registeredClass.instancePrototype,t,l),[]})),[]}))},Aa:function(r,t){zr(r,{name:t=xr(t),fromWireType:function(r){var t=$t.toValue(r);return jt(r),t},toWireType:function(r,t){return $t.toHandle(t)},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:null})},ab:function(r,t,e,n){var o=Or(e);function a(){}t=xr(t),a.values={},zr(r,{name:t,constructor:a,fromWireType:function(r){return this.constructor.values[r]},toWireType:function(r,t){return t.value},argPackAdvance:8,readValueFromPointer:xt(t,o,n),destructorFunction:null}),ct(t,a)},I:function(r,t,e){var n=Wt(r,"enum");t=xr(t);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:e},constructor:{value:Sr(n.name+"_"+t,(function(){}))}});o.values[e]=a,o[t]=a},fa:function(r,t,e){var n=Or(e);zr(r,{name:t=xr(t),fromWireType:function(r){return r},toWireType:function(r,t){return t},argPackAdvance:8,readValueFromPointer:zt(t,n),destructorFunction:null})},G:function(r,t,e,n,o,a){var i=Ct(t,e);r=xr(r),o=bt(n,o),ct(r,(function(){Tt("Cannot call "+r+" due to unbound types",i)}),t-1),jr([],i,(function(e){var n=[e[0],null].concat(e.slice(1));return wt(r,St(r,n,null,o,a),t-1),[]}))},F:function(r,t,e,n,o){t=xr(t),-1===o&&(o=4294967295);var a=Or(e),i=r=>r;if(0===n){var s=32-8*e;i=r=>r<<s>>>s}var u=t.includes("unsigned");zr(r,{name:t,fromWireType:i,toWireType:u?function(r,t){return this.name,t>>>0}:function(r,t){return this.name,t},argPackAdvance:8,readValueFromPointer:Bt(t,a,0!==n),destructorFunction:null})},y:function(r,t,e){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(r){var t=P,e=t[r>>=2],o=t[r+1];return new n(_,o,e)}zr(r,{name:e=xr(e),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},ea:function(r,t){var e="std::string"===(t=xr(t));zr(r,{name:t,fromWireType:function(r){var t,n=P[r>>2],o=r+4;if(e)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==E[s]){var u=j(a,s-a);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),a=s+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(E[o+i]);t=c.join("")}return ve(r),t},toWireType:function(r,t){var n;t instanceof ArrayBuffer&&(t=new Uint8Array(t));var o="string"==typeof t;o||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||Rr("Cannot pass non-string to std::string"),n=e&&o?$(t):t.length;var a=me(4+n+1),i=a+4;if(P[a>>2]=n,e&&o)O(t,i,n+1);else if(o)for(var s=0;s<n;++s){var u=t.charCodeAt(s);u>255&&(ve(i),Rr("String has UTF-16 code units that do not fit in 8 bits")),E[i+s]=u}else for(s=0;s<n;++s)E[i+s]=t[s];return null!==r&&r.push(ve,a),a},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:function(r){ve(r)}})},Z:function(r,t,e){var n,o,a,i,s;e=xr(e),2===t?(n=Nt,o=Lt,i=Ut,a=()=>T,s=1):4===t&&(n=Ht,o=Vt,i=qt,a=()=>P,s=2),zr(r,{name:e,fromWireType:function(r){for(var e,o=P[r>>2],i=a(),u=r+4,c=0;c<=o;++c){var l=r+4+c*t;if(c==o||0==i[l>>s]){var f=n(u,l-u);void 0===e?e=f:(e+=String.fromCharCode(0),e+=f),u=l+t}}return ve(r),e},toWireType:function(r,n){"string"!=typeof n&&Rr("Cannot pass non-string to C++ string type "+e);var a=i(n),u=me(4+a+t);return P[u>>2]=a>>s,o(n,u+4,a+t),null!==r&&r.push(ve,u),u},argPackAdvance:8,readValueFromPointer:Er,destructorFunction:function(r){ve(r)}})},Za:function(r,t,e,n,o,a){_r[r]={name:xr(t),rawConstructor:bt(e,n),rawDestructor:bt(o,a),elements:[]}},Ya:function(r,t,e,n,o,a,i,s,u){_r[r].elements.push({getterReturnType:t,getter:bt(e,n),getterContext:o,setterArgumentType:a,setter:bt(i,s),setterContext:u})},ca:function(r,t,e,n,o,a){Mr[r]={name:xr(t),rawConstructor:bt(e,n),rawDestructor:bt(o,a),fields:[]}},W:function(r,t,e,n,o,a,i,s,u,c){Mr[r].fields.push({fieldName:xr(t),getterReturnType:e,getter:bt(n,o),getterContext:a,setterArgumentType:i,setter:bt(s,u),setterContext:c})},Ca:function(r,t){zr(r,{isVoid:!0,name:t=xr(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(r,t){}})},ta:function(){return!0},ob:function(){throw 1/0},Qa:function(r,t,e,n,o){return(r=Kt[r])(t=$t.toValue(t),e=Gt(e),function(r){var t=[];return P[r>>2]=$t.toHandle(t),t}(n),o)},R:jt,Sa:function(r){return 0===r?$t.toHandle(Zt()):(r=Gt(r),$t.toHandle(Zt()[r]))},Ra:function(r,t){var e=function(r,t){for(var e=new Array(r),n=0;n<r;++n)e[n]=Wt(P[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=Qt[o];if(void 0!==a)return a;for(var i=["retType"],s=[n],u="",c=0;c<r-1;++c)u+=(0!==c?", ":"")+"arg"+c,i.push("argType"+c),s.push(e[1+c]);var l="return function "+Pr("methodCaller_"+o)+"(handle, name, destructors, args) {\n",f=0;for(c=0;c<r-1;++c)l+=" var arg"+c+" = argType"+c+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=e[c+1].argPackAdvance;for(l+=" var rv = handle[name]("+u+");\n",c=0;c<r-1;++c)e[c+1].deleteObject&&(l+=" argType"+c+".deleteObject(arg"+c+");\n");n.isVoid||(l+=" return retType.toWireType(destructors, rv);\n"),l+="};\n",i.push(l);var d,h,p=Pt(Function,i).apply(null,s);return d=p,h=Kt.length,Kt.push(d),a=h,Qt[o]=a,a},N:function(r){r>4&&(At[r].refcount+=1)},Pa:function(r){br($t.toValue(r)),jt(r)},Na:function(r,t){var e=(r=Wt(r,"_emval_take_value")).readValueFromPointer(t);return $t.toHandle(e)},ua:function(r,t){var e,n=new Date(1e3*(P[(e=r)>>2]+4294967296*C[e+4>>2]));C[t>>2]=n.getSeconds(),C[t+4>>2]=n.getMinutes(),C[t+8>>2]=n.getHours(),C[t+12>>2]=n.getDate(),C[t+16>>2]=n.getMonth(),C[t+20>>2]=n.getFullYear()-1900,C[t+24>>2]=n.getDay();var o=new Date(n.getFullYear(),0,1),a=(n.getTime()-o.getTime())/864e5|0;C[t+28>>2]=a,C[t+36>>2]=-60*n.getTimezoneOffset();var i=new Date(n.getFullYear(),6,1).getTimezoneOffset(),s=o.getTimezoneOffset(),u=0|(i!=s&&n.getTimezoneOffset()==Math.min(s,i));C[t+32>>2]=u},va:function r(t,e,n){r.called||(r.called=!0,function(r,t,e){var n=(new Date).getFullYear(),o=new Date(n,0,1),a=new Date(n,6,1),i=o.getTimezoneOffset(),s=a.getTimezoneOffset(),u=Math.max(i,s);function c(r){var t=r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}C[r>>2]=60*u,C[t>>2]=Number(i!=s);var l=c(o),f=c(a),d=Xt(l),h=Xt(f);s<i?(P[e>>2]=d,P[e+4>>2]=h):(P[e>>2]=h,P[e+4>>2]=d)}(t,e,n))},h:function(){K("")},Ta:function(r,t,e){var n=function(r,t){var e;for(re.length=0,t>>=2;e=E[r++];)t+=105!=e&t,re.push(105==e?C[t]:D[t++>>1]),++t;return re}(t,e);return X[r].apply(null,n)},O:function(){return Date.now()},qb:function(){return 2147483648},X:Jt,wa:function(r,t,e){E.copyWithin(r,t,t+e)},pb:function(r){var t,e,n=E.length,o=2147483648;if((r>>>=0)>o)return!1;for(var a=1;a<=4;a*=2){var i=n*(1+.2/a);if(i=Math.min(i,r+100663296),te(Math.min(o,(t=Math.max(r,i))+((e=65536)-t%e)%e)))return!0}return!1},ub:function(r,t){var e=0;return ne().forEach((function(n,o){var a=t+e;P[r+4*o>>2]=a,function(r,t,e){for(var n=0;n<r.length;++n)b[t++>>0]=r.charCodeAt(n);e||(b[t>>0]=0)}(n,a),e+=n.length+1})),0},vb:function(r,t){var e=ne();P[r>>2]=e.length;var n=0;return e.forEach((function(r){n+=r.length+1})),P[t>>2]=n,0},ga:ae,Y:function(r){try{var t=gr.getStreamFromFD(r);return yr.close(t),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}},qa:function(r,t,e,n){try{var o=function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=P[t>>2],s=P[t+4>>2];t+=8;var u=yr.read(r,b,i,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o}(gr.getStreamFromFD(r),t,e);return P[n>>2]=o,0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}},eb:function(r,t,e,n,o){try{var a=(u=e)+2097152>>>0<4194305-!!(s=t)?(s>>>0)+4294967296*u:NaN;if(isNaN(a))return 61;var i=gr.getStreamFromFD(r);return yr.llseek(i,a,n),I=[i.position>>>0,(B=i.position,+Math.abs(B)>=1?B>0?(0|Math.min(+Math.floor(B/4294967296),4294967295))>>>0:~~+Math.ceil((B-+(~~B>>>0))/4294967296)>>>0:0)],C[o>>2]=I[0],C[o+4>>2]=I[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}var s,u},ra:function(r,t,e,n){try{var o=function(r,t,e,n){for(var o=0,a=0;a<e;a++){var i=P[t>>2],s=P[t+4>>2];t+=8;var u=yr.write(r,b,i,s,n);if(u<0)return-1;o+=u}return o}(gr.getStreamFromFD(r),t,e);return P[n>>2]=o,0}catch(r){if(void 0===yr||!(r instanceof yr.ErrnoError))throw r;return r.errno}},Wa:function(){return Xt(location.toString())},Ua:function(){return Xt((r=Oe,self[r(146,"o^e5")][r(152,"rkxM")]()));var r},Oa:function(r,t,e){var n=Ee();try{return sr(r)(t,e)}catch(r){if(ke(n),r!==r+0)throw r;be(1,0)}},J:function(r,t,e,n,o,a){var i=Ee();try{return sr(r)(t,e,n,o,a)}catch(r){if(ke(i),r!==r+0)throw r;be(1,0)}},L:function(r,t,e,n){var o=Ee();try{return sr(r)(t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},ba:function(r,t,e,n,o,a){var i=Ee();try{return sr(r)(t,e,n,o,a)}catch(r){if(ke(i),r!==r+0)throw r;be(1,0)}},T:function(r,t){var e=Ee();try{return sr(r)(t)}catch(r){if(ke(e),r!==r+0)throw r;be(1,0)}},ma:function(r,t,e,n){var o=Ee();try{return sr(r)(t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},r:function(r){var t=Ee();try{return sr(r)()}catch(r){if(ke(t),r!==r+0)throw r;be(1,0)}},e:function(r,t){var e=Ee();try{return sr(r)(t)}catch(r){if(ke(e),r!==r+0)throw r;be(1,0)}},La:function(r,t,e){var n=Ee();try{return sr(r)(t,e)}catch(r){if(ke(n),r!==r+0)throw r;be(1,0)}},d:function(r,t,e){var n=Ee();try{return sr(r)(t,e)}catch(r){if(ke(n),r!==r+0)throw r;be(1,0)}},j:function(r,t,e,n){var o=Ee();try{return sr(r)(t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},Q:function(r,t,e,n,o){var a=Ee();try{return sr(r)(t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},l:function(r,t,e,n,o){var a=Ee();try{return sr(r)(t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},kb:function(r,t,e,n,o,a){var i=Ee();try{return sr(r)(t,e,n,o,a)}catch(r){if(ke(i),r!==r+0)throw r;be(1,0)}},Ja:function(r,t,e,n,o,a,i){var s=Ee();try{return sr(r)(t,e,n,o,a,i)}catch(r){if(ke(s),r!==r+0)throw r;be(1,0)}},u:function(r,t,e,n,o,a){var i=Ee();try{return sr(r)(t,e,n,o,a)}catch(r){if(ke(i),r!==r+0)throw r;be(1,0)}},A:function(r,t,e,n,o,a,i){var s=Ee();try{return sr(r)(t,e,n,o,a,i)}catch(r){if(ke(s),r!==r+0)throw r;be(1,0)}},na:function(r,t,e,n,o,a,i,s){var u=Ee();try{return sr(r)(t,e,n,o,a,i,s)}catch(r){if(ke(u),r!==r+0)throw r;be(1,0)}},Da:function(r,t,e,n,o,a,i,s,u,c){var l=Ee();try{return sr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(ke(l),r!==r+0)throw r;be(1,0)}},V:function(r,t,e,n,o,a,i,s,u,c,l,f){var d=Ee();try{return sr(r)(t,e,n,o,a,i,s,u,c,l,f)}catch(r){if(ke(d),r!==r+0)throw r;be(1,0)}},hb:function(r,t,e,n){var o=Ee();try{return De(r,t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},db:function(r){var t=Ee();try{return Fe(r)}catch(r){if(ke(t),r!==r+0)throw r;be(1,0)}},ib:function(r,t){var e=Ee();try{return Pe(r,t)}catch(r){if(ke(e),r!==r+0)throw r;be(1,0)}},cb:function(r,t,e){var n=Ee();try{return Ae(r,t,e)}catch(r){if(ke(n),r!==r+0)throw r;be(1,0)}},bb:function(r,t,e,n,o){var a=Ee();try{return je(r,t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},m:function(r){var t=Ee();try{sr(r)()}catch(r){if(ke(t),r!==r+0)throw r;be(1,0)}},i:function(r,t){var e=Ee();try{sr(r)(t)}catch(r){if(ke(e),r!==r+0)throw r;be(1,0)}},S:function(r,t,e){var n=Ee();try{sr(r)(t,e)}catch(r){if(ke(n),r!==r+0)throw r;be(1,0)}},ha:function(r,t,e,n){var o=Ee();try{sr(r)(t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},K:function(r,t,e,n,o,a,i,s){var u=Ee();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(ke(u),r!==r+0)throw r;be(1,0)}},Ha:function(r,t,e){var n=Ee();try{sr(r)(t,e)}catch(r){if(ke(n),r!==r+0)throw r;be(1,0)}},b:function(r,t,e){var n=Ee();try{sr(r)(t,e)}catch(r){if(ke(n),r!==r+0)throw r;be(1,0)}},P:function(r,t,e,n){var o=Ee();try{sr(r)(t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},aa:function(r,t,e,n,o){var a=Ee();try{sr(r)(t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},Ia:function(r,t,e,n,o,a,i){var s=Ee();try{sr(r)(t,e,n,o,a,i)}catch(r){if(ke(s),r!==r+0)throw r;be(1,0)}},_:function(r,t,e,n,o,a,i,s){var u=Ee();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(ke(u),r!==r+0)throw r;be(1,0)}},Ka:function(r,t,e,n,o){var a=Ee();try{sr(r)(t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},Ea:function(r,t,e,n,o,a,i,s){var u=Ee();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(ke(u),r!==r+0)throw r;be(1,0)}},Fa:function(r,t,e,n){var o=Ee();try{sr(r)(t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},ia:function(r,t,e,n,o){var a=Ee();try{sr(r)(t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},ja:function(r,t,e,n,o,a){var i=Ee();try{sr(r)(t,e,n,o,a)}catch(r){if(ke(i),r!==r+0)throw r;be(1,0)}},g:function(r,t,e,n){var o=Ee();try{sr(r)(t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},M:function(r,t,e,n,o,a){var i=Ee();try{sr(r)(t,e,n,o,a)}catch(r){if(ke(i),r!==r+0)throw r;be(1,0)}},z:function(r,t,e,n,o,a,i){var s=Ee();try{sr(r)(t,e,n,o,a,i)}catch(r){if(ke(s),r!==r+0)throw r;be(1,0)}},k:function(r,t,e,n,o){var a=Ee();try{sr(r)(t,e,n,o)}catch(r){if(ke(a),r!==r+0)throw r;be(1,0)}},p:function(r,t,e,n,o,a){var i=Ee();try{sr(r)(t,e,n,o,a)}catch(r){if(ke(i),r!==r+0)throw r;be(1,0)}},Ga:function(r,t,e,n,o,a,i){var s=Ee();try{sr(r)(t,e,n,o,a,i)}catch(r){if(ke(s),r!==r+0)throw r;be(1,0)}},C:function(r,t,e,n,o,a,i){var s=Ee();try{sr(r)(t,e,n,o,a,i)}catch(r){if(ke(s),r!==r+0)throw r;be(1,0)}},ka:function(r,t,e,n,o,a,i,s,u,c){var l=Ee();try{sr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(ke(l),r!==r+0)throw r;be(1,0)}},w:function(r,t,e,n,o,a,i,s){var u=Ee();try{sr(r)(t,e,n,o,a,i,s)}catch(r){if(ke(u),r!==r+0)throw r;be(1,0)}},$:function(r,t,e,n,o,a,i,s,u){var c=Ee();try{sr(r)(t,e,n,o,a,i,s,u)}catch(r){if(ke(c),r!==r+0)throw r;be(1,0)}},D:function(r,t,e,n,o,a,i,s,u,c){var l=Ee();try{sr(r)(t,e,n,o,a,i,s,u,c)}catch(r){if(ke(l),r!==r+0)throw r;be(1,0)}},B:function(r,t,e,n,o,a,i,s,u,c,l){var f=Ee();try{sr(r)(t,e,n,o,a,i,s,u,c,l)}catch(r){if(ke(f),r!==r+0)throw r;be(1,0)}},U:function(r,t,e,n,o,a,i,s,u,c,l,f,d,h,p,m){var v=Ee();try{sr(r)(t,e,n,o,a,i,s,u,c,l,f,d,h,p,m)}catch(r){if(ke(v),r!==r+0)throw r;be(1,0)}},gb:function(r,t,e,n){var o=Ee();try{Se(r,t,e,n)}catch(r){if(ke(o),r!==r+0)throw r;be(1,0)}},H:function(r){return r},Ma:ce,jb:function(r,t,e,n,o){return ce(r,t,e,n)}},me=(function(){var r={a:pe};function t(r,t){var e,n=r.exports;o.asm=n,x((v=o.asm.Ab).buffer),W=o.asm.Db,e=o.asm.Bb,L.unshift(e),G()}function n(r){t(r.instance)}function a(t){return(h||"function"!=typeof fetch?Promise.resolve().then((function(){return Q(R)})):fetch(R,{credentials:"same-origin"}).then((function(r){if(!r.ok)throw"failed to load wasm binary file at '"+R+"'";return r.arrayBuffer()})).catch((function(){return Q(R)}))).then((function(t){return WebAssembly.instantiate(t,r)})).then((function(r){return r})).then(t,(function(r){m("failed to asynchronously prepare wasm: "+r),K(r)}))}if(Y(),o.instantiateWasm)try{return o.instantiateWasm(r,t)}catch(r){m("Module.instantiateWasm callback failed with error: "+r),e(r)}(h||"function"!=typeof WebAssembly.instantiateStreaming||Z(R)||"function"!=typeof fetch?a(n):fetch(R,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,r).then(n,(function(r){return m("wasm streaming compile failed: "+r),m("falling back to ArrayBuffer instantiation"),a(n)}))}))).catch(e)}(),o.___wasm_call_ctors=function(){return(o.___wasm_call_ctors=o.asm.Bb).apply(null,arguments)},o._malloc=function(){return(me=o._malloc=o.asm.Cb).apply(null,arguments)}),ve=o._free=function(){return(ve=o._free=o.asm.Eb).apply(null,arguments)},ye=o.___errno_location=function(){return(ye=o.___errno_location=o.asm.Fb).apply(null,arguments)},ge=o.setTempRet0=function(){return(ge=o.setTempRet0=o.asm.Gb).apply(null,arguments)},we=o.___getTypeName=function(){return(we=o.___getTypeName=o.asm.Hb).apply(null,arguments)},_e=(o.__embind_initialize_bindings=function(){return(o.__embind_initialize_bindings=o.asm.Ib).apply(null,arguments)},o._emscripten_builtin_memalign=function(){return(_e=o._emscripten_builtin_memalign=o.asm.Jb).apply(null,arguments)}),be=o._setThrew=function(){return(be=o._setThrew=o.asm.Kb).apply(null,arguments)},Ee=o.stackSave=function(){return(Ee=o.stackSave=o.asm.Lb).apply(null,arguments)},ke=o.stackRestore=function(){return(ke=o.stackRestore=o.asm.Mb).apply(null,arguments)},Te=o.___cxa_can_catch=function(){return(Te=o.___cxa_can_catch=o.asm.Nb).apply(null,arguments)},Ce=o.___cxa_is_pointer_type=function(){return(Ce=o.___cxa_is_pointer_type=o.asm.Ob).apply(null,arguments)},Pe=o.dynCall_ji=function(){return(Pe=o.dynCall_ji=o.asm.Pb).apply(null,arguments)},Se=o.dynCall_vij=function(){return(Se=o.dynCall_vij=o.asm.Qb).apply(null,arguments)},De=o.dynCall_iij=function(){return(De=o.dynCall_iij=o.asm.Rb).apply(null,arguments)},Fe=(o.dynCall_iiiijj=function(){return(o.dynCall_iiiijj=o.asm.Sb).apply(null,arguments)},o.dynCall_viijj=function(){return(o.dynCall_viijj=o.asm.Tb).apply(null,arguments)},o.dynCall_viiijjjj=function(){return(o.dynCall_viiijjjj=o.asm.Ub).apply(null,arguments)},o.dynCall_jjj=function(){return(o.dynCall_jjj=o.asm.Vb).apply(null,arguments)},o.dynCall_jiji=function(){return(o.dynCall_jiji=o.asm.Wb).apply(null,arguments)},o.dynCall_j=function(){return(Fe=o.dynCall_j=o.asm.Xb).apply(null,arguments)}),Ae=o.dynCall_jii=function(){return(Ae=o.dynCall_jii=o.asm.Yb).apply(null,arguments)},je=(o.dynCall_viijii=function(){return(o.dynCall_viijii=o.asm.Zb).apply(null,arguments)},o.dynCall_jiiii=function(){return(je=o.dynCall_jiiii=o.asm._b).apply(null,arguments)});function Me(r){function e(){he||(he=!0,o.calledRun=!0,g||(o.noFSInit||yr.init.initialized||yr.init(),yr.ignorePermissions=!1,pr.init(),rr(L),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)r=o.postRun.shift(),U.unshift(r);var r;rr(U)}()))}r=r||c,H>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)r=o.preRun.shift(),N.unshift(r);var r;rr(N)}(),H>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.dynCall_iiiiij=function(){return(o.dynCall_iiiiij=o.asm.$b).apply(null,arguments)},o.dynCall_iiiiijj=function(){return(o.dynCall_iiiiijj=o.asm.ac).apply(null,arguments)},o.dynCall_iiiiiijj=function(){return(o.dynCall_iiiiiijj=o.asm.bc).apply(null,arguments)},o.___start_em_js=833812,o.___stop_em_js=833920,o.UTF8ToString=j,o.stringToUTF8=O,o.lengthBytesUTF8=$,o.allocateUTF8=Xt,q=function r(){he||Me(),he||(q=r)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function Oe(r,t){var e=$e();return Oe=function(t,n){var o=e[t-=146];if(void 0===Oe.tkTjKS){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};Oe.tZZBeS=i,r=arguments,Oe.tkTjKS=!0}var s=e[0],u=t+s,c=r[u];return c?o=c:(void 0===Oe.sbCWZp&&(Oe.sbCWZp=!0),o=Oe.tZZBeS(o,n),r[u]=o),o},Oe(r,t)}function $e(){var r=["WQHJuCkhnb5y","mSoXWQW3WOTWlSkrmMmld8o3","bmknEZPlWODQWOTsW5upemoG","eG5KWQz0W6ldTZ/dGCo8WPzBuW","WQfkgXf5WQCO","vthcJSk4xCkvv8kOBSo7WQRdIa","BCoJWQpdVSkzmSow","qmoIW5zctcxcT8ol","lmomo8otW6PCWOJdMCkyW4CPWQG","W4RcOG5sf8k6W7BcMmolW4CdcmkcW5W","ESktWQrIvYpcRgRcIfNdUsvvhq","z8kQW7/cGSoVsCkiA8oal8kEWOPm","bmogg8oWW5lcIwBcLCkqWQpdV8kKFq","jCoKwcNdUmo9W6vS","nCo0WQeWWOTWumkXe1aImq","W6yZWRJdJ1mIW4tcNaRcPGZdIq","WQJcSufudL1juSoEW6BcOgFcLq","WOxcGCotkxHahbnuWPRcKhPZ","ymk9ogZcS8kSWR1zW5zuW40vsW","WR/dOmkuWOHhWP0h"];return($e=function(){return r})()}Me(),function(r,t){for(var e=Oe,n=r();;)try{if(730287==-parseInt(e(154,"UMCp"))/1+parseInt(e(157,"rkxM"))/2+-parseInt(e(160,"Wx8f"))/3*(-parseInt(e(163,")a!4"))/4)+parseInt(e(162,"S]@J"))/5+-parseInt(e(164,"J!Bh"))/6+-parseInt(e(156,"0F7L"))/7*(-parseInt(e(165,"]dor"))/8)+-parseInt(e(149,"$x*i"))/9)break;n.push(n.shift())}catch(r){n.push(n.shift())}}($e);var ighnua,xe=(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}),We=xe(this,(function(){var r=function(){return!r.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(We)};return r()}));return We(),r.ready});r.exports=o}]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "scanbot-web-sdk",
3
3
  "title": "Web Scan SDK",
4
- "version": "2.12.1-alpha.1",
4
+ "version": "2.13.0-alpha.1",
5
5
  "description": "Scanbot Web Document and Barcode Scanner SDK",
6
6
  "keywords": [
7
7
  "barcode",
@@ -40,7 +40,7 @@
40
40
  "build:docker": "npm run build-lib:docker && npm run build-src",
41
41
  "dev-build": "npm run dev-build-lib && npm run dev-build-src",
42
42
  "build-lib": "lib/core/wrappers/websdk/build-all-flavours.sh -DCMAKE_BUILD_TYPE=Release",
43
- "build-lib:docker": "lib/core/docker/emscripten/build-core-with-emscripten.sh --build",
43
+ "build-lib:docker": "DOCKER_IMAGE_NAME=sdk_core_emscripten:develop lib/core/docker/emscripten/build.sh --non-interactive --build -DCMAKE_BUILD_TYPE=Release",
44
44
  "dev-build-lib": "lib/core/wrappers/websdk/build-all-flavours.sh -DCMAKE_BUILD_TYPE=Debug",
45
45
  "dev-build-lib:docker": "lib/core/docker/emscripten/build-core-with-emscripten.sh --interactive --build -DCMAKE_BUILD_TYPE=Debug",
46
46
  "build-src": "npx webpack --mode production && mkdir -p internal-dev-app/data && date '+%a %b %d %Y %H:%M:%S GMT%z (%Z)' >> internal-dev-app/data/src-build-date.txt",