@getyoti/react-face-capture 1.3.1-test.1 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getyoti/react-face-capture",
3
- "version": "1.3.1-test.1",
3
+ "version": "1.3.1",
4
4
  "description": "Face capture module to collect picture and data for Yoti AI API",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -9,6 +9,7 @@
9
9
  "dependencies": {
10
10
  "@lingui/macro": "3.6.0",
11
11
  "@lingui/react": "3.6.0",
12
+ "@mediapipe/tasks-vision": "0.10.21",
12
13
  "axios": "0.24.0",
13
14
  "classnames": "2.2.6",
14
15
  "face-api.js": "0.22.0"
@@ -18,7 +19,7 @@
18
19
  "react-dom": ">=16.12.0 <18"
19
20
  },
20
21
  "devDependencies": {
21
- "@babel/core": "7.23.2",
22
+ "@babel/core": "7.12.3",
22
23
  "@babel/eslint-parser": "7.16.5",
23
24
  "@babel/plugin-proposal-class-properties": "7.12.1",
24
25
  "@babel/plugin-transform-modules-commonjs": "7.16.0",
@@ -39,7 +40,7 @@
39
40
  "@testing-library/jest-dom": "5.11.6",
40
41
  "@testing-library/react": "11.1.2",
41
42
  "@testing-library/react-hooks": "7.0.2",
42
- "@yoti/ui-kit-components-react": "4.0.0-alpha.9",
43
+ "@yoti/ui-kit-components-react": "4.0.1",
43
44
  "@yoti/webpack-config": "1.0.0-alpha.5",
44
45
  "audit-ci": "6.1.2",
45
46
  "autoprefixer": "10.0.2",
@@ -78,8 +79,8 @@
78
79
  "prettier": "2.1.2",
79
80
  "process": "0.11.10",
80
81
  "prop-types": "15.7.2",
81
- "react": "16.12.0",
82
- "react-dom": "16.12.0",
82
+ "react": "16.14.0",
83
+ "react-dom": "16.14.0",
83
84
  "replace-in-file": "6.1.0",
84
85
  "sass": "1.29.0",
85
86
  "sass-loader": "12.1.0",
@@ -0,0 +1 @@
1
+ var ModuleFactory=(()=>{var e="undefined"!=typeof document?document.currentScript?.src:void 0;return"undefined"!=typeof __filename&&(e||=__filename),function(r={}){var t,n,a,o,i=r,s=new Promise(((e,r)=>{t=e,n=r})),u="object"==typeof window,c="function"==typeof importScripts,l="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,d=Object.assign({},i),m="./this.program",f=(e,r)=>{throw r},p="";if(l){var g=require("fs"),h=require("path");p=__dirname+"/",o=e=>(e=W(e)?new URL(e):h.normalize(e),g.readFileSync(e)),a=(e,r=!0)=>(e=W(e)?new URL(e):h.normalize(e),new Promise(((t,n)=>{g.readFile(e,r?void 0:"utf8",((e,a)=>{e?n(e):t(r?a.buffer:a)}))}))),!i.thisProgram&&process.argv.length>1&&(m=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),f=(e,r)=>{throw process.exitCode=e,r}}else(u||c)&&(c?p=self.location.href:"undefined"!=typeof document&&document.currentScript&&(p=document.currentScript.src),e&&(p=e),p=p.startsWith("blob:")?"":p.substr(0,p.replace(/[?#].*/,"").lastIndexOf("/")+1),c&&(o=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),a=e=>W(e)?new Promise(((r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{(200==n.status||0==n.status&&n.response)&&t(n.response),r(n.status)},n.onerror=r,n.send(null)})):fetch(e,{credentials:"same-origin"}).then((e=>e.ok?e.arrayBuffer():Promise.reject(new Error(e.status+" : "+e.url)))));var v,b,w=i.print||console.log.bind(console),y=i.printErr||console.error.bind(console);Object.assign(i,d),d=null,i.arguments&&i.arguments,i.thisProgram&&(m=i.thisProgram),i.quit&&(f=i.quit),i.wasmBinary&&(v=i.wasmBinary);var _,x,E,S,k,L,B,C,P,F=!1;function I(){var e=b.buffer;i.HEAP8=x=new Int8Array(e),i.HEAP16=S=new Int16Array(e),i.HEAPU8=E=new Uint8Array(e),i.HEAPU16=k=new Uint16Array(e),i.HEAP32=L=new Int32Array(e),i.HEAPU32=B=new Uint32Array(e),i.HEAPF32=C=new Float32Array(e),i.HEAPF64=P=new Float64Array(e)}var T=[],A=[],O=[];var D=0,V=null,j=null;function M(e){D++,i.monitorRunDependencies?.(D)}function R(e){if(D--,i.monitorRunDependencies?.(D),0==D&&(null!==V&&(clearInterval(V),V=null),j)){var r=j;j=null,r()}}function U(e){i.onAbort?.(e),y(e="Aborted("+e+")"),F=!0,_=1,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw n(r),r}var z,G,N,$=e=>e.startsWith("data:application/octet-stream;base64,"),W=e=>e.startsWith("file://");function H(){var e,r="vision_wasm_internal.wasm";return $(r)?r:(e=r,i.locateFile?i.locateFile(e,p):p+e)}function J(e){if(e==z&&v)return new Uint8Array(v);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}function q(e,r,t){return function(e){return v?Promise.resolve().then((()=>J(e))):a(e).then((e=>new Uint8Array(e)),(()=>J(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then(t,(e=>{y(`failed to asynchronously prepare wasm: ${e}`),U(e)}))}var X={1285021:e=>{const r=We.toValue(e).getContext("webgpu");return Ir.importJsTexture(r.getCurrentTexture())},1285164:(e,r,t,n,a)=>{const o=We.toValue(e),i=Ir.getJsObject(r),s=Ir.getJsObject(t),u=n,c=a;i.queue.copyExternalImageToTexture({source:o},{texture:s},[u,c])},1285423:(e,r,t,n)=>{const a=We.toValue(e),o=Ir.getJsObject(r),i=Ir.getJsObject(t),s=Ir.getJsObject(n),u=o.createBindGroup({layout:s,entries:[{binding:0,resource:i},{binding:1,resource:a}]});return Ir.importJsBindGroup(u)},1285793:(e,r)=>{const t=We.toValue(e),n=We.toValue(r);n.getContext("2d").drawImage(t,0,0,n.width,n.height)},1285958:(e,r)=>{const t=We.toValue(e),n=We.toValue(r),a=n.getContext("2d"),o=new ImageData(t,n.width,n.height);a.putImageData(o,0,0)},1286182:(e,r)=>{const t=We.toValue(e),n=We.toValue(r),a=t.getContext("2d").getImageData(0,0,t.width,t.height);n.set(a.data)},1286386:()=>"undefined"!=typeof HTMLCanvasElement,1286441:()=>!!i.preinitializedWebGPUDevice,1286492:()=>{Sr["#canvas"]=i.canvas},1286543:()=>"undefined"!=typeof wasmOffsetConverter};var Y,Q=(e,r)=>{if(se.mainLoop.timingMode=e,se.mainLoop.timingValue=r,!se.mainLoop.func)return 1;if(se.mainLoop.running||(se.mainLoop.running=!0),0==e)se.mainLoop.scheduler=function(){var e=0|Math.max(0,se.mainLoop.tickStartTime+r-Y());setTimeout(se.mainLoop.runner,e)},se.mainLoop.method="timeout";else if(1==e)se.mainLoop.scheduler=function(){se.requestAnimationFrame(se.mainLoop.runner)},se.mainLoop.method="rAF";else if(2==e){if(void 0===se.setImmediate)if("undefined"==typeof setImmediate){var t=[],n="setimmediate";addEventListener("message",(e=>{e.data!==n&&e.data.target!==n||(e.stopPropagation(),t.shift()())}),!0),se.setImmediate=function(e){t.push(e),c?(i.setImmediates??=[],i.setImmediates.push(e),postMessage({target:n})):postMessage(n,"*")}}else se.setImmediate=setImmediate;se.mainLoop.scheduler=function(){se.setImmediate(se.mainLoop.runner)},se.mainLoop.method="immediate"}return 0};Y=()=>performance.now();var K=e=>{if(e instanceof Z||"unwind"==e)return _;f(1,e)};function Z(e){this.name="ExitStatus",this.message=`Program terminated with exit(${e})`,this.status=e}var ee=()=>ce||!1,re=e=>{_=e,ee()||(i.onExit?.(e),F=!0),f(e,new Z(e))},te=(e,r)=>{_=e,re(e)},ne=e=>{if(!F)try{e(),(()=>{if(!ee())try{te(_)}catch(e){K(e)}})()}catch(r){K(r)}},ae=(e,r)=>setTimeout((()=>{ne(e)}),r),oe=e=>{oe.shown||={},oe.shown[e]||(oe.shown[e]=1,l&&(e="warning: "+e),y(e))},ie=i.preloadPlugins||[],se={mainLoop:{running:!1,scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause(){se.mainLoop.scheduler=null,se.mainLoop.currentlyRunningMainloop++},resume(){se.mainLoop.currentlyRunningMainloop++;var e=se.mainLoop.timingMode,r=se.mainLoop.timingValue,t=se.mainLoop.func;se.mainLoop.func=null,((e,r,t,n,a)=>{se.mainLoop.func=e,se.mainLoop.arg=n;var o=se.mainLoop.currentlyRunningMainloop;function i(){return!(o<se.mainLoop.currentlyRunningMainloop)}if(se.mainLoop.running=!1,se.mainLoop.runner=function(){if(!F)if(se.mainLoop.queue.length>0){Date.now();var r=se.mainLoop.queue.shift();if(r.func(r.arg),se.mainLoop.remainingBlockers){var t=se.mainLoop.remainingBlockers,n=t%1==0?t-1:Math.floor(t);r.counted?se.mainLoop.remainingBlockers=n:(n+=.5,se.mainLoop.remainingBlockers=(8*t+n)/9)}if(se.mainLoop.updateStatus(),!i())return;setTimeout(se.mainLoop.runner,0)}else i()&&(se.mainLoop.currentFrameNumber=se.mainLoop.currentFrameNumber+1|0,1==se.mainLoop.timingMode&&se.mainLoop.timingValue>1&&se.mainLoop.currentFrameNumber%se.mainLoop.timingValue!=0?se.mainLoop.scheduler():(0==se.mainLoop.timingMode&&(se.mainLoop.tickStartTime=Y()),_r.newRenderingFrameStarted(),se.mainLoop.runIter(e),i()&&("object"==typeof SDL&&SDL.audio?.queueNewAudioData?.(),se.mainLoop.scheduler())))},a||(r&&r>0?Q(0,1e3/r):Q(1,1),se.mainLoop.scheduler()),t)throw"unwind"})(t,0,!1,se.mainLoop.arg,!0),Q(e,r),se.mainLoop.scheduler()},updateStatus(){if(i.setStatus){var e=i.statusMessage||"Please wait...",r=se.mainLoop.remainingBlockers,t=se.mainLoop.expectedBlockers;r?r<t?i.setStatus("{message} ({expected - remaining}/{expected})"):i.setStatus(e):i.setStatus("")}},runIter(e){if(!F){if(i.preMainLoop)if(!1===i.preMainLoop())return;ne(e),i.postMainLoop?.()}}},isFullscreen:!1,pointerLock:!1,moduleContextCreatedCallbacks:[],workers:[],init(){if(!se.initted){se.initted=!0;var e={canHandle:function(e){return!i.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(e)},handle:function(e,r,t,n){var a=new Blob([e],{type:se.getMimetype(r)});a.size!==e.length&&(a=new Blob([new Uint8Array(e).buffer],{type:se.getMimetype(r)}));var o=URL.createObjectURL(a),i=new Image;i.onload=()=>{var n=document.createElement("canvas");n.width=i.width,n.height=i.height,n.getContext("2d").drawImage(i,0,0),Xr[r]=n,URL.revokeObjectURL(o),t?.(e)},i.onerror=e=>{y(`Image ${o} could not be decoded`),n?.()},i.src=o}};ie.push(e);var r={canHandle:function(e){return!i.noAudioDecoding&&e.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(e,r,t,n){var a=!1;function o(n){a||(a=!0,Yr[r]=n,t?.(e))}var i=new Blob([e],{type:se.getMimetype(r)}),s=URL.createObjectURL(i),u=new Audio;u.addEventListener("canplaythrough",(()=>o(u)),!1),u.onerror=function(t){a||(y(`warning: browser could not fully decode audio ${r}, trying slower base64 approach`),u.src="data:audio/x-"+r.substr(-3)+";base64,"+function(e){for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="",n=0,a=0,o=0;o<e.length;o++)for(n=n<<8|e[o],a+=8;a>=6;){var i=n>>a-6&63;a-=6,t+=r[i]}return 2==a?(t+=r[(3&n)<<4],t+="=="):4==a&&(t+=r[(15&n)<<2],t+="="),t}(e),o(u))},u.src=s,ae((()=>{o(u)}),1e4)}};ie.push(r);var t=i.canvas;t&&(t.requestPointerLock=t.requestPointerLock||t.mozRequestPointerLock||t.webkitRequestPointerLock||t.msRequestPointerLock||(()=>{}),t.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||(()=>{}),t.exitPointerLock=t.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",n,!1),document.addEventListener("mozpointerlockchange",n,!1),document.addEventListener("webkitpointerlockchange",n,!1),document.addEventListener("mspointerlockchange",n,!1),i.elementPointerLock&&t.addEventListener("click",(e=>{!se.pointerLock&&i.canvas.requestPointerLock&&(i.canvas.requestPointerLock(),e.preventDefault())}),!1))}function n(){se.pointerLock=document.pointerLockElement===i.canvas||document.mozPointerLockElement===i.canvas||document.webkitPointerLockElement===i.canvas||document.msPointerLockElement===i.canvas}},createContext(e,r,t,n){if(r&&i.ctx&&e==i.canvas)return i.ctx;var a,o;if(r){var s={antialias:!1,alpha:!1,majorVersion:"undefined"!=typeof WebGL2RenderingContext?2:1};if(n)for(var u in n)s[u]=n[u];void 0!==_r&&(o=_r.createContext(e,s))&&(a=_r.getContext(o).GLctx)}else a=e.getContext("2d");return a?(t&&(i.ctx=a,r&&_r.makeContextCurrent(o),i.useWebGL=r,se.moduleContextCreatedCallbacks.forEach((e=>e())),se.init()),a):null},destroyContext(e,r,t){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen(e,r){se.lockPointer=e,se.resizeCanvas=r,void 0===se.lockPointer&&(se.lockPointer=!0),void 0===se.resizeCanvas&&(se.resizeCanvas=!1);var t=i.canvas;function n(){se.isFullscreen=!1;var e=t.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e?(t.exitFullscreen=se.exitFullscreen,se.lockPointer&&t.requestPointerLock(),se.isFullscreen=!0,se.resizeCanvas?se.setFullscreenCanvasSize():se.updateCanvasDimensions(t)):(e.parentNode.insertBefore(t,e),e.parentNode.removeChild(e),se.resizeCanvas?se.setWindowedCanvasSize():se.updateCanvasDimensions(t)),i.onFullScreen?.(se.isFullscreen),i.onFullscreen?.(se.isFullscreen)}se.fullscreenHandlersInstalled||(se.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",n,!1),document.addEventListener("mozfullscreenchange",n,!1),document.addEventListener("webkitfullscreenchange",n,!1),document.addEventListener("MSFullscreenChange",n,!1));var a=document.createElement("div");t.parentNode.insertBefore(a,t),a.appendChild(t),a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||(a.webkitRequestFullscreen?()=>a.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):null)||(a.webkitRequestFullScreen?()=>a.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT):null),a.requestFullscreen()},exitFullscreen:()=>!!se.isFullscreen&&((document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||(()=>{})).apply(document,[]),!0),nextRAF:0,fakeRequestAnimationFrame(e){var r=Date.now();if(0===se.nextRAF)se.nextRAF=r+1e3/60;else for(;r+2>=se.nextRAF;)se.nextRAF+=1e3/60;var t=Math.max(se.nextRAF-r,0);setTimeout(e,t)},requestAnimationFrame(e){"function"!=typeof requestAnimationFrame?(0,se.fakeRequestAnimationFrame)(e):requestAnimationFrame(e)},safeSetTimeout:(e,r)=>ae(e,r),safeRequestAnimationFrame:e=>se.requestAnimationFrame((()=>{ne(e)})),getMimetype:e=>({jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[e.substr(e.lastIndexOf(".")+1)]),getUserMedia(e){window.getUserMedia||=navigator.getUserMedia||navigator.mozGetUserMedia,window.getUserMedia(e)},getMovementX:e=>e.movementX||e.mozMovementX||e.webkitMovementX||0,getMovementY:e=>e.movementY||e.mozMovementY||e.webkitMovementY||0,getMouseWheelDelta(e){var r=0;switch(e.type){case"DOMMouseScroll":r=e.detail/3;break;case"mousewheel":r=e.wheelDelta/120;break;case"wheel":switch(r=e.deltaY,e.deltaMode){case 0:r/=100;break;case 1:r/=3;break;case 2:r*=80;break;default:throw"unrecognized mouse wheel delta mode: "+e.deltaMode}break;default:throw"unrecognized mouse wheel event: "+e.type}return r},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseCoords(e,r){var t=i.canvas.getBoundingClientRect(),n=i.canvas.width,a=i.canvas.height,o=void 0!==window.scrollX?window.scrollX:window.pageXOffset,s=void 0!==window.scrollY?window.scrollY:window.pageYOffset,u=e-(o+t.left),c=r-(s+t.top);return{x:u*=n/t.width,y:c*=a/t.height}},setMouseCoords(e,r){const{x:t,y:n}=se.calculateMouseCoords(e,r);se.mouseMovementX=t-se.mouseX,se.mouseMovementY=n-se.mouseY,se.mouseX=t,se.mouseY=n},calculateMouseEvent(e){if(se.pointerLock)"mousemove"!=e.type&&"mozMovementX"in e?se.mouseMovementX=se.mouseMovementY=0:(se.mouseMovementX=se.getMovementX(e),se.mouseMovementY=se.getMovementY(e)),se.mouseX+=se.mouseMovementX,se.mouseY+=se.mouseMovementY;else{if("touchstart"===e.type||"touchend"===e.type||"touchmove"===e.type){var r=e.touch;if(void 0===r)return;var t=se.calculateMouseCoords(r.pageX,r.pageY);if("touchstart"===e.type)se.lastTouches[r.identifier]=t,se.touches[r.identifier]=t;else if("touchend"===e.type||"touchmove"===e.type){var n=se.touches[r.identifier];n||=t,se.lastTouches[r.identifier]=n,se.touches[r.identifier]=t}return}se.setMouseCoords(e.pageX,e.pageY)}},resizeListeners:[],updateResizeListeners(){var e=i.canvas;se.resizeListeners.forEach((r=>r(e.width,e.height)))},setCanvasSize(e,r,t){var n=i.canvas;se.updateCanvasDimensions(n,e,r),t||se.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize(){if("undefined"!=typeof SDL){var e=B[SDL.screen>>2];e|=8388608,L[SDL.screen>>2]=e}se.updateCanvasDimensions(i.canvas),se.updateResizeListeners()},setWindowedCanvasSize(){if("undefined"!=typeof SDL){var e=B[SDL.screen>>2];e&=-8388609,L[SDL.screen>>2]=e}se.updateCanvasDimensions(i.canvas),se.updateResizeListeners()},updateCanvasDimensions(e,r,t){r&&t?(e.widthNative=r,e.heightNative=t):(r=e.widthNative,t=e.heightNative);var n=r,a=t;if(i.forcedAspectRatio&&i.forcedAspectRatio>0&&(n/a<i.forcedAspectRatio?n=Math.round(a*i.forcedAspectRatio):a=Math.round(n/i.forcedAspectRatio)),(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===e.parentNode&&"undefined"!=typeof screen){var o=Math.min(screen.width/n,screen.height/a);n=Math.round(n*o),a=Math.round(a*o)}se.resizeCanvas?(e.width!=n&&(e.width=n),e.height!=a&&(e.height=a),void 0!==e.style&&(e.style.removeProperty("width"),e.style.removeProperty("height"))):(e.width!=r&&(e.width=r),e.height!=t&&(e.height=t),void 0!==e.style&&(n!=r||a!=t?(e.style.setProperty("width",n+"px","important"),e.style.setProperty("height",a+"px","important")):(e.style.removeProperty("width"),e.style.removeProperty("height"))))}},ue=e=>{for(;e.length>0;)e.shift()(i)},ce=i.noExitRuntime||!0,le=e=>It(e),de=()=>At();class me{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){B[this.ptr+4>>2]=e}get_type(){return B[this.ptr+4>>2]}set_destructor(e){B[this.ptr+8>>2]=e}get_destructor(){return B[this.ptr+8>>2]}set_caught(e){e=e?1:0,x[this.ptr+12]=e}get_caught(){return 0!=x[this.ptr+12]}set_rethrown(e){e=e?1:0,x[this.ptr+13]=e}get_rethrown(){return 0!=x[this.ptr+13]}init(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)}set_adjusted_ptr(e){B[this.ptr+16>>2]=e}get_adjusted_ptr(){return B[this.ptr+16>>2]}get_exception_ptr(){if(Ot(this.get_type()))return B[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var fe={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var a=e[n];"."===a?e.splice(n,1):".."===a?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=fe.isAbs(e),t="/"===e.substr(-1);return(e=fe.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=fe.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=fe.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:(...e)=>fe.normalize(e.join("/")),join2:(e,r)=>fe.normalize(e+"/"+r)},pe=e=>(pe=(()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);if(l)try{var e=require("crypto");if(e.randomFillSync)return r=>e.randomFillSync(r);var r=e.randomBytes;return e=>(e.set(r(e.byteLength)),e)}catch(t){}U("initRandomDevice")})())(e),ge={resolve:(...e)=>{for(var r="",t=!1,n=e.length-1;n>=-1&&!t;n--){var a=n>=0?e[n]:Ce.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");if(!a)return"";r=a+"/"+r,t=fe.isAbs(a)}return(t?"/":"")+(r=fe.normalizeArray(r.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=ge.resolve(e).substr(1),r=ge.resolve(r).substr(1);for(var n=t(e.split("/")),a=t(r.split("/")),o=Math.min(n.length,a.length),i=o,s=0;s<o;s++)if(n[s]!==a[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(a.slice(i))).join("/")}},he=new TextDecoder,ve=(e,r,t)=>{for(var n=r+t,a=r;e[a]&&!(a>=n);)++a;return he.decode(e.buffer?e.subarray(r,a):new Uint8Array(e.slice(r,a)))},be=[],we=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},ye=(e,r,t,n)=>{if(!(n>0))return 0;for(var a=t,o=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343)s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i);if(s<=127){if(t>=o)break;r[t++]=s}else if(s<=2047){if(t+1>=o)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=o)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=o)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-a};function _e(e,r,t){var n=t>0?t:we(e)+1,a=new Array(n),o=ye(e,a,0,a.length);return r&&(a.length=o),a}var xe={ttys:[],init(){},shutdown(){},register(e,r){xe.ttys[e]={input:[],output:[],ops:r},Ce.registerDevice(e,xe.stream_ops)},stream_ops:{open(e){var r=xe.ttys[e.node.rdev];if(!r)throw new Ce.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,a){if(!e.tty||!e.tty.ops.get_char)throw new Ce.ErrnoError(60);for(var o=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(u){throw new Ce.ErrnoError(29)}if(void 0===s&&0===o)throw new Ce.ErrnoError(6);if(null==s)break;o++,r[t+i]=s}return o&&(e.node.timestamp=Date.now()),o},write(e,r,t,n,a){if(!e.tty||!e.tty.ops.put_char)throw new Ce.ErrnoError(60);try{for(var o=0;o<n;o++)e.tty.ops.put_char(e.tty,r[t+o])}catch(i){throw new Ce.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),o}},default_tty_ops:{get_char:e=>(()=>{if(!be.length){var e=null;if(l){var r=Buffer.alloc(256),t=0,n=process.stdin.fd;try{t=g.readSync(n,r,0,256)}catch(a){if(!a.toString().includes("EOF"))throw a;t=0}t>0&&(e=r.slice(0,t).toString("utf-8"))}else"undefined"!=typeof window&&"function"==typeof window.prompt&&null!==(e=window.prompt("Input: "))&&(e+="\n");if(!e)return null;be=_e(e,!0)}return be.shift()})(),put_char(e,r){null===r||10===r?(w(ve(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(w(ve(e.output,0)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(y(ve(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(y(ve(e.output,0)),e.output=[])}}},Ee=e=>{e=((e,r)=>Math.ceil(e/r)*r)(e,65536);var r=Ct(65536,e);return r?((e,r)=>(E.fill(0,e,e+r),e))(r,e):0},Se={ops_table:null,mount:e=>Se.createNode(null,"/",16895,0),createNode(e,r,t,n){if(Ce.isBlkdev(t)||Ce.isFIFO(t))throw new Ce.ErrnoError(63);Se.ops_table||={dir:{node:{getattr:Se.node_ops.getattr,setattr:Se.node_ops.setattr,lookup:Se.node_ops.lookup,mknod:Se.node_ops.mknod,rename:Se.node_ops.rename,unlink:Se.node_ops.unlink,rmdir:Se.node_ops.rmdir,readdir:Se.node_ops.readdir,symlink:Se.node_ops.symlink},stream:{llseek:Se.stream_ops.llseek}},file:{node:{getattr:Se.node_ops.getattr,setattr:Se.node_ops.setattr},stream:{llseek:Se.stream_ops.llseek,read:Se.stream_ops.read,write:Se.stream_ops.write,allocate:Se.stream_ops.allocate,mmap:Se.stream_ops.mmap,msync:Se.stream_ops.msync}},link:{node:{getattr:Se.node_ops.getattr,setattr:Se.node_ops.setattr,readlink:Se.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Se.node_ops.getattr,setattr:Se.node_ops.setattr},stream:Ce.chrdev_stream_ops}};var a=Ce.createNode(e,r,t,n);return Ce.isDir(a.mode)?(a.node_ops=Se.ops_table.dir.node,a.stream_ops=Se.ops_table.dir.stream,a.contents={}):Ce.isFile(a.mode)?(a.node_ops=Se.ops_table.file.node,a.stream_ops=Se.ops_table.file.stream,a.usedBytes=0,a.contents=null):Ce.isLink(a.mode)?(a.node_ops=Se.ops_table.link.node,a.stream_ops=Se.ops_table.link.stream):Ce.isChrdev(a.mode)&&(a.node_ops=Se.ops_table.chrdev.node,a.stream_ops=Se.ops_table.chrdev.stream),a.timestamp=Date.now(),e&&(e.contents[r]=a,e.timestamp=a.timestamp),a},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){r=Math.max(r,t*(t<1048576?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var n=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=Ce.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,Ce.isDir(e.mode)?r.size=4096:Ce.isFile(e.mode)?r.size=e.usedBytes:Ce.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&Se.resizeFileStorage(e,r.size)},lookup(e,r){throw Ce.genericErrors[44]},mknod:(e,r,t,n)=>Se.createNode(e,r,t,n),rename(e,r,t){if(Ce.isDir(e.mode)){var n;try{n=Ce.lookupNode(r,t)}catch(o){}if(n)for(var a in n.contents)throw new Ce.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=Ce.lookupNode(e,r);for(var n in t.contents)throw new Ce.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t of Object.keys(e.contents))r.push(t);return r},symlink(e,r,t){var n=Se.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!Ce.isLink(e.mode))throw new Ce.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,a){var o=e.node.contents;if(a>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-a,n);if(i>8&&o.subarray)r.set(o.subarray(a,a+i),t);else for(var s=0;s<i;s++)r[t+s]=o[a+s];return i},write(e,r,t,n,a,o){if(r.buffer===x.buffer&&(o=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(o)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===a)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(a+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),a),n}if(Se.expandFileStorage(i,a+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),a);else for(var s=0;s<n;s++)i.contents[a+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,a+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&Ce.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Ce.ErrnoError(28);return n},allocate(e,r,t){Se.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,a){if(!Ce.isFile(e.node.mode))throw new Ce.ErrnoError(43);var o,i,s=e.node.contents;if(2&a||s.buffer!==x.buffer){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,!(o=Ee(r)))throw new Ce.ErrnoError(48);x.set(s,o)}else i=!1,o=s.byteOffset;return{ptr:o,allocated:i}},msync:(e,r,t,n,a)=>(Se.stream_ops.write(e,r,0,n,t,!1),0)}},ke=(e,r,t,n,a,o)=>{Ce.createDataFile(e,r,t,n,a,o)},Le=(e,r,t,n,o,i,s,u,c,l)=>{var d=r?ge.resolve(fe.join2(e,r)):e;function m(t){function a(t){l?.(),u||ke(e,r,t,n,o,c),i?.(),R()}((e,r,t,n)=>{void 0!==se&&se.init();var a=!1;return ie.forEach((o=>{a||o.canHandle(r)&&(o.handle(e,r,t,n),a=!0)})),a})(t,d,a,(()=>{s?.(),R()}))||a(t)}M(),"string"==typeof t?((e,r,t,n)=>{var o=n?"":`al ${e}`;a(e).then((e=>{r(new Uint8Array(e)),o&&R()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&M()})(t,m,s):m(t)},Be=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},Ce={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{constructor(e){this.name="ErrnoError",this.errno=e}},genericErrors:{},filesystems:null,syncFSRequests:0,FSStream:class{constructor(){this.shared={}}get object(){return this.node}set object(e){this.node=e}get isRead(){return 1!=(2097155&this.flags)}get isWrite(){return 0!=(2097155&this.flags)}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{constructor(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ce.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n,this.readMode=365,this.writeMode=146}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return Ce.isDir(this.mode)}get isDevice(){return Ce.isChrdev(this.mode)}},lookupPath(e,r={}){if(!(e=ge.resolve(e)))return{path:"",node:null};if((r=Object.assign({follow_mount:!0,recurse_count:0},r)).recurse_count>8)throw new Ce.ErrnoError(32);for(var t=e.split("/").filter((e=>!!e)),n=Ce.root,a="/",o=0;o<t.length;o++){var i=o===t.length-1;if(i&&r.parent)break;if(n=Ce.lookupNode(n,t[o]),a=fe.join2(a,t[o]),Ce.isMountpoint(n)&&(!i||i&&r.follow_mount)&&(n=n.mounted.root),!i||r.follow)for(var s=0;Ce.isLink(n.mode);){var u=Ce.readlink(a);if(a=ge.resolve(fe.dirname(a),u),n=Ce.lookupPath(a,{recurse_count:r.recurse_count+1}).node,s++>40)throw new Ce.ErrnoError(32)}}return{path:a,node:n}},getPath(e){for(var r;;){if(Ce.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%Ce.nameTable.length},hashAddNode(e){var r=Ce.hashName(e.parent.id,e.name);e.name_next=Ce.nameTable[r],Ce.nameTable[r]=e},hashRemoveNode(e){var r=Ce.hashName(e.parent.id,e.name);if(Ce.nameTable[r]===e)Ce.nameTable[r]=e.name_next;else for(var t=Ce.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=Ce.mayLookup(e);if(t)throw new Ce.ErrnoError(t);for(var n=Ce.hashName(e.id,r),a=Ce.nameTable[n];a;a=a.name_next){var o=a.name;if(a.parent.id===e.id&&o===r)return a}return Ce.lookup(e,r)},createNode(e,r,t,n){var a=new Ce.FSNode(e,r,t,n);return Ce.hashAddNode(a),a},destroyNode(e){Ce.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>Ce.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){if(!Ce.isDir(e.mode))return 54;var r=Ce.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{Ce.lookupNode(e,r);return 20}catch(t){}return Ce.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=Ce.lookupNode(e,r)}catch(o){return o.errno}var a=Ce.nodePermissions(e,"wx");if(a)return a;if(t){if(!Ce.isDir(n.mode))return 54;if(Ce.isRoot(n)||Ce.getPath(n)===Ce.cwd())return 10}else if(Ce.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?Ce.isLink(e.mode)?32:Ce.isDir(e.mode)&&("r"!==Ce.flagsToPermissionString(r)||512&r)?31:Ce.nodePermissions(e,Ce.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Ce.MAX_OPEN_FDS;e++)if(!Ce.streams[e])return e;throw new Ce.ErrnoError(33)},getStreamChecked(e){var r=Ce.getStream(e);if(!r)throw new Ce.ErrnoError(8);return r},getStream:e=>Ce.streams[e],createStream:(e,r=-1)=>(e=Object.assign(new Ce.FSStream,e),-1==r&&(r=Ce.nextfd()),e.fd=r,Ce.streams[r]=e,e),closeStream(e){Ce.streams[e]=null},dupStream(e,r=-1){var t=Ce.createStream(e,r);return t.stream_ops?.dup?.(t),t},chrdev_stream_ops:{open(e){var r=Ce.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new Ce.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){Ce.devices[e]={stream_ops:r}},getDevice:e=>Ce.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push(...n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),Ce.syncFSRequests++,Ce.syncFSRequests>1&&y(`warning: ${Ce.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=Ce.getMounts(Ce.root.mount),n=0;function a(e){return Ce.syncFSRequests--,r(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,a(e));++n>=t.length&&a(null)}t.forEach((r=>{if(!r.type.syncfs)return o(null);r.type.syncfs(r,e,o)}))},mount(e,r,t){var n,a="/"===t,o=!t;if(a&&Ce.root)throw new Ce.ErrnoError(10);if(!a&&!o){var i=Ce.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,Ce.isMountpoint(n))throw new Ce.ErrnoError(10);if(!Ce.isDir(n.mode))throw new Ce.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,a?Ce.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var r=Ce.lookupPath(e,{follow_mount:!1});if(!Ce.isMountpoint(r.node))throw new Ce.ErrnoError(28);var t=r.node,n=t.mounted,a=Ce.getMounts(n);Object.keys(Ce.nameTable).forEach((e=>{for(var r=Ce.nameTable[e];r;){var t=r.name_next;a.includes(r.mount)&&Ce.destroyNode(r),r=t}})),t.mounted=null;var o=t.mount.mounts.indexOf(n);t.mount.mounts.splice(o,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=Ce.lookupPath(e,{parent:!0}).node,a=fe.basename(e);if(!a||"."===a||".."===a)throw new Ce.ErrnoError(28);var o=Ce.mayCreate(n,a);if(o)throw new Ce.ErrnoError(o);if(!n.node_ops.mknod)throw new Ce.ErrnoError(63);return n.node_ops.mknod(n,a,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,Ce.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,Ce.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",a=0;a<t.length;++a)if(t[a]){n+="/"+t[a];try{Ce.mkdir(n,r)}catch(o){if(20!=o.errno)throw o}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,Ce.mknod(e,r,t)),symlink(e,r){if(!ge.resolve(e))throw new Ce.ErrnoError(44);var t=Ce.lookupPath(r,{parent:!0}).node;if(!t)throw new Ce.ErrnoError(44);var n=fe.basename(r),a=Ce.mayCreate(t,n);if(a)throw new Ce.ErrnoError(a);if(!t.node_ops.symlink)throw new Ce.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,a=fe.dirname(e),o=fe.dirname(r),i=fe.basename(e),s=fe.basename(r);if(t=Ce.lookupPath(e,{parent:!0}).node,n=Ce.lookupPath(r,{parent:!0}).node,!t||!n)throw new Ce.ErrnoError(44);if(t.mount!==n.mount)throw new Ce.ErrnoError(75);var u,c=Ce.lookupNode(t,i),l=ge.relative(e,o);if("."!==l.charAt(0))throw new Ce.ErrnoError(28);if("."!==(l=ge.relative(r,a)).charAt(0))throw new Ce.ErrnoError(55);try{u=Ce.lookupNode(n,s)}catch(f){}if(c!==u){var d=Ce.isDir(c.mode),m=Ce.mayDelete(t,i,d);if(m)throw new Ce.ErrnoError(m);if(m=u?Ce.mayDelete(n,s,d):Ce.mayCreate(n,s))throw new Ce.ErrnoError(m);if(!t.node_ops.rename)throw new Ce.ErrnoError(63);if(Ce.isMountpoint(c)||u&&Ce.isMountpoint(u))throw new Ce.ErrnoError(10);if(n!==t&&(m=Ce.nodePermissions(t,"w")))throw new Ce.ErrnoError(m);Ce.hashRemoveNode(c);try{t.node_ops.rename(c,n,s),c.parent=n}catch(f){throw f}finally{Ce.hashAddNode(c)}}},rmdir(e){var r=Ce.lookupPath(e,{parent:!0}).node,t=fe.basename(e),n=Ce.lookupNode(r,t),a=Ce.mayDelete(r,t,!0);if(a)throw new Ce.ErrnoError(a);if(!r.node_ops.rmdir)throw new Ce.ErrnoError(63);if(Ce.isMountpoint(n))throw new Ce.ErrnoError(10);r.node_ops.rmdir(r,t),Ce.destroyNode(n)},readdir(e){var r=Ce.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new Ce.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=Ce.lookupPath(e,{parent:!0}).node;if(!r)throw new Ce.ErrnoError(44);var t=fe.basename(e),n=Ce.lookupNode(r,t),a=Ce.mayDelete(r,t,!1);if(a)throw new Ce.ErrnoError(a);if(!r.node_ops.unlink)throw new Ce.ErrnoError(63);if(Ce.isMountpoint(n))throw new Ce.ErrnoError(10);r.node_ops.unlink(r,t),Ce.destroyNode(n)},readlink(e){var r=Ce.lookupPath(e).node;if(!r)throw new Ce.ErrnoError(44);if(!r.node_ops.readlink)throw new Ce.ErrnoError(28);return ge.resolve(Ce.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=Ce.lookupPath(e,{follow:!r}).node;if(!t)throw new Ce.ErrnoError(44);if(!t.node_ops.getattr)throw new Ce.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>Ce.stat(e,!0),chmod(e,r,t){var n;"string"==typeof e?n=Ce.lookupPath(e,{follow:!t}).node:n=e;if(!n.node_ops.setattr)throw new Ce.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){Ce.chmod(e,r,!0)},fchmod(e,r){var t=Ce.getStreamChecked(e);Ce.chmod(t.node,r)},chown(e,r,t,n){var a;"string"==typeof e?a=Ce.lookupPath(e,{follow:!n}).node:a=e;if(!a.node_ops.setattr)throw new Ce.ErrnoError(63);a.node_ops.setattr(a,{timestamp:Date.now()})},lchown(e,r,t){Ce.chown(e,r,t,!0)},fchown(e,r,t){var n=Ce.getStreamChecked(e);Ce.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new Ce.ErrnoError(28);var t;"string"==typeof e?t=Ce.lookupPath(e,{follow:!0}).node:t=e;if(!t.node_ops.setattr)throw new Ce.ErrnoError(63);if(Ce.isDir(t.mode))throw new Ce.ErrnoError(31);if(!Ce.isFile(t.mode))throw new Ce.ErrnoError(28);var n=Ce.nodePermissions(t,"w");if(n)throw new Ce.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=Ce.getStreamChecked(e);if(0==(2097155&t.flags))throw new Ce.ErrnoError(28);Ce.truncate(t.node,r)},utime(e,r,t){var n=Ce.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new Ce.ErrnoError(44);var n;if(t=64&(r="string"==typeof r?(e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r})(r):r)?4095&(t=void 0===t?438:t)|32768:0,"object"==typeof e)n=e;else{e=fe.normalize(e);try{n=Ce.lookupPath(e,{follow:!(131072&r)}).node}catch(u){}}var a=!1;if(64&r)if(n){if(128&r)throw new Ce.ErrnoError(20)}else n=Ce.mknod(e,t,0),a=!0;if(!n)throw new Ce.ErrnoError(44);if(Ce.isChrdev(n.mode)&&(r&=-513),65536&r&&!Ce.isDir(n.mode))throw new Ce.ErrnoError(54);if(!a){var o=Ce.mayOpen(n,r);if(o)throw new Ce.ErrnoError(o)}512&r&&!a&&Ce.truncate(n,0),r&=-131713;var s=Ce.createStream({node:n,path:Ce.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!i.logReadFiles||1&r||(Ce.readFiles||(Ce.readFiles={}),e in Ce.readFiles||(Ce.readFiles[e]=1)),s},close(e){if(Ce.isClosed(e))throw new Ce.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(r){throw r}finally{Ce.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(Ce.isClosed(e))throw new Ce.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Ce.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Ce.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,a){if(n<0||a<0)throw new Ce.ErrnoError(28);if(Ce.isClosed(e))throw new Ce.ErrnoError(8);if(1==(2097155&e.flags))throw new Ce.ErrnoError(8);if(Ce.isDir(e.node.mode))throw new Ce.ErrnoError(31);if(!e.stream_ops.read)throw new Ce.ErrnoError(28);var o=void 0!==a;if(o){if(!e.seekable)throw new Ce.ErrnoError(70)}else a=e.position;var i=e.stream_ops.read(e,r,t,n,a);return o||(e.position+=i),i},write(e,r,t,n,a,o){if(n<0||a<0)throw new Ce.ErrnoError(28);if(Ce.isClosed(e))throw new Ce.ErrnoError(8);if(0==(2097155&e.flags))throw new Ce.ErrnoError(8);if(Ce.isDir(e.node.mode))throw new Ce.ErrnoError(31);if(!e.stream_ops.write)throw new Ce.ErrnoError(28);e.seekable&&1024&e.flags&&Ce.llseek(e,0,2);var i=void 0!==a;if(i){if(!e.seekable)throw new Ce.ErrnoError(70)}else a=e.position;var s=e.stream_ops.write(e,r,t,n,a,o);return i||(e.position+=s),s},allocate(e,r,t){if(Ce.isClosed(e))throw new Ce.ErrnoError(8);if(r<0||t<=0)throw new Ce.ErrnoError(28);if(0==(2097155&e.flags))throw new Ce.ErrnoError(8);if(!Ce.isFile(e.node.mode)&&!Ce.isDir(e.node.mode))throw new Ce.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ce.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,a){if(0!=(2&n)&&0==(2&a)&&2!=(2097155&e.flags))throw new Ce.ErrnoError(2);if(1==(2097155&e.flags))throw new Ce.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ce.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,a)},msync:(e,r,t,n,a)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,a):0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new Ce.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=Ce.open(e,r.flags),a=Ce.stat(e).size,o=new Uint8Array(a);return Ce.read(n,o,0,a,0),"utf8"===r.encoding?t=ve(o,0):"binary"===r.encoding&&(t=o),Ce.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=Ce.open(e,t.flags,t.mode);if("string"==typeof r){var a=new Uint8Array(we(r)+1),o=ye(r,a,0,a.length);Ce.write(n,a,0,o,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");Ce.write(n,r,0,r.byteLength,void 0,t.canOwn)}Ce.close(n)},cwd:()=>Ce.currentPath,chdir(e){var r=Ce.lookupPath(e,{follow:!0});if(null===r.node)throw new Ce.ErrnoError(44);if(!Ce.isDir(r.node.mode))throw new Ce.ErrnoError(54);var t=Ce.nodePermissions(r.node,"x");if(t)throw new Ce.ErrnoError(t);Ce.currentPath=r.path},createDefaultDirectories(){Ce.mkdir("/tmp"),Ce.mkdir("/home"),Ce.mkdir("/home/web_user")},createDefaultDevices(){Ce.mkdir("/dev"),Ce.registerDevice(Ce.makedev(1,3),{read:()=>0,write:(e,r,t,n,a)=>n}),Ce.mkdev("/dev/null",Ce.makedev(1,3)),xe.register(Ce.makedev(5,0),xe.default_tty_ops),xe.register(Ce.makedev(6,0),xe.default_tty1_ops),Ce.mkdev("/dev/tty",Ce.makedev(5,0)),Ce.mkdev("/dev/tty1",Ce.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=pe(e).byteLength),e[--r]);Ce.createDevice("/dev","random",t),Ce.createDevice("/dev","urandom",t),Ce.mkdir("/dev/shm"),Ce.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Ce.mkdir("/proc");var e=Ce.mkdir("/proc/self");Ce.mkdir("/proc/self/fd"),Ce.mount({mount(){var r=Ce.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=Ce.getStreamChecked(t),a={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return a.parent=a,a}},r}},{},"/proc/self/fd")},createStandardStreams(){i.stdin?Ce.createDevice("/dev","stdin",i.stdin):Ce.symlink("/dev/tty","/dev/stdin"),i.stdout?Ce.createDevice("/dev","stdout",null,i.stdout):Ce.symlink("/dev/tty","/dev/stdout"),i.stderr?Ce.createDevice("/dev","stderr",null,i.stderr):Ce.symlink("/dev/tty1","/dev/stderr");Ce.open("/dev/stdin",0),Ce.open("/dev/stdout",1),Ce.open("/dev/stderr",1)},staticInit(){[44].forEach((e=>{Ce.genericErrors[e]=new Ce.ErrnoError(e),Ce.genericErrors[e].stack="<generic error, no stack>"})),Ce.nameTable=new Array(4096),Ce.mount(Se,{},"/"),Ce.createDefaultDirectories(),Ce.createDefaultDevices(),Ce.createSpecialDirectories(),Ce.filesystems={MEMFS:Se}},init(e,r,t){Ce.init.initialized=!0,i.stdin=e||i.stdin,i.stdout=r||i.stdout,i.stderr=t||i.stderr,Ce.createStandardStreams()},quit(){Ce.init.initialized=!1;for(var e=0;e<Ce.streams.length;e++){var r=Ce.streams[e];r&&Ce.close(r)}},findObject(e,r){var t=Ce.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=Ce.lookupPath(e,{follow:!r})).path}catch(a){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Ce.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=fe.basename(e),n=Ce.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(a){t.error=a.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:Ce.getPath(e);for(var a=r.split("/").reverse();a.length;){var o=a.pop();if(o){var i=fe.join2(e,o);try{Ce.mkdir(i)}catch(s){}e=i}}return i},createFile(e,r,t,n,a){var o=fe.join2("string"==typeof e?e:Ce.getPath(e),r),i=Be(n,a);return Ce.create(o,i)},createDataFile(e,r,t,n,a,o){var i=r;e&&(e="string"==typeof e?e:Ce.getPath(e),i=r?fe.join2(e,r):e);var s=Be(n,a),u=Ce.create(i,s);if(t){if("string"==typeof t){for(var c=new Array(t.length),l=0,d=t.length;l<d;++l)c[l]=t.charCodeAt(l);t=c}Ce.chmod(u,146|s);var m=Ce.open(u,577);Ce.write(m,t,0,t.length,0,o),Ce.close(m),Ce.chmod(u,s)}},createDevice(e,r,t,n){var a=fe.join2("string"==typeof e?e:Ce.getPath(e),r),o=Be(!!t,!!n);Ce.createDevice.major||(Ce.createDevice.major=64);var i=Ce.makedev(Ce.createDevice.major++,0);return Ce.registerDevice(i,{open(e){e.seekable=!1},close(e){n?.buffer?.length&&n(10)},read(e,r,n,a,o){for(var i=0,s=0;s<a;s++){var u;try{u=t()}catch(c){throw new Ce.ErrnoError(29)}if(void 0===u&&0===i)throw new Ce.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,a,o){for(var i=0;i<a;i++)try{n(r[t+i])}catch(s){throw new Ce.ErrnoError(29)}return a&&(e.node.timestamp=Date.now()),i}}),Ce.mkdev(a,o,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{e.contents=o(e.url),e.usedBytes=e.contents.length}catch(r){throw new Ce.ErrnoError(29)}},createLazyFile(e,r,t,n,a){class o{constructor(){this.lengthKnown=!1,this.chunks=[]}get(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}}setDataGetter(e){this.getter=e}cacheLength(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),a=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,o=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;a||(i=n);var s=this;s.setDataGetter((e=>{var r=e*i,a=(e+1)*i-1;if(a=Math.min(a,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>n-1)throw new Error("only "+n+" bytes available! programmer error!");var a=new XMLHttpRequest;if(a.open("GET",t,!1),n!==i&&a.setRequestHeader("Range","bytes="+e+"-"+r),a.responseType="arraybuffer",a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined"),a.send(null),!(a.status>=200&&a.status<300||304===a.status))throw new Error("Couldn't load "+t+". Status: "+a.status);return void 0!==a.response?new Uint8Array(a.response||[]):_e(a.responseText||"",!0)})(r,a)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&n||(i=n=1,n=this.getter(0).length,i=n,w("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if("undefined"!=typeof XMLHttpRequest){if(!c)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,contents:new o}}else i={isDevice:!1,url:t};var s=Ce.createFile(e,r,i,n,a);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,r,t,n,a){var o=e.node.contents;if(a>=o.length)return 0;var i=Math.min(o.length-a,n);if(o.slice)for(var s=0;s<i;s++)r[t+s]=o[a+s];else for(s=0;s<i;s++)r[t+s]=o.get(a+s);return i}return Object.keys(s.stream_ops).forEach((e=>{var r=s.stream_ops[e];u[e]=(...e)=>(Ce.forceLoadFile(s),r(...e))})),u.read=(e,r,t,n,a)=>(Ce.forceLoadFile(s),l(e,r,t,n,a)),u.mmap=(e,r,t,n,a)=>{Ce.forceLoadFile(s);var o=Ee(r);if(!o)throw new Ce.ErrnoError(48);return l(e,x,o,r,t),{ptr:o,allocated:!0}},s.stream_ops=u,s}},Pe=(e,r)=>{if(!e)return"";for(var t=e+r,n=e;!(n>=t)&&E[n];)++n;return he.decode(E.subarray(e,n))},Fe={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(fe.isAbs(r))return r;var n;-100===e?n=Ce.cwd():n=Fe.getStreamFromFD(e).path;if(0==r.length){if(!t)throw new Ce.ErrnoError(44);return n}return fe.join2(n,r)},doStat(e,r,t){var n=e(r);L[t>>2]=n.dev,L[t+4>>2]=n.mode,B[t+8>>2]=n.nlink,L[t+12>>2]=n.uid,L[t+16>>2]=n.gid,L[t+20>>2]=n.rdev,N=[n.size>>>0,(G=n.size,+Math.abs(G)>=1?G>0?+Math.floor(G/4294967296)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],L[t+24>>2]=N[0],L[t+28>>2]=N[1],L[t+32>>2]=4096,L[t+36>>2]=n.blocks;var a=n.atime.getTime(),o=n.mtime.getTime(),i=n.ctime.getTime();return N=[Math.floor(a/1e3)>>>0,(G=Math.floor(a/1e3),+Math.abs(G)>=1?G>0?+Math.floor(G/4294967296)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],L[t+40>>2]=N[0],L[t+44>>2]=N[1],B[t+48>>2]=a%1e3*1e3,N=[Math.floor(o/1e3)>>>0,(G=Math.floor(o/1e3),+Math.abs(G)>=1?G>0?+Math.floor(G/4294967296)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],L[t+56>>2]=N[0],L[t+60>>2]=N[1],B[t+64>>2]=o%1e3*1e3,N=[Math.floor(i/1e3)>>>0,(G=Math.floor(i/1e3),+Math.abs(G)>=1?G>0?+Math.floor(G/4294967296)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],L[t+72>>2]=N[0],L[t+76>>2]=N[1],B[t+80>>2]=i%1e3*1e3,N=[n.ino>>>0,(G=n.ino,+Math.abs(G)>=1?G>0?+Math.floor(G/4294967296)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],L[t+88>>2]=N[0],L[t+92>>2]=N[1],0},doMsync(e,r,t,n,a){if(!Ce.isFile(r.node.mode))throw new Ce.ErrnoError(43);if(2&n)return 0;var o=E.slice(e,e+t);Ce.msync(r,o,a,t,n)},getStreamFromFD:e=>Ce.getStreamChecked(e),varargs:void 0,getStr:e=>Pe(e)};function Ie(){var e=L[+Fe.varargs>>2];return Fe.varargs+=4,e}var Te=Ie;var Ae,Oe,De=e=>{for(var r="",t=e;E[t];)r+=Ae[E[t++]];return r},Ve={},je={},Me={},Re=e=>{throw new Oe(e)};function Ue(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||Re(`type "${n}" must have a positive integer typeid pointer`),je.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Re(`Cannot register type '${n}' twice`)}if(je[e]=r,delete Me[e],Ve.hasOwnProperty(e)){var a=Ve[e];delete Ve[e],a.forEach((e=>e()))}}(e,r,t)}var ze=[],Ge=[],Ne=e=>{e>9&&0==--Ge[e+1]&&(Ge[e]=void 0,ze.push(e))},$e=()=>Ge.length/2-5-ze.length,We={toValue:e=>(e||Re("Cannot use deleted val. handle = "+e),Ge[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const r=ze.pop()||Ge.length;return Ge[r]=e,Ge[r+1]=1,r}}}};function He(e){return this.fromWireType(B[e>>2])}var Je={name:"emscripten::val",fromWireType:e=>{var r=We.toValue(e);return Ne(e),r},toWireType:(e,r)=>We.toHandle(r),argPackAdvance:8,readValueFromPointer:He,destructorFunction:null},qe=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(C[e>>2])};case 8:return function(e){return this.fromWireType(P[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},Xe=(e,r,t)=>{switch(r){case 1:return t?e=>x[e]:e=>E[e];case 2:return t?e=>S[e>>1]:e=>k[e>>1];case 4:return t?e=>L[e>>2]:e=>B[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Ye=(e,r,t)=>ye(e,E,r,t),Qe=new TextDecoder("utf-16le"),Ke=(e,r)=>{for(var t=e,n=t>>1,a=n+r/2;!(n>=a)&&k[n];)++n;return t=n<<1,Qe.decode(E.subarray(e,t))},Ze=(e,r,t)=>{if(t??=2147483647,t<2)return 0;for(var n=r,a=(t-=2)<2*e.length?t/2:e.length,o=0;o<a;++o){var i=e.charCodeAt(o);S[r>>1]=i,r+=2}return S[r>>1]=0,r-n},er=e=>2*e.length,rr=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var a=L[e+4*t>>2];if(0==a)break;if(++t,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|1023&o)}else n+=String.fromCharCode(a)}return n},tr=(e,r,t)=>{if(t??=2147483647,t<4)return 0;for(var n=r,a=n+t-4,o=0;o<e.length;++o){var i=e.charCodeAt(o);if(i>=55296&&i<=57343)i=65536+((1023&i)<<10)|1023&e.charCodeAt(++o);if(L[r>>2]=i,(r+=4)+4>a)break}return L[r>>2]=0,r-n},nr=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},ar=(e,r)=>{var t,n,a,o=je[e];return void 0===o&&Re(`${r} has unknown type ${t=e,n=Bt(t),a=De(n),nt(n),a}`),o},or={},ir=e=>{var r=or[e];return void 0===r?De(e):r},sr=()=>{if("object"==typeof globalThis)return globalThis;function e(e){e.$$$embind_global$$$=e;var r="object"==typeof $$$embind_global$$$&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof global&&e(global)?$$$embind_global$$$=global:"object"==typeof self&&e(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},ur=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN;var cr=[0,31,60,91,121,152,182,213,244,274,305,335],lr=[0,31,59,90,120,151,181,212,243,273,304,334],dr=e=>{var r;return((r=e.getFullYear())%4==0&&(r%100!=0||r%400==0)?cr:lr)[e.getMonth()]+e.getDate()-1};var mr=[],fr=(e,r,t)=>{var n=((e,r)=>{var t;for(mr.length=0;t=E[e++];){var n=105!=t;r+=(n&=112!=t)&&r%8?4:0,mr.push(112==t?B[r>>2]:105==t?L[r>>2]:P[r>>3]),r+=n?8:4}return mr})(r,t);return X[e](...n)},pr=e=>{var r=(e-b.buffer.byteLength+65535)/65536;try{return b.grow(r),I(),1}catch(t){}},gr=e=>(U("Cannot use convertFrameToPC (needed by __builtin_return_address) without -sUSE_OFFSET_CONVERTER"),0),hr={},vr=e=>{e.forEach((e=>{var r=gr();r&&(hr[r]=e)}))};function br(){return(new Error).stack.toString()}var wr,yr=e=>{var r=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_disjoint_timer_query","EXT_frag_depth","EXT_shader_texture_lod","EXT_sRGB","OES_element_index_uint","OES_fbo_render_mipmap","OES_standard_derivatives","OES_texture_float","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_depth_texture","WEBGL_draw_buffers","EXT_color_buffer_float","EXT_conservative_depth","EXT_disjoint_timer_query_webgl2","EXT_texture_norm16","NV_shader_noperspective_interpolation","WEBGL_clip_cull_distance","EXT_color_buffer_half_float","EXT_depth_clamp","EXT_float_blend","EXT_texture_compression_bptc","EXT_texture_compression_rgtc","EXT_texture_filter_anisotropic","KHR_parallel_shader_compile","OES_texture_float_linear","WEBGL_blend_func_extended","WEBGL_compressed_texture_astc","WEBGL_compressed_texture_etc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_debug_renderer_info","WEBGL_debug_shaders","WEBGL_lose_context","WEBGL_multi_draw"];return(e.getSupportedExtensions()||[]).filter((e=>r.includes(e)))},_r={counter:1,buffers:[],mappedBuffers:{},programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],byteSizeByTypeRoot:5120,byteSizeByType:[1,1,2,2,4,4,4,2,3,4,8],stringCache:{},stringiCache:{},unpackAlignment:4,unpackRowLength:0,recordError:e=>{_r.lastError||(_r.lastError=e)},getNewId:e=>{for(var r=_r.counter++,t=e.length;t<r;t++)e[t]=null;return r},genObject:(e,r,t,n)=>{for(var a=0;a<e;a++){var o=qr[t](),i=o&&_r.getNewId(n);o?(o.name=i,n[i]=o):_r.recordError(1282),L[r+4*a>>2]=i}},MAX_TEMP_BUFFER_SIZE:2097152,numTempVertexBuffersPerSize:64,log2ceilLookup:e=>32-Math.clz32(0===e?0:e-1),generateTempBuffers:(e,r)=>{var t=_r.log2ceilLookup(_r.MAX_TEMP_BUFFER_SIZE);r.tempVertexBufferCounters1=[],r.tempVertexBufferCounters2=[],r.tempVertexBufferCounters1.length=r.tempVertexBufferCounters2.length=t+1,r.tempVertexBuffers1=[],r.tempVertexBuffers2=[],r.tempVertexBuffers1.length=r.tempVertexBuffers2.length=t+1,r.tempIndexBuffers=[],r.tempIndexBuffers.length=t+1;for(var n=0;n<=t;++n){r.tempIndexBuffers[n]=null,r.tempVertexBufferCounters1[n]=r.tempVertexBufferCounters2[n]=0;var a=_r.numTempVertexBuffersPerSize;r.tempVertexBuffers1[n]=[],r.tempVertexBuffers2[n]=[];var o=r.tempVertexBuffers1[n],i=r.tempVertexBuffers2[n];o.length=i.length=a;for(var s=0;s<a;++s)o[s]=i[s]=null}if(e){r.tempQuadIndexBuffer=qr.createBuffer(),r.GLctx.bindBuffer(34963,r.tempQuadIndexBuffer);for(var u=_r.MAX_TEMP_BUFFER_SIZE>>1,c=new Uint16Array(u),l=(n=0,0);!(c[n++]=l,n>=u||(c[n++]=l+1,n>=u)||(c[n++]=l+2,n>=u)||(c[n++]=l,n>=u)||(c[n++]=l+2,n>=u)||(c[n++]=l+3,n>=u));)l+=4;r.GLctx.bufferData(34963,c,35044),r.GLctx.bindBuffer(34963,null)}},getTempVertexBuffer:e=>{var r=_r.log2ceilLookup(e),t=_r.currentContext.tempVertexBuffers1[r],n=_r.currentContext.tempVertexBufferCounters1[r];_r.currentContext.tempVertexBufferCounters1[r]=_r.currentContext.tempVertexBufferCounters1[r]+1&_r.numTempVertexBuffersPerSize-1;var a=t[n];if(a)return a;var o=qr.getParameter(34964);return t[n]=qr.createBuffer(),qr.bindBuffer(34962,t[n]),qr.bufferData(34962,1<<r,35048),qr.bindBuffer(34962,o),t[n]},getTempIndexBuffer:e=>{var r=_r.log2ceilLookup(e),t=_r.currentContext.tempIndexBuffers[r];if(t)return t;var n=qr.getParameter(34965);return _r.currentContext.tempIndexBuffers[r]=qr.createBuffer(),qr.bindBuffer(34963,_r.currentContext.tempIndexBuffers[r]),qr.bufferData(34963,1<<r,35048),qr.bindBuffer(34963,n),_r.currentContext.tempIndexBuffers[r]},newRenderingFrameStarted:()=>{if(_r.currentContext){var e=_r.currentContext.tempVertexBuffers1;_r.currentContext.tempVertexBuffers1=_r.currentContext.tempVertexBuffers2,_r.currentContext.tempVertexBuffers2=e,e=_r.currentContext.tempVertexBufferCounters1,_r.currentContext.tempVertexBufferCounters1=_r.currentContext.tempVertexBufferCounters2,_r.currentContext.tempVertexBufferCounters2=e;for(var r=_r.log2ceilLookup(_r.MAX_TEMP_BUFFER_SIZE),t=0;t<=r;++t)_r.currentContext.tempVertexBufferCounters1[t]=0}},getSource:(e,r,t,n)=>{for(var a="",o=0;o<r;++o){var i=n?B[n+4*o>>2]:void 0;a+=Pe(B[t+4*o>>2],i)}return a},calcBufLength:(e,r,t,n)=>t>0?n*t:e*_r.byteSizeByType[r-_r.byteSizeByTypeRoot]*n,usedTempBuffers:[],preDrawHandleClientVertexAttribBindings:e=>{_r.resetBufferBinding=!1;for(var r=0;r<_r.currentContext.maxVertexAttribs;++r){var t=_r.currentContext.clientBuffers[r];if(t.clientside&&t.enabled){_r.resetBufferBinding=!0;var n=_r.calcBufLength(t.size,t.type,t.stride,e),a=_r.getTempVertexBuffer(n);qr.bindBuffer(34962,a),qr.bufferSubData(34962,0,E.subarray(t.ptr,t.ptr+n)),t.vertexAttribPointerAdaptor.call(qr,r,t.size,t.type,t.normalized,t.stride,0)}}},postDrawHandleClientVertexAttribBindings:()=>{_r.resetBufferBinding&&qr.bindBuffer(34962,_r.buffers[qr.currentArrayBufferBinding])},createContext:(e,r)=>{if(!e.getContextSafariWebGL2Fixed){e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=function(r,t){var n=e.getContextSafariWebGL2Fixed(r,t);return"webgl"==r==n instanceof WebGLRenderingContext?n:null}}var t=r.majorVersion>1?e.getContext("webgl2",r):e.getContext("webgl",r);return t?_r.registerContext(t,r):0},registerContext:(e,r)=>{var t=_r.getNewId(_r.contexts),n={handle:t,attributes:r,version:r.majorVersion,GLctx:e};e.canvas&&(e.canvas.GLctxObject=n),_r.contexts[t]=n,(void 0===r.enableExtensionsByDefault||r.enableExtensionsByDefault)&&_r.initExtensions(n),n.maxVertexAttribs=n.GLctx.getParameter(34921),n.clientBuffers=[];for(var a=0;a<n.maxVertexAttribs;a++)n.clientBuffers[a]={enabled:!1,clientside:!1,size:0,type:0,normalized:0,stride:0,ptr:0,vertexAttribPointerAdaptor:null};return _r.generateTempBuffers(!1,n),t},makeContextCurrent:e=>(_r.currentContext=_r.contexts[e],i.ctx=qr=_r.currentContext?.GLctx,!(e&&!qr)),getContext:e=>_r.contexts[e],deleteContext:e=>{_r.currentContext===_r.contexts[e]&&(_r.currentContext=null),"object"==typeof xr&&xr.removeAllHandlersOnTarget(_r.contexts[e].GLctx.canvas),_r.contexts[e]&&_r.contexts[e].GLctx.canvas&&(_r.contexts[e].GLctx.canvas.GLctxObject=void 0),_r.contexts[e]=null},initExtensions:e=>{if(e||=_r.currentContext,!e.initExtensionsDone){e.initExtensionsDone=!0;var r,t=e.GLctx;(e=>{var r=e.getExtension("ANGLE_instanced_arrays");if(r)e.vertexAttribDivisor=(e,t)=>r.vertexAttribDivisorANGLE(e,t),e.drawArraysInstanced=(e,t,n,a)=>r.drawArraysInstancedANGLE(e,t,n,a),e.drawElementsInstanced=(e,t,n,a,o)=>r.drawElementsInstancedANGLE(e,t,n,a,o)})(t),(e=>{var r=e.getExtension("OES_vertex_array_object");if(r)e.createVertexArray=()=>r.createVertexArrayOES(),e.deleteVertexArray=e=>r.deleteVertexArrayOES(e),e.bindVertexArray=e=>r.bindVertexArrayOES(e),e.isVertexArray=e=>r.isVertexArrayOES(e)})(t),(e=>{var r=e.getExtension("WEBGL_draw_buffers");if(r)e.drawBuffers=(e,t)=>r.drawBuffersWEBGL(e,t)})(t),(r=t).dibvbi=r.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"),(e=>{e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")})(t),e.version>=2&&(t.disjointTimerQueryExt=t.getExtension("EXT_disjoint_timer_query_webgl2")),(e.version<2||!t.disjointTimerQueryExt)&&(t.disjointTimerQueryExt=t.getExtension("EXT_disjoint_timer_query")),(e=>{e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw")})(t),yr(t).forEach((e=>{e.includes("lose_context")||e.includes("debug")||t.getExtension(e)}))}}},xr={removeAllEventListeners(){for(;xr.eventHandlers.length;)xr._removeHandler(xr.eventHandlers.length-1);xr.deferredCalls=[]},inEventHandler:0,deferredCalls:[],deferCall(e,r,t){function n(e,r){if(e.length!=r.length)return!1;for(var t in e)if(e[t]!=r[t])return!1;return!0}for(var a of xr.deferredCalls)if(a.targetFunction==e&&n(a.argsList,t))return;xr.deferredCalls.push({targetFunction:e,precedence:r,argsList:t}),xr.deferredCalls.sort(((e,r)=>e.precedence<r.precedence))},removeDeferredCalls(e){xr.deferredCalls=xr.deferredCalls.filter((r=>r.targetFunction!=e))},canPerformEventHandlerRequests:()=>navigator.userActivation?navigator.userActivation.isActive:xr.inEventHandler&&xr.currentEventHandler.allowsDeferredCalls,runDeferredCalls(){if(xr.canPerformEventHandlerRequests()){var e=xr.deferredCalls;for(var r of(xr.deferredCalls=[],e))r.targetFunction(...r.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:(e,r)=>{for(var t=0;t<xr.eventHandlers.length;++t)xr.eventHandlers[t].target!=e||r&&r!=xr.eventHandlers[t].eventTypeString||xr._removeHandler(t--)},_removeHandler(e){var r=xr.eventHandlers[e];r.target.removeEventListener(r.eventTypeString,r.eventListenerFunc,r.useCapture),xr.eventHandlers.splice(e,1)},registerOrRemoveHandler(e){if(!e.target)return-4;if(e.callbackfunc)e.eventListenerFunc=function(r){++xr.inEventHandler,xr.currentEventHandler=e,xr.runDeferredCalls(),e.handlerFunc(r),xr.runDeferredCalls(),--xr.inEventHandler},e.target.addEventListener(e.eventTypeString,e.eventListenerFunc,e.useCapture),xr.eventHandlers.push(e);else for(var r=0;r<xr.eventHandlers.length;++r)xr.eventHandlers[r].target==e.target&&xr.eventHandlers[r].eventTypeString==e.eventTypeString&&xr._removeHandler(r--);return 0},getNodeNameForTarget:e=>e?e==window?"#window":e==screen?"#screen":e?.nodeName||"":"",fullscreenEnabled:()=>document.fullscreenEnabled||document.webkitFullscreenEnabled},Er=["default","low-power","high-performance"],Sr=[0,"undefined"!=typeof document?document:0,"undefined"!=typeof window?window:0],kr=e=>("number"==typeof e&&(e=Pe(e)),e&&"#canvas"!==e?void 0!==_r&&_r.offscreenCanvases[e]?_r.offscreenCanvases[e]:(e=>{try{return e?("number"==typeof e&&(e=Sr[e]||Pe(e)),"#window"===e?window:"#document"===e?document:"#screen"===e?screen:"#canvas"===e?i.canvas:"string"==typeof e?document.getElementById(e):e):window}catch(r){return null}})(e):void 0!==_r&&_r.offscreenCanvases.canvas?_r.offscreenCanvases.canvas:i.canvas),Lr=(e,r)=>{var t=r>>2,n=L[t+2],a={alpha:!!x[r+0],depth:!!x[r+1],stencil:!!x[r+2],antialias:!!x[r+3],premultipliedAlpha:!!x[r+4],preserveDrawingBuffer:!!x[r+5],powerPreference:Er[n],failIfMajorPerformanceCaveat:!!x[r+12],majorVersion:L[t+4],minorVersion:L[t+5],enableExtensionsByDefault:x[r+24],explicitSwapControl:x[r+25],proxyContextToMainThread:L[t+7],renderViaOffscreenBackBuffer:x[r+32]},o=kr(e);return o?a.explicitSwapControl?0:_r.createContext(o,a):0},Br=()=>_r.currentContext?_r.currentContext.handle:0,Cr=e=>Tt(e),Pr=e=>{var r=we(e)+1,t=Cr(r);return Ye(e,t,r),t},Fr=[],Ir={Internals:{jsObjects:[],jsObjectInsert:(e,r)=>{Ir.Internals.jsObjects[e]=r},bufferOnUnmaps:[],futures:[],futureInsert:(e,r)=>{}},getJsObject:e=>{if(e)return Ir.Internals.jsObjects[e]},importJsAdapter:(e,r=0)=>{var t=xt(r);return Ir.Internals.jsObjects[t]=e,t},importJsBindGroup:(e,r=0)=>{var t=it(r);return Ir.Internals.jsObjects[t]=e,t},importJsBindGroupLayout:(e,r=0)=>{var t=st(r);return Ir.Internals.jsObjects[t]=e,t},importJsBuffer:(e,r=0)=>{var t=Et(r);return Ir.Internals.jsObjects[t]=e,t},importJsCommandBuffer:(e,r=0)=>{var t=ut(r);return Ir.Internals.jsObjects[t]=e,t},importJsCommandEncoder:(e,r=0)=>{var t=ct(r);return Ir.Internals.jsObjects[t]=e,t},importJsComputePassEncoder:(e,r=0)=>{var t=lt(r);return Ir.Internals.jsObjects[t]=e,t},importJsComputePipeline:(e,r=0)=>{var t=dt(r);return Ir.Internals.jsObjects[t]=e,t},importJsDevice:(e,r=0)=>{var t=kt(r),n=St(r,t);return Ir.Internals.jsObjectInsert(t,e.queue),Ir.Internals.jsObjectInsert(n,e),n},importJsPipelineLayout:(e,r=0)=>{var t=mt(r);return Ir.Internals.jsObjects[t]=e,t},importJsQuerySet:(e,r=0)=>{var t=ft(r);return Ir.Internals.jsObjects[t]=e,t},importJsQueue:(e,r=0)=>{var t=kt(r);return Ir.Internals.jsObjects[t]=e,t},importJsRenderBundle:(e,r=0)=>{var t=pt(r);return Ir.Internals.jsObjects[t]=e,t},importJsRenderBundleEncoder:(e,r=0)=>{var t=gt(r);return Ir.Internals.jsObjects[t]=e,t},importJsRenderPassEncoder:(e,r=0)=>{var t=ht(r);return Ir.Internals.jsObjects[t]=e,t},importJsRenderPipeline:(e,r=0)=>{var t=vt(r);return Ir.Internals.jsObjects[t]=e,t},importJsSampler:(e,r=0)=>{var t=bt(r);return Ir.Internals.jsObjects[t]=e,t},importJsShaderModule:(e,r=0)=>{var t=Lt(r);return Ir.Internals.jsObjects[t]=e,t},importJsSurface:(e,r=0)=>{var t=wt(r);return Ir.Internals.jsObjects[t]=e,t},importJsTexture:(e,r=0)=>{var t=yt(r);return Ir.Internals.jsObjects[t]=e,t},importJsTextureView:(e,r=0)=>{var t=_t(r);return Ir.Internals.jsObjects[t]=e,t},errorCallback:(e,r,t,n)=>{var a,o,i=de(),s=Pr(t);((o=Fr[a=e])||(a>=Fr.length&&(Fr.length=a+1),Fr[a]=o=wr.get(a)),o)(r,s,n),le(i)},setStringView:(e,r,t)=>{B[e>>2]=r,B[e+4>>2]=t},makeStringFromStringView:e=>{var r=B[e>>2],t=B[e+4>>2];return Pe(r,t)},makeStringFromOptionalStringView:e=>{var r=B[e>>2],t=B[e+4>>2];return r?Pe(r,t):0===t?"":void 0},makeColor:e=>({r:P[e>>3],g:P[e+8>>3],b:P[e+16>>3],a:P[e+24>>3]}),makeExtent3D:e=>({width:B[e>>2],height:B[e+4>>2],depthOrArrayLayers:B[e+8>>2]}),makeOrigin3D:e=>({x:B[e>>2],y:B[e+4>>2],z:B[e+8>>2]}),makeImageCopyTexture:e=>({texture:Ir.getJsObject(B[e>>2]),mipLevel:B[e+4>>2],origin:Ir.makeOrigin3D(e+8),aspect:Ir.TextureAspect[B[e+20>>2]]}),makeTextureDataLayout:e=>{var r=B[e+16>>2],t=B[e+20>>2];return{offset:4294967296*B[e+4+8>>2]+B[e+8>>2],bytesPerRow:4294967295===r?void 0:r,rowsPerImage:4294967295===t?void 0:t}},makeImageCopyBuffer:e=>{var r=e+0,t=Ir.makeTextureDataLayout(r);return t.buffer=Ir.getJsObject(B[e+24>>2]),t},makePipelineConstants:(e,r)=>{if(e){for(var t={},n=0;n<e;++n){var a=r+24*n;t[Ir.makeStringFromStringView(a+4)]=P[a+16>>3]}return t}},makePipelineLayout:e=>e?Ir.getJsObject(e):"auto",makeComputeState:e=>{if(e)return{module:Ir.getJsObject(B[e+4>>2]),constants:Ir.makePipelineConstants(B[e+16>>2],B[e+20>>2]),entryPoint:Ir.makeStringFromOptionalStringView(e+8)}},makeComputePipelineDesc:e=>({label:Ir.makeStringFromOptionalStringView(e+4),layout:Ir.makePipelineLayout(B[e+12>>2]),compute:Ir.makeComputeState(e+16)}),makeRenderPipelineDesc:e=>{function r(e){if(e)return{operation:Ir.BlendOperation[B[e>>2]],srcFactor:Ir.BlendFactor[B[e+4>>2]],dstFactor:Ir.BlendFactor[B[e+8>>2]]}}function t(e){if(e)return{alpha:r(e+12),color:r(e+0)}}function n(e,r){for(var n,a,o=[],i=0;i<e;++i)o.push((a=void 0,0===(a=B[(n=r+24*i)+4>>2])?void 0:{format:Ir.TextureFormat[a],blend:t(B[n+8>>2]),writeMask:B[n+16>>2]}));return o}function a(e){return{compare:Ir.CompareFunction[B[e>>2]],failOp:Ir.StencilOperation[B[e+4>>2]],depthFailOp:Ir.StencilOperation[B[e+8>>2]],passOp:Ir.StencilOperation[B[e+12>>2]]}}function o(e,r){for(var t,n=[],a=0;a<e;++a)n.push((t=r+24*a,{format:Ir.VertexFormat[B[t>>2]],offset:4294967296*B[t+4+8>>2]+B[t+8>>2],shaderLocation:B[t+16>>2]}));return n}function i(e){if(e){var r=B[e+8>>2];return 0===r?null:{arrayStride:4294967296*B[e+4>>2]+B[e>>2],stepMode:Ir.VertexStepMode[r],attributes:o(B[e+12>>2],B[e+16>>2])}}}function s(e,r){if(e){for(var t=[],n=0;n<e;++n)t.push(i(r+24*n));return t}}return{label:Ir.makeStringFromOptionalStringView(e+4),layout:Ir.makePipelineLayout(B[e+12>>2]),vertex:function(e){if(e)return{module:Ir.getJsObject(B[e+4>>2]),constants:Ir.makePipelineConstants(B[e+16>>2],B[e+20>>2]),buffers:s(B[e+24>>2],B[e+28>>2]),entryPoint:Ir.makeStringFromOptionalStringView(e+8)}}(e+16),primitive:function(e){if(e)return{topology:Ir.PrimitiveTopology[B[e+4>>2]],stripIndexFormat:Ir.IndexFormat[B[e+8>>2]],frontFace:Ir.FrontFace[B[e+12>>2]],cullMode:Ir.CullMode[B[e+16>>2]],unclippedDepth:!!B[e+20>>2]}}(e+48),depthStencil:function(e){if(e)return{format:Ir.TextureFormat[B[e+4>>2]],depthWriteEnabled:!!B[e+8>>2],depthCompare:Ir.CompareFunction[B[e+12>>2]],stencilFront:a(e+16),stencilBack:a(e+32),stencilReadMask:B[e+48>>2],stencilWriteMask:B[e+52>>2],depthBias:L[e+56>>2],depthBiasSlopeScale:C[e+60>>2],depthBiasClamp:C[e+64>>2]}}(B[e+72>>2]),multisample:function(e){if(e)return{count:B[e+4>>2],mask:B[e+8>>2],alphaToCoverageEnabled:!!B[e+12>>2]}}(e+76),fragment:function(e){if(e)return{module:Ir.getJsObject(B[e+4>>2]),constants:Ir.makePipelineConstants(B[e+16>>2],B[e+20>>2]),targets:n(B[e+24>>2],B[e+28>>2]),entryPoint:Ir.makeStringFromOptionalStringView(e+8)}}(B[e+92>>2])}},fillLimitStruct:(e,r)=>{var t=r+8;function n(r,n){var a=e[r];L[t+n>>2]=a}function a(r,n){var a=e[r];N=[a>>>0,(G=a,+Math.abs(G)>=1?G>0?+Math.floor(G/4294967296)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],L[t+n>>2]=N[0],L[t+(n+4)>>2]=N[1]}n("maxTextureDimension1D",0),n("maxTextureDimension2D",4),n("maxTextureDimension3D",8),n("maxTextureArrayLayers",12),n("maxBindGroups",16),n("maxBindGroupsPlusVertexBuffers",20),n("maxBindingsPerBindGroup",24),n("maxDynamicUniformBuffersPerPipelineLayout",28),n("maxDynamicStorageBuffersPerPipelineLayout",32),n("maxSampledTexturesPerShaderStage",36),n("maxSamplersPerShaderStage",40),n("maxStorageBuffersPerShaderStage",44),n("maxStorageTexturesPerShaderStage",48),n("maxUniformBuffersPerShaderStage",52),n("minUniformBufferOffsetAlignment",72),n("minStorageBufferOffsetAlignment",76),a("maxUniformBufferBindingSize",56),a("maxStorageBufferBindingSize",64),n("maxVertexBuffers",80),a("maxBufferSize",88),n("maxVertexAttributes",96),n("maxVertexBufferArrayStride",100),n("maxInterStageShaderComponents",104),n("maxInterStageShaderVariables",108),n("maxColorAttachments",112),n("maxColorAttachmentBytesPerSample",116),n("maxComputeWorkgroupStorageSize",120),n("maxComputeInvocationsPerWorkgroup",124),n("maxComputeWorkgroupSizeX",128),n("maxComputeWorkgroupSizeY",132),n("maxComputeWorkgroupSizeZ",136),n("maxComputeWorkgroupsPerDimension",140)},Int_BufferMapState:{unmapped:1,pending:2,mapped:3},Int_CompilationMessageType:{error:1,warning:2,info:3},Int_DeviceLostReason:{undefined:1,unknown:1,destroyed:2},Int_PreferredFormat:{rgba8unorm:18,bgra8unorm:23},WGSLFeatureName:{1:"readonly_and_readwrite_storage_textures",2:"packed_4x8_integer_dot_product",3:"unrestricted_pointer_parameters",4:"pointer_composite_access"},AddressMode:[,"clamp-to-edge","repeat","mirror-repeat"],BlendFactor:[,"zero","one","src","one-minus-src","src-alpha","one-minus-src-alpha","dst","one-minus-dst","dst-alpha","one-minus-dst-alpha","src-alpha-saturated","constant","one-minus-constant","src1","one-minus-src1","src1alpha","one-minus-src1alpha"],BlendOperation:[,"add","subtract","reverse-subtract","min","max"],BufferBindingType:["binding-not-used","uniform","storage","read-only-storage"],BufferMapState:{1:"unmapped",2:"pending",3:"mapped"},CompareFunction:[,"never","less","equal","less-equal","greater","not-equal","greater-equal","always"],CompilationInfoRequestStatus:{1:"success",2:"instance-dropped",3:"error",4:"device-lost",5:"unknown"},CompositeAlphaMode:[,"opaque","premultiplied","unpremultiplied","inherit"],CullMode:[,"none","front","back"],ErrorFilter:{1:"validation",2:"out-of-memory",3:"internal"},FeatureName:{1:"depth-clip-control",2:"depth32float-stencil8",3:"timestamp-query",4:"texture-compression-bc",5:"texture-compression-etc2",6:"texture-compression-astc",7:"indirect-first-instance",8:"shader-f16",9:"rg11b10ufloat-renderable",10:"bgra8unorm-storage",11:"float32-filterable",12:"float32-blendable",13:"subgroups",14:"subgroups-f16"},FilterMode:[,"nearest","linear"],FrontFace:[,"ccw","cw"],IndexFormat:[,"uint16","uint32"],LoadOp:[,"load","clear"],MipmapFilterMode:[,"nearest","linear"],OptionalBool:["false","true"],PowerPreference:[,"low-power","high-performance"],PrimitiveTopology:[,"point-list","line-list","line-strip","triangle-list","triangle-strip"],QueryType:{1:"occlusion",2:"timestamp"},SamplerBindingType:["binding-not-used","filtering","non-filtering","comparison"],Status:{1:"success",2:"error"},StencilOperation:[,"keep","zero","replace","invert","increment-clamp","decrement-clamp","increment-wrap","decrement-wrap"],StorageTextureAccess:["binding-not-used","write-only","read-only","read-write"],StoreOp:[,"store","discard"],SurfaceGetCurrentTextureStatus:{1:"success",2:"timeout",3:"outdated",4:"lost",5:"out-of-memory",6:"device-lost",7:"error"},TextureAspect:[,"all","stencil-only","depth-only"],TextureDimension:[,"1d","2d","3d"],TextureFormat:[,"r8unorm","r8snorm","r8uint","r8sint","r16uint","r16sint","r16float","rg8unorm","rg8snorm","rg8uint","rg8sint","r32float","r32uint","r32sint","rg16uint","rg16sint","rg16float","rgba8unorm","rgba8unorm-srgb","rgba8snorm","rgba8uint","rgba8sint","bgra8unorm","bgra8unorm-srgb","rgb10a2uint","rgb10a2unorm","rg11b10ufloat","rgb9e5ufloat","rg32float","rg32uint","rg32sint","rgba16uint","rgba16sint","rgba16float","rgba32float","rgba32uint","rgba32sint","stencil8","depth16unorm","depth24plus","depth24plus-stencil8","depth32float","depth32float-stencil8","bc1-rgba-unorm","bc1-rgba-unorm-srgb","bc2-rgba-unorm","bc2-rgba-unorm-srgb","bc3-rgba-unorm","bc3-rgba-unorm-srgb","bc4-r-unorm","bc4-r-snorm","bc5-rg-unorm","bc5-rg-snorm","bc6h-rgb-ufloat","bc6h-rgb-float","bc7-rgba-unorm","bc7-rgba-unorm-srgb","etc2-rgb8unorm","etc2-rgb8unorm-srgb","etc2-rgb8a1unorm","etc2-rgb8a1unorm-srgb","etc2-rgba8unorm","etc2-rgba8unorm-srgb","eac-r11unorm","eac-r11snorm","eac-rg11unorm","eac-rg11snorm","astc-4x4-unorm","astc-4x4-unorm-srgb","astc-5x4-unorm","astc-5x4-unorm-srgb","astc-5x5-unorm","astc-5x5-unorm-srgb","astc-6x5-unorm","astc-6x5-unorm-srgb","astc-6x6-unorm","astc-6x6-unorm-srgb","astc-8x5-unorm","astc-8x5-unorm-srgb","astc-8x6-unorm","astc-8x6-unorm-srgb","astc-8x8-unorm","astc-8x8-unorm-srgb","astc-10x5-unorm","astc-10x5-unorm-srgb","astc-10x6-unorm","astc-10x6-unorm-srgb","astc-10x8-unorm","astc-10x8-unorm-srgb","astc-10x10-unorm","astc-10x10-unorm-srgb","astc-12x10-unorm","astc-12x10-unorm-srgb","astc-12x12-unorm","astc-12x12-unorm-srgb"],TextureSampleType:["binding-not-used","float","unfilterable-float","depth","sint","uint"],TextureViewDimension:[,"1d","2d","2d-array","cube","cube-array","3d"],VertexFormat:{1:"uint8",2:"uint8x2",3:"uint8x4",4:"sint8",5:"sint8x2",6:"sint8x4",7:"unorm8",8:"unorm8x2",9:"unorm8x4",10:"snorm8",11:"snorm8x2",12:"snorm8x4",13:"uint16",14:"uint16x2",15:"uint16x4",16:"sint16",17:"sint16x2",18:"sint16x4",19:"unorm16",20:"unorm16x2",21:"unorm16x4",22:"snorm16",23:"snorm16x2",24:"snorm16x4",25:"float16",26:"float16x2",27:"float16x4",28:"float32",29:"float32x2",30:"float32x3",31:"float32x4",32:"uint32",33:"uint32x2",34:"uint32x3",35:"uint32x4",36:"sint32",37:"sint32x2",38:"sint32x3",39:"sint32x4",40:"unorm10-10-10-2",41:"unorm8x4-bgra"},VertexStepMode:["vertex-buffer-not-used",,"vertex","instance"],FeatureNameString2Enum:{"depth-clip-control":"1","depth32float-stencil8":"2","timestamp-query":"3","texture-compression-bc":"4","texture-compression-etc2":"5","texture-compression-astc":"6","indirect-first-instance":"7","shader-f16":"8","rg11b10ufloat-renderable":"9","bgra8unorm-storage":"10","float32-filterable":"11","float32-blendable":"12",subgroups:"13","subgroups-f16":"14"}},Tr={},Ar=()=>{if(!Ar.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:m||"./this.program"};for(var r in Tr)void 0===Tr[r]?delete e[r]:e[r]=Tr[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);Ar.strings=t}return Ar.strings};var Or=[],Dr=function(){var e=yr(qr);return e=e.concat(e.map((e=>"GL_"+e)))},Vr=(e,r,t)=>{if(r){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=t&&1!=t&&_r.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var a=qr.getParameter(34467);n=a?a.length:0;break;case 33309:if(_r.currentContext.version<2)return void _r.recordError(1282);n=Dr().length;break;case 33307:case 33308:if(_r.currentContext.version<2)return void _r.recordError(1280);n=33307==e?3:0}if(void 0===n){var o=qr.getParameter(e);switch(typeof o){case"number":n=o;break;case"boolean":n=o?1:0;break;case"string":return void _r.recordError(1280);case"object":if(null===o)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:n=0;break;default:return void _r.recordError(1280)}else{if(o instanceof Float32Array||o instanceof Uint32Array||o instanceof Int32Array||o instanceof Array){for(var i=0;i<o.length;++i)switch(t){case 0:L[r+4*i>>2]=o[i];break;case 2:C[r+4*i>>2]=o[i];break;case 4:x[r+i]=o[i]?1:0}return}try{n=0|o.name}catch(s){return _r.recordError(1280),void y(`GL_INVALID_ENUM in glGet${t}v: Unknown object returned from WebGL getParameter(${e})! (error: ${s})`)}}break;default:return _r.recordError(1280),void y(`GL_INVALID_ENUM in glGet${t}v: Native code calling glGet${t}v(${e}) and it returns ${o} of type ${typeof o}!`)}}switch(t){case 1:((e,r)=>{B[e>>2]=r;var t=B[e>>2];B[e+4>>2]=(r-t)/4294967296})(r,n);break;case 0:L[r>>2]=n;break;case 2:C[r>>2]=n;break;case 4:x[r]=n?1:0}}else _r.recordError(1281)},jr=e=>{var r=we(e)+1,t=at(r);return t&&Ye(e,t,r),t},Mr=e=>"]"==e.slice(-1)&&e.lastIndexOf("["),Rr=e=>0==(e-=5120)?x:1==e?E:2==e?S:4==e?L:6==e?C:5==e||28922==e||28520==e||30779==e||30782==e?B:k,Ur=(e,r)=>e>>>31-Math.clz32(r.BYTES_PER_ELEMENT),zr=(e,r,t,n,a,o)=>{var i=Rr(e),s=(e=>({5:3,6:4,8:2,29502:3,29504:4,26917:2,26918:2,29846:3,29847:4}[e-6402]||1))(r)*i.BYTES_PER_ELEMENT,u=((e,r,t)=>{var n,a,o=(_r.unpackRowLength||e)*t;return r*(n=o,a=_r.unpackAlignment,n+a-1&-a)})(t,n,s);return i.subarray(Ur(a,i),Ur(a+u,i))},Gr=e=>{var r=qr.currentProgram;if(r){var t=r.uniformLocsById[e];return"number"==typeof t&&(r.uniformLocsById[e]=t=qr.getUniformLocation(r,r.uniformArrayNamesById[e]+(t>0?`[${t}]`:""))),t}_r.recordError(1282)},Nr=[],$r=[];var Wr=Ce.createPath,Hr=Ce.createLazyFile,Jr=Ce.createDevice;i.requestFullscreen=se.requestFullscreen,i.requestAnimationFrame=se.requestAnimationFrame,i.setCanvasSize=se.setCanvasSize,i.pauseMainLoop=se.mainLoop.pause,i.resumeMainLoop=se.mainLoop.resume,i.getUserMedia=se.getUserMedia,i.createContext=se.createContext;var qr,Xr={},Yr={};Ce.createPreloadedFile=Le,Ce.staticInit(),i.FS_createPath=Ce.createPath,i.FS_createDataFile=Ce.createDataFile,i.FS_createPreloadedFile=Ce.createPreloadedFile,i.FS_unlink=Ce.unlink,i.FS_createLazyFile=Ce.createLazyFile,i.FS_createDevice=Ce.createDevice,(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);Ae=e})(),Oe=i.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},i.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Ge.push(0,1,void 0,1,null,1,!0,1,!1,1),i.count_emval_handles=$e;for(var Qr=0;Qr<32;++Qr)Or.push(new Array(Qr));var Kr=new Float32Array(288);for(Qr=0;Qr<=288;++Qr)Nr[Qr]=Kr.subarray(0,Qr);var Zr=new Int32Array(288);for(Qr=0;Qr<=288;++Qr)$r[Qr]=Zr.subarray(0,Qr);var et,rt={Wc:function(){const e=i.preinitializedWebGPUDevice,r=e.adapterInfo?e.adapterInfo.architecture:"Unknown";return jr(r)},Vc:function(){const e=i.preinitializedWebGPUDevice,r=e.adapterInfo?e.adapterInfo.description:"Unknown";return jr(r)},Uc:function(){const e=i.preinitializedWebGPUDevice,r=e.adapterInfo?e.adapterInfo.device:"Unknown";return jr(r)},Tc:function(){const e=i.preinitializedWebGPUDevice,r=e.adapterInfo?e.adapterInfo.vendor:"Unknown";return jr(r)},Sc:function(){return"undefined"!=typeof wasmOffsetConverter},Rc:function(e,r){i._wrapEmptyPacketListenerOutput(e,r)},Qc:function(e,r,t,n,a,o,s,u){const c=i._imageConverter(r,t,n,a,o,s,Float32Array);i._wrapSimpleListenerOutput(e,c,u)},Pc:function(e,r,t,n,a,o,s,u){const c=i._imageConverter(r,t,n,a,o,s,Float32Array);i._wrapSimpleListenerOutput(e,c,!1,u)},bb:function(e,r,t,n,a){const o=n?i.HEAPU8.slice(r,r+t):new Uint8Array(i.HEAPU8.buffer,r,t);i._wrapSimpleListenerOutput(e,o,a)},Oc:function(e,r,t){i._wrapSimpleListenerOutput(e,r,t)},Nc:function(e,r,t){i._wrapSimpleListenerOutput(e,r,t)},Mc:function(e,r,t){i._wrapSimpleListenerOutput(e,r,t)},Lc:function(e,r,t){i._wrapSimpleListenerOutput(e,r,t)},Kc:function(e,r,t){i._wrapSimpleListenerOutput(e,Pe(r),t)},Jc:function(e,r,t){i._wrapSimpleListenerOutput(e,r,t)},Ic:function(e,r,t,n,a,o,s,u){const c=i._imageConverter(r,t,n,a,o,s,Uint8Array);i._wrapSimpleListenerOutput(e,c,u)},Hc:function(e,r,t,n,a,o,s,u){const c=i._imageConverter(r,t,n,a,o,s,Uint8Array);i._wrapSimpleListenerOutput(e,c,!1,u)},G:function(e,r){i._wrapSimpleListenerOutput(e,void 0,!0,r)},Gc:function(e,r,t){i._wrapSimpleListenerOutput(e,r,!1,t)},Fc:function(e,r,t){i._wrapSimpleListenerOutput(e,r,!1,t)},Ec:function(e,r,t){i._wrapSimpleListenerOutput(e,r,!1,t)},Dc:function(e,r,t){i._wrapSimpleListenerOutput(e,r,!1,t)},Cc:function(e,r,t,n,a){const o=n?i.HEAPU8.slice(r,r+t):new Uint8Array(i.HEAPU8.buffer,r,t);i._wrapSimpleListenerOutput(e,o,!1,a)},Bc:function(e,r,t){i._wrapSimpleListenerOutput(e,Pe(r),!1,t)},Ac:function(e,r,t){i._wrapSimpleListenerOutput(e,r,!1,t)},zc:function(e,r,t,n,a){i._wrapSimpleListenerOutput(e,{data:_r.textures[r],width:t,height:n},a)},yc:function(e,r,t,n,a){i._wrapSimpleListenerOutput(e,{data:_r.textures[r],width:t,height:n},!1,a)},ra:function(e,r){if(i.errorListener){const t=Pe(r);i.errorListener(e,t)}},ab:function(){i._imageConverter||(i._imageConverter=(e,r,t,n,a,o,s)=>({data:new s(o?i.HEAPU8.slice(e,e+r).buffer:i.HEAPU8.buffer,e,t*n*a),width:t,height:n}))},p:function(){i._wrapSimpleListenerOutput||(i._wrapSimpleListenerOutput=(e,...r)=>{if(i.simpleListeners){const t=Pe(e);i.simpleListeners[t]&&i.simpleListeners[t](...r)}}),i._wrapEmptyPacketListenerOutput||(i._wrapEmptyPacketListenerOutput=(e,r)=>{if(i.emptyPacketListeners){const t=Pe(e);i.emptyPacketListeners[t]&&i.emptyPacketListeners[t](r)}})},$a:function(){return i&&i.gpuOriginForWebTexturesIsBottomLeft},nb:function(e,r){return Asyncify.handleAsync((async()=>{const t=Ir.getJsObject(e);await t.mapAsync(GPUMapMode.READ);const n=t.getMappedRange();E.set(new Uint8Array(n),r),t.unmap()}))},l:(e,r,t)=>{throw new me(e).init(r,t),e},xc:function(e){try{var r=Fe.getStreamFromFD(e);return Ce.dupStream(r).fd}catch(t){if(void 0===Ce||"ErrnoError"!==t.name)throw t;return-t.errno}},wc:function(e,r,t,n){try{if(r=Fe.getStr(r),r=Fe.calculateAt(e,r),-8&t)return-28;var a=Ce.lookupPath(r,{follow:!0}).node;if(!a)return-44;var o="";return 4&t&&(o+="r"),2&t&&(o+="w"),1&t&&(o+="x"),o&&Ce.nodePermissions(a,o)?-2:0}catch(i){if(void 0===Ce||"ErrnoError"!==i.name)throw i;return-i.errno}},_a:function(e,r,t){Fe.varargs=t;try{var n=Fe.getStreamFromFD(e);switch(r){case 0:if((a=Ie())<0)return-28;for(;Ce.streams[a];)a++;return Ce.dupStream(n,a).fd;case 1:case 2:case 13:case 14:return 0;case 3:return n.flags;case 4:var a=Ie();return n.flags|=a,0;case 12:a=Te();return S[a+0>>1]=2,0}return-28}catch(o){if(void 0===Ce||"ErrnoError"!==o.name)throw o;return-o.errno}},vc:function(e,r){try{var t=Fe.getStreamFromFD(e);return Fe.doStat(Ce.stat,t.path,r)}catch(n){if(void 0===Ce||"ErrnoError"!==n.name)throw n;return-n.errno}},uc:function(e,r,t){Fe.varargs=t;try{var n=Fe.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var a=n.tty.ops.ioctl_tcgets(n),o=Te();L[o>>2]=a.c_iflag||0,L[o+4>>2]=a.c_oflag||0,L[o+8>>2]=a.c_cflag||0,L[o+12>>2]=a.c_lflag||0;for(var i=0;i<32;i++)x[o+i+17]=a.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){o=Te();var s=L[o>>2],u=L[o+4>>2],c=L[o+8>>2],l=L[o+12>>2],d=[];for(i=0;i<32;i++)d.push(x[o+i+17]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:s,c_oflag:u,c_cflag:c,c_lflag:l,c_cc:d})}return 0;case 21519:if(!n.tty)return-59;o=Te();return L[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:o=Te();return Ce.ioctl(n,r,o);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var m=n.tty.ops.ioctl_tiocgwinsz(n.tty);o=Te();S[o>>1]=m[0],S[o+2>>1]=m[1]}return 0;default:return-28}}catch(f){if(void 0===Ce||"ErrnoError"!==f.name)throw f;return-f.errno}},tc:function(e,r){try{return e=Fe.getStr(e),Fe.doStat(Ce.lstat,e,r)}catch(t){if(void 0===Ce||"ErrnoError"!==t.name)throw t;return-t.errno}},sc:function(e,r,t,n){try{r=Fe.getStr(r);var a=256&n,o=4096&n;return n&=-6401,r=Fe.calculateAt(e,r,o),Fe.doStat(a?Ce.lstat:Ce.stat,r,t)}catch(i){if(void 0===Ce||"ErrnoError"!==i.name)throw i;return-i.errno}},Za:function(e,r,t,n){Fe.varargs=n;try{r=Fe.getStr(r),r=Fe.calculateAt(e,r);var a=n?Ie():0;return Ce.open(r,t,a).fd}catch(o){if(void 0===Ce||"ErrnoError"!==o.name)throw o;return-o.errno}},rc:function(e,r){try{return e=Fe.getStr(e),Fe.doStat(Ce.stat,e,r)}catch(t){if(void 0===Ce||"ErrnoError"!==t.name)throw t;return-t.errno}},nc:()=>{U("")},xb:(e,r,t,n,a)=>{},mc:(e,r,t,n)=>{Ue(e,{name:r=De(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(E[e])},destructorFunction:null})},lc:e=>Ue(e,Je),Xa:(e,r,t)=>{Ue(e,{name:r=De(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:8,readValueFromPointer:qe(r,t),destructorFunction:null})},D:(e,r,t,n,a)=>{r=De(r),-1===a&&(a=4294967295);var o=e=>e;if(0===n){var i=32-8*t;o=e=>e<<i>>>i}var s=r.includes("unsigned");Ue(e,{name:r,fromWireType:o,toWireType:s?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:8,readValueFromPointer:Xe(r,t,0!==n),destructorFunction:null})},o:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function a(e){var r=B[e>>2],t=B[e+4>>2];return new n(x.buffer,t,r)}Ue(e,{name:t=De(t),fromWireType:a,argPackAdvance:8,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},Wa:(e,r)=>{var t="std::string"===(r=De(r));Ue(e,{name:r,fromWireType(e){var r,n=B[e>>2],a=e+4;if(t)for(var o=a,i=0;i<=n;++i){var s=a+i;if(i==n||0==E[s]){var u=Pe(o,s-o);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),o=s+1}}else{var c=new Array(n);for(i=0;i<n;++i)c[i]=String.fromCharCode(E[a+i]);r=c.join("")}return nt(e),r},toWireType(e,r){var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var a="string"==typeof r;a||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||Re("Cannot pass non-string to std::string"),n=t&&a?we(r):r.length;var o=at(4+n+1),i=o+4;if(B[o>>2]=n,t&&a)Ye(r,i,n+1);else if(a)for(var s=0;s<n;++s){var u=r.charCodeAt(s);u>255&&(nt(i),Re("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]=r[s];return null!==e&&e.push(nt,o),o},argPackAdvance:8,readValueFromPointer:He,destructorFunction(e){nt(e)}})},oa:(e,r,t)=>{var n,a,o,i;t=De(t),2===r?(n=Ke,a=Ze,i=er,o=e=>k[e>>1]):4===r&&(n=rr,a=tr,i=nr,o=e=>B[e>>2]),Ue(e,{name:t,fromWireType:e=>{for(var t,a=B[e>>2],i=e+4,s=0;s<=a;++s){var u=e+4+s*r;if(s==a||0==o(u)){var c=n(i,u-i);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),i=u+r}}return nt(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Re(`Cannot pass non-string to C++ string type ${t}`);var o=i(n),s=at(4+o+r);return B[s>>2]=o/r,a(n,s+4,o+r),null!==e&&e.push(nt,s),s},argPackAdvance:8,readValueFromPointer:He,destructorFunction(e){nt(e)}})},kc:(e,r)=>{Ue(e,{isVoid:!0,name:r=De(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},jc:()=>1,ic:(e,r,t)=>E.copyWithin(e,r,r+t),na:(e,r,t)=>(e=We.toValue(e),((e,r,t)=>{var n=[],a=e.toWireType(n,t);return n.length&&(B[r>>2]=We.toHandle(n)),a})(r=ar(r,"emval::as"),t,e)),n:Ne,ma:e=>0===e?We.toHandle(sr()):(e=ir(e),We.toHandle(sr()[e])),Va:(e,r)=>(e=We.toValue(e),r=We.toValue(r),We.toHandle(e[r])),Ua:e=>{e>9&&(Ge[e+1]+=1)},la:(e,r)=>(e=We.toValue(e))instanceof(r=We.toValue(r)),ha:e=>We.toHandle(ir(e)),ka:e=>{(e=>{for(;e.length;){var r=e.pop();e.pop()(r)}})(We.toValue(e)),Ne(e)},Ta:(e,r,t)=>{e=We.toValue(e),r=We.toValue(r),t=We.toValue(t),e[r]=t},ga:(e,r)=>{var t=(e=ar(e,"_emval_take_value")).readValueFromPointer(r);return We.toHandle(t)},hc:e=>(e=We.toValue(e),We.toHandle(typeof e)),wb:function(e,r,t){var n=ur(e,r),a=new Date(1e3*n);L[t>>2]=a.getUTCSeconds(),L[t+4>>2]=a.getUTCMinutes(),L[t+8>>2]=a.getUTCHours(),L[t+12>>2]=a.getUTCDate(),L[t+16>>2]=a.getUTCMonth(),L[t+20>>2]=a.getUTCFullYear()-1900,L[t+24>>2]=a.getUTCDay();var o=Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0),i=(a.getTime()-o)/864e5|0;L[t+28>>2]=i},vb:function(e,r,t){var n=ur(e,r),a=new Date(1e3*n);L[t>>2]=a.getSeconds(),L[t+4>>2]=a.getMinutes(),L[t+8>>2]=a.getHours(),L[t+12>>2]=a.getDate(),L[t+16>>2]=a.getMonth(),L[t+20>>2]=a.getFullYear()-1900,L[t+24>>2]=a.getDay();var o=0|dr(a);L[t+28>>2]=o,L[t+36>>2]=-60*a.getTimezoneOffset();var i=new Date(a.getFullYear(),0,1),s=new Date(a.getFullYear(),6,1).getTimezoneOffset(),u=i.getTimezoneOffset(),c=0|(s!=u&&a.getTimezoneOffset()==Math.min(u,s));L[t+32>>2]=c},ub:function(e){var r,t=(()=>{var r=new Date(L[e+20>>2]+1900,L[e+16>>2],L[e+12>>2],L[e+8>>2],L[e+4>>2],L[e>>2],0),t=L[e+32>>2],n=r.getTimezoneOffset(),a=new Date(r.getFullYear(),0,1),o=new Date(r.getFullYear(),6,1).getTimezoneOffset(),i=a.getTimezoneOffset(),s=Math.min(i,o);if(t<0)L[e+32>>2]=Number(o!=i&&s==n);else if(t>0!=(s==n)){var u=Math.max(i,o),c=t>0?s:u;r.setTime(r.getTime()+6e4*(c-n))}L[e+24>>2]=r.getDay();var l=0|dr(r);L[e+28>>2]=l,L[e>>2]=r.getSeconds(),L[e+4>>2]=r.getMinutes(),L[e+8>>2]=r.getHours(),L[e+12>>2]=r.getDate(),L[e+16>>2]=r.getMonth(),L[e+20>>2]=r.getYear();var d=r.getTime();return isNaN(d)?-1:d/1e3})();return G=t,r=+Math.abs(G)>=1?G>0?+Math.floor(G/4294967296)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0,Ft(r),t>>>0},tb:function(e,r,t,n,a,o,i,s){var u=ur(a,o);try{if(isNaN(u))return 61;var c=Fe.getStreamFromFD(n),l=Ce.mmap(c,e,u,r,t),d=l.ptr;return L[i>>2]=l.allocated,B[s>>2]=d,0}catch(m){if(void 0===Ce||"ErrnoError"!==m.name)throw m;return-m.errno}},sb:function(e,r,t,n,a,o,i){var s=ur(o,i);try{var u=Fe.getStreamFromFD(a);2&t&&Fe.doMsync(e,u,r,n,s)}catch(c){if(void 0===Ce||"ErrnoError"!==c.name)throw c;return-c.errno}},gc:(e,r,t,n)=>{var a=(new Date).getFullYear(),o=new Date(a,0,1),i=new Date(a,6,1),s=o.getTimezoneOffset(),u=i.getTimezoneOffset(),c=Math.max(s,u);B[e>>2]=60*c,L[r>>2]=Number(s!=u);var l=e=>e.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1],d=l(o),m=l(i);u<s?(Ye(d,t,17),Ye(m,n,17)):(Ye(d,n,17),Ye(m,t,17))},fc:function(e,r){if("undefined"!=typeof dbg)dbg(Pe(e,r));else{{function t(e){console.warn.apply(console,arguments)}}t(Pe(e,r))}},M:(e,r,t)=>fr(e,r,t),Sa:(e,r,t)=>fr(e,r,t),ec:()=>Date.now(),ja:(e,r)=>y(Pe(e,r)),dc:()=>2147483648,t:Y,cc:()=>0,bc:(e,r)=>w(Pe(e,r)),ac:e=>(U("Cannot use emscripten_pc_get_function without -sUSE_OFFSET_CONVERTER"),0),$b:e=>{var r=E.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n,a,o=1;o<=4;o*=2){var i=r*(1+.2/o);i=Math.min(i,e+100663296);var s=Math.min(t,(n=Math.max(e,i))+((a=65536)-n%a)%a);if(pr(s))return!0}return!1},_b:function(){var e=br().split("\n");return"Error"==e[0]&&e.shift(),vr(e),hr.last_addr=gr(e[3]),hr.last_stack=e,hr.last_addr},Zb:(e,r,t)=>{var n;hr.last_addr==e?n=hr.last_stack:("Error"==(n=br().split("\n"))[0]&&n.shift(),vr(n));for(var a=3;n[a]&&gr(n[a])!=e;)++a;for(var o=0;o<t&&n[o+a];++o)L[r+4*o>>2]=gr(n[o+a]);return o},Yb:Lr,Xb:e=>{_r.currentContext==e&&(_r.currentContext=0),_r.deleteContext(e)},Wb:(e,r)=>{if(!r)return-5;if(!(e=_r.contexts[e]))return-3;var t=e.GLctx;if(!t)return-3;t=t.getContextAttributes(),x[r]=t.alpha,x[r+1]=t.depth,x[r+2]=t.stencil,x[r+3]=t.antialias,x[r+4]=t.premultipliedAlpha,x[r+5]=t.preserveDrawingBuffer;var n=t.powerPreference&&Er.indexOf(t.powerPreference);return L[r+8>>2]=n,x[r+12]=t.failIfMajorPerformanceCaveat,L[r+16>>2]=e.version,L[r+20>>2]=0,x[r+24]=e.attributes.enableExtensionsByDefault,0},Ra:Br,Vb:e=>_r.makeContextCurrent(e)?0:-5,L:()=>(void 0===Ir.preinitializedDeviceId&&(Ir.preinitializedDeviceId=Ir.importJsDevice(i.preinitializedWebGPUDevice),ot(Ir.preinitializedDeviceId)),ot(Ir.preinitializedDeviceId),Ir.preinitializedDeviceId),Ub:e=>{var r=Ir.getJsObject(e),t=Ir.Internals.bufferOnUnmaps[e];if(t){for(var n=0;n<t.length;++n)t[n]();delete Ir.Internals.bufferOnUnmaps[e]}r.destroy()},Tb:(e,r,t)=>{var n,a=Ir.getJsObject(e);0===t&&oe("getMappedRange size=0 no longer means WGPU_WHOLE_MAP_SIZE"),-1==t&&(t=void 0);try{n=a.getMappedRange(r,t)}catch(i){return 0}var o=Pt(16,n.byteLength);return E.fill(0,o,n.byteLength),Ir.Internals.bufferOnUnmaps[e].push((()=>{new Uint8Array(n).set(E.subarray(o,o+n.byteLength)),nt(o)})),o},Sb:e=>{var r=Ir.getJsObject(e),t=Ir.Internals.bufferOnUnmaps[e];if(t){for(var n=0;n<t.length;++n)t[n]();delete Ir.Internals.bufferOnUnmaps[e],r.unmap()}},F:e=>{delete Ir.Internals.jsObjects[e]},Rb:(e,r,t)=>{var n=!!B[r+32>>2],a={label:Ir.makeStringFromOptionalStringView(r+4),usage:B[r+16>>2],size:4294967296*B[r+4+24>>2]+B[r+24>>2],mappedAtCreation:n},o=Ir.getJsObject(e);Ir.Internals.jsObjectInsert(t,o.createBuffer(a)),n&&(Ir.Internals.bufferOnUnmaps[t]=[])},Qb:(e,r,t)=>{var n=B[r>>2],a=B[n+4>>2],o={label:Ir.makeStringFromOptionalStringView(r+4),code:""};if(2===a)o.code=Ir.makeStringFromStringView(n+8);var i=Ir.getJsObject(e);Ir.Internals.jsObjectInsert(t,i.createShaderModule(o))},Pb:e=>{Ir.getJsObject(e).destroy()},qc:(e,r)=>{var t=0;return Ar().forEach(((n,a)=>{var o=r+t;B[e+4*a>>2]=o,((e,r)=>{for(var t=0;t<e.length;++t)x[r++]=e.charCodeAt(t);x[r]=0})(n,o),t+=n.length+1})),0},pc:(e,r)=>{var t=Ar();B[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),B[r>>2]=n,0},Qa:te,qa:function(e){try{var r=Fe.getStreamFromFD(e);return Ce.close(r),0}catch(t){if(void 0===Ce||"ErrnoError"!==t.name)throw t;return t.errno}},Ya:function(e,r,t,n){try{var a=((e,r,t,n)=>{for(var a=0,o=0;o<t;o++){var i=B[r>>2],s=B[r+4>>2];r+=8;var u=Ce.read(e,x,i,s,n);if(u<0)return-1;if(a+=u,u<s)break;void 0!==n&&(n+=u)}return a})(Fe.getStreamFromFD(e),r,t);return B[n>>2]=a,0}catch(o){if(void 0===Ce||"ErrnoError"!==o.name)throw o;return o.errno}},yb:function(e,r,t,n,a){var o=ur(r,t);try{if(isNaN(o))return 61;var i=Fe.getStreamFromFD(e);return Ce.llseek(i,o,n),N=[i.position>>>0,(G=i.position,+Math.abs(G)>=1?G>0?+Math.floor(G/4294967296)>>>0:~~+Math.ceil((G-+(~~G>>>0))/4294967296)>>>0:0)],L[a>>2]=N[0],L[a+4>>2]=N[1],i.getdents&&0===o&&0===n&&(i.getdents=null),0}catch(s){if(void 0===Ce||"ErrnoError"!==s.name)throw s;return s.errno}},pa:function(e,r,t,n){try{var a=((e,r,t,n)=>{for(var a=0,o=0;o<t;o++){var i=B[r>>2],s=B[r+4>>2];r+=8;var u=Ce.write(e,x,i,s,n);if(u<0)return-1;a+=u,void 0!==n&&(n+=u)}return a})(Fe.getStreamFromFD(e),r,t);return B[n>>2]=a,0}catch(o){if(void 0===Ce||"ErrnoError"!==o.name)throw o;return o.errno}},Ob:(e,r)=>(pe(E.subarray(e,e+r)),0),b:e=>qr.activeTexture(e),fa:(e,r)=>{qr.attachShader(_r.programs[e],_r.shaders[r])},Nb:(e,r,t)=>{qr.bindAttribLocation(_r.programs[e],r,Pe(t))},d:(e,r)=>{34962==e?qr.currentArrayBufferBinding=r:34963==e&&(qr.currentElementArrayBufferBinding=r),35051==e?qr.currentPixelPackBufferBinding=r:35052==e&&(qr.currentPixelUnpackBufferBinding=r),qr.bindBuffer(e,_r.buffers[r])},Mb:(e,r,t)=>{qr.bindBufferBase(e,r,_r.buffers[t])},u:(e,r)=>{qr.bindFramebuffer(e,_r.framebuffers[r])},a:(e,r)=>{qr.bindTexture(e,_r.textures[r])},r:e=>{qr.bindVertexArray(_r.vaos[e]);var r=qr.getParameter(34965);qr.currentElementArrayBufferBinding=r?0|r.name:0},Pa:e=>qr.blendEquation(e),Lb:(e,r)=>qr.blendFunc(e,r),k:(e,r,t,n)=>{_r.currentContext.version>=2?t&&r?qr.bufferData(e,E,n,t,r):qr.bufferData(e,r,n):qr.bufferData(e,t?E.subarray(t,t+r):r,n)},w:e=>qr.clear(e),ea:(e,r,t,n)=>qr.clearColor(e,r,t,n),U:(e,r,t,n)=>{var a=(t>>>0)+4294967296*n;return qr.clientWaitSync(_r.syncs[e],r,a)},Oa:e=>{qr.compileShader(_r.shaders[e])},Na:()=>{var e=_r.getNewId(_r.programs),r=qr.createProgram();return r.name=e,r.maxUniformLength=r.maxAttributeLength=r.maxUniformBlockNameLength=0,r.uniformIdCounter=1,_r.programs[e]=r,e},Ma:e=>{var r=_r.getNewId(_r.shaders);return _r.shaders[r]=qr.createShader(e),r},A:(e,r)=>{for(var t=0;t<e;t++){var n=L[r+4*t>>2],a=_r.buffers[n];a&&(qr.deleteBuffer(a),a.name=0,_r.buffers[n]=null,n==qr.currentArrayBufferBinding&&(qr.currentArrayBufferBinding=0),n==qr.currentElementArrayBufferBinding&&(qr.currentElementArrayBufferBinding=0),n==qr.currentPixelPackBufferBinding&&(qr.currentPixelPackBufferBinding=0),n==qr.currentPixelUnpackBufferBinding&&(qr.currentPixelUnpackBufferBinding=0))}},K:(e,r)=>{for(var t=0;t<e;++t){var n=L[r+4*t>>2],a=_r.framebuffers[n];a&&(qr.deleteFramebuffer(a),a.name=0,_r.framebuffers[n]=null)}},h:e=>{if(e){var r=_r.programs[e];r?(qr.deleteProgram(r),r.name=0,_r.programs[e]=null):_r.recordError(1281)}},da:e=>{if(e){var r=_r.shaders[e];r?(qr.deleteShader(r),_r.shaders[e]=null):_r.recordError(1281)}},ca:e=>{if(e){var r=_r.syncs[e];r?(qr.deleteSync(r),r.name=0,_r.syncs[e]=null):_r.recordError(1281)}},y:(e,r)=>{for(var t=0;t<e;t++){var n=L[r+4*t>>2],a=_r.textures[n];a&&(qr.deleteTexture(a),a.name=0,_r.textures[n]=null)}},J:(e,r)=>{for(var t=0;t<e;t++){var n=L[r+4*t>>2];qr.deleteVertexArray(_r.vaos[n]),_r.vaos[n]=null}},La:(e,r)=>{qr.detachShader(_r.programs[e],_r.shaders[r])},I:e=>qr.disable(e),q:e=>{_r.currentContext.clientBuffers[e].enabled=!1,qr.disableVertexAttribArray(e)},m:(e,r,t)=>{_r.preDrawHandleClientVertexAttribBindings(r+t),qr.drawArrays(e,r,t),_r.postDrawHandleClientVertexAttribBindings()},X:(e,r)=>{for(var t=Or[e],n=0;n<e;n++)t[n]=L[r+4*n>>2];qr.drawBuffers(t)},Kb:e=>qr.enable(e),j:e=>{_r.currentContext.clientBuffers[e].enabled=!0,qr.enableVertexAttribArray(e)},Ka:(e,r)=>{var t=qr.fenceSync(e,r);if(t){var n=_r.getNewId(_r.syncs);return t.name=n,_r.syncs[n]=t,n}return 0},ba:()=>qr.finish(),z:()=>qr.flush(),x:(e,r,t,n,a)=>{qr.framebufferTexture2D(e,r,t,_r.textures[n],a)},Ja:(e,r,t,n,a)=>{qr.framebufferTextureLayer(e,r,_r.textures[t],n,a)},v:(e,r)=>{_r.genObject(e,r,"createBuffer",_r.buffers)},O:(e,r)=>{_r.genObject(e,r,"createFramebuffer",_r.framebuffers)},C:(e,r)=>{_r.genObject(e,r,"createTexture",_r.textures)},H:(e,r)=>{_r.genObject(e,r,"createVertexArray",_r.vaos)},Ia:(e,r)=>qr.getAttribLocation(_r.programs[e],Pe(r)),aa:()=>{var e=qr.getError()||_r.lastError;return _r.lastError=0,e},s:(e,r)=>Vr(e,r,0),Jb:(e,r,t)=>{if(t)if(e>=_r.counter)_r.recordError(1281);else if(e=_r.programs[e],35716==r){var n=qr.getProgramInfoLog(e);null===n&&(n="(unknown error)"),L[t>>2]=n.length+1}else if(35719==r){if(!e.maxUniformLength)for(var a=0;a<qr.getProgramParameter(e,35718);++a)e.maxUniformLength=Math.max(e.maxUniformLength,qr.getActiveUniform(e,a).name.length+1);L[t>>2]=e.maxUniformLength}else if(35722==r){if(!e.maxAttributeLength)for(a=0;a<qr.getProgramParameter(e,35721);++a)e.maxAttributeLength=Math.max(e.maxAttributeLength,qr.getActiveAttrib(e,a).name.length+1);L[t>>2]=e.maxAttributeLength}else if(35381==r){if(!e.maxUniformBlockNameLength)for(a=0;a<qr.getProgramParameter(e,35382);++a)e.maxUniformBlockNameLength=Math.max(e.maxUniformBlockNameLength,qr.getActiveUniformBlockName(e,a).length+1);L[t>>2]=e.maxUniformBlockNameLength}else L[t>>2]=qr.getProgramParameter(e,r);else _r.recordError(1281)},Ib:(e,r,t,n)=>{var a=qr.getShaderInfoLog(_r.shaders[e]);null===a&&(a="(unknown error)");var o=r>0&&n?Ye(a,n,r):0;t&&(L[t>>2]=o)},Hb:(e,r,t)=>{if(t)if(35716==r){var n=qr.getShaderInfoLog(_r.shaders[e]);null===n&&(n="(unknown error)");var a=n?n.length+1:0;L[t>>2]=a}else if(35720==r){var o=qr.getShaderSource(_r.shaders[e]),i=o?o.length+1:0;L[t>>2]=i}else L[t>>2]=qr.getShaderParameter(_r.shaders[e],r);else _r.recordError(1281)},E:e=>{var r=_r.stringCache[e];if(!r){switch(e){case 7939:r=jr(Dr().join(" "));break;case 7936:case 7937:case 37445:case 37446:var t=qr.getParameter(e);t||_r.recordError(1280),r=t?jr(t):0;break;case 7938:var n=qr.getParameter(7938);n=_r.currentContext.version>=2?`OpenGL ES 3.0 (${n})`:`OpenGL ES 2.0 (${n})`,r=jr(n);break;case 35724:var a=qr.getParameter(35724),o=a.match(/^WebGL GLSL ES ([0-9]\.[0-9][0-9]?)(?:$| .*)/);null!==o&&(3==o[1].length&&(o[1]=o[1]+"0"),a=`OpenGL ES GLSL ES ${o[1]} (${a})`),r=jr(a);break;default:_r.recordError(1280)}_r.stringCache[e]=r}return r},Gb:(e,r)=>qr.getUniformBlockIndex(_r.programs[e],Pe(r)),f:(e,r)=>{if(r=Pe(r),e=_r.programs[e]){(e=>{var r,t,n=e.uniformLocsById,a=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},r=0;r<qr.getProgramParameter(e,35718);++r){var o=qr.getActiveUniform(e,r),i=o.name,s=o.size,u=Mr(i),c=u>0?i.slice(0,u):i,l=e.uniformIdCounter;for(e.uniformIdCounter+=s,a[c]=[s,l],t=0;t<s;++t)n[l]=t,e.uniformArrayNamesById[l++]=c}})(e);var t=e.uniformLocsById,n=0,a=r,o=Mr(r);o>0&&(s=r.slice(o+1),n=parseInt(s)>>>0,a=r.slice(0,o));var i=e.uniformSizeAndIdsByName[a];if(i&&n<i[0]&&(t[n+=i[1]]=t[n]||qr.getUniformLocation(e,r)))return n}else _r.recordError(1281);var s;return-1},Ha:e=>{e=_r.programs[e],qr.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}},$:(e,r)=>{3317==e?_r.unpackAlignment=r:3314==e&&(_r.unpackRowLength=r),qr.pixelStorei(e,r)},ia:(e,r,t,n,a,o,i)=>{if(_r.currentContext.version>=2){if(qr.currentPixelPackBufferBinding)return void qr.readPixels(e,r,t,n,a,o,i);var s=Rr(o),u=Ur(i,s);qr.readPixels(e,r,t,n,a,o,s,u)}else{var c=zr(o,a,t,n,i);c?qr.readPixels(e,r,t,n,a,o,c):_r.recordError(1280)}},Ga:(e,r,t,n)=>{var a=_r.getSource(e,r,t,n);qr.shaderSource(_r.shaders[e],a)},B:(e,r,t,n,a,o,i,s,u)=>{if(_r.currentContext.version>=2){if(qr.currentPixelUnpackBufferBinding)return void qr.texImage2D(e,r,t,n,a,o,i,s,u);if(u){var c=Rr(s),l=Ur(u,c);return void qr.texImage2D(e,r,t,n,a,o,i,s,c,l)}}var d=u?zr(s,i,n,a,u):null;qr.texImage2D(e,r,t,n,a,o,i,s,d)},_:(e,r,t)=>qr.texParameterf(e,r,t),Fa:(e,r,t)=>{var n=C[t>>2];qr.texParameterf(e,r,n)},c:(e,r,t)=>qr.texParameteri(e,r,t),Z:(e,r,t,n,a)=>qr.texStorage2D(e,r,t,n,a),Fb:(e,r,t,n,a,o)=>qr.texStorage3D(e,r,t,n,a,o),W:(e,r,t,n,a,o,i,s,u)=>{if(_r.currentContext.version>=2){if(qr.currentPixelUnpackBufferBinding)return void qr.texSubImage2D(e,r,t,n,a,o,i,s,u);if(u){var c=Rr(s);return void qr.texSubImage2D(e,r,t,n,a,o,i,s,c,Ur(u,c))}}var l=u?zr(s,i,a,o,u):null;qr.texSubImage2D(e,r,t,n,a,o,i,s,l)},Eb:(e,r,t,n,a,o,i,s,u,c,l)=>{if(qr.currentPixelUnpackBufferBinding)qr.texSubImage3D(e,r,t,n,a,o,i,s,u,c,l);else if(l){var d=Rr(c);qr.texSubImage3D(e,r,t,n,a,o,i,s,u,c,d,Ur(l,d))}else qr.texSubImage3D(e,r,t,n,a,o,i,s,u,c,null)},V:(e,r)=>{qr.uniform1f(Gr(e),r)},e:(e,r)=>{qr.uniform1i(Gr(e),r)},Db:(e,r,t)=>{qr.uniform2f(Gr(e),r,t)},Cb:(e,r,t)=>{if(_r.currentContext.version>=2)r&&qr.uniform2fv(Gr(e),C,t>>2,2*r);else{if(r<=144)for(var n=Nr[2*r],a=0;a<2*r;a+=2)n[a]=C[t+4*a>>2],n[a+1]=C[t+(4*a+4)>>2];else n=C.subarray(t>>2,t+8*r>>2);qr.uniform2fv(Gr(e),n)}},Ea:(e,r,t,n)=>{qr.uniform3f(Gr(e),r,t,n)},Da:(e,r,t)=>{if(_r.currentContext.version>=2)r&&qr.uniform4fv(Gr(e),C,t>>2,4*r);else{if(r<=72){var n=Nr[4*r],a=C;t>>=2;for(var o=0;o<4*r;o+=4){var i=t+o;n[o]=a[i],n[o+1]=a[i+1],n[o+2]=a[i+2],n[o+3]=a[i+3]}}else n=C.subarray(t>>2,t+16*r>>2);qr.uniform4fv(Gr(e),n)}},Bb:(e,r,t)=>{if(_r.currentContext.version>=2)r&&qr.uniform4iv(Gr(e),L,t>>2,4*r);else{if(r<=72)for(var n=$r[4*r],a=0;a<4*r;a+=4)n[a]=L[t+4*a>>2],n[a+1]=L[t+(4*a+4)>>2],n[a+2]=L[t+(4*a+8)>>2],n[a+3]=L[t+(4*a+12)>>2];else n=L.subarray(t>>2,t+16*r>>2);qr.uniform4iv(Gr(e),n)}},Ab:(e,r,t)=>{e=_r.programs[e],qr.uniformBlockBinding(e,r,t)},Ca:(e,r,t,n)=>{if(_r.currentContext.version>=2)r&&qr.uniformMatrix4fv(Gr(e),!!t,C,n>>2,16*r);else{if(r<=18){var a=Nr[16*r],o=C;n>>=2;for(var i=0;i<16*r;i+=16){var s=n+i;a[i]=o[s],a[i+1]=o[s+1],a[i+2]=o[s+2],a[i+3]=o[s+3],a[i+4]=o[s+4],a[i+5]=o[s+5],a[i+6]=o[s+6],a[i+7]=o[s+7],a[i+8]=o[s+8],a[i+9]=o[s+9],a[i+10]=o[s+10],a[i+11]=o[s+11],a[i+12]=o[s+12],a[i+13]=o[s+13],a[i+14]=o[s+14],a[i+15]=o[s+15]}}else a=C.subarray(n>>2,n+64*r>>2);qr.uniformMatrix4fv(Gr(e),!!t,a)}},g:e=>{e=_r.programs[e],qr.useProgram(e),qr.currentProgram=e},i:(e,r,t,n,a,o)=>{var i=_r.currentContext.clientBuffers[e];if(!qr.currentArrayBufferBinding)return i.size=r,i.type=t,i.normalized=n,i.stride=a,i.ptr=o,i.clientside=!0,void(i.vertexAttribPointerAdaptor=function(e,r,t,n,a,o){this.vertexAttribPointer(e,r,t,n,a,o)});i.clientside=!1,qr.vertexAttribPointer(e,r,t,!!n,a,o)},N:(e,r,t,n)=>qr.viewport(e,r,t,n),zb:function(){var e=1;try{e=self.navigator.hardwareConcurrency}catch(r){}return e},qb:function(){let e;return"undefined"!=typeof HTMLCanvasElement?(e=document.createElement("canvas"),e.style.display="none"):e=new OffscreenCanvas(0,0),We.toHandle(e)},pb:function(e){let r=kr(e);return i&&!r&&(r=i.canvasWebGpu),We.toHandle(r)},ob:function(e,r){const t=Ir.getJsObject(e),n=We.toValue(r),a=t.importExternalTexture({source:n});return We.toHandle(a)},mb:function(e){const r=We.toValue(e);qr.texImage2D(qr.TEXTURE_2D,0,qr.RGBA,qr.RGBA,qr.UNSIGNED_BYTE,r)},oc:re,lb:(e,r)=>{var t;r&&(t={label:Ir.makeStringFromOptionalStringView(r+4),timestampWrites:function(e){if(0!==e)return{querySet:Ir.getJsObject(B[e>>2]),beginningOfPassWriteIndex:B[e+4>>2],endOfPassWriteIndex:B[e+8>>2]}}(B[r+12>>2])});var n=Ir.getJsObject(e),a=lt();return Ir.Internals.jsObjectInsert(a,n.beginComputePass(t)),a},Ba:(e,r)=>{function t(e){var r=B[e+4>>2];if(0!==r){var t=L[e+8>>2];-1==t&&(t=void 0);var n=B[e+16>>2],a=B[e+20>>2],o=Ir.makeColor(e+24);return{view:Ir.getJsObject(r),depthSlice:t,resolveTarget:Ir.getJsObject(B[e+12>>2]),clearValue:o,loadOp:Ir.LoadOp[n],storeOp:Ir.StoreOp[a]}}}function n(e,r){for(var n=[],a=0;a<e;++a)n.push(t(r+56*a));return n}function a(e){if(0!==e)return{view:Ir.getJsObject(B[e>>2]),depthClearValue:C[e+12>>2],depthLoadOp:Ir.LoadOp[B[e+4>>2]],depthStoreOp:Ir.StoreOp[B[e+8>>2]],depthReadOnly:!!B[e+16>>2],stencilClearValue:B[e+28>>2],stencilLoadOp:Ir.LoadOp[B[e+20>>2]],stencilStoreOp:Ir.StoreOp[B[e+24>>2]],stencilReadOnly:!!B[e+32>>2]}}function o(e){if(0!==e)return{querySet:Ir.getJsObject(B[e>>2]),beginningOfPassWriteIndex:B[e+4>>2],endOfPassWriteIndex:B[e+8>>2]}}var i=function(e){var r=B[e>>2],t=void 0;if(0!==r){B[r+4>>2];var i=r;t=4294967296*B[i+4+8>>2]+B[i+8>>2]}return{label:Ir.makeStringFromOptionalStringView(e+4),colorAttachments:n(B[e+12>>2],B[e+16>>2]),depthStencilAttachment:a(B[e+20>>2]),occlusionQuerySet:Ir.getJsObject(B[e+24>>2]),timestampWrites:o(B[e+28>>2]),maxDrawCount:t}}(r),s=Ir.getJsObject(e),u=ht();return Ir.Internals.jsObjectInsert(u,s.beginRenderPass(i)),u},kb:(e,r,t,n)=>{var a=Ir.getJsObject(e),o=Ir.makeExtent3D(n);a.copyBufferToTexture(Ir.makeImageCopyBuffer(r),Ir.makeImageCopyTexture(t),o)},jb:(e,r,t,n)=>{var a=Ir.getJsObject(e),o=Ir.makeExtent3D(n);a.copyTextureToBuffer(Ir.makeImageCopyTexture(r),Ir.makeImageCopyBuffer(t),o)},ib:(e,r,t,n)=>{var a=Ir.getJsObject(e),o=Ir.makeExtent3D(n);a.copyTextureToTexture(Ir.makeImageCopyTexture(r),Ir.makeImageCopyTexture(t),o)},T:(e,r)=>{var t=Ir.getJsObject(e),n=ut();return Ir.Internals.jsObjectInsert(n,t.finish()),n},hb:(e,r,t,n)=>{Ir.getJsObject(e).dispatchWorkgroups(r,t,n)},gb:e=>{Ir.getJsObject(e).end()},fb:(e,r,t,n,a)=>{var o=Ir.getJsObject(e),i=Ir.getJsObject(t);if(0==n)o.setBindGroup(r,i);else{for(var s=[],u=0;u<n;u++,a+=4)s.push(B[a>>2]);o.setBindGroup(r,i,s)}},eb:(e,r)=>{var t=Ir.getJsObject(e),n=Ir.getJsObject(r);t.setPipeline(n)},db:(e,r)=>{var t=Ir.getJsObject(e),n=st();return Ir.Internals.jsObjectInsert(n,t.getBindGroupLayout(r)),n},Aa:(e,r)=>{function t(e){var r=B[e+8>>2],t=B[e+32>>2],n=B[e+36>>2],a=B[e+4>>2];if(r){var o=(e=>B[e>>2]+4294967296*L[e+4>>2])(e+24);return-1==o&&(o=void 0),{binding:a,resource:{buffer:Ir.getJsObject(r),offset:4294967296*B[e+4+16>>2]+B[e+16>>2],size:o}}}return t?{binding:a,resource:Ir.getJsObject(t)}:{binding:a,resource:Ir.getJsObject(n)}}var n={label:Ir.makeStringFromOptionalStringView(r+4),layout:Ir.getJsObject(B[r+12>>2]),entries:function(e,r){for(var n=[],a=0;a<e;++a)n.push(t(r+40*a));return n}(B[r+16>>2],B[r+20>>2])},a=Ir.getJsObject(e),o=it();return Ir.Internals.jsObjectInsert(o,a.createBindGroup(n)),o},S:(e,r)=>{var t;r&&(t={label:Ir.makeStringFromOptionalStringView(r+4)});var n=Ir.getJsObject(e),a=ct();return Ir.Internals.jsObjectInsert(a,n.createCommandEncoder(t)),a},za:(e,r)=>{var t=Ir.makeComputePipelineDesc(r),n=Ir.getJsObject(e),a=dt();return Ir.Internals.jsObjectInsert(a,n.createComputePipeline(t)),a},ya:(e,r)=>{var t=Ir.makeRenderPipelineDesc(r),n=Ir.getJsObject(e),a=vt();return Ir.Internals.jsObjectInsert(a,n.createRenderPipeline(t)),a},xa:(e,r)=>{var t;r&&(t={label:Ir.makeStringFromOptionalStringView(r+4),addressModeU:Ir.AddressMode[B[r+12>>2]],addressModeV:Ir.AddressMode[B[r+16>>2]],addressModeW:Ir.AddressMode[B[r+20>>2]],magFilter:Ir.FilterMode[B[r+24>>2]],minFilter:Ir.FilterMode[B[r+28>>2]],mipmapFilter:Ir.MipmapFilterMode[B[r+32>>2]],lodMinClamp:C[r+36>>2],lodMaxClamp:C[r+40>>2],compare:Ir.CompareFunction[B[r+44>>2]]});var n=Ir.getJsObject(e),a=bt();return Ir.Internals.jsObjectInsert(a,n.createSampler(t)),a},Y:(e,r)=>{var t={label:Ir.makeStringFromOptionalStringView(r+4),size:Ir.makeExtent3D(r+28),mipLevelCount:B[r+44>>2],sampleCount:B[r+48>>2],dimension:Ir.TextureDimension[B[r+24>>2]],format:Ir.TextureFormat[B[r+40>>2]],usage:B[r+16>>2]},n=B[r+52>>2];if(n){var a=B[r+56>>2];t.viewFormats=Array.from(L.subarray(a>>2,a+4*n>>2),(e=>Ir.TextureFormat[e]))}var o=Ir.getJsObject(e),i=yt();return Ir.Internals.jsObjectInsert(i,o.createTexture(t)),i},R:(e,r,t)=>{var n=Ir.getJsObject(e),a=Array.from(L.subarray(t>>2,t+4*r>>2),(e=>Ir.getJsObject(e)));n.submit(a)},rb:function(e,r,t,n,a,o){var i=ur(t,n),s=Ir.getJsObject(e),u=Ir.getJsObject(r),c=E.subarray(a,a+o);s.writeBuffer(u,i,c,0,o)},wa:(e,r,t,n,a)=>{Ir.getJsObject(e).draw(r,t,n,a)},va:e=>{Ir.getJsObject(e).end()},ua:(e,r,t,n,a)=>{var o=Ir.getJsObject(e),i=Ir.getJsObject(t);if(0==n)o.setBindGroup(r,i);else{for(var s=[],u=0;u<n;u++,a+=4)s.push(B[a>>2]);o.setBindGroup(r,i,s)}},ta:(e,r)=>{var t=Ir.getJsObject(e),n=Ir.getJsObject(r);t.setPipeline(n)},sa:(e,r)=>{var t=Ir.getJsObject(e),n=st();return Ir.Internals.jsObjectInsert(n,t.getBindGroupLayout(r)),n},Q:(e,r)=>{var t;if(r){var n=B[r+24>>2],a=B[r+32>>2];t={label:Ir.makeStringFromOptionalStringView(r+4),format:Ir.TextureFormat[B[r+12>>2]],dimension:Ir.TextureViewDimension[B[r+16>>2]],baseMipLevel:B[r+20>>2],mipLevelCount:4294967295===n?void 0:n,baseArrayLayer:B[r+28>>2],arrayLayerCount:4294967295===a?void 0:a,aspect:Ir.TextureAspect[B[r+36>>2]]}}var o=Ir.getJsObject(e),i=_t();return Ir.Internals.jsObjectInsert(i,o.createView(t)),i},P:e=>{Ir.getJsObject(e).destroy()},cb:e=>{var r=Ir.getJsObject(e);return Ir.TextureFormat.indexOf(r.format)}},tt=function(){var e,r,t,a,o={a:rt};function s(e,r){var t;return tt=e.exports,b=tt.Xc,I(),wr=tt.Zc,t=tt.Yc,A.unshift(t),R(),tt}if(M(),i.instantiateWasm)try{return i.instantiateWasm(o,s)}catch(u){y(`Module.instantiateWasm callback failed with error: ${u}`),n(u)}return z||(z=H()),(e=v,r=z,t=o,a=function(e){s(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||$(r)||W(r)||l||"function"!=typeof fetch?q(r,t,a):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(a,(function(e){return y(`wasm streaming compile failed: ${e}`),y("falling back to ArrayBuffer instantiation"),q(r,t,a)}))))).catch(n),{}}(),nt=i._free=e=>(nt=i._free=tt._c)(e),at=i._malloc=e=>(at=i._malloc=tt.$c)(e),ot=(i._addBoundTextureAsImageToStream=(e,r,t,n)=>(i._addBoundTextureAsImageToStream=tt.ad)(e,r,t,n),i._attachImageListener=(e,r)=>(i._attachImageListener=tt.bd)(e,r),i._attachImageVectorListener=(e,r)=>(i._attachImageVectorListener=tt.cd)(e,r),i._registerModelResourcesGraphService=()=>(i._registerModelResourcesGraphService=tt.dd)(),i._bindTextureToStream=e=>(i._bindTextureToStream=tt.ed)(e),i._addBoundTextureToStream=(e,r,t,n)=>(i._addBoundTextureToStream=tt.fd)(e,r,t,n),i._addDoubleToInputStream=(e,r,t)=>(i._addDoubleToInputStream=tt.gd)(e,r,t),i._addFloatToInputStream=(e,r,t)=>(i._addFloatToInputStream=tt.hd)(e,r,t),i._addBoolToInputStream=(e,r,t)=>(i._addBoolToInputStream=tt.id)(e,r,t),i._addIntToInputStream=(e,r,t)=>(i._addIntToInputStream=tt.jd)(e,r,t),i._addUintToInputStream=(e,r,t)=>(i._addUintToInputStream=tt.kd)(e,r,t),i._addStringToInputStream=(e,r,t)=>(i._addStringToInputStream=tt.ld)(e,r,t),i._addRawDataSpanToInputStream=(e,r,t,n)=>(i._addRawDataSpanToInputStream=tt.md)(e,r,t,n),i._allocateBoolVector=e=>(i._allocateBoolVector=tt.nd)(e),i._allocateFloatVector=e=>(i._allocateFloatVector=tt.od)(e),i._allocateDoubleVector=e=>(i._allocateDoubleVector=tt.pd)(e),i._allocateIntVector=e=>(i._allocateIntVector=tt.qd)(e),i._allocateUintVector=e=>(i._allocateUintVector=tt.rd)(e),i._allocateStringVector=e=>(i._allocateStringVector=tt.sd)(e),i._addBoolVectorEntry=(e,r)=>(i._addBoolVectorEntry=tt.td)(e,r),i._addFloatVectorEntry=(e,r)=>(i._addFloatVectorEntry=tt.ud)(e,r),i._addDoubleVectorEntry=(e,r)=>(i._addDoubleVectorEntry=tt.vd)(e,r),i._addIntVectorEntry=(e,r)=>(i._addIntVectorEntry=tt.wd)(e,r),i._addUintVectorEntry=(e,r)=>(i._addUintVectorEntry=tt.xd)(e,r),i._addStringVectorEntry=(e,r)=>(i._addStringVectorEntry=tt.yd)(e,r),i._addBoolVectorToInputStream=(e,r,t)=>(i._addBoolVectorToInputStream=tt.zd)(e,r,t),i._addFloatVectorToInputStream=(e,r,t)=>(i._addFloatVectorToInputStream=tt.Ad)(e,r,t),i._addDoubleVectorToInputStream=(e,r,t)=>(i._addDoubleVectorToInputStream=tt.Bd)(e,r,t),i._addIntVectorToInputStream=(e,r,t)=>(i._addIntVectorToInputStream=tt.Cd)(e,r,t),i._addUintVectorToInputStream=(e,r,t)=>(i._addUintVectorToInputStream=tt.Dd)(e,r,t),i._addStringVectorToInputStream=(e,r,t)=>(i._addStringVectorToInputStream=tt.Ed)(e,r,t),i._addFlatHashMapToInputStream=(e,r,t,n,a)=>(i._addFlatHashMapToInputStream=tt.Fd)(e,r,t,n,a),i._addProtoToInputStream=(e,r,t,n,a)=>(i._addProtoToInputStream=tt.Gd)(e,r,t,n,a),i._addEmptyPacketToInputStream=(e,r)=>(i._addEmptyPacketToInputStream=tt.Hd)(e,r),i._addBoolToInputSidePacket=(e,r)=>(i._addBoolToInputSidePacket=tt.Id)(e,r),i._addDoubleToInputSidePacket=(e,r)=>(i._addDoubleToInputSidePacket=tt.Jd)(e,r),i._addFloatToInputSidePacket=(e,r)=>(i._addFloatToInputSidePacket=tt.Kd)(e,r),i._addIntToInputSidePacket=(e,r)=>(i._addIntToInputSidePacket=tt.Ld)(e,r),i._addUintToInputSidePacket=(e,r)=>(i._addUintToInputSidePacket=tt.Md)(e,r),i._addStringToInputSidePacket=(e,r)=>(i._addStringToInputSidePacket=tt.Nd)(e,r),i._addRawDataSpanToInputSidePacket=(e,r,t)=>(i._addRawDataSpanToInputSidePacket=tt.Od)(e,r,t),i._addProtoToInputSidePacket=(e,r,t,n)=>(i._addProtoToInputSidePacket=tt.Pd)(e,r,t,n),i._addBoolVectorToInputSidePacket=(e,r)=>(i._addBoolVectorToInputSidePacket=tt.Qd)(e,r),i._addDoubleVectorToInputSidePacket=(e,r)=>(i._addDoubleVectorToInputSidePacket=tt.Rd)(e,r),i._addFloatVectorToInputSidePacket=(e,r)=>(i._addFloatVectorToInputSidePacket=tt.Sd)(e,r),i._addIntVectorToInputSidePacket=(e,r)=>(i._addIntVectorToInputSidePacket=tt.Td)(e,r),i._addUintVectorToInputSidePacket=(e,r)=>(i._addUintVectorToInputSidePacket=tt.Ud)(e,r),i._addStringVectorToInputSidePacket=(e,r)=>(i._addStringVectorToInputSidePacket=tt.Vd)(e,r),i._attachBoolListener=e=>(i._attachBoolListener=tt.Wd)(e),i._attachBoolVectorListener=e=>(i._attachBoolVectorListener=tt.Xd)(e),i._attachDoubleListener=e=>(i._attachDoubleListener=tt.Yd)(e),i._attachDoubleVectorListener=e=>(i._attachDoubleVectorListener=tt.Zd)(e),i._attachFloatListener=e=>(i._attachFloatListener=tt._d)(e),i._attachFloatVectorListener=e=>(i._attachFloatVectorListener=tt.$d)(e),i._attachIntListener=e=>(i._attachIntListener=tt.ae)(e),i._attachIntVectorListener=e=>(i._attachIntVectorListener=tt.be)(e),i._attachUintListener=e=>(i._attachUintListener=tt.ce)(e),i._attachUintVectorListener=e=>(i._attachUintVectorListener=tt.de)(e),i._attachStringListener=e=>(i._attachStringListener=tt.ee)(e),i._attachStringVectorListener=e=>(i._attachStringVectorListener=tt.fe)(e),i._attachProtoListener=(e,r)=>(i._attachProtoListener=tt.ge)(e,r),i._attachProtoVectorListener=(e,r)=>(i._attachProtoVectorListener=tt.he)(e,r),i._getGraphConfig=(e,r)=>(i._getGraphConfig=tt.ie)(e,r),e=>(ot=tt.je)(e)),it=e=>(it=tt.ke)(e),st=e=>(st=tt.le)(e),ut=e=>(ut=tt.me)(e),ct=e=>(ct=tt.ne)(e),lt=e=>(lt=tt.oe)(e),dt=e=>(dt=tt.pe)(e),mt=e=>(mt=tt.qe)(e),ft=e=>(ft=tt.re)(e),pt=e=>(pt=tt.se)(e),gt=e=>(gt=tt.te)(e),ht=e=>(ht=tt.ue)(e),vt=e=>(vt=tt.ve)(e),bt=e=>(bt=tt.we)(e),wt=e=>(wt=tt.xe)(e),yt=e=>(yt=tt.ye)(e),_t=e=>(_t=tt.ze)(e),xt=e=>(xt=tt.Ae)(e),Et=(e,r)=>(Et=tt.Be)(e,r),St=(e,r)=>(St=tt.Ce)(e,r),kt=e=>(kt=tt.De)(e),Lt=e=>(Lt=tt.Ee)(e),Bt=(i._clearSubgraphs=()=>(i._clearSubgraphs=tt.Fe)(),i._pushBinarySubgraph=(e,r)=>(i._pushBinarySubgraph=tt.Ge)(e,r),i._pushTextSubgraph=(e,r)=>(i._pushTextSubgraph=tt.He)(e,r),i._changeBinaryGraph=(e,r)=>(i._changeBinaryGraph=tt.Ie)(e,r),i._changeTextGraph=(e,r)=>(i._changeTextGraph=tt.Je)(e,r),i._processGl=e=>(i._processGl=tt.Ke)(e),i._process=e=>(i._process=tt.Le)(e),i._bindTextureToCanvas=()=>(i._bindTextureToCanvas=tt.Me)(),i._requestShaderRefreshOnGraphChange=()=>(i._requestShaderRefreshOnGraphChange=tt.Ne)(),i._waitUntilIdle=()=>(i._waitUntilIdle=tt.Oe)(),i._closeGraph=()=>(i._closeGraph=tt.Pe)(),i._setAutoRenderToScreen=e=>(i._setAutoRenderToScreen=tt.Qe)(e),e=>(Bt=tt.Re)(e)),Ct=(e,r)=>(Ct=tt.Se)(e,r),Pt=(e,r)=>(Pt=tt.Te)(e,r),Ft=e=>(Ft=tt.Ue)(e),It=e=>(It=tt.Ve)(e),Tt=e=>(Tt=tt.We)(e),At=()=>(At=tt.Xe)(),Ot=e=>(Ot=tt.Ye)(e);i._kVersionStampBuildChangelistStr=1024,i._kVersionStampCitcSnapshotStr=1056,i._kVersionStampCitcWorkspaceIdStr=1088,i._kVersionStampSourceUriStr=1600,i._kVersionStampBuildClientStr=2112,i._kVersionStampBuildClientMintStatusStr=2624,i._kVersionStampBuildCompilerStr=2656,i._kVersionStampBuildDateTimePstStr=3168,i._kVersionStampBuildDepotPathStr=3200,i._kVersionStampBuildIdStr=3712,i._kVersionStampBuildInfoStr=4224,i._kVersionStampBuildLabelStr=4736,i._kVersionStampBuildTargetStr=5248,i._kVersionStampBuildTimestampStr=5760,i._kVersionStampBuildToolStr=5792,i._kVersionStampG3BuildTargetStr=6304,i._kVersionStampVerifiableStr=6816,i._kVersionStampBuildFdoTypeStr=6848,i._kVersionStampBuildBaselineChangelistStr=6880,i._kVersionStampBuildLtoTypeStr=6912,i._kVersionStampBuildPropellerTypeStr=6944,i._kVersionStampBuildPghoTypeStr=6976,i._kVersionStampBuildUsernameStr=7008,i._kVersionStampBuildHostnameStr=7520,i._kVersionStampBuildDirectoryStr=8032,i._kVersionStampBuildChangelistInt=8544,i._kVersionStampCitcSnapshotInt=8552,i._kVersionStampBuildClientMintStatusInt=8556,i._kVersionStampBuildTimestampInt=8560,i._kVersionStampVerifiableInt=8568,i._kVersionStampBuildCoverageEnabledInt=8572,i._kVersionStampBuildBaselineChangelistInt=8576,i._kVersionStampPrecookedTimestampStr=8592,i._kVersionStampPrecookedClientInfoStr=9104;function Dt(){function e(){et||(et=!0,i.calledRun=!0,F||(!0,i.noFSInit||Ce.init.initialized||Ce.init(),Ce.ignorePermissions=!1,xe.init(),ue(A),t(i),i.onRuntimeInitialized?.(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)e=i.postRun.shift(),O.unshift(e);var e;ue(O)}()))}D>0||(!function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)e=i.preRun.shift(),T.unshift(e);var e;ue(T)}(),D>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.addRunDependency=M,i.removeRunDependency=R,i.ccall=(e,r,t,n,a)=>{var o={string:e=>{var r=0;return null!=e&&0!==e&&(r=Pr(e)),r},array:e=>{var r,t,n=Cr(e.length);return r=e,t=n,x.set(r,t),n}};var s=(e=>i["_"+e])(e),u=[],c=0;if(n)for(var l=0;l<n.length;l++){var d=o[t[l]];d?(0===c&&(c=de()),u[l]=d(n[l])):u[l]=n[l]}var m=s(...u);return m=function(e){return 0!==c&&le(c),function(e){return"string"===r?Pe(e):"boolean"===r?Boolean(e):e}(e)}(m)},i.stringToNewUTF8=jr,i.FS_createPreloadedFile=Le,i.FS_unlink=e=>Ce.unlink(e),i.FS_createPath=Wr,i.FS_createDevice=Jr,i.FS_createDataFile=ke,i.FS_createLazyFile=Hr,j=function e(){et||Dt(),et||(j=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return Dt(),s}})();"object"==typeof exports&&"object"==typeof module?module.exports=ModuleFactory:"function"==typeof define&&define.amd&&define([],(()=>ModuleFactory));