1 2var createDotnetRuntime = (() => { 3 var _scriptDir = import.meta.url; 4 5 return ( 6async function(moduleArg = {}) { 7 8// include: shell.js 9// The Module object: Our interface to the outside world. We import 10// and export values on it. There are various ways Module can be used: 11// 1. Not defined. We create it here 12// 2. A function parameter, function(Module) { ..generated code.. } 13// 3. pre-run appended it, var Module = {}; ..generated code.. 14// 4. External script tag defines var Module. 15// We need to check if Module already exists (e.g. case 3 above). 16// Substitution will be replaced with actual code on later stage of the build, 17// this way Closure Compiler will not mangle it (e.g. case 4. above). 18// Note that if you want to run closure, and also to use Module 19// after the generated code, you will need to define var Module = {}; 20// before the code. Then that object will be used in the code, and you 21// can continue to use Module afterwards as well. 22var Module = moduleArg; 23 24// Set up the promise that indicates the Module is initialized 25var readyPromiseResolve, readyPromiseReject; 26Module['ready'] = new Promise((resolve, reject) => { 27 readyPromiseResolve = resolve; 28 readyPromiseReject = reject; 29}); 30 31// --pre-jses are emitted after the Module integration code, so that they can 32// refer to Module (if they choose; they can also define Module) 33// include: /home/azureagent/devops/_work/_tool/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.browser-wasm/10.0.12/runtimes/browser-wasm/native/src/es6/dotnet.es6.pre.js 34if (_nativeModuleLoaded) throw new Error("Native module already loaded"); 35_nativeModuleLoaded = true; 36createDotnetRuntime = Module = moduleArg(Module); 37// end include: /home/azureagent/devops/_work/_tool
vendor: 123,642 bytes, lines 37-3611
37/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.browser-wasm/10.0.12/runtimes/browser-wasm/native/src/es6/dotnet.es6.pre.js 38 39 40// Sometimes an existing Module object exists with properties 41// meant to overwrite the default module functionality. Here 42// we collect those properties and reapply _after_ we configure 43// the current environment's defaults to avoid having to be so 44// defensive during initialization. 45var moduleOverrides = Object.assign({}, Module); 46 47var arguments_ = []; 48var thisProgram = './this.program'; 49var quit_ = (status, toThrow) => { 50 throw toThrow; 51}; 52 53// Determine the runtime environment we are in. You can customize this by 54// setting the ENVIRONMENT setting at compile time (see settings.js). 55 56// Attempt to auto-detect the environment 57var ENVIRONMENT_IS_WEB = typeof window == 'object'; 58var ENVIRONMENT_IS_WORKER = typeof importScripts == 'function'; 59// N.b. Electron.js environment is simultaneously a NODE-environment, but 60// also a web environment. 61var ENVIRONMENT_IS_NODE = typeof process == 'object' && typeof process.versions == 'object' && typeof process.versions.node == 'string'; 62var ENVIRONMENT_IS_SHELL = !ENVIRONMENT_IS_WEB && !ENVIRONMENT_IS_NODE && !ENVIRONMENT_IS_WORKER; 63 64// `/` should be present at the end if `scriptDirectory` is not empty 65var scriptDirectory = ''; 66function locateFile(path) { 67 if (Module['locateFile']) { 68 return Module['locateFile'](path, scriptDirectory); 69 } 70 return scriptDirectory + path; 71} 72 73// Hooks that are implemented differently in different runtime environments. 74var read_, 75 readAsync, 76 readBinary; 77 78if (ENVIRONMENT_IS_NODE) { 79 80 // `require()` is no-op in an ESM module, use `createRequire()` to construct 81 // the require()` function. This is only necessary for multi-environment 82 // builds, `-sENVIRONMENT=node` emits a static import declaration instead. 83 // TODO: Swap all `require()`'s with `import()`'s? 84 const { createRequire } = await import('module'); 85 /** @suppress{duplicate} */ 86 var require = createRequire(import.meta.url); 87 // These modules will usually be used on Node.js. Load them eagerly to avoid 88 // the complexity of lazy-loading. 89 var fs = require('fs'); 90 var nodePath = require('path'); 91 92 if (ENVIRONMENT_IS_WORKER) { 93 scriptDirectory = nodePath.dirname(scriptDirectory) + '/'; 94 } else { 95 // EXPORT_ES6 + ENVIRONMENT_IS_NODE always requires use of import.meta.url, 96 // since there's no way getting the current absolute path of the module when 97 // support for that is not available. 98 scriptDirectory = require('url').fileURLToPath(new URL('./', import.meta.url)); // includes trailing slash 99 } 100 101// include: node_shell_read.js 102read_ = (filename, binary) => { 103 // We need to re-wrap `file://` strings to URLs. Normalizing isn't 104 // necessary in that case, the path should already be absolute. 105 filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename); 106 return fs.readFileSync(filename, binary ? undefined : 'utf8'); 107}; 108 109readBinary = (filename) => { 110 var ret = read_(filename, true); 111 if (!ret.buffer) { 112 ret = new Uint8Array(ret); 113 } 114 return ret; 115}; 116 117readAsync = (filename, onload, onerror, binary = true) => { 118 // See the comment in the `read_` function. 119 filename = isFileURI(filename) ? new URL(filename) : nodePath.normalize(filename); 120 fs.readFile(filename, binary ? undefined : 'utf8', (err, data) => { 121 if (err) onerror(err); 122 else onload(binary ? data.buffer : data); 123 }); 124}; 125// end include: node_shell_read.js 126 if (!Module['thisProgram'] && process.argv.length > 1) { 127 thisProgram = process.argv[1].replace(/\\/g, '/'); 128 } 129 130 arguments_ = process.argv.slice(2); 131 132 // MODULARIZE will export the module in the proper place outside, we don't need to export here 133 134 quit_ = (status, toThrow) => { 135 process.exitCode = status; 136 throw toThrow; 137 }; 138 139} else 140if (ENVIRONMENT_IS_SHELL) { 141 142 if (typeof read != 'undefined') { 143 read_ = read; 144 } 145 146 readBinary = (f) => { 147 if (typeof readbuffer == 'function') { 148 return new Uint8Array(readbuffer(f)); 149 } 150 let data = read(f, 'binary'); 151 assert(typeof data == 'object'); 152 return data; 153 }; 154 155 readAsync = (f, onload, onerror) => { 156 setTimeout(() => onload(readBinary(f))); 157 }; 158 159 if (typeof clearTimeout == 'undefined') { 160 globalThis.clearTimeout = (id) => {}; 161 } 162 163 if (typeof setTimeout == 'undefined') { 164 // spidermonkey lacks setTimeout but we use it above in readAsync. 165 globalThis.setTimeout = (f) => (typeof f == 'function') ? f() : abort(); 166 } 167 168 if (typeof scriptArgs != 'undefined') { 169 arguments_ = scriptArgs; 170 } else if (typeof arguments != 'undefined') { 171 arguments_ = arguments; 172 } 173 174 if (typeof quit == 'function') { 175 quit_ = (status, toThrow) => { 176 // Unlike node which has process.exitCode, d8 has no such mechanism. So we 177 // have no way to set the exit code and then let the program exit with 178 // that code when it naturally stops running (say, when all setTimeouts 179 // have completed). For that reason, we must call `quit` - the only way to 180 // set the exit code - but quit also halts immediately. To increase 181 // consistency with node (and the web) we schedule the actual quit call 182 // using a setTimeout to give the current stack and any exception handlers 183 // a chance to run. This enables features such as addOnPostRun (which 184 // expected to be able to run code after main returns). 185 setTimeout(() => { 186 if (!(toThrow instanceof ExitStatus)) { 187 let toLog = toThrow; 188 if (toThrow && typeof toThrow == 'object' && toThrow.stack) { 189 toLog = [toThrow, toThrow.stack]; 190 } 191 err(`exiting due to exception: ${toLog}`); 192 } 193 quit(status); 194 }); 195 throw toThrow; 196 }; 197 } 198 199 if (typeof print != 'undefined') { 200 // Prefer to use print/printErr where they exist, as they usually work better. 201 if (typeof console == 'undefined') console = /** @type{!Console} */({}); 202 console.log = /** @type{!function(this:Console, ...*): undefined} */ (print); 203 console.warn = console.error = /** @type{!function(this:Console, ...*): undefined} */ (typeof printErr != 'undefined' ? printErr : print); 204 } 205 206} else 207 208// Note that this includes Node.js workers when relevant (pthreads is enabled). 209// Node.js workers are detected as a combination of ENVIRONMENT_IS_WORKER and 210// ENVIRONMENT_IS_NODE. 211if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { 212 if (ENVIRONMENT_IS_WORKER) { // Check worker, not web, since window could be polyfilled 213 scriptDirectory = self.location.href; 214 } else if (typeof document != 'undefined' && document.currentScript) { // web 215 scriptDirectory = document.currentScript.src; 216 } 217 // When MODULARIZE, this JS may be executed later, after document.currentScript 218 // is gone, so we saved it, and we use it here instead of any other info. 219 if (_scriptDir) { 220 scriptDirectory = _scriptDir; 221 } 222 // blob urls look like blob:http://site.com/etc/etc and we cannot infer anything from them. 223 // otherwise, slice off the final part of the url to find the script directory. 224 // if scriptDirectory does not contain a slash, lastIndexOf will return -1, 225 // and scriptDirectory will correctly be replaced with an empty string. 226 // If scriptDirectory contains a query (starting with ?) or a fragment (starting with #), 227 // they are removed because they could contain a slash. 228 if (scriptDirectory.startsWith('blob:')) { 229 scriptDirectory = ''; 230 } else { 231 scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, '').lastIndexOf('/')+1); 232 } 233 234 // Differentiate the Web Worker from the Node Worker case, as reading must 235 // be done differently. 236 { 237// include: web_or_worker_shell_read.js 238read_ = (url) => { 239 var xhr = new XMLHttpRequest(); 240 xhr.open('GET', url, false); 241 xhr.send(null); 242 return xhr.responseText; 243 } 244 245 if (ENVIRONMENT_IS_WORKER) { 246 readBinary = (url) => { 247 var xhr = new XMLHttpRequest(); 248 xhr.open('GET', url, false); 249 xhr.responseType = 'arraybuffer'; 250 xhr.send(null); 251 return new Uint8Array(/** @type{!ArrayBuffer} */(xhr.response)); 252 }; 253 } 254 255 readAsync = (url, onload, onerror) => { 256 var xhr = new XMLHttpRequest(); 257 xhr.open('GET', url, true); 258 xhr.responseType = 'arraybuffer'; 259 xhr.onload = () => { 260 if (xhr.status == 200 || (xhr.status == 0 && xhr.response)) { // file URLs can return 0 261 onload(xhr.response); 262 return; 263 } 264 onerror(); 265 }; 266 xhr.onerror = onerror; 267 xhr.send(null); 268 } 269 270// end include: web_or_worker_shell_read.js 271 } 272} else 273{ 274} 275 276var out = Module['print'] || console.log.bind(console); 277var err = Module['printErr'] || console.error.bind(console); 278 279// Merge back in the overrides 280Object.assign(Module, moduleOverrides); 281// Free the object hierarchy contained in the overrides, this lets the GC 282// reclaim data used. 283moduleOverrides = null; 284 285// Emit code to handle expected values on the Module object. This applies Module.x 286// to the proper local x. This has two benefits: first, we only emit it if it is 287// expected to arrive, and second, by using a local everywhere else that can be 288// minified. 289 290if (Module['arguments']) arguments_ = Module['arguments']; 291 292if (Module['thisProgram']) thisProgram = Module['thisProgram']; 293 294if (Module['quit']) quit_ = Module['quit']; 295 296// perform assertions in shell.js after we set up out() and err(), as otherwise if an assertion fails it cannot print the message 297// end include: shell.js 298 299// include: preamble.js 300// === Preamble library stuff === 301 302// Documentation for the public APIs defined in this file must be updated in: 303// site/source/docs/api_reference/preamble.js.rst 304// A prebuilt local version of the documentation is available at: 305// site/build/text/docs/api_reference/preamble.js.txt 306// You can also build docs locally as HTML or other formats in site/ 307// An online HTML version (which may be of a different version of Emscripten) 308// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html 309 310var wasmBinary; 311if (Module['wasmBinary']) wasmBinary = Module['wasmBinary']; 312 313// include: base64Utils.js 314// include: polyfill/atob.js 315// Copied from https://github.com/strophe/strophejs/blob/e06d027/src/polyfills.js#L149 316 317// This code was written by Tyler Akins and has been placed in the 318// public domain. It would be nice if you left this header intact. 319// Base64 code from Tyler Akins -- http://rumkin.com 320 321if (typeof atob == 'undefined') { 322 if (typeof global != 'undefined' && typeof globalThis == 'undefined') { 323 globalThis = global; 324 } 325 326 /** 327 * Decodes a base64 string. 328 * @param {string} input The string to decode. 329 */ 330 globalThis.atob = function(input) { 331 var keyStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; 332 333 var output = ''; 334 var chr1, chr2, chr3; 335 var enc1, enc2, enc3, enc4; 336 var i = 0; 337 // remove all characters that are not A-Z, a-z, 0-9, +, /, or = 338 input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ''); 339 do { 340 enc1 = keyStr.indexOf(input.charAt(i++)); 341 enc2 = keyStr.indexOf(input.charAt(i++)); 342 enc3 = keyStr.indexOf(input.charAt(i++)); 343 enc4 = keyStr.indexOf(input.charAt(i++)); 344 345 chr1 = (enc1 << 2) | (enc2 >> 4); 346 chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); 347 chr3 = ((enc3 & 3) << 6) | enc4; 348 349 output = output + String.fromCharCode(chr1); 350 351 if (enc3 !== 64) { 352 output = output + String.fromCharCode(chr2); 353 } 354 if (enc4 !== 64) { 355 output = output + String.fromCharCode(chr3); 356 } 357 } while (i < input.length); 358 return output; 359 }; 360} 361// end include: polyfill/atob.js 362// Converts a string of base64 into a byte array (Uint8Array). 363function intArrayFromBase64(s) { 364 if (typeof ENVIRONMENT_IS_NODE != 'undefined' && ENVIRONMENT_IS_NODE) { 365 var buf = Buffer.from(s, 'base64'); 366 return new Uint8Array(buf.buffer, buf.byteOffset, buf.length); 367 } 368 369 var decoded = atob(s); 370 var bytes = new Uint8Array(decoded.length); 371 for (var i = 0 ; i < decoded.length ; ++i) { 372 bytes[i] = decoded.charCodeAt(i); 373 } 374 return bytes; 375} 376 377// If filename is a base64 data URI, parses and returns data (Buffer on node, 378// Uint8Array otherwise). If filename is not a base64 data URI, returns undefined. 379function tryParseAsDataURI(filename) { 380 if (!isDataURI(filename)) { 381 return; 382 } 383 384 return intArrayFromBase64(filename.slice(dataURIPrefix.length)); 385} 386// end include: base64Utils.js 387// Wasm globals 388 389var wasmMemory; 390 391//======================================== 392// Runtime essentials 393//======================================== 394 395// whether we are quitting the application. no code should run after this. 396// set in exit() and abort() 397var ABORT = false; 398 399// set by exit() and abort(). Passed to 'onExit' handler. 400// NOTE: This is also used as the process return code code in shell environments 401// but only when noExitRuntime is false. 402var EXITSTATUS; 403 404// In STRICT mode, we only define assert() when ASSERTIONS is set. i.e. we 405// don't define it at all in release modes. This matches the behaviour of 406// MINIMAL_RUNTIME. 407// TODO(sbc): Make this the default even without STRICT enabled. 408/** @type {function(*, string=)} */ 409function assert(condition, text) { 410 if (!condition) { 411 // This build was created without ASSERTIONS defined. `assert()` should not 412 // ever be called in this configuration but in case there are callers in 413 // the wild leave this simple abort() implementation here for now. 414 abort(text); 415 } 416} 417 418// Memory management 419 420var HEAP, 421/** @type {!Int8Array} */ 422 HEAP8, 423/** @type {!Uint8Array} */ 424 HEAPU8, 425/** @type {!Int16Array} */ 426 HEAP16, 427/** @type {!Uint16Array} */ 428 HEAPU16, 429/** @type {!Int32Array} */ 430 HEAP32, 431/** @type {!Uint32Array} */ 432 HEAPU32, 433/** @type {!Float32Array} */ 434 HEAPF32, 435/* BigInt64Array type is not correctly defined in closure 436/** not-@type {!BigInt64Array} */ 437 HEAP64, 438/* BigUInt64Array type is not correctly defined in closure 439/** not-t@type {!BigUint64Array} */ 440 HEAPU64, 441/** @type {!Float64Array} */ 442 HEAPF64; 443 444// include: runtime_shared.js 445function updateMemoryViews() { 446 var b = wasmMemory.buffer; 447 Module['HEAP8'] = HEAP8 = new Int8Array(b); 448 Module['HEAP16'] = HEAP16 = new Int16Array(b); 449 Module['HEAPU8'] = HEAPU8 = new Uint8Array(b); 450 Module['HEAPU16'] = HEAPU16 = new Uint16Array(b); 451 Module['HEAP32'] = HEAP32 = new Int32Array(b); 452 Module['HEAPU32'] = HEAPU32 = new Uint32Array(b); 453 Module['HEAPF32'] = HEAPF32 = new Float32Array(b); 454 Module['HEAPF64'] = HEAPF64 = new Float64Array(b); 455 Module['HEAP64'] = HEAP64 = new BigInt64Array(b); 456 Module['HEAPU64'] = HEAPU64 = new BigUint64Array(b); 457} 458// end include: runtime_shared.js 459// include: runtime_stack_check.js 460// end include: runtime_stack_check.js 461// include: runtime_assertions.js 462// end include: runtime_assertions.js 463var __ATPRERUN__ = []; // functions called before the runtime is initialized 464var __ATINIT__ = []; // functions called during startup 465var __ATEXIT__ = []; // functions called during shutdown 466var __ATPOSTRUN__ = []; // functions called after the main() is called 467 468var runtimeInitialized = false; 469 470var runtimeExited = false; 471 472function preRun() { 473 if (Module['preRun']) { 474 if (typeof Module['preRun'] == 'function') Module['preRun'] = [Module['preRun']]; 475 while (Module['preRun'].length) { 476 addOnPreRun(Module['preRun'].shift()); 477 } 478 } 479 callRuntimeCallbacks(__ATPRERUN__); 480} 481 482function initRuntime() { 483 runtimeInitialized = true; 484 485 486if (!Module['noFSInit'] && !FS.init.initialized) 487 FS.init(); 488FS.ignorePermissions = false; 489 490TTY.init(); 491 callRuntimeCallbacks(__ATINIT__); 492} 493 494function exitRuntime() { 495 ___funcs_on_exit(); // Native atexit() functions 496 callRuntimeCallbacks(__ATEXIT__); 497 FS.quit(); 498TTY.shutdown(); 499 runtimeExited = true; 500} 501 502function postRun() { 503 504 if (Module['postRun']) { 505 if (typeof Module['postRun'] == 'function') Module['postRun'] = [Module['postRun']]; 506 while (Module['postRun'].length) { 507 addOnPostRun(Module['postRun'].shift()); 508 } 509 } 510 511 callRuntimeCallbacks(__ATPOSTRUN__); 512} 513 514function addOnPreRun(cb) { 515 __ATPRERUN__.unshift(cb); 516} 517 518function addOnInit(cb) { 519 __ATINIT__.unshift(cb); 520} 521 522function addOnExit(cb) { 523 __ATEXIT__.unshift(cb); 524} 525 526function addOnPostRun(cb) { 527 __ATPOSTRUN__.unshift(cb); 528} 529 530// include: runtime_math.js 531// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul 532 533// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/fround 534 535// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32 536 537// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc 538 539// end include: runtime_math.js 540// A counter of dependencies for calling run(). If we need to 541// do asynchronous work before running, increment this and 542// decrement it. Incrementing must happen in a place like 543// Module.preRun (used by emcc to add file preloading). 544// Note that you can add dependencies in preRun, even though 545// it happens right before run - run will be postponed until 546// the dependencies are met. 547var runDependencies = 0; 548var runDependencyWatcher = null; 549var dependenciesFulfilled = null; // overridden to take different actions when all run dependencies are fulfilled 550 551function getUniqueRunDependency(id) { 552 return id; 553} 554 555function addRunDependency(id) { 556 runDependencies++; 557 558 Module['monitorRunDependencies']?.(runDependencies); 559 560} 561 562function removeRunDependency(id) { 563 runDependencies--; 564 565 Module['monitorRunDependencies']?.(runDependencies); 566 567 if (runDependencies == 0) { 568 if (runDependencyWatcher !== null) { 569 clearInterval(runDependencyWatcher); 570 runDependencyWatcher = null; 571 } 572 if (dependenciesFulfilled) { 573 var callback = dependenciesFulfilled; 574 dependenciesFulfilled = null; 575 callback(); // can add another dependenciesFulfilled 576 } 577 } 578} 579 580/** @param {string|number=} what */ 581function abort(what) { 582 Module['onAbort']?.(what); 583 584 what = 'Aborted(' + what + ')'; 585 // TODO(sbc): Should we remove printing and leave it up to whoever 586 // catches the exception? 587 err(what); 588 589 ABORT = true; 590 EXITSTATUS = 1; 591 592 what += '. Build with -sASSERTIONS for more info.'; 593 594 // Use a wasm runtime error, because a JS error might be seen as a foreign 595 // exception, which means we'd run destructors on it. We need the error to 596 // simply make the program stop. 597 // FIXME This approach does not work in Wasm EH because it currently does not assume 598 // all RuntimeErrors are from traps; it decides whether a RuntimeError is from 599 // a trap or not based on a hidden field within the object. So at the moment 600 // we don't have a way of throwing a wasm trap from JS. TODO Make a JS API that 601 // allows this in the wasm spec. 602 603 // Suppress closure compiler warning here. Closure compiler's builtin extern 604 // definition for WebAssembly.RuntimeError claims it takes no arguments even 605 // though it can. 606 // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure gets fixed. 607 // See above, in the meantime, we resort to wasm code for trapping. 608 // 609 // In case abort() is called before the module is initialized, wasmExports 610 // and its exported '__trap' function is not available, in which case we throw 611 // a RuntimeError. 612 // 613 // We trap instead of throwing RuntimeError to prevent infinite-looping in 614 // Wasm EH code (because RuntimeError is considered as a foreign exception and 615 // caught by 'catch_all'), but in case throwing RuntimeError is fine because 616 // the module has not even been instantiated, even less running. 617 if (runtimeInitialized) { 618 ___trap(); 619 } 620 /** @suppress {checkTypes} */ 621 var e = new WebAssembly.RuntimeError(what); 622 623 readyPromiseReject(e); 624 // Throw the error whether or not MODULARIZE is set because abort is used 625 // in code paths apart from instantiation where an exception is expected 626 // to be thrown when abort is called. 627 throw e; 628} 629 630// include: memoryprofiler.js 631// end include: memoryprofiler.js 632// include: URIUtils.js 633// Prefix of data URIs emitted by SINGLE_FILE and related options. 634var dataURIPrefix = 'data:application/octet-stream;base64,'; 635 636/** 637 * Indicates whether filename is a base64 data URI. 638 * @noinline 639 */ 640var isDataURI = (filename) => filename.startsWith(dataURIPrefix); 641 642/** 643 * Indicates whether filename is delivered via file protocol (as opposed to http/https) 644 * @noinline 645 */ 646var isFileURI = (filename) => filename.startsWith('file://'); 647// end include: URIUtils.js 648// include: runtime_exceptions.js 649// end include: runtime_exceptions.js 650var wasmBinaryFile; 651if (Module['locateFile']) { 652 wasmBinaryFile = 'dotnet.native.wasm'; 653 if (!isDataURI(wasmBinaryFile)) { 654 wasmBinaryFile = locateFile(wasmBinaryFile); 655 } 656} else { 657 if (ENVIRONMENT_IS_SHELL) 658 wasmBinaryFile = 'dotnet.native.wasm'; 659 else 660 // Use bundler-friendly `new URL(..., import.meta.url)` pattern; works in browsers too. 661 wasmBinaryFile = new URL('dotnet.native.wasm', import.meta.url).href; 662} 663 664function getBinarySync(file) { 665 if (file == wasmBinaryFile && wasmBinary) { 666 return new Uint8Array(wasmBinary); 667 } 668 if (readBinary) { 669 return readBinary(file); 670 } 671 throw 'both async and sync fetching of the wasm failed'; 672} 673 674function getBinaryPromise(binaryFile) { 675 // If we don't have the binary yet, try to load it asynchronously. 676 // Fetch has some additional restrictions over XHR, like it can't be used on a file:// url. 677 // See https://github.com/github/fetch/pull/92#issuecomment-140665932 678 // Cordova or Electron apps are typically loaded from a file:// url. 679 // So use fetch if it is available and the url is not a file, otherwise fall back to XHR. 680 if (!wasmBinary 681 && (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER)) { 682 if (typeof fetch == 'function' 683 && !isFileURI(binaryFile) 684 ) { 685 return fetch(binaryFile, { credentials: 'same-origin' }).then((response) => { 686 if (!response['ok']) { 687 throw `failed to load wasm binary file at '${binaryFile}'`; 688 } 689 return response['arrayBuffer'](); 690 }).catch(() => getBinarySync(binaryFile)); 691 } 692 else if (readAsync) { 693 // fetch is not available or url is file => try XHR (readAsync uses XHR internally) 694 return new Promise((resolve, reject) => { 695 readAsync(binaryFile, (response) => resolve(new Uint8Array(/** @type{!ArrayBuffer} */(response))), reject) 696 }); 697 } 698 } 699 700 // Otherwise, getBinarySync should be able to get it synchronously 701 return Promise.resolve().then(() => getBinarySync(binaryFile)); 702} 703 704function instantiateArrayBuffer(binaryFile, imports, receiver) { 705 return getBinaryPromise(binaryFile).then((binary) => { 706 return WebAssembly.instantiate(binary, imports); 707 }).then(receiver, (reason) => { 708 err(`failed to asynchronously prepare wasm: ${reason}`); 709 710 abort(reason); 711 }); 712} 713 714function instantiateAsync(binary, binaryFile, imports, callback) { 715 if (!binary && 716 typeof WebAssembly.instantiateStreaming == 'function' && 717 !isDataURI(binaryFile) && 718 // Don't use streaming for file:// delivered objects in a webview, fetch them synchronously. 719 !isFileURI(binaryFile) && 720 // Avoid instantiateStreaming() on Node.js environment for now, as while 721 // Node.js v18.1.0 implements it, it does not have a full fetch() 722 // implementation yet. 723 // 724 // Reference: 725 // https://github.com/emscripten-core/emscripten/pull/16917 726 !ENVIRONMENT_IS_NODE && 727 typeof fetch == 'function') { 728 return fetch(binaryFile, { credentials: 'same-origin' }).then((response) => { 729 // Suppress closure warning here since the upstream definition for 730 // instantiateStreaming only allows Promise<Repsponse> rather than 731 // an actual Response. 732 // TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure is fixed. 733 /** @suppress {checkTypes} */ 734 var result = WebAssembly.instantiateStreaming(response, imports); 735 736 return result.then( 737 callback, 738 function(reason) { 739 // We expect the most common failure cause to be a bad MIME type for the binary, 740 // in which case falling back to ArrayBuffer instantiation should work. 741 err(`wasm streaming compile failed: ${reason}`); 742 err('falling back to ArrayBuffer instantiation'); 743 return instantiateArrayBuffer(binaryFile, imports, callback); 744 }); 745 }); 746 } 747 return instantiateArrayBuffer(binaryFile, imports, callback); 748} 749 750// Create the wasm instance. 751// Receives the wasm imports, returns the exports. 752function createWasm() { 753 // prepare imports 754 var info = { 755 'env': wasmImports, 756 'wasi_snapshot_preview1': wasmImports, 757 }; 758 // Load the wasm module and create an instance of using native support in the JS engine. 759 // handle a generated wasm instance, receiving its exports and 760 // performing other necessary setup 761 /** @param {WebAssembly.Module=} module*/ 762 function receiveInstance(instance, module) { 763 wasmExports = instance.exports; 764 765 Module['wasmExports'] = wasmExports; 766 767 wasmMemory = wasmExports['memory']; 768 769 updateMemoryViews(); 770 771 wasmTable = wasmExports['__indirect_function_table']; 772 773 774 addOnInit(wasmExports['__wasm_call_ctors']); 775 776 removeRunDependency('wasm-instantiate'); 777 return wasmExports; 778 } 779 // wait for the pthread pool (if any) 780 addRunDependency('wasm-instantiate'); 781 782 // Prefer streaming instantiation if available. 783 function receiveInstantiationResult(result) { 784 // 'result' is a ResultObject object which has both the module and instance. 785 // receiveInstance() will swap in the exports (to Module.asm) so they can be called 786 // TODO: Due to Closure regression https://github.com/google/closure-compiler/issues/3193, the above line no longer optimizes out down to the following line. 787 // When the regression is fixed, can restore the above PTHREADS-enabled path. 788 receiveInstance(result['instance']); 789 } 790 791 // User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback 792 // to manually instantiate the Wasm module themselves. This allows pages to 793 // run the instantiation parallel to any other async startup actions they are 794 // performing. 795 // Also pthreads and wasm workers initialize the wasm instance through this 796 // path. 797 if (Module['instantiateWasm']) { 798 799 try { 800 return Module['instantiateWasm'](info, receiveInstance); 801 } catch(e) { 802 err(`Module.instantiateWasm callback failed with error: ${e}`); 803 // If instantiation fails, reject the module ready promise. 804 readyPromiseReject(e); 805 } 806 } 807 808 // If instantiation fails, reject the module ready promise. 809 instantiateAsync(wasmBinary, wasmBinaryFile, info, receiveInstantiationResult).catch(readyPromiseReject); 810 return {}; // no exports yet; we'll fill them in later 811} 812 813// include: runtime_debug.js 814// end include: runtime_debug.js 815// === Body === 816// end include: preamble.js 817 818 819 /** @constructor */ 820 function ExitStatus(status) { 821 this.name = 'ExitStatus'; 822 this.message = `Program terminated with exit(${status})`; 823 this.status = status; 824 } 825 826 var callRuntimeCallbacks = (callbacks) => { 827 while (callbacks.length > 0) { 828 // Pass the module as the first argument. 829 callbacks.shift()(Module); 830 } 831 }; 832 833 834 /** 835 * @param {number} ptr 836 * @param {string} type 837 */ 838 function getValue(ptr, type = 'i8') { 839 if (type.endsWith('*')) type = '*'; 840 switch (type) { 841 case 'i1': return HEAP8[ptr]; 842 case 'i8': return HEAP8[ptr]; 843 case 'i16': return HEAP16[((ptr)>>1)]; 844 case 'i32': return HEAP32[((ptr)>>2)]; 845 case 'i64': return HEAP64[((ptr)>>3)]; 846 case 'float': return HEAPF32[((ptr)>>2)]; 847 case 'double': return HEAPF64[((ptr)>>3)]; 848 case '*': return HEAPU32[((ptr)>>2)]; 849 default: abort(`invalid type for getValue: ${type}`); 850 } 851 } 852 853 var noExitRuntime = Module['noExitRuntime'] || false; 854 855 856 /** 857 * @param {number} ptr 858 * @param {number} value 859 * @param {string} type 860 */ 861 function setValue(ptr, value, type = 'i8') { 862 if (type.endsWith('*')) type = '*'; 863 switch (type) { 864 case 'i1': HEAP8[ptr] = value; break; 865 case 'i8': HEAP8[ptr] = value; break; 866 case 'i16': HEAP16[((ptr)>>1)] = value; break; 867 case 'i32': HEAP32[((ptr)>>2)] = value; break; 868 case 'i64': HEAP64[((ptr)>>3)] = BigInt(value); break; 869 case 'float': HEAPF32[((ptr)>>2)] = value; break; 870 case 'double': HEAPF64[((ptr)>>3)] = value; break; 871 case '*': HEAPU32[((ptr)>>2)] = value; break; 872 default: abort(`invalid type for setValue: ${type}`); 873 } 874 } 875 876 var UTF8Decoder = typeof TextDecoder != 'undefined' ? new TextDecoder('utf8') : undefined; 877 878 /** 879 * Given a pointer 'idx' to a null-terminated UTF8-encoded string in the given 880 * array that contains uint8 values, returns a copy of that string as a 881 * Javascript String object. 882 * heapOrArray is either a regular array, or a JavaScript typed array view. 883 * @param {number} idx 884 * @param {number=} maxBytesToRead 885 * @return {string} 886 */ 887 var UTF8ArrayToString = (heapOrArray, idx, maxBytesToRead) => { 888 var endIdx = idx + maxBytesToRead; 889 var endPtr = idx; 890 // TextDecoder needs to know the byte length in advance, it doesn't stop on 891 // null terminator by itself. Also, use the length info to avoid running tiny 892 // strings through TextDecoder, since .subarray() allocates garbage. 893 // (As a tiny code save trick, compare endPtr against endIdx using a negation, 894 // so that undefined means Infinity) 895 while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr; 896 897 if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { 898 return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)); 899 } 900 var str = ''; 901 // If building with TextDecoder, we have already computed the string length 902 // above, so test loop end condition against that 903 while (idx < endPtr) { 904 // For UTF8 byte structure, see: 905 // http://en.wikipedia.org/wiki/UTF-8#Description 906 // https://www.ietf.org/rfc/rfc2279.txt 907 // https://tools.ietf.org/html/rfc3629 908 var u0 = heapOrArray[idx++]; 909 if (!(u0 & 0x80)) { str += String.fromCharCode(u0); continue; } 910 var u1 = heapOrArray[idx++] & 63; 911 if ((u0 & 0xE0) == 0xC0) { str += String.fromCharCode(((u0 & 31) << 6) | u1); continue; } 912 var u2 = heapOrArray[idx++] & 63; 913 if ((u0 & 0xF0) == 0xE0) { 914 u0 = ((u0 & 15) << 12) | (u1 << 6) | u2; 915 } else { 916 u0 = ((u0 & 7) << 18) | (u1 << 12) | (u2 << 6) | (heapOrArray[idx++] & 63); 917 } 918 919 if (u0 < 0x10000) { 920 str += String.fromCharCode(u0); 921 } else { 922 var ch = u0 - 0x10000; 923 str += String.fromCharCode(0xD800 | (ch >> 10), 0xDC00 | (ch & 0x3FF)); 924 } 925 } 926 return str; 927 }; 928 929 /** 930 * Given a pointer 'ptr' to a null-terminated UTF8-encoded string in the 931 * emscripten HEAP, returns a copy of that string as a Javascript String object. 932 * 933 * @param {number} ptr 934 * @param {number=} maxBytesToRead - An optional length that specifies the 935 * maximum number of bytes to read. You can omit this parameter to scan the 936 * string until the first 0 byte. If maxBytesToRead is passed, and the string 937 * at [ptr, ptr+maxBytesToReadr[ contains a null byte in the middle, then the 938 * string will cut short at that byte index (i.e. maxBytesToRead will not 939 * produce a string of exact length [ptr, ptr+maxBytesToRead[) N.B. mixing 940 * frequent uses of UTF8ToString() with and without maxBytesToRead may throw 941 * JS JIT optimizations off, so it is worth to consider consistently using one 942 * @return {string} 943 */ 944 var UTF8ToString = (ptr, maxBytesToRead) => { 945 return ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ''; 946 }; 947 var ___assert_fail = (condition, filename, line, func) => { 948 abort(`Assertion failed: ${UTF8ToString(condition)}, at: ` + [filename ? UTF8ToString(filename) : 'unknown filename', line, func ? UTF8ToString(func) : 'unknown function']); 949 }; 950 951 var PATH = { 952 isAbs:(path) => path.charAt(0) === '/', 953 splitPath:(filename) => { 954 var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; 955 return splitPathRe.exec(filename).slice(1); 956 }, 957 normalizeArray:(parts, allowAboveRoot) => { 958 // if the path tries to go above the root, `up` ends up > 0 959 var up = 0; 960 for (var i = parts.length - 1; i >= 0; i--) { 961 var last = parts[i]; 962 if (last === '.') { 963 parts.splice(i, 1); 964 } else if (last === '..') { 965 parts.splice(i, 1); 966 up++; 967 } else if (up) { 968 parts.splice(i, 1); 969 up--; 970 } 971 } 972 // if the path is allowed to go above the root, restore leading ..s 973 if (allowAboveRoot) { 974 for (; up; up--) { 975 parts.unshift('..'); 976 } 977 } 978 return parts; 979 }, 980 normalize:(path) => { 981 var isAbsolute = PATH.isAbs(path), 982 trailingSlash = path.substr(-1) === '/'; 983 // Normalize the path 984 path = PATH.normalizeArray(path.split('/').filter((p) => !!p), !isAbsolute).join('/'); 985 if (!path && !isAbsolute) { 986 path = '.'; 987 } 988 if (path && trailingSlash) { 989 path += '/'; 990 } 991 return (isAbsolute ? '/' : '') + path; 992 }, 993 dirname:(path) => { 994 var result = PATH.splitPath(path), 995 root = result[0], 996 dir = result[1]; 997 if (!root && !dir) { 998 // No dirname whatsoever 999 return '.'; 1000 } 1001 if (dir) { 1002 // It has a dirname, strip trailing slash 1003 dir = dir.substr(0, dir.length - 1); 1004 } 1005 return root + dir; 1006 }, 1007 basename:(path) => { 1008 // EMSCRIPTEN return '/'' for '/', not an empty string 1009 if (path === '/') return '/'; 1010 path = PATH.normalize(path); 1011 path = path.replace(/\/$/, ""); 1012 var lastSlash = path.lastIndexOf('/'); 1013 if (lastSlash === -1) return path; 1014 return path.substr(lastSlash+1); 1015 }, 1016 join:(...paths) => PATH.normalize(paths.join('/')), 1017 join2:(l, r) => PATH.normalize(l + '/' + r), 1018 }; 1019 1020 var initRandomFill = () => { 1021 if (typeof crypto == 'object' && typeof crypto['getRandomValues'] == 'function') { 1022 // for modern web browsers 1023 return (view) => crypto.getRandomValues(view); 1024 } else 1025 if (ENVIRONMENT_IS_NODE) { 1026 // for nodejs with or without crypto support included 1027 try { 1028 var crypto_module = require('crypto'); 1029 var randomFillSync = crypto_module['randomFillSync']; 1030 if (randomFillSync) { 1031 // nodejs with LTS crypto support 1032 return (view) => crypto_module['randomFillSync'](view); 1033 } 1034 // very old nodejs with the original crypto API 1035 var randomBytes = crypto_module['randomBytes']; 1036 return (view) => ( 1037 view.set(randomBytes(view.byteLength)), 1038 // Return the original view to match modern native implementations. 1039 view 1040 ); 1041 } catch (e) { 1042 // nodejs doesn't have crypto support 1043 } 1044 } 1045 // we couldn't find a proper implementation, as Math.random() is not suitable for /dev/random, see emscripten-core/emscripten/pull/7096 1046 abort('initRandomDevice'); 1047 }; 1048 var randomFill = (view) => { 1049 // Lazily init on the first invocation. 1050 return (randomFill = initRandomFill())(view); 1051 }; 1052 1053 1054 1055 var PATH_FS = { 1056 resolve:(...args) => { 1057 var resolvedPath = '', 1058 resolvedAbsolute = false; 1059 for (var i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) { 1060 var path = (i >= 0) ? args[i] : FS.cwd(); 1061 // Skip empty and invalid entries 1062 if (typeof path != 'string') { 1063 throw new TypeError('Arguments to path.resolve must be strings'); 1064 } else if (!path) { 1065 return ''; // an invalid portion invalidates the whole thing 1066 } 1067 resolvedPath = path + '/' + resolvedPath; 1068 resolvedAbsolute = PATH.isAbs(path); 1069 } 1070 // At this point the path should be resolved to a full absolute path, but 1071 // handle relative paths to be safe (might happen when process.cwd() fails) 1072 resolvedPath = PATH.normalizeArray(resolvedPath.split('/').filter((p) => !!p), !resolvedAbsolute).join('/'); 1073 return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; 1074 }, 1075 relative:(from, to) => { 1076 from = PATH_FS.resolve(from).substr(1); 1077 to = PATH_FS.resolve(to).substr(1); 1078 function trim(arr) { 1079 var start = 0; 1080 for (; start < arr.length; start++) { 1081 if (arr[start] !== '') break; 1082 } 1083 var end = arr.length - 1; 1084 for (; end >= 0; end--) { 1085 if (arr[end] !== '') break; 1086 } 1087 if (start > end) return []; 1088 return arr.slice(start, end - start + 1); 1089 } 1090 var fromParts = trim(from.split('/')); 1091 var toParts = trim(to.split('/')); 1092 var length = Math.min(fromParts.length, toParts.length); 1093 var samePartsLength = length; 1094 for (var i = 0; i < length; i++) { 1095 if (fromParts[i] !== toParts[i]) { 1096 samePartsLength = i; 1097 break; 1098 } 1099 } 1100 var outputParts = []; 1101 for (var i = samePartsLength; i < fromParts.length; i++) { 1102 outputParts.push('..'); 1103 } 1104 outputParts = outputParts.concat(toParts.slice(samePartsLength)); 1105 return outputParts.join('/'); 1106 }, 1107 }; 1108 1109 1110 1111 var FS_stdin_getChar_buffer = []; 1112 1113 var lengthBytesUTF8 = (str) => { 1114 var len = 0; 1115 for (var i = 0; i < str.length; ++i) { 1116 // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code 1117 // unit, not a Unicode code point of the character! So decode 1118 // UTF16->UTF32->UTF8. 1119 // See http://unicode.org/faq/utf_bom.html#utf16-3 1120 var c = str.charCodeAt(i); // possibly a lead surrogate 1121 if (c <= 0x7F) { 1122 len++; 1123 } else if (c <= 0x7FF) { 1124 len += 2; 1125 } else if (c >= 0xD800 && c <= 0xDFFF) { 1126 len += 4; ++i; 1127 } else { 1128 len += 3; 1129 } 1130 } 1131 return len; 1132 }; 1133 1134 var stringToUTF8Array = (str, heap, outIdx, maxBytesToWrite) => { 1135 // Parameter maxBytesToWrite is not optional. Negative values, 0, null, 1136 // undefined and false each don't write out any bytes. 1137 if (!(maxBytesToWrite > 0)) 1138 return 0; 1139 1140 var startIdx = outIdx; 1141 var endIdx = outIdx + maxBytesToWrite - 1; // -1 for string null terminator. 1142 for (var i = 0; i < str.length; ++i) { 1143 // Gotcha: charCodeAt returns a 16-bit word that is a UTF-16 encoded code 1144 // unit, not a Unicode code point of the character! So decode 1145 // UTF16->UTF32->UTF8. 1146 // See http://unicode.org/faq/utf_bom.html#utf16-3 1147 // For UTF8 byte structure, see http://en.wikipedia.org/wiki/UTF-8#Description 1148 // and https://www.ietf.org/rfc/rfc2279.txt 1149 // and https://tools.ietf.org/html/rfc3629 1150 var u = str.charCodeAt(i); // possibly a lead surrogate 1151 if (u >= 0xD800 && u <= 0xDFFF) { 1152 var u1 = str.charCodeAt(++i); 1153 u = 0x10000 + ((u & 0x3FF) << 10) | (u1 & 0x3FF); 1154 } 1155 if (u <= 0x7F) { 1156 if (outIdx >= endIdx) break; 1157 heap[outIdx++] = u; 1158 } else if (u <= 0x7FF) { 1159 if (outIdx + 1 >= endIdx) break; 1160 heap[outIdx++] = 0xC0 | (u >> 6); 1161 heap[outIdx++] = 0x80 | (u & 63); 1162 } else if (u <= 0xFFFF) { 1163 if (outIdx + 2 >= endIdx) break; 1164 heap[outIdx++] = 0xE0 | (u >> 12); 1165 heap[outIdx++] = 0x80 | ((u >> 6) & 63); 1166 heap[outIdx++] = 0x80 | (u & 63); 1167 } else { 1168 if (outIdx + 3 >= endIdx) break; 1169 heap[outIdx++] = 0xF0 | (u >> 18); 1170 heap[outIdx++] = 0x80 | ((u >> 12) & 63); 1171 heap[outIdx++] = 0x80 | ((u >> 6) & 63); 1172 heap[outIdx++] = 0x80 | (u & 63); 1173 } 1174 } 1175 // Null-terminate the pointer to the buffer. 1176 heap[outIdx] = 0; 1177 return outIdx - startIdx; 1178 }; 1179 /** @type {function(string, boolean=, number=)} */ 1180 function intArrayFromString(stringy, dontAddNull, length) { 1181 var len = length > 0 ? length : lengthBytesUTF8(stringy)+1; 1182 var u8array = new Array(len); 1183 var numBytesWritten = stringToUTF8Array(stringy, u8array, 0, u8array.length); 1184 if (dontAddNull) u8array.length = numBytesWritten; 1185 return u8array; 1186 } 1187 var FS_stdin_getChar = () => { 1188 if (!FS_stdin_getChar_buffer.length) { 1189 var result = null; 1190 if (ENVIRONMENT_IS_NODE) { 1191 // we will read data by chunks of BUFSIZE 1192 var BUFSIZE = 256; 1193 var buf = Buffer.alloc(BUFSIZE); 1194 var bytesRead = 0; 1195 1196 // For some reason we must suppress a closure warning here, even though 1197 // fd definitely exists on process.stdin, and is even the proper way to 1198 // get the fd of stdin, 1199 // https://github.com/nodejs/help/issues/2136#issuecomment-523649904 1200 // This started to happen after moving this logic out of library_tty.js, 1201 // so it is related to the surrounding code in some unclear manner. 1202 /** @suppress {missingProperties} */ 1203 var fd = process.stdin.fd; 1204 1205 try { 1206 bytesRead = fs.readSync(fd, buf); 1207 } catch(e) { 1208 // Cross-platform differences: on Windows, reading EOF throws an exception, but on other OSes, 1209 // reading EOF returns 0. Uniformize behavior by treating the EOF exception to return 0. 1210 if (e.toString().includes('EOF')) bytesRead = 0; 1211 else throw e; 1212 } 1213 1214 if (bytesRead > 0) { 1215 result = buf.slice(0, bytesRead).toString('utf-8'); 1216 } else { 1217 result = null; 1218 } 1219 } else 1220 if (typeof window != 'undefined' && 1221 typeof window.prompt == 'function') { 1222 // Browser. 1223 result = window.prompt('Input: '); // returns null on cancel 1224 if (result !== null) { 1225 result += '\n'; 1226 } 1227 } else if (typeof readline == 'function') { 1228 // Command line. 1229 result = readline(); 1230 if (result !== null) { 1231 result += '\n'; 1232 } 1233 } 1234 if (!result) { 1235 return null; 1236 } 1237 FS_stdin_getChar_buffer = intArrayFromString(result, true); 1238 } 1239 return FS_stdin_getChar_buffer.shift(); 1240 }; 1241 var TTY = { 1242 ttys:[], 1243 init() { 1244 // https://github.com/emscripten-core/emscripten/pull/1555 1245 // if (ENVIRONMENT_IS_NODE) { 1246 // // currently, FS.init does not distinguish if process.stdin is a file or TTY 1247 // // device, it always assumes it's a TTY device. because of this, we're forcing 1248 // // process.stdin to UTF8 encoding to at least make stdin reading compatible 1249 // // with text files until FS.init can be refactored. 1250 // process.stdin.setEncoding('utf8'); 1251 // } 1252 }, 1253 shutdown() { 1254 // https://github.com/emscripten-core/emscripten/pull/1555 1255 // if (ENVIRONMENT_IS_NODE) { 1256 // // inolen: any idea as to why node -e 'process.stdin.read()' wouldn't exit immediately (with process.stdin being a tty)? 1257 // // isaacs: because now it's reading from the stream, you've expressed interest in it, so that read() kicks off a _read() which creates a ReadReq operation 1258 // // inolen: I thought read() in that case was a synchronous operation that just grabbed some amount of buffered data if it exists? 1259 // // isaacs: it is. but it also triggers a _read() call, which calls readStart() on the handle 1260 // // isaacs: do process.stdin.pause() and i'd think it'd probably close the pending call 1261 // process.stdin.pause(); 1262 // } 1263 }, 1264 register(dev, ops) { 1265 TTY.ttys[dev] = { input: [], output: [], ops: ops }; 1266 FS.registerDevice(dev, TTY.stream_ops); 1267 }, 1268 stream_ops:{ 1269 open(stream) { 1270 var tty = TTY.ttys[stream.node.rdev]; 1271 if (!tty) { 1272 throw new FS.ErrnoError(43); 1273 } 1274 stream.tty = tty; 1275 stream.seekable = false; 1276 }, 1277 close(stream) { 1278 // flush any pending line data 1279 stream.tty.ops.fsync(stream.tty); 1280 }, 1281 fsync(stream) { 1282 stream.tty.ops.fsync(stream.tty); 1283 }, 1284 read(stream, buffer, offset, length, pos /* ignored */) { 1285 if (!stream.tty || !stream.tty.ops.get_char) { 1286 throw new FS.ErrnoError(60); 1287 } 1288 var bytesRead = 0; 1289 for (var i = 0; i < length; i++) { 1290 var result; 1291 try { 1292 result = stream.tty.ops.get_char(stream.tty); 1293 } catch (e) { 1294 throw new FS.ErrnoError(29); 1295 } 1296 if (result === undefined && bytesRead === 0) { 1297 throw new FS.ErrnoError(6); 1298 } 1299 if (result === null || result === undefined) break; 1300 bytesRead++; 1301 buffer[offset+i] = result; 1302 } 1303 if (bytesRead) { 1304 stream.node.timestamp = Date.now(); 1305 } 1306 return bytesRead; 1307 }, 1308 write(stream, buffer, offset, length, pos) { 1309 if (!stream.tty || !stream.tty.ops.put_char) { 1310 throw new FS.ErrnoError(60); 1311 } 1312 try { 1313 for (var i = 0; i < length; i++) { 1314 stream.tty.ops.put_char(stream.tty, buffer[offset+i]); 1315 } 1316 } catch (e) { 1317 throw new FS.ErrnoError(29); 1318 } 1319 if (length) { 1320 stream.node.timestamp = Date.now(); 1321 } 1322 return i; 1323 }, 1324 }, 1325 default_tty_ops:{ 1326 get_char(tty) { 1327 return FS_stdin_getChar(); 1328 }, 1329 put_char(tty, val) { 1330 if (val === null || val === 10) { 1331 out(UTF8ArrayToString(tty.output, 0)); 1332 tty.output = []; 1333 } else { 1334 if (val != 0) tty.output.push(val); // val == 0 would cut text output off in the middle. 1335 } 1336 }, 1337 fsync(tty) { 1338 if (tty.output && tty.output.length > 0) { 1339 out(UTF8ArrayToString(tty.output, 0)); 1340 tty.output = []; 1341 } 1342 }, 1343 ioctl_tcgets(tty) { 1344 // typical setting 1345 return { 1346 c_iflag: 25856, 1347 c_oflag: 5, 1348 c_cflag: 191, 1349 c_lflag: 35387, 1350 c_cc: [ 1351 0x03, 0x1c, 0x7f, 0x15, 0x04, 0x00, 0x01, 0x00, 0x11, 0x13, 0x1a, 0x00, 1352 0x12, 0x0f, 0x17, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1353 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 1354 ] 1355 }; 1356 }, 1357 ioctl_tcsets(tty, optional_actions, data) { 1358 // currently just ignore 1359 return 0; 1360 }, 1361 ioctl_tiocgwinsz(tty) { 1362 return [24, 80]; 1363 }, 1364 }, 1365 default_tty1_ops:{ 1366 put_char(tty, val) { 1367 if (val === null || val === 10) { 1368 err(UTF8ArrayToString(tty.output, 0)); 1369 tty.output = []; 1370 } else { 1371 if (val != 0) tty.output.push(val); 1372 } 1373 }, 1374 fsync(tty) { 1375 if (tty.output && tty.output.length > 0) { 1376 err(UTF8ArrayToString(tty.output, 0)); 1377 tty.output = []; 1378 } 1379 }, 1380 }, 1381 }; 1382 1383 1384 var zeroMemory = (address, size) => { 1385 HEAPU8.fill(0, address, address + size); 1386 return address; 1387 }; 1388 1389 var alignMemory = (size, alignment) => { 1390 return Math.ceil(size / alignment) * alignment; 1391 }; 1392 var mmapAlloc = (size) => { 1393 size = alignMemory(size, 65536); 1394 var ptr = _emscripten_builtin_memalign(65536, size); 1395 if (!ptr) return 0; 1396 return zeroMemory(ptr, size); 1397 }; 1398 var MEMFS = { 1399 ops_table:null, 1400 mount(mount) { 1401 return MEMFS.createNode(null, '/', 16384 | 511 /* 0777 */, 0); 1402 }, 1403 createNode(parent, name, mode, dev) { 1404 if (FS.isBlkdev(mode) || FS.isFIFO(mode)) { 1405 // no supported 1406 throw new FS.ErrnoError(63); 1407 } 1408 MEMFS.ops_table ||= { 1409 dir: { 1410 node: { 1411 getattr: MEMFS.node_ops.getattr, 1412 setattr: MEMFS.node_ops.setattr, 1413 lookup: MEMFS.node_ops.lookup, 1414 mknod: MEMFS.node_ops.mknod, 1415 rename: MEMFS.node_ops.rename, 1416 unlink: MEMFS.node_ops.unlink, 1417 rmdir: MEMFS.node_ops.rmdir, 1418 readdir: MEMFS.node_ops.readdir, 1419 symlink: MEMFS.node_ops.symlink 1420 }, 1421 stream: { 1422 llseek: MEMFS.stream_ops.llseek 1423 } 1424 }, 1425 file: { 1426 node: { 1427 getattr: MEMFS.node_ops.getattr, 1428 setattr: MEMFS.node_ops.setattr 1429 }, 1430 stream: { 1431 llseek: MEMFS.stream_ops.llseek, 1432 read: MEMFS.stream_ops.read, 1433 write: MEMFS.stream_ops.write, 1434 allocate: MEMFS.stream_ops.allocate, 1435 mmap: MEMFS.stream_ops.mmap, 1436 msync: MEMFS.stream_ops.msync 1437 } 1438 }, 1439 link: { 1440 node: { 1441 getattr: MEMFS.node_ops.getattr, 1442 setattr: MEMFS.node_ops.setattr, 1443 readlink: MEMFS.node_ops.readlink 1444 }, 1445 stream: {} 1446 }, 1447 chrdev: { 1448 node: { 1449 getattr: MEMFS.node_ops.getattr, 1450 setattr: MEMFS.node_ops.setattr 1451 }, 1452 stream: FS.chrdev_stream_ops 1453 } 1454 }; 1455 var node = FS.createNode(parent, name, mode, dev); 1456 if (FS.isDir(node.mode)) { 1457 node.node_ops = MEMFS.ops_table.dir.node; 1458 node.stream_ops = MEMFS.ops_table.dir.stream; 1459 node.contents = {}; 1460 } else if (FS.isFile(node.mode)) { 1461 node.node_ops = MEMFS.ops_table.file.node; 1462 node.stream_ops = MEMFS.ops_table.file.stream; 1463 node.usedBytes = 0; // The actual number of bytes used in the typed array, as opposed to contents.length which gives the whole capacity. 1464 // When the byte data of the file is populated, this will point to either a typed array, or a normal JS array. Typed arrays are preferred 1465 // for performance, and used by default. However, typed arrays are not resizable like normal JS arrays are, so there is a small disk size 1466 // penalty involved for appending file writes that continuously grow a file similar to std::vector capacity vs used -scheme. 1467 node.contents = null; 1468 } else if (FS.isLink(node.mode)) { 1469 node.node_ops = MEMFS.ops_table.link.node; 1470 node.stream_ops = MEMFS.ops_table.link.stream; 1471 } else if (FS.isChrdev(node.mode)) { 1472 node.node_ops = MEMFS.ops_table.chrdev.node; 1473 node.stream_ops = MEMFS.ops_table.chrdev.stream; 1474 } 1475 node.timestamp = Date.now(); 1476 // add the new node to the parent 1477 if (parent) { 1478 parent.contents[name] = node; 1479 parent.timestamp = node.timestamp; 1480 } 1481 return node; 1482 }, 1483 getFileDataAsTypedArray(node) { 1484 if (!node.contents) return new Uint8Array(0); 1485 if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes); // Make sure to not return excess unused bytes. 1486 return new Uint8Array(node.contents); 1487 }, 1488 expandFileStorage(node, newCapacity) { 1489 var prevCapacity = node.contents ? node.contents.length : 0; 1490 if (prevCapacity >= newCapacity) return; // No need to expand, the storage was already large enough. 1491 // Don't expand strictly to the given requested limit if it's only a very small increase, but instead geometrically grow capacity. 1492 // For small filesizes (<1MB), perform size*2 geometric increase, but for large sizes, do a much more conservative size*1.125 increase to 1493 // avoid overshooting the allocation cap by a very large margin. 1494 var CAPACITY_DOUBLING_MAX = 1024 * 1024; 1495 newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2.0 : 1.125)) >>> 0); 1496 if (prevCapacity != 0) newCapacity = Math.max(newCapacity, 256); // At minimum allocate 256b for each file when expanding. 1497 var oldContents = node.contents; 1498 node.contents = new Uint8Array(newCapacity); // Allocate new storage. 1499 if (node.usedBytes > 0) node.contents.set(oldContents.subarray(0, node.usedBytes), 0); // Copy old data over to the new storage. 1500 }, 1501 resizeFileStorage(node, newSize) { 1502 if (node.usedBytes == newSize) return; 1503 if (newSize == 0) { 1504 node.contents = null; // Fully decommit when requesting a resize to zero. 1505 node.usedBytes = 0; 1506 } else { 1507 var oldContents = node.contents; 1508 node.contents = new Uint8Array(newSize); // Allocate new storage. 1509 if (oldContents) { 1510 node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes))); // Copy old data over to the new storage. 1511 } 1512 node.usedBytes = newSize; 1513 } 1514 }, 1515 node_ops:{ 1516 getattr(node) { 1517 var attr = {}; 1518 // device numbers reuse inode numbers. 1519 attr.dev = FS.isChrdev(node.mode) ? node.id : 1; 1520 attr.ino = node.id; 1521 attr.mode = node.mode; 1522 attr.nlink = 1; 1523 attr.uid = 0; 1524 attr.gid = 0; 1525 attr.rdev = node.rdev; 1526 if (FS.isDir(node.mode)) { 1527 attr.size = 4096; 1528 } else if (FS.isFile(node.mode)) { 1529 attr.size = node.usedBytes; 1530 } else if (FS.isLink(node.mode)) { 1531 attr.size = node.link.length; 1532 } else { 1533 attr.size = 0; 1534 } 1535 attr.atime = new Date(node.timestamp); 1536 attr.mtime = new Date(node.timestamp); 1537 attr.ctime = new Date(node.timestamp); 1538 // NOTE: In our implementation, st_blocks = Math.ceil(st_size/st_blksize), 1539 // but this is not required by the standard. 1540 attr.blksize = 4096; 1541 attr.blocks = Math.ceil(attr.size / attr.blksize); 1542 return attr; 1543 }, 1544 setattr(node, attr) { 1545 if (attr.mode !== undefined) { 1546 node.mode = attr.mode; 1547 } 1548 if (attr.timestamp !== undefined) { 1549 node.timestamp = attr.timestamp; 1550 } 1551 if (attr.size !== undefined) { 1552 MEMFS.resizeFileStorage(node, attr.size); 1553 } 1554 }, 1555 lookup(parent, name) { 1556 throw FS.genericErrors[44]; 1557 }, 1558 mknod(parent, name, mode, dev) { 1559 return MEMFS.createNode(parent, name, mode, dev); 1560 }, 1561 rename(old_node, new_dir, new_name) { 1562 // if we're overwriting a directory at new_name, make sure it's empty. 1563 if (FS.isDir(old_node.mode)) { 1564 var new_node; 1565 try { 1566 new_node = FS.lookupNode(new_dir, new_name); 1567 } catch (e) { 1568 } 1569 if (new_node) { 1570 for (var i in new_node.contents) { 1571 throw new FS.ErrnoError(55); 1572 } 1573 } 1574 } 1575 // do the internal rewiring 1576 delete old_node.parent.contents[old_node.name]; 1577 old_node.parent.timestamp = Date.now() 1578 old_node.name = new_name; 1579 new_dir.contents[new_name] = old_node; 1580 new_dir.timestamp = old_node.parent.timestamp; 1581 old_node.parent = new_dir; 1582 }, 1583 unlink(parent, name) { 1584 delete parent.contents[name]; 1585 parent.timestamp = Date.now(); 1586 }, 1587 rmdir(parent, name) { 1588 var node = FS.lookupNode(parent, name); 1589 for (var i in node.contents) { 1590 throw new FS.ErrnoError(55); 1591 } 1592 delete parent.contents[name]; 1593 parent.timestamp = Date.now(); 1594 }, 1595 readdir(node) { 1596 var entries = ['.', '..']; 1597 for (var key of Object.keys(node.contents)) { 1598 entries.push(key); 1599 } 1600 return entries; 1601 }, 1602 symlink(parent, newname, oldpath) { 1603 var node = MEMFS.createNode(parent, newname, 511 /* 0777 */ | 40960, 0); 1604 node.link = oldpath; 1605 return node; 1606 }, 1607 readlink(node) { 1608 if (!FS.isLink(node.mode)) { 1609 throw new FS.ErrnoError(28); 1610 } 1611 return node.link; 1612 }, 1613 }, 1614 stream_ops:{ 1615 read(stream, buffer, offset, length, position) { 1616 var contents = stream.node.contents; 1617 if (position >= stream.node.usedBytes) return 0; 1618 var size = Math.min(stream.node.usedBytes - position, length); 1619 if (size > 8 && contents.subarray) { // non-trivial, and typed array 1620 buffer.set(contents.subarray(position, position + size), offset); 1621 } else { 1622 for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i]; 1623 } 1624 return size; 1625 }, 1626 write(stream, buffer, offset, length, position, canOwn) { 1627 // If the buffer is located in main memory (HEAP), and if 1628 // memory can grow, we can't hold on to references of the 1629 // memory buffer, as they may get invalidated. That means we 1630 // need to do copy its contents. 1631 if (buffer.buffer === HEAP8.buffer) { 1632 canOwn = false; 1633 } 1634 1635 if (!length) return 0; 1636 var node = stream.node; 1637 node.timestamp = Date.now(); 1638 1639 if (buffer.subarray && (!node.contents || node.contents.subarray)) { // This write is from a typed array to a typed array? 1640 if (canOwn) { 1641 node.contents = buffer.subarray(offset, offset + length); 1642 node.usedBytes = length; 1643 return length; 1644 } else if (node.usedBytes === 0 && position === 0) { // If this is a simple first write to an empty file, do a fast set since we don't need to care about old data. 1645 node.contents = buffer.slice(offset, offset + length); 1646 node.usedBytes = length; 1647 return length; 1648 } else if (position + length <= node.usedBytes) { // Writing to an already allocated and used subrange of the file? 1649 node.contents.set(buffer.subarray(offset, offset + length), position); 1650 return length; 1651 } 1652 } 1653 1654 // Appending to an existing file and we need to reallocate, or source data did not come as a typed array. 1655 MEMFS.expandFileStorage(node, position+length); 1656 if (node.contents.subarray && buffer.subarray) { 1657 // Use typed array write which is available. 1658 node.contents.set(buffer.subarray(offset, offset + length), position); 1659 } else { 1660 for (var i = 0; i < length; i++) { 1661 node.contents[position + i] = buffer[offset + i]; // Or fall back to manual write if not. 1662 } 1663 } 1664 node.usedBytes = Math.max(node.usedBytes, position + length); 1665 return length; 1666 }, 1667 llseek(stream, offset, whence) { 1668 var position = offset; 1669 if (whence === 1) { 1670 position += stream.position; 1671 } else if (whence === 2) { 1672 if (FS.isFile(stream.node.mode)) { 1673 position += stream.node.usedBytes; 1674 } 1675 } 1676 if (position < 0) { 1677 throw new FS.ErrnoError(28); 1678 } 1679 return position; 1680 }, 1681 allocate(stream, offset, length) { 1682 MEMFS.expandFileStorage(stream.node, offset + length); 1683 stream.node.usedBytes = Math.max(stream.node.usedBytes, offset + length); 1684 }, 1685 mmap(stream, length, position, prot, flags) { 1686 if (!FS.isFile(stream.node.mode)) { 1687 throw new FS.ErrnoError(43); 1688 } 1689 var ptr; 1690 var allocated; 1691 var contents = stream.node.contents; 1692 // Only make a new copy when MAP_PRIVATE is specified. 1693 if (!(flags & 2) && contents.buffer === HEAP8.buffer) { 1694 // We can't emulate MAP_SHARED when the file is not backed by the 1695 // buffer we're mapping to (e.g. the HEAP buffer). 1696 allocated = false; 1697 ptr = contents.byteOffset; 1698 } else { 1699 // Try to avoid unnecessary slices. 1700 if (position > 0 || position + length < contents.length) { 1701 if (contents.subarray) { 1702 contents = contents.subarray(position, position + length); 1703 } else { 1704 contents = Array.prototype.slice.call(contents, position, position + length); 1705 } 1706 } 1707 allocated = true; 1708 ptr = mmapAlloc(length); 1709 if (!ptr) { 1710 throw new FS.ErrnoError(48); 1711 } 1712 HEAP8.set(contents, ptr); 1713 } 1714 return { ptr, allocated }; 1715 }, 1716 msync(stream, buffer, offset, length, mmapFlags) { 1717 MEMFS.stream_ops.write(stream, buffer, 0, length, offset, false); 1718 // should we check if bytesWritten and length are the same? 1719 return 0; 1720 }, 1721 }, 1722 }; 1723 1724 /** @param {boolean=} noRunDep */ 1725 var asyncLoad = (url, onload, onerror, noRunDep) => { 1726 var dep = !noRunDep ? getUniqueRunDependency(`al ${url}`) : ''; 1727 readAsync(url, (arrayBuffer) => { 1728 onload(new Uint8Array(arrayBuffer)); 1729 if (dep) removeRunDependency(dep); 1730 }, (event) => { 1731 if (onerror) { 1732 onerror(); 1733 } else { 1734 throw `Loading data file "${url}" failed.`; 1735 } 1736 }); 1737 if (dep) addRunDependency(dep); 1738 }; 1739 1740 1741 var FS_createDataFile = (parent, name, fileData, canRead, canWrite, canOwn) => { 1742 FS.createDataFile(parent, name, fileData, canRead, canWrite, canOwn); 1743 }; 1744 1745 var preloadPlugins = Module['preloadPlugins'] || []; 1746 var FS_handledByPreloadPlugin = (byteArray, fullname, finish, onerror) => { 1747 // Ensure plugins are ready. 1748 if (typeof Browser != 'undefined') Browser.init(); 1749 1750 var handled = false; 1751 preloadPlugins.forEach((plugin) => { 1752 if (handled) return; 1753 if (plugin['canHandle'](fullname)) { 1754 plugin['handle'](byteArray, fullname, finish, onerror); 1755 handled = true; 1756 } 1757 }); 1758 return handled; 1759 }; 1760 var FS_createPreloadedFile = (parent, name, url, canRead, canWrite, onload, onerror, dontCreateFile, canOwn, preFinish) => { 1761 // TODO we should allow people to just pass in a complete filename instead 1762 // of parent and name being that we just join them anyways 1763 var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent; 1764 var dep = getUniqueRunDependency(`cp ${fullname}`); // might have several active requests for the same fullname 1765 function processData(byteArray) { 1766 function finish(byteArray) { 1767 preFinish?.(); 1768 if (!dontCreateFile) { 1769 FS_createDataFile(parent, name, byteArray, canRead, canWrite, canOwn); 1770 } 1771 onload?.(); 1772 removeRunDependency(dep); 1773 } 1774 if (FS_handledByPreloadPlugin(byteArray, fullname, finish, () => { 1775 onerror?.(); 1776 removeRunDependency(dep); 1777 })) { 1778 return; 1779 } 1780 finish(byteArray); 1781 } 1782 addRunDependency(dep); 1783 if (typeof url == 'string') { 1784 asyncLoad(url, processData, onerror); 1785 } else { 1786 processData(url); 1787 } 1788 }; 1789 1790 var FS_modeStringToFlags = (str) => { 1791 var flagModes = { 1792 'r': 0, 1793 'r+': 2, 1794 'w': 512 | 64 | 1, 1795 'w+': 512 | 64 | 2, 1796 'a': 1024 | 64 | 1, 1797 'a+': 1024 | 64 | 2, 1798 }; 1799 var flags = flagModes[str]; 1800 if (typeof flags == 'undefined') { 1801 throw new Error(`Unknown file open mode: ${str}`); 1802 } 1803 return flags; 1804 }; 1805 1806 var FS_getMode = (canRead, canWrite) => { 1807 var mode = 0; 1808 if (canRead) mode |= 292 | 73; 1809 if (canWrite) mode |= 146; 1810 return mode; 1811 }; 1812 1813 1814 1815 var FS = { 1816 root:null, 1817 mounts:[], 1818 devices:{ 1819 }, 1820 streams:[], 1821 nextInode:1, 1822 nameTable:null, 1823 currentPath:"/", 1824 initialized:false, 1825 ignorePermissions:true, 1826 ErrnoError:class { 1827 // We set the `name` property to be able to identify `FS.ErrnoError` 1828 // - the `name` is a standard ECMA-262 property of error objects. Kind of good to have it anyway. 1829 // - when using PROXYFS, an error can come from an underlying FS 1830 // as different FS objects have their own FS.ErrnoError each, 1831 // the test `err instanceof FS.ErrnoError` won't detect an error coming from another filesystem, causing bugs. 1832 // we'll use the reliable test `err.name == "ErrnoError"` instead 1833 constructor(errno) { 1834 // TODO(sbc): Use the inline member declaration syntax once we 1835 // support it in acorn and closure. 1836 this.name = 'ErrnoError'; 1837 this.errno = errno; 1838 } 1839 }, 1840 genericErrors:{ 1841 }, 1842 filesystems:null, 1843 syncFSRequests:0, 1844 FSStream:class { 1845 constructor() { 1846 // TODO(https://github.com/emscripten-core/emscripten/issues/21414): 1847 // Use inline field declarations. 1848 this.shared = {}; 1849 } 1850 get object() { 1851 return this.node; 1852 } 1853 set object(val) { 1854 this.node = val; 1855 } 1856 get isRead() { 1857 return (this.flags & 2097155) !== 1; 1858 } 1859 get isWrite() { 1860 return (this.flags & 2097155) !== 0; 1861 } 1862 get isAppend() { 1863 return (this.flags & 1024); 1864 } 1865 get flags() { 1866 return this.shared.flags; 1867 } 1868 set flags(val) { 1869 this.shared.flags = val; 1870 } 1871 get position() { 1872 return this.shared.position; 1873 } 1874 set position(val) { 1875 this.shared.position = val; 1876 } 1877 }, 1878 FSNode:class { 1879 constructor(parent, name, mode, rdev) { 1880 if (!parent) { 1881 parent = this; // root node sets parent to itself 1882 } 1883 this.parent = parent; 1884 this.mount = parent.mount; 1885 this.mounted = null; 1886 this.id = FS.nextInode++; 1887 this.name = name; 1888 this.mode = mode; 1889 this.node_ops = {}; 1890 this.stream_ops = {}; 1891 this.rdev = rdev; 1892 this.readMode = 292/*292*/ | 73/*73*/; 1893 this.writeMode = 146/*146*/; 1894 } 1895 get read() { 1896 return (this.mode & this.readMode) === this.readMode; 1897 } 1898 set read(val) { 1899 val ? this.mode |= this.readMode : this.mode &= ~this.readMode; 1900 } 1901 get write() { 1902 return (this.mode & this.writeMode) === this.writeMode; 1903 } 1904 set write(val) { 1905 val ? this.mode |= this.writeMode : this.mode &= ~this.writeMode; 1906 } 1907 get isFolder() { 1908 return FS.isDir(this.mode); 1909 } 1910 get isDevice() { 1911 return FS.isChrdev(this.mode); 1912 } 1913 }, 1914 lookupPath(path, opts = {}) { 1915 path = PATH_FS.resolve(path); 1916 1917 if (!path) return { path: '', node: null }; 1918 1919 var defaults = { 1920 follow_mount: true, 1921 recurse_count: 0 1922 }; 1923 opts = Object.assign(defaults, opts) 1924 1925 if (opts.recurse_count > 8) { // max recursive lookup of 8 1926 throw new FS.ErrnoError(32); 1927 } 1928 1929 // split the absolute path 1930 var parts = path.split('/').filter((p) => !!p); 1931 1932 // start at the root 1933 var current = FS.root; 1934 var current_path = '/'; 1935 1936 for (var i = 0; i < parts.length; i++) { 1937 var islast = (i === parts.length-1); 1938 if (islast && opts.parent) { 1939 // stop resolving 1940 break; 1941 } 1942 1943 current = FS.lookupNode(current, parts[i]); 1944 current_path = PATH.join2(current_path, parts[i]); 1945 1946 // jump to the mount's root node if this is a mountpoint 1947 if (FS.isMountpoint(current)) { 1948 if (!islast || (islast && opts.follow_mount)) { 1949 current = current.mounted.root; 1950 } 1951 } 1952 1953 // by default, lookupPath will not follow a symlink if it is the final path component. 1954 // setting opts.follow = true will override this behavior. 1955 if (!islast || opts.follow) { 1956 var count = 0; 1957 while (FS.isLink(current.mode)) { 1958 var link = FS.readlink(current_path); 1959 current_path = PATH_FS.resolve(PATH.dirname(current_path), link); 1960 1961 var lookup = FS.lookupPath(current_path, { recurse_count: opts.recurse_count + 1 }); 1962 current = lookup.node; 1963 1964 if (count++ > 40) { // limit max consecutive symlinks to 40 (SYMLOOP_MAX). 1965 throw new FS.ErrnoError(32); 1966 } 1967 } 1968 } 1969 } 1970 1971 return { path: current_path, node: current }; 1972 }, 1973 getPath(node) { 1974 var path; 1975 while (true) { 1976 if (FS.isRoot(node)) { 1977 var mount = node.mount.mountpoint; 1978 if (!path) return mount; 1979 return mount[mount.length-1] !== '/' ? `${mount}/${path}` : mount + path; 1980 } 1981 path = path ? `${node.name}/${path}` : node.name; 1982 node = node.parent; 1983 } 1984 }, 1985 hashName(parentid, name) { 1986 var hash = 0; 1987 1988 for (var i = 0; i < name.length; i++) { 1989 hash = ((hash << 5) - hash + name.charCodeAt(i)) | 0; 1990 } 1991 return ((parentid + hash) >>> 0) % FS.nameTable.length; 1992 }, 1993 hashAddNode(node) { 1994 var hash = FS.hashName(node.parent.id, node.name); 1995 node.name_next = FS.nameTable[hash]; 1996 FS.nameTable[hash] = node; 1997 }, 1998 hashRemoveNode(node) { 1999 var hash = FS.hashName(node.parent.id, node.name); 2000 if (FS.nameTable[hash] === node) { 2001 FS.nameTable[hash] = node.name_next; 2002 } else { 2003 var current = FS.nameTable[hash]; 2004 while (current) { 2005 if (current.name_next === node) { 2006 current.name_next = node.name_next; 2007 break; 2008 } 2009 current = current.name_next; 2010 } 2011 } 2012 }, 2013 lookupNode(parent, name) { 2014 var errCode = FS.mayLookup(parent); 2015 if (errCode) { 2016 throw new FS.ErrnoError(errCode); 2017 } 2018 var hash = FS.hashName(parent.id, name); 2019 for (var node = FS.nameTable[hash]; node; node = node.name_next) { 2020 var nodeName = node.name; 2021 if (node.parent.id === parent.id && nodeName === name) { 2022 return node; 2023 } 2024 } 2025 // if we failed to find it in the cache, call into the VFS 2026 return FS.lookup(parent, name); 2027 }, 2028 createNode(parent, name, mode, rdev) { 2029 var node = new FS.FSNode(parent, name, mode, rdev); 2030 2031 FS.hashAddNode(node); 2032 2033 return node; 2034 }, 2035 destroyNode(node) { 2036 FS.hashRemoveNode(node); 2037 }, 2038 isRoot(node) { 2039 return node === node.parent; 2040 }, 2041 isMountpoint(node) { 2042 return !!node.mounted; 2043 }, 2044 isFile(mode) { 2045 return (mode & 61440) === 32768; 2046 }, 2047 isDir(mode) { 2048 return (mode & 61440) === 16384; 2049 }, 2050 isLink(mode) { 2051 return (mode & 61440) === 40960; 2052 }, 2053 isChrdev(mode) { 2054 return (mode & 61440) === 8192; 2055 }, 2056 isBlkdev(mode) { 2057 return (mode & 61440) === 24576; 2058 }, 2059 isFIFO(mode) { 2060 return (mode & 61440) === 4096; 2061 }, 2062 isSocket(mode) { 2063 return (mode & 49152) === 49152; 2064 }, 2065 flagsToPermissionString(flag) { 2066 var perms = ['r', 'w', 'rw'][flag & 3]; 2067 if ((flag & 512)) { 2068 perms += 'w'; 2069 } 2070 return perms; 2071 }, 2072 nodePermissions(node, perms) { 2073 if (FS.ignorePermissions) { 2074 return 0; 2075 } 2076 // return 0 if any user, group or owner bits are set. 2077 if (perms.includes('r') && !(node.mode & 292)) { 2078 return 2; 2079 } else if (perms.includes('w') && !(node.mode & 146)) { 2080 return 2; 2081 } else if (perms.includes('x') && !(node.mode & 73)) { 2082 return 2; 2083 } 2084 return 0; 2085 }, 2086 mayLookup(dir) { 2087 if (!FS.isDir(dir.mode)) return 54; 2088 var errCode = FS.nodePermissions(dir, 'x'); 2089 if (errCode) return errCode; 2090 if (!dir.node_ops.lookup) return 2; 2091 return 0; 2092 }, 2093 mayCreate(dir, name) { 2094 try { 2095 var node = FS.lookupNode(dir, name); 2096 return 20; 2097 } catch (e) { 2098 } 2099 return FS.nodePermissions(dir, 'wx'); 2100 }, 2101 mayDelete(dir, name, isdir) { 2102 var node; 2103 try { 2104 node = FS.lookupNode(dir, name); 2105 } catch (e) { 2106 return e.errno; 2107 } 2108 var errCode = FS.nodePermissions(dir, 'wx'); 2109 if (errCode) { 2110 return errCode; 2111 } 2112 if (isdir) { 2113 if (!FS.isDir(node.mode)) { 2114 return 54; 2115 } 2116 if (FS.isRoot(node) || FS.getPath(node) === FS.cwd()) { 2117 return 10; 2118 } 2119 } else { 2120 if (FS.isDir(node.mode)) { 2121 return 31; 2122 } 2123 } 2124 return 0; 2125 }, 2126 mayOpen(node, flags) { 2127 if (!node) { 2128 return 44; 2129 } 2130 if (FS.isLink(node.mode)) { 2131 return 32; 2132 } else if (FS.isDir(node.mode)) { 2133 if (FS.flagsToPermissionString(flags) !== 'r' || // opening for write 2134 (flags & 512)) { // TODO: check for O_SEARCH? (== search for dir only) 2135 return 31; 2136 } 2137 } 2138 return FS.nodePermissions(node, FS.flagsToPermissionString(flags)); 2139 }, 2140 MAX_OPEN_FDS:4096, 2141 nextfd() { 2142 for (var fd = 0; fd <= FS.MAX_OPEN_FDS; fd++) { 2143 if (!FS.streams[fd]) { 2144 return fd; 2145 } 2146 } 2147 throw new FS.ErrnoError(33); 2148 }, 2149 getStreamChecked(fd) { 2150 var stream = FS.getStream(fd); 2151 if (!stream) { 2152 throw new FS.ErrnoError(8); 2153 } 2154 return stream; 2155 }, 2156 getStream:(fd) => FS.streams[fd], 2157 createStream(stream, fd = -1) { 2158 2159 // clone it, so we can return an instance of FSStream 2160 stream = Object.assign(new FS.FSStream(), stream); 2161 if (fd == -1) { 2162 fd = FS.nextfd(); 2163 } 2164 stream.fd = fd; 2165 FS.streams[fd] = stream; 2166 return stream; 2167 }, 2168 closeStream(fd) { 2169 FS.streams[fd] = null; 2170 }, 2171 dupStream(origStream, fd = -1) { 2172 var stream = FS.createStream(origStream, fd); 2173 stream.stream_ops?.dup?.(stream); 2174 return stream; 2175 }, 2176 chrdev_stream_ops:{ 2177 open(stream) { 2178 var device = FS.getDevice(stream.node.rdev); 2179 // override node's stream ops with the device's 2180 stream.stream_ops = device.stream_ops; 2181 // forward the open call 2182 stream.stream_ops.open?.(stream); 2183 }, 2184 llseek() { 2185 throw new FS.ErrnoError(70); 2186 }, 2187 }, 2188 major:(dev) => ((dev) >> 8), 2189 minor:(dev) => ((dev) & 0xff), 2190 makedev:(ma, mi) => ((ma) << 8 | (mi)), 2191 registerDevice(dev, ops) { 2192 FS.devices[dev] = { stream_ops: ops }; 2193 }, 2194 getDevice:(dev) => FS.devices[dev], 2195 getMounts(mount) { 2196 var mounts = []; 2197 var check = [mount]; 2198 2199 while (check.length) { 2200 var m = check.pop(); 2201 2202 mounts.push(m); 2203 2204 check.push(...m.mounts); 2205 } 2206 2207 return mounts; 2208 }, 2209 syncfs(populate, callback) { 2210 if (typeof populate == 'function') { 2211 callback = populate; 2212 populate = false; 2213 } 2214 2215 FS.syncFSRequests++; 2216 2217 if (FS.syncFSRequests > 1) { 2218 err(`warning: ${FS.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`); 2219 } 2220 2221 var mounts = FS.getMounts(FS.root.mount); 2222 var completed = 0; 2223 2224 function doCallback(errCode) { 2225 FS.syncFSRequests--; 2226 return callback(errCode); 2227 } 2228 2229 function done(errCode) { 2230 if (errCode) { 2231 if (!done.errored) { 2232 done.errored = true; 2233 return doCallback(errCode); 2234 } 2235 return; 2236 } 2237 if (++completed >= mounts.length) { 2238 doCallback(null); 2239 } 2240 }; 2241 2242 // sync all mounts 2243 mounts.forEach((mount) => { 2244 if (!mount.type.syncfs) { 2245 return done(null); 2246 } 2247 mount.type.syncfs(mount, populate, done); 2248 }); 2249 }, 2250 mount(type, opts, mountpoint) { 2251 var root = mountpoint === '/'; 2252 var pseudo = !mountpoint; 2253 var node; 2254 2255 if (root && FS.root) { 2256 throw new FS.ErrnoError(10); 2257 } else if (!root && !pseudo) { 2258 var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); 2259 2260 mountpoint = lookup.path; // use the absolute path 2261 node = lookup.node; 2262 2263 if (FS.isMountpoint(node)) { 2264 throw new FS.ErrnoError(10); 2265 } 2266 2267 if (!FS.isDir(node.mode)) { 2268 throw new FS.ErrnoError(54); 2269 } 2270 } 2271 2272 var mount = { 2273 type, 2274 opts, 2275 mountpoint, 2276 mounts: [] 2277 }; 2278 2279 // create a root node for the fs 2280 var mountRoot = type.mount(mount); 2281 mountRoot.mount = mount; 2282 mount.root = mountRoot; 2283 2284 if (root) { 2285 FS.root = mountRoot; 2286 } else if (node) { 2287 // set as a mountpoint 2288 node.mounted = mount; 2289 2290 // add the new mount to the current mount's children 2291 if (node.mount) { 2292 node.mount.mounts.push(mount); 2293 } 2294 } 2295 2296 return mountRoot; 2297 }, 2298 unmount(mountpoint) { 2299 var lookup = FS.lookupPath(mountpoint, { follow_mount: false }); 2300 2301 if (!FS.isMountpoint(lookup.node)) { 2302 throw new FS.ErrnoError(28); 2303 } 2304 2305 // destroy the nodes for this mount, and all its child mounts 2306 var node = lookup.node; 2307 var mount = node.mounted; 2308 var mounts = FS.getMounts(mount); 2309 2310 Object.keys(FS.nameTable).forEach((hash) => { 2311 var current = FS.nameTable[hash]; 2312 2313 while (current) { 2314 var next = current.name_next; 2315 2316 if (mounts.includes(current.mount)) { 2317 FS.destroyNode(current); 2318 } 2319 2320 current = next; 2321 } 2322 }); 2323 2324 // no longer a mountpoint 2325 node.mounted = null; 2326 2327 // remove this mount from the child mounts 2328 var idx = node.mount.mounts.indexOf(mount); 2329 node.mount.mounts.splice(idx, 1); 2330 }, 2331 lookup(parent, name) { 2332 return parent.node_ops.lookup(parent, name); 2333 }, 2334 mknod(path, mode, dev) { 2335 var lookup = FS.lookupPath(path, { parent: true }); 2336 var parent = lookup.node; 2337 var name = PATH.basename(path); 2338 if (!name || name === '.' || name === '..') { 2339 throw new FS.ErrnoError(28); 2340 } 2341 var errCode = FS.mayCreate(parent, name); 2342 if (errCode) { 2343 throw new FS.ErrnoError(errCode); 2344 } 2345 if (!parent.node_ops.mknod) { 2346 throw new FS.ErrnoError(63); 2347 } 2348 return parent.node_ops.mknod(parent, name, mode, dev); 2349 }, 2350 create(path, mode) { 2351 mode = mode !== undefined ? mode : 438 /* 0666 */; 2352 mode &= 4095; 2353 mode |= 32768; 2354 return FS.mknod(path, mode, 0); 2355 }, 2356 mkdir(path, mode) { 2357 mode = mode !== undefined ? mode : 511 /* 0777 */; 2358 mode &= 511 | 512; 2359 mode |= 16384; 2360 return FS.mknod(path, mode, 0); 2361 }, 2362 mkdirTree(path, mode) { 2363 var dirs = path.split('/'); 2364 var d = ''; 2365 for (var i = 0; i < dirs.length; ++i) { 2366 if (!dirs[i]) continue; 2367 d += '/' + dirs[i]; 2368 try { 2369 FS.mkdir(d, mode); 2370 } catch(e) { 2371 if (e.errno != 20) throw e; 2372 } 2373 } 2374 }, 2375 mkdev(path, mode, dev) { 2376 if (typeof dev == 'undefined') { 2377 dev = mode; 2378 mode = 438 /* 0666 */; 2379 } 2380 mode |= 8192; 2381 return FS.mknod(path, mode, dev); 2382 }, 2383 symlink(oldpath, newpath) { 2384 if (!PATH_FS.resolve(oldpath)) { 2385 throw new FS.ErrnoError(44); 2386 } 2387 var lookup = FS.lookupPath(newpath, { parent: true }); 2388 var parent = lookup.node; 2389 if (!parent) { 2390 throw new FS.ErrnoError(44); 2391 } 2392 var newname = PATH.basename(newpath); 2393 var errCode = FS.mayCreate(parent, newname); 2394 if (errCode) { 2395 throw new FS.ErrnoError(errCode); 2396 } 2397 if (!parent.node_ops.symlink) { 2398 throw new FS.ErrnoError(63); 2399 } 2400 return parent.node_ops.symlink(parent, newname, oldpath); 2401 }, 2402 rename(old_path, new_path) { 2403 var old_dirname = PATH.dirname(old_path); 2404 var new_dirname = PATH.dirname(new_path); 2405 var old_name = PATH.basename(old_path); 2406 var new_name = PATH.basename(new_path); 2407 // parents must exist 2408 var lookup, old_dir, new_dir; 2409 2410 // let the errors from non existent directories percolate up 2411 lookup = FS.lookupPath(old_path, { parent: true }); 2412 old_dir = lookup.node; 2413 lookup = FS.lookupPath(new_path, { parent: true }); 2414 new_dir = lookup.node; 2415 2416 if (!old_dir || !new_dir) throw new FS.ErrnoError(44); 2417 // need to be part of the same mount 2418 if (old_dir.mount !== new_dir.mount) { 2419 throw new FS.ErrnoError(75); 2420 } 2421 // source must exist 2422 var old_node = FS.lookupNode(old_dir, old_name); 2423 // old path should not be an ancestor of the new path 2424 var relative = PATH_FS.relative(old_path, new_dirname); 2425 if (relative.charAt(0) !== '.') { 2426 throw new FS.ErrnoError(28); 2427 } 2428 // new path should not be an ancestor of the old path 2429 relative = PATH_FS.relative(new_path, old_dirname); 2430 if (relative.charAt(0) !== '.') { 2431 throw new FS.ErrnoError(55); 2432 } 2433 // see if the new path already exists 2434 var new_node; 2435 try { 2436 new_node = FS.lookupNode(new_dir, new_name); 2437 } catch (e) { 2438 // not fatal 2439 } 2440 // early out if nothing needs to change 2441 if (old_node === new_node) { 2442 return; 2443 } 2444 // we'll need to delete the old entry 2445 var isdir = FS.isDir(old_node.mode); 2446 var errCode = FS.mayDelete(old_dir, old_name, isdir); 2447 if (errCode) { 2448 throw new FS.ErrnoError(errCode); 2449 } 2450 // need delete permissions if we'll be overwriting. 2451 // need create permissions if new doesn't already exist. 2452 errCode = new_node ? 2453 FS.mayDelete(new_dir, new_name, isdir) : 2454 FS.mayCreate(new_dir, new_name); 2455 if (errCode) { 2456 throw new FS.ErrnoError(errCode); 2457 } 2458 if (!old_dir.node_ops.rename) { 2459 throw new FS.ErrnoError(63); 2460 } 2461 if (FS.isMountpoint(old_node) || (new_node && FS.isMountpoint(new_node))) { 2462 throw new FS.ErrnoError(10); 2463 } 2464 // if we are going to change the parent, check write permissions 2465 if (new_dir !== old_dir) { 2466 errCode = FS.nodePermissions(old_dir, 'w'); 2467 if (errCode) { 2468 throw new FS.ErrnoError(errCode); 2469 } 2470 } 2471 // remove the node from the lookup hash 2472 FS.hashRemoveNode(old_node); 2473 // do the underlying fs rename 2474 try { 2475 old_dir.node_ops.rename(old_node, new_dir, new_name); 2476 } catch (e) { 2477 throw e; 2478 } finally { 2479 // add the node back to the hash (in case node_ops.rename 2480 // changed its name) 2481 FS.hashAddNode(old_node); 2482 } 2483 }, 2484 rmdir(path) { 2485 var lookup = FS.lookupPath(path, { parent: true }); 2486 var parent = lookup.node; 2487 var name = PATH.basename(path); 2488 var node = FS.lookupNode(parent, name); 2489 var errCode = FS.mayDelete(parent, name, true); 2490 if (errCode) { 2491 throw new FS.ErrnoError(errCode); 2492 } 2493 if (!parent.node_ops.rmdir) { 2494 throw new FS.ErrnoError(63); 2495 } 2496 if (FS.isMountpoint(node)) { 2497 throw new FS.ErrnoError(10); 2498 } 2499 parent.node_ops.rmdir(parent, name); 2500 FS.destroyNode(node); 2501 }, 2502 readdir(path) { 2503 var lookup = FS.lookupPath(path, { follow: true }); 2504 var node = lookup.node; 2505 if (!node.node_ops.readdir) { 2506 throw new FS.ErrnoError(54); 2507 } 2508 return node.node_ops.readdir(node); 2509 }, 2510 unlink(path) { 2511 var lookup = FS.lookupPath(path, { parent: true }); 2512 var parent = lookup.node; 2513 if (!parent) { 2514 throw new FS.ErrnoError(44); 2515 } 2516 var name = PATH.basename(path); 2517 var node = FS.lookupNode(parent, name); 2518 var errCode = FS.mayDelete(parent, name, false); 2519 if (errCode) { 2520 // According to POSIX, we should map EISDIR to EPERM, but 2521 // we instead do what Linux does (and we must, as we use 2522 // the musl linux libc). 2523 throw new FS.ErrnoError(errCode); 2524 } 2525 if (!parent.node_ops.unlink) { 2526 throw new FS.ErrnoError(63); 2527 } 2528 if (FS.isMountpoint(node)) { 2529 throw new FS.ErrnoError(10); 2530 } 2531 parent.node_ops.unlink(parent, name); 2532 FS.destroyNode(node); 2533 }, 2534 readlink(path) { 2535 var lookup = FS.lookupPath(path); 2536 var link = lookup.node; 2537 if (!link) { 2538 throw new FS.ErrnoError(44); 2539 } 2540 if (!link.node_ops.readlink) { 2541 throw new FS.ErrnoError(28); 2542 } 2543 return PATH_FS.resolve(FS.getPath(link.parent), link.node_ops.readlink(link)); 2544 }, 2545 stat(path, dontFollow) { 2546 var lookup = FS.lookupPath(path, { follow: !dontFollow }); 2547 var node = lookup.node; 2548 if (!node) { 2549 throw new FS.ErrnoError(44); 2550 } 2551 if (!node.node_ops.getattr) { 2552 throw new FS.ErrnoError(63); 2553 } 2554 return node.node_ops.getattr(node); 2555 }, 2556 lstat(path) { 2557 return FS.stat(path, true); 2558 }, 2559 chmod(path, mode, dontFollow) { 2560 var node; 2561 if (typeof path == 'string') { 2562 var lookup = FS.lookupPath(path, { follow: !dontFollow }); 2563 node = lookup.node; 2564 } else { 2565 node = path; 2566 } 2567 if (!node.node_ops.setattr) { 2568 throw new FS.ErrnoError(63); 2569 } 2570 node.node_ops.setattr(node, { 2571 mode: (mode & 4095) | (node.mode & ~4095), 2572 timestamp: Date.now() 2573 }); 2574 }, 2575 lchmod(path, mode) { 2576 FS.chmod(path, mode, true); 2577 }, 2578 fchmod(fd, mode) { 2579 var stream = FS.getStreamChecked(fd); 2580 FS.chmod(stream.node, mode); 2581 }, 2582 chown(path, uid, gid, dontFollow) { 2583 var node; 2584 if (typeof path == 'string') { 2585 var lookup = FS.lookupPath(path, { follow: !dontFollow }); 2586 node = lookup.node; 2587 } else { 2588 node = path; 2589 } 2590 if (!node.node_ops.setattr) { 2591 throw new FS.ErrnoError(63); 2592 } 2593 node.node_ops.setattr(node, { 2594 timestamp: Date.now() 2595 // we ignore the uid / gid for now 2596 }); 2597 }, 2598 lchown(path, uid, gid) { 2599 FS.chown(path, uid, gid, true); 2600 }, 2601 fchown(fd, uid, gid) { 2602 var stream = FS.getStreamChecked(fd); 2603 FS.chown(stream.node, uid, gid); 2604 }, 2605 truncate(path, len) { 2606 if (len < 0) { 2607 throw new FS.ErrnoError(28); 2608 } 2609 var node; 2610 if (typeof path == 'string') { 2611 var lookup = FS.lookupPath(path, { follow: true }); 2612 node = lookup.node; 2613 } else { 2614 node = path; 2615 } 2616 if (!node.node_ops.setattr) { 2617 throw new FS.ErrnoError(63); 2618 } 2619 if (FS.isDir(node.mode)) { 2620 throw new FS.ErrnoError(31); 2621 } 2622 if (!FS.isFile(node.mode)) { 2623 throw new FS.ErrnoError(28); 2624 } 2625 var errCode = FS.nodePermissions(node, 'w'); 2626 if (errCode) { 2627 throw new FS.ErrnoError(errCode); 2628 } 2629 node.node_ops.setattr(node, { 2630 size: len, 2631 timestamp: Date.now() 2632 }); 2633 }, 2634 ftruncate(fd, len) { 2635 var stream = FS.getStreamChecked(fd); 2636 if ((stream.flags & 2097155) === 0) { 2637 throw new FS.ErrnoError(28); 2638 } 2639 FS.truncate(stream.node, len); 2640 }, 2641 utime(path, atime, mtime) { 2642 var lookup = FS.lookupPath(path, { follow: true }); 2643 var node = lookup.node; 2644 node.node_ops.setattr(node, { 2645 timestamp: Math.max(atime, mtime) 2646 }); 2647 }, 2648 open(path, flags, mode) { 2649 if (path === "") { 2650 throw new FS.ErrnoError(44); 2651 } 2652 flags = typeof flags == 'string' ? FS_modeStringToFlags(flags) : flags; 2653 mode = typeof mode == 'undefined' ? 438 /* 0666 */ : mode; 2654 if ((flags & 64)) { 2655 mode = (mode & 4095) | 32768; 2656 } else { 2657 mode = 0; 2658 } 2659 var node; 2660 if (typeof path == 'object') { 2661 node = path; 2662 } else { 2663 path = PATH.normalize(path); 2664 try { 2665 var lookup = FS.lookupPath(path, { 2666 follow: !(flags & 131072) 2667 }); 2668 node = lookup.node; 2669 } catch (e) { 2670 // ignore 2671 } 2672 } 2673 // perhaps we need to create the node 2674 var created = false; 2675 if ((flags & 64)) { 2676 if (node) { 2677 // if O_CREAT and O_EXCL are set, error out if the node already exists 2678 if ((flags & 128)) { 2679 throw new FS.ErrnoError(20); 2680 } 2681 } else { 2682 // node doesn't exist, try to create it 2683 node = FS.mknod(path, mode, 0); 2684 created = true; 2685 } 2686 } 2687 if (!node) { 2688 throw new FS.ErrnoError(44); 2689 } 2690 // can't truncate a device 2691 if (FS.isChrdev(node.mode)) { 2692 flags &= ~512; 2693 } 2694 // if asked only for a directory, then this must be one 2695 if ((flags & 65536) && !FS.isDir(node.mode)) { 2696 throw new FS.ErrnoError(54); 2697 } 2698 // check permissions, if this is not a file we just created now (it is ok to 2699 // create and write to a file with read-only permissions; it is read-only 2700 // for later use) 2701 if (!created) { 2702 var errCode = FS.mayOpen(node, flags); 2703 if (errCode) { 2704 throw new FS.ErrnoError(errCode); 2705 } 2706 } 2707 // do truncation if necessary 2708 if ((flags & 512) && !created) { 2709 FS.truncate(node, 0); 2710 } 2711 // we've already handled these, don't pass down to the underlying vfs 2712 flags &= ~(128 | 512 | 131072); 2713 2714 // register the stream with the filesystem 2715 var stream = FS.createStream({ 2716 node, 2717 path: FS.getPath(node), // we want the absolute path to the node 2718 flags, 2719 seekable: true, 2720 position: 0, 2721 stream_ops: node.stream_ops, 2722 // used by the file family libc calls (fopen, fwrite, ferror, etc.) 2723 ungotten: [], 2724 error: false 2725 }); 2726 // call the new stream's open function 2727 if (stream.stream_ops.open) { 2728 stream.stream_ops.open(stream); 2729 } 2730 if (Module['logReadFiles'] && !(flags & 1)) { 2731 if (!FS.readFiles) FS.readFiles = {}; 2732 if (!(path in FS.readFiles)) { 2733 FS.readFiles[path] = 1; 2734 } 2735 } 2736 return stream; 2737 }, 2738 close(stream) { 2739 if (FS.isClosed(stream)) { 2740 throw new FS.ErrnoError(8); 2741 } 2742 if (stream.getdents) stream.getdents = null; // free readdir state 2743 try { 2744 if (stream.stream_ops.close) { 2745 stream.stream_ops.close(stream); 2746 } 2747 } catch (e) { 2748 throw e; 2749 } finally { 2750 FS.closeStream(stream.fd); 2751 } 2752 stream.fd = null; 2753 }, 2754 isClosed(stream) { 2755 return stream.fd === null; 2756 }, 2757 llseek(stream, offset, whence) { 2758 if (FS.isClosed(stream)) { 2759 throw new FS.ErrnoError(8); 2760 } 2761 if (!stream.seekable || !stream.stream_ops.llseek) { 2762 throw new FS.ErrnoError(70); 2763 } 2764 if (whence != 0 && whence != 1 && whence != 2) { 2765 throw new FS.ErrnoError(28); 2766 } 2767 stream.position = stream.stream_ops.llseek(stream, offset, whence); 2768 stream.ungotten = []; 2769 return stream.position; 2770 }, 2771 read(stream, buffer, offset, length, position) { 2772 if (length < 0 || position < 0) { 2773 throw new FS.ErrnoError(28); 2774 } 2775 if (FS.isClosed(stream)) { 2776 throw new FS.ErrnoError(8); 2777 } 2778 if ((stream.flags & 2097155) === 1) { 2779 throw new FS.ErrnoError(8); 2780 } 2781 if (FS.isDir(stream.node.mode)) { 2782 throw new FS.ErrnoError(31); 2783 } 2784 if (!stream.stream_ops.read) { 2785 throw new FS.ErrnoError(28); 2786 } 2787 var seeking = typeof position != 'undefined'; 2788 if (!seeking) { 2789 position = stream.position; 2790 } else if (!stream.seekable) { 2791 throw new FS.ErrnoError(70); 2792 } 2793 var bytesRead = stream.stream_ops.read(stream, buffer, offset, length, position); 2794 if (!seeking) stream.position += bytesRead; 2795 return bytesRead; 2796 }, 2797 write(stream, buffer, offset, length, position, canOwn) { 2798 if (length < 0 || position < 0) { 2799 throw new FS.ErrnoError(28); 2800 } 2801 if (FS.isClosed(stream)) { 2802 throw new FS.ErrnoError(8); 2803 } 2804 if ((stream.flags & 2097155) === 0) { 2805 throw new FS.ErrnoError(8); 2806 } 2807 if (FS.isDir(stream.node.mode)) { 2808 throw new FS.ErrnoError(31); 2809 } 2810 if (!stream.stream_ops.write) { 2811 throw new FS.ErrnoError(28); 2812 } 2813 if (stream.seekable && stream.flags & 1024) { 2814 // seek to the end before writing in append mode 2815 FS.llseek(stream, 0, 2); 2816 } 2817 var seeking = typeof position != 'undefined'; 2818 if (!seeking) { 2819 position = stream.position; 2820 } else if (!stream.seekable) { 2821 throw new FS.ErrnoError(70); 2822 } 2823 var bytesWritten = stream.stream_ops.write(stream, buffer, offset, length, position, canOwn); 2824 if (!seeking) stream.position += bytesWritten; 2825 return bytesWritten; 2826 }, 2827 allocate(stream, offset, length) { 2828 if (FS.isClosed(stream)) { 2829 throw new FS.ErrnoError(8); 2830 } 2831 if (offset < 0 || length <= 0) { 2832 throw new FS.ErrnoError(28); 2833 } 2834 if ((stream.flags & 2097155) === 0) { 2835 throw new FS.ErrnoError(8); 2836 } 2837 if (!FS.isFile(stream.node.mode) && !FS.isDir(stream.node.mode)) { 2838 throw new FS.ErrnoError(43); 2839 } 2840 if (!stream.stream_ops.allocate) { 2841 throw new FS.ErrnoError(138); 2842 } 2843 stream.stream_ops.allocate(stream, offset, length); 2844 }, 2845 mmap(stream, length, position, prot, flags) { 2846 // User requests writing to file (prot & PROT_WRITE != 0). 2847 // Checking if we have permissions to write to the file unless 2848 // MAP_PRIVATE flag is set. According to POSIX spec it is possible 2849 // to write to file opened in read-only mode with MAP_PRIVATE flag, 2850 // as all modifications will be visible only in the memory of 2851 // the current process. 2852 if ((prot & 2) !== 0 2853 && (flags & 2) === 0 2854 && (stream.flags & 2097155) !== 2) { 2855 throw new FS.ErrnoError(2); 2856 } 2857 if ((stream.flags & 2097155) === 1) { 2858 throw new FS.ErrnoError(2); 2859 } 2860 if (!stream.stream_ops.mmap) { 2861 throw new FS.ErrnoError(43); 2862 } 2863 return stream.stream_ops.mmap(stream, length, position, prot, flags); 2864 }, 2865 msync(stream, buffer, offset, length, mmapFlags) { 2866 if (!stream.stream_ops.msync) { 2867 return 0; 2868 } 2869 return stream.stream_ops.msync(stream, buffer, offset, length, mmapFlags); 2870 }, 2871 ioctl(stream, cmd, arg) { 2872 if (!stream.stream_ops.ioctl) { 2873 throw new FS.ErrnoError(59); 2874 } 2875 return stream.stream_ops.ioctl(stream, cmd, arg); 2876 }, 2877 readFile(path, opts = {}) { 2878 opts.flags = opts.flags || 0; 2879 opts.encoding = opts.encoding || 'binary'; 2880 if (opts.encoding !== 'utf8' && opts.encoding !== 'binary') { 2881 throw new Error(`Invalid encoding type "${opts.encoding}"`); 2882 } 2883 var ret; 2884 var stream = FS.open(path, opts.flags); 2885 var stat = FS.stat(path); 2886 var length = stat.size; 2887 var buf = new Uint8Array(length); 2888 FS.read(stream, buf, 0, length, 0); 2889 if (opts.encoding === 'utf8') { 2890 ret = UTF8ArrayToString(buf, 0); 2891 } else if (opts.encoding === 'binary') { 2892 ret = buf; 2893 } 2894 FS.close(stream); 2895 return ret; 2896 }, 2897 writeFile(path, data, opts = {}) { 2898 opts.flags = opts.flags || 577; 2899 var stream = FS.open(path, opts.flags, opts.mode); 2900 if (typeof data == 'string') { 2901 var buf = new Uint8Array(lengthBytesUTF8(data)+1); 2902 var actualNumBytes = stringToUTF8Array(data, buf, 0, buf.length); 2903 FS.write(stream, buf, 0, actualNumBytes, undefined, opts.canOwn); 2904 } else if (ArrayBuffer.isView(data)) { 2905 FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn); 2906 } else { 2907 throw new Error('Unsupported data type'); 2908 } 2909 FS.close(stream); 2910 }, 2911 cwd:() => FS.currentPath, 2912 chdir(path) { 2913 var lookup = FS.lookupPath(path, { follow: true }); 2914 if (lookup.node === null) { 2915 throw new FS.ErrnoError(44); 2916 } 2917 if (!FS.isDir(lookup.node.mode)) { 2918 throw new FS.ErrnoError(54); 2919 } 2920 var errCode = FS.nodePermissions(lookup.node, 'x'); 2921 if (errCode) { 2922 throw new FS.ErrnoError(errCode); 2923 } 2924 FS.currentPath = lookup.path; 2925 }, 2926 createDefaultDirectories() { 2927 FS.mkdir('/tmp'); 2928 FS.mkdir('/home'); 2929 FS.mkdir('/home/web_user'); 2930 }, 2931 createDefaultDevices() { 2932 // create /dev 2933 FS.mkdir('/dev'); 2934 // setup /dev/null 2935 FS.registerDevice(FS.makedev(1, 3), { 2936 read: () => 0, 2937 write: (stream, buffer, offset, length, pos) => length, 2938 }); 2939 FS.mkdev('/dev/null', FS.makedev(1, 3)); 2940 // setup /dev/tty and /dev/tty1 2941 // stderr needs to print output using err() rather than out() 2942 // so we register a second tty just for it. 2943 TTY.register(FS.makedev(5, 0), TTY.default_tty_ops); 2944 TTY.register(FS.makedev(6, 0), TTY.default_tty1_ops); 2945 FS.mkdev('/dev/tty', FS.makedev(5, 0)); 2946 FS.mkdev('/dev/tty1', FS.makedev(6, 0)); 2947 // setup /dev/[u]random 2948 // use a buffer to avoid overhead of individual crypto calls per byte 2949 var randomBuffer = new Uint8Array(1024), randomLeft = 0; 2950 var randomByte = () => { 2951 if (randomLeft === 0) { 2952 randomLeft = randomFill(randomBuffer).byteLength; 2953 } 2954 return randomBuffer[--randomLeft]; 2955 }; 2956 FS.createDevice('/dev', 'random', randomByte); 2957 FS.createDevice('/dev', 'urandom', randomByte); 2958 // we're not going to emulate the actual shm device, 2959 // just create the tmp dirs that reside in it commonly 2960 FS.mkdir('/dev/shm'); 2961 FS.mkdir('/dev/shm/tmp'); 2962 }, 2963 createSpecialDirectories() { 2964 // create /proc/self/fd which allows /proc/self/fd/6 => readlink gives the 2965 // name of the stream for fd 6 (see test_unistd_ttyname) 2966 FS.mkdir('/proc'); 2967 var proc_self = FS.mkdir('/proc/self'); 2968 FS.mkdir('/proc/self/fd'); 2969 FS.mount({ 2970 mount() { 2971 var node = FS.createNode(proc_self, 'fd', 16384 | 511 /* 0777 */, 73); 2972 node.node_ops = { 2973 lookup(parent, name) { 2974 var fd = +name; 2975 var stream = FS.getStreamChecked(fd); 2976 var ret = { 2977 parent: null, 2978 mount: { mountpoint: 'fake' }, 2979 node_ops: { readlink: () => stream.path }, 2980 }; 2981 ret.parent = ret; // make it look like a simple root node 2982 return ret; 2983 } 2984 }; 2985 return node; 2986 } 2987 }, {}, '/proc/self/fd'); 2988 }, 2989 createStandardStreams() { 2990 // TODO deprecate the old functionality of a single 2991 // input / output callback and that utilizes FS.createDevice 2992 // and instead require a unique set of stream ops 2993 2994 // by default, we symlink the standard streams to the 2995 // default tty devices. however, if the standard streams 2996 // have been overwritten we create a unique device for 2997 // them instead. 2998 if (Module['stdin']) { 2999 FS.createDevice('/dev', 'stdin', Module['stdin']); 3000 } else { 3001 FS.symlink('/dev/tty', '/dev/stdin'); 3002 } 3003 if (Module['stdout']) { 3004 FS.createDevice('/dev', 'stdout', null, Module['stdout']); 3005 } else { 3006 FS.symlink('/dev/tty', '/dev/stdout'); 3007 } 3008 if (Module['stderr']) { 3009 FS.createDevice('/dev', 'stderr', null, Module['stderr']); 3010 } else { 3011 FS.symlink('/dev/tty1', '/dev/stderr'); 3012 } 3013 3014 // open default streams for the stdin, stdout and stderr devices 3015 var stdin = FS.open('/dev/stdin', 0); 3016 var stdout = FS.open('/dev/stdout', 1); 3017 var stderr = FS.open('/dev/stderr', 1); 3018 }, 3019 staticInit() { 3020 // Some errors may happen quite a bit, to avoid overhead we reuse them (and suffer a lack of stack info) 3021 [44].forEach((code) => { 3022 FS.genericErrors[code] = new FS.ErrnoError(code); 3023 FS.genericErrors[code].stack = '<generic error, no stack>'; 3024 }); 3025 3026 FS.nameTable = new Array(4096); 3027 3028 FS.mount(MEMFS, {}, '/'); 3029 3030 FS.createDefaultDirectories(); 3031 FS.createDefaultDevices(); 3032 FS.createSpecialDirectories(); 3033 3034 FS.filesystems = { 3035 'MEMFS': MEMFS, 3036 }; 3037 }, 3038 init(input, output, error) { 3039 FS.init.initialized = true; 3040 3041 // Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here 3042 Module['stdin'] = input || Module['stdin']; 3043 Module['stdout'] = output || Module['stdout']; 3044 Module['stderr'] = error || Module['stderr']; 3045 3046 FS.createStandardStreams(); 3047 }, 3048 quit() { 3049 FS.init.initialized = false; 3050 // force-flush all streams, so we get musl std streams printed out 3051 _fflush(0); 3052 // close all of our streams 3053 for (var i = 0; i < FS.streams.length; i++) { 3054 var stream = FS.streams[i]; 3055 if (!stream) { 3056 continue; 3057 } 3058 FS.close(stream); 3059 } 3060 }, 3061 findObject(path, dontResolveLastLink) { 3062 var ret = FS.analyzePath(path, dontResolveLastLink); 3063 if (!ret.exists) { 3064 return null; 3065 } 3066 return ret.object; 3067 }, 3068 analyzePath(path, dontResolveLastLink) { 3069 // operate from within the context of the symlink's target 3070 try { 3071 var lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); 3072 path = lookup.path; 3073 } catch (e) { 3074 } 3075 var ret = { 3076 isRoot: false, exists: false, error: 0, name: null, path: null, object: null, 3077 parentExists: false, parentPath: null, parentObject: null 3078 }; 3079 try { 3080 var lookup = FS.lookupPath(path, { parent: true }); 3081 ret.parentExists = true; 3082 ret.parentPath = lookup.path; 3083 ret.parentObject = lookup.node; 3084 ret.name = PATH.basename(path); 3085 lookup = FS.lookupPath(path, { follow: !dontResolveLastLink }); 3086 ret.exists = true; 3087 ret.path = lookup.path; 3088 ret.object = lookup.node; 3089 ret.name = lookup.node.name; 3090 ret.isRoot = lookup.path === '/'; 3091 } catch (e) { 3092 ret.error = e.errno; 3093 }; 3094 return ret; 3095 }, 3096 createPath(parent, path, canRead, canWrite) { 3097 parent = typeof parent == 'string' ? parent : FS.getPath(parent); 3098 var parts = path.split('/').reverse(); 3099 while (parts.length) { 3100 var part = parts.pop(); 3101 if (!part) continue; 3102 var current = PATH.join2(parent, part); 3103 try { 3104 FS.mkdir(current); 3105 } catch (e) { 3106 // ignore EEXIST 3107 } 3108 parent = current; 3109 } 3110 return current; 3111 }, 3112 createFile(parent, name, properties, canRead, canWrite) { 3113 var path = PATH.join2(typeof parent == 'string' ? parent : FS.getPath(parent), name); 3114 var mode = FS_getMode(canRead, canWrite); 3115 return FS.create(path, mode); 3116 }, 3117 createDataFile(parent, name, data, canRead, canWrite, canOwn) { 3118 var path = name; 3119 if (parent) { 3120 parent = typeof parent == 'string' ? parent : FS.getPath(parent); 3121 path = name ? PATH.join2(parent, name) : parent; 3122 } 3123 var mode = FS_getMode(canRead, canWrite); 3124 var node = FS.create(path, mode); 3125 if (data) { 3126 if (typeof data == 'string') { 3127 var arr = new Array(data.length); 3128 for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i); 3129 data = arr; 3130 } 3131 // make sure we can write to the file 3132 FS.chmod(node, mode | 146); 3133 var stream = FS.open(node, 577); 3134 FS.write(stream, data, 0, data.length, 0, canOwn); 3135 FS.close(stream); 3136 FS.chmod(node, mode); 3137 } 3138 }, 3139 createDevice(parent, name, input, output) { 3140 var path = PATH.join2(typeof parent == 'string' ? parent : FS.getPath(parent), name); 3141 var mode = FS_getMode(!!input, !!output); 3142 if (!FS.createDevice.major) FS.createDevice.major = 64; 3143 var dev = FS.makedev(FS.createDevice.major++, 0); 3144 // Create a fake device that a set of stream ops to emulate 3145 // the old behavior. 3146 FS.registerDevice(dev, { 3147 open(stream) { 3148 stream.seekable = false; 3149 }, 3150 close(stream) { 3151 // flush any pending line data 3152 if (output?.buffer?.length) { 3153 output(10); 3154 } 3155 }, 3156 read(stream, buffer, offset, length, pos /* ignored */) { 3157 var bytesRead = 0; 3158 for (var i = 0; i < length; i++) { 3159 var result; 3160 try { 3161 result = input(); 3162 } catch (e) { 3163 throw new FS.ErrnoError(29); 3164 } 3165 if (result === undefined && bytesRead === 0) { 3166 throw new FS.ErrnoError(6); 3167 } 3168 if (result === null || result === undefined) break; 3169 bytesRead++; 3170 buffer[offset+i] = result; 3171 } 3172 if (bytesRead) { 3173 stream.node.timestamp = Date.now(); 3174 } 3175 return bytesRead; 3176 }, 3177 write(stream, buffer, offset, length, pos) { 3178 for (var i = 0; i < length; i++) { 3179 try { 3180 output(buffer[offset+i]); 3181 } catch (e) { 3182 throw new FS.ErrnoError(29); 3183 } 3184 } 3185 if (length) { 3186 stream.node.timestamp = Date.now(); 3187 } 3188 return i; 3189 } 3190 }); 3191 return FS.mkdev(path, mode, dev); 3192 }, 3193 forceLoadFile(obj) { 3194 if (obj.isDevice || obj.isFolder || obj.link || obj.contents) return true; 3195 if (typeof XMLHttpRequest != 'undefined') { 3196 throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."); 3197 } else if (read_) { 3198 // Command-line. 3199 try { 3200 // WARNING: Can't read binary files in V8's d8 or tracemonkey's js, as 3201 // read() will try to parse UTF8. 3202 obj.contents = intArrayFromString(read_(obj.url), true); 3203 obj.usedBytes = obj.contents.length; 3204 } catch (e) { 3205 throw new FS.ErrnoError(29); 3206 } 3207 } else { 3208 throw new Error('Cannot load without read() or XMLHttpRequest.'); 3209 } 3210 }, 3211 createLazyFile(parent, name, url, canRead, canWrite) { 3212 // Lazy chunked Uint8Array (implements get and length from Uint8Array). 3213 // Actual getting is abstracted away for eventual reuse. 3214 class LazyUint8Array { 3215 constructor() { 3216 this.lengthKnown = false; 3217 this.chunks = []; // Loaded chunks. Index is the chunk number 3218 } 3219 get(idx) { 3220 if (idx > this.length-1 || idx < 0) { 3221 return undefined; 3222 } 3223 var chunkOffset = idx % this.chunkSize; 3224 var chunkNum = (idx / this.chunkSize)|0; 3225 return this.getter(chunkNum)[chunkOffset]; 3226 } 3227 setDataGetter(getter) { 3228 this.getter = getter; 3229 } 3230 cacheLength() { 3231 // Find length 3232 var xhr = new XMLHttpRequest(); 3233 xhr.open('HEAD', url, false); 3234 xhr.send(null); 3235 if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); 3236 var datalength = Number(xhr.getResponseHeader("Content-length")); 3237 var header; 3238 var hasByteServing = (header = xhr.getResponseHeader("Accept-Ranges")) && header === "bytes"; 3239 var usesGzip = (header = xhr.getResponseHeader("Content-Encoding")) && header === "gzip"; 3240 3241 var chunkSize = 1024*1024; // Chunk size in bytes 3242 3243 if (!hasByteServing) chunkSize = datalength; 3244 3245 // Function to get a range from the remote URL. 3246 var doXHR = (from, to) => { 3247 if (from > to) throw new Error("invalid range (" + from + ", " + to + ") or no bytes requested!"); 3248 if (to > datalength-1) throw new Error("only " + datalength + " bytes available! programmer error!"); 3249 3250 // TODO: Use mozResponseArrayBuffer, responseStream, etc. if available. 3251 var xhr = new XMLHttpRequest(); 3252 xhr.open('GET', url, false); 3253 if (datalength !== chunkSize) xhr.setRequestHeader("Range", "bytes=" + from + "-" + to); 3254 3255 // Some hints to the browser that we want binary data. 3256 xhr.responseType = 'arraybuffer'; 3257 if (xhr.overrideMimeType) { 3258 xhr.overrideMimeType('text/plain; charset=x-user-defined'); 3259 } 3260 3261 xhr.send(null); 3262 if (!(xhr.status >= 200 && xhr.status < 300 || xhr.status === 304)) throw new Error("Couldn't load " + url + ". Status: " + xhr.status); 3263 if (xhr.response !== undefined) { 3264 return new Uint8Array(/** @type{Array<number>} */(xhr.response || [])); 3265 } 3266 return intArrayFromString(xhr.responseText || '', true); 3267 }; 3268 var lazyArray = this; 3269 lazyArray.setDataGetter((chunkNum) => { 3270 var start = chunkNum * chunkSize; 3271 var end = (chunkNum+1) * chunkSize - 1; // including this byte 3272 end = Math.min(end, datalength-1); // if datalength-1 is selected, this is the last block 3273 if (typeof lazyArray.chunks[chunkNum] == 'undefined') { 3274 lazyArray.chunks[chunkNum] = doXHR(start, end); 3275 } 3276 if (typeof lazyArray.chunks[chunkNum] == 'undefined') throw new Error('doXHR failed!'); 3277 return lazyArray.chunks[chunkNum]; 3278 }); 3279 3280 if (usesGzip || !datalength) { 3281 // if the server uses gzip or doesn't supply the length, we have to download the whole file to get the (uncompressed) length 3282 chunkSize = datalength = 1; // this will force getter(0)/doXHR do download the whole file 3283 datalength = this.getter(0).length; 3284 chunkSize = datalength; 3285 out("LazyFiles on gzip forces download of the whole file when length is accessed"); 3286 } 3287 3288 this._length = datalength; 3289 this._chunkSize = chunkSize; 3290 this.lengthKnown = true; 3291 } 3292 get length() { 3293 if (!this.lengthKnown) { 3294 this.cacheLength(); 3295 } 3296 return this._length; 3297 } 3298 get chunkSize() { 3299 if (!this.lengthKnown) { 3300 this.cacheLength(); 3301 } 3302 return this._chunkSize; 3303 } 3304 } 3305 3306 if (typeof XMLHttpRequest != 'undefined') { 3307 if (!ENVIRONMENT_IS_WORKER) throw 'Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc'; 3308 var lazyArray = new LazyUint8Array(); 3309 var properties = { isDevice: false, contents: lazyArray }; 3310 } else { 3311 var properties = { isDevice: false, url: url }; 3312 } 3313 3314 var node = FS.createFile(parent, name, properties, canRead, canWrite); 3315 // This is a total hack, but I want to get this lazy file code out of the 3316 // core of MEMFS. If we want to keep this lazy file concept I feel it should 3317 // be its own thin LAZYFS proxying calls to MEMFS. 3318 if (properties.contents) { 3319 node.contents = properties.contents; 3320 } else if (properties.url) { 3321 node.contents = null; 3322 node.url = properties.url; 3323 } 3324 // Add a function that defers querying the file size until it is asked the first time. 3325 Object.defineProperties(node, { 3326 usedBytes: { 3327 get: function() { return this.contents.length; } 3328 } 3329 }); 3330 // override each stream op with one that tries to force load the lazy file first 3331 var stream_ops = {}; 3332 var keys = Object.keys(node.stream_ops); 3333 keys.forEach((key) => { 3334 var fn = node.stream_ops[key]; 3335 stream_ops[key] = (...args) => { 3336 FS.forceLoadFile(node); 3337 return fn(...args); 3338 }; 3339 }); 3340 function writeChunks(stream, buffer, offset, length, position) { 3341 var contents = stream.node.contents; 3342 if (position >= contents.length) 3343 return 0; 3344 var size = Math.min(contents.length - position, length); 3345 if (contents.slice) { // normal array 3346 for (var i = 0; i < size; i++) { 3347 buffer[offset + i] = contents[position + i]; 3348 } 3349 } else { 3350 for (var i = 0; i < size; i++) { // LazyUint8Array from sync binary XHR 3351 buffer[offset + i] = contents.get(position + i); 3352 } 3353 } 3354 return size; 3355 } 3356 // use a custom read function 3357 stream_ops.read = (stream, buffer, offset, length, position) => { 3358 FS.forceLoadFile(node); 3359 return writeChunks(stream, buffer, offset, length, position) 3360 }; 3361 // use a custom mmap function 3362 stream_ops.mmap = (stream, length, position, prot, flags) => { 3363 FS.forceLoadFile(node); 3364 var ptr = mmapAlloc(length); 3365 if (!ptr) { 3366 throw new FS.ErrnoError(48); 3367 } 3368 writeChunks(stream, HEAP8, ptr, length, position); 3369 return { ptr, allocated: true }; 3370 }; 3371 node.stream_ops = stream_ops; 3372 return node; 3373 }, 3374 }; 3375 3376 var SYSCALLS = { 3377 DEFAULT_POLLMASK:5, 3378 calculateAt(dirfd, path, allowEmpty) { 3379 if (PATH.isAbs(path)) { 3380 return path; 3381 } 3382 // relative path 3383 var dir; 3384 if (dirfd === -100) { 3385 dir = FS.cwd(); 3386 } else { 3387 var dirstream = SYSCALLS.getStreamFromFD(dirfd); 3388 dir = dirstream.path; 3389 } 3390 if (path.length == 0) { 3391 if (!allowEmpty) { 3392 throw new FS.ErrnoError(44);; 3393 } 3394 return dir; 3395 } 3396 return PATH.join2(dir, path); 3397 }, 3398 doStat(func, path, buf) { 3399 var stat = func(path); 3400 HEAP32[((buf)>>2)] = stat.dev; 3401 HEAP32[(((buf)+(4))>>2)] = stat.mode; 3402 HEAPU32[(((buf)+(8))>>2)] = stat.nlink; 3403 HEAP32[(((buf)+(12))>>2)] = stat.uid; 3404 HEAP32[(((buf)+(16))>>2)] = stat.gid; 3405 HEAP32[(((buf)+(20))>>2)] = stat.rdev; 3406 HEAP64[(((buf)+(24))>>3)] = BigInt(stat.size); 3407 HEAP32[(((buf)+(32))>>2)] = 4096; 3408 HEAP32[(((buf)+(36))>>2)] = stat.blocks; 3409 var atime = stat.atime.getTime(); 3410 var mtime = stat.mtime.getTime(); 3411 var ctime = stat.ctime.getTime(); 3412 HEAP64[(((buf)+(40))>>3)] = BigInt(Math.floor(atime / 1000)); 3413 HEAPU32[(((buf)+(48))>>2)] = (atime % 1000) * 1000; 3414 HEAP64[(((buf)+(56))>>3)] = BigInt(Math.floor(mtime / 1000)); 3415 HEAPU32[(((buf)+(64))>>2)] = (mtime % 1000) * 1000; 3416 HEAP64[(((buf)+(72))>>3)] = BigInt(Math.floor(ctime / 1000)); 3417 HEAPU32[(((buf)+(80))>>2)] = (ctime % 1000) * 1000; 3418 HEAP64[(((buf)+(88))>>3)] = BigInt(stat.ino); 3419 return 0; 3420 }, 3421 doMsync(addr, stream, len, flags, offset) { 3422 if (!FS.isFile(stream.node.mode)) { 3423 throw new FS.ErrnoError(43); 3424 } 3425 if (flags & 2) { 3426 // MAP_PRIVATE calls need not to be synced back to underlying fs 3427 return 0; 3428 } 3429 var buffer = HEAPU8.slice(addr, addr + len); 3430 FS.msync(stream, buffer, offset, len, flags); 3431 }, 3432 varargs:undefined, 3433 get() { 3434 // the `+` prepended here is necessary to convince the JSCompiler that varargs is indeed a number. 3435 var ret = HEAP32[((+SYSCALLS.varargs)>>2)]; 3436 SYSCALLS.varargs += 4; 3437 return ret; 3438 }, 3439 getp() { return SYSCALLS.get() }, 3440 getStr(ptr) { 3441 var ret = UTF8ToString(ptr); 3442 return ret; 3443 }, 3444 getStreamFromFD(fd) { 3445 var stream = FS.getStreamChecked(fd); 3446 return stream; 3447 }, 3448 }; 3449 function ___syscall_faccessat(dirfd, path, amode, flags) { 3450 try { 3451 3452 path = SYSCALLS.getStr(path); 3453 path = SYSCALLS.calculateAt(dirfd, path); 3454 if (amode & ~7) { 3455 // need a valid mode 3456 return -28; 3457 } 3458 var lookup = FS.lookupPath(path, { follow: true }); 3459 var node = lookup.node; 3460 if (!node) { 3461 return -44; 3462 } 3463 var perms = ''; 3464 if (amode & 4) perms += 'r'; 3465 if (amode & 2) perms += 'w'; 3466 if (amode & 1) perms += 'x'; 3467 if (perms /* otherwise, they've just passed F_OK */ && FS.nodePermissions(node, perms)) { 3468 return -2; 3469 } 3470 return 0; 3471 } catch (e) { 3472 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3473 return -e.errno; 3474 } 3475 } 3476 3477 var ___syscall_fadvise64 = (fd, offset, len, advice) => { 3478 return 0; // your advice is important to us (but we can't use it) 3479 }; 3480 3481 function ___syscall_fcntl64(fd, cmd, varargs) { 3482 SYSCALLS.varargs = varargs; 3483 try { 3484 3485 var stream = SYSCALLS.getStreamFromFD(fd); 3486 switch (cmd) { 3487 case 0: { 3488 var arg = SYSCALLS.get(); 3489 if (arg < 0) { 3490 return -28; 3491 } 3492 while (FS.streams[arg]) { 3493 arg++; 3494 } 3495 var newStream; 3496 newStream = FS.dupStream(stream, arg); 3497 return newStream.fd; 3498 } 3499 case 1: 3500 case 2: 3501 return 0; // FD_CLOEXEC makes no sense for a single process. 3502 case 3: 3503 return stream.flags; 3504 case 4: { 3505 var arg = SYSCALLS.get(); 3506 stream.flags |= arg; 3507 return 0; 3508 } 3509 case 12: { 3510 var arg = SYSCALLS.getp(); 3511 var offset = 0; 3512 // We're always unlocked. 3513 HEAP16[(((arg)+(offset))>>1)] = 2; 3514 return 0; 3515 } 3516 case 13: 3517 case 14: 3518 return 0; // Pretend that the locking is successful. 3519 } 3520 return -28; 3521 } catch (e) { 3522 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3523 return -e.errno; 3524 } 3525 } 3526 3527 function ___syscall_fstat64(fd, buf) { 3528 try { 3529 3530 var stream = SYSCALLS.getStreamFromFD(fd); 3531 return SYSCALLS.doStat(FS.stat, stream.path, buf); 3532 } catch (e) { 3533 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3534 return -e.errno; 3535 } 3536 } 3537 3538 function ___syscall_statfs64(path, size, buf) { 3539 try { 3540 3541 path = SYSCALLS.getStr(path); 3542 // NOTE: None of the constants here are true. We're just returning safe and 3543 // sane values. 3544 HEAP32[(((buf)+(4))>>2)] = 4096; 3545 HEAP32[(((buf)+(40))>>2)] = 4096; 3546 HEAP32[(((buf)+(8))>>2)] = 1000000; 3547 HEAP32[(((buf)+(12))>>2)] = 500000; 3548 HEAP32[(((buf)+(16))>>2)] = 500000; 3549 HEAP32[(((buf)+(20))>>2)] = FS.nextInode; 3550 HEAP32[(((buf)+(24))>>2)] = 1000000; 3551 HEAP32[(((buf)+(28))>>2)] = 42; 3552 HEAP32[(((buf)+(44))>>2)] = 2; // ST_NOSUID 3553 HEAP32[(((buf)+(36))>>2)] = 255; 3554 return 0; 3555 } catch (e) { 3556 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3557 return -e.errno; 3558 } 3559 } 3560 3561 function ___syscall_fstatfs64(fd, size, buf) { 3562 try { 3563 3564 var stream = SYSCALLS.getStreamFromFD(fd); 3565 return ___syscall_statfs64(0, size, buf); 3566 } catch (e) { 3567 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3568 return -e.errno; 3569 } 3570 } 3571 3572 var MAX_INT53 = 9007199254740992; 3573 3574 var MIN_INT53 = -9007199254740992; 3575 var bigintToI53Checked = (num) => (num < MIN_INT53 || num > MAX_INT53) ? NaN : Number(num); 3576 function ___syscall_ftruncate64(fd, length) { 3577 length = bigintToI53Checked(length); 3578 3579 3580 try { 3581 3582 if (isNaN(length)) return 61; 3583 FS.ftruncate(fd, length); 3584 return 0; 3585 } catch (e) { 3586 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3587 return -e.errno; 3588 } 3589 ; 3590 } 3591 3592 3593 var stringToUTF8 = (str, outPtr, maxBytesToWrite) => { 3594 return stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite); 3595 }; 3596 function ___syscall_getcwd(buf, size) { 3597 try { 3598 3599 if (size === 0) return -28; 3600 var cwd = FS.cwd(); 3601 var cwdLengthInBytes = lengthBytesUTF8(cwd) + 1; 3602 if (size < cwdLengthInBytes) return -68; 3603 stringToUTF8(cwd, buf, size); 3604 return cwdLengthInBytes; 3605 } catch (e) { 3606 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3607 return -e.errno; 3608 } 3609 } 3610 3611
3611 3612 function ___syscall_getdents64(fd, dirp, count) { 3613 try { 3614 3615 var stream = SYSCALLS.getStreamFromFD(fd) 3616 stream.getdents ||= FS.readdir(stream.path); 3617 3618 var struct_size = 280; 3619 var pos = 0; 3620 var off = FS.llseek(stream, 0, 1); 3621 3622 var idx = Math.floor(off / struct_size); 3623 3624 while (idx < stream.getdents.length && pos + struct_size <= count) { 3625 var id; 3626 var type; 3627 var name = stream.getdents[idx]; 3628 if (name === '.') { 3629 id = stream.node.id; 3630 type = 4; // DT_DIR 3631 } 3632 else if (name === '..') { 3633 var lookup = FS.lookupPath(stream.path, { parent: true }); 3634 id = lookup.node.id; 3635 type = 4; // DT_DIR 3636 } 3637 else { 3638 var child = FS.lookupNode(stream.node, name); 3639 id = child.id; 3640 type = FS.isChrdev(child.mode) ? 2 : // DT_CHR, character device. 3641 FS.isDir(child.mode) ? 4 : // DT_DIR, directory. 3642 FS.isLink(child.mode) ? 10 : // DT_LNK, symbolic link. 3643 8; // DT_REG, regular file. 3644 } 3645 HEAP64[((dirp + pos)>>3)] = BigInt(id); 3646 HEAP64[(((dirp + pos)+(8))>>3)] = BigInt((idx + 1) * struct_size); 3647 HEAP16[(((dirp + pos)+(16))>>1)] = 280; 3648 HEAP8[(dirp + pos)+(18)] = type; 3649 stringToUTF8(name, dirp + pos + 19, 256); 3650 pos += struct_size; 3651 idx += 1; 3652 } 3653 FS.llseek(stream, idx * struct_size, 0); 3654 return po
vendor: 18,976 bytes, lines 3654-4220
3654s; 3655 } catch (e) { 3656 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3657 return -e.errno; 3658 } 3659 } 3660 3661 function ___syscall_ioctl(fd, op, varargs) { 3662 SYSCALLS.varargs = varargs; 3663 try { 3664 3665 var stream = SYSCALLS.getStreamFromFD(fd); 3666 switch (op) { 3667 case 21509: { 3668 if (!stream.tty) return -59; 3669 return 0; 3670 } 3671 case 21505: { 3672 if (!stream.tty) return -59; 3673 if (stream.tty.ops.ioctl_tcgets) { 3674 var termios = stream.tty.ops.ioctl_tcgets(stream); 3675 var argp = SYSCALLS.getp(); 3676 HEAP32[((argp)>>2)] = termios.c_iflag || 0; 3677 HEAP32[(((argp)+(4))>>2)] = termios.c_oflag || 0; 3678 HEAP32[(((argp)+(8))>>2)] = termios.c_cflag || 0; 3679 HEAP32[(((argp)+(12))>>2)] = termios.c_lflag || 0; 3680 for (var i = 0; i < 32; i++) { 3681 HEAP8[(argp + i)+(17)] = termios.c_cc[i] || 0; 3682 } 3683 return 0; 3684 } 3685 return 0; 3686 } 3687 case 21510: 3688 case 21511: 3689 case 21512: { 3690 if (!stream.tty) return -59; 3691 return 0; // no-op, not actually adjusting terminal settings 3692 } 3693 case 21506: 3694 case 21507: 3695 case 21508: { 3696 if (!stream.tty) return -59; 3697 if (stream.tty.ops.ioctl_tcsets) { 3698 var argp = SYSCALLS.getp(); 3699 var c_iflag = HEAP32[((argp)>>2)]; 3700 var c_oflag = HEAP32[(((argp)+(4))>>2)]; 3701 var c_cflag = HEAP32[(((argp)+(8))>>2)]; 3702 var c_lflag = HEAP32[(((argp)+(12))>>2)]; 3703 var c_cc = [] 3704 for (var i = 0; i < 32; i++) { 3705 c_cc.push(HEAP8[(argp + i)+(17)]); 3706 } 3707 return stream.tty.ops.ioctl_tcsets(stream.tty, op, { c_iflag, c_oflag, c_cflag, c_lflag, c_cc }); 3708 } 3709 return 0; // no-op, not actually adjusting terminal settings 3710 } 3711 case 21519: { 3712 if (!stream.tty) return -59; 3713 var argp = SYSCALLS.getp(); 3714 HEAP32[((argp)>>2)] = 0; 3715 return 0; 3716 } 3717 case 21520: { 3718 if (!stream.tty) return -59; 3719 return -28; // not supported 3720 } 3721 case 21531: { 3722 var argp = SYSCALLS.getp(); 3723 return FS.ioctl(stream, op, argp); 3724 } 3725 case 21523: { 3726 // TODO: in theory we should write to the winsize struct that gets 3727 // passed in, but for now musl doesn't read anything on it 3728 if (!stream.tty) return -59; 3729 if (stream.tty.ops.ioctl_tiocgwinsz) { 3730 var winsize = stream.tty.ops.ioctl_tiocgwinsz(stream.tty); 3731 var argp = SYSCALLS.getp(); 3732 HEAP16[((argp)>>1)] = winsize[0]; 3733 HEAP16[(((argp)+(2))>>1)] = winsize[1]; 3734 } 3735 return 0; 3736 } 3737 case 21524: { 3738 // TODO: technically, this ioctl call should change the window size. 3739 // but, since emscripten doesn't have any concept of a terminal window 3740 // yet, we'll just silently throw it away as we do TIOCGWINSZ 3741 if (!stream.tty) return -59; 3742 return 0; 3743 } 3744 case 21515: { 3745 if (!stream.tty) return -59; 3746 return 0; 3747 } 3748 default: return -28; // not supported 3749 } 3750 } catch (e) { 3751 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3752 return -e.errno; 3753 } 3754 } 3755 3756 function ___syscall_lstat64(path, buf) { 3757 try { 3758 3759 path = SYSCALLS.getStr(path); 3760 return SYSCALLS.doStat(FS.lstat, path, buf); 3761 } catch (e) { 3762 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3763 return -e.errno; 3764 } 3765 } 3766 3767 function ___syscall_newfstatat(dirfd, path, buf, flags) { 3768 try { 3769 3770 path = SYSCALLS.getStr(path); 3771 var nofollow = flags & 256; 3772 var allowEmpty = flags & 4096; 3773 flags = flags & (~6400); 3774 path = SYSCALLS.calculateAt(dirfd, path, allowEmpty); 3775 return SYSCALLS.doStat(nofollow ? FS.lstat : FS.stat, path, buf); 3776 } catch (e) { 3777 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3778 return -e.errno; 3779 } 3780 } 3781 3782 function ___syscall_openat(dirfd, path, flags, varargs) { 3783 SYSCALLS.varargs = varargs; 3784 try { 3785 3786 path = SYSCALLS.getStr(path); 3787 path = SYSCALLS.calculateAt(dirfd, path); 3788 var mode = varargs ? SYSCALLS.get() : 0; 3789 return FS.open(path, flags, mode).fd; 3790 } catch (e) { 3791 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3792 return -e.errno; 3793 } 3794 } 3795 3796 3797 3798 function ___syscall_readlinkat(dirfd, path, buf, bufsize) { 3799 try { 3800 3801 path = SYSCALLS.getStr(path); 3802 path = SYSCALLS.calculateAt(dirfd, path); 3803 if (bufsize <= 0) return -28; 3804 var ret = FS.readlink(path); 3805 3806 var len = Math.min(bufsize, lengthBytesUTF8(ret)); 3807 var endChar = HEAP8[buf+len]; 3808 stringToUTF8(ret, buf, bufsize+1); 3809 // readlink is one of the rare functions that write out a C string, but does never append a null to the output buffer(!) 3810 // stringToUTF8() always appends a null byte, so restore the character under the null byte after the write. 3811 HEAP8[buf+len] = endChar; 3812 return len; 3813 } catch (e) { 3814 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3815 return -e.errno; 3816 } 3817 } 3818 3819 function ___syscall_stat64(path, buf) { 3820 try { 3821 3822 path = SYSCALLS.getStr(path); 3823 return SYSCALLS.doStat(FS.stat, path, buf); 3824 } catch (e) { 3825 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3826 return -e.errno; 3827 } 3828 } 3829 3830 function ___syscall_unlinkat(dirfd, path, flags) { 3831 try { 3832 3833 path = SYSCALLS.getStr(path); 3834 path = SYSCALLS.calculateAt(dirfd, path); 3835 if (flags === 0) { 3836 FS.unlink(path); 3837 } else if (flags === 512) { 3838 FS.rmdir(path); 3839 } else { 3840 abort('Invalid flags passed to unlinkat'); 3841 } 3842 return 0; 3843 } catch (e) { 3844 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3845 return -e.errno; 3846 } 3847 } 3848 3849 var nowIsMonotonic = 1; 3850 var __emscripten_get_now_is_monotonic = () => nowIsMonotonic; 3851 3852 var isLeapYear = (year) => year%4 === 0 && (year%100 !== 0 || year%400 === 0); 3853 3854 var MONTH_DAYS_LEAP_CUMULATIVE = [0,31,60,91,121,152,182,213,244,274,305,335]; 3855 3856 var MONTH_DAYS_REGULAR_CUMULATIVE = [0,31,59,90,120,151,181,212,243,273,304,334]; 3857 var ydayFromDate = (date) => { 3858 var leap = isLeapYear(date.getFullYear()); 3859 var monthDaysCumulative = (leap ? MONTH_DAYS_LEAP_CUMULATIVE : MONTH_DAYS_REGULAR_CUMULATIVE); 3860 var yday = monthDaysCumulative[date.getMonth()] + date.getDate() - 1; // -1 since it's days since Jan 1 3861 3862 return yday; 3863 }; 3864 3865 function __localtime_js(time, tmPtr) { 3866 time = bigintToI53Checked(time); 3867 3868 3869 var date = new Date(time*1000); 3870 HEAP32[((tmPtr)>>2)] = date.getSeconds(); 3871 HEAP32[(((tmPtr)+(4))>>2)] = date.getMinutes(); 3872 HEAP32[(((tmPtr)+(8))>>2)] = date.getHours(); 3873 HEAP32[(((tmPtr)+(12))>>2)] = date.getDate(); 3874 HEAP32[(((tmPtr)+(16))>>2)] = date.getMonth(); 3875 HEAP32[(((tmPtr)+(20))>>2)] = date.getFullYear()-1900; 3876 HEAP32[(((tmPtr)+(24))>>2)] = date.getDay(); 3877 3878 var yday = ydayFromDate(date)|0; 3879 HEAP32[(((tmPtr)+(28))>>2)] = yday; 3880 HEAP32[(((tmPtr)+(36))>>2)] = -(date.getTimezoneOffset() * 60); 3881 3882 // Attention: DST is in December in South, and some regions don't have DST at all. 3883 var start = new Date(date.getFullYear(), 0, 1); 3884 var summerOffset = new Date(date.getFullYear(), 6, 1).getTimezoneOffset(); 3885 var winterOffset = start.getTimezoneOffset(); 3886 var dst = (summerOffset != winterOffset && date.getTimezoneOffset() == Math.min(winterOffset, summerOffset))|0; 3887 HEAP32[(((tmPtr)+(32))>>2)] = dst; 3888 ; 3889 } 3890 3891 3892 3893 3894 3895 3896 function __mmap_js(len, prot, flags, fd, offset, allocated, addr) { 3897 offset = bigintToI53Checked(offset); 3898 3899 3900 try { 3901 3902 if (isNaN(offset)) return 61; 3903 var stream = SYSCALLS.getStreamFromFD(fd); 3904 var res = FS.mmap(stream, len, offset, prot, flags); 3905 var ptr = res.ptr; 3906 HEAP32[((allocated)>>2)] = res.allocated; 3907 HEAPU32[((addr)>>2)] = ptr; 3908 return 0; 3909 } catch (e) { 3910 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3911 return -e.errno; 3912 } 3913 ; 3914 } 3915 3916 3917 function __munmap_js(addr, len, prot, flags, fd, offset) { 3918 offset = bigintToI53Checked(offset); 3919 3920 3921 try { 3922 3923 var stream = SYSCALLS.getStreamFromFD(fd); 3924 if (prot & 2) { 3925 SYSCALLS.doMsync(addr, stream, len, flags, offset); 3926 } 3927 } catch (e) { 3928 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 3929 return -e.errno; 3930 } 3931 ; 3932 } 3933 3934 var __tzset_js = (timezone, daylight, std_name, dst_name) => { 3935 // TODO: Use (malleable) environment variables instead of system settings. 3936 var currentYear = new Date().getFullYear(); 3937 var winter = new Date(currentYear, 0, 1); 3938 var summer = new Date(currentYear, 6, 1); 3939 var winterOffset = winter.getTimezoneOffset(); 3940 var summerOffset = summer.getTimezoneOffset(); 3941 3942 // Local standard timezone offset. Local standard time is not adjusted for 3943 // daylight savings. This code uses the fact that getTimezoneOffset returns 3944 // a greater value during Standard Time versus Daylight Saving Time (DST). 3945 // Thus it determines the expected output during Standard Time, and it 3946 // compares whether the output of the given date the same (Standard) or less 3947 // (DST). 3948 var stdTimezoneOffset = Math.max(winterOffset, summerOffset); 3949 3950 // timezone is specified as seconds west of UTC ("The external variable 3951 // `timezone` shall be set to the difference, in seconds, between 3952 // Coordinated Universal Time (UTC) and local standard time."), the same 3953 // as returned by stdTimezoneOffset. 3954 // See http://pubs.opengroup.org/onlinepubs/009695399/functions/tzset.html 3955 HEAPU32[((timezone)>>2)] = stdTimezoneOffset * 60; 3956 3957 HEAP32[((daylight)>>2)] = Number(winterOffset != summerOffset); 3958 3959 function extractZone(date) { 3960 var match = date.toTimeString().match(/\(([A-Za-z ]+)\)$/); 3961 return match ? match[1] : "GMT"; 3962 }; 3963 var winterName = extractZone(winter); 3964 var summerName = extractZone(summer); 3965 if (summerOffset < winterOffset) { 3966 // Northern hemisphere 3967 stringToUTF8(winterName, std_name, 7); 3968 stringToUTF8(summerName, dst_name, 7); 3969 } else { 3970 stringToUTF8(winterName, dst_name, 7); 3971 stringToUTF8(summerName, std_name, 7); 3972 } 3973 }; 3974 3975 var _abort = () => { 3976 abort(''); 3977 }; 3978 3979 var _emscripten_date_now = () => Date.now(); 3980 3981 3982 var runtimeKeepaliveCounter = 0; 3983 var keepRuntimeAlive = () => noExitRuntime || runtimeKeepaliveCounter > 0; 3984 var _proc_exit = (code) => { 3985 EXITSTATUS = code; 3986 if (!keepRuntimeAlive()) { 3987 Module['onExit']?.(code); 3988 ABORT = true; 3989 } 3990 quit_(code, new ExitStatus(code)); 3991 }; 3992 3993 /** @suppress {duplicate } */ 3994 /** @param {boolean|number=} implicit */ 3995 var exitJS = (status, implicit) => { 3996 EXITSTATUS = status; 3997 3998 if (!keepRuntimeAlive()) { 3999 exitRuntime(); 4000 } 4001 4002 _proc_exit(status); 4003 }; 4004 var _exit = exitJS; 4005 4006 var __emscripten_runtime_keepalive_clear = () => { 4007 noExitRuntime = false; 4008 runtimeKeepaliveCounter = 0; 4009 }; 4010 4011 var _emscripten_force_exit = (status) => { 4012 __emscripten_runtime_keepalive_clear(); 4013 _exit(status); 4014 }; 4015 Module['_emscripten_force_exit'] = _emscripten_force_exit; 4016 4017 var getHeapMax = () => 4018 // Stay one Wasm page short of 4GB: while e.g. Chrome is able to allocate 4019 // full 4GB Wasm memories, the size will wrap back to 0 bytes in Wasm side 4020 // for any code that deals with heap sizes, which would require special 4021 // casing all heap size related code to treat 0 specially. 4022 2147483648; 4023 var _emscripten_get_heap_max = () => getHeapMax(); 4024 4025 var _emscripten_get_now; 4026 // Modern environment where performance.now() is supported: 4027 // N.B. a shorter form "_emscripten_get_now = performance.now;" is 4028 // unfortunately not allowed even in current browsers (e.g. FF Nightly 75). 4029 _emscripten_get_now = () => performance.now(); 4030 ; 4031 4032 var _emscripten_get_now_res = () => { // return resolution of get_now, in nanoseconds 4033 if (ENVIRONMENT_IS_NODE) { 4034 return 1; // nanoseconds 4035 } 4036 // Modern environment where performance.now() is supported: 4037 return 1000; // microseconds (1/1000 of a millisecond) 4038 }; 4039 4040 4041 var growMemory = (size) => { 4042 var b = wasmMemory.buffer; 4043 var pages = (size - b.byteLength + 65535) / 65536; 4044 try { 4045 // round size grow request up to wasm page size (fixed 64KB per spec) 4046 wasmMemory.grow(pages); // .grow() takes a delta compared to the previous size 4047 updateMemoryViews(); 4048 return 1 /*success*/; 4049 } catch(e) { 4050 } 4051 // implicit 0 return to save code size (caller will cast "undefined" into 0 4052 // anyhow) 4053 }; 4054 var _emscripten_resize_heap = (requestedSize) => { 4055 var oldSize = HEAPU8.length; 4056 // With CAN_ADDRESS_2GB or MEMORY64, pointers are already unsigned. 4057 requestedSize >>>= 0; 4058 // With multithreaded builds, races can happen (another thread might increase the size 4059 // in between), so return a failure, and let the caller retry. 4060 4061 // Memory resize rules: 4062 // 1. Always increase heap size to at least the requested size, rounded up 4063 // to next page multiple. 4064 // 2a. If MEMORY_GROWTH_LINEAR_STEP == -1, excessively resize the heap 4065 // geometrically: increase the heap size according to 4066 // MEMORY_GROWTH_GEOMETRIC_STEP factor (default +20%), At most 4067 // overreserve by MEMORY_GROWTH_GEOMETRIC_CAP bytes (default 96MB). 4068 // 2b. If MEMORY_GROWTH_LINEAR_STEP != -1, excessively resize the heap 4069 // linearly: increase the heap size by at least 4070 // MEMORY_GROWTH_LINEAR_STEP bytes. 4071 // 3. Max size for the heap is capped at 2048MB-WASM_PAGE_SIZE, or by 4072 // MAXIMUM_MEMORY, or by ASAN limit, depending on which is smallest 4073 // 4. If we were unable to allocate as much memory, it may be due to 4074 // over-eager decision to excessively reserve due to (3) above. 4075 // Hence if an allocation fails, cut down on the amount of excess 4076 // growth, in an attempt to succeed to perform a smaller allocation. 4077 4078 // A limit is set for how much we can grow. We should not exceed that 4079 // (the wasm binary specifies it, so if we tried, we'd fail anyhow). 4080 var maxHeapSize = getHeapMax(); 4081 if (requestedSize > maxHeapSize) { 4082 return false; 4083 } 4084 4085 var alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple; 4086 4087 // Loop through potential heap size increases. If we attempt a too eager 4088 // reservation that fails, cut down on the attempted size and reserve a 4089 // smaller bump instead. (max 3 times, chosen somewhat arbitrarily) 4090 for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { 4091 var overGrownHeapSize = oldSize * (1 + 0.2 / cutDown); // ensure geometric growth 4092 // but limit overreserving (default to capping at +96MB overgrowth at most) 4093 overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296 ); 4094 4095 var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536)); 4096 4097 var replacement = growMemory(newSize); 4098 if (replacement) { 4099 4100 return true; 4101 } 4102 } 4103 return false; 4104 }; 4105 4106 var ENV = { 4107 }; 4108 4109 var getExecutableName = () => { 4110 return thisProgram || './this.program'; 4111 }; 4112 var getEnvStrings = () => { 4113 if (!getEnvStrings.strings) { 4114 // Default values. 4115 // Browser language detection #8751 4116 var lang = ((typeof navigator == 'object' && navigator.languages && navigator.languages[0]) || 'C').replace('-', '_') + '.UTF-8'; 4117 var env = { 4118 'USER': 'web_user', 4119 'LOGNAME': 'web_user', 4120 'PATH': '/', 4121 'PWD': '/', 4122 'HOME': '/home/web_user', 4123 'LANG': lang, 4124 '_': getExecutableName() 4125 }; 4126 // Apply the user-provided values, if any. 4127 for (var x in ENV) { 4128 // x is a key in ENV; if ENV[x] is undefined, that means it was 4129 // explicitly set to be so. We allow user code to do that to 4130 // force variables with default values to remain unset. 4131 if (ENV[x] === undefined) delete env[x]; 4132 else env[x] = ENV[x]; 4133 } 4134 var strings = []; 4135 for (var x in env) { 4136 strings.push(`${x}=${env[x]}`); 4137 } 4138 getEnvStrings.strings = strings; 4139 } 4140 return getEnvStrings.strings; 4141 }; 4142 4143 var stringToAscii = (str, buffer) => { 4144 for (var i = 0; i < str.length; ++i) { 4145 HEAP8[buffer++] = str.charCodeAt(i); 4146 } 4147 // Null-terminate the string 4148 HEAP8[buffer] = 0; 4149 }; 4150 var _environ_get = (__environ, environ_buf) => { 4151 var bufSize = 0; 4152 getEnvStrings().forEach((string, i) => { 4153 var ptr = environ_buf + bufSize; 4154 HEAPU32[(((__environ)+(i*4))>>2)] = ptr; 4155 stringToAscii(string, ptr); 4156 bufSize += string.length + 1; 4157 }); 4158 return 0; 4159 }; 4160 4161 var _environ_sizes_get = (penviron_count, penviron_buf_size) => { 4162 var strings = getEnvStrings(); 4163 HEAPU32[((penviron_count)>>2)] = strings.length; 4164 var bufSize = 0; 4165 strings.forEach((string) => bufSize += string.length + 1); 4166 HEAPU32[((penviron_buf_size)>>2)] = bufSize; 4167 return 0; 4168 }; 4169 4170 4171 function _fd_close(fd) { 4172 try { 4173 4174 var stream = SYSCALLS.getStreamFromFD(fd); 4175 FS.close(stream); 4176 return 0; 4177 } catch (e) { 4178 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 4179 return e.errno; 4180 } 4181 } 4182 4183 /** @param {number=} offset */ 4184 var doReadv = (stream, iov, iovcnt, offset) => { 4185 var ret = 0; 4186 for (var i = 0; i < iovcnt; i++) { 4187 var ptr = HEAPU32[((iov)>>2)]; 4188 var len = HEAPU32[(((iov)+(4))>>2)]; 4189 iov += 8; 4190 var curr = FS.read(stream, HEAP8, ptr, len, offset); 4191 if (curr < 0) return -1; 4192 ret += curr; 4193 if (curr < len) break; // nothing more to read 4194 if (typeof offset !== 'undefined') { 4195 offset += curr; 4196 } 4197 } 4198 return ret; 4199 }; 4200 4201 4202 function _fd_pread(fd, iov, iovcnt, offset, pnum) { 4203 offset = bigintToI53Checked(offset); 4204 4205 4206 try { 4207 4208 if (isNaN(offset)) return 61; 4209 var stream = SYSCALLS.getStreamFromFD(fd) 4210 var num = doReadv(stream, iov, iovcnt, offset); 4211 HEAPU32[((pnum)>>2)] = num; 4212 return 0; 4213 } catch (e) { 4214 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 4215 return e.errno; 4216 } 4217 ; 4218 } 4219 4220
vendor: 1,344 bytes, lines 4220-4269
4220 4221 function _fd_read(fd, iov, iovcnt, pnum) { 4222 try { 4223 4224 var stream = SYSCALLS.getStreamFromFD(fd); 4225 var num = doReadv(stream, iov, iovcnt); 4226 HEAPU32[((pnum)>>2)] = num; 4227 return 0; 4228 } catch (e) { 4229 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 4230 return e.errno; 4231 } 4232 } 4233 4234 4235 function _fd_seek(fd, offset, whence, newOffset) { 4236 offset = bigintToI53Checked(offset); 4237 4238 4239 try { 4240 4241 if (isNaN(offset)) return 61; 4242 var stream = SYSCALLS.getStreamFromFD(fd); 4243 FS.llseek(stream, offset, whence); 4244 HEAP64[((newOffset)>>3)] = BigInt(stream.position); 4245 if (stream.getdents && offset === 0 && whence === 0) stream.getdents = null; // reset readdir state 4246 return 0; 4247 } catch (e) { 4248 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 4249 return e.errno; 4250 } 4251 ; 4252 } 4253 4254 /** @param {number=} offset */ 4255 var doWritev = (stream, iov, iovcnt, offset) => { 4256 var ret = 0; 4257 for (var i = 0; i < iovcnt; i++) { 4258 var ptr = HEAPU32[((iov)>>2)]; 4259 var len = HEAPU32[(((iov)+(4))>>2)]; 4260 iov += 8; 4261 var curr = FS.write(stream, HEAP8, ptr, len, offset); 4262 if (curr < 0) return -1; 4263 ret += curr; 4264 if (typeof offset !== 'undefined') { 4265 offset += curr; 4266 } 4267 } 4268 return ret; 4269 };
vendor: 29,085 bytes, lines 4269-5095
4269 4270 4271 function _fd_write(fd, iov, iovcnt, pnum) { 4272 try { 4273 4274 var stream = SYSCALLS.getStreamFromFD(fd); 4275 var num = doWritev(stream, iov, iovcnt); 4276 HEAPU32[((pnum)>>2)] = num; 4277 return 0; 4278 } catch (e) { 4279 if (typeof FS == 'undefined' || !(e.name === 'ErrnoError')) throw e; 4280 return e.errno; 4281 } 4282 } 4283 4284 var DOTNET = { 4285 setup:function setup(emscriptenBuildOptions) { 4286 // USE_PTHREADS is emscripten's define symbol, which is passed to acorn optimizer, so we could use it here 4287 const modulePThread = {}; 4288 const ENVIRONMENT_IS_PTHREAD = false; 4289 const dotnet_replacements = { 4290 fetch: globalThis.fetch, 4291 ENVIRONMENT_IS_WORKER, 4292 require, 4293 modulePThread, 4294 scriptDirectory, 4295 }; 4296 4297 ENVIRONMENT_IS_WORKER = dotnet_replacements.ENVIRONMENT_IS_WORKER; 4298 Module.__dotnet_runtime.initializeReplacements(dotnet_replacements); 4299 noExitRuntime = dotnet_replacements.noExitRuntime; 4300 fetch = dotnet_replacements.fetch; 4301 require = dotnet_replacements.require; 4302 _scriptDir = __dirname = scriptDirectory = dotnet_replacements.scriptDirectory; 4303 Module.__dotnet_runtime.passEmscriptenInternals({ 4304 isPThread: ENVIRONMENT_IS_PTHREAD, 4305 quit_, ExitStatus, 4306 updateMemoryViews, 4307 getMemory: () => { return wasmMemory; }, 4308 getWasmIndirectFunctionTable: () => { return wasmTable; }, 4309 }, emscriptenBuildOptions); 4310 4311 Module.__dotnet_runtime.configureEmscriptenStartup(Module); 4312 }, 4313 }; 4314 function _mono_interp_flush_jitcall_queue( 4315 ) { 4316 return {runtime_idx:12};//mono_interp_flush_jitcall_queue 4317 } 4318 4319 function _mono_interp_invoke_wasm_jit_call_trampoline( 4320 ) { 4321 return {runtime_idx:11};//mono_interp_invoke_wasm_jit_call_trampoline 4322 } 4323 4324 function _mono_interp_jit_wasm_entry_trampoline( 4325 ) { 4326 return {runtime_idx:9};//mono_interp_jit_wasm_entry_trampoline 4327 } 4328 4329 function _mono_interp_jit_wasm_jit_call_trampoline( 4330 ) { 4331 return {runtime_idx:10};//mono_interp_jit_wasm_jit_call_trampoline 4332 } 4333 4334 function _mono_interp_record_interp_entry( 4335 ) { 4336 return {runtime_idx:8};//mono_interp_record_interp_entry 4337 } 4338 4339 function _mono_interp_tier_prepare_jiterpreter( 4340 ) { 4341 return {runtime_idx:7};//mono_interp_tier_prepare_jiterpreter 4342 } 4343 4344 function _mono_wasm_bind_js_import_ST( 4345 ) { 4346 return {runtime_idx:22};//mono_wasm_bind_js_import_ST 4347 } 4348 4349 function _mono_wasm_browser_entropy( 4350 ) { 4351 return {runtime_idx:18};//mono_wasm_browser_entropy 4352 } 4353 4354 function _mono_wasm_cancel_promise( 4355 ) { 4356 return {runtime_idx:26};//mono_wasm_cancel_promise 4357 } 4358 4359 function _mono_wasm_console_clear( 4360 ) { 4361 return {runtime_idx:20};//mono_wasm_console_clear 4362 } 4363 4364 function _mono_wasm_free_method_data( 4365 ) { 4366 return {runtime_idx:13};//mono_wasm_free_method_data 4367 } 4368 4369 function _mono_wasm_get_locale_info( 4370 ) { 4371 return {runtime_idx:27};//mono_wasm_get_locale_info 4372 } 4373 4374 function _mono_wasm_invoke_js_function( 4375 ) { 4376 return {runtime_idx:23};//mono_wasm_invoke_js_function 4377 } 4378 4379 function _mono_wasm_invoke_jsimport_ST( 4380 ) { 4381 return {runtime_idx:24};//mono_wasm_invoke_jsimport_ST 4382 } 4383 4384 function _mono_wasm_process_current_pid( 4385 ) { 4386 return {runtime_idx:19};//mono_wasm_process_current_pid 4387 } 4388 4389 function _mono_wasm_release_cs_owned_object( 4390 ) { 4391 return {runtime_idx:21};//mono_wasm_release_cs_owned_object 4392 } 4393 4394 function _mono_wasm_resolve_or_reject_promise( 4395 ) { 4396 return {runtime_idx:25};//mono_wasm_resolve_or_reject_promise 4397 } 4398 4399 function _mono_wasm_schedule_timer( 4400 ) { 4401 return {runtime_idx:0};//mono_wasm_schedule_timer 4402 } 4403 4404 function _mono_wasm_set_entrypoint_breakpoint( 4405 ) { 4406 return {runtime_idx:17};//mono_wasm_set_entrypoint_breakpoint 4407 } 4408 4409 function _mono_wasm_trace_logger( 4410 ) { 4411 return {runtime_idx:16};//mono_wasm_trace_logger 4412 } 4413 4414 function _schedule_background_exec( 4415 ) { 4416 return {runtime_idx:6};//schedule_background_exec 4417 } 4418 4419 4420 var arraySum = (array, index) => { 4421 var sum = 0; 4422 for (var i = 0; i <= index; sum += array[i++]) { 4423 // no-op 4424 } 4425 return sum; 4426 }; 4427 4428 4429 var MONTH_DAYS_LEAP = [31,29,31,30,31,30,31,31,30,31,30,31]; 4430 4431 var MONTH_DAYS_REGULAR = [31,28,31,30,31,30,31,31,30,31,30,31]; 4432 var addDays = (date, days) => { 4433 var newDate = new Date(date.getTime()); 4434 while (days > 0) { 4435 var leap = isLeapYear(newDate.getFullYear()); 4436 var currentMonth = newDate.getMonth(); 4437 var daysInCurrentMonth = (leap ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR)[currentMonth]; 4438 4439 if (days > daysInCurrentMonth-newDate.getDate()) { 4440 // we spill over to next month 4441 days -= (daysInCurrentMonth-newDate.getDate()+1); 4442 newDate.setDate(1); 4443 if (currentMonth < 11) { 4444 newDate.setMonth(currentMonth+1) 4445 } else { 4446 newDate.setMonth(0); 4447 newDate.setFullYear(newDate.getFullYear()+1); 4448 } 4449 } else { 4450 // we stay in current month 4451 newDate.setDate(newDate.getDate()+days); 4452 return newDate; 4453 } 4454 } 4455 4456 return newDate; 4457 }; 4458 4459 4460 4461 4462 var writeArrayToMemory = (array, buffer) => { 4463 HEAP8.set(array, buffer); 4464 }; 4465 4466 var _strftime = (s, maxsize, format, tm) => { 4467 // size_t strftime(char *restrict s, size_t maxsize, const char *restrict format, const struct tm *restrict timeptr); 4468 // http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html 4469 4470 var tm_zone = HEAPU32[(((tm)+(40))>>2)]; 4471 4472 var date = { 4473 tm_sec: HEAP32[((tm)>>2)], 4474 tm_min: HEAP32[(((tm)+(4))>>2)], 4475 tm_hour: HEAP32[(((tm)+(8))>>2)], 4476 tm_mday: HEAP32[(((tm)+(12))>>2)], 4477 tm_mon: HEAP32[(((tm)+(16))>>2)], 4478 tm_year: HEAP32[(((tm)+(20))>>2)], 4479 tm_wday: HEAP32[(((tm)+(24))>>2)], 4480 tm_yday: HEAP32[(((tm)+(28))>>2)], 4481 tm_isdst: HEAP32[(((tm)+(32))>>2)], 4482 tm_gmtoff: HEAP32[(((tm)+(36))>>2)], 4483 tm_zone: tm_zone ? UTF8ToString(tm_zone) : '' 4484 }; 4485 4486 4487 var pattern = UTF8ToString(format); 4488 4489 // expand format 4490 var EXPANSION_RULES_1 = { 4491 '%c': '%a %b %d %H:%M:%S %Y', // Replaced by the locale's appropriate date and time representation - e.g., Mon Aug 3 14:02:01 2013 4492 '%D': '%m/%d/%y', // Equivalent to %m / %d / %y 4493 '%F': '%Y-%m-%d', // Equivalent to %Y - %m - %d 4494 '%h': '%b', // Equivalent to %b 4495 '%r': '%I:%M:%S %p', // Replaced by the time in a.m. and p.m. notation 4496 '%R': '%H:%M', // Replaced by the time in 24-hour notation 4497 '%T': '%H:%M:%S', // Replaced by the time 4498 '%x': '%m/%d/%y', // Replaced by the locale's appropriate date representation 4499 '%X': '%H:%M:%S', // Replaced by the locale's appropriate time representation 4500 // Modified Conversion Specifiers 4501 '%Ec': '%c', // Replaced by the locale's alternative appropriate date and time representation. 4502 '%EC': '%C', // Replaced by the name of the base year (period) in the locale's alternative representation. 4503 '%Ex': '%m/%d/%y', // Replaced by the locale's alternative date representation. 4504 '%EX': '%H:%M:%S', // Replaced by the locale's alternative time representation. 4505 '%Ey': '%y', // Replaced by the offset from %EC (year only) in the locale's alternative representation. 4506 '%EY': '%Y', // Replaced by the full alternative year representation. 4507 '%Od': '%d', // Replaced by the day of the month, using the locale's alternative numeric symbols, filled as needed with leading zeros if there is any alternative symbol for zero; otherwise, with leading <space> characters. 4508 '%Oe': '%e', // Replaced by the day of the month, using the locale's alternative numeric symbols, filled as needed with leading <space> characters. 4509 '%OH': '%H', // Replaced by the hour (24-hour clock) using the locale's alternative numeric symbols. 4510 '%OI': '%I', // Replaced by the hour (12-hour clock) using the locale's alternative numeric symbols. 4511 '%Om': '%m', // Replaced by the month using the locale's alternative numeric symbols. 4512 '%OM': '%M', // Replaced by the minutes using the locale's alternative numeric symbols. 4513 '%OS': '%S', // Replaced by the seconds using the locale's alternative numeric symbols. 4514 '%Ou': '%u', // Replaced by the weekday as a number in the locale's alternative representation (Monday=1). 4515 '%OU': '%U', // Replaced by the week number of the year (Sunday as the first day of the week, rules corresponding to %U ) using the locale's alternative numeric symbols. 4516 '%OV': '%V', // Replaced by the week number of the year (Monday as the first day of the week, rules corresponding to %V ) using the locale's alternative numeric symbols. 4517 '%Ow': '%w', // Replaced by the number of the weekday (Sunday=0) using the locale's alternative numeric symbols. 4518 '%OW': '%W', // Replaced by the week number of the year (Monday as the first day of the week) using the locale's alternative numeric symbols. 4519 '%Oy': '%y', // Replaced by the year (offset from %C ) using the locale's alternative numeric symbols. 4520 }; 4521 for (var rule in EXPANSION_RULES_1) { 4522 pattern = pattern.replace(new RegExp(rule, 'g'), EXPANSION_RULES_1[rule]); 4523 } 4524 4525 var WEEKDAYS = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; 4526 var MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; 4527 4528 function leadingSomething(value, digits, character) { 4529 var str = typeof value == 'number' ? value.toString() : (value || ''); 4530 while (str.length < digits) { 4531 str = character[0]+str; 4532 } 4533 return str; 4534 } 4535 4536 function leadingNulls(value, digits) { 4537 return leadingSomething(value, digits, '0'); 4538 } 4539 4540 function compareByDay(date1, date2) { 4541 function sgn(value) { 4542 return value < 0 ? -1 : (value > 0 ? 1 : 0); 4543 } 4544 4545 var compare; 4546 if ((compare = sgn(date1.getFullYear()-date2.getFullYear())) === 0) { 4547 if ((compare = sgn(date1.getMonth()-date2.getMonth())) === 0) { 4548 compare = sgn(date1.getDate()-date2.getDate()); 4549 } 4550 } 4551 return compare; 4552 } 4553 4554 function getFirstWeekStartDate(janFourth) { 4555 switch (janFourth.getDay()) { 4556 case 0: // Sunday 4557 return new Date(janFourth.getFullYear()-1, 11, 29); 4558 case 1: // Monday 4559 return janFourth; 4560 case 2: // Tuesday 4561 return new Date(janFourth.getFullYear(), 0, 3); 4562 case 3: // Wednesday 4563 return new Date(janFourth.getFullYear(), 0, 2); 4564 case 4: // Thursday 4565 return new Date(janFourth.getFullYear(), 0, 1); 4566 case 5: // Friday 4567 return new Date(janFourth.getFullYear()-1, 11, 31); 4568 case 6: // Saturday 4569 return new Date(janFourth.getFullYear()-1, 11, 30); 4570 } 4571 } 4572 4573 function getWeekBasedYear(date) { 4574 var thisDate = addDays(new Date(date.tm_year+1900, 0, 1), date.tm_yday); 4575 4576 var janFourthThisYear = new Date(thisDate.getFullYear(), 0, 4); 4577 var janFourthNextYear = new Date(thisDate.getFullYear()+1, 0, 4); 4578 4579 var firstWeekStartThisYear = getFirstWeekStartDate(janFourthThisYear); 4580 var firstWeekStartNextYear = getFirstWeekStartDate(janFourthNextYear); 4581 4582 if (compareByDay(firstWeekStartThisYear, thisDate) <= 0) { 4583 // this date is after the start of the first week of this year 4584 if (compareByDay(firstWeekStartNextYear, thisDate) <= 0) { 4585 return thisDate.getFullYear()+1; 4586 } 4587 return thisDate.getFullYear(); 4588 } 4589 return thisDate.getFullYear()-1; 4590 } 4591 4592 var EXPANSION_RULES_2 = { 4593 '%a': (date) => WEEKDAYS[date.tm_wday].substring(0,3) , 4594 '%A': (date) => WEEKDAYS[date.tm_wday], 4595 '%b': (date) => MONTHS[date.tm_mon].substring(0,3), 4596 '%B': (date) => MONTHS[date.tm_mon], 4597 '%C': (date) => { 4598 var year = date.tm_year+1900; 4599 return leadingNulls((year/100)|0,2); 4600 }, 4601 '%d': (date) => leadingNulls(date.tm_mday, 2), 4602 '%e': (date) => leadingSomething(date.tm_mday, 2, ' '), 4603 '%g': (date) => { 4604 // %g, %G, and %V give values according to the ISO 8601:2000 standard week-based year. 4605 // In this system, weeks begin on a Monday and week 1 of the year is the week that includes 4606 // January 4th, which is also the week that includes the first Thursday of the year, and 4607 // is also the first week that contains at least four days in the year. 4608 // If the first Monday of January is the 2nd, 3rd, or 4th, the preceding days are part of 4609 // the last week of the preceding year; thus, for Saturday 2nd January 1999, 4610 // %G is replaced by 1998 and %V is replaced by 53. If December 29th, 30th, 4611 // or 31st is a Monday, it and any following days are part of week 1 of the following year. 4612 // Thus, for Tuesday 30th December 1997, %G is replaced by 1998 and %V is replaced by 01. 4613 4614 return getWeekBasedYear(date).toString().substring(2); 4615 }, 4616 '%G': getWeekBasedYear, 4617 '%H': (date) => leadingNulls(date.tm_hour, 2), 4618 '%I': (date) => { 4619 var twelveHour = date.tm_hour; 4620 if (twelveHour == 0) twelveHour = 12; 4621 else if (twelveHour > 12) twelveHour -= 12; 4622 return leadingNulls(twelveHour, 2); 4623 }, 4624 '%j': (date) => { 4625 // Day of the year (001-366) 4626 return leadingNulls(date.tm_mday + arraySum(isLeapYear(date.tm_year+1900) ? MONTH_DAYS_LEAP : MONTH_DAYS_REGULAR, date.tm_mon-1), 3); 4627 }, 4628 '%m': (date) => leadingNulls(date.tm_mon+1, 2), 4629 '%M': (date) => leadingNulls(date.tm_min, 2), 4630 '%n': () => '\n', 4631 '%p': (date) => { 4632 if (date.tm_hour >= 0 && date.tm_hour < 12) { 4633 return 'AM'; 4634 } 4635 return 'PM'; 4636 }, 4637 '%S': (date) => leadingNulls(date.tm_sec, 2), 4638 '%t': () => '\t', 4639 '%u': (date) => date.tm_wday || 7, 4640 '%U': (date) => { 4641 var days = date.tm_yday + 7 - date.tm_wday; 4642 return leadingNulls(Math.floor(days / 7), 2); 4643 }, 4644 '%V': (date) => { 4645 // Replaced by the week number of the year (Monday as the first day of the week) 4646 // as a decimal number [01,53]. If the week containing 1 January has four 4647 // or more days in the new year, then it is considered week 1. 4648 // Otherwise, it is the last week of the previous year, and the next week is week 1. 4649 // Both January 4th and the first Thursday of January are always in week 1. [ tm_year, tm_wday, tm_yday] 4650 var val = Math.floor((date.tm_yday + 7 - (date.tm_wday + 6) % 7 ) / 7); 4651 // If 1 Jan is just 1-3 days past Monday, the previous week 4652 // is also in this year. 4653 if ((date.tm_wday + 371 - date.tm_yday - 2) % 7 <= 2) { 4654 val++; 4655 } 4656 if (!val) { 4657 val = 52; 4658 // If 31 December of prev year a Thursday, or Friday of a 4659 // leap year, then the prev year has 53 weeks. 4660 var dec31 = (date.tm_wday + 7 - date.tm_yday - 1) % 7; 4661 if (dec31 == 4 || (dec31 == 5 && isLeapYear(date.tm_year%400-1))) { 4662 val++; 4663 } 4664 } else if (val == 53) { 4665 // If 1 January is not a Thursday, and not a Wednesday of a 4666 // leap year, then this year has only 52 weeks. 4667 var jan1 = (date.tm_wday + 371 - date.tm_yday) % 7; 4668 if (jan1 != 4 && (jan1 != 3 || !isLeapYear(date.tm_year))) 4669 val = 1; 4670 } 4671 return leadingNulls(val, 2); 4672 }, 4673 '%w': (date) => date.tm_wday, 4674 '%W': (date) => { 4675 var days = date.tm_yday + 7 - ((date.tm_wday + 6) % 7); 4676 return leadingNulls(Math.floor(days / 7), 2); 4677 }, 4678 '%y': (date) => { 4679 // Replaced by the last two digits of the year as a decimal number [00,99]. [ tm_year] 4680 return (date.tm_year+1900).toString().substring(2); 4681 }, 4682 // Replaced by the year as a decimal number (for example, 1997). [ tm_year] 4683 '%Y': (date) => date.tm_year+1900, 4684 '%z': (date) => { 4685 // Replaced by the offset from UTC in the ISO 8601:2000 standard format ( +hhmm or -hhmm ). 4686 // For example, "-0430" means 4 hours 30 minutes behind UTC (west of Greenwich). 4687 var off = date.tm_gmtoff; 4688 var ahead = off >= 0; 4689 off = Math.abs(off) / 60; 4690 // convert from minutes into hhmm format (which means 60 minutes = 100 units) 4691 off = (off / 60)*100 + (off % 60); 4692 return (ahead ? '+' : '-') + String("0000" + off).slice(-4); 4693 }, 4694 '%Z': (date) => date.tm_zone, 4695 '%%': () => '%' 4696 }; 4697 4698 // Replace %% with a pair of NULLs (which cannot occur in a C string), then 4699 // re-inject them after processing. 4700 pattern = pattern.replace(/%%/g, '\0\0') 4701 for (var rule in EXPANSION_RULES_2) { 4702 if (pattern.includes(rule)) { 4703 pattern = pattern.replace(new RegExp(rule, 'g'), EXPANSION_RULES_2[rule](date)); 4704 } 4705 } 4706 pattern = pattern.replace(/\0\0/g, '%') 4707 4708 var bytes = intArrayFromString(pattern, false); 4709 if (bytes.length > maxsize) { 4710 return 0; 4711 } 4712 4713 writeArrayToMemory(bytes, s); 4714 return bytes.length-1; 4715 }; 4716 4717 4718 4719 var getCFunc = (ident) => { 4720 var func = Module['_' + ident]; // closure exported function 4721 return func; 4722 }; 4723 4724 4725 4726 var stringToUTF8OnStack = (str) => { 4727 var size = lengthBytesUTF8(str) + 1; 4728 var ret = stackAlloc(size); 4729 stringToUTF8(str, ret, size); 4730 return ret; 4731 }; 4732 4733 4734 4735 4736 4737 /** 4738 * @param {string|null=} returnType 4739 * @param {Array=} argTypes 4740 * @param {Arguments|Array=} args 4741 * @param {Object=} opts 4742 */ 4743 var ccall = (ident, returnType, argTypes, args, opts) => { 4744 // For fast lookup of conversion functions 4745 var toC = { 4746 'string': (str) => { 4747 var ret = 0; 4748 if (str !== null && str !== undefined && str !== 0) { // null string 4749 // at most 4 bytes per UTF-8 code point, +1 for the trailing '\0' 4750 ret = stringToUTF8OnStack(str); 4751 } 4752 return ret; 4753 }, 4754 'array': (arr) => { 4755 var ret = stackAlloc(arr.length); 4756 writeArrayToMemory(arr, ret); 4757 return ret; 4758 } 4759 }; 4760 4761 function convertReturnValue(ret) { 4762 if (returnType === 'string') { 4763 4764 return UTF8ToString(ret); 4765 } 4766 if (returnType === 'boolean') return Boolean(ret); 4767 return ret; 4768 } 4769 4770 var func = getCFunc(ident); 4771 var cArgs = []; 4772 var stack = 0; 4773 if (args) { 4774 for (var i = 0; i < args.length; i++) { 4775 var converter = toC[argTypes[i]]; 4776 if (converter) { 4777 if (stack === 0) stack = stackSave(); 4778 cArgs[i] = converter(args[i]); 4779 } else { 4780 cArgs[i] = args[i]; 4781 } 4782 } 4783 } 4784 var ret = func(...cArgs); 4785 function onDone(ret) { 4786 if (stack !== 0) stackRestore(stack); 4787 return convertReturnValue(ret); 4788 } 4789 4790 ret = onDone(ret); 4791 return ret; 4792 }; 4793 4794 4795 4796 /** 4797 * @param {string=} returnType 4798 * @param {Array=} argTypes 4799 * @param {Object=} opts 4800 */ 4801 var cwrap = (ident, returnType, argTypes, opts) => { 4802 // When the function takes numbers and returns a number, we can just return 4803 // the original function 4804 var numericArgs = !argTypes || argTypes.every((type) => type === 'number' || type === 'boolean'); 4805 var numericRet = returnType !== 'string'; 4806 if (numericRet && numericArgs && !opts) { 4807 return getCFunc(ident); 4808 } 4809 return (...args) => ccall(ident, returnType, argTypes, args, opts); 4810 }; 4811 4812 4813 4814 4815 4816 4817 4818 4819 var uleb128Encode = (n, target) => { 4820 if (n < 128) { 4821 target.push(n); 4822 } else { 4823 target.push((n % 128) | 128, n >> 7); 4824 } 4825 }; 4826 4827 var sigToWasmTypes = (sig) => { 4828 var typeNames = { 4829 'i': 'i32', 4830 'j': 'i64', 4831 'f': 'f32', 4832 'd': 'f64', 4833 'e': 'externref', 4834 'p': 'i32', 4835 }; 4836 var type = { 4837 parameters: [], 4838 results: sig[0] == 'v' ? [] : [typeNames[sig[0]]] 4839 }; 4840 for (var i = 1; i < sig.length; ++i) { 4841 type.parameters.push(typeNames[sig[i]]); 4842 } 4843 return type; 4844 }; 4845 4846 var generateFuncType = (sig, target) => { 4847 var sigRet = sig.slice(0, 1); 4848 var sigParam = sig.slice(1); 4849 var typeCodes = { 4850 'i': 0x7f, // i32 4851 'p': 0x7f, // i32 4852 'j': 0x7e, // i64 4853 'f': 0x7d, // f32 4854 'd': 0x7c, // f64 4855 'e': 0x6f, // externref 4856 }; 4857 4858 // Parameters, length + signatures 4859 target.push(0x60 /* form: func */); 4860 uleb128Encode(sigParam.length, target); 4861 for (var i = 0; i < sigParam.length; ++i) { 4862 target.push(typeCodes[sigParam[i]]); 4863 } 4864 4865 // Return values, length + signatures 4866 // With no multi-return in MVP, either 0 (void) or 1 (anything else) 4867 if (sigRet == 'v') { 4868 target.push(0x00); 4869 } else { 4870 target.push(0x01, typeCodes[sigRet]); 4871 } 4872 }; 4873 var convertJsFunctionToWasm = (func, sig) => { 4874 4875 // If the type reflection proposal is available, use the new 4876 // "WebAssembly.Function" constructor. 4877 // Otherwise, construct a minimal wasm module importing the JS function and 4878 // re-exporting it. 4879 if (typeof WebAssembly.Function == "function") { 4880 return new WebAssembly.Function(sigToWasmTypes(sig), func); 4881 } 4882 4883 // The module is static, with the exception of the type section, which is 4884 // generated based on the signature passed in. 4885 var typeSectionBody = [ 4886 0x01, // count: 1 4887 ]; 4888 generateFuncType(sig, typeSectionBody); 4889 4890 // Rest of the module is static 4891 var bytes = [ 4892 0x00, 0x61, 0x73, 0x6d, // magic ("\0asm") 4893 0x01, 0x00, 0x00, 0x00, // version: 1 4894 0x01, // Type section code 4895 ]; 4896 // Write the overall length of the type section followed by the body 4897 uleb128Encode(typeSectionBody.length, bytes); 4898 bytes.push(...typeSectionBody); 4899 4900 // The rest of the module is static 4901 bytes.push( 4902 0x02, 0x07, // import section 4903 // (import "e" "f" (func 0 (type 0))) 4904 0x01, 0x01, 0x65, 0x01, 0x66, 0x00, 0x00, 4905 0x07, 0x05, // export section 4906 // (export "f" (func 0 (type 0))) 4907 0x01, 0x01, 0x66, 0x00, 0x00, 4908 ); 4909 4910 // We can compile this wasm module synchronously because it is very small. 4911 // This accepts an import (at "e.f"), that it reroutes to an export (at "f") 4912 var module = new WebAssembly.Module(new Uint8Array(bytes)); 4913 var instance = new WebAssembly.Instance(module, { 'e': { 'f': func } }); 4914 var wrappedFunc = instance.exports['f']; 4915 return wrappedFunc; 4916 }; 4917 4918 var wasmTableMirror = []; 4919 4920 var wasmTable; 4921 var getWasmTableEntry = (funcPtr) => { 4922 var func = wasmTableMirror[funcPtr]; 4923 if (!func) { 4924 if (funcPtr >= wasmTableMirror.length) wasmTableMirror.length = funcPtr + 1; 4925 wasmTableMirror[funcPtr] = func = wasmTable.get(funcPtr); 4926 } 4927 return func; 4928 }; 4929 4930 var updateTableMap = (offset, count) => { 4931 if (functionsInTableMap) { 4932 for (var i = offset; i < offset + count; i++) { 4933 var item = getWasmTableEntry(i); 4934 // Ignore null values. 4935 if (item) { 4936 functionsInTableMap.set(item, i); 4937 } 4938 } 4939 } 4940 }; 4941 4942 var functionsInTableMap; 4943 4944 var getFunctionAddress = (func) => { 4945 // First, create the map if this is the first use. 4946 if (!functionsInTableMap) { 4947 functionsInTableMap = new WeakMap(); 4948 updateTableMap(0, wasmTable.length); 4949 } 4950 return functionsInTableMap.get(func) || 0; 4951 }; 4952 4953 4954 var freeTableIndexes = []; 4955 4956 var getEmptyTableSlot = () => { 4957 // Reuse a free index if there is one, otherwise grow. 4958 if (freeTableIndexes.length) { 4959 return freeTableIndexes.pop(); 4960 } 4961 // Grow the table 4962 try { 4963 wasmTable.grow(1); 4964 } catch (err) { 4965 if (!(err instanceof RangeError)) { 4966 throw err; 4967 } 4968 throw 'Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.'; 4969 } 4970 return wasmTable.length - 1; 4971 }; 4972 4973 4974 4975 var setWasmTableEntry = (idx, func) => { 4976 wasmTable.set(idx, func); 4977 // With ABORT_ON_WASM_EXCEPTIONS wasmTable.get is overridden to return wrapped 4978 // functions so we need to call it here to retrieve the potential wrapper correctly 4979 // instead of just storing 'func' directly into wasmTableMirror 4980 wasmTableMirror[idx] = wasmTable.get(idx); 4981 }; 4982 4983 /** @param {string=} sig */ 4984 var addFunction = (func, sig) => { 4985 // Check if the function is already in the table, to ensure each function 4986 // gets a unique index. 4987 var rtn = getFunctionAddress(func); 4988 if (rtn) { 4989 return rtn; 4990 } 4991 4992 // It's not in the table, add it now. 4993 4994 var ret = getEmptyTableSlot(); 4995 4996 // Set the new value. 4997 try { 4998 // Attempting to call this with JS function will cause of table.set() to fail 4999 setWasmTableEntry(ret, func); 5000 } catch (err) { 5001 if (!(err instanceof TypeError)) { 5002 throw err; 5003 } 5004 var wrapped = convertJsFunctionToWasm(func, sig); 5005 setWasmTableEntry(ret, wrapped); 5006 } 5007 5008 functionsInTableMap.set(func, ret); 5009 5010 return ret; 5011 }; 5012 5013 var handleException = (e) => { 5014 // Certain exception types we do not treat as errors since they are used for 5015 // internal control flow. 5016 // 1. ExitStatus, which is thrown by exit() 5017 // 2. "unwind", which is thrown by emscripten_unwind_to_js_event_loop() and others 5018 // that wish to return to JS event loop. 5019 if (e instanceof ExitStatus || e == 'unwind') { 5020 return EXITSTATUS; 5021 } 5022 quit_(1, e); 5023 }; 5024 5025 5026 5027 var maybeExit = () => { 5028 if (runtimeExited) { 5029 return; 5030 } 5031 if (!keepRuntimeAlive()) { 5032 try { 5033 _exit(EXITSTATUS); 5034 } catch (e) { 5035 handleException(e); 5036 } 5037 } 5038 }; 5039 var callUserCallback = (func) => { 5040 if (runtimeExited || ABORT) { 5041 return; 5042 } 5043 try { 5044 func(); 5045 maybeExit(); 5046 } catch (e) { 5047 handleException(e); 5048 } 5049 }; 5050 5051 var runtimeKeepalivePush = () => { 5052 runtimeKeepaliveCounter += 1; 5053 }; 5054 5055 var runtimeKeepalivePop = () => { 5056 runtimeKeepaliveCounter -= 1; 5057 }; 5058 /** @param {number=} timeout */ 5059 var safeSetTimeout = (func, timeout) => { 5060 runtimeKeepalivePush(); 5061 return setTimeout(() => { 5062 runtimeKeepalivePop(); 5063 callUserCallback(func); 5064 }, timeout); 5065 }; 5066 5067 5068 5069 5070 5071 5072 var FS_unlink = (path) => FS.unlink(path); 5073 5074 FS.createPreloadedFile = FS_createPreloadedFile; 5075 FS.staticInit();Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPath"] = FS.createPath;Module["FS_createDataFile"] = FS.createDataFile;Module["FS_createPreloadedFile"] = FS.createPreloadedFile;Module["FS_unlink"] = FS.unlink;Module["FS_createLazyFile"] = FS.createLazyFile;Module["FS_createDevice"] = FS.createDevice;; 5076DOTNET.setup({ wasmEnableSIMD: true,wasmEnableEH: true,enableAotProfiler: false, enableDevToolsProfiler: false, enableLogProfiler: false, enableEventPipe: false, runAOTCompilation: true, wasmEnableThreads: false, gitHash: "95017c711e6afc1085133d440e42b4bd78155701", });; 5077var wasmImports = { 5078 /** @export */ 5079 __assert_fail: ___assert_fail, 5080 /** @export */ 5081 __syscall_faccessat: ___syscall_faccessat, 5082 /** @export */ 5083 __syscall_fadvise64: ___syscall_fadvise64, 5084 /** @export */ 5085 __syscall_fcntl64: ___syscall_fcntl64, 5086 /** @export */ 5087 __syscall_fstat64: ___syscall_fstat64, 5088 /** @export */ 5089 __syscall_fstatfs64: ___syscall_fstatfs64, 5090 /** @export */ 5091 __syscall_ftruncate64: ___syscall_ftruncate64, 5092 /** @export */ 5093 __syscall_getcwd: ___syscall_getcwd, 5094 /** @export */ 5095 __syscall_
5095getdents64: ___syscall_getdents64, 5096 /** @export */ 5097 __syscall_ioctl: ___syscall_ioctl, 5098 /** @export */ 5099 __syscall_lstat64: ___syscall_lstat64, 5100 /** @export */ 5101 __syscall_newfstatat: ___syscall_newfstatat, 5102 /** @export */
vendor: 21,620 bytes, lines 5103-5266
5103 __syscall_openat: ___syscall_openat, 5104 /** @export */ 5105 __syscall_readlinkat: ___syscall_readlinkat, 5106 /** @export */ 5107 __syscall_stat64: ___syscall_stat64, 5108 /** @export */ 5109 __syscall_unlinkat: ___syscall_unlinkat, 5110 /** @export */ 5111 _emscripten_get_now_is_monotonic: __emscripten_get_now_is_monotonic, 5112 /** @export */ 5113 _localtime_js: __localtime_js, 5114 /** @export */ 5115 _mmap_js: __mmap_js, 5116 /** @export */ 5117 _munmap_js: __munmap_js, 5118 /** @export */ 5119 _tzset_js: __tzset_js, 5120 /** @export */ 5121 abort: _abort, 5122 /** @export */ 5123 emscripten_date_now: _emscripten_date_now, 5124 /** @export */ 5125 emscripten_force_exit: _emscripten_force_exit, 5126 /** @export */ 5127 emscripten_get_heap_max: _emscripten_get_heap_max, 5128 /** @export */ 5129 emscripten_get_now: _emscripten_get_now, 5130 /** @export */ 5131 emscripten_get_now_res: _emscripten_get_now_res, 5132 /** @export */ 5133 emscripten_resize_heap: _emscripten_resize_heap, 5134 /** @export */ 5135 environ_get: _environ_get, 5136 /** @export */ 5137 environ_sizes_get: _environ_sizes_get, 5138 /** @export */ 5139 exit: _exit, 5140 /** @export */ 5141 fd_close: _fd_close, 5142 /** @export */ 5143 fd_pread: _fd_pread, 5144 /** @export */ 5145 fd_read: _fd_read, 5146 /** @export */ 5147 fd_seek: _fd_seek, 5148 /** @export */ 5149 fd_write: _fd_write, 5150 /** @export */ 5151 mono_interp_flush_jitcall_queue: _mono_interp_flush_jitcall_queue, 5152 /** @export */ 5153 mono_interp_invoke_wasm_jit_call_trampoline: _mono_interp_invoke_wasm_jit_call_trampoline, 5154 /** @export */ 5155 mono_interp_jit_wasm_entry_trampoline: _mono_interp_jit_wasm_entry_trampoline, 5156 /** @export */ 5157 mono_interp_jit_wasm_jit_call_trampoline: _mono_interp_jit_wasm_jit_call_trampoline, 5158 /** @export */ 5159 mono_interp_record_interp_entry: _mono_interp_record_interp_entry, 5160 /** @export */ 5161 mono_interp_tier_prepare_jiterpreter: _mono_interp_tier_prepare_jiterpreter, 5162 /** @export */ 5163 mono_wasm_bind_js_import_ST: _mono_wasm_bind_js_import_ST, 5164 /** @export */ 5165 mono_wasm_browser_entropy: _mono_wasm_browser_entropy, 5166 /** @export */ 5167 mono_wasm_cancel_promise: _mono_wasm_cancel_promise, 5168 /** @export */ 5169 mono_wasm_console_clear: _mono_wasm_console_clear, 5170 /** @export */ 5171 mono_wasm_free_method_data: _mono_wasm_free_method_data, 5172 /** @export */ 5173 mono_wasm_get_locale_info: _mono_wasm_get_locale_info, 5174 /** @export */ 5175 mono_wasm_invoke_js_function: _mono_wasm_invoke_js_function, 5176 /** @export */ 5177 mono_wasm_invoke_jsimport_ST: _mono_wasm_invoke_jsimport_ST, 5178 /** @export */ 5179 mono_wasm_process_current_pid: _mono_wasm_process_current_pid, 5180 /** @export */ 5181 mono_wasm_release_cs_owned_object: _mono_wasm_release_cs_owned_object, 5182 /** @export */ 5183 mono_wasm_resolve_or_reject_promise: _mono_wasm_resolve_or_reject_promise, 5184 /** @export */ 5185 mono_wasm_schedule_timer: _mono_wasm_schedule_timer, 5186 /** @export */ 5187 mono_wasm_set_entrypoint_breakpoint: _mono_wasm_set_entrypoint_breakpoint, 5188 /** @export */ 5189 mono_wasm_trace_logger: _mono_wasm_trace_logger, 5190 /** @export */ 5191 schedule_background_exec: _schedule_background_exec, 5192 /** @export */ 5193 strftime: _strftime 5194}; 5195var wasmExports = createWasm(); 5196var ___wasm_call_ctors = () => (___wasm_call_ctors = wasmExports['__wasm_call_ctors'])(); 5197var _mono_wasm_register_root = Module['_mono_wasm_register_root'] = (a0, a1, a2) => (_mono_wasm_register_root = Module['_mono_wasm_register_root'] = wasmExports['mono_wasm_register_root'])(a0, a1, a2); 5198var _mono_wasm_deregister_root = Module['_mono_wasm_deregister_root'] = (a0) => (_mono_wasm_deregister_root = Module['_mono_wasm_deregister_root'] = wasmExports['mono_wasm_deregister_root'])(a0); 5199var _mono_wasm_add_assembly = Module['_mono_wasm_add_assembly'] = (a0, a1, a2) => (_mono_wasm_add_assembly = Module['_mono_wasm_add_assembly'] = wasmExports['mono_wasm_add_assembly'])(a0, a1, a2); 5200var _mono_wasm_add_satellite_assembly = Module['_mono_wasm_add_satellite_assembly'] = (a0, a1, a2, a3) => (_mono_wasm_add_satellite_assembly = Module['_mono_wasm_add_satellite_assembly'] = wasmExports['mono_wasm_add_satellite_assembly'])(a0, a1, a2, a3); 5201var _malloc = Module['_malloc'] = (a0) => (_malloc = Module['_malloc'] = wasmExports['malloc'])(a0); 5202var _mono_wasm_setenv = Module['_mono_wasm_setenv'] = (a0, a1) => (_mono_wasm_setenv = Module['_mono_wasm_setenv'] = wasmExports['mono_wasm_setenv'])(a0, a1); 5203var _mono_wasm_getenv = Module['_mono_wasm_getenv'] = (a0) => (_mono_wasm_getenv = Module['_mono_wasm_getenv'] = wasmExports['mono_wasm_getenv'])(a0); 5204var _free = Module['_free'] = (a0) => (_free = Module['_free'] = wasmExports['free'])(a0); 5205var _mono_wasm_load_runtime = Module['_mono_wasm_load_runtime'] = (a0, a1, a2, a3) => (_mono_wasm_load_runtime = Module['_mono_wasm_load_runtime'] = wasmExports['mono_wasm_load_runtime'])(a0, a1, a2, a3); 5206var _mono_wasm_invoke_jsexport = Module['_mono_wasm_invoke_jsexport'] = (a0, a1) => (_mono_wasm_invoke_jsexport = Module['_mono_wasm_invoke_jsexport'] = wasmExports['mono_wasm_invoke_jsexport'])(a0, a1); 5207var _mono_wasm_string_from_utf16_ref = Module['_mono_wasm_string_from_utf16_ref'] = (a0, a1, a2) => (_mono_wasm_string_from_utf16_ref = Module['_mono_wasm_string_from_utf16_ref'] = wasmExports['mono_wasm_string_from_utf16_ref'])(a0, a1, a2); 5208var _mono_wasm_exec_regression = Module['_mono_wasm_exec_regression'] = (a0, a1) => (_mono_wasm_exec_regression = Module['_mono_wasm_exec_regression'] = wasmExports['mono_wasm_exec_regression'])(a0, a1); 5209var _mono_wasm_exit = Module['_mono_wasm_exit'] = (a0) => (_mono_wasm_exit = Module['_mono_wasm_exit'] = wasmExports['mono_wasm_exit'])(a0); 5210var _fflush = (a0) => (_fflush = wasmExports['fflush'])(a0); 5211var _mono_wasm_set_main_args = Module['_mono_wasm_set_main_args'] = (a0, a1) => (_mono_wasm_set_main_args = Module['_mono_wasm_set_main_args'] = wasmExports['mono_wasm_set_main_args'])(a0, a1); 5212var _mono_wasm_strdup = Module['_mono_wasm_strdup'] = (a0) => (_mono_wasm_strdup = Module['_mono_wasm_strdup'] = wasmExports['mono_wasm_strdup'])(a0); 5213var _mono_wasm_parse_runtime_options = Module['_mono_wasm_parse_runtime_options'] = (a0, a1) => (_mono_wasm_parse_runtime_options = Module['_mono_wasm_parse_runtime_options'] = wasmExports['mono_wasm_parse_runtime_options'])(a0, a1); 5214var _mono_wasm_intern_string_ref = Module['_mono_wasm_intern_string_ref'] = (a0) => (_mono_wasm_intern_string_ref = Module['_mono_wasm_intern_string_ref'] = wasmExports['mono_wasm_intern_string_ref'])(a0); 5215var _mono_wasm_string_get_data_ref = Module['_mono_wasm_string_get_data_ref'] = (a0, a1, a2, a3) => (_mono_wasm_string_get_data_ref = Module['_mono_wasm_string_get_data_ref'] = wasmExports['mono_wasm_string_get_data_ref'])(a0, a1, a2, a3); 5216var _mono_wasm_write_managed_pointer_unsafe = Module['_mono_wasm_write_managed_pointer_unsafe'] = (a0, a1) => (_mono_wasm_write_managed_pointer_unsafe = Module['_mono_wasm_write_managed_pointer_unsafe'] = wasmExports['mono_wasm_write_managed_pointer_unsafe'])(a0, a1); 5217var _mono_wasm_copy_managed_pointer = Module['_mono_wasm_copy_managed_pointer'] = (a0, a1) => (_mono_wasm_copy_managed_pointer = Module['_mono_wasm_copy_managed_pointer'] = wasmExports['mono_wasm_copy_managed_pointer'])(a0, a1); 5218var _mono_wasm_init_finalizer_thread = Module['_mono_wasm_init_finalizer_thread'] = () => (_mono_wasm_init_finalizer_thread = Module['_mono_wasm_init_finalizer_thread'] = wasmExports['mono_wasm_init_finalizer_thread'])(); 5219var _mono_wasm_i52_to_f64 = Module['_mono_wasm_i52_to_f64'] = (a0, a1) => (_mono_wasm_i52_to_f64 = Module['_mono_wasm_i52_to_f64'] = wasmExports['mono_wasm_i52_to_f64'])(a0, a1); 5220var _mono_wasm_u52_to_f64 = Module['_mono_wasm_u52_to_f64'] = (a0, a1) => (_mono_wasm_u52_to_f64 = Module['_mono_wasm_u52_to_f64'] = wasmExports['mono_wasm_u52_to_f64'])(a0, a1); 5221var _mono_wasm_f64_to_u52 = Module['_mono_wasm_f64_to_u52'] = (a0, a1) => (_mono_wasm_f64_to_u52 = Module['_mono_wasm_f64_to_u52'] = wasmExports['mono_wasm_f64_to_u52'])(a0, a1); 5222var _mono_wasm_f64_to_i52 = Module['_mono_wasm_f64_to_i52'] = (a0, a1) => (_mono_wasm_f64_to_i52 = Module['_mono_wasm_f64_to_i52'] = wasmExports['mono_wasm_f64_to_i52'])(a0, a1); 5223var _mono_wasm_method_get_full_name = Module['_mono_wasm_method_get_full_name'] = (a0) => (_mono_wasm_method_get_full_name = Module['_mono_wasm_method_get_full_name'] = wasmExports['mono_wasm_method_get_full_name'])(a0); 5224var _mono_wasm_method_get_name = Module['_mono_wasm_method_get_name'] = (a0) => (_mono_wasm_method_get_name = Module['_mono_wasm_method_get_name'] = wasmExports['mono_wasm_method_get_name'])(a0); 5225var _mono_wasm_method_get_name_ex = Module['_mono_wasm_method_get_name_ex'] = (a0) => (_mono_wasm_method_get_name_ex = Module['_mono_wasm_method_get_name_ex'] = wasmExports['mono_wasm_method_get_name_ex'])(a0); 5226var _mono_wasm_get_f32_unaligned = Module['_mono_wasm_get_f32_unaligned'] = (a0) => (_mono_wasm_get_f32_unaligned = Module['_mono_wasm_get_f32_unaligned'] = wasmExports['mono_wasm_get_f32_unaligned'])(a0); 5227var _mono_wasm_get_f64_unaligned = Module['_mono_wasm_get_f64_unaligned'] = (a0) => (_mono_wasm_get_f64_unaligned = Module['_mono_wasm_get_f64_unaligned'] = wasmExports['mono_wasm_get_f64_unaligned'])(a0); 5228var _mono_wasm_get_i32_unaligned = Module['_mono_wasm_get_i32_unaligned'] = (a0) => (_mono_wasm_get_i32_unaligned = Module['_mono_wasm_get_i32_unaligned'] = wasmExports['mono_wasm_get_i32_unaligned'])(a0); 5229var _mono_wasm_is_zero_page_reserved = Module['_mono_wasm_is_zero_page_reserved'] = () => (_mono_wasm_is_zero_page_reserved = Module['_mono_wasm_is_zero_page_reserved'] = wasmExports['mono_wasm_is_zero_page_reserved'])(); 5230var _mono_wasm_read_as_bool_or_null_unsafe = Module['_mono_wasm_read_as_bool_or_null_unsafe'] = (a0) => (_mono_wasm_read_as_bool_or_null_unsafe = Module['_mono_wasm_read_as_bool_or_null_unsafe'] = wasmExports['mono_wasm_read_as_bool_or_null_unsafe'])(a0); 5231var _mono_wasm_assembly_load = Module['_mono_wasm_assembly_load'] = (a0) => (_mono_wasm_assembly_load = Module['_mono_wasm_assembly_load'] = wasmExports['mono_wasm_assembly_load'])(a0); 5232var _mono_wasm_assembly_find_class = Module['_mono_wasm_assembly_find_class'] = (a0, a1, a2) => (_mono_wasm_assembly_find_class = Module['_mono_wasm_assembly_find_class'] = wasmExports['mono_wasm_assembly_find_class'])(a0, a1, a2); 5233var _mono_wasm_assembly_find_method = Module['_mono_wasm_assembly_find_method'] = (a0, a1, a2) => (_mono_wasm_assembly_find_method = Module['_mono_wasm_assembly_find_method'] = wasmExports['mono_wasm_assembly_find_method'])(a0, a1, a2); 5234var _mono_aot_Microsoft_AspNetCore_Authorization_get_method = Module['_mono_aot_Microsoft_AspNetCore_Authorization_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_Authorization_get_method = Module['_mono_aot_Microsoft_AspNetCore_Authorization_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_Authorization_get_method'])(a0); 5235var _pow = Module['_pow'] = (a0, a1) => (_pow = Module['_pow'] = wasmExports['pow'])(a0, a1); 5236var _memset = Module['_memset'] = (a0, a1, a2) => (_memset = Module['_memset'] = wasmExports['memset'])(a0, a1, a2); 5237var _mono_aot_Microsoft_AspNetCore_Components_get_method = Module['_mono_aot_Microsoft_AspNetCore_Components_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_Components_get_method = Module['_mono_aot_Microsoft_AspNetCore_Components_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_Components_get_method'])(a0); 5238var _mono_aot_Microsoft_AspNetCore_Components_Authorization_get_method = Module['_mono_aot_Microsoft_AspNetCore_Components_Authorization_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_Components_Authorization_get_method = Module['_mono_aot_Microsoft_AspNetCore_Components_Authorization_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_Components_Authorization_get_method'])(a0); 5239var _mono_aot_Microsoft_AspNetCore_Components_Forms_get_method = Module['_mono_aot_Microsoft_AspNetCore_Components_Forms_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_Components_Forms_get_method = Module['_mono_aot_Microsoft_AspNetCore_Components_Forms_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_Components_Forms_get_method'])(a0); 5240var _mono_aot_Microsoft_AspNetCore_Components_Web_get_method = Module['_mono_aot_Microsoft_AspNetCore_Components_Web_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_Components_Web_get_method = Module['_mono_aot_Microsoft_AspNetCore_Components_Web_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_Components_Web_get_method'])(a0); 5241var _mono_aot_Microsoft_AspNetCore_Components_WebAssembly_get_method = Module['_mono_aot_Microsoft_AspNetCore_Components_WebAssembly_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_Components_WebAssembly_get_method = Module['_mono_aot_Microsoft_AspNetCore_Components_WebAssembly_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_Components_WebAssembly_get_method'])(a0); 5242var _mono_aot_Microsoft_AspNetCore_Connections_Abstractions_get_method = Module['_mono_aot_Microsoft_AspNetCore_Connections_Abstractions_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_Connections_Abstractions_get_method = Module['_mono_aot_Microsoft_AspNetCore_Connections_Abstractions_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_Connections_Abstractions_get_method'])(a0); 5243var _mono_aot_Microsoft_AspNetCore_Http_Abstractions_get_method = Module['_mono_aot_Microsoft_AspNetCore_Http_Abstractions_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_Http_Abstractions_get_method = Module['_mono_aot_Microsoft_AspNetCore_Http_Abstractions_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_Http_Abstractions_get_method'])(a0); 5244var _mono_aot_Microsoft_AspNetCore_Http_Connections_Client_get_method = Module['_mono_aot_Microsoft_AspNetCore_Http_Connections_Client_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_Http_Connections_Client_get_method = Module['_mono_aot_Microsoft_AspNetCore_Http_Connections_Client_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_Http_Connections_Client_get_method'])(a0); 5245var _mono_aot_Microsoft_AspNetCore_Http_Connections_Common_get_method = Module['_mono_aot_Microsoft_AspNetCore_Http_Connections_Common_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_Http_Connections_Common_get_method = Module['_mono_aot_Microsoft_AspNetCore_Http_Connections_Common_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_Http_Connections_Common_get_method'])(a0); 5246var _mono_aot_Microsoft_AspNetCore_Http_Features_get_method = Module['_mono_aot_Microsoft_AspNetCore_Http_Features_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_Http_Features_get_method = Module['_mono_aot_Microsoft_AspNetCore_Http_Features_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_Http_Features_get_method'])(a0); 5247var _mono_aot_Microsoft_AspNetCore_Metadata_get_method = Module['_mono_aot_Microsoft_AspNetCore_Metadata_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_Metadata_get_method = Module['_mono_aot_Microsoft_AspNetCore_Metadata_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_Metadata_get_method'])(a0); 5248var _mono_aot_Microsoft_AspNetCore_SignalR_Client_get_method = Module['_mono_aot_Microsoft_AspNetCore_SignalR_Client_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_SignalR_Client_get_method = Module['_mono_aot_Microsoft_AspNetCore_SignalR_Client_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_SignalR_Client_get_method'])(a0); 5249var _mono_aot_Microsoft_AspNetCore_SignalR_Client_Core_get_method = Module['_mono_aot_Microsoft_AspNetCore_SignalR_Client_Core_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_SignalR_Client_Core_get_method = Module['_mono_aot_Microsoft_AspNetCore_SignalR_Client_Core_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_SignalR_Client_Core_get_method'])(a0); 5250var _mono_aot_Microsoft_AspNetCore_SignalR_Common_get_method = Module['_mono_aot_Microsoft_AspNetCore_SignalR_Common_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_SignalR_Common_get_method = Module['_mono_aot_Microsoft_AspNetCore_SignalR_Common_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_SignalR_Common_get_method'])(a0); 5251var _mono_aot_Microsoft_AspNetCore_SignalR_Protocols_Json_get_method = Module['_mono_aot_Microsoft_AspNetCore_SignalR_Protocols_Json_get_method'] = (a0) => (_mono_aot_Microsoft_AspNetCore_SignalR_Protocols_Json_get_method = Module['_mono_aot_Microsoft_AspNetCore_SignalR_Protocols_Json_get_method'] = wasmExports['mono_aot_Microsoft_AspNetCore_SignalR_Protocols_Json_get_method'])(a0); 5252var _mono_aot_Microsoft_Extensions_Configuration_get_method = Module['_mono_aot_Microsoft_Extensions_Configuration_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Configuration_get_method = Module['_mono_aot_Microsoft_Extensions_Configuration_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Configuration_get_method'])(a0); 5253var _mono_aot_Microsoft_Extensions_Configuration_Abstractions_get_method = Module['_mono_aot_Microsoft_Extensions_Configuration_Abstractions_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Configuration_Abstractions_get_method = Module['_mono_aot_Microsoft_Extensions_Configuration_Abstractions_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Configuration_Abstractions_get_method'])(a0); 5254var _mono_aot_Microsoft_Extensions_Configuration_Json_get_method = Module['_mono_aot_Microsoft_Extensions_Configuration_Json_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Configuration_Json_get_method = Module['_mono_aot_Microsoft_Extensions_Configuration_Json_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Configuration_Json_get_method'])(a0); 5255var _mono_aot_Microsoft_Extensions_DependencyInjection_get_method = Module['_mono_aot_Microsoft_Extensions_DependencyInjection_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_DependencyInjection_get_method = Module['_mono_aot_Microsoft_Extensions_DependencyInjection_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_DependencyInjection_get_method'])(a0); 5256var _mono_aot_Microsoft_Extensions_DependencyInjection_Abstractions_get_method = Module['_mono_aot_Microsoft_Extensions_DependencyInjection_Abstractions_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_DependencyInjection_Abstractions_get_method = Module['_mono_aot_Microsoft_Extensions_DependencyInjection_Abstractions_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_DependencyInjection_Abstractions_get_method'])(a0); 5257var _mono_aot_Microsoft_Extensions_Diagnostics_get_method = Module['_mono_aot_Microsoft_Extensions_Diagnostics_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Diagnostics_get_method = Module['_mono_aot_Microsoft_Extensions_Diagnostics_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Diagnostics_get_method'])(a0); 5258var _mono_aot_Microsoft_Extensions_Diagnostics_Abstractions_get_method = Module['_mono_aot_Microsoft_Extensions_Diagnostics_Abstractions_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Diagnostics_Abstractions_get_method = Module['_mono_aot_Microsoft_Extensions_Diagnostics_Abstractions_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Diagnostics_Abstractions_get_method'])(a0); 5259var _mono_aot_Microsoft_Extensions_Features_get_method = Module['_mono_aot_Microsoft_Extensions_Features_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Features_get_method = Module['_mono_aot_Microsoft_Extensions_Features_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Features_get_method'])(a0); 5260var _mono_aot_Microsoft_Extensions_FileProviders_Abstractions_get_method = Module['_mono_aot_Microsoft_Extensions_FileProviders_Abstractions_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_FileProviders_Abstractions_get_method = Module['_mono_aot_Microsoft_Extensions_FileProviders_Abstractions_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_FileProviders_Abstractions_get_method'])(a0); 5261var _mono_aot_Microsoft_Extensions_Hosting_Abstractions_get_method = Module['_mono_aot_Microsoft_Extensions_Hosting_Abstractions_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Hosting_Abstractions_get_method = Module['_mono_aot_Microsoft_Extensions_Hosting_Abstractions_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Hosting_Abstractions_get_method'])(a0); 5262var _mono_aot_Microsoft_Extensions_Http_get_method = Module['_mono_aot_Microsoft_Extensions_Http_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Http_get_method = Module['_mono_aot_Microsoft_Extensions_Http_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Http_get_method'])(a0); 5263var _mono_aot_Microsoft_Extensions_Localization_get_method = Module['_mono_aot_Microsoft_Extensions_Localization_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Localization_get_method = Module['_mono_aot_Microsoft_Extensions_Localization_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Localization_get_method'])(a0); 5264var _mono_aot_Microsoft_Extensions_Localization_Abstractions_get_method = Module['_mono_aot_Microsoft_Extensions_Localization_Abstractions_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Localization_Abstractions_get_method = Module['_mono_aot_Microsoft_Extensions_Localization_Abstractions_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Localization_Abstractions_get_method'])(a0); 5265var _mono_aot_Microsoft_Extensions_Logging_get_method = Module['_mono_aot_Microsoft_Extensions_Logging_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Logging_get_method = Module['_mono_aot_Microsoft_Extensions_Logging_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Logging_get_method'])(a0); 5266var _mono_aot_Microsoft_Extensions_Logging_Abstractions_get_method = Module['_mono_aot_Microsoft_Extensions_Logg
5266ing_Abstractions_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Logging_Abstractions_get_method = Module['_mono_aot_Microsoft_Extensions_Logging_Abstractions_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Logging_Abstractions_get_method'])(a0); 5267var _mono_aot_Microsoft_Extensions_Options_get_method = Module['_mono_aot_Microsoft_Extensions_Options_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Options_get_method = Module['_mono_aot_Microsoft_Extensions_Options_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Options_get_method'])(a0); 5268var _mono_aot_Microsoft_Extensions_Primitives_get_method = Module['_mono_aot_Microsoft_Extensions_Primitives_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Primitives_get_method = Module['_mono_aot_Microsoft_Extensions_Primitives_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Primitives_get_method'])(a0); 5269var _mono_aot_Microsoft_Extensions_Validation_get_method = Module['_mono_aot_Microsoft_Extensions_Validation_get_method'] = (a0) => (_mono_aot_Microsoft_Extensions_Validation_get_method = Module['_mono_aot_Microsoft_Extensions_Validation_get_method'] = wasmExports['mono_aot_Microsoft_Extensions_Validation_get_method'])(a0); 5270var _mono_aot_Microsoft_JSInterop_get_method = Module['_mono_aot_Microsoft_JSInterop_get_method'] = (a0) => (_mono_aot_Microsoft_JSInterop_get_method = Module['_mono_aot_Microsoft_JSInterop_get_method'] = wasmExports['mono_aot_Microsoft_JSInterop_get_method'])(a0); 5271var _sin = Module['_sin'] = (a0) => (_sin = Module['_sin'] = wasmExports['sin'])(a0); 5272var _cos = Module['_cos'] = (a0) => (_cos = Module['_cos'] = wasmExports['cos'])(a0); 5273var _mono_aot_MudBlazor_get_method = Module['_mono_aot_MudBlazor_get_method'] = (a0) => (_mono_aot_MudBlazor_get_method = Module['_mono_aot_MudBlazor_get_method'] = wasmExports['mono_aot_MudBlazor_get_method'])(a0); 5274var _log = Module['_log'] = (a0) => (_log = Module['_log'] = wasmExports['log'])(a0); 5275var _mono_aot_SvgPathProperties_get_method = Module['_mono_aot_SvgPathProperties_get_method'] = (a0) => (_mono_aot_SvgPathProperties_get_method = Module['_mono_aot_SvgPathProperties_get_method'] = wasmExports['mono_aot_SvgPathProperties_get_method'])(a0); 5276var _mono_aot_Blazor_Diagrams_get_method = Module['_mono_aot_Blazor_Diagrams_get_method'] = (a0) => (_mono_aot_Blazor_Diagrams_get_method = Module['_mono_aot_Blazor_Diagrams_get_method'] = wasmExports['mono_aot_Blazor_Diagrams_get_method'])(a0); 5277var _mono_aot_Blazor_Diagrams_Core_get_method = Module['_mono_aot_Blazor_Diagrams_Core_get_method'] = (a0) => (_mono_aot_Blazor_Diagrams_Core_get_method = Module['_mono_aot_Blazor_Diagrams_Core_get_method'] = wasmExports['mono_aot_Blazor_Diagrams_Core_get_method'])(a0); 5278var _mono_aot_Geoconfirmed_Shared_get_method = Module['_mono_aot_Geoconfirmed_Shared_get_method'] = (a0) => (_mono_aot_Geoconfirmed_Shared_get_method = Module['_mono_aot_Geoconfirmed_Shared_get_method'] = wasmExports['mono_aot_Geoconfirmed_Shared_get_method'])(a0); 5279var _mono_aot_Geoconfirmed_Client_get_method = Module['_mono_aot_Geoconfirmed_Client_get_method'] = (a0) => (_mono_aot_Geoconfirmed_Client_get_method = Module['_mono_aot_Geoconfirmed_Client_get_method'] = wasmExports['mono_aot_Geoconfirmed_Client_get_method'])(a0); 5280var _mono_aot_System_Collections_Concurrent_get_method = Module['_mono_aot_System_Collections_Concurrent_get_method'] = (a0) => (_mono_aot_System_Collections_Concurrent_get_method = Module['_mono_aot_System_Collections_Concurrent_get_method'] = wasmExports['mono_aot_System_Collections_Concurrent_get_method'])(a0); 5281var _mono_aot_System_Collections_Immutable_get_method = Module['_mono_aot_System_Collections_Immutable_get_method'] = (a0) => (_mono_aot_System_Collections_Immutable_get_method = Module['_mono_aot_System_Collections_Immutable_get_method'] = wasmExports['mono_aot_System_Collections_Immutable_get_method'])(a0); 5282var _mono_aot_System_Collections_NonGeneric_get_method = Module['_mono_aot_System_Collections_NonGeneric_get_method'] = (a0) => (_mono_aot_System_Collections_NonGeneric_get_method = Module['_mono_aot_System_Collections_NonGeneric_get_method'] = wasmExports['mono_aot_System_Collections_NonGeneric_get_method'])(a0); 5283var _mono_aot_System_Collections_Specialized_get_method = Module['_mono_aot_System_Collections_Specialized_get_method'] = (a0) => (_mono_aot_System_Collections_Specialized_get_method = Module['_mono_aot_System_Collections_Specialized_get_method'] = wasmExports['mono_aot_System_Collections_Specialized_get_method'])(a0); 5284var _mono_aot_System_Collections_get_method = Module['_mono_aot_System_Collections_get_method'] = (a0) => (_mono_aot_System_Collections_get_method = Module['_mono_aot_System_Collections_get_method'] = wasmExports['mono_aot_System_Collections_get_method'])(a0); 5285var _mono_aot_System_ComponentModel_Annotations_get_method = Module['_mono_aot_System_ComponentModel_Annotations_get_method'] = (a0) => (_mono_aot_System_ComponentModel_Annotations_get_method = Module['_mono_aot_System_ComponentModel_Annotations_get_method'] = wasmExports['mono_aot_System_ComponentModel_Annotations_get_method'])(a0); 5286var _mono_aot_System_ComponentModel_Primitives_get_method = Module['_mono_aot_System_ComponentModel_Primitives_get_method'] = (a0) => (_mono_aot_System_ComponentModel_Primitives_get_method = Module['_mono_aot_System_ComponentModel_Primitives_get_method'] = wasmExports['mono_aot_System_ComponentModel_Primitives_get_method'])(a0); 5287var _mono_aot_System_ComponentModel_TypeConverter_get_method = Module['_mono_aot_System_ComponentModel_TypeConverter_get_method'] = (a0) => (_mono_aot_System_ComponentModel_TypeConverter_get_method = Module['_mono_aot_System_ComponentModel_TypeConverter_get_method'] = wasmExports['mono_aot_System_ComponentModel_TypeConverter_get_method'])(a0); 5288var _mono_aot_System_ComponentModel_get_method = Module['_mono_aot_System_ComponentModel_get_method'] = (a0) => (_mono_aot_System_ComponentModel_get_method = Module['_mono_aot_System_ComponentModel_get_method'] = wasmExports['mono_aot_System_ComponentModel_get_method'])(a0); 5289var _mono_aot_System_Console_get_method = Module['_mono_aot_System_Console_get_method'] = (a0) => (_mono_aot_System_Console_get_method = Module['_mono_aot_System_Console_get_method'] = wasmExports['mono_aot_System_Console_get_method'])(a0); 5290var _mono_aot_System_Diagnostics_Debug_get_method = Module['_mono_aot_System_Diagnostics_Debug_get_method'] = (a0) => (_mono_aot_System_Diagnostics_Debug_get_method = Module['_mono_aot_System_Diagnostics_Debug_get_method'] = wasmExports['mono_aot_System_Diagnostics_Debug_get_method'])(a0); 5291var _mono_aot_System_Diagnostics_DiagnosticSource_get_method = Module['_mono_aot_System_Diagnostics_DiagnosticSource_get_method'] = (a0) => (_mono_aot_System_Diagnostics_DiagnosticSource_get_method = Module['_mono_aot_System_Diagnostics_DiagnosticSource_get_method'] = wasmExports['mono_aot_System_Diagnostics_DiagnosticSource_get_method'])(a0); 5292var _mono_aot_System_IO_Pipelines_get_method = Module['_mono_aot_System_IO_Pipelines_get_method'] = (a0) => (_mono_aot_System_IO_Pipelines_get_method = Module['_mono_aot_System_IO_Pipelines_get_method'] = wasmExports['mono_aot_System_IO_Pipelines_get_method'])(a0); 5293var _mono_aot_System_Linq_Expressions_get_method = Module['_mono_aot_System_Linq_Expressions_get_method'] = (a0) => (_mono_aot_System_Linq_Expressions_get_method = Module['_mono_aot_System_Linq_Expressions_get_method'] = wasmExports['mono_aot_System_Linq_Expressions_get_method'])(a0); 5294var _mono_aot_System_Linq_get_method = Module['_mono_aot_System_Linq_get_method'] = (a0) => (_mono_aot_System_Linq_get_method = Module['_mono_aot_System_Linq_get_method'] = wasmExports['mono_aot_System_Linq_get_method'])(a0); 5295var _mono_aot_System_Memory_get_method = Module['_mono_aot_System_Memory_get_method'] = (a0) => (_mono_aot_System_Memory_get_method = Module['_mono_aot_System_Memory_get_method'] = wasmExports['mono_aot_System_Memory_get_method'])(a0); 5296var _mono_aot_System_Net_Http_Json_get_method = Module['_mono_aot_System_Net_Http_Json_get_method'] = (a0) => (_mono_aot_System_Net_Http_Json_get_method = Module['_mono_aot_System_Net_Http_Json_get_method'] = wasmExports['mono_aot_System_Net_Http_Json_get_method'])(a0); 5297var _mono_aot_System_Net_Http_get_method = Module['_mono_aot_System_Net_Http_get_method'] = (a0) => (_mono_aot_System_Net_Http_get_method = Module['_mono_aot_System_Net_Http_get_method'] = wasmExports['mono_aot_System_Net_Http_get_method'])(a0); 5298var _mono_aot_System_Net_Primitives_get_method = Module['_mono_aot_System_Net_Primitives_get_method'] = (a0) => (_mono_aot_System_Net_Primitives_get_method = Module['_mono_aot_System_Net_Primitives_get_method'] = wasmExports['mono_aot_System_Net_Primitives_get_method'])(a0); 5299var _mono_aot_System_Net_Requests_get_method = Module['_mono_aot_System_Net_Requests_get_method'] = (a0) => (_mono_aot_System_Net_Requests_get_method = Module['_mono_aot_System_Net_Requests_get_method'] = wasmExports['mono_aot_System_Net_Requests_get_method'])(a0); 5300var _mono_aot_System_Net_Security_get_method = Module['_mono_aot_System_Net_Security_get_method'] = (a0) => (_mono_aot_System_Net_Security_get_method = Module['_mono_aot_System_Net_Security_get_method'] = wasmExports['mono_aot_System_Net_Security_get_method'])(a0); 5301var _mono_aot_System_Net_ServerSentEvents_get_method = Module['_mono_aot_System_Net_ServerSentEvents_get_method'] = (a0) => (_mono_aot_System_Net_ServerSentEvents_get_method = Module['_mono_aot_System_Net_ServerSentEvents_get_method'] = wasmExports['mono_aot_System_Net_ServerSentEvents_get_method'])(a0); 5302var _mono_aot_System_Net_WebSockets_Client_get_method = Module['_mono_aot_System_Net_WebSockets_Client_get_method'] = (a0) => (_mono_aot_System_Net_WebSockets_Client_get_method = Module['_mono_aot_System_Net_WebSockets_Client_get_method'] = wasmExports['mono_aot_System_Net_WebSockets_Client_get_method'])(a0); 5303var _mono_aot_System_Net_WebSockets_get_method = Module['_mono_aot_System_Net_WebSockets_get_method'] = (a0) => (_mono_aot_System_Net_WebSockets_get_method = Module['_mono_aot_System_Net_WebSockets_get_method'] = wasmExports['mono_aot_System_Net_WebSockets_get_method'])(a0); 5304var _mono_aot_System_ObjectModel_get_method = Module['_mono_aot_System_ObjectModel_get_method'] = (a0) => (_mono_aot_System_ObjectModel_get_method = Module['_mono_aot_System_ObjectModel_get_method'] = wasmExports['mono_aot_System_ObjectModel_get_method'])(a0); 5305var _mono_aot_System_Private_Uri_get_method = Module['_mono_aot_System_Private_Uri_get_method'] = (a0) => (_mono_aot_System_Private_Uri_get_method = Module['_mono_aot_System_Private_Uri_get_method'] = wasmExports['mono_aot_System_Private_Uri_get_method'])(a0); 5306var _mono_aot_System_Private_Xml_get_method = Module['_mono_aot_System_Private_Xml_get_method'] = (a0) => (_mono_aot_System_Private_Xml_get_method = Module['_mono_aot_System_Private_Xml_get_method'] = wasmExports['mono_aot_System_Private_Xml_get_method'])(a0); 5307var _mono_aot_System_Resources_ResourceManager_get_method = Module['_mono_aot_System_Resources_ResourceManager_get_method'] = (a0) => (_mono_aot_System_Resources_ResourceManager_get_method = Module['_mono_aot_System_Resources_ResourceManager_get_method'] = wasmExports['mono_aot_System_Resources_ResourceManager_get_method'])(a0); 5308var _mono_aot_System_Runtime_InteropServices_JavaScript_get_method = Module['_mono_aot_System_Runtime_InteropServices_JavaScript_get_method'] = (a0) => (_mono_aot_System_Runtime_InteropServices_JavaScript_get_method = Module['_mono_aot_System_Runtime_InteropServices_JavaScript_get_method'] = wasmExports['mono_aot_System_Runtime_InteropServices_JavaScript_get_method'])(a0); 5309var _mono_aot_System_Runtime_InteropServices_get_method = Module['_mono_aot_System_Runtime_InteropServices_get_method'] = (a0) => (_mono_aot_System_Runtime_InteropServices_get_method = Module['_mono_aot_System_Runtime_InteropServices_get_method'] = wasmExports['mono_aot_System_Runtime_InteropServices_get_method'])(a0); 5310var _mono_aot_System_Runtime_Numerics_get_method = Module['_mono_aot_System_Runtime_Numerics_get_method'] = (a0) => (_mono_aot_System_Runtime_Numerics_get_method = Module['_mono_aot_System_Runtime_Numerics_get_method'] = wasmExports['mono_aot_System_Runtime_Numerics_get_method'])(a0); 5311var _mono_aot_System_Runtime_get_method = Module['_mono_aot_System_Runtime_get_method'] = (a0) => (_mono_aot_System_Runtime_get_method = Module['_mono_aot_System_Runtime_get_method'] = wasmExports['mono_aot_System_Runtime_get_method'])(a0); 5312var _mono_aot_System_Security_Claims_get_method = Module['_mono_aot_System_Security_Claims_get_method'] = (a0) => (_mono_aot_System_Security_Claims_get_method = Module['_mono_aot_System_Security_Claims_get_method'] = wasmExports['mono_aot_System_Security_Claims_get_method'])(a0); 5313var _mono_aot_System_Security_Cryptography_get_method = Module['_mono_aot_System_Security_Cryptography_get_method'] = (a0) => (_mono_aot_System_Security_Cryptography_get_method = Module['_mono_aot_System_Security_Cryptography_get_method'] = wasmExports['mono_aot_System_Security_Cryptography_get_method'])(a0); 5314var _mono_aot_System_Text_Encodings_Web_get_method = Module['_mono_aot_System_Text_Encodings_Web_get_method'] = (a0) => (_mono_aot_System_Text_Encodings_Web_get_method = Module['_mono_aot_System_Text_Encodings_Web_get_method'] = wasmExports['mono_aot_System_Text_Encodings_Web_get_method'])(a0); 5315var _mono_aot_System_Text_Json_get_method = Module['_mono_aot_System_Text_Json_get_method'] = (a0) => (_mono_aot_System_Text_Json_get_method = Module['_mono_aot_System_Text_Json_get_method'] = wasmExports['mono_aot_System_Text_Json_get_method'])(a0); 5316var _mono_aot_System_Text_RegularExpressions_get_method = Module['_mono_aot_System_Text_RegularExpressions_get_method'] = (a0) => (_mono_aot_System_Text_RegularExpressions_get_method = Module['_mono_aot_System_Text_RegularExpressions_get_method'] = wasmExports['mono_aot_System_Text_RegularExpressions_get_method'])(a0); 5317var _mono_aot_System_Threading_Channels_get_method = Module['_mono_aot_System_Threading_Channels_get_method'] = (a0) => (_mono_aot_System_Threading_Channels_get_method = Module['_mono_aot_System_Threading_Channels_get_method'] = wasmExports['mono_aot_System_Threading_Channels_get_method'])(a0); 5318var _mono_aot_System_Threading_Tasks_get_method = Module['_mono_aot_System_Threading_Tasks_get_method'] = (a0) => (_mono_aot_System_Threading_Tasks_get_method = Module['_mono_aot_System_Threading_Tasks_get_method'] = wasmExports['mono_aot_System_Threading_Tasks_get_method'])(a0); 5319var _mono_aot_System_Threading_get_method = Module['_mono_aot_System_Threading_get_method'] = (a0) => (_mono_aot_System_Threading_get_method = Module['_mono_aot_System_Threading_get_method'] = wasmExports['mono_aot_System_Threading_get_method'])(a0); 5320var _mono_aot_System_Xml_ReaderWriter_get_method = Module['_mono_aot_System_Xml_ReaderWriter_get_method'] = (a0) => (_mono_aot_System_Xml_ReaderWriter_get_method = Module['_mono_aot_System_Xml_ReaderWriter_get_method'] = wasmExports['mono_aot_System_Xml_ReaderWriter_get_method'])(a0); 5321var _mono_aot_System_Xml_XmlSerializer_get_method = Module['_mono_aot_System_Xml_XmlSerializer_get_method'] = (a0) => (_mono_aot_System_Xml_XmlSerializer_get_method = Module['_mono_aot_System_Xml_XmlSerializer_get_method'] = wasmExports['mono_aot_System_Xml_XmlSerializer_get_method'])(a0); 5322var _mono_aot_System_get_method = Module['_mono_aot_System_get_method'] = (a0) => (_mono_aot_System_get_method = Module['_mono_aot_System_get_method'] = wasmExports['mono_aot_System_get_method'])(a0); 5323var _mono_aot_netstandard_get_method = Module['_mono_aot_netstandard_get_method'] = (a0) => (_mono_aot_netstandard_get_method = Module['_mono_aot_netstandard_get_method'] = wasmExports['mono_aot_netstandard_get_method'])(a0); 5324var _fmodf = Module['_fmodf'] = (a0, a1) => (_fmodf = Module['_fmodf'] = wasmExports['fmodf'])(a0, a1);
vendor: 4,295 bytes, lines 5325-5352
5325var _mono_aot_corlib_get_method = Module['_mono_aot_corlib_get_method'] = (a0) => (_mono_aot_corlib_get_method = Module['_mono_aot_corlib_get_method'] = wasmExports['mono_aot_corlib_get_method'])(a0); 5326var _mono_aot_aot_instances_get_method = Module['_mono_aot_aot_instances_get_method'] = (a0) => (_mono_aot_aot_instances_get_method = Module['_mono_aot_aot_instances_get_method'] = wasmExports['mono_aot_aot_instances_get_method'])(a0); 5327var _mono_wasm_send_dbg_command_with_parms = Module['_mono_wasm_send_dbg_command_with_parms'] = (a0, a1, a2, a3, a4, a5, a6) => (_mono_wasm_send_dbg_command_with_parms = Module['_mono_wasm_send_dbg_command_with_parms'] = wasmExports['mono_wasm_send_dbg_command_with_parms'])(a0, a1, a2, a3, a4, a5, a6); 5328var _mono_wasm_send_dbg_command = Module['_mono_wasm_send_dbg_command'] = (a0, a1, a2, a3, a4) => (_mono_wasm_send_dbg_command = Module['_mono_wasm_send_dbg_command'] = wasmExports['mono_wasm_send_dbg_command'])(a0, a1, a2, a3, a4); 5329var _mono_jiterp_register_jit_call_thunk = Module['_mono_jiterp_register_jit_call_thunk'] = (a0, a1) => (_mono_jiterp_register_jit_call_thunk = Module['_mono_jiterp_register_jit_call_thunk'] = wasmExports['mono_jiterp_register_jit_call_thunk'])(a0, a1); 5330var _mono_jiterp_stackval_to_data = Module['_mono_jiterp_stackval_to_data'] = (a0, a1, a2) => (_mono_jiterp_stackval_to_data = Module['_mono_jiterp_stackval_to_data'] = wasmExports['mono_jiterp_stackval_to_data'])(a0, a1, a2); 5331var _mono_jiterp_stackval_from_data = Module['_mono_jiterp_stackval_from_data'] = (a0, a1, a2) => (_mono_jiterp_stackval_from_data = Module['_mono_jiterp_stackval_from_data'] = wasmExports['mono_jiterp_stackval_from_data'])(a0, a1, a2); 5332var _mono_jiterp_get_arg_offset = Module['_mono_jiterp_get_arg_offset'] = (a0, a1, a2) => (_mono_jiterp_get_arg_offset = Module['_mono_jiterp_get_arg_offset'] = wasmExports['mono_jiterp_get_arg_offset'])(a0, a1, a2); 5333var _mono_jiterp_overflow_check_i4 = Module['_mono_jiterp_overflow_check_i4'] = (a0, a1, a2) => (_mono_jiterp_overflow_check_i4 = Module['_mono_jiterp_overflow_check_i4'] = wasmExports['mono_jiterp_overflow_check_i4'])(a0, a1, a2); 5334var _mono_jiterp_overflow_check_u4 = Module['_mono_jiterp_overflow_check_u4'] = (a0, a1, a2) => (_mono_jiterp_overflow_check_u4 = Module['_mono_jiterp_overflow_check_u4'] = wasmExports['mono_jiterp_overflow_check_u4'])(a0, a1, a2); 5335var _mono_jiterp_ld_delegate_method_ptr = Module['_mono_jiterp_ld_delegate_method_ptr'] = (a0, a1) => (_mono_jiterp_ld_delegate_method_ptr = Module['_mono_jiterp_ld_delegate_method_ptr'] = wasmExports['mono_jiterp_ld_delegate_method_ptr'])(a0, a1); 5336var _mono_jiterp_interp_entry = Module['_mono_jiterp_interp_entry'] = (a0, a1) => (_mono_jiterp_interp_entry = Module['_mono_jiterp_interp_entry'] = wasmExports['mono_jiterp_interp_entry'])(a0, a1); 5337var _fmod = Module['_fmod'] = (a0, a1) => (_fmod = Module['_fmod'] = wasmExports['fmod'])(a0, a1); 5338var _asin = Module['_asin'] = (a0) => (_asin = Module['_asin'] = wasmExports['asin'])(a0); 5339var _asinh = Module['_asinh'] = (a0) => (_asinh = Module['_asinh'] = wasmExports['asinh'])(a0); 5340var _acos = Module['_acos'] = (a0) => (_acos = Module['_acos'] = wasmExports['acos'])(a0); 5341var _acosh = Module['_acosh'] = (a0) => (_acosh = Module['_acosh'] = wasmExports['acosh'])(a0); 5342var _atan = Module['_atan'] = (a0) => (_atan = Module['_atan'] = wasmExports['atan'])(a0); 5343var _atanh = Module['_atanh'] = (a0) => (_atanh = Module['_atanh'] = wasmExports['atanh'])(a0); 5344var _cbrt = Module['_cbrt'] = (a0) => (_cbrt = Module['_cbrt'] = wasmExports['cbrt'])(a0); 5345var _cosh = Module['_cosh'] = (a0) => (_cosh = Module['_cosh'] = wasmExports['cosh'])(a0); 5346var _exp = Module['_exp'] = (a0) => (_exp = Module['_exp'] = wasmExports['exp'])(a0); 5347var _log2 = Module['_log2'] = (a0) => (_log2 = Module['_log2'] = wasmExports['log2'])(a0); 5348var _log10 = Module['_log10'] = (a0) => (_log10 = Module['_log10'] = wasmExports['log10'])(a0); 5349var _sinh = Module['_sinh'] = (a0) => (_sinh = Module['_sinh'] = wasmExports['sinh'])(a0); 5350var _tan = Module['_tan'] = (a0) => (_tan = Module['_tan'] = wasmExports['tan'])(a0); 5351var _tanh = Module['_tanh'] = (a0) => (_tanh = Module['_tanh'] = wasmExports['tanh'])(a0); 5352var _atan2 = Module['_atan2'] = (a0, a1) => (_atan2 = Module['_atan2'] = wasmExports['atan2
vendor: 23,950 bytes, lines 5352-5572
5352'])(a0, a1); 5353var _fma = Module['_fma'] = (a0, a1, a2) => (_fma = Module['_fma'] = wasmExports['fma'])(a0, a1, a2); 5354var _asinf = Module['_asinf'] = (a0) => (_asinf = Module['_asinf'] = wasmExports['asinf'])(a0); 5355var _asinhf = Module['_asinhf'] = (a0) => (_asinhf = Module['_asinhf'] = wasmExports['asinhf'])(a0); 5356var _acosf = Module['_acosf'] = (a0) => (_acosf = Module['_acosf'] = wasmExports['acosf'])(a0); 5357var _acoshf = Module['_acoshf'] = (a0) => (_acoshf = Module['_acoshf'] = wasmExports['acoshf'])(a0); 5358var _atanf = Module['_atanf'] = (a0) => (_atanf = Module['_atanf'] = wasmExports['atanf'])(a0); 5359var _atanhf = Module['_atanhf'] = (a0) => (_atanhf = Module['_atanhf'] = wasmExports['atanhf'])(a0); 5360var _cosf = Module['_cosf'] = (a0) => (_cosf = Module['_cosf'] = wasmExports['cosf'])(a0); 5361var _cbrtf = Module['_cbrtf'] = (a0) => (_cbrtf = Module['_cbrtf'] = wasmExports['cbrtf'])(a0); 5362var _coshf = Module['_coshf'] = (a0) => (_coshf = Module['_coshf'] = wasmExports['coshf'])(a0); 5363var _expf = Module['_expf'] = (a0) => (_expf = Module['_expf'] = wasmExports['expf'])(a0); 5364var _logf = Module['_logf'] = (a0) => (_logf = Module['_logf'] = wasmExports['logf'])(a0); 5365var _log2f = Module['_log2f'] = (a0) => (_log2f = Module['_log2f'] = wasmExports['log2f'])(a0); 5366var _log10f = Module['_log10f'] = (a0) => (_log10f = Module['_log10f'] = wasmExports['log10f'])(a0); 5367var _sinf = Module['_sinf'] = (a0) => (_sinf = Module['_sinf'] = wasmExports['sinf'])(a0); 5368var _sinhf = Module['_sinhf'] = (a0) => (_sinhf = Module['_sinhf'] = wasmExports['sinhf'])(a0); 5369var _tanf = Module['_tanf'] = (a0) => (_tanf = Module['_tanf'] = wasmExports['tanf'])(a0); 5370var _tanhf = Module['_tanhf'] = (a0) => (_tanhf = Module['_tanhf'] = wasmExports['tanhf'])(a0); 5371var _atan2f = Module['_atan2f'] = (a0, a1) => (_atan2f = Module['_atan2f'] = wasmExports['atan2f'])(a0, a1); 5372var _powf = Module['_powf'] = (a0, a1) => (_powf = Module['_powf'] = wasmExports['powf'])(a0, a1); 5373var _fmaf = Module['_fmaf'] = (a0, a1, a2) => (_fmaf = Module['_fmaf'] = wasmExports['fmaf'])(a0, a1, a2); 5374var _mono_jiterp_get_polling_required_address = Module['_mono_jiterp_get_polling_required_address'] = () => (_mono_jiterp_get_polling_required_address = Module['_mono_jiterp_get_polling_required_address'] = wasmExports['mono_jiterp_get_polling_required_address'])(); 5375var _mono_jiterp_prof_enter = Module['_mono_jiterp_prof_enter'] = (a0, a1) => (_mono_jiterp_prof_enter = Module['_mono_jiterp_prof_enter'] = wasmExports['mono_jiterp_prof_enter'])(a0, a1); 5376var _mono_jiterp_prof_samplepoint = Module['_mono_jiterp_prof_samplepoint'] = (a0, a1) => (_mono_jiterp_prof_samplepoint = Module['_mono_jiterp_prof_samplepoint'] = wasmExports['mono_jiterp_prof_samplepoint'])(a0, a1); 5377var _mono_jiterp_prof_leave = Module['_mono_jiterp_prof_leave'] = (a0, a1) => (_mono_jiterp_prof_leave = Module['_mono_jiterp_prof_leave'] = wasmExports['mono_jiterp_prof_leave'])(a0, a1); 5378var _mono_jiterp_do_safepoint = Module['_mono_jiterp_do_safepoint'] = (a0, a1) => (_mono_jiterp_do_safepoint = Module['_mono_jiterp_do_safepoint'] = wasmExports['mono_jiterp_do_safepoint'])(a0, a1); 5379var _mono_jiterp_imethod_to_ftnptr = Module['_mono_jiterp_imethod_to_ftnptr'] = (a0) => (_mono_jiterp_imethod_to_ftnptr = Module['_mono_jiterp_imethod_to_ftnptr'] = wasmExports['mono_jiterp_imethod_to_ftnptr'])(a0); 5380var _mono_jiterp_enum_hasflag = Module['_mono_jiterp_enum_hasflag'] = (a0, a1, a2, a3) => (_mono_jiterp_enum_hasflag = Module['_mono_jiterp_enum_hasflag'] = wasmExports['mono_jiterp_enum_hasflag'])(a0, a1, a2, a3); 5381var _mono_jiterp_get_simd_intrinsic = Module['_mono_jiterp_get_simd_intrinsic'] = (a0, a1) => (_mono_jiterp_get_simd_intrinsic = Module['_mono_jiterp_get_simd_intrinsic'] = wasmExports['mono_jiterp_get_simd_intrinsic'])(a0, a1); 5382var _mono_jiterp_get_simd_opcode = Module['_mono_jiterp_get_simd_opcode'] = (a0, a1) => (_mono_jiterp_get_simd_opcode = Module['_mono_jiterp_get_simd_opcode'] = wasmExports['mono_jiterp_get_simd_opcode'])(a0, a1); 5383var _mono_jiterp_get_opcode_info = Module['_mono_jiterp_get_opcode_info'] = (a0, a1) => (_mono_jiterp_get_opcode_info = Module['_mono_jiterp_get_opcode_info'] = wasmExports['mono_jiterp_get_opcode_info'])(a0, a1); 5384var _mono_jiterp_placeholder_trace = Module['_mono_jiterp_placeholder_trace'] = (a0, a1, a2, a3) => (_mono_jiterp_placeholder_trace = Module['_mono_jiterp_placeholder_trace'] = wasmExports['mono_jiterp_placeholder_trace'])(a0, a1, a2, a3); 5385var _mono_jiterp_placeholder_jit_call = Module['_mono_jiterp_placeholder_jit_call'] = (a0, a1, a2, a3) => (_mono_jiterp_placeholder_jit_call = Module['_mono_jiterp_placeholder_jit_call'] = wasmExports['mono_jiterp_placeholder_jit_call'])(a0, a1, a2, a3); 5386var _mono_jiterp_get_interp_entry_func = Module['_mono_jiterp_get_interp_entry_func'] = (a0) => (_mono_jiterp_get_interp_entry_func = Module['_mono_jiterp_get_interp_entry_func'] = wasmExports['mono_jiterp_get_interp_entry_func'])(a0); 5387var _mono_jiterp_is_enabled = Module['_mono_jiterp_is_enabled'] = () => (_mono_jiterp_is_enabled = Module['_mono_jiterp_is_enabled'] = wasmExports['mono_jiterp_is_enabled'])(); 5388var _mono_jiterp_encode_leb64_ref = Module['_mono_jiterp_encode_leb64_ref'] = (a0, a1, a2) => (_mono_jiterp_encode_leb64_ref = Module['_mono_jiterp_encode_leb64_ref'] = wasmExports['mono_jiterp_encode_leb64_ref'])(a0, a1, a2); 5389var _mono_jiterp_encode_leb52 = Module['_mono_jiterp_encode_leb52'] = (a0, a1, a2) => (_mono_jiterp_encode_leb52 = Module['_mono_jiterp_encode_leb52'] = wasmExports['mono_jiterp_encode_leb52'])(a0, a1, a2); 5390var _mono_jiterp_encode_leb_signed_boundary = Module['_mono_jiterp_encode_leb_signed_boundary'] = (a0, a1, a2) => (_mono_jiterp_encode_leb_signed_boundary = Module['_mono_jiterp_encode_leb_signed_boundary'] = wasmExports['mono_jiterp_encode_leb_signed_boundary'])(a0, a1, a2); 5391var _mono_jiterp_increase_entry_count = Module['_mono_jiterp_increase_entry_count'] = (a0) => (_mono_jiterp_increase_entry_count = Module['_mono_jiterp_increase_entry_count'] = wasmExports['mono_jiterp_increase_entry_count'])(a0); 5392var _mono_jiterp_object_unbox = Module['_mono_jiterp_object_unbox'] = (a0) => (_mono_jiterp_object_unbox = Module['_mono_jiterp_object_unbox'] = wasmExports['mono_jiterp_object_unbox'])(a0); 5393var _mono_jiterp_type_is_byref = Module['_mono_jiterp_type_is_byref'] = (a0) => (_mono_jiterp_type_is_byref = Module['_mono_jiterp_type_is_byref'] = wasmExports['mono_jiterp_type_is_byref'])(a0); 5394var _mono_jiterp_value_copy = Module['_mono_jiterp_value_copy'] = (a0, a1, a2) => (_mono_jiterp_value_copy = Module['_mono_jiterp_value_copy'] = wasmExports['mono_jiterp_value_copy'])(a0, a1, a2); 5395var _mono_jiterp_try_newobj_inlined = Module['_mono_jiterp_try_newobj_inlined'] = (a0, a1) => (_mono_jiterp_try_newobj_inlined = Module['_mono_jiterp_try_newobj_inlined'] = wasmExports['mono_jiterp_try_newobj_inlined'])(a0, a1); 5396var _mono_jiterp_try_newstr = Module['_mono_jiterp_try_newstr'] = (a0, a1) => (_mono_jiterp_try_newstr = Module['_mono_jiterp_try_newstr'] = wasmExports['mono_jiterp_try_newstr'])(a0, a1); 5397var _mono_jiterp_try_newarr = Module['_mono_jiterp_try_newarr'] = (a0, a1, a2) => (_mono_jiterp_try_newarr = Module['_mono_jiterp_try_newarr'] = wasmExports['mono_jiterp_try_newarr'])(a0, a1, a2); 5398var _mono_jiterp_gettype_ref = Module['_mono_jiterp_gettype_ref'] = (a0, a1) => (_mono_jiterp_gettype_ref = Module['_mono_jiterp_gettype_ref'] = wasmExports['mono_jiterp_gettype_ref'])(a0, a1); 5399var _mono_jiterp_has_parent_fast = Module['_mono_jiterp_has_parent_fast'] = (a0, a1) => (_mono_jiterp_has_parent_fast = Module['_mono_jiterp_has_parent_fast'] = wasmExports['mono_jiterp_has_parent_fast'])(a0, a1); 5400var _mono_jiterp_implements_interface = Module['_mono_jiterp_implements_interface'] = (a0, a1) => (_mono_jiterp_implements_interface = Module['_mono_jiterp_implements_interface'] = wasmExports['mono_jiterp_implements_interface'])(a0, a1); 5401var _mono_jiterp_is_special_interface = Module['_mono_jiterp_is_special_interface'] = (a0) => (_mono_jiterp_is_special_interface = Module['_mono_jiterp_is_special_interface'] = wasmExports['mono_jiterp_is_special_interface'])(a0); 5402var _mono_jiterp_implements_special_interface = Module['_mono_jiterp_implements_special_interface'] = (a0, a1, a2) => (_mono_jiterp_implements_special_interface = Module['_mono_jiterp_implements_special_interface'] = wasmExports['mono_jiterp_implements_special_interface'])(a0, a1, a2); 5403var _mono_jiterp_cast_v2 = Module['_mono_jiterp_cast_v2'] = (a0, a1, a2, a3) => (_mono_jiterp_cast_v2 = Module['_mono_jiterp_cast_v2'] = wasmExports['mono_jiterp_cast_v2'])(a0, a1, a2, a3); 5404var _mono_jiterp_localloc = Module['_mono_jiterp_localloc'] = (a0, a1, a2) => (_mono_jiterp_localloc = Module['_mono_jiterp_localloc'] = wasmExports['mono_jiterp_localloc'])(a0, a1, a2); 5405var _mono_jiterp_ldtsflda = Module['_mono_jiterp_ldtsflda'] = (a0, a1) => (_mono_jiterp_ldtsflda = Module['_mono_jiterp_ldtsflda'] = wasmExports['mono_jiterp_ldtsflda'])(a0, a1); 5406var _mono_jiterp_box_ref = Module['_mono_jiterp_box_ref'] = (a0, a1, a2, a3) => (_mono_jiterp_box_ref = Module['_mono_jiterp_box_ref'] = wasmExports['mono_jiterp_box_ref'])(a0, a1, a2, a3); 5407var _mono_jiterp_conv = Module['_mono_jiterp_conv'] = (a0, a1, a2) => (_mono_jiterp_conv = Module['_mono_jiterp_conv'] = wasmExports['mono_jiterp_conv'])(a0, a1, a2); 5408var _mono_jiterp_relop_fp = Module['_mono_jiterp_relop_fp'] = (a0, a1, a2) => (_mono_jiterp_relop_fp = Module['_mono_jiterp_relop_fp'] = wasmExports['mono_jiterp_relop_fp'])(a0, a1, a2); 5409var _mono_jiterp_get_size_of_stackval = Module['_mono_jiterp_get_size_of_stackval'] = () => (_mono_jiterp_get_size_of_stackval = Module['_mono_jiterp_get_size_of_stackval'] = wasmExports['mono_jiterp_get_size_of_stackval'])(); 5410var _mono_jiterp_type_get_raw_value_size = Module['_mono_jiterp_type_get_raw_value_size'] = (a0) => (_mono_jiterp_type_get_raw_value_size = Module['_mono_jiterp_type_get_raw_value_size'] = wasmExports['mono_jiterp_type_get_raw_value_size'])(a0); 5411var _mono_jiterp_trace_bailout = Module['_mono_jiterp_trace_bailout'] = (a0) => (_mono_jiterp_trace_bailout = Module['_mono_jiterp_trace_bailout'] = wasmExports['mono_jiterp_trace_bailout'])(a0); 5412var _mono_jiterp_get_trace_bailout_count = Module['_mono_jiterp_get_trace_bailout_count'] = (a0) => (_mono_jiterp_get_trace_bailout_count = Module['_mono_jiterp_get_trace_bailout_count'] = wasmExports['mono_jiterp_get_trace_bailout_count'])(a0); 5413var _mono_jiterp_adjust_abort_count = Module['_mono_jiterp_adjust_abort_count'] = (a0, a1) => (_mono_jiterp_adjust_abort_count = Module['_mono_jiterp_adjust_abort_count'] = wasmExports['mono_jiterp_adjust_abort_count'])(a0, a1); 5414var _mono_jiterp_interp_entry_prologue = Module['_mono_jiterp_interp_entry_prologue'] = (a0, a1) => (_mono_jiterp_interp_entry_prologue = Module['_mono_jiterp_interp_entry_prologue'] = wasmExports['mono_jiterp_interp_entry_prologue'])(a0, a1); 5415var _mono_jiterp_get_opcode_value_table_entry = Module['_mono_jiterp_get_opcode_value_table_entry'] = (a0) => (_mono_jiterp_get_opcode_value_table_entry = Module['_mono_jiterp_get_opcode_value_table_entry'] = wasmExports['mono_jiterp_get_opcode_value_table_entry'])(a0); 5416var _mono_jiterp_get_trace_hit_count = Module['_mono_jiterp_get_trace_hit_count'] = (a0) => (_mono_jiterp_get_trace_hit_count = Module['_mono_jiterp_get_trace_hit_count'] = wasmExports['mono_jiterp_get_trace_hit_count'])(a0); 5417var _mono_jiterp_parse_option = Module['_mono_jiterp_parse_option'] = (a0) => (_mono_jiterp_parse_option = Module['_mono_jiterp_parse_option'] = wasmExports['mono_jiterp_parse_option'])(a0); 5418var _mono_jiterp_get_options_version = Module['_mono_jiterp_get_options_version'] = () => (_mono_jiterp_get_options_version = Module['_mono_jiterp_get_options_version'] = wasmExports['mono_jiterp_get_options_version'])(); 5419var _mono_jiterp_get_options_as_json = Module['_mono_jiterp_get_options_as_json'] = () => (_mono_jiterp_get_options_as_json = Module['_mono_jiterp_get_options_as_json'] = wasmExports['mono_jiterp_get_options_as_json'])(); 5420var _mono_jiterp_get_option_as_int = Module['_mono_jiterp_get_option_as_int'] = (a0) => (_mono_jiterp_get_option_as_int = Module['_mono_jiterp_get_option_as_int'] = wasmExports['mono_jiterp_get_option_as_int'])(a0); 5421var _mono_jiterp_object_has_component_size = Module['_mono_jiterp_object_has_component_size'] = (a0) => (_mono_jiterp_object_has_component_size = Module['_mono_jiterp_object_has_component_size'] = wasmExports['mono_jiterp_object_has_component_size'])(a0); 5422var _mono_jiterp_get_hashcode = Module['_mono_jiterp_get_hashcode'] = (a0) => (_mono_jiterp_get_hashcode = Module['_mono_jiterp_get_hashcode'] = wasmExports['mono_jiterp_get_hashcode'])(a0); 5423var _mono_jiterp_try_get_hashcode = Module['_mono_jiterp_try_get_hashcode'] = (a0) => (_mono_jiterp_try_get_hashcode = Module['_mono_jiterp_try_get_hashcode'] = wasmExports['mono_jiterp_try_get_hashcode'])(a0); 5424var _mono_jiterp_get_signature_has_this = Module['_mono_jiterp_get_signature_has_this'] = (a0) => (_mono_jiterp_get_signature_has_this = Module['_mono_jiterp_get_signature_has_this'] = wasmExports['mono_jiterp_get_signature_has_this'])(a0); 5425var _mono_jiterp_get_signature_return_type = Module['_mono_jiterp_get_signature_return_type'] = (a0) => (_mono_jiterp_get_signature_return_type = Module['_mono_jiterp_get_signature_return_type'] = wasmExports['mono_jiterp_get_signature_return_type'])(a0); 5426var _mono_jiterp_get_signature_param_count = Module['_mono_jiterp_get_signature_param_count'] = (a0) => (_mono_jiterp_get_signature_param_count = Module['_mono_jiterp_get_signature_param_count'] = wasmExports['mono_jiterp_get_signature_param_count'])(a0); 5427var _mono_jiterp_get_signature_params = Module['_mono_jiterp_get_signature_params'] = (a0) => (_mono_jiterp_get_signature_params = Module['_mono_jiterp_get_signature_params'] = wasmExports['mono_jiterp_get_signature_params'])(a0); 5428var _mono_jiterp_type_to_ldind = Module['_mono_jiterp_type_to_ldind'] = (a0) => (_mono_jiterp_type_to_ldind = Module['_mono_jiterp_type_to_ldind'] = wasmExports['mono_jiterp_type_to_ldind'])(a0); 5429var _mono_jiterp_type_to_stind = Module['_mono_jiterp_type_to_stind'] = (a0) => (_mono_jiterp_type_to_stind = Module['_mono_jiterp_type_to_stind'] = wasmExports['mono_jiterp_type_to_stind'])(a0); 5430var _mono_jiterp_get_array_rank = Module['_mono_jiterp_get_array_rank'] = (a0, a1) => (_mono_jiterp_get_array_rank = Module['_mono_jiterp_get_array_rank'] = wasmExports['mono_jiterp_get_array_rank'])(a0, a1); 5431var _mono_jiterp_get_array_element_size = Module['_mono_jiterp_get_array_element_size'] = (a0, a1) => (_mono_jiterp_get_array_element_size = Module['_mono_jiterp_get_array_element_size'] = wasmExports['mono_jiterp_get_array_element_size'])(a0, a1); 5432var _mono_jiterp_set_object_field = Module['_mono_jiterp_set_object_field'] = (a0, a1, a2, a3) => (_mono_jiterp_set_object_field = Module['_mono_jiterp_set_object_field'] = wasmExports['mono_jiterp_set_object_field'])(a0, a1, a2, a3); 5433var _mono_jiterp_debug_count = Module['_mono_jiterp_debug_count'] = () => (_mono_jiterp_debug_count = Module['_mono_jiterp_debug_count'] = wasmExports['mono_jiterp_debug_count'])(); 5434var _mono_jiterp_stelem_ref = Module['_mono_jiterp_stelem_ref'] = (a0, a1, a2) => (_mono_jiterp_stelem_ref = Module['_mono_jiterp_stelem_ref'] = wasmExports['mono_jiterp_stelem_ref'])(a0, a1, a2); 5435var _mono_jiterp_get_member_offset = Module['_mono_jiterp_get_member_offset'] = (a0) => (_mono_jiterp_get_member_offset = Module['_mono_jiterp_get_member_offset'] = wasmExports['mono_jiterp_get_member_offset'])(a0); 5436var _mono_jiterp_get_counter = Module['_mono_jiterp_get_counter'] = (a0) => (_mono_jiterp_get_counter = Module['_mono_jiterp_get_counter'] = wasmExports['mono_jiterp_get_counter'])(a0); 5437var _mono_jiterp_modify_counter = Module['_mono_jiterp_modify_counter'] = (a0, a1) => (_mono_jiterp_modify_counter = Module['_mono_jiterp_modify_counter'] = wasmExports['mono_jiterp_modify_counter'])(a0, a1); 5438var _mono_jiterp_write_number_unaligned = Module['_mono_jiterp_write_number_unaligned'] = (a0, a1, a2) => (_mono_jiterp_write_number_unaligned = Module['_mono_jiterp_write_number_unaligned'] = wasmExports['mono_jiterp_write_number_unaligned'])(a0, a1, a2); 5439var _mono_jiterp_get_rejected_trace_count = Module['_mono_jiterp_get_rejected_trace_count'] = () => (_mono_jiterp_get_rejected_trace_count = Module['_mono_jiterp_get_rejected_trace_count'] = wasmExports['mono_jiterp_get_rejected_trace_count'])(); 5440var _mono_jiterp_boost_back_branch_target = Module['_mono_jiterp_boost_back_branch_target'] = (a0) => (_mono_jiterp_boost_back_branch_target = Module['_mono_jiterp_boost_back_branch_target'] = wasmExports['mono_jiterp_boost_back_branch_target'])(a0); 5441var _mono_jiterp_is_imethod_var_address_taken = Module['_mono_jiterp_is_imethod_var_address_taken'] = (a0, a1) => (_mono_jiterp_is_imethod_var_address_taken = Module['_mono_jiterp_is_imethod_var_address_taken'] = wasmExports['mono_jiterp_is_imethod_var_address_taken'])(a0, a1); 5442var _mono_jiterp_initialize_table = Module['_mono_jiterp_initialize_table'] = (a0, a1, a2) => (_mono_jiterp_initialize_table = Module['_mono_jiterp_initialize_table'] = wasmExports['mono_jiterp_initialize_table'])(a0, a1, a2); 5443var _mono_jiterp_allocate_table_entry = Module['_mono_jiterp_allocate_table_entry'] = (a0) => (_mono_jiterp_allocate_table_entry = Module['_mono_jiterp_allocate_table_entry'] = wasmExports['mono_jiterp_allocate_table_entry'])(a0); 5444var _mono_jiterp_tlqueue_next = Module['_mono_jiterp_tlqueue_next'] = (a0) => (_mono_jiterp_tlqueue_next = Module['_mono_jiterp_tlqueue_next'] = wasmExports['mono_jiterp_tlqueue_next'])(a0); 5445var _mono_jiterp_tlqueue_add = Module['_mono_jiterp_tlqueue_add'] = (a0, a1) => (_mono_jiterp_tlqueue_add = Module['_mono_jiterp_tlqueue_add'] = wasmExports['mono_jiterp_tlqueue_add'])(a0, a1); 5446var _mono_jiterp_tlqueue_clear = Module['_mono_jiterp_tlqueue_clear'] = (a0) => (_mono_jiterp_tlqueue_clear = Module['_mono_jiterp_tlqueue_clear'] = wasmExports['mono_jiterp_tlqueue_clear'])(a0); 5447var _mono_interp_pgo_load_table = Module['_mono_interp_pgo_load_table'] = (a0, a1) => (_mono_interp_pgo_load_table = Module['_mono_interp_pgo_load_table'] = wasmExports['mono_interp_pgo_load_table'])(a0, a1); 5448var _mono_interp_pgo_save_table = Module['_mono_interp_pgo_save_table'] = (a0, a1) => (_mono_interp_pgo_save_table = Module['_mono_interp_pgo_save_table'] = wasmExports['mono_interp_pgo_save_table'])(a0, a1); 5449var _mono_llvm_cpp_catch_exception = Module['_mono_llvm_cpp_catch_exception'] = (a0, a1, a2) => (_mono_llvm_cpp_catch_exception = Module['_mono_llvm_cpp_catch_exception'] = wasmExports['mono_llvm_cpp_catch_exception'])(a0, a1, a2); 5450var _mono_jiterp_begin_catch = Module['_mono_jiterp_begin_catch'] = (a0) => (_mono_jiterp_begin_catch = Module['_mono_jiterp_begin_catch'] = wasmExports['mono_jiterp_begin_catch'])(a0); 5451var _mono_jiterp_end_catch = Module['_mono_jiterp_end_catch'] = () => (_mono_jiterp_end_catch = Module['_mono_jiterp_end_catch'] = wasmExports['mono_jiterp_end_catch'])(); 5452var _sbrk = Module['_sbrk'] = (a0) => (_sbrk = Module['_sbrk'] = wasmExports['sbrk'])(a0); 5453var _posix_memalign = Module['_posix_memalign'] = (a0, a1, a2) => (_posix_memalign = Module['_posix_memalign'] = wasmExports['posix_memalign'])(a0, a1, a2); 5454var _mono_background_exec = Module['_mono_background_exec'] = () => (_mono_background_exec = Module['_mono_background_exec'] = wasmExports['mono_background_exec'])(); 5455var _mono_wasm_ds_exec = Module['_mono_wasm_ds_exec'] = () => (_mono_wasm_ds_exec = Module['_mono_wasm_ds_exec'] = wasmExports['mono_wasm_ds_exec'])(); 5456var _mono_wasm_gc_lock = Module['_mono_wasm_gc_lock'] = () => (_mono_wasm_gc_lock = Module['_mono_wasm_gc_lock'] = wasmExports['mono_wasm_gc_lock'])(); 5457var _mono_wasm_gc_unlock = Module['_mono_wasm_gc_unlock'] = () => (_mono_wasm_gc_unlock = Module['_mono_wasm_gc_unlock'] = wasmExports['mono_wasm_gc_unlock'])(); 5458var _mono_print_method_from_ip = Module['_mono_print_method_from_ip'] = (a0) => (_mono_print_method_from_ip = Module['_mono_print_method_from_ip'] = wasmExports['mono_print_method_from_ip'])(a0); 5459var _mono_wasm_execute_timer = Module['_mono_wasm_execute_timer'] = () => (_mono_wasm_execute_timer = Module['_mono_wasm_execute_timer'] = wasmExports['mono_wasm_execute_timer'])(); 5460var ___funcs_on_exit = () => (___funcs_on_exit = wasmExports['__funcs_on_exit'])(); 5461var _htons = Module['_htons'] = (a0) => (_htons = Module['_htons'] = wasmExports['htons'])(a0); 5462var _emscripten_builtin_memalign = (a0, a1) => (_emscripten_builtin_memalign = wasmExports['emscripten_builtin_memalign'])(a0, a1); 5463var _ntohs = Module['_ntohs'] = (a0) => (_ntohs = Module['_ntohs'] = wasmExports['ntohs'])(a0); 5464var _memalign = Module['_memalign'] = (a0, a1) => (_memalign = Module['_memalign'] = wasmExports['memalign'])(a0, a1); 5465var ___trap = () => (___trap = wasmExports['__trap'])(); 5466var stackSave = Module['stackSave'] = () => (stackSave = Module['stackSave'] = wasmExports['stackSave'])(); 5467var stackRestore = Module['stackRestore'] = (a0) => (stackRestore = Module['stackRestore'] = wasmExports['stackRestore'])(a0); 5468var stackAlloc = Module['stackAlloc'] = (a0) => (stackAlloc = Module['stackAlloc'] = wasmExports['stackAlloc'])(a0); 5469 5470 5471// include: postamble.js 5472// === Auto-generated postamble setup entry stuff === 5473 5474Module['addRunDependency'] = addRunDependency; 5475Module['removeRunDependency'] = removeRunDependency; 5476Module['FS_createPath'] = FS.createPath; 5477Module['FS_createLazyFile'] = FS.createLazyFile; 5478Module['FS_createDevice'] = FS.createDevice; 5479Module['out'] = out; 5480Module['err'] = err; 5481Module['abort'] = abort; 5482Module['wasmExports'] = wasmExports; 5483Module['runtimeKeepalivePush'] = runtimeKeepalivePush; 5484Module['runtimeKeepalivePop'] = runtimeKeepalivePop; 5485Module['maybeExit'] = maybeExit; 5486Module['ccall'] = ccall; 5487Module['cwrap'] = cwrap; 5488Module['addFunction'] = addFunction; 5489Module['setValue'] = setValue; 5490Module['getValue'] = getValue; 5491Module['UTF8ArrayToString'] = UTF8ArrayToString; 5492Module['UTF8ToString'] = UTF8ToString; 5493Module['stringToUTF8Array'] = stringToUTF8Array; 5494Module['lengthBytesUTF8'] = lengthBytesUTF8; 5495Module['safeSetTimeout'] = safeSetTimeout; 5496Module['FS_createPreloadedFile'] = FS.createPreloadedFile; 5497Module['FS'] = FS; 5498Module['FS_createDataFile'] = FS.createDataFile; 5499Module['FS_unlink'] = FS.unlink; 5500 5501 5502var calledRun; 5503 5504dependenciesFulfilled = function runCaller() { 5505 // If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false) 5506 if (!calledRun) run(); 5507 if (!calledRun) dependenciesFulfilled = runCaller; // try this again later, after new deps are fulfilled 5508}; 5509 5510function run() { 5511 5512 if (runDependencies > 0) { 5513 return; 5514 } 5515 5516 preRun(); 5517 5518 // a preRun added a dependency, run will be called later 5519 if (runDependencies > 0) { 5520 return; 5521 } 5522 5523 function doRun() { 5524 // run may have just been called through dependencies being fulfilled just in this very frame, 5525 // or while the async setStatus time below was happening 5526 if (calledRun) return; 5527 calledRun = true; 5528 Module['calledRun'] = true; 5529 5530 if (ABORT) return; 5531 5532 initRuntime(); 5533 5534 readyPromiseResolve(Module); 5535 if (Module['onRuntimeInitialized']) Module['onRuntimeInitialized'](); 5536 5537 postRun(); 5538 } 5539 5540 if (Module['setStatus']) { 5541 Module['setStatus']('Running...'); 5542 setTimeout(function() { 5543 setTimeout(function() { 5544 Module['setStatus'](''); 5545 }, 1); 5546 doRun(); 5547 }, 1); 5548 } else 5549 { 5550 doRun(); 5551 } 5552} 5553 5554if (Module['preInit']) { 5555 if (typeof Module['preInit'] == 'function') Module['preInit'] = [Module['preInit']]; 5556 while (Module['preInit'].length > 0) { 5557 Module['preInit'].pop()(); 5558 } 5559} 5560 5561run(); 5562 5563// end include: postamble.js 5564 5565 5566 5567 return moduleArg.ready 5568} 5569); 5570})(); 5571export default createDotnetRuntime; 5572var fetch = fetch || undefined; var require = require || undefined; var __dirname = __dirname || ''; var _nativeModuleLoaded = false;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.