cloudpilot-emu-embedded
Version:
Embedded version of the CloudpilotEmu PalmOS emulator
1 lines • 121 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.cloudpilot=e():t.cloudpilot=e()}(self,(()=>(()=>{var t={492:t=>{var e,r=(e="undefined"!=typeof document?document.currentScript?.src:void 0,async function(t={}){var r=t,i="object"==typeof window,n="undefined"!=typeof WorkerGlobalScope,o=("object"==typeof process&&process.versions?.node&&process.type,"./this.program"),s=(t,e)=>{throw e};n&&(e=self.location.href);var a,c,p="";if(i||n){try{p=new URL(".",e).href}catch{}n&&(c=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),a=async t=>{var e=await fetch(t,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)}}var u,l,h,d,m,y,_,f,v,g,b,S=console.log.bind(console),w=console.error.bind(console),C=!1;function I(t,e){t||M(e)}function E(){if(!C){var t=ji();0==t&&(t+=4);var e=v[t>>2],r=v[t+4>>2];34821223==e&&2310721022==r||M(`Stack overflow! Stack cookie has been overwritten at ${U(t)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${U(r)} ${U(e)}`),1668509029!=v[0]&&M("Runtime error: The application has corrupted its heap memory area (address zero)!")}}var D=!1;function G(){var t=m.buffer;y=new Int8Array(t),new Int16Array(t),r.HEAPU8=_=new Uint8Array(t),new Uint16Array(t),f=new Int32Array(t),r.HEAPU32=v=new Uint32Array(t),new Float32Array(t),g=new Float64Array(t),b=new BigInt64Array(t),new BigUint64Array(t)}var x,P=0,k=null;function M(t){r.onAbort?.(t),w(t="Aborted("+t+")"),C=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw d?.(e),e}async function R(t,e,r){if(!t&&"function"==typeof WebAssembly.instantiateStreaming)try{var i=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(i,r)}catch(t){w(`wasm streaming compile failed: ${t}`),w("falling back to ArrayBuffer instantiation")}return async function(t,e){try{var r=await async function(t){if(!u)try{var e=await a(t);return new Uint8Array(e)}catch{}return function(t){if(t==x&&u)return new Uint8Array(u);if(c)return c(t);throw"both async and sync fetching of the wasm failed"}(t)}(t);return await WebAssembly.instantiate(r,e)}catch(t){w(`failed to asynchronously prepare wasm: ${t}`),M(t)}}(e,r)}class T{name="ExitStatus";constructor(t){this.message=`Program terminated with exit(${t})`,this.status=t}}var z,H,A=t=>{for(;t.length>0;)t.shift()(r)},B=[],N=[],L=!0,U=t=>"0x"+(t>>>=0).toString(16).padStart(8,"0"),j="undefined"!=typeof TextDecoder?new TextDecoder:void 0,F=(t,e=0,r=NaN)=>{for(var i=e+r,n=e;t[n]&&!(n>=i);)++n;if(n-e>16&&t.buffer&&j)return j.decode(t.subarray(e,n));for(var o="";e<n;){var s=t[e++];if(128&s){var a=63&t[e++];if(192!=(224&s)){var c=63&t[e++];if((s=224==(240&s)?(15&s)<<12|a<<6|c:(7&s)<<18|a<<12|c<<6|63&t[e++])<65536)o+=String.fromCharCode(s);else{var p=s-65536;o+=String.fromCharCode(55296|p>>10,56320|1023&p)}}else o+=String.fromCharCode((31&s)<<6|a)}else o+=String.fromCharCode(s)}return o},O=(t,e)=>t?F(_,t,e):"",W=t=>t<-9007199254740992||t>9007199254740992?NaN:Number(t),V=0,q=[0,31,60,91,121,152,182,213,244,274,305,335],K=[0,31,59,90,120,151,181,212,243,273,304,334],$=t=>{var e;return((e=t.getFullYear())%4!=0||e%100==0&&e%400!=0?K:q)[t.getMonth()]+t.getDate()-1},Q={},Y=t=>{if(t instanceof T||"unwind"==t)return l;E(),t instanceof WebAssembly.RuntimeError&&Wi()<=0&&w("Stack overflow detected. You can try increasing -sSTACK_SIZE (currently set to 1048576)"),s(0,t)},Z=()=>L||V>0,X=t=>{l=t,Z()||(r.onExit?.(t),C=!0),s(0,new T(t))},J=(t,e)=>{l=t,X(t)},tt=J,et=()=>performance.now(),rt=(t,e,r,i)=>{if(!(i>0))return 0;for(var n=r,o=r+i-1,s=0;s<t.length;++s){var a=t.codePointAt(s);if(a<=127){if(r>=o)break;e[r++]=a}else if(a<=2047){if(r+1>=o)break;e[r++]=192|a>>6,e[r++]=128|63&a}else if(a<=65535){if(r+2>=o)break;e[r++]=224|a>>12,e[r++]=128|a>>6&63,e[r++]=128|63&a}else{if(r+3>=o)break;e[r++]=240|a>>18,e[r++]=128|a>>12&63,e[r++]=128|a>>6&63,e[r++]=128|63&a,s++}}return e[r]=0,r-n},it=(t,e,r)=>rt(t,_,e,r),nt=()=>Date.now(),ot=[],st=(t,e)=>Math.ceil(t/e)*e,at=t=>{var e=(t-m.buffer.byteLength+65535)/65536|0;try{return m.grow(e),G(),1}catch(t){}},ct={},pt=()=>{if(!pt.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.language||"C").replace("-","_")+".UTF-8",_:o||"./this.program"};for(var e in ct)void 0===ct[e]?delete t[e]:t[e]=ct[e];var r=[];for(var e in t)r.push(`${e}=${t[e]}`);pt.strings=r}return pt.strings},ut=t=>{for(var e=0,r=0;r<t.length;++r){var i=t.charCodeAt(r);i<=127?e++:i<=2047?e+=2:i>=55296&&i<=57343?(e+=4,++r):e+=3}return e},lt=[null,[],[]],ht=(t,e,r)=>{var i=r>0?r:ut(t)+1,n=new Array(i),o=rt(t,n,0,n.length);return e&&(n.length=o),n},dt=[],mt=(t,e)=>{t<128?e.push(t):e.push(t%128|128,t>>7)},yt=[],_t=[],ft=(t,e)=>{z.set(t,e),yt[t]=z.get(t)};r.noExitRuntime&&(L=r.noExitRuntime),r.print&&(S=r.print),r.printErr&&(w=r.printErr),r.wasmBinary&&(u=r.wasmBinary),r.arguments&&r.arguments,r.thisProgram&&(o=r.thisProgram),r.addFunction=(t,e)=>{var r=(t=>(H||(H=new WeakMap,((t,e)=>{if(H)for(var r=0;r<0+e;r++){var i=(o=void 0,(o=yt[n=r])||(yt[n]=o=z.get(n)),o);i&&H.set(i,r)}var n,o})(0,z.length)),H.get(t)||0))(t);if(r)return r;var i=(()=>{if(_t.length)return _t.pop();try{z.grow(1)}catch(t){if(!(t instanceof RangeError))throw t;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return z.length-1})();try{ft(i,t)}catch(r){if(!(r instanceof TypeError))throw r;var n=((t,e)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function((t=>{for(var e={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},r={parameters:[],results:"v"==t[0]?[]:[e[t[0]]]},i=1;i<t.length;++i)r.parameters.push(e[t[i]]);return r})(e),t);var r=[1];((t,e)=>{var r=t.slice(0,1),i=t.slice(1),n={i:127,p:127,j:126,f:125,d:124,e:111};for(var o of(e.push(96),mt(i.length,e),i))e.push(n[o]);"v"==r?e.push(0):e.push(1,n[r])})(e,r);var i=[0,97,115,109,1,0,0,0,1];mt(r.length,i),i.push(...r),i.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var n=new WebAssembly.Module(new Uint8Array(i));return new WebAssembly.Instance(n,{e:{f:t}}).exports.f})(t,e);ft(i,n)}return H.set(t,i),i},r.UTF8ToString=O;var vt,gt,bt,St,wt,Ct,It,Et,Dt,Gt,xt,Pt,kt,Mt,Rt,Tt,zt,Ht,At,Bt,Nt,Lt,Ut,jt,Ft,Ot,Wt,Vt,qt,Kt,$t,Qt,Yt,Zt,Xt,Jt,te,ee,re,ie,ne,oe,se,ae,ce,pe,ue,le,he,de,me,ye,_e,fe,ve,ge,be,Se,we,Ce,Ie,Ee,De,Ge,xe,Pe,ke,Me,Re,Te,ze,He,Ae,Be,Ne,Le,Ue,je,Fe,Oe,We,Ve,qe,Ke,$e,Qe,Ye,Ze,Xe,Je,tr,er,rr,ir,nr,or,sr,ar,cr,pr,ur,lr,hr,dr,mr,yr,_r,fr,vr,gr,br,Sr,wr,Cr,Ir,Er,Dr,Gr,xr,Pr,kr,Mr,Rr,Tr,zr,Hr,Ar,Br,Nr,Lr,Ur,jr,Fr,Or,Wr,Vr,qr,Kr,$r,Qr,Yr,Zr,Xr,Jr,ti,ei,ri,ii,ni,oi,si,ai,ci,pi,ui,li,hi,di,mi,yi,_i,fi,vi,gi,bi,Si,wi,Ci,Ii,Ei,Di,Gi,xi,Pi,ki,Mi,Ri,Ti,zi,Hi,Ai,Bi,Ni,Li,Ui,ji,Fi,Oi,Wi,Vi={428784:t=>{z.grow(65536);for(let e=0;e<=65535;e++)z.set(z.length-65535-1+e,z.get(v[(t>>>2)+e]));return z.length-65535-1}},qi={a:(t,e,r,i)=>M(`Assertion failed: ${O(t)}, at: `+[e?O(e):"unknown filename",r,i?O(i):"unknown function"]),s:function(t){const e=new Error(O(t));throw e.isAssert=!0,e},c:function(t,e){e=W(e)},h:()=>M(""),j:()=>{L=!1,V=0},p:function(t,e){t=W(t);var r=new Date(1e3*t);f[e>>2]=r.getSeconds(),f[e+4>>2]=r.getMinutes(),f[e+8>>2]=r.getHours(),f[e+12>>2]=r.getDate(),f[e+16>>2]=r.getMonth(),f[e+20>>2]=r.getFullYear()-1900,f[e+24>>2]=r.getDay();var i=0|$(r);f[e+28>>2]=i,f[e+36>>2]=-60*r.getTimezoneOffset();var n=new Date(r.getFullYear(),0,1),o=new Date(r.getFullYear(),6,1).getTimezoneOffset(),s=n.getTimezoneOffset(),a=0|(o!=s&&r.getTimezoneOffset()==Math.min(s,o));f[e+32>>2]=a},q:function(t){var e=(()=>{var e=new Date(f[t+20>>2]+1900,f[t+16>>2],f[t+12>>2],f[t+8>>2],f[t+4>>2],f[t>>2],0),r=f[t+32>>2],i=e.getTimezoneOffset(),n=new Date(e.getFullYear(),0,1),o=new Date(e.getFullYear(),6,1).getTimezoneOffset(),s=n.getTimezoneOffset(),a=Math.min(s,o);if(r<0)f[t+32>>2]=Number(o!=s&&a==i);else if(r>0!=(a==i)){var c=Math.max(s,o),p=r>0?a:c;e.setTime(e.getTime()+6e4*(p-i))}f[t+24>>2]=e.getDay();var u=0|$(e);f[t+28>>2]=u,f[t>>2]=e.getSeconds(),f[t+4>>2]=e.getMinutes(),f[t+8>>2]=e.getHours(),f[t+12>>2]=e.getDate(),f[t+16>>2]=e.getMonth(),f[t+20>>2]=e.getYear();var l=e.getTime();return isNaN(l)?-1:l/1e3})();return BigInt(e)},k:(t,e)=>{if(Q[t]&&(clearTimeout(Q[t].id),delete Q[t]),!e)return 0;var r=setTimeout((()=>{delete Q[t],(t=>{if(!C)try{t(),(()=>{if(!Z())try{tt(l)}catch(t){Y(t)}})()}catch(t){Y(t)}})((()=>Fi(t,et())))}),e);return Q[t]={id:r,timeout_ms:e},0},r:(t,e,r,i)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1),s=new Date(n,6,1),a=o.getTimezoneOffset(),c=s.getTimezoneOffset(),p=Math.max(a,c);v[t>>2]=60*p,f[e>>2]=Number(a!=c);var u=t=>{var e=t>=0?"-":"+",r=Math.abs(t);return`UTC${e}${String(Math.floor(r/60)).padStart(2,"0")}${String(r%60).padStart(2,"0")}`},l=u(a),h=u(c);c<a?(it(l,r,17),it(h,i,17)):(it(l,i,17),it(h,r,17))},n:function(t,e,r){if(e=W(e),!((i=t)>=0&&i<=3))return 28;var i,n;n=0===t?nt():et();var o=Math.round(1e3*n*1e3);return b[r>>3]=BigInt(o),0},t:(t,e,r)=>((t,e,r)=>{var i=((t,e)=>{var r;for(ot.length=0;r=_[t++];){var i=105!=r;e+=(i&=112!=r)&&e%8?4:0,ot.push(112==r?v[e>>2]:106==r?b[e>>3]:105==r?f[e>>2]:g[e>>3]),e+=i?8:4}return ot})(e,r);return Vi[t](...i)})(t,e,r),g:nt,o:t=>{var e=_.length,r=2147483648;if((t>>>=0)>r)return!1;for(var i=1;i<=4;i*=2){var n=e*(1+.2/i);n=Math.min(n,t+100663296);var o=Math.min(r,st(Math.max(t,n),65536));if(at(o))return!0}return!1},l:(t,e)=>{var r=0,i=0;for(var n of pt()){var o=e+r;v[t+i>>2]=o,r+=it(n,o,1/0)+1,i+=4}return 0},m:(t,e)=>{var r=pt();v[t>>2]=r.length;var i=0;for(var n of r)i+=ut(n)+1;return v[e>>2]=i,0},d:t=>52,f:(t,e,r,i)=>52,b:function(t,e,r,i){return e=W(e),70},e:(t,e,r,i)=>{for(var n,o,s,a=0,c=0;c<r;c++){var p=v[e>>2],u=v[e+4>>2];e+=8;for(var l=0;l<u;l++)n=t,o=_[p+l],s=void 0,s=lt[n],0===o||10===o?((1===n?S:w)(F(s)),s.length=0):s.push(o);a+=u}return v[i>>2]=a,0},i:X},Ki=await async function(){function t(t,e){return Ki=t.exports,m=Ki.u,G(),z=Ki.Xc,function(t){r._malloc=t.w,r._free=t.x,r._main=vt=t.y,r._webidl_free=t.z,r._webidl_malloc=t.A,r._emscripten_bind_VoidPtr___destroy___0=gt=t.B,r._emscripten_bind_Cloudpilot_Cloudpilot_0=bt=t.C,r._emscripten_bind_Cloudpilot_Malloc_1=St=t.D,r._emscripten_bind_Cloudpilot_Free_1=wt=t.E,r._emscripten_bind_Cloudpilot_Nullptr_0=Ct=t.F,r._emscripten_bind_Cloudpilot_EnableLogging_1=It=t.G,r._emscripten_bind_Cloudpilot_InitializeSession_3=Et=t.H,r._emscripten_bind_Cloudpilot_GetCyclesPerSecond_0=Dt=t.I,r._emscripten_bind_Cloudpilot_RunEmulation_1=Gt=t.J,r._emscripten_bind_Cloudpilot_SetClockFactor_1=xt=t.K,r._emscripten_bind_Cloudpilot_CopyFrame_0=Pt=t.L,r._emscripten_bind_Cloudpilot_IsScreenDirty_0=kt=t.M,r._emscripten_bind_Cloudpilot_MarkScreenClean_0=Mt=t.N,r._emscripten_bind_Cloudpilot_MinMemoryForDevice_1=Rt=t.O,r._emscripten_bind_Cloudpilot_FramebufferSizeForDevice_1=Tt=t.P,r._emscripten_bind_Cloudpilot_TotalMemoryForDevice_1=zt=t.Q,r._emscripten_bind_Cloudpilot_QueuePenMove_2=Ht=t.R,r._emscripten_bind_Cloudpilot_QueuePenUp_0=At=t.S,r._emscripten_bind_Cloudpilot_QueueButtonDown_1=Bt=t.T,r._emscripten_bind_Cloudpilot_QueueButtonUp_1=Nt=t.U,r._emscripten_bind_Cloudpilot_QueueKeyboardEvent_2=Lt=t.V,r._emscripten_bind_Cloudpilot_IsPowerOff_0=Ut=t.W,r._emscripten_bind_Cloudpilot_IsUIInitialized_0=jt=t.X,r._emscripten_bind_Cloudpilot_GetOSVersion_0=Ft=t.Y,r._emscripten_bind_Cloudpilot_IsSetupComplete_0=Ot=t.Z,r._emscripten_bind_Cloudpilot_Reset_0=Wt=t._,r._emscripten_bind_Cloudpilot_ResetNoExtensions_0=Vt=t.$,r._emscripten_bind_Cloudpilot_ResetHard_0=qt=t.aa,r._emscripten_bind_Cloudpilot_InstallDb_2=Kt=t.ba,r._emscripten_bind_Cloudpilot_GetPalette2bitMapping_0=$t=t.ca,r._emscripten_bind_Cloudpilot_GetMemoryPtr_0=Qt=t.da,r._emscripten_bind_Cloudpilot_GetDirtyPagesPtr_0=Yt=t.ea,r._emscripten_bind_Cloudpilot_GetMemorySize_0=Zt=t.fa,r._emscripten_bind_Cloudpilot_ImportMemoryImage_2=Xt=t.ga,r._emscripten_bind_Cloudpilot_GetRomPtr_0=Jt=t.ha,r._emscripten_bind_Cloudpilot_GetRomSize_0=te=t.ia,r._emscripten_bind_Cloudpilot_GetSavestatePtr_0=ee=t.ja,r._emscripten_bind_Cloudpilot_GetSavestateSize_0=re=t.ka,r._emscripten_bind_Cloudpilot_SaveState_0=ie=t.la,r._emscripten_bind_Cloudpilot_LoadState_2=ne=t.ma,r._emscripten_bind_Cloudpilot_GetHotsyncName_0=oe=t.na,r._emscripten_bind_Cloudpilot_SetHotsyncName_1=se=t.oa,r._emscripten_bind_Cloudpilot_RegisterPwmHandler_1=ae=t.pa,r._emscripten_bind_Cloudpilot_StartBackup_0=ce=t.qa,r._emscripten_bind_Cloudpilot_SetClipboardIntegration_1=pe=t.ra,r._emscripten_bind_Cloudpilot_GetClipboardIntegration_0=ue=t.sa,r._emscripten_bind_Cloudpilot_IsSuspended_0=le=t.ta,r._emscripten_bind_Cloudpilot_GetSuspendContext_0=he=t.ua,r._emscripten_bind_Cloudpilot_SetNetworkRedirection_1=de=t.va,r._emscripten_bind_Cloudpilot_GetNetworkRedirection_0=me=t.wa,r._emscripten_bind_Cloudpilot_RegisterProxyDisconnectHandler_1=ye=t.xa,r._emscripten_bind_Cloudpilot_SetHotsyncNameManagement_1=_e=t.ya,r._emscripten_bind_Cloudpilot_LaunchAppByName_1=fe=t.za,r._emscripten_bind_Cloudpilot_LaunchAppByDbHeader_2=ve=t.Aa,r._emscripten_bind_Cloudpilot_DeviceSupportsCardSize_1=ge=t.Ba,r._emscripten_bind_Cloudpilot_ClearExternalStorage_0=be=t.Ca,r._emscripten_bind_Cloudpilot_AllocateCard_2=Se=t.Da,r._emscripten_bind_Cloudpilot_AdoptCard_3=we=t.Ea,r._emscripten_bind_Cloudpilot_MountCard_1=Ce=t.Fa,r._emscripten_bind_Cloudpilot_RemoveCard_1=Ie=t.Ga,r._emscripten_bind_Cloudpilot_GetCardData_1=Ee=t.Ha,r._emscripten_bind_Cloudpilot_GetCardDirtyPages_1=De=t.Ia,r._emscripten_bind_Cloudpilot_GetCardSize_1=Ge=t.Ja,r._emscripten_bind_Cloudpilot_RemountCards_0=xe=t.Ka,r._emscripten_bind_Cloudpilot_GetSupportLevel_1=Pe=t.La,r._emscripten_bind_Cloudpilot_GetMountedKey_0=ke=t.Ma,r._emscripten_bind_Cloudpilot_GetTransportIR_0=Me=t.Na,r._emscripten_bind_Cloudpilot_GetTransportSerial_0=Re=t.Oa,r._emscripten_bind_Cloudpilot___destroy___0=Te=t.Pa,r._emscripten_bind_RomInfo_RomInfo_2=ze=t.Qa,r._emscripten_bind_RomInfo_IsValid_0=He=t.Ra,r._emscripten_bind_RomInfo_CardVersion_0=Ae=t.Sa,r._emscripten_bind_RomInfo_CardName_0=Be=t.Ta,r._emscripten_bind_RomInfo_RomVersion_0=Ne=t.Ua,r._emscripten_bind_RomInfo_RomVersionString_0=Le=t.Va,r._emscripten_bind_RomInfo_Supports_1=Ue=t.Wa,r._emscripten_bind_RomInfo___destroy___0=je=t.Xa,r._emscripten_bind_Frame_GetLineWidth_0=Fe=t.Ya,r._emscripten_bind_Frame_GetBpp_0=Oe=t.Za,r._emscripten_bind_Frame_GetLines_0=We=t._a,r._emscripten_bind_Frame_GetMargin_0=Ve=t.$a,r._emscripten_bind_Frame_GetBytesPerLine_0=qe=t.ab,r._emscripten_bind_Frame_GetFirstDirtyLine_0=Ke=t.bb,r._emscripten_bind_Frame_GetLastDirtyLine_0=$e=t.cb,r._emscripten_bind_Frame_GetHasChanges_0=Qe=t.db,r._emscripten_bind_Frame_GetBuffer_0=Ye=t.eb,r._emscripten_bind_Frame_GetBufferSize_0=Ze=t.fb,r._emscripten_bind_Frame_GetScaleX_0=Xe=t.gb,r._emscripten_bind_Frame_GetScaleY_0=Je=t.hb,r._emscripten_bind_Frame___destroy___0=tr=t.ib,r._emscripten_bind_DbBackup_Init_1=er=t.jb,r._emscripten_bind_DbBackup_IsInProgress_0=rr=t.kb,r._emscripten_bind_DbBackup_IsDone_0=ir=t.lb,r._emscripten_bind_DbBackup_GetCurrentDatabase_0=nr=t.mb,r._emscripten_bind_DbBackup_Save_0=or=t.nb,r._emscripten_bind_DbBackup_Skip_0=sr=t.ob,r._emscripten_bind_DbBackup_GetArchivePtr_0=ar=t.pb,r._emscripten_bind_DbBackup_GetArchiveSize_0=cr=t.qb,r._emscripten_bind_DbBackup___destroy___0=pr=t.rb,r._emscripten_bind_SuspendContextClipboardCopy_Cancel_0=ur=t.sb,r._emscripten_bind_SuspendContextClipboardCopy_Resume_0=lr=t.tb,r._emscripten_bind_SuspendContextClipboardCopy_GetClipboardContent_0=hr=t.ub,r._emscripten_bind_SuspendContextClipboardCopy___destroy___0=dr=t.vb,r._emscripten_bind_SuspendContextClipboardPaste_Cancel_0=mr=t.wb,r._emscripten_bind_SuspendContextClipboardPaste_Resume_1=yr=t.xb,r._emscripten_bind_SuspendContextClipboardPaste___destroy___0=_r=t.yb,r._emscripten_bind_SuspendContextNetworkConnect_Cancel_0=fr=t.zb,r._emscripten_bind_SuspendContextNetworkConnect_Resume_0=vr=t.Ab,r._emscripten_bind_SuspendContextNetworkConnect___destroy___0=gr=t.Bb,r._emscripten_bind_SuspendContextNetworkRpc_Cancel_0=br=t.Cb,r._emscripten_bind_SuspendContextNetworkRpc_GetRequestSize_0=Sr=t.Db,r._emscripten_bind_SuspendContextNetworkRpc_GetRequestData_0=wr=t.Eb,r._emscripten_bind_SuspendContextNetworkRpc_ReceiveResponse_2=Cr=t.Fb,r._emscripten_bind_SuspendContextNetworkRpc___destroy___0=Ir=t.Gb,r._emscripten_bind_SuspendContextSerialSync_Cancel_0=Er=t.Hb,r._emscripten_bind_SuspendContextSerialSync_Resume_0=Dr=t.Ib,r._emscripten_bind_SuspendContextSerialSync___destroy___0=Gr=t.Jb,r._emscripten_bind_SuspendContext_GetKind_0=xr=t.Kb,r._emscripten_bind_SuspendContext_Cancel_0=Pr=t.Lb,r._emscripten_bind_SuspendContext_AsContextClipboardCopy_0=kr=t.Mb,r._emscripten_bind_SuspendContext_AsContextClipboardPaste_0=Mr=t.Nb,r._emscripten_bind_SuspendContext_AsContextNetworkConnect_0=Rr=t.Ob,r._emscripten_bind_SuspendContext_AsContextNetworkRpc_0=Tr=t.Pb,r._emscripten_bind_SuspendContext_AsContextSerialSync_0=zr=t.Qb,r._emscripten_bind_SuspendContext___destroy___0=Hr=t.Rb,r._emscripten_bind_SessionImage_SessionImage_0=Ar=t.Sb,r._emscripten_bind_SessionImage_GetDeviceId_0=Br=t.Tb,r._emscripten_bind_SessionImage_SetDeviceId_1=Nr=t.Ub,r._emscripten_bind_SessionImage_GetRomImage_0=Lr=t.Vb,r._emscripten_bind_SessionImage_GetRomImageSize_0=Ur=t.Wb,r._emscripten_bind_SessionImage_SetRomImage_2=jr=t.Xb,r._emscripten_bind_SessionImage_GetMemoryImage_0=Fr=t.Yb,r._emscripten_bind_SessionImage_GetMemoryImageSize_0=Or=t.Zb,r._emscripten_bind_SessionImage_SetMemoryImage_2=Wr=t._b,r._emscripten_bind_SessionImage_GetMetadata_0=Vr=t.$b,r._emscripten_bind_SessionImage_GetMetadataSize_0=qr=t.ac,r._emscripten_bind_SessionImage_SetMetadata_2=Kr=t.bc,r._emscripten_bind_SessionImage_GetSavestate_0=$r=t.cc,r._emscripten_bind_SessionImage_GetSavestateSize_0=Qr=t.dc,r._emscripten_bind_SessionImage_SetSavestate_2=Yr=t.ec,r._emscripten_bind_SessionImage_GetVersion_0=Zr=t.fc,r._emscripten_bind_SessionImage_Serialize_0=Xr=t.gc,r._emscripten_bind_SessionImage_GetSerializedImage_0=Jr=t.hc,r._emscripten_bind_SessionImage_GetSerializedImageSize_0=ti=t.ic,r._emscripten_bind_SessionImage_Deserialize_2=ei=t.jc,r._emscripten_bind_SessionImage___destroy___0=ri=t.kc,r._emscripten_bind_SkinLoader_SkinLoader_1=ii=t.lc,r._emscripten_bind_SkinLoader_GetData_0=ni=t.mc,r._emscripten_bind_SkinLoader_GetSize_0=oi=t.nc,r._emscripten_bind_SkinLoader___destroy___0=si=t.oc,r._emscripten_bind_EmTransportSerialBuffer_RxBytesPending_0=ai=t.pc,r._emscripten_bind_EmTransportSerialBuffer_Receive_0=ci=t.qc,r._emscripten_bind_EmTransportSerialBuffer_Send_3=pi=t.rc,r._emscripten_bind_EmTransportSerialBuffer_IsOpen_0=ui=t.sc,r._emscripten_bind_EmTransportSerialBuffer_Rts_0=li=t.tc,r._emscripten_bind_EmTransportSerialBuffer_Dtr_0=hi=t.uc,r._emscripten_bind_EmTransportSerialBuffer_IsBreak_0=di=t.vc,r._emscripten_bind_EmTransportSerialBuffer_BufferSize_0=mi=t.wc,r._emscripten_bind_EmTransportSerialBuffer_GetBaud_0=yi=t.xc,r._emscripten_bind_EmTransportSerialBuffer_GetParity_0=_i=t.yc,r._emscripten_bind_EmTransportSerialBuffer_GetStopBits_0=fi=t.zc,r._emscripten_bind_EmTransportSerialBuffer_GetDataBits_0=vi=t.Ac,r._emscripten_bind_EmTransportSerialBuffer_GetHwrHandshake_0=gi=t.Bc,r._emscripten_bind_EmTransportSerialBuffer_GetModeSync_0=bi=t.Cc,r._emscripten_bind_EmTransportSerialBuffer_SetModeSync_1=Si=t.Dc,r._emscripten_bind_EmTransportSerialBuffer_IsFrameComplete_0=wi=t.Ec,r._emscripten_bind_EmTransportSerialBuffer_SetRequestTransferCallback_1=Ci=t.Fc,r._emscripten_bind_EmTransportSerialBuffer___destroy___0=Ii=t.Gc,r._emscripten_bind_GunzipContext_GunzipContext_3=Ei=t.Hc,r._emscripten_bind_GunzipContext_GetState_0=Di=t.Ic,r._emscripten_bind_GunzipContext_Continue_0=Gi=t.Jc,r._emscripten_bind_GunzipContext_GetUncompressedData_0=xi=t.Kc,r._emscripten_bind_GunzipContext_ReleaseUncompressedData_0=Pi=t.Lc,r._emscripten_bind_GunzipContext_GetUncompressedSize_0=ki=t.Mc,r._emscripten_bind_GunzipContext_GetError_0=Mi=t.Nc,r._emscripten_bind_GunzipContext___destroy___0=Ri=t.Oc,r._emscripten_bind_ZipfileWalker_ZipfileWalker_2=Ti=t.Pc,r._emscripten_bind_ZipfileWalker_GetState_0=zi=t.Qc,r._emscripten_bind_ZipfileWalker_Next_0=Hi=t.Rc,r._emscripten_bind_ZipfileWalker_GetTotalEntries_0=Ai=t.Sc,r._emscripten_bind_ZipfileWalker_GetCurrentEntrySize_0=Bi=t.Tc,r._emscripten_bind_ZipfileWalker_GetCurrentEntryName_0=Ni=t.Uc,r._emscripten_bind_ZipfileWalker_GetCurrentEntryContent_0=Li=t.Vc,r._emscripten_bind_ZipfileWalker___destroy___0=Ui=t.Wc,ji=t.Yc,Fi=t.Zc,Oi=t._c,Wi=t.$c,r.___original_main=t.ad}(Ki),function(t){if(P--,r.monitorRunDependencies?.(P),0==P&&k){var e=k;k=null,e()}}(),Ki}P++,r.monitorRunDependencies?.(P);var e,i={a:qi};return r.instantiateWasm?new Promise(((e,n)=>{r.instantiateWasm(i,((r,i)=>{e(t(r))}))})):(x??=(e="cloudpilot_web.wasm",r.locateFile?r.locateFile(e,p):p+e),t((await R(u,x,i)).instance))}();function $i(){}function Qi(t){return(t||$i).__cache__}function Yi(t,e){var r=Qi(e),i=r[t];return i||((i=Object.create((e||$i).prototype)).ptr=t,r[t]=i)}!function(){if(r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.shift()()}(),function t(){function e(){r.calledRun=!0,C||(D=!0,E(),A(dt),Ki.v(),E(),h?.(r),r.onRuntimeInitialized?.(),r.noInitialRun||function(){var t=vt;try{var e=t(0,0);return J(e),e}catch(t){return Y(t)}}(),function(){if(E(),r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)t=r.postRun.shift(),B.push(t);var t;A(B)}())}var i;P>0?k=t:(Oi(),0==(i=ji())&&(i+=4),v[i>>2]=34821223,v[i+4>>2]=2310721022,v[0]=1668509029,function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)t=r.preRun.shift(),N.push(t);var t;A(N)}(),P>0?k=t:(r.setStatus?(r.setStatus("Running..."),setTimeout((()=>{setTimeout((()=>r.setStatus("")),1),e()}),1)):e(),E()))}(),$i.prototype=Object.create($i.prototype),$i.prototype.constructor=$i,$i.prototype.__class__=$i,$i.__cache__={},r.WrapperObject=$i,r.getCache=Qi,r.wrapPointer=Yi,r.castObject=function(t,e){return Yi(t.ptr,e)},r.NULL=Yi(0),r.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete Qi(t.__class__)[t.ptr]},r.compare=function(t,e){return t.ptr===e.ptr},r.getPointer=function(t){return t.ptr},r.getClass=function(t){return t.__class__};var Zi={buffer:0,size:0,pos:0,temps:[],needed:0,prepare(){if(Zi.needed){for(var t=0;t<Zi.temps.length;t++)r._webidl_free(Zi.temps[t]);Zi.temps.length=0,r._webidl_free(Zi.buffer),Zi.buffer=0,Zi.size+=Zi.needed,Zi.needed=0}Zi.buffer||(Zi.size+=128,Zi.buffer=r._webidl_malloc(Zi.size),I(Zi.buffer)),Zi.pos=0},alloc(t,e){I(Zi.buffer);var i,n=e.BYTES_PER_ELEMENT,o=t.length*n;return o=st(o,8),Zi.pos+o>=Zi.size?(I(o>0),Zi.needed+=o,i=r._webidl_malloc(o),Zi.temps.push(i)):(i=Zi.buffer+Zi.pos,Zi.pos+=o),i},copy(t,e,r){r/=e.BYTES_PER_ELEMENT;for(var i=0;i<t.length;i++)e[r+i]=t[i]}};function Xi(t){if("string"==typeof t){var e=ht(t),r=Zi.alloc(e,y);return Zi.copy(e,y,r),r}return t}function Ji(){throw"cannot construct a VoidPtr, no constructor in IDL"}function tn(){this.ptr=bt(),Qi(tn)[this.ptr]=this}function en(t,e){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),this.ptr=ze(t,e),Qi(en)[this.ptr]=this}function rn(){throw"cannot construct a Frame, no constructor in IDL"}function nn(){throw"cannot construct a DbBackup, no constructor in IDL"}function on(){throw"cannot construct a SuspendContextClipboardCopy, no constructor in IDL"}function sn(){throw"cannot construct a SuspendContextClipboardPaste, no constructor in IDL"}function an(){throw"cannot construct a SuspendContextNetworkConnect, no constructor in IDL"}function cn(){throw"cannot construct a SuspendContextNetworkRpc, no constructor in IDL"}function pn(){throw"cannot construct a SuspendContextSerialSync, no constructor in IDL"}function un(){throw"cannot construct a SuspendContext, no constructor in IDL"}function ln(){this.ptr=Ar(),Qi(ln)[this.ptr]=this}function hn(t){Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),this.ptr=ii(t),Qi(hn)[this.ptr]=this}function dn(){throw"cannot construct a EmTransportSerialBuffer, no constructor in IDL"}function mn(t,e,r){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),r&&"object"==typeof r&&(r=r.ptr),this.ptr=Ei(t,e,r),Qi(mn)[this.ptr]=this}function yn(t,e){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),this.ptr=Ti(t,e),Qi(yn)[this.ptr]=this}return Ji.prototype=Object.create($i.prototype),Ji.prototype.constructor=Ji,Ji.prototype.__class__=Ji,Ji.__cache__={},r.VoidPtr=Ji,Ji.prototype.__destroy__=Ji.prototype.__destroy__=function(){var t=this.ptr;gt(t)},tn.prototype=Object.create($i.prototype),tn.prototype.constructor=tn,tn.prototype.__class__=tn,tn.__cache__={},r.Cloudpilot=tn,tn.prototype.Malloc=tn.prototype.Malloc=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Yi(St(e,t),Ji)},tn.prototype.Free=tn.prototype.Free=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),wt(e,t)},tn.prototype.Nullptr=tn.prototype.Nullptr=function(){var t=this.ptr;return Yi(Ct(t),Ji)},tn.prototype.EnableLogging=tn.prototype.EnableLogging=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),It(e,t)},tn.prototype.InitializeSession=tn.prototype.InitializeSession=function(t,e,r){var i=this.ptr;return Zi.prepare(),t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),r=r&&"object"==typeof r?r.ptr:Xi(r),!!Et(i,t,e,r)},tn.prototype.GetCyclesPerSecond=tn.prototype.GetCyclesPerSecond=function(){var t=this.ptr;return Dt(t)},tn.prototype.RunEmulation=tn.prototype.RunEmulation=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Gt(e,t)},tn.prototype.SetClockFactor=tn.prototype.SetClockFactor=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),xt(e,t)},tn.prototype.CopyFrame=tn.prototype.CopyFrame=function(){var t=this.ptr;return Yi(Pt(t),rn)},tn.prototype.IsScreenDirty=tn.prototype.IsScreenDirty=function(){var t=this.ptr;return!!kt(t)},tn.prototype.MarkScreenClean=tn.prototype.MarkScreenClean=function(){var t=this.ptr;Mt(t)},tn.prototype.MinMemoryForDevice=tn.prototype.MinMemoryForDevice=function(t){var e=this.ptr;return Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),Rt(e,t)},tn.prototype.FramebufferSizeForDevice=tn.prototype.FramebufferSizeForDevice=function(t){var e=this.ptr;return Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),Tt(e,t)},tn.prototype.TotalMemoryForDevice=tn.prototype.TotalMemoryForDevice=function(t){var e=this.ptr;return Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),zt(e,t)},tn.prototype.QueuePenMove=tn.prototype.QueuePenMove=function(t,e){var r=this.ptr;t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Ht(r,t,e)},tn.prototype.QueuePenUp=tn.prototype.QueuePenUp=function(){var t=this.ptr;At(t)},tn.prototype.QueueButtonDown=tn.prototype.QueueButtonDown=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Bt(e,t)},tn.prototype.QueueButtonUp=tn.prototype.QueueButtonUp=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Nt(e,t)},tn.prototype.QueueKeyboardEvent=tn.prototype.QueueKeyboardEvent=function(t,e){var r=this.ptr;t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Lt(r,t,e)},tn.prototype.IsPowerOff=tn.prototype.IsPowerOff=function(){var t=this.ptr;return!!Ut(t)},tn.prototype.IsUIInitialized=tn.prototype.IsUIInitialized=function(){var t=this.ptr;return!!jt(t)},tn.prototype.GetOSVersion=tn.prototype.GetOSVersion=function(){var t=this.ptr;return Ft(t)},tn.prototype.IsSetupComplete=tn.prototype.IsSetupComplete=function(){var t=this.ptr;return!!Ot(t)},tn.prototype.Reset=tn.prototype.Reset=function(){var t=this.ptr;Wt(t)},tn.prototype.ResetNoExtensions=tn.prototype.ResetNoExtensions=function(){var t=this.ptr;Vt(t)},tn.prototype.ResetHard=tn.prototype.ResetHard=function(){var t=this.ptr;qt(t)},tn.prototype.InstallDb=tn.prototype.InstallDb=function(t,e){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Kt(r,t,e)},tn.prototype.GetPalette2bitMapping=tn.prototype.GetPalette2bitMapping=function(){var t=this.ptr;return $t(t)},tn.prototype.GetMemoryPtr=tn.prototype.GetMemoryPtr=function(){var t=this.ptr;return Yi(Qt(t),Ji)},tn.prototype.GetDirtyPagesPtr=tn.prototype.GetDirtyPagesPtr=function(){var t=this.ptr;return Yi(Yt(t),Ji)},tn.prototype.GetMemorySize=tn.prototype.GetMemorySize=function(){var t=this.ptr;return Zt(t)},tn.prototype.ImportMemoryImage=tn.prototype.ImportMemoryImage=function(t,e){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),!!Xt(r,t,e)},tn.prototype.GetRomPtr=tn.prototype.GetRomPtr=function(){var t=this.ptr;return Yi(Jt(t),Ji)},tn.prototype.GetRomSize=tn.prototype.GetRomSize=function(){var t=this.ptr;return te(t)},tn.prototype.GetSavestatePtr=tn.prototype.GetSavestatePtr=function(){var t=this.ptr;return Yi(ee(t),Ji)},tn.prototype.GetSavestateSize=tn.prototype.GetSavestateSize=function(){var t=this.ptr;return re(t)},tn.prototype.SaveState=tn.prototype.SaveState=function(){var t=this.ptr;return!!ie(t)},tn.prototype.LoadState=tn.prototype.LoadState=function(t,e){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),!!ne(r,t,e)},tn.prototype.GetHotsyncName=tn.prototype.GetHotsyncName=function(){var t=this.ptr;return O(oe(t))},tn.prototype.SetHotsyncName=tn.prototype.SetHotsyncName=function(t){var e=this.ptr;Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),se(e,t)},tn.prototype.RegisterPwmHandler=tn.prototype.RegisterPwmHandler=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),ae(e,t)},tn.prototype.StartBackup=tn.prototype.StartBackup=function(){var t=this.ptr;return Yi(ce(t),nn)},tn.prototype.SetClipboardIntegration=tn.prototype.SetClipboardIntegration=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),pe(e,t)},tn.prototype.GetClipboardIntegration=tn.prototype.GetClipboardIntegration=function(){var t=this.ptr;return!!ue(t)},tn.prototype.IsSuspended=tn.prototype.IsSuspended=function(){var t=this.ptr;return!!le(t)},tn.prototype.GetSuspendContext=tn.prototype.GetSuspendContext=function(){var t=this.ptr;return Yi(he(t),un)},tn.prototype.SetNetworkRedirection=tn.prototype.SetNetworkRedirection=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),de(e,t)},tn.prototype.GetNetworkRedirection=tn.prototype.GetNetworkRedirection=function(){var t=this.ptr;return!!me(t)},tn.prototype.RegisterProxyDisconnectHandler=tn.prototype.RegisterProxyDisconnectHandler=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),ye(e,t)},tn.prototype.SetHotsyncNameManagement=tn.prototype.SetHotsyncNameManagement=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),_e(e,t)},tn.prototype.LaunchAppByName=tn.prototype.LaunchAppByName=function(t){var e=this.ptr;return Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),!!fe(e,t)},tn.prototype.LaunchAppByDbHeader=tn.prototype.LaunchAppByDbHeader=function(t,e){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),!!ve(r,t,e)},tn.prototype.DeviceSupportsCardSize=tn.prototype.DeviceSupportsCardSize=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!ge(e,t)},tn.prototype.ClearExternalStorage=tn.prototype.ClearExternalStorage=function(){var t=this.ptr;be(t)},tn.prototype.AllocateCard=tn.prototype.AllocateCard=function(t,e){var r=this.ptr;return Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),e&&"object"==typeof e&&(e=e.ptr),!!Se(r,t,e)},tn.prototype.AdoptCard=tn.prototype.AdoptCard=function(t,e,r){var i=this.ptr;return Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),e&&"object"==typeof e&&(e=e.ptr),r&&"object"==typeof r&&(r=r.ptr),!!we(i,t,e,r)},tn.prototype.MountCard=tn.prototype.MountCard=function(t){var e=this.ptr;return Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),!!Ce(e,t)},tn.prototype.RemoveCard=tn.prototype.RemoveCard=function(t){var e=this.ptr;return Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),!!Ie(e,t)},tn.prototype.GetCardData=tn.prototype.GetCardData=function(t){var e=this.ptr;return Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),Yi(Ee(e,t),Ji)},tn.prototype.GetCardDirtyPages=tn.prototype.GetCardDirtyPages=function(t){var e=this.ptr;return Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),Yi(De(e,t),Ji)},tn.prototype.GetCardSize=tn.prototype.GetCardSize=function(t){var e=this.ptr;return Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),Ge(e,t)},tn.prototype.RemountCards=tn.prototype.RemountCards=function(){var t=this.ptr;xe(t)},tn.prototype.GetSupportLevel=tn.prototype.GetSupportLevel=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Pe(e,t)},tn.prototype.GetMountedKey=tn.prototype.GetMountedKey=function(){var t=this.ptr;return O(ke(t))},tn.prototype.GetTransportIR=tn.prototype.GetTransportIR=function(){var t=this.ptr;return Yi(Me(t),dn)},tn.prototype.GetTransportSerial=tn.prototype.GetTransportSerial=function(){var t=this.ptr;return Yi(Re(t),dn)},tn.prototype.__destroy__=tn.prototype.__destroy__=function(){var t=this.ptr;Te(t)},en.prototype=Object.create($i.prototype),en.prototype.constructor=en,en.prototype.__class__=en,en.__cache__={},r.RomInfo=en,en.prototype.IsValid=en.prototype.IsValid=function(){var t=this.ptr;return!!He(t)},en.prototype.CardVersion=en.prototype.CardVersion=function(){var t=this.ptr;return Ae(t)},en.prototype.CardName=en.prototype.CardName=function(){var t=this.ptr;return O(Be(t))},en.prototype.RomVersion=en.prototype.RomVersion=function(){var t=this.ptr;return Ne(t)},en.prototype.RomVersionString=en.prototype.RomVersionString=function(){var t=this.ptr;return O(Le(t))},en.prototype.Supports=en.prototype.Supports=function(t){var e=this.ptr;return Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),!!Ue(e,t)},en.prototype.__destroy__=en.prototype.__destroy__=function(){var t=this.ptr;je(t)},rn.prototype=Object.create($i.prototype),rn.prototype.constructor=rn,rn.prototype.__class__=rn,rn.__cache__={},r.Frame=rn,rn.prototype.GetLineWidth=rn.prototype.GetLineWidth=function(){var t=this.ptr;return Fe(t)},rn.prototype.GetBpp=rn.prototype.GetBpp=function(){var t=this.ptr;return Oe(t)},rn.prototype.GetLines=rn.prototype.GetLines=function(){var t=this.ptr;return We(t)},rn.prototype.GetMargin=rn.prototype.GetMargin=function(){var t=this.ptr;return Ve(t)},rn.prototype.GetBytesPerLine=rn.prototype.GetBytesPerLine=function(){var t=this.ptr;return qe(t)},rn.prototype.GetFirstDirtyLine=rn.prototype.GetFirstDirtyLine=function(){var t=this.ptr;return Ke(t)},rn.prototype.GetLastDirtyLine=rn.prototype.GetLastDirtyLine=function(){var t=this.ptr;return $e(t)},rn.prototype.GetHasChanges=rn.prototype.GetHasChanges=function(){var t=this.ptr;return!!Qe(t)},rn.prototype.GetBuffer=rn.prototype.GetBuffer=function(){var t=this.ptr;return Yi(Ye(t),Ji)},rn.prototype.GetBufferSize=rn.prototype.GetBufferSize=function(){var t=this.ptr;return Ze(t)},rn.prototype.GetScaleX=rn.prototype.GetScaleX=function(){var t=this.ptr;return Xe(t)},rn.prototype.GetScaleY=rn.prototype.GetScaleY=function(){var t=this.ptr;return Je(t)},rn.prototype.__destroy__=rn.prototype.__destroy__=function(){var t=this.ptr;tr(t)},nn.prototype=Object.create($i.prototype),nn.prototype.constructor=nn,nn.prototype.__class__=nn,nn.__cache__={},r.DbBackup=nn,nn.prototype.Init=nn.prototype.Init=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!er(e,t)},nn.prototype.IsInProgress=nn.prototype.IsInProgress=function(){var t=this.ptr;return!!rr(t)},nn.prototype.IsDone=nn.prototype.IsDone=function(){var t=this.ptr;return!!ir(t)},nn.prototype.GetCurrentDatabase=nn.prototype.GetCurrentDatabase=function(){var t=this.ptr;return O(nr(t))},nn.prototype.Save=nn.prototype.Save=function(){var t=this.ptr;return!!or(t)},nn.prototype.Skip=nn.prototype.Skip=function(){var t=this.ptr;sr(t)},nn.prototype.GetArchivePtr=nn.prototype.GetArchivePtr=function(){var t=this.ptr;return Yi(ar(t),Ji)},nn.prototype.GetArchiveSize=nn.prototype.GetArchiveSize=function(){var t=this.ptr;return cr(t)},nn.prototype.__destroy__=nn.prototype.__destroy__=function(){var t=this.ptr;pr(t)},on.prototype=Object.create($i.prototype),on.prototype.constructor=on,on.prototype.__class__=on,on.__cache__={},r.SuspendContextClipboardCopy=on,on.prototype.Cancel=on.prototype.Cancel=function(){var t=this.ptr;ur(t)},on.prototype.Resume=on.prototype.Resume=function(){var t=this.ptr;lr(t)},on.prototype.GetClipboardContent=on.prototype.GetClipboardContent=function(){var t=this.ptr;return O(hr(t))},on.prototype.__destroy__=on.prototype.__destroy__=function(){var t=this.ptr;dr(t)},sn.prototype=Object.create($i.prototype),sn.prototype.constructor=sn,sn.prototype.__class__=sn,sn.__cache__={},r.SuspendContextClipboardPaste=sn,sn.prototype.Cancel=sn.prototype.Cancel=function(){var t=this.ptr;mr(t)},sn.prototype.Resume=sn.prototype.Resume=function(t){var e=this.ptr;Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),yr(e,t)},sn.prototype.__destroy__=sn.prototype.__destroy__=function(){var t=this.ptr;_r(t)},an.prototype=Object.create($i.prototype),an.prototype.constructor=an,an.prototype.__class__=an,an.__cache__={},r.SuspendContextNetworkConnect=an,an.prototype.Cancel=an.prototype.Cancel=function(){var t=this.ptr;fr(t)},an.prototype.Resume=an.prototype.Resume=function(){var t=this.ptr;vr(t)},an.prototype.__destroy__=an.prototype.__destroy__=function(){var t=this.ptr;gr(t)},cn.prototype=Object.create($i.prototype),cn.prototype.constructor=cn,cn.prototype.__class__=cn,cn.__cache__={},r.SuspendContextNetworkRpc=cn,cn.prototype.Cancel=cn.prototype.Cancel=function(){var t=this.ptr;br(t)},cn.prototype.GetRequestSize=cn.prototype.GetRequestSize=function(){var t=this.ptr;return Sr(t)},cn.prototype.GetRequestData=cn.prototype.GetRequestData=function(){var t=this.ptr;return Yi(wr(t),Ji)},cn.prototype.ReceiveResponse=cn.prototype.ReceiveResponse=function(t,e){var r=this.ptr;t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Cr(r,t,e)},cn.prototype.__destroy__=cn.prototype.__destroy__=function(){var t=this.ptr;Ir(t)},pn.prototype=Object.create($i.prototype),pn.prototype.constructor=pn,pn.prototype.__class__=pn,pn.__cache__={},r.SuspendContextSerialSync=pn,pn.prototype.Cancel=pn.prototype.Cancel=function(){var t=this.ptr;Er(t)},pn.prototype.Resume=pn.prototype.Resume=function(){var t=this.ptr;Dr(t)},pn.prototype.__destroy__=pn.prototype.__destroy__=function(){var t=this.ptr;Gr(t)},un.prototype=Object.create($i.prototype),un.prototype.constructor=un,un.prototype.__class__=un,un.__cache__={},r.SuspendContext=un,un.prototype.GetKind=un.prototype.GetKind=function(){var t=this.ptr;return xr(t)},un.prototype.Cancel=un.prototype.Cancel=function(){var t=this.ptr;Pr(t)},un.prototype.AsContextClipboardCopy=un.prototype.AsContextClipboardCopy=function(){var t=this.ptr;return Yi(kr(t),on)},un.prototype.AsContextClipboardPaste=un.prototype.AsContextClipboardPaste=function(){var t=this.ptr;return Yi(Mr(t),sn)},un.prototype.AsContextNetworkConnect=un.prototype.AsContextNetworkConnect=function(){var t=this.ptr;return Yi(Rr(t),an)},un.prototype.AsContextNetworkRpc=un.prototype.AsContextNetworkRpc=function(){var t=this.ptr;return Yi(Tr(t),cn)},un.prototype.AsContextSerialSync=un.prototype.AsContextSerialSync=function(){var t=this.ptr;return Yi(zr(t),pn)},un.prototype.__destroy__=un.prototype.__destroy__=function(){var t=this.ptr;Hr(t)},ln.prototype=Object.create($i.prototype),ln.prototype.constructor=ln,ln.prototype.__class__=ln,ln.__cache__={},r.SessionImage=ln,ln.prototype.GetDeviceId=ln.prototype.GetDeviceId=function(){var t=this.ptr;return O(Br(t))},ln.prototype.SetDeviceId=ln.prototype.SetDeviceId=function(t){var e=this.ptr;return Zi.prepare(),t=t&&"object"==typeof t?t.ptr:Xi(t),Yi(Nr(e,t),ln)},ln.prototype.GetRomImage=ln.prototype.GetRomImage=function(){var t=this.ptr;return Yi(Lr(t),Ji)},ln.prototype.GetRomImageSize=ln.prototype.GetRomImageSize=function(){var t=this.ptr;return Ur(t)},ln.prototype.SetRomImage=ln.prototype.SetRomImage=function(t,e){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Yi(jr(r,t,e),ln)},ln.prototype.GetMemoryImage=ln.prototype.GetMemoryImage=function(){var t=this.ptr;return Yi(Fr(t),Ji)},ln.prototype.GetMemoryImageSize=ln.prototype.GetMemoryImageSize=function(){var t=this.ptr;return Or(t)},ln.prototype.SetMemoryImage=ln.prototype.SetMemoryImage=function(t,e){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Yi(Wr(r,t,e),ln)},ln.prototype.GetMetadata=ln.prototype.GetMetadata=function(){var t=this.ptr;return Yi(Vr(t),Ji)},ln.prototype.GetMetadataSize=ln.prototype.GetMetadataSize=function(){var t=this.ptr;return qr(t)},ln.prototype.SetMetadata=ln.prototype.SetMetadata=function(t,e){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Yi(Kr(r,t,e),ln)},ln.prototype.GetSavestate=ln.prototype.GetSavestate=function(){var t=this.ptr;return Yi($r(t),Ji)},ln.prototype.GetSavestateSize=ln.prototype.GetSavestateSize=function(){var t=this.ptr;return Qr(t)},ln.prototype.SetSavestate=ln.prototype.SetSavestate=function(t,e){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Yi(Yr(r,t,e),ln)},ln.prototype.GetVersion=ln.prototype.GetVersion=function(){var t=this.ptr;return Zr(t)},ln.prototype.Serialize=ln.prototype.Serialize=function(){var t=this.ptr;return!!Xr(t)},ln.prototype.GetSerializedImage=ln.prototype.GetSerializedImage=function(){var t=this.ptr;return Yi(Jr(t),Ji)},ln.prototype.GetSerializedImageSize=ln.prototype.GetSerializedImageSize=function(){var t=this.ptr;return ti(t)},ln.prototype.Deserialize=ln.prototype.Deserialize=function(t,e){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),!!ei(r,t,e)},ln.prototype.__destroy__=ln.prototype.__destroy__=function(){var t=this.ptr;ri(t)},hn.prototype=Object.create($i.prototype),hn.prototype.constructor=hn,hn.prototype.__class__=hn,hn.__cache__={},r.SkinLoader=hn,hn.prototype.GetData=hn.prototype.GetData=function(){var t=this.ptr;return Yi(ni(t),Ji)},hn.prototype.GetSize=hn.prototype.GetSize=function(){var t=this.ptr;return oi(t)},hn.prototype.__destroy__=hn.prototype.__destroy__=function(){var t=this.ptr;si(t)},dn.prototype=Object.create($i.prototype),dn.prototype.constructor=dn,dn.prototype.__class__=dn,dn.__cache__={},r.EmTransportSerialBuffer=dn,dn.prototype.RxBytesPending=dn.prototype.RxBytesPending=function(){var t=this.ptr;return ai(t)},dn.prototype.Receive=dn.prototype.Receive=function(){var t=this.ptr;return Yi(ci(t),Ji)},dn.prototype.Send=dn.prototype.Send=function(t,e,r){var i=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),r&&"object"==typeof r&&(r=r.ptr),pi(i,t,e,r)},dn.prototype.IsOpen=dn.prototype.IsOpen=function(){var t=this.ptr;return!!ui(t)},dn.prototype.Rts=dn.prototype.Rts=function(){var t=this.ptr;return li(t)},dn.prototype.Dtr=dn.prototype.Dtr=function(){var t=this.ptr;return!!hi(t)},dn.prototype.IsBreak=dn.prototype.IsBreak=function(){var t=this.ptr;return!!di(t)},dn.prototype.BufferSize=dn.prototype.BufferSize=function(){var t=this.ptr;return mi(t)},dn.prototype.GetBaud=dn.prototype.GetBaud=function(){var t=this.ptr;return yi(t)},dn.prototype.GetParity=dn.prototype.GetParity=function(){var t=this.ptr;return _i(t)},dn.prototype.GetStopBits=dn.prototype.GetStopBits=function(){var t=this.ptr;return fi(t)},dn.prototype.GetDataBits=dn.prototype.GetDataBits=function(){var t=this.ptr;return vi(t)},dn.prototype.GetHwrHandshake=dn.prototype.GetHwrHandshake=function(){var t=this.ptr;return gi(t)},dn.prototype.GetModeSync=dn.prototype.GetModeSync=function(){var t=this.ptr;return!!bi(t)},dn.prototype.SetModeSync=dn.prototype.SetModeSync=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Si(e,t)},dn.prototype.IsFrameComplete=dn.prototype.IsFrameComplete=function(){var t=this.ptr;return!!wi(t)},dn.prototype.SetRequestTransferCallback=dn.prototype.SetRequestTransferCallback=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Ci(e,t)},dn.prototype.__destroy__=dn.prototype.__destroy__=function(){var t=this.ptr;Ii(t)},mn.prototype=Object.create($i.prototype),mn.prototype.constructor=mn,mn.prototype.__class__=mn,mn.__cache__={},r.GunzipContext=mn,mn.prototype.GetState=mn.prototype.GetState=function(){var t=this.ptr;return Di(t)},mn.prototype.Continue=mn.prototype.Continue=function(){var t=this.ptr;return Gi(t)},mn.prototype.GetUncompressedData=mn.prototype.GetUncompressedData=function(){var t=this.ptr;return Yi(xi(t),Ji)},mn.prototype.ReleaseUncompressedData=mn.prototype.ReleaseUncompressedData=function(){var t=this.ptr;return Yi(Pi(t),Ji)},mn.prototype.GetUncompressedSize=mn.prototype.GetUncompressedSize=function(){var t=this.ptr;return ki(t)},mn.prototype.GetError=mn.prototype.GetError=function(){var t=this.ptr;return O(Mi(t))},mn.prototype.__destroy__=mn.prototype.__destroy__=function(){var t=this.ptr;Ri(t)},yn.prototype=Object.create($i.prototype),yn.prototype.constructor=yn,yn.prototype.__class__=yn,yn.__cache__={},r.ZipfileWalker=yn,yn.prototype.GetState=yn.prototype.GetState=function(){var t=this.ptr;return zi(t)},yn.prototype.Next=yn.prototype.Next=function(){var t=this.ptr;return Hi(t)},yn.prototype.GetTotalEntries=yn.prototype.GetTotalEntries=function(){var t=this.ptr;return Ai(t)},yn.prototype.GetCurrentEntrySize=yn.prototype.GetCurrentEntrySize=function(){var t=this.ptr;return Bi(t)},yn.prototype.GetCurrentEntryName=yn.prototype.GetCurrentEntryName=function(){var t=this.ptr;return O(Ni(t))},yn.prototype.GetCurrentEntryContent=yn.prototype.GetCurrentEntryContent=function(){var t=this.ptr;return Yi(Li(t),Ji)},yn.prototype.__destroy__=yn.prototype.__destroy__=function(){var t=this.ptr;Ui(t)},D?r:new Promise(((t,e)=>{h=t,d=e}))});t.exports=r,t.exports.default=r},650:function(t,e){!function(t){"use strict";var e,r=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,i=536870912,n=1073741824,o=new WeakMap,s=function(t,e){return function(o){var s=e.get(o),a=void 0===s?o.size:s<n?s+1:0;if(!o.has(a))return t(o,a);if(o.size<i){for(;o.has(a);)a=Math.floor(Math.random()*n);return t(o,a)}if(o.size>r)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;o.has(a);)a=Math.floor(Math.random()*r);return t(o,a)}}((e=o,function(t,r){return e.set(t,r),r}),o),a=function(t){return function(e){var r=t(e);return e.add(r),r}}(s);t.addUniqueNumber=a,t.generateUniqueNumber=s}(e)},37:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=[];r[0]=function(){return function(){}},r[1]=function(t,e){return void 0===e?t:function(r){t(r,e)}};var i=function(){function t(){this.hasHandlers=!1,this._handlers=[],this._contexts=[],this._createDispatcher()}return t.prototype.addHandler=function(t,e){return this.isHandlerAttached(t,e)||(this._handlers.push(t),this._contexts.push(e),this._createDispatcher(),this._updateHasHandlers()),this},t.prototype.removeHandler=function(t,e){var r=this._getHandlerIndex(t,e);return void 0!==r&&(this._handlers.splice(r,1),this._contexts.splice(r,1),this._createDispatcher(),this._updateHasHandlers()),this},t.prototype.isHandlerAttached=function(t,e){return void 0!==this._getHandlerIndex(t,e)},t.prototype._updateHasHandlers=function(){this.hasHandlers=!!this._handlers.length},t.prototype._getHandlerIndex=function(t,e){var r,i=this._handlers.length;for(r=0;r<i&&(this._handlers[r]!==t||this._contexts[r]!==e);r++);return r<i?r:void 0},t.prototype._createDispatcher=function(){var t;this.dispatch=(t=this._handlers.length,r[t]||(r[t]=function(t){for(var e="return function dispatcher"+t+"(payload) {\n",r=[],i=[],n=0;n<t;n++)r.push("cb"+n),i.push("ctx"+n),e+=" cb"+n+"(payload, ctx"+n+");\n";return e+="};",new(Function.bind.apply(Function,[void 0].concat(r.concat(i),[e])))}(t)),r[t]).apply(this,this._handlers.concat(this._contexts))},t}();e.default=i},819:(t,e,r)=>{"use strict";var i=r(37);e.j=i.default}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var o=e[i]={exports:{}};return t[i].call(o.exports,o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{"use strict";function t(t,e,r,i){var n,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,i);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,r,s):n(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s}function e(t,e,r,i){return new(r||(r=Promise))((function(n,o){function s(t){try{c(i.next(t))}catch(t){o(t)}}function a(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?n(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}c((i=i.apply(t,e||[])).next())}))}var n,o,s;r.r(i),r.d(i,{Button:()=>st,DeviceId:()=>n,DeviceOrientation:()=>o,VERSION:()=>at,createEmulator:()=>ct,createEmulatorFactory:()=>pt}),Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError,(s=n||(n={})).palmPilot="PalmPilot",s.pilot="Pilot",s.iii="PalmIII",s.palmVx="PalmVx",s.palmV="PalmV",s.palmVII="PalmVII",s.palmVIIEZ="PalmVIIEZ",s.palmVIIx="PalmVIIx",s.iiic="PalmIIIc",s.iiix="PalmIIIx",s.iiixe="PalmIIIxe",s.iiie="PalmIIIe",s.m500="PalmM500",s.m505="PalmM505",s.m515="PalmM515",s.m520="PalmM520",s.m100="PalmM100",s.m105="PalmM105",s.m125="PalmM125",s.m130="PalmM130",s.i705="Palmi705",s.i710="PalmI710",s.handera330="HandEra330",s.handera330c="HandEra330c",s.pegS300="PEG-S300",s.pegS320="PEG-S320",s.pegS500c="PEG-S500C",s.pegT400="PEG-T40