mxcad 1.0.10 → 1.0.11
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/dist/mxcad.d.ts +1 -0
- package/dist/mxcad.es.js +2 -2
- package/dist/mxcad.umd.js +2 -2
- package/dist/mxdrawassembly_min.wasm +0 -0
- package/dist/test.mxweb +0 -0
- package/package.json +3 -3
package/dist/mxcad.d.ts
CHANGED
package/dist/mxcad.es.js
CHANGED
|
@@ -695,7 +695,7 @@ var mxdrawassembly = (() => {
|
|
|
695
695
|
function Pa() {
|
|
696
696
|
if (!ra && (fa || ha)) {
|
|
697
697
|
if (typeof fetch == "function" && !L.startsWith("file://"))
|
|
698
|
-
return
|
|
698
|
+
return fetch(L, { credentials: "same-origin" }).then(function(e) {
|
|
699
699
|
if (!e.ok)
|
|
700
700
|
throw "failed to load wasm binary file at '" + L + "'";
|
|
701
701
|
return e.arrayBuffer();
|
|
@@ -2528,7 +2528,7 @@ var mxdrawassembly = (() => {
|
|
|
2528
2528
|
return n("Module.instantiateWasm callback failed with error: " + o), !1;
|
|
2529
2529
|
}
|
|
2530
2530
|
return function() {
|
|
2531
|
-
return ra || typeof WebAssembly.instantiateStreaming != "function" || Ma() || L.startsWith("file://") || typeof fetch != "function" ? r(t) :
|
|
2531
|
+
return ra || typeof WebAssembly.instantiateStreaming != "function" || Ma() || L.startsWith("file://") || typeof fetch != "function" ? r(t) : fetch(L, { credentials: "same-origin" }).then(function(o) {
|
|
2532
2532
|
return WebAssembly.instantiateStreaming(o, i).then(t, function(s) {
|
|
2533
2533
|
return n("wasm streaming compile failed: " + s), n("falling back to ArrayBuffer instantiation"), r(t);
|
|
2534
2534
|
});
|
package/dist/mxcad.umd.js
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
\u6307\u5B9A\u692D\u5706\u5F27\u8F74\u7684\u53E6\u4E00\u4E2A\u7AEF\u70B9:`),e.setKeyWords(""),s()},()=>{})();const s=createProcess(e,()=>{e.setUserDraw((d,g)=>{t.yRadius=i.distanceTo(d),g.drawLine(i,d),g.drawCustomEntity(t)}),e.setMessage(`
|
|
40
40
|
\u6307\u5B9A\u53E6\u4E00\u6761\u534A\u8F74\u957F\u5EA6`),e.setKeyWords(""),c()},()=>{}),c=createProcess(e,()=>{e.setMessage(`
|
|
41
41
|
\u6307\u5B9A\u8D77\u59CB\u89D2\u5EA6`),e.setKeyWords(""),e.setUserDraw((d,g)=>{t.startAngle=angleTo(d.x,d.y,i.x,i.y)-t.rotation,g.drawLine(i,d),g.drawCustomEntity(t)}),f()},()=>{}),f=createProcess(e,()=>{e.setUserDraw((d,g)=>{t.endAngle=angleTo(d.x,d.y,i.x,i.y)-t.rotation,g.drawLine(i,d),g.drawCustomEntity(t)}),e.setMessage(`
|
|
42
|
-
\u6307\u5B9A\u7EC8\u6B62\u89D2\u5EA6`),e.setKeyWords(""),p()},()=>{}),p=createProcess(e,()=>{mxdraw.MxFun.getCurrentDraw().addMxEntity(t)},()=>{})}var mxdrawassembly=(()=>{var _scriptDir=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(_scriptDir=_scriptDir||__filename),function(mxdrawassembly){mxdrawassembly=mxdrawassembly||{};var h;h||(h=typeof mxdrawassembly<"u"?mxdrawassembly:{});var aa,ba;h.ready=new Promise(function(e,t){aa=e,ba=t});var ca=Object.assign({},h),da="./this.program",ea=(e,t)=>{throw t},fa=typeof window=="object",ha=typeof importScripts=="function",ia=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",m="",ja,ka,la,fs,ma,na;ia?(m=ha?require("path").dirname(m)+"/":__dirname+"/",na=()=>{ma||(fs=require("fs"),ma=require("path"))},ja=function(e,t){return na(),e=ma.normalize(e),fs.readFileSync(e,t?void 0:"utf8")},la=e=>(e=ja(e,!0),e.buffer||(e=new Uint8Array(e)),e),ka=(e,t,r)=>{na(),e=ma.normalize(e),fs.readFile(e,function(i,o){i?r(i):t(o.buffer)})},1<process.argv.length&&(da=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("uncaughtException",function(e){throw e}),process.on("unhandledRejection",function(e){throw e}),ea=(e,t)=>{if(noExitRuntime)throw process.exitCode=e,t;n("exiting due to exception: "+t),process.exit(e)},h.inspect=function(){return"[Emscripten Module object]"}):(fa||ha)&&(ha?m=self.location.href:typeof document<"u"&&document.currentScript&&(m=document.currentScript.src),_scriptDir&&(m=_scriptDir),m=m.indexOf("blob:")!==0?m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):"",ja=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},ha&&(la=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),ka=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{i.status==200||i.status==0&&i.response?t(i.response):r()},i.onerror=r,i.send(null)});var oa=h.print||console.log.bind(console),n=h.printErr||console.warn.bind(console);Object.assign(h,ca),ca=null,h.thisProgram&&(da=h.thisProgram),h.quit&&(ea=h.quit);function pa(e){qa||(qa={}),qa[e]||(qa[e]=1,n(e))}var qa,ra;h.wasmBinary&&(ra=h.wasmBinary);var noExitRuntime=h.noExitRuntime||!0;typeof WebAssembly!="object"&&u("no native wasm support detected");var sa,ta=!1,ua=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function va(e,t,r){var i=t+r;for(r=t;e[r]&&!(r>=i);)++r;if(16<r-t&&e.buffer&&ua)return ua.decode(e.subarray(t,r));for(i="";t<r;){var o=e[t++];if(o&128){var s=e[t++]&63;if((o&224)==192)i+=String.fromCharCode((o&31)<<6|s);else{var c=e[t++]&63;o=(o&240)==224?(o&15)<<12|s<<6|c:(o&7)<<18|s<<12|c<<6|e[t++]&63,65536>o?i+=String.fromCharCode(o):(o-=65536,i+=String.fromCharCode(55296|o>>10,56320|o&1023))}}else i+=String.fromCharCode(o)}return i}function y(e,t){return e?va(z,e,t):""}function E(e,t,r,i){if(!(0<i))return 0;var o=r;i=r+i-1;for(var s=0;s<e.length;++s){var c=e.charCodeAt(s);if(55296<=c&&57343>=c){var f=e.charCodeAt(++s);c=65536+((c&1023)<<10)|f&1023}if(127>=c){if(r>=i)break;t[r++]=c}else{if(2047>=c){if(r+1>=i)break;t[r++]=192|c>>6}else{if(65535>=c){if(r+2>=i)break;t[r++]=224|c>>12}else{if(r+3>=i)break;t[r++]=240|c>>18,t[r++]=128|c>>12&63}t[r++]=128|c>>6&63}t[r++]=128|c&63}}return t[r]=0,r-o}typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var wa,F,z,xa,G,H,J,ya,za;function Aa(){var e=sa.buffer;wa=e,h.HEAP8=F=new Int8Array(e),h.HEAP16=xa=new Int16Array(e),h.HEAP32=H=new Int32Array(e),h.HEAPU8=z=new Uint8Array(e),h.HEAPU16=G=new Uint16Array(e),h.HEAPU32=J=new Uint32Array(e),h.HEAPF32=ya=new Float32Array(e),h.HEAPF64=za=new Float64Array(e)}var Ca,Da=[],Ea=[],Fa=[];function Ga(){var e=h.preRun.shift();Da.unshift(e)}var Ha=0,Ja=null;function Ka(){Ha++,h.monitorRunDependencies&&h.monitorRunDependencies(Ha)}function La(){if(Ha--,h.monitorRunDependencies&&h.monitorRunDependencies(Ha),Ha==0&&Ja){var e=Ja;Ja=null,e()}}h.preloadedImages={},h.preloadedAudios={};function u(e){throw h.onAbort&&h.onAbort(e),e="Aborted("+e+")",n(e),ta=!0,e=new WebAssembly.RuntimeError(e+". Build with -s ASSERTIONS=1 for more info."),ba(e),e}function Ma(){return L.startsWith("data:application/octet-stream;base64,")}var L;if(L="mxdrawassembly_min.wasm",!Ma()){var Na=L;L=h.locateFile?h.locateFile(Na,m):m+Na}function Oa(){var e=L;try{if(e==L&&ra)return new Uint8Array(ra);if(la)return la(e);throw"both async and sync fetching of the wasm failed"}catch(t){u(t)}}function Pa(){if(!ra&&(fa||ha)){if(typeof fetch=="function"&&!L.startsWith("file://"))return
|
|
42
|
+
\u6307\u5B9A\u7EC8\u6B62\u89D2\u5EA6`),e.setKeyWords(""),p()},()=>{}),p=createProcess(e,()=>{mxdraw.MxFun.getCurrentDraw().addMxEntity(t)},()=>{})}var mxdrawassembly=(()=>{var _scriptDir=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(_scriptDir=_scriptDir||__filename),function(mxdrawassembly){mxdrawassembly=mxdrawassembly||{};var h;h||(h=typeof mxdrawassembly<"u"?mxdrawassembly:{});var aa,ba;h.ready=new Promise(function(e,t){aa=e,ba=t});var ca=Object.assign({},h),da="./this.program",ea=(e,t)=>{throw t},fa=typeof window=="object",ha=typeof importScripts=="function",ia=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",m="",ja,ka,la,fs,ma,na;ia?(m=ha?require("path").dirname(m)+"/":__dirname+"/",na=()=>{ma||(fs=require("fs"),ma=require("path"))},ja=function(e,t){return na(),e=ma.normalize(e),fs.readFileSync(e,t?void 0:"utf8")},la=e=>(e=ja(e,!0),e.buffer||(e=new Uint8Array(e)),e),ka=(e,t,r)=>{na(),e=ma.normalize(e),fs.readFile(e,function(i,o){i?r(i):t(o.buffer)})},1<process.argv.length&&(da=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),process.on("uncaughtException",function(e){throw e}),process.on("unhandledRejection",function(e){throw e}),ea=(e,t)=>{if(noExitRuntime)throw process.exitCode=e,t;n("exiting due to exception: "+t),process.exit(e)},h.inspect=function(){return"[Emscripten Module object]"}):(fa||ha)&&(ha?m=self.location.href:typeof document<"u"&&document.currentScript&&(m=document.currentScript.src),_scriptDir&&(m=_scriptDir),m=m.indexOf("blob:")!==0?m.substr(0,m.replace(/[?#].*/,"").lastIndexOf("/")+1):"",ja=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},ha&&(la=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),ka=(e,t,r)=>{var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{i.status==200||i.status==0&&i.response?t(i.response):r()},i.onerror=r,i.send(null)});var oa=h.print||console.log.bind(console),n=h.printErr||console.warn.bind(console);Object.assign(h,ca),ca=null,h.thisProgram&&(da=h.thisProgram),h.quit&&(ea=h.quit);function pa(e){qa||(qa={}),qa[e]||(qa[e]=1,n(e))}var qa,ra;h.wasmBinary&&(ra=h.wasmBinary);var noExitRuntime=h.noExitRuntime||!0;typeof WebAssembly!="object"&&u("no native wasm support detected");var sa,ta=!1,ua=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function va(e,t,r){var i=t+r;for(r=t;e[r]&&!(r>=i);)++r;if(16<r-t&&e.buffer&&ua)return ua.decode(e.subarray(t,r));for(i="";t<r;){var o=e[t++];if(o&128){var s=e[t++]&63;if((o&224)==192)i+=String.fromCharCode((o&31)<<6|s);else{var c=e[t++]&63;o=(o&240)==224?(o&15)<<12|s<<6|c:(o&7)<<18|s<<12|c<<6|e[t++]&63,65536>o?i+=String.fromCharCode(o):(o-=65536,i+=String.fromCharCode(55296|o>>10,56320|o&1023))}}else i+=String.fromCharCode(o)}return i}function y(e,t){return e?va(z,e,t):""}function E(e,t,r,i){if(!(0<i))return 0;var o=r;i=r+i-1;for(var s=0;s<e.length;++s){var c=e.charCodeAt(s);if(55296<=c&&57343>=c){var f=e.charCodeAt(++s);c=65536+((c&1023)<<10)|f&1023}if(127>=c){if(r>=i)break;t[r++]=c}else{if(2047>=c){if(r+1>=i)break;t[r++]=192|c>>6}else{if(65535>=c){if(r+2>=i)break;t[r++]=224|c>>12}else{if(r+3>=i)break;t[r++]=240|c>>18,t[r++]=128|c>>12&63}t[r++]=128|c>>6&63}t[r++]=128|c&63}}return t[r]=0,r-o}typeof TextDecoder<"u"&&new TextDecoder("utf-16le");var wa,F,z,xa,G,H,J,ya,za;function Aa(){var e=sa.buffer;wa=e,h.HEAP8=F=new Int8Array(e),h.HEAP16=xa=new Int16Array(e),h.HEAP32=H=new Int32Array(e),h.HEAPU8=z=new Uint8Array(e),h.HEAPU16=G=new Uint16Array(e),h.HEAPU32=J=new Uint32Array(e),h.HEAPF32=ya=new Float32Array(e),h.HEAPF64=za=new Float64Array(e)}var Ca,Da=[],Ea=[],Fa=[];function Ga(){var e=h.preRun.shift();Da.unshift(e)}var Ha=0,Ja=null;function Ka(){Ha++,h.monitorRunDependencies&&h.monitorRunDependencies(Ha)}function La(){if(Ha--,h.monitorRunDependencies&&h.monitorRunDependencies(Ha),Ha==0&&Ja){var e=Ja;Ja=null,e()}}h.preloadedImages={},h.preloadedAudios={};function u(e){throw h.onAbort&&h.onAbort(e),e="Aborted("+e+")",n(e),ta=!0,e=new WebAssembly.RuntimeError(e+". Build with -s ASSERTIONS=1 for more info."),ba(e),e}function Ma(){return L.startsWith("data:application/octet-stream;base64,")}var L;if(L="mxdrawassembly_min.wasm",!Ma()){var Na=L;L=h.locateFile?h.locateFile(Na,m):m+Na}function Oa(){var e=L;try{if(e==L&&ra)return new Uint8Array(ra);if(la)return la(e);throw"both async and sync fetching of the wasm failed"}catch(t){u(t)}}function Pa(){if(!ra&&(fa||ha)){if(typeof fetch=="function"&&!L.startsWith("file://"))return fetch(L,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+L+"'";return e.arrayBuffer()}).catch(function(){return Oa()});if(ka)return new Promise(function(e,t){ka(L,function(r){e(new Uint8Array(r))},t)})}return Promise.resolve().then(function(){return Oa()})}var Qa,Ra;function Sa(e){for(;0<e.length;){var t=e.shift();if(typeof t=="function")t(h);else{var r=t.Ya;typeof r=="number"?t.Z===void 0?Ta(r)():Ta(r)(t.Z):r(t.Z===void 0?null:t.Z)}}}var Ua=[];function Ta(e){var t=Ua[e];return t||(e>=Ua.length&&(Ua.length=e+1),Ua[e]=t=Ca.get(e)),t}function Va(e,t){for(var r=0,i=e.length-1;0<=i;i--){var o=e[i];o==="."?e.splice(i,1):o===".."?(e.splice(i,1),r++):r&&(e.splice(i,1),r--)}if(t)for(;r;r--)e.unshift("..");return e}function Wa(e){var t=e.charAt(0)==="/",r=e.substr(-1)==="/";return(e=Va(e.split("/").filter(function(i){return!!i}),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function Xa(e){var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],!e&&!t?".":(t&&(t=t.substr(0,t.length-1)),e+t)}function Ya(e){if(e==="/")return"/";e=Wa(e),e=e.replace(/\/$/,"");var t=e.lastIndexOf("/");return t===-1?e:e.substr(t+1)}function Za(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}if(ia)try{var t=require("crypto");return function(){return t.randomBytes(1)[0]}}catch{}return function(){u("randomDevice")}}function $a(){for(var e="",t=!1,r=arguments.length-1;-1<=r&&!t;r--){if(t=0<=r?arguments[r]:"/",typeof t!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!t)return"";e=t+"/"+e,t=t.charAt(0)==="/"}return e=Va(e.split("/").filter(function(i){return!!i}),!t).join("/"),(t?"/":"")+e||"."}var ab=[];function bb(e,t){ab[e]={input:[],output:[],I:t},cb(e,db)}var db={open:function(e){var t=ab[e.node.rdev];if(!t)throw new N(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.I.flush(e.tty)},flush:function(e){e.tty.I.flush(e.tty)},read:function(e,t,r,i){if(!e.tty||!e.tty.I.sa)throw new N(60);for(var o=0,s=0;s<i;s++){try{var c=e.tty.I.sa(e.tty)}catch{throw new N(29)}if(c===void 0&&o===0)throw new N(6);if(c==null)break;o++,t[r+s]=c}return o&&(e.node.timestamp=Date.now()),o},write:function(e,t,r,i){if(!e.tty||!e.tty.I.da)throw new N(60);try{for(var o=0;o<i;o++)e.tty.I.da(e.tty,t[r+o])}catch{throw new N(29)}return i&&(e.node.timestamp=Date.now()),o}},fb={sa:function(e){if(!e.input.length){var t=null;if(ia){t=Buffer.alloc(256);var r=0;try{r=fs.readSync(process.stdin.fd,t,0,256,-1)}catch(i){if(i.toString().includes("EOF"))r=0;else throw i}t=0<r?t.slice(0,r).toString("utf-8"):null}else typeof window<"u"&&typeof window.prompt=="function"?(t=window.prompt("Input: "),t!==null&&(t+=`
|
|
43
43
|
`)):typeof readline=="function"&&(t=readline(),t!==null&&(t+=`
|
|
44
44
|
`));if(!t)return null;e.input=eb(t,!0)}return e.input.shift()},da:function(e,t){t===null||t===10?(oa(va(e.output,0)),e.output=[]):t!=0&&e.output.push(t)},flush:function(e){e.output&&0<e.output.length&&(oa(va(e.output,0)),e.output=[])}},gb={da:function(e,t){t===null||t===10?(n(va(e.output,0)),e.output=[]):t!=0&&e.output.push(t)},flush:function(e){e.output&&0<e.output.length&&(n(va(e.output,0)),e.output=[])}},O={o:null,v:function(){return O.createNode(null,"/",16895,0)},createNode:function(e,t,r,i){if((r&61440)===24576||(r&61440)===4096)throw new N(63);return O.o||(O.o={dir:{node:{A:O.g.A,s:O.g.s,lookup:O.g.lookup,V:O.g.V,rename:O.g.rename,unlink:O.g.unlink,rmdir:O.g.rmdir,readdir:O.g.readdir,symlink:O.g.symlink},stream:{B:O.i.B}},file:{node:{A:O.g.A,s:O.g.s},stream:{B:O.i.B,read:O.i.read,write:O.i.write,ja:O.i.ja,va:O.i.va,xa:O.i.xa}},link:{node:{A:O.g.A,s:O.g.s,readlink:O.g.readlink},stream:{}},ka:{node:{A:O.g.A,s:O.g.s},stream:hb}}),r=ib(e,t,r,i),(r.mode&61440)===16384?(r.g=O.o.dir.node,r.i=O.o.dir.stream,r.h={}):(r.mode&61440)===32768?(r.g=O.o.file.node,r.i=O.o.file.stream,r.l=0,r.h=null):(r.mode&61440)===40960?(r.g=O.o.link.node,r.i=O.o.link.stream):(r.mode&61440)===8192&&(r.g=O.o.ka.node,r.i=O.o.ka.stream),r.timestamp=Date.now(),e&&(e.h[t]=r,e.timestamp=r.timestamp),r},Za:function(e){return e.h?e.h.subarray?e.h.subarray(0,e.l):new Uint8Array(e.h):new Uint8Array(0)},pa:function(e,t){var r=e.h?e.h.length:0;r>=t||(t=Math.max(t,r*(1048576>r?2:1.125)>>>0),r!=0&&(t=Math.max(t,256)),r=e.h,e.h=new Uint8Array(t),0<e.l&&e.h.set(r.subarray(0,e.l),0))},Ma:function(e,t){if(e.l!=t)if(t==0)e.h=null,e.l=0;else{var r=e.h;e.h=new Uint8Array(t),r&&e.h.set(r.subarray(0,Math.min(t,e.l))),e.l=t}},g:{A:function(e){var t={};return t.dev=(e.mode&61440)===8192?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,t.size=(e.mode&61440)===16384?4096:(e.mode&61440)===32768?e.l:(e.mode&61440)===40960?e.link.length:0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.Fa=4096,t.blocks=Math.ceil(t.size/t.Fa),t},s:function(e,t){t.mode!==void 0&&(e.mode=t.mode),t.timestamp!==void 0&&(e.timestamp=t.timestamp),t.size!==void 0&&O.Ma(e,t.size)},lookup:function(){throw jb[44]},V:function(e,t,r,i){return O.createNode(e,t,r,i)},rename:function(e,t,r){if((e.mode&61440)===16384){try{var i=kb(t,r)}catch{}if(i)for(var o in i.h)throw new N(55)}delete e.parent.h[e.name],e.parent.timestamp=Date.now(),e.name=r,t.h[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.h[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=kb(e,t),i;for(i in r.h)throw new N(55);delete e.h[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."],r;for(r in e.h)e.h.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){return e=O.createNode(e,t,41471,0),e.link=r,e},readlink:function(e){if((e.mode&61440)!==40960)throw new N(28);return e.link}},i:{read:function(e,t,r,i,o){var s=e.node.h;if(o>=e.node.l)return 0;if(e=Math.min(e.node.l-o,i),8<e&&s.subarray)t.set(s.subarray(o,o+e),r);else for(i=0;i<e;i++)t[r+i]=s[o+i];return e},write:function(e,t,r,i,o,s){if(t.buffer===F.buffer&&(s=!1),!i)return 0;if(e=e.node,e.timestamp=Date.now(),t.subarray&&(!e.h||e.h.subarray)){if(s)return e.h=t.subarray(r,r+i),e.l=i;if(e.l===0&&o===0)return e.h=t.slice(r,r+i),e.l=i;if(o+i<=e.l)return e.h.set(t.subarray(r,r+i),o),i}if(O.pa(e,o+i),e.h.subarray&&t.subarray)e.h.set(t.subarray(r,r+i),o);else for(s=0;s<i;s++)e.h[o+s]=t[r+s];return e.l=Math.max(e.l,o+i),i},B:function(e,t,r){if(r===1?t+=e.position:r===2&&(e.node.mode&61440)===32768&&(t+=e.node.l),0>t)throw new N(28);return t},ja:function(e,t,r){O.pa(e.node,t+r),e.node.l=Math.max(e.node.l,t+r)},va:function(e,t,r,i,o,s){if(t!==0)throw new N(28);if((e.node.mode&61440)!==32768)throw new N(43);if(e=e.node.h,s&2||e.buffer!==wa){if((0<i||i+r<e.length)&&(e=e.subarray?e.subarray(i,i+r):Array.prototype.slice.call(e,i,i+r)),i=!0,u(),r=void 0,!r)throw new N(48);F.set(e,r)}else i=!1,r=e.byteOffset;return{j:r,Ta:i}},xa:function(e,t,r,i,o){if((e.node.mode&61440)!==32768)throw new N(43);return o&2||O.i.write(e,t,0,i,r,!1),0}}},lb=null,mb={},nb=[],ob=1,pb=null,qb=!0,N=null,jb={},P=(e,t={})=>{if(e=$a("/",e),!e)return{path:"",node:null};if(t=Object.assign({ra:!0,ea:0},t),8<t.ea)throw new N(32);e=Va(e.split("/").filter(c=>!!c),!1);for(var r=lb,i="/",o=0;o<e.length;o++){var s=o===e.length-1;if(s&&t.parent)break;if(r=kb(r,e[o]),i=Wa(i+"/"+e[o]),r.G&&(!s||s&&t.ra)&&(r=r.G.root),!s||t.qa){for(s=0;(r.mode&61440)===40960;)if(r=rb(i),i=$a(Xa(i),r),r=P(i,{ea:t.ea+1}).node,40<s++)throw new N(32)}}return{path:i,node:r}},sb=e=>{for(var t;;){if(e===e.parent)return e=e.v.wa,t?e[e.length-1]!=="/"?e+"/"+t:e+t:e;t=t?e.name+"/"+t:e.name,e=e.parent}},tb=(e,t)=>{for(var r=0,i=0;i<t.length;i++)r=(r<<5)-r+t.charCodeAt(i)|0;return(e+r>>>0)%pb.length},ub=e=>{var t=tb(e.parent.id,e.name);if(pb[t]===e)pb[t]=e.H;else for(t=pb[t];t;){if(t.H===e){t.H=e.H;break}t=t.H}},kb=(e,t)=>{var r;if(r=(r=vb(e,"x"))?r:e.g.lookup?0:2)throw new N(r,e);for(r=pb[tb(e.id,t)];r;r=r.H){var i=r.name;if(r.parent.id===e.id&&i===t)return r}return e.g.lookup(e,t)},ib=(e,t,r,i)=>(e=new wb(e,t,r,i),t=tb(e.parent.id,e.name),e.H=pb[t],pb[t]=e),xb={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},yb=e=>{var t=["r","w","rw"][e&3];return e&512&&(t+="w"),t},vb=(e,t)=>{if(qb)return 0;if(!t.includes("r")||e.mode&292){if(t.includes("w")&&!(e.mode&146)||t.includes("x")&&!(e.mode&73))return 2}else return 2;return 0},zb=(e,t)=>{try{return kb(e,t),20}catch{}return vb(e,"wx")},Ab=(e,t,r)=>{try{var i=kb(e,t)}catch(o){return o.m}if(e=vb(e,"wx"))return e;if(r){if((i.mode&61440)!==16384)return 54;if(i===i.parent||sb(i)==="/")return 10}else if((i.mode&61440)===16384)return 31;return 0},Bb=(e=0,t=4096)=>{for(;e<=t;e++)if(!nb[e])return e;throw new N(33)},Db=(e,t)=>(Cb||(Cb=function(){},Cb.prototype={object:{get:function(){return this.node},set:function(r){this.node=r}}}),e=Object.assign(new Cb,e),t=Bb(t,void 0),e.fd=t,nb[t]=e),hb={open:e=>{e.i=mb[e.node.rdev].i,e.i.open&&e.i.open(e)},B:()=>{throw new N(70)}},cb=(e,t)=>{mb[e]={i:t}},Eb=(e,t)=>{var r=t==="/",i=!t;if(r&&lb)throw new N(10);if(!r&&!i){var o=P(t,{ra:!1});if(t=o.path,o=o.node,o.G)throw new N(10);if((o.mode&61440)!==16384)throw new N(54)}t={type:e,eb:{},wa:t,La:[]},e=e.v(t),e.v=t,t.root=e,r?lb=e:o&&(o.G=t,o.v&&o.v.La.push(t))},Q=(e,t,r)=>{var i=P(e,{parent:!0}).node;if(e=Ya(e),!e||e==="."||e==="..")throw new N(28);var o=zb(i,e);if(o)throw new N(o);if(!i.g.V)throw new N(63);return i.g.V(i,e,t,r)},Fb=(e,t,r)=>{typeof r>"u"&&(r=t,t=438),Q(e,t|8192,r)},Gb=(e,t)=>{if(!$a(e))throw new N(44);var r=P(t,{parent:!0}).node;if(!r)throw new N(44);t=Ya(t);var i=zb(r,t);if(i)throw new N(i);if(!r.g.symlink)throw new N(63);r.g.symlink(r,t,e)},Hb=e=>{var t=P(e,{parent:!0}).node;e=Ya(e);var r=kb(t,e),i=Ab(t,e,!0);if(i)throw new N(i);if(!t.g.rmdir)throw new N(63);if(r.G)throw new N(10);t.g.rmdir(t,e),ub(r)},rb=e=>{if(e=P(e).node,!e)throw new N(44);if(!e.g.readlink)throw new N(28);return $a(sb(e.parent),e.g.readlink(e))},Jb=(e,t,r,i)=>{if(e==="")throw new N(44);if(typeof t=="string"){var o=xb[t];if(typeof o>"u")throw Error("Unknown file open mode: "+t);t=o}if(r=t&64?(typeof r>"u"?438:r)&4095|32768:0,typeof e=="object")var s=e;else{e=Wa(e);try{s=P(e,{qa:!(t&131072)}).node}catch{}}if(o=!1,t&64)if(s){if(t&128)throw new N(20)}else s=Q(e,r,0),o=!0;if(!s)throw new N(44);if((s.mode&61440)===8192&&(t&=-513),t&65536&&(s.mode&61440)!==16384)throw new N(54);if(!o&&(r=s?(s.mode&61440)===40960?32:(s.mode&61440)===16384&&(yb(t)!=="r"||t&512)?31:vb(s,yb(t)):44))throw new N(r);if(t&512){if(r=s,r=typeof r=="string"?P(r,{qa:!0}).node:r,!r.g.s)throw new N(63);if((r.mode&61440)===16384)throw new N(31);if((r.mode&61440)!==32768)throw new N(28);if(o=vb(r,"w"))throw new N(o);r.g.s(r,{size:0,timestamp:Date.now()})}return t&=-131713,i=Db({node:s,path:sb(s),flags:t,seekable:!0,position:0,i:s.i,Sa:[],error:!1},i),i.i.open&&i.i.open(i),!h.logReadFiles||t&1||(Ib||(Ib={}),e in Ib||(Ib[e]=1)),i},Kb=(e,t,r)=>{if(e.fd===null)throw new N(8);if(!e.seekable||!e.i.B)throw new N(70);if(r!=0&&r!=1&&r!=2)throw new N(28);e.position=e.i.B(e,t,r),e.Sa=[]},Lb=()=>{N||(N=function(e,t){this.node=t,this.Na=function(r){this.m=r},this.Na(e),this.message="FS error"},N.prototype=Error(),N.prototype.constructor=N,[44].forEach(e=>{jb[e]=new N(e),jb[e].stack="<generic error, no stack>"}))},Mb,Nb=(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},Pb=(e,t,r)=>{e=Wa("/dev/"+e);var i=Nb(!!t,!!r);Ob||(Ob=64);var o=Ob++<<8|0;cb(o,{open:s=>{s.seekable=!1},close:()=>{r&&r.buffer&&r.buffer.length&&r(10)},read:(s,c,f,p)=>{for(var d=0,g=0;g<p;g++){try{var M=t()}catch{throw new N(29)}if(M===void 0&&d===0)throw new N(6);if(M==null)break;d++,c[f+g]=M}return d&&(s.node.timestamp=Date.now()),d},write:(s,c,f,p)=>{for(var d=0;d<p;d++)try{r(c[f+d])}catch{throw new N(29)}return p&&(s.node.timestamp=Date.now()),d}}),Fb(e,i,o)},Ob,R={},Cb,Ib;function Qb(e,t){if(t[0]==="/")return t;if(e===-100)e="/";else{if(e=nb[e],!e)throw new N(8);e=e.path}if(t.length==0)throw new N(44);return Wa(e+"/"+t)}var Rb=void 0;function Sb(){return Rb+=4,H[Rb-4>>2]}function Tb(e){if(e=nb[e],!e)throw new N(8);return e}function Ub(e,t){if(0>=e)return e;var r=32>=t?Math.abs(1<<t-1):Math.pow(2,t-1);return e>=r&&(32>=t||e>r)&&(e=-2*r+e),e}function Vb(e,t){return 0<=e?e:32>=t?2*Math.abs(1<<t-1)+e:Math.pow(2,t)+e}function Wb(e,t){function r(D){var x=i;return(D==="double"||D==="i64")&&x&7&&(x+=4),i=x,D==="double"?(D=Number(za[i>>3]),i+=8):D=="i64"?(D=[H[i>>2],H[i+4>>2]],i+=8):(D=H[i>>2],i+=4),D}for(var i=t,o=[],s,c;;){var f=e;if(s=F[e>>0],s===0)break;if(c=F[e+1>>0],s==37){var p=!1,d=t=!1,g=!1,M=!1;e:for(;;){switch(c){case 43:p=!0;break;case 45:t=!0;break;case 35:d=!0;break;case 48:if(g)break e;g=!0;break;case 32:M=!0;break;default:break e}e++,c=F[e+1>>0]}var A=0;if(c==42)A=r("i32"),e++,c=F[e+1>>0];else for(;48<=c&&57>=c;)A=10*A+(c-48),e++,c=F[e+1>>0];var l=!1,_=-1;if(c==46){if(_=0,l=!0,e++,c=F[e+1>>0],c==42)_=r("i32"),e++;else for(;c=F[e+1>>0],!(48>c||57<c);)_=10*_+(c-48),e++;c=F[e+1>>0]}switch(0>_&&(_=6,l=!1),String.fromCharCode(c)){case"h":if(c=F[e+2>>0],c==104){e++;var v=1}else v=2;break;case"l":c=F[e+2>>0],c==108?(e++,v=8):v=4;break;case"L":case"q":case"j":v=8;break;case"z":case"t":case"I":v=4;break;default:v=null}switch(v&&e++,c=F[e+1>>0],String.fromCharCode(c)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":f=c==100||c==105,v=v||4,s=r("i"+8*v),v==8&&(s=c==117?(s[0]>>>0)+4294967296*(s[1]>>>0):(s[0]>>>0)+4294967296*s[1]),4>=v&&(s=(f?Ub:Vb)(s&Math.pow(256,v)-1,8*v));var b=Math.abs(s);if(f="",c==100||c==105)var w=Ub(s,8*v).toString(10);else if(c==117)w=Vb(s,8*v).toString(10),s=Math.abs(s);else if(c==111)w=(d?"0":"")+b.toString(8);else if(c==120||c==88){if(f=d&&s!=0?"0x":"",0>s){for(s=-s,w=(b-1).toString(16),b=[],d=0;d<w.length;d++)b.push((15-parseInt(w[d],16)).toString(16));for(w=b.join("");w.length<2*v;)w="f"+w}else w=b.toString(16);c==88&&(f=f.toUpperCase(),w=w.toUpperCase())}else c==112&&(b===0?w="(nil)":(f="0x",w=b.toString(16)));if(l)for(;w.length<_;)w="0"+w;for(0<=s&&(p?f="+"+f:M&&(f=" "+f)),w.charAt(0)=="-"&&(f="-"+f,w=w.substr(1));f.length+w.length<A;)t?w+=" ":g?w="0"+w:f=" "+f;w=f+w,w.split("").forEach(function(D){o.push(D.charCodeAt(0))});break;case"f":case"F":case"e":case"E":case"g":case"G":if(s=r("double"),isNaN(s))w="nan",g=!1;else if(isFinite(s)){if(l=!1,v=Math.min(_,20),(c==103||c==71)&&(l=!0,_=_||1,v=parseInt(s.toExponential(v).split("e")[1],10),_>v&&-4<=v?(c=(c==103?"f":"F").charCodeAt(0),_-=v+1):(c=(c==103?"e":"E").charCodeAt(0),_--),v=Math.min(_,20)),c==101||c==69?(w=s.toExponential(v),/[eE][-+]\d$/.test(w)&&(w=w.slice(0,-1)+"0"+w.slice(-1))):(c==102||c==70)&&(w=s.toFixed(v),s===0&&(0>s||s===0&&1/s===-1/0)&&(w="-"+w)),f=w.split("e"),l&&!d)for(;1<f[0].length&&f[0].includes(".")&&(f[0].slice(-1)=="0"||f[0].slice(-1)==".");)f[0]=f[0].slice(0,-1);else for(d&&w.indexOf(".")==-1&&(f[0]+=".");_>v++;)f[0]+="0";w=f[0]+(1<f.length?"e"+f[1]:""),c==69&&(w=w.toUpperCase()),0<=s&&(p?w="+"+w:M&&(w=" "+w))}else w=(0>s?"-":"")+"inf",g=!1;for(;w.length<A;)w=t?w+" ":!g||w[0]!="-"&&w[0]!="+"?(g?"0":" ")+w:w[0]+"0"+w.slice(1);97>c&&(w=w.toUpperCase()),w.split("").forEach(function(D){o.push(D.charCodeAt(0))});break;case"s":if(g=(p=r("i8*"))?Xb(p):6,l&&(g=Math.min(g,_)),!t)for(;g<A--;)o.push(32);if(p)for(d=0;d<g;d++)o.push(z[p++>>0]);else o=o.concat(eb("(null)".substr(0,g),!0));if(t)for(;g<A--;)o.push(32);break;case"c":for(t&&o.push(r("i8"));0<--A;)o.push(32);t||o.push(r("i8"));break;case"n":t=r("i32*"),H[t>>2]=o.length;break;case"%":o.push(s);break;default:for(d=f;d<e+2;d++)o.push(F[d>>0])}e+=2}else o.push(s),e+=1}return o}function Yb(e){if(!e||!e.callee||!e.callee.name)return[null,"",""];var t=e.callee.name,r="(",i=!0,o;for(o in e){var s=e[o];i||(r+=", "),i=!1,r=typeof s=="number"||typeof s=="string"?r+s:r+("("+typeof s+")")}return r+=")",e=(e=e.callee.caller)?e.arguments:[],i&&(r=""),[e,t,r]}function Zb(e){e:{var t=Error();if(!t.stack){try{throw Error()}catch(_){t=_}if(!t.stack){t="(no stack trace available)";break e}}t=t.stack.toString()}t=t.slice(t.indexOf(`
|
|
45
45
|
`,Math.max(t.lastIndexOf("_emscripten_log"),t.lastIndexOf("_emscripten_get_callstack")))+1),e&32&&pa("EM_LOG_DEMANGLE is deprecated; ignoring"),e&8&&typeof emscripten_source_map>"u"&&(pa('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),e=e^8|16);var r=null;if(e&128)for(r=Yb(arguments);r[1].includes("_emscripten_");)r=Yb(r[0]);var i=t.split(`
|
|
@@ -49,4 +49,4 @@
|
|
|
49
49
|
`),e&128&&r[0]&&(r[1]==p&&0<r[2].length&&(t=t.replace(/\s+$/,""),t+=" with values: "+r[1]+r[2]+`
|
|
50
50
|
`),r=Yb(r[0]))}return t=t.replace(/\s+$/,"")}var $b=[];function S(e,t){J[e>>2]=t,J[e+4>>2]=t/4294967296|0}var ac;function bc(e,t,r,i,o){function s(j){var B=0,C=0;j&&(C=x.response?x.response.byteLength:0,B=cc(C),z.set(new Uint8Array(x.response),B)),J[e+12>>2]=B,S(e+16,C)}var c=J[e+8>>2];if(c){var f=y(c),p=e+112,d=y(p);d||(d="GET");var g=J[p+52>>2],M=J[p+56>>2],A=!!J[p+60>>2],l=J[p+68>>2],_=J[p+72>>2];c=J[p+76>>2];var v=J[p+80>>2],b=J[p+84>>2];p=J[p+88>>2];var w=!!(g&1),D=!!(g&2);g=!!(g&64),l=l?y(l):void 0,_=_?y(_):void 0;var x=new XMLHttpRequest;if(x.withCredentials=A,x.open(d,f,!g,l,_),g||(x.timeout=M),x.jb=f,x.responseType="arraybuffer",v&&(f=y(v),x.overrideMimeType(f)),c)for(;d=J[c>>2],!(!d||(f=J[c+4>>2],!f));)c+=8,d=y(d),f=y(f),x.setRequestHeader(d,f);$b.push(x),J[e+0>>2]=$b.length,c=b&&p?z.slice(b,b+p):null,x.onload=j=>{s(w&&!D);var B=x.response?x.response.byteLength:0;S(e+24,0),B&&S(e+32,B),G[e+40>>1]=x.readyState,G[e+42>>1]=x.status,x.statusText&&E(x.statusText,z,e+44,64),200<=x.status&&300>x.status?t&&t(e,x,j):r&&r(e,x,j)},x.onerror=j=>{s(w);var B=x.status;S(e+24,0),S(e+32,x.response?x.response.byteLength:0),G[e+40>>1]=x.readyState,G[e+42>>1]=B,r&&r(e,x,j)},x.ontimeout=j=>{r&&r(e,x,j)},x.onprogress=j=>{var B=w&&D&&x.response?x.response.byteLength:0,C=0;w&&D&&(C=cc(B),z.set(new Uint8Array(x.response),C)),J[e+12>>2]=C,S(e+16,B),S(e+24,j.loaded-B),S(e+32,j.total),G[e+40>>1]=x.readyState,3<=x.readyState&&x.status===0&&0<j.loaded&&(x.status=200),G[e+42>>1]=x.status,x.statusText&&E(x.statusText,z,e+44,64),i&&i(e,x,j),C&&dc(C)},x.onreadystatechange=j=>{G[e+40>>1]=x.readyState,2<=x.readyState&&(G[e+42>>1]=x.status),o&&o(e,x,j)};try{x.send(c)}catch(j){r&&r(e,x,j)}}else r(e,0,"no url specified!")}function ec(e,t){if(!ta)if(t)e();else try{e()}catch(r){r!="unwind"&&ea(1,r)}}function fc(e,t,r,i){var o=ac;if(o){var s=J[e+112+64>>2];s||(s=J[e+8>>2]);var c=y(s);try{var f=o.transaction(["FILES"],"readwrite").objectStore("FILES").put(t,c);f.onsuccess=()=>{G[e+40>>1]=4,G[e+42>>1]=200,E("OK",z,e+44,64),r(e,0,c)},f.onerror=p=>{G[e+40>>1]=4,G[e+42>>1]=413,E("Payload Too Large",z,e+44,64),i(e,0,p)}}catch(p){i(e,0,p)}}else i(e,0,"IndexedDB not available!")}function gc(e,t,r){var i=ac;if(i){var o=J[e+112+64>>2];o||(o=J[e+8>>2]),o=y(o);try{var s=i.transaction(["FILES"],"readonly").objectStore("FILES").get(o);s.onsuccess=c=>{if(c.target.result){c=c.target.result;var f=c.byteLength||c.length,p=cc(f);z.set(new Uint8Array(c),p),J[e+12>>2]=p,S(e+16,f),S(e+24,0),S(e+32,f),G[e+40>>1]=4,G[e+42>>1]=200,E("OK",z,e+44,64),t(e,0,c)}else G[e+40>>1]=4,G[e+42>>1]=404,E("Not Found",z,e+44,64),r(e,0,"no data")},s.onerror=c=>{G[e+40>>1]=4,G[e+42>>1]=404,E("Not Found",z,e+44,64),r(e,0,c)}}catch(c){r(e,0,c)}}else r(e,0,"IndexedDB not available!")}function hc(e,t,r){var i=ac;if(i){var o=J[e+112+64>>2];o||(o=J[e+8>>2]),o=y(o);try{var s=i.transaction(["FILES"],"readwrite").objectStore("FILES").delete(o);s.onsuccess=c=>{c=c.target.result,J[e+12>>2]=0,S(e+16,0),S(e+24,0),S(e+32,0),G[e+40>>1]=4,G[e+42>>1]=200,E("OK",z,e+44,64),t(e,0,c)},s.onerror=c=>{G[e+40>>1]=4,G[e+42>>1]=404,E("Not Found",z,e+44,64),r(e,0,c)}}catch(c){r(e,0,c)}}else r(e,0,"IndexedDB not available!")}function ic(e){var t=e.getExtension("ANGLE_instanced_arrays");t&&(e.vertexAttribDivisor=function(r,i){t.vertexAttribDivisorANGLE(r,i)},e.drawArraysInstanced=function(r,i,o,s){t.drawArraysInstancedANGLE(r,i,o,s)},e.drawElementsInstanced=function(r,i,o,s,c){t.drawElementsInstancedANGLE(r,i,o,s,c)})}function jc(e){var t=e.getExtension("OES_vertex_array_object");t&&(e.createVertexArray=function(){return t.createVertexArrayOES()},e.deleteVertexArray=function(r){t.deleteVertexArrayOES(r)},e.bindVertexArray=function(r){t.bindVertexArrayOES(r)},e.isVertexArray=function(r){return t.isVertexArrayOES(r)})}function kc(e){var t=e.getExtension("WEBGL_draw_buffers");t&&(e.drawBuffers=function(r,i){t.drawBuffersWEBGL(r,i)})}var lc=1,mc=[],T=[],U=[],nc=[],oc=[],pc=[1,1,2,2,4,4,4,2,3,4,8];function qc(e){rc||(rc=e)}function sc(e){for(var t=lc++,r=e.length;r<t;r++)e[r]=null;return t}function tc(e){return 32-Math.clz32(e===0?0:e-1)}function uc(e,t){e.aa||(e.aa=e.getContext,e.getContext=function(i,o){return(o=e.aa(i,o))||(o=e.aa(i)),i=="webgl"==o instanceof WebGLRenderingContext?o:null});var r=1<t.ta?e.getContext("webgl2",t):e.getContext("webgl",t);return r||(r=e.getContext("webgl",t)),r?vc(r,t):0}function vc(e,t){var r=sc(oc),i={$a:r,attributes:t,version:t.ta,F:e};for(e.canvas&&(e.canvas.Ea=i),oc[r]=i,(typeof t.oa>"u"||t.oa)&&wc(i),i.ua=i.F.getParameter(34921),i.P=[],e=0;e<i.ua;e++)i.P[e]={enabled:!1,$:!1,size:0,type:0,ya:0,fa:0,j:0,Da:null};for(e=tc(2097152),i.M=[],i.Aa=[],i.M.length=i.Aa.length=e+1,i.W=[],i.ga=[],i.W.length=i.ga.length=e+1,i.J=[],i.J.length=e+1,t=0;t<=e;++t){i.J[t]=null,i.M[t]=i.Aa[t]=0,i.W[t]=[],i.ga[t]=[];var o=i.W[t],s=i.ga[t];o.length=s.length=64;for(var c=0;64>c;++c)o[c]=s[c]=null}return r}function wc(e){if(e||(e=V),!e.Ja){e.Ja=!0;var t=e.F;ic(t),jc(t),kc(t),t.Va=t.getExtension("WEBGL_draw_instanced_base_vertex_base_instance"),t.ab=t.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance"),2<=e.version&&(t.na=t.getExtension("EXT_disjoint_timer_query_webgl2")),(2>e.version||!t.na)&&(t.na=t.getExtension("EXT_disjoint_timer_query")),t.cb=t.getExtension("WEBGL_multi_draw"),(t.getSupportedExtensions()||[]).forEach(function(r){r.includes("lose_context")||r.includes("debug")||t.getExtension(r)})}}var rc,V,xc,yc=[],zc={},Ac=["default","low-power","high-performance"],Bc=[0,typeof document<"u"?document:0,typeof window<"u"?window:0],Cc={};function Dc(){if(!Ec){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:da||"./this.program"},t;for(t in Cc)Cc[t]===void 0?delete e[t]:e[t]=Cc[t];var r=[];for(t in e)r.push(t+"="+e[t]);Ec=r}return Ec}var Ec;function Fc(e,t){Fc.za||(Fc.za=Za());for(var r=0;r<t;r++)F[e+r>>0]=Fc.za();return 0}function Gc(e,t,r,i){for(var o=0;o<e;o++){var s=W[r](),c=s&&sc(i);s?(s.name=c,i[c]=s):qc(1282),H[t+4*o>>2]=c}}function Hc(e,t,r,i,o,s,c,f){t=T[t],(e=W[e](t,r))&&(i=f&&E(e.name,z,f,i),o&&(H[o>>2]=i),s&&(H[s>>2]=e.size),c&&(H[c>>2]=e.type))}function Ic(e){return e.slice(-1)=="]"&&e.lastIndexOf("[")}function Jc(e){var t=W.Ha;if(t){var r=t.N[e];return typeof r=="number"&&(t.N[e]=r=W.getUniformLocation(t,t.Ba[e]+(0<r?"["+r+"]":""))),r}qc(1282)}var Kc=[];function Lc(e){return e%4===0&&(e%100!==0||e%400===0)}var Mc=[31,29,31,30,31,30,31,31,30,31,30,31],Nc=[31,28,31,30,31,30,31,31,30,31,30,31];function Oc(e,t,r,i){function o(l,_,v){for(l=typeof l=="number"?l.toString():l||"";l.length<_;)l=v[0]+l;return l}function s(l,_){return o(l,_,"0")}function c(l,_){function v(w){return 0>w?-1:0<w?1:0}var b;return(b=v(l.getFullYear()-_.getFullYear()))===0&&(b=v(l.getMonth()-_.getMonth()))===0&&(b=v(l.getDate()-_.getDate())),b}function f(l){switch(l.getDay()){case 0:return new Date(l.getFullYear()-1,11,29);case 1:return l;case 2:return new Date(l.getFullYear(),0,3);case 3:return new Date(l.getFullYear(),0,2);case 4:return new Date(l.getFullYear(),0,1);case 5:return new Date(l.getFullYear()-1,11,31);case 6:return new Date(l.getFullYear()-1,11,30)}}function p(l){var _=l.C;for(l=new Date(new Date(l.D+1900,0,1).getTime());0<_;){var v=l.getMonth(),b=(Lc(l.getFullYear())?Mc:Nc)[v];if(_>b-l.getDate())_-=b-l.getDate()+1,l.setDate(1),11>v?l.setMonth(v+1):(l.setMonth(0),l.setFullYear(l.getFullYear()+1));else{l.setDate(l.getDate()+_);break}}return v=new Date(l.getFullYear()+1,0,4),_=f(new Date(l.getFullYear(),0,4)),v=f(v),0>=c(_,l)?0>=c(v,l)?l.getFullYear()+1:l.getFullYear():l.getFullYear()-1}var d=H[i+40>>2];i={Qa:H[i>>2],Pa:H[i+4>>2],X:H[i+8>>2],ha:H[i+12>>2],Y:H[i+16>>2],D:H[i+20>>2],u:H[i+24>>2],C:H[i+28>>2],ib:H[i+32>>2],Oa:H[i+36>>2],Ra:d?y(d):""},r=y(r),d={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var g in d)r=r.replace(new RegExp(g,"g"),d[g]);var M="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),A="January February March April May June July August September October November December".split(" ");d={"%a":function(l){return M[l.u].substring(0,3)},"%A":function(l){return M[l.u]},"%b":function(l){return A[l.Y].substring(0,3)},"%B":function(l){return A[l.Y]},"%C":function(l){return s((l.D+1900)/100|0,2)},"%d":function(l){return s(l.ha,2)},"%e":function(l){return o(l.ha,2," ")},"%g":function(l){return p(l).toString().substring(2)},"%G":function(l){return p(l)},"%H":function(l){return s(l.X,2)},"%I":function(l){return l=l.X,l==0?l=12:12<l&&(l-=12),s(l,2)},"%j":function(l){for(var _=0,v=0;v<=l.Y-1;_+=(Lc(l.D+1900)?Mc:Nc)[v++]);return s(l.ha+_,3)},"%m":function(l){return s(l.Y+1,2)},"%M":function(l){return s(l.Pa,2)},"%n":function(){return`
|
|
51
51
|
`},"%p":function(l){return 0<=l.X&&12>l.X?"AM":"PM"},"%S":function(l){return s(l.Qa,2)},"%t":function(){return" "},"%u":function(l){return l.u||7},"%U":function(l){return s(Math.floor((l.C+7-l.u)/7),2)},"%V":function(l){var _=Math.floor((l.C+7-(l.u+6)%7)/7);if(2>=(l.u+371-l.C-2)%7&&_++,_)_==53&&(v=(l.u+371-l.C)%7,v==4||v==3&&Lc(l.D)||(_=1));else{_=52;var v=(l.u+7-l.C-1)%7;(v==4||v==5&&Lc(l.D%400-1))&&_++}return s(_,2)},"%w":function(l){return l.u},"%W":function(l){return s(Math.floor((l.C+7-(l.u+6)%7)/7),2)},"%y":function(l){return(l.D+1900).toString().substring(2)},"%Y":function(l){return l.D+1900},"%z":function(l){l=l.Oa;var _=0<=l;return l=Math.abs(l)/60,(_?"+":"-")+String("0000"+(l/60*100+l%60)).slice(-4)},"%Z":function(l){return l.Ra},"%%":function(){return"%"}},r=r.replace(/%%/g,"\0\0");for(g in d)r.includes(g)&&(r=r.replace(new RegExp(g,"g"),d[g](i)));return r=r.replace(/\0\0/g,"%"),g=eb(r,!1),g.length>t?0:(F.set(g,e),g.length-1)}function wb(e,t,r,i){e||(e=this),this.parent=e,this.v=e.v,this.G=null,this.id=ob++,this.name=t,this.mode=r,this.g={},this.i={},this.rdev=i}Object.defineProperties(wb.prototype,{read:{get:function(){return(this.mode&365)===365},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return(this.mode&146)===146},set:function(e){e?this.mode|=146:this.mode&=-147}}}),Lb(),pb=Array(4096),Eb(O,"/"),Q("/tmp",16895,0),Q("/home",16895,0),Q("/home/web_user",16895,0),(()=>{Q("/dev",16895,0),cb(259,{read:()=>0,write:(t,r,i,o)=>o}),Fb("/dev/null",259),bb(1280,fb),bb(1536,gb),Fb("/dev/tty",1280),Fb("/dev/tty1",1536);var e=Za();Pb("random",e),Pb("urandom",e),Q("/dev/shm",16895,0),Q("/dev/shm/tmp",16895,0)})(),(()=>{Q("/proc",16895,0);var e=Q("/proc/self",16895,0);Q("/proc/self/fd",16895,0),Eb({v:()=>{var t=ib(e,"fd",16895,73);return t.g={lookup:(r,i)=>{var o=nb[+i];if(!o)throw new N(8);return r={parent:null,v:{wa:"fake"},g:{readlink:()=>o.path}},r.parent=r}},t}},"/proc/self/fd")})(),function(e,t){try{var r=indexedDB.open("emscripten_filesystem",1)}catch(i){t(i);return}r.onupgradeneeded=i=>{i=i.target.result,i.objectStoreNames.contains("FILES")&&i.deleteObjectStore("FILES"),i.createObjectStore("FILES")},r.onsuccess=i=>e(i.target.result),r.onerror=i=>t(i)}(e=>{ac=e,La()},()=>{ac=!1,La()}),typeof ENVIRONMENT_IS_FETCH_WORKER<"u"&&ENVIRONMENT_IS_FETCH_WORKER||Ka();for(var W,Pc=new Float32Array(288),Qc=0;288>Qc;++Qc)Kc[Qc]=Pc.subarray(0,Qc+1);function eb(e,t){for(var r=0,i=0;i<e.length;++i){var o=e.charCodeAt(i);55296<=o&&57343>=o&&(o=65536+((o&1023)<<10)|e.charCodeAt(++i)&1023),127>=o?++r:r=2047>=o?r+2:65535>=o?r+3:r+4}return r=Array(r+1),e=E(e,r,0,r.length),t&&(r.length=e),r}var Sc={__assert_fail:function(e,t,r,i){u("Assertion failed: "+y(e)+", at: "+[t?y(t):"unknown filename",r,i?y(i):"unknown function"])},__syscall_fcntl64:function(e,t,r){Rb=r;try{var i=Tb(e);switch(t){case 0:var o=Sb();return 0>o?-28:Jb(i.path,i.flags,0,o).fd;case 1:case 2:return 0;case 3:return i.flags;case 4:return o=Sb(),i.flags|=o,0;case 5:return o=Sb(),xa[o+0>>1]=2,0;case 6:case 7:return 0;case 16:case 8:return-28;case 9:return H[Rc()>>2]=28,-1;default:return-28}}catch(s){if(typeof R>"u"||!(s instanceof N))throw s;return-s.m}},__syscall_ioctl:function(e,t,r){Rb=r;try{var i=Tb(e);switch(t){case 21509:case 21505:return i.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return i.tty?0:-59;case 21519:if(!i.tty)return-59;var o=Sb();return H[o>>2]=0;case 21520:return i.tty?-28:-59;case 21531:if(e=o=Sb(),!i.i.Ka)throw new N(59);return i.i.Ka(i,t,e);case 21523:return i.tty?0:-59;case 21524:return i.tty?0:-59;default:u("bad ioctl syscall "+t)}}catch(s){if(typeof R>"u"||!(s instanceof N))throw s;return-s.m}},__syscall_openat:function(e,t,r,i){Rb=i;try{t=y(t),t=Qb(e,t);var o=i?Sb():0;return Jb(t,r,o).fd}catch(s){if(typeof R>"u"||!(s instanceof N))throw s;return-s.m}},__syscall_rmdir:function(e){try{return e=y(e),Hb(e),0}catch(t){if(typeof R>"u"||!(t instanceof N))throw t;return-t.m}},__syscall_unlinkat:function(e,t,r){try{if(t=y(t),t=Qb(e,t),r===0){e=t;var i=P(e,{parent:!0}).node;if(!i)throw new N(44);var o=Ya(e),s=kb(i,o),c=Ab(i,o,!1);if(c)throw new N(c);if(!i.g.unlink)throw new N(63);if(s.G)throw new N(10);i.g.unlink(i,o),ub(s)}else r===512?Hb(t):u("Invalid flags passed to unlinkat");return 0}catch(f){if(typeof R>"u"||!(f instanceof N))throw f;return-f.m}},_emscripten_fetch_free:function(e){delete $b[e-1]},abort:function(){u("")},array_bounds_check_error:function(e,t){throw"Array index "+e+" out of bounds: [0,"+t+")"},emscripten_is_main_browser_thread:function(){return!ha},emscripten_log:function(e,t,r){t=Wb(t,r),t=va(t,0),e&24&&(t=t.replace(/\s+$/,""),t+=(0<t.length?`
|
|
52
|
-
`:"")+Zb(e)),e&1?e&4?console.error(t):e&2?console.warn(t):e&512?console.info(t):e&256?console.debug(t):console.log(t):e&6?n(t):oa(t)},emscripten_memcpy_big:function(e,t,r){z.copyWithin(e,t,t+r)},emscripten_resize_heap:function(e){var t=z.length;if(e>>>=0,2147483648<e)return!1;for(var r=1;4>=r;r*=2){var i=t*(1+.2/r);i=Math.min(i,e+100663296);var o=Math;i=Math.max(e,i),o=o.min.call(o,2147483648,i+(65536-i%65536)%65536);e:{try{sa.grow(o-wa.byteLength+65535>>>16),Aa();var s=1;break e}catch{}s=void 0}if(s)return!0}return!1},emscripten_run_script:function(a){eval(y(a))},emscripten_start_fetch:function(e,t,r,i,o){var s=e+112,c=y(s),f=J[s+36>>2],p=J[s+40>>2],d=J[s+44>>2],g=J[s+48>>2],M=J[s+52>>2],A=!!(M&4),l=!!(M&32),_=!!(M&16),v=!!(M&64),b=C=>{ec(()=>{f?Ta(f)(C):t&&t(C)},v)},w=C=>{ec(()=>{d?Ta(d)(C):i&&i(C)},v)},D=C=>{ec(()=>{p?Ta(p)(C):r&&r(C)},v)},x=C=>{ec(()=>{g?Ta(g)(C):o&&o(C)},v)};M=C=>{bc(C,b,D,w,x)};var j=(C,k)=>{fc(C,k.response,I=>{ec(()=>{f?Ta(f)(I):t&&t(I)},v)},I=>{ec(()=>{f?Ta(f)(I):t&&t(I)},v)})},B=C=>{bc(C,j,D,w,x)};if(c==="EM_IDB_STORE")c=J[s+84>>2],fc(e,z.slice(c,c+J[s+88>>2]),b,D);else if(c==="EM_IDB_DELETE")hc(e,b,D);else if(_){if(l)return 0;bc(e,A?j:b,D,w,x)}else gc(e,b,l?D:A?B:M);return e},emscripten_webgl_create_context:function(e,t){return t>>=2,t={alpha:!!H[t+0],depth:!!H[t+1],stencil:!!H[t+2],antialias:!!H[t+3],premultipliedAlpha:!!H[t+4],preserveDrawingBuffer:!!H[t+5],powerPreference:Ac[H[t+6]],failIfMajorPerformanceCaveat:!!H[t+7],ta:H[t+8],bb:H[t+9],oa:H[t+10],Ia:H[t+11],gb:H[t+12],hb:H[t+13]},e=2<e?y(e):e,e=Bc[e]||(typeof document<"u"?document.querySelector(e):void 0),!e||t.Ia?0:uc(e,t)},emscripten_webgl_destroy_context:function(e){if(V==e&&(V=0),V===oc[e]&&(V=null),typeof zc=="object"){for(var t=oc[e].F.canvas,r=0;r<yc.length;++r)if(yc[r].target==t){var i=r--,o=yc[i];o.target.removeEventListener(o.Xa,o.Wa,o.kb),yc.splice(i,1)}}oc[e]&&oc[e].F.canvas&&(oc[e].F.canvas.Ea=void 0),oc[e]=null},emscripten_webgl_make_context_current:function(e){return V=oc[e],h.Ua=W=V&&V.F,!e||W?0:-5},environ_get:function(e,t){var r=0;return Dc().forEach(function(i,o){var s=t+r;for(o=H[e+4*o>>2]=s,s=0;s<i.length;++s)F[o++>>0]=i.charCodeAt(s);F[o>>0]=0,r+=i.length+1}),0},environ_sizes_get:function(e,t){var r=Dc();H[e>>2]=r.length;var i=0;return r.forEach(function(o){i+=o.length+1}),H[t>>2]=i,0},fd_close:function(e){try{var t=Tb(e);if(t.fd===null)throw new N(8);t.ba&&(t.ba=null);try{t.i.close&&t.i.close(t)}catch(r){throw r}finally{nb[t.fd]=null}return t.fd=null,0}catch(r){if(typeof R>"u"||!(r instanceof N))throw r;return r.m}},fd_read:function(e,t,r,i){try{e:{for(var o=Tb(e),s=e=0;s<r;s++){var c=H[t+(8*s+4)>>2],f=o,p=H[t+8*s>>2],d=c,g=void 0,M=F;if(0>d||0>g)throw new N(28);if(f.fd===null)throw new N(8);if((f.flags&2097155)===1)throw new N(8);if((f.node.mode&61440)===16384)throw new N(31);if(!f.i.read)throw new N(28);var A=typeof g<"u";if(!A)g=f.position;else if(!f.seekable)throw new N(70);var l=f.i.read(f,M,p,d,g);A||(f.position+=l);var _=l;if(0>_){var v=-1;break e}if(e+=_,_<c)break}v=e}return H[i>>2]=v,0}catch(b){if(typeof R>"u"||!(b instanceof N))throw b;return b.m}},fd_seek:function(e,t,r,i,o){try{var s=Tb(e);return e=4294967296*r+(t>>>0),-9007199254740992>=e||9007199254740992<=e?-61:(Kb(s,e,i),Ra=[s.position>>>0,(Qa=s.position,1<=+Math.abs(Qa)?0<Qa?(Math.min(+Math.floor(Qa/4294967296),4294967295)|0)>>>0:~~+Math.ceil((Qa-+(~~Qa>>>0))/4294967296)>>>0:0)],H[o>>2]=Ra[0],H[o+4>>2]=Ra[1],s.ba&&e===0&&i===0&&(s.ba=null),0)}catch(c){if(typeof R>"u"||!(c instanceof N))throw c;return c.m}},fd_write:function(e,t,r,i){try{e:{for(var o=Tb(e),s=e=0;s<r;s++){var c=o,f=H[t+8*s>>2],p=H[t+(8*s+4)>>2],d=void 0,g=F;if(0>p||0>d)throw new N(28);if(c.fd===null)throw new N(8);if((c.flags&2097155)===0)throw new N(8);if((c.node.mode&61440)===16384)throw new N(31);if(!c.i.write)throw new N(28);c.seekable&&c.flags&1024&&Kb(c,0,2);var M=typeof d<"u";if(!M)d=c.position;else if(!c.seekable)throw new N(70);var A=c.i.write(c,g,f,p,d,void 0);M||(c.position+=A);var l=A;if(0>l){var _=-1;break e}e+=l}_=e}return H[i>>2]=_,0}catch(v){if(typeof R>"u"||!(v instanceof N))throw v;return v.m}},getentropy:Fc,glAttachShader:function(e,t){W.attachShader(T[e],U[t])},glBindAttribLocation:function(e,t,r){W.bindAttribLocation(T[e],t,y(r))},glBindBuffer:function(e,t){e==34962?W.R=t:e==34963&&(W.L=t),e==35051?W.la=t:e==35052&&(W.ma=t),W.bindBuffer(e,mc[t])},glBindVertexArray:function(e){W.bindVertexArray(nc[e]),e=W.getParameter(34965),W.L=e?e.name|0:0},glBufferData:function(e,t,r,i){2<=V.version?r?W.bufferData(e,z,i,r,t):W.bufferData(e,t,i):W.bufferData(e,r?z.subarray(r,r+t):t,i)},glClear:function(e){W.clear(e)},glClearColor:function(e,t,r,i){W.clearColor(e,t,r,i)},glCompileShader:function(e){W.compileShader(U[e])},glCreateProgram:function(){var e=sc(T),t=W.createProgram();return t.name=e,t.U=t.S=t.T=0,t.ia=1,T[e]=t,e},glCreateShader:function(e){var t=sc(U);return U[t]=W.createShader(e),t},glDeleteBuffers:function(e,t){for(var r=0;r<e;r++){var i=H[t+4*r>>2],o=mc[i];o&&(W.deleteBuffer(o),o.name=0,mc[i]=null,i==W.R&&(W.R=0),i==W.L&&(W.L=0),i==W.la&&(W.la=0),i==W.ma&&(W.ma=0))}},glDeleteProgram:function(e){if(e){var t=T[e];t?(W.deleteProgram(t),t.name=0,T[e]=null):qc(1281)}},glDeleteShader:function(e){if(e){var t=U[e];t?(W.deleteShader(t),U[e]=null):qc(1281)}},glDeleteVertexArrays:function(e,t){for(var r=0;r<e;r++){var i=H[t+4*r>>2];W.deleteVertexArray(nc[i]),nc[i]=null}},glDrawElements:function(e,t,r,i){if(!W.L){var o=1*pc[r-5120]*t,s=tc(o),c=V.J[s];c?s=c:(c=W.getParameter(34965),V.J[s]=W.createBuffer(),W.bindBuffer(34963,V.J[s]),W.bufferData(34963,1<<s,35048),W.bindBuffer(34963,c),s=V.J[s]),W.bindBuffer(34963,s),W.bufferSubData(34963,0,z.subarray(i,i+o)),i=0}for(xc=!1,o=0;o<V.ua;++o)if(s=V.P[o],s.$&&s.enabled){xc=!0,c=s.fa,c=0<c?t*c:s.size*pc[s.type-5120]*t;var f=tc(c),p=V.W[f],d=V.M[f];V.M[f]=V.M[f]+1&63;var g=p[d];g?f=g:(g=W.getParameter(34964),p[d]=W.createBuffer(),W.bindBuffer(34962,p[d]),W.bufferData(34962,1<<f,35048),W.bindBuffer(34962,g),f=p[d]),W.bindBuffer(34962,f),W.bufferSubData(34962,0,z.subarray(s.j,s.j+c)),s.Da.call(W,o,s.size,s.type,s.ya,s.fa,0)}W.drawElements(e,t,r,i),xc&&W.bindBuffer(34962,mc[W.R]),W.L||W.bindBuffer(34963,null)},glDrawElementsInstanced:function(e,t,r,i,o){W.drawElementsInstanced(e,t,r,i,o)},glEnable:function(e){W.enable(e)},glEnableVertexAttribArray:function(e){V.P[e].enabled=!0,W.enableVertexAttribArray(e)},glGenBuffers:function(e,t){Gc(e,t,"createBuffer",mc)},glGenVertexArrays:function(e,t){Gc(e,t,"createVertexArray",nc)},glGetActiveAttrib:function(e,t,r,i,o,s,c){Hc("getActiveAttrib",e,t,r,i,o,s,c)},glGetActiveUniform:function(e,t,r,i,o,s,c){Hc("getActiveUniform",e,t,r,i,o,s,c)},glGetAttribLocation:function(e,t){return W.getAttribLocation(T[e],y(t))},glGetError:function(){var e=W.getError()||rc;return rc=0,e},glGetProgramInfoLog:function(e,t,r,i){e=W.getProgramInfoLog(T[e]),e===null&&(e="(unknown error)"),t=0<t&&i?E(e,z,i,t):0,r&&(H[r>>2]=t)},glGetProgramiv:function(e,t,r){if(r)if(e>=lc)qc(1281);else if(e=T[e],t==35716)e=W.getProgramInfoLog(e),e===null&&(e="(unknown error)"),H[r>>2]=e.length+1;else if(t==35719){if(!e.U)for(t=0;t<W.getProgramParameter(e,35718);++t)e.U=Math.max(e.U,W.getActiveUniform(e,t).name.length+1);H[r>>2]=e.U}else if(t==35722){if(!e.S)for(t=0;t<W.getProgramParameter(e,35721);++t)e.S=Math.max(e.S,W.getActiveAttrib(e,t).name.length+1);H[r>>2]=e.S}else if(t==35381){if(!e.T)for(t=0;t<W.getProgramParameter(e,35382);++t)e.T=Math.max(e.T,W.getActiveUniformBlockName(e,t).length+1);H[r>>2]=e.T}else H[r>>2]=W.getProgramParameter(e,t);else qc(1281)},glGetShaderInfoLog:function(e,t,r,i){e=W.getShaderInfoLog(U[e]),e===null&&(e="(unknown error)"),t=0<t&&i?E(e,z,i,t):0,r&&(H[r>>2]=t)},glGetShaderiv:function(e,t,r){r?t==35716?(e=W.getShaderInfoLog(U[e]),e===null&&(e="(unknown error)"),H[r>>2]=e?e.length+1:0):t==35720?(e=W.getShaderSource(U[e]),H[r>>2]=e?e.length+1:0):H[r>>2]=W.getShaderParameter(U[e],t):qc(1281)},glGetUniformLocation:function(e,t){if(t=y(t),e=T[e]){var r=e,i=r.N,o=r.Ca,s;if(!i)for(r.N=i={},r.Ba={},s=0;s<W.getProgramParameter(r,35718);++s){var c=W.getActiveUniform(r,s),f=c.name;c=c.size;var p=Ic(f);p=0<p?f.slice(0,p):f;var d=r.ia;for(r.ia+=c,o[p]=[c,d],f=0;f<c;++f)i[d]=f,r.Ba[d++]=p}if(r=e.N,i=0,o=t,s=Ic(t),0<s&&(i=parseInt(t.slice(s+1))>>>0,o=t.slice(0,s)),(o=e.Ca[o])&&i<o[0]&&(i+=o[1],r[i]=r[i]||W.getUniformLocation(e,t)))return i}else qc(1281);return-1},glLineWidth:function(e){W.lineWidth(e)},glLinkProgram:function(e){e=T[e],W.linkProgram(e),e.N=0,e.Ca={}},glShaderSource:function(e,t,r,i){for(var o="",s=0;s<t;++s){var c=i?H[i+4*s>>2]:-1;o+=y(H[r+4*s>>2],0>c?void 0:c)}W.shaderSource(U[e],o)},glUniform1i:function(e,t){W.uniform1i(Jc(e),t)},glUniform4f:function(e,t,r,i,o){W.uniform4f(Jc(e),t,r,i,o)},glUniform4fv:function(e,t,r){if(2<=V.version)W.uniform4fv(Jc(e),ya,r>>2,4*t);else{if(72>=t){var i=Kc[4*t-1],o=ya;r>>=2;for(var s=0;s<4*t;s+=4){var c=r+s;i[s]=o[c],i[s+1]=o[c+1],i[s+2]=o[c+2],i[s+3]=o[c+3]}}else i=ya.subarray(r>>2,r+16*t>>2);W.uniform4fv(Jc(e),i)}},glUniformMatrix4fv:function(e,t,r,i){if(2<=V.version)W.uniformMatrix4fv(Jc(e),!!r,ya,i>>2,16*t);else{if(18>=t){var o=Kc[16*t-1],s=ya;i>>=2;for(var c=0;c<16*t;c+=16){var f=i+c;o[c]=s[f],o[c+1]=s[f+1],o[c+2]=s[f+2],o[c+3]=s[f+3],o[c+4]=s[f+4],o[c+5]=s[f+5],o[c+6]=s[f+6],o[c+7]=s[f+7],o[c+8]=s[f+8],o[c+9]=s[f+9],o[c+10]=s[f+10],o[c+11]=s[f+11],o[c+12]=s[f+12],o[c+13]=s[f+13],o[c+14]=s[f+14],o[c+15]=s[f+15]}}else o=ya.subarray(i>>2,i+64*t>>2);W.uniformMatrix4fv(Jc(e),!!r,o)}},glUseProgram:function(e){e=T[e],W.useProgram(e),W.Ha=e},glValidateProgram:function(e){W.validateProgram(T[e])},glVertexAttribDivisor:function(e,t){W.vertexAttribDivisor(e,t)},glVertexAttribPointer:function(e,t,r,i,o,s){var c=V.P[e];W.R?(c.$=!1,W.vertexAttribPointer(e,t,r,!!i,o,s)):(c.size=t,c.type=r,c.ya=i,c.fa=o,c.j=s,c.$=!0,c.Da=function(f,p,d,g,M,A){this.vertexAttribPointer(f,p,d,g,M,A)})},setTempRet0:function(){},strftime_l:function(e,t,r,i){return Oc(e,t,r,i)}};(function(){function e(o){h.asm=o.exports,sa=h.asm.memory,Aa(),Ca=h.asm.__indirect_function_table,Ea.unshift(h.asm.__wasm_call_ctors),La()}function t(o){e(o.instance)}function r(o){return Pa().then(function(s){return WebAssembly.instantiate(s,i)}).then(function(s){return s}).then(o,function(s){n("failed to asynchronously prepare wasm: "+s),u(s)})}var i={env:Sc,wasi_snapshot_preview1:Sc};if(Ka(),h.instantiateWasm)try{return h.instantiateWasm(i,e)}catch(o){return n("Module.instantiateWasm callback failed with error: "+o),!1}return function(){return ra||typeof WebAssembly.instantiateStreaming!="function"||Ma()||L.startsWith("file://")||typeof fetch!="function"?r(t):(mxdrawassembly.locateFile?fetch(L,{credentials:"same-origin"}):fetch(location.pathname.split("/").join("/")+"/mxdrawassembly_min.wasm",{credentials:"same-origin"})).then(function(o){return WebAssembly.instantiateStreaming(o,i).then(t,function(s){return n("wasm streaming compile failed: "+s),n("falling back to ArrayBuffer instantiation"),r(t)})})}().catch(ba),{}})(),h.___wasm_call_ctors=function(){return(h.___wasm_call_ctors=h.asm.__wasm_call_ctors).apply(null,arguments)};var Tc=h._emscripten_bind_VoidPtr___destroy___0=function(){return(Tc=h._emscripten_bind_VoidPtr___destroy___0=h.asm.emscripten_bind_VoidPtr___destroy___0).apply(null,arguments)},Uc=h._emscripten_bind_McObject_updateDisplay_2=function(){return(Uc=h._emscripten_bind_McObject_updateDisplay_2=h.asm.emscripten_bind_McObject_updateDisplay_2).apply(null,arguments)},Vc=h._emscripten_bind_McObject_test_0=function(){return(Vc=h._emscripten_bind_McObject_test_0=h.asm.emscripten_bind_McObject_test_0).apply(null,arguments)},Wc=h._emscripten_bind_McObject_openWebFile_1=function(){return(Wc=h._emscripten_bind_McObject_openWebFile_1=h.asm.emscripten_bind_McObject_openWebFile_1).apply(null,arguments)},Xc=h._emscripten_bind_McObject_setSize_2=function(){return(Xc=h._emscripten_bind_McObject_setSize_2=h.asm.emscripten_bind_McObject_setSize_2).apply(null,arguments)},Yc=h._emscripten_bind_McObject_getViewDataJsonParam_0=function(){return(Yc=h._emscripten_bind_McObject_getViewDataJsonParam_0=h.asm.emscripten_bind_McObject_getViewDataJsonParam_0).apply(null,arguments)},Zc=h._emscripten_bind_McApp_McApp_0=function(){return(Zc=h._emscripten_bind_McApp_McApp_0=h.asm.emscripten_bind_McApp_McApp_0).apply(null,arguments)},$c=h._emscripten_bind_McApp_Init_0=function(){return($c=h._emscripten_bind_McApp_Init_0=h.asm.emscripten_bind_McApp_Init_0).apply(null,arguments)},ad=h._emscripten_bind_McApp_CreateMxDraw_5=function(){return(ad=h._emscripten_bind_McApp_CreateMxDraw_5=h.asm.emscripten_bind_McApp_CreateMxDraw_5).apply(null,arguments)},bd=h._emscripten_bind_McApp___destroy___0=function(){return(bd=h._emscripten_bind_McApp___destroy___0=h.asm.emscripten_bind_McApp___destroy___0).apply(null,arguments)},cc=h._malloc=function(){return(cc=h._malloc=h.asm.malloc).apply(null,arguments)},dc=h._free=function(){return(dc=h._free=h.asm.free).apply(null,arguments)},Xb=h._strlen=function(){return(Xb=h._strlen=h.asm.strlen).apply(null,arguments)},Rc=h.___errno_location=function(){return(Rc=h.___errno_location=h.asm.__errno_location).apply(null,arguments)};h.stackSave=function(){return(h.stackSave=h.asm.stackSave).apply(null,arguments)},h.stackRestore=function(){return(h.stackRestore=h.asm.stackRestore).apply(null,arguments)},h.stackAlloc=function(){return(h.stackAlloc=h.asm.stackAlloc).apply(null,arguments)},h.dynCall_iijj=function(){return(h.dynCall_iijj=h.asm.dynCall_iijj).apply(null,arguments)},h.dynCall_iij=function(){return(h.dynCall_iij=h.asm.dynCall_iij).apply(null,arguments)},h.dynCall_iiiiiji=function(){return(h.dynCall_iiiiiji=h.asm.dynCall_iiiiiji).apply(null,arguments)},h.dynCall_iiji=function(){return(h.dynCall_iiji=h.asm.dynCall_iiji).apply(null,arguments)},h.dynCall_iiiiiijji=function(){return(h.dynCall_iiiiiijji=h.asm.dynCall_iiiiiijji).apply(null,arguments)},h.dynCall_ji=function(){return(h.dynCall_ji=h.asm.dynCall_ji).apply(null,arguments)},h.dynCall_vij=function(){return(h.dynCall_vij=h.asm.dynCall_vij).apply(null,arguments)},h.dynCall_iiij=function(){return(h.dynCall_iiij=h.asm.dynCall_iiij).apply(null,arguments)},h.dynCall_iiiiij=function(){return(h.dynCall_iiiiij=h.asm.dynCall_iiiiij).apply(null,arguments)},h.dynCall_iiijjiddddddii=function(){return(h.dynCall_iiijjiddddddii=h.asm.dynCall_iiijjiddddddii).apply(null,arguments)},h.dynCall_iiiiddddiiiiiijjiiiiii=function(){return(h.dynCall_iiiiddddiiiiiijjiiiiii=h.asm.dynCall_iiiiddddiiiiiijjiiiiii).apply(null,arguments)},h.dynCall_viij=function(){return(h.dynCall_viij=h.asm.dynCall_viij).apply(null,arguments)},h.dynCall_jiji=function(){return(h.dynCall_jiji=h.asm.dynCall_jiji).apply(null,arguments)},h.dynCall_viijii=function(){return(h.dynCall_viijii=h.asm.dynCall_viijii).apply(null,arguments)},h.dynCall_iiiiijj=function(){return(h.dynCall_iiiiijj=h.asm.dynCall_iiiiijj).apply(null,arguments)},h.dynCall_iiiiiijj=function(){return(h.dynCall_iiiiiijj=h.asm.dynCall_iiiiiijj).apply(null,arguments)};var cd;Ja=function e(){cd||ed(),cd||(Ja=e)};function ed(){function e(){if(!cd&&(cd=!0,h.calledRun=!0,!ta)){if(h.noFSInit||Mb||(Mb=!0,Lb(),h.stdin=h.stdin,h.stdout=h.stdout,h.stderr=h.stderr,h.stdin?Pb("stdin",h.stdin):Gb("/dev/tty","/dev/stdin"),h.stdout?Pb("stdout",null,h.stdout):Gb("/dev/tty","/dev/stdout"),h.stderr?Pb("stderr",null,h.stderr):Gb("/dev/tty1","/dev/stderr"),Jb("/dev/stdin",0),Jb("/dev/stdout",1),Jb("/dev/stderr",1)),qb=!1,Sa(Ea),aa(h),h.onRuntimeInitialized&&h.onRuntimeInitialized(),h.postRun)for(typeof h.postRun=="function"&&(h.postRun=[h.postRun]);h.postRun.length;){var t=h.postRun.shift();Fa.unshift(t)}Sa(Fa)}}if(!(0<Ha)){if(h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)Ga();Sa(Da),0<Ha||(h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},1),e()},1)):e())}}if(h.run=ed,h.preInit)for(typeof h.preInit=="function"&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.preInit.pop()();ed();function X(){}X.prototype=Object.create(X.prototype),X.prototype.constructor=X,X.prototype.K=X,X.O={},h.WrapperObject=X;function fd(e){return(e||X).O}h.getCache=fd;function gd(e,t){var r=fd(t),i=r[e];return i||(i=Object.create((t||X).prototype),i.j=e,r[e]=i)}h.wrapPointer=gd,h.castObject=function(e,t){return gd(e.j,t)},h.NULL=gd(0),h.destroy=function(e){if(!e.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";e.__destroy__(),delete fd(e.K)[e.j]},h.compare=function(e,t){return e.j===t.j},h.getPointer=function(e){return e.j},h.getClass=function(e){return e.K};var hd=0,jd=0,kd=0,ld=[],md=0;function nd(){if(md){for(var e=0;e<ld.length;e++)h._free(ld[e]);ld.length=0,h._free(hd),hd=0,jd+=md,md=0}hd||(jd+=128,(hd=h._malloc(jd))||u(void 0)),kd=0}function od(e,t){return hd||u(void 0),e=e.length*t.BYTES_PER_ELEMENT,e=e+7&-8,kd+e>=jd?(0<e||u(void 0),md+=e,t=h._malloc(e),ld.push(t)):(t=hd+kd,kd+=e),t}function pd(e,t,r){switch(r>>>=0,t.BYTES_PER_ELEMENT){case 2:r>>>=1;break;case 4:r>>>=2;break;case 8:r>>>=3}for(var i=0;i<e.length;i++)t[r+i]=e[i]}function qd(e){if(typeof e=="string"){e=eb(e);var t=od(e,F);return pd(e,F,t),t}return e}function rd(e){if(typeof e=="object"){var t=od(e,za);return pd(e,za,t),t}return e}function td(){throw"cannot construct a VoidPtr, no constructor in IDL"}td.prototype=Object.create(X.prototype),td.prototype.constructor=td,td.prototype.K=td,td.O={},h.VoidPtr=td,td.prototype.__destroy__=function(){Tc(this.j)};function Y(){throw"cannot construct a McObject, no constructor in IDL"}Y.prototype=Object.create(X.prototype),Y.prototype.constructor=Y,Y.prototype.K=Y,Y.O={},h.McObject=Y,Y.prototype.updateDisplay=function(e,t){var r=this.j;return nd(),typeof e=="object"&&(e=rd(e)),typeof t=="object"&&(t=rd(t)),!!Uc(r,e,t)},Y.prototype.test=Y.prototype.test=function(){Vc(this.j)},Y.prototype.openWebFile=function(e){var t=this.j;return nd(),e=e&&typeof e=="object"?e.j:qd(e),!!Wc(t,e)},Y.prototype.setSize=function(e,t){var r=this.j;e&&typeof e=="object"&&(e=e.j),t&&typeof t=="object"&&(t=t.j),Xc(r,e,t)},Y.prototype.getViewDataJsonParam=function(){return y(Yc(this.j))};function Z(){this.j=Zc(),fd(Z)[this.j]=this}return Z.prototype=Object.create(X.prototype),Z.prototype.constructor=Z,Z.prototype.K=Z,Z.O={},h.McApp=Z,Z.prototype.Init=function(){$c(this.j)},Z.prototype.CreateMxDraw=function(e,t,r,i,o){var s=this.j;return nd(),e&&typeof e=="object"&&(e=e.j),t&&typeof t=="object"&&(t=t.j),r=r&&typeof r=="object"?r.j:qd(r),i&&typeof i=="object"&&(i=i.j),o&&typeof o=="object"&&(o=o.j),gd(ad(s,e,t,r,i,o),Y)},Z.prototype.__destroy__=function(){bd(this.j)},mxdrawassembly.ready}})();typeof exports=="object"&&typeof module=="object"?module.exports=mxdrawassembly:typeof define=="function"&&define.amd?define([],function(){return mxdrawassembly}):typeof exports=="object"&&(exports.mxdrawassembly=mxdrawassembly);const getWasmURL=(e,t)=>new URL(e,t||self.location.href).toString();exports.MxCpp=void 0;function loadMxdrawassembly(e,t=getWasmURL){mxdrawassembly({locateFile:t}).then(r=>{let i=new r.McApp;i.Init(),exports.MxCpp=r,exports.MxCpp.McApp=i,e(exports.MxCpp)})}const _export=Object.freeze(Object.defineProperty({__proto__:null,get MxCpp(){return exports.MxCpp},loadMxdrawassembly,fetchAndInstantiate,b64Encode,b64Decode,setMcDbEntity,MxTools,drawText,drawCircle,drawLine,drawMText,drawPolyLine,drawPolygon,drawArc,drawEllipticalArc},Symbol.toStringTag,{value:"Module"}));exports.MxTools=MxTools,exports.b64Decode=b64Decode,exports.b64Encode=b64Encode,exports.default=_export,exports.drawArc=drawArc,exports.drawCircle=drawCircle,exports.drawEllipticalArc=drawEllipticalArc,exports.drawLine=drawLine,exports.drawMText=drawMText,exports.drawPolyLine=drawPolyLine,exports.drawPolygon=drawPolygon,exports.drawText=drawText,exports.fetchAndInstantiate=fetchAndInstantiate,exports.loadMxdrawassembly=loadMxdrawassembly,exports.setMcDbEntity=setMcDbEntity,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
52
|
+
`:"")+Zb(e)),e&1?e&4?console.error(t):e&2?console.warn(t):e&512?console.info(t):e&256?console.debug(t):console.log(t):e&6?n(t):oa(t)},emscripten_memcpy_big:function(e,t,r){z.copyWithin(e,t,t+r)},emscripten_resize_heap:function(e){var t=z.length;if(e>>>=0,2147483648<e)return!1;for(var r=1;4>=r;r*=2){var i=t*(1+.2/r);i=Math.min(i,e+100663296);var o=Math;i=Math.max(e,i),o=o.min.call(o,2147483648,i+(65536-i%65536)%65536);e:{try{sa.grow(o-wa.byteLength+65535>>>16),Aa();var s=1;break e}catch{}s=void 0}if(s)return!0}return!1},emscripten_run_script:function(a){eval(y(a))},emscripten_start_fetch:function(e,t,r,i,o){var s=e+112,c=y(s),f=J[s+36>>2],p=J[s+40>>2],d=J[s+44>>2],g=J[s+48>>2],M=J[s+52>>2],A=!!(M&4),l=!!(M&32),_=!!(M&16),v=!!(M&64),b=C=>{ec(()=>{f?Ta(f)(C):t&&t(C)},v)},w=C=>{ec(()=>{d?Ta(d)(C):i&&i(C)},v)},D=C=>{ec(()=>{p?Ta(p)(C):r&&r(C)},v)},x=C=>{ec(()=>{g?Ta(g)(C):o&&o(C)},v)};M=C=>{bc(C,b,D,w,x)};var j=(C,k)=>{fc(C,k.response,I=>{ec(()=>{f?Ta(f)(I):t&&t(I)},v)},I=>{ec(()=>{f?Ta(f)(I):t&&t(I)},v)})},B=C=>{bc(C,j,D,w,x)};if(c==="EM_IDB_STORE")c=J[s+84>>2],fc(e,z.slice(c,c+J[s+88>>2]),b,D);else if(c==="EM_IDB_DELETE")hc(e,b,D);else if(_){if(l)return 0;bc(e,A?j:b,D,w,x)}else gc(e,b,l?D:A?B:M);return e},emscripten_webgl_create_context:function(e,t){return t>>=2,t={alpha:!!H[t+0],depth:!!H[t+1],stencil:!!H[t+2],antialias:!!H[t+3],premultipliedAlpha:!!H[t+4],preserveDrawingBuffer:!!H[t+5],powerPreference:Ac[H[t+6]],failIfMajorPerformanceCaveat:!!H[t+7],ta:H[t+8],bb:H[t+9],oa:H[t+10],Ia:H[t+11],gb:H[t+12],hb:H[t+13]},e=2<e?y(e):e,e=Bc[e]||(typeof document<"u"?document.querySelector(e):void 0),!e||t.Ia?0:uc(e,t)},emscripten_webgl_destroy_context:function(e){if(V==e&&(V=0),V===oc[e]&&(V=null),typeof zc=="object"){for(var t=oc[e].F.canvas,r=0;r<yc.length;++r)if(yc[r].target==t){var i=r--,o=yc[i];o.target.removeEventListener(o.Xa,o.Wa,o.kb),yc.splice(i,1)}}oc[e]&&oc[e].F.canvas&&(oc[e].F.canvas.Ea=void 0),oc[e]=null},emscripten_webgl_make_context_current:function(e){return V=oc[e],h.Ua=W=V&&V.F,!e||W?0:-5},environ_get:function(e,t){var r=0;return Dc().forEach(function(i,o){var s=t+r;for(o=H[e+4*o>>2]=s,s=0;s<i.length;++s)F[o++>>0]=i.charCodeAt(s);F[o>>0]=0,r+=i.length+1}),0},environ_sizes_get:function(e,t){var r=Dc();H[e>>2]=r.length;var i=0;return r.forEach(function(o){i+=o.length+1}),H[t>>2]=i,0},fd_close:function(e){try{var t=Tb(e);if(t.fd===null)throw new N(8);t.ba&&(t.ba=null);try{t.i.close&&t.i.close(t)}catch(r){throw r}finally{nb[t.fd]=null}return t.fd=null,0}catch(r){if(typeof R>"u"||!(r instanceof N))throw r;return r.m}},fd_read:function(e,t,r,i){try{e:{for(var o=Tb(e),s=e=0;s<r;s++){var c=H[t+(8*s+4)>>2],f=o,p=H[t+8*s>>2],d=c,g=void 0,M=F;if(0>d||0>g)throw new N(28);if(f.fd===null)throw new N(8);if((f.flags&2097155)===1)throw new N(8);if((f.node.mode&61440)===16384)throw new N(31);if(!f.i.read)throw new N(28);var A=typeof g<"u";if(!A)g=f.position;else if(!f.seekable)throw new N(70);var l=f.i.read(f,M,p,d,g);A||(f.position+=l);var _=l;if(0>_){var v=-1;break e}if(e+=_,_<c)break}v=e}return H[i>>2]=v,0}catch(b){if(typeof R>"u"||!(b instanceof N))throw b;return b.m}},fd_seek:function(e,t,r,i,o){try{var s=Tb(e);return e=4294967296*r+(t>>>0),-9007199254740992>=e||9007199254740992<=e?-61:(Kb(s,e,i),Ra=[s.position>>>0,(Qa=s.position,1<=+Math.abs(Qa)?0<Qa?(Math.min(+Math.floor(Qa/4294967296),4294967295)|0)>>>0:~~+Math.ceil((Qa-+(~~Qa>>>0))/4294967296)>>>0:0)],H[o>>2]=Ra[0],H[o+4>>2]=Ra[1],s.ba&&e===0&&i===0&&(s.ba=null),0)}catch(c){if(typeof R>"u"||!(c instanceof N))throw c;return c.m}},fd_write:function(e,t,r,i){try{e:{for(var o=Tb(e),s=e=0;s<r;s++){var c=o,f=H[t+8*s>>2],p=H[t+(8*s+4)>>2],d=void 0,g=F;if(0>p||0>d)throw new N(28);if(c.fd===null)throw new N(8);if((c.flags&2097155)===0)throw new N(8);if((c.node.mode&61440)===16384)throw new N(31);if(!c.i.write)throw new N(28);c.seekable&&c.flags&1024&&Kb(c,0,2);var M=typeof d<"u";if(!M)d=c.position;else if(!c.seekable)throw new N(70);var A=c.i.write(c,g,f,p,d,void 0);M||(c.position+=A);var l=A;if(0>l){var _=-1;break e}e+=l}_=e}return H[i>>2]=_,0}catch(v){if(typeof R>"u"||!(v instanceof N))throw v;return v.m}},getentropy:Fc,glAttachShader:function(e,t){W.attachShader(T[e],U[t])},glBindAttribLocation:function(e,t,r){W.bindAttribLocation(T[e],t,y(r))},glBindBuffer:function(e,t){e==34962?W.R=t:e==34963&&(W.L=t),e==35051?W.la=t:e==35052&&(W.ma=t),W.bindBuffer(e,mc[t])},glBindVertexArray:function(e){W.bindVertexArray(nc[e]),e=W.getParameter(34965),W.L=e?e.name|0:0},glBufferData:function(e,t,r,i){2<=V.version?r?W.bufferData(e,z,i,r,t):W.bufferData(e,t,i):W.bufferData(e,r?z.subarray(r,r+t):t,i)},glClear:function(e){W.clear(e)},glClearColor:function(e,t,r,i){W.clearColor(e,t,r,i)},glCompileShader:function(e){W.compileShader(U[e])},glCreateProgram:function(){var e=sc(T),t=W.createProgram();return t.name=e,t.U=t.S=t.T=0,t.ia=1,T[e]=t,e},glCreateShader:function(e){var t=sc(U);return U[t]=W.createShader(e),t},glDeleteBuffers:function(e,t){for(var r=0;r<e;r++){var i=H[t+4*r>>2],o=mc[i];o&&(W.deleteBuffer(o),o.name=0,mc[i]=null,i==W.R&&(W.R=0),i==W.L&&(W.L=0),i==W.la&&(W.la=0),i==W.ma&&(W.ma=0))}},glDeleteProgram:function(e){if(e){var t=T[e];t?(W.deleteProgram(t),t.name=0,T[e]=null):qc(1281)}},glDeleteShader:function(e){if(e){var t=U[e];t?(W.deleteShader(t),U[e]=null):qc(1281)}},glDeleteVertexArrays:function(e,t){for(var r=0;r<e;r++){var i=H[t+4*r>>2];W.deleteVertexArray(nc[i]),nc[i]=null}},glDrawElements:function(e,t,r,i){if(!W.L){var o=1*pc[r-5120]*t,s=tc(o),c=V.J[s];c?s=c:(c=W.getParameter(34965),V.J[s]=W.createBuffer(),W.bindBuffer(34963,V.J[s]),W.bufferData(34963,1<<s,35048),W.bindBuffer(34963,c),s=V.J[s]),W.bindBuffer(34963,s),W.bufferSubData(34963,0,z.subarray(i,i+o)),i=0}for(xc=!1,o=0;o<V.ua;++o)if(s=V.P[o],s.$&&s.enabled){xc=!0,c=s.fa,c=0<c?t*c:s.size*pc[s.type-5120]*t;var f=tc(c),p=V.W[f],d=V.M[f];V.M[f]=V.M[f]+1&63;var g=p[d];g?f=g:(g=W.getParameter(34964),p[d]=W.createBuffer(),W.bindBuffer(34962,p[d]),W.bufferData(34962,1<<f,35048),W.bindBuffer(34962,g),f=p[d]),W.bindBuffer(34962,f),W.bufferSubData(34962,0,z.subarray(s.j,s.j+c)),s.Da.call(W,o,s.size,s.type,s.ya,s.fa,0)}W.drawElements(e,t,r,i),xc&&W.bindBuffer(34962,mc[W.R]),W.L||W.bindBuffer(34963,null)},glDrawElementsInstanced:function(e,t,r,i,o){W.drawElementsInstanced(e,t,r,i,o)},glEnable:function(e){W.enable(e)},glEnableVertexAttribArray:function(e){V.P[e].enabled=!0,W.enableVertexAttribArray(e)},glGenBuffers:function(e,t){Gc(e,t,"createBuffer",mc)},glGenVertexArrays:function(e,t){Gc(e,t,"createVertexArray",nc)},glGetActiveAttrib:function(e,t,r,i,o,s,c){Hc("getActiveAttrib",e,t,r,i,o,s,c)},glGetActiveUniform:function(e,t,r,i,o,s,c){Hc("getActiveUniform",e,t,r,i,o,s,c)},glGetAttribLocation:function(e,t){return W.getAttribLocation(T[e],y(t))},glGetError:function(){var e=W.getError()||rc;return rc=0,e},glGetProgramInfoLog:function(e,t,r,i){e=W.getProgramInfoLog(T[e]),e===null&&(e="(unknown error)"),t=0<t&&i?E(e,z,i,t):0,r&&(H[r>>2]=t)},glGetProgramiv:function(e,t,r){if(r)if(e>=lc)qc(1281);else if(e=T[e],t==35716)e=W.getProgramInfoLog(e),e===null&&(e="(unknown error)"),H[r>>2]=e.length+1;else if(t==35719){if(!e.U)for(t=0;t<W.getProgramParameter(e,35718);++t)e.U=Math.max(e.U,W.getActiveUniform(e,t).name.length+1);H[r>>2]=e.U}else if(t==35722){if(!e.S)for(t=0;t<W.getProgramParameter(e,35721);++t)e.S=Math.max(e.S,W.getActiveAttrib(e,t).name.length+1);H[r>>2]=e.S}else if(t==35381){if(!e.T)for(t=0;t<W.getProgramParameter(e,35382);++t)e.T=Math.max(e.T,W.getActiveUniformBlockName(e,t).length+1);H[r>>2]=e.T}else H[r>>2]=W.getProgramParameter(e,t);else qc(1281)},glGetShaderInfoLog:function(e,t,r,i){e=W.getShaderInfoLog(U[e]),e===null&&(e="(unknown error)"),t=0<t&&i?E(e,z,i,t):0,r&&(H[r>>2]=t)},glGetShaderiv:function(e,t,r){r?t==35716?(e=W.getShaderInfoLog(U[e]),e===null&&(e="(unknown error)"),H[r>>2]=e?e.length+1:0):t==35720?(e=W.getShaderSource(U[e]),H[r>>2]=e?e.length+1:0):H[r>>2]=W.getShaderParameter(U[e],t):qc(1281)},glGetUniformLocation:function(e,t){if(t=y(t),e=T[e]){var r=e,i=r.N,o=r.Ca,s;if(!i)for(r.N=i={},r.Ba={},s=0;s<W.getProgramParameter(r,35718);++s){var c=W.getActiveUniform(r,s),f=c.name;c=c.size;var p=Ic(f);p=0<p?f.slice(0,p):f;var d=r.ia;for(r.ia+=c,o[p]=[c,d],f=0;f<c;++f)i[d]=f,r.Ba[d++]=p}if(r=e.N,i=0,o=t,s=Ic(t),0<s&&(i=parseInt(t.slice(s+1))>>>0,o=t.slice(0,s)),(o=e.Ca[o])&&i<o[0]&&(i+=o[1],r[i]=r[i]||W.getUniformLocation(e,t)))return i}else qc(1281);return-1},glLineWidth:function(e){W.lineWidth(e)},glLinkProgram:function(e){e=T[e],W.linkProgram(e),e.N=0,e.Ca={}},glShaderSource:function(e,t,r,i){for(var o="",s=0;s<t;++s){var c=i?H[i+4*s>>2]:-1;o+=y(H[r+4*s>>2],0>c?void 0:c)}W.shaderSource(U[e],o)},glUniform1i:function(e,t){W.uniform1i(Jc(e),t)},glUniform4f:function(e,t,r,i,o){W.uniform4f(Jc(e),t,r,i,o)},glUniform4fv:function(e,t,r){if(2<=V.version)W.uniform4fv(Jc(e),ya,r>>2,4*t);else{if(72>=t){var i=Kc[4*t-1],o=ya;r>>=2;for(var s=0;s<4*t;s+=4){var c=r+s;i[s]=o[c],i[s+1]=o[c+1],i[s+2]=o[c+2],i[s+3]=o[c+3]}}else i=ya.subarray(r>>2,r+16*t>>2);W.uniform4fv(Jc(e),i)}},glUniformMatrix4fv:function(e,t,r,i){if(2<=V.version)W.uniformMatrix4fv(Jc(e),!!r,ya,i>>2,16*t);else{if(18>=t){var o=Kc[16*t-1],s=ya;i>>=2;for(var c=0;c<16*t;c+=16){var f=i+c;o[c]=s[f],o[c+1]=s[f+1],o[c+2]=s[f+2],o[c+3]=s[f+3],o[c+4]=s[f+4],o[c+5]=s[f+5],o[c+6]=s[f+6],o[c+7]=s[f+7],o[c+8]=s[f+8],o[c+9]=s[f+9],o[c+10]=s[f+10],o[c+11]=s[f+11],o[c+12]=s[f+12],o[c+13]=s[f+13],o[c+14]=s[f+14],o[c+15]=s[f+15]}}else o=ya.subarray(i>>2,i+64*t>>2);W.uniformMatrix4fv(Jc(e),!!r,o)}},glUseProgram:function(e){e=T[e],W.useProgram(e),W.Ha=e},glValidateProgram:function(e){W.validateProgram(T[e])},glVertexAttribDivisor:function(e,t){W.vertexAttribDivisor(e,t)},glVertexAttribPointer:function(e,t,r,i,o,s){var c=V.P[e];W.R?(c.$=!1,W.vertexAttribPointer(e,t,r,!!i,o,s)):(c.size=t,c.type=r,c.ya=i,c.fa=o,c.j=s,c.$=!0,c.Da=function(f,p,d,g,M,A){this.vertexAttribPointer(f,p,d,g,M,A)})},setTempRet0:function(){},strftime_l:function(e,t,r,i){return Oc(e,t,r,i)}};(function(){function e(o){h.asm=o.exports,sa=h.asm.memory,Aa(),Ca=h.asm.__indirect_function_table,Ea.unshift(h.asm.__wasm_call_ctors),La()}function t(o){e(o.instance)}function r(o){return Pa().then(function(s){return WebAssembly.instantiate(s,i)}).then(function(s){return s}).then(o,function(s){n("failed to asynchronously prepare wasm: "+s),u(s)})}var i={env:Sc,wasi_snapshot_preview1:Sc};if(Ka(),h.instantiateWasm)try{return h.instantiateWasm(i,e)}catch(o){return n("Module.instantiateWasm callback failed with error: "+o),!1}return function(){return ra||typeof WebAssembly.instantiateStreaming!="function"||Ma()||L.startsWith("file://")||typeof fetch!="function"?r(t):fetch(L,{credentials:"same-origin"}).then(function(o){return WebAssembly.instantiateStreaming(o,i).then(t,function(s){return n("wasm streaming compile failed: "+s),n("falling back to ArrayBuffer instantiation"),r(t)})})}().catch(ba),{}})(),h.___wasm_call_ctors=function(){return(h.___wasm_call_ctors=h.asm.__wasm_call_ctors).apply(null,arguments)};var Tc=h._emscripten_bind_VoidPtr___destroy___0=function(){return(Tc=h._emscripten_bind_VoidPtr___destroy___0=h.asm.emscripten_bind_VoidPtr___destroy___0).apply(null,arguments)},Uc=h._emscripten_bind_McObject_updateDisplay_2=function(){return(Uc=h._emscripten_bind_McObject_updateDisplay_2=h.asm.emscripten_bind_McObject_updateDisplay_2).apply(null,arguments)},Vc=h._emscripten_bind_McObject_test_0=function(){return(Vc=h._emscripten_bind_McObject_test_0=h.asm.emscripten_bind_McObject_test_0).apply(null,arguments)},Wc=h._emscripten_bind_McObject_openWebFile_1=function(){return(Wc=h._emscripten_bind_McObject_openWebFile_1=h.asm.emscripten_bind_McObject_openWebFile_1).apply(null,arguments)},Xc=h._emscripten_bind_McObject_setSize_2=function(){return(Xc=h._emscripten_bind_McObject_setSize_2=h.asm.emscripten_bind_McObject_setSize_2).apply(null,arguments)},Yc=h._emscripten_bind_McObject_getViewDataJsonParam_0=function(){return(Yc=h._emscripten_bind_McObject_getViewDataJsonParam_0=h.asm.emscripten_bind_McObject_getViewDataJsonParam_0).apply(null,arguments)},Zc=h._emscripten_bind_McApp_McApp_0=function(){return(Zc=h._emscripten_bind_McApp_McApp_0=h.asm.emscripten_bind_McApp_McApp_0).apply(null,arguments)},$c=h._emscripten_bind_McApp_Init_0=function(){return($c=h._emscripten_bind_McApp_Init_0=h.asm.emscripten_bind_McApp_Init_0).apply(null,arguments)},ad=h._emscripten_bind_McApp_CreateMxDraw_5=function(){return(ad=h._emscripten_bind_McApp_CreateMxDraw_5=h.asm.emscripten_bind_McApp_CreateMxDraw_5).apply(null,arguments)},bd=h._emscripten_bind_McApp___destroy___0=function(){return(bd=h._emscripten_bind_McApp___destroy___0=h.asm.emscripten_bind_McApp___destroy___0).apply(null,arguments)},cc=h._malloc=function(){return(cc=h._malloc=h.asm.malloc).apply(null,arguments)},dc=h._free=function(){return(dc=h._free=h.asm.free).apply(null,arguments)},Xb=h._strlen=function(){return(Xb=h._strlen=h.asm.strlen).apply(null,arguments)},Rc=h.___errno_location=function(){return(Rc=h.___errno_location=h.asm.__errno_location).apply(null,arguments)};h.stackSave=function(){return(h.stackSave=h.asm.stackSave).apply(null,arguments)},h.stackRestore=function(){return(h.stackRestore=h.asm.stackRestore).apply(null,arguments)},h.stackAlloc=function(){return(h.stackAlloc=h.asm.stackAlloc).apply(null,arguments)},h.dynCall_iijj=function(){return(h.dynCall_iijj=h.asm.dynCall_iijj).apply(null,arguments)},h.dynCall_iij=function(){return(h.dynCall_iij=h.asm.dynCall_iij).apply(null,arguments)},h.dynCall_iiiiiji=function(){return(h.dynCall_iiiiiji=h.asm.dynCall_iiiiiji).apply(null,arguments)},h.dynCall_iiji=function(){return(h.dynCall_iiji=h.asm.dynCall_iiji).apply(null,arguments)},h.dynCall_iiiiiijji=function(){return(h.dynCall_iiiiiijji=h.asm.dynCall_iiiiiijji).apply(null,arguments)},h.dynCall_ji=function(){return(h.dynCall_ji=h.asm.dynCall_ji).apply(null,arguments)},h.dynCall_vij=function(){return(h.dynCall_vij=h.asm.dynCall_vij).apply(null,arguments)},h.dynCall_iiij=function(){return(h.dynCall_iiij=h.asm.dynCall_iiij).apply(null,arguments)},h.dynCall_iiiiij=function(){return(h.dynCall_iiiiij=h.asm.dynCall_iiiiij).apply(null,arguments)},h.dynCall_iiijjiddddddii=function(){return(h.dynCall_iiijjiddddddii=h.asm.dynCall_iiijjiddddddii).apply(null,arguments)},h.dynCall_iiiiddddiiiiiijjiiiiii=function(){return(h.dynCall_iiiiddddiiiiiijjiiiiii=h.asm.dynCall_iiiiddddiiiiiijjiiiiii).apply(null,arguments)},h.dynCall_viij=function(){return(h.dynCall_viij=h.asm.dynCall_viij).apply(null,arguments)},h.dynCall_jiji=function(){return(h.dynCall_jiji=h.asm.dynCall_jiji).apply(null,arguments)},h.dynCall_viijii=function(){return(h.dynCall_viijii=h.asm.dynCall_viijii).apply(null,arguments)},h.dynCall_iiiiijj=function(){return(h.dynCall_iiiiijj=h.asm.dynCall_iiiiijj).apply(null,arguments)},h.dynCall_iiiiiijj=function(){return(h.dynCall_iiiiiijj=h.asm.dynCall_iiiiiijj).apply(null,arguments)};var cd;Ja=function e(){cd||ed(),cd||(Ja=e)};function ed(){function e(){if(!cd&&(cd=!0,h.calledRun=!0,!ta)){if(h.noFSInit||Mb||(Mb=!0,Lb(),h.stdin=h.stdin,h.stdout=h.stdout,h.stderr=h.stderr,h.stdin?Pb("stdin",h.stdin):Gb("/dev/tty","/dev/stdin"),h.stdout?Pb("stdout",null,h.stdout):Gb("/dev/tty","/dev/stdout"),h.stderr?Pb("stderr",null,h.stderr):Gb("/dev/tty1","/dev/stderr"),Jb("/dev/stdin",0),Jb("/dev/stdout",1),Jb("/dev/stderr",1)),qb=!1,Sa(Ea),aa(h),h.onRuntimeInitialized&&h.onRuntimeInitialized(),h.postRun)for(typeof h.postRun=="function"&&(h.postRun=[h.postRun]);h.postRun.length;){var t=h.postRun.shift();Fa.unshift(t)}Sa(Fa)}}if(!(0<Ha)){if(h.preRun)for(typeof h.preRun=="function"&&(h.preRun=[h.preRun]);h.preRun.length;)Ga();Sa(Da),0<Ha||(h.setStatus?(h.setStatus("Running..."),setTimeout(function(){setTimeout(function(){h.setStatus("")},1),e()},1)):e())}}if(h.run=ed,h.preInit)for(typeof h.preInit=="function"&&(h.preInit=[h.preInit]);0<h.preInit.length;)h.preInit.pop()();ed();function X(){}X.prototype=Object.create(X.prototype),X.prototype.constructor=X,X.prototype.K=X,X.O={},h.WrapperObject=X;function fd(e){return(e||X).O}h.getCache=fd;function gd(e,t){var r=fd(t),i=r[e];return i||(i=Object.create((t||X).prototype),i.j=e,r[e]=i)}h.wrapPointer=gd,h.castObject=function(e,t){return gd(e.j,t)},h.NULL=gd(0),h.destroy=function(e){if(!e.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";e.__destroy__(),delete fd(e.K)[e.j]},h.compare=function(e,t){return e.j===t.j},h.getPointer=function(e){return e.j},h.getClass=function(e){return e.K};var hd=0,jd=0,kd=0,ld=[],md=0;function nd(){if(md){for(var e=0;e<ld.length;e++)h._free(ld[e]);ld.length=0,h._free(hd),hd=0,jd+=md,md=0}hd||(jd+=128,(hd=h._malloc(jd))||u(void 0)),kd=0}function od(e,t){return hd||u(void 0),e=e.length*t.BYTES_PER_ELEMENT,e=e+7&-8,kd+e>=jd?(0<e||u(void 0),md+=e,t=h._malloc(e),ld.push(t)):(t=hd+kd,kd+=e),t}function pd(e,t,r){switch(r>>>=0,t.BYTES_PER_ELEMENT){case 2:r>>>=1;break;case 4:r>>>=2;break;case 8:r>>>=3}for(var i=0;i<e.length;i++)t[r+i]=e[i]}function qd(e){if(typeof e=="string"){e=eb(e);var t=od(e,F);return pd(e,F,t),t}return e}function rd(e){if(typeof e=="object"){var t=od(e,za);return pd(e,za,t),t}return e}function td(){throw"cannot construct a VoidPtr, no constructor in IDL"}td.prototype=Object.create(X.prototype),td.prototype.constructor=td,td.prototype.K=td,td.O={},h.VoidPtr=td,td.prototype.__destroy__=function(){Tc(this.j)};function Y(){throw"cannot construct a McObject, no constructor in IDL"}Y.prototype=Object.create(X.prototype),Y.prototype.constructor=Y,Y.prototype.K=Y,Y.O={},h.McObject=Y,Y.prototype.updateDisplay=function(e,t){var r=this.j;return nd(),typeof e=="object"&&(e=rd(e)),typeof t=="object"&&(t=rd(t)),!!Uc(r,e,t)},Y.prototype.test=Y.prototype.test=function(){Vc(this.j)},Y.prototype.openWebFile=function(e){var t=this.j;return nd(),e=e&&typeof e=="object"?e.j:qd(e),!!Wc(t,e)},Y.prototype.setSize=function(e,t){var r=this.j;e&&typeof e=="object"&&(e=e.j),t&&typeof t=="object"&&(t=t.j),Xc(r,e,t)},Y.prototype.getViewDataJsonParam=function(){return y(Yc(this.j))};function Z(){this.j=Zc(),fd(Z)[this.j]=this}return Z.prototype=Object.create(X.prototype),Z.prototype.constructor=Z,Z.prototype.K=Z,Z.O={},h.McApp=Z,Z.prototype.Init=function(){$c(this.j)},Z.prototype.CreateMxDraw=function(e,t,r,i,o){var s=this.j;return nd(),e&&typeof e=="object"&&(e=e.j),t&&typeof t=="object"&&(t=t.j),r=r&&typeof r=="object"?r.j:qd(r),i&&typeof i=="object"&&(i=i.j),o&&typeof o=="object"&&(o=o.j),gd(ad(s,e,t,r,i,o),Y)},Z.prototype.__destroy__=function(){bd(this.j)},mxdrawassembly.ready}})();typeof exports=="object"&&typeof module=="object"?module.exports=mxdrawassembly:typeof define=="function"&&define.amd?define([],function(){return mxdrawassembly}):typeof exports=="object"&&(exports.mxdrawassembly=mxdrawassembly);const getWasmURL=(e,t)=>new URL(e,t||self.location.href).toString();exports.MxCpp=void 0;function loadMxdrawassembly(e,t=getWasmURL){mxdrawassembly({locateFile:t}).then(r=>{let i=new r.McApp;i.Init(),exports.MxCpp=r,exports.MxCpp.McApp=i,e(exports.MxCpp)})}const _export=Object.freeze(Object.defineProperty({__proto__:null,get MxCpp(){return exports.MxCpp},loadMxdrawassembly,fetchAndInstantiate,b64Encode,b64Decode,setMcDbEntity,MxTools,drawText,drawCircle,drawLine,drawMText,drawPolyLine,drawPolygon,drawArc,drawEllipticalArc},Symbol.toStringTag,{value:"Module"}));exports.MxTools=MxTools,exports.b64Decode=b64Decode,exports.b64Encode=b64Encode,exports.default=_export,exports.drawArc=drawArc,exports.drawCircle=drawCircle,exports.drawEllipticalArc=drawEllipticalArc,exports.drawLine=drawLine,exports.drawMText=drawMText,exports.drawPolyLine=drawPolyLine,exports.drawPolygon=drawPolygon,exports.drawText=drawText,exports.fetchAndInstantiate=fetchAndInstantiate,exports.loadMxdrawassembly=loadMxdrawassembly,exports.setMcDbEntity=setMcDbEntity,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
Binary file
|
package/dist/test.mxweb
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mxcad",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"main": "./dist/mxcad.umd.js",
|
|
5
5
|
"module": "./dist/mxcad.es.js",
|
|
6
6
|
"typings": "dist/mxcad.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"mxdraw": "^0.1.
|
|
18
|
+
"mxdraw": "^0.1.136"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
21
|
"dev": "vite --host --force",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"inquirer": "8.0.0",
|
|
50
50
|
"jest": "^28.1.3",
|
|
51
51
|
"lint-staged": "^13.0.3",
|
|
52
|
-
"mxdraw": "^0.1.
|
|
52
|
+
"mxdraw": "^0.1.136",
|
|
53
53
|
"prettier": "^2.7.1",
|
|
54
54
|
"stylelint": "^14.11.0",
|
|
55
55
|
"stylelint-config-recommended": "^9.0.0",
|