v86 0.5.367 → 0.5.372
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/libv86-debug.js +88 -76
- package/build/libv86-debug.mjs +88 -76
- package/build/libv86.js +185 -185
- package/build/libv86.mjs +236 -235
- package/build/v86-debug.wasm +0 -0
- package/build/v86-fallback.wasm +0 -0
- package/build/v86.wasm +0 -0
- package/package.json +1 -1
package/build/libv86-debug.js
CHANGED
|
@@ -4265,66 +4265,75 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4265
4265
|
function $pointerlockchange_handler$$() {
|
|
4266
4266
|
$mouse$$.bus.send("mouse-pointer-lock", !!document.pointerLockElement);
|
|
4267
4267
|
}
|
|
4268
|
-
function $
|
|
4268
|
+
function $contextmenu_handler$$($e$jscomp$27$$) {
|
|
4269
|
+
$may_handle$jscomp$1$$($e$jscomp$27$$) && $e$jscomp$27$$.preventDefault();
|
|
4270
|
+
}
|
|
4271
|
+
function $may_handle$jscomp$1$$($child$jscomp$inline_356_e$jscomp$28$$) {
|
|
4269
4272
|
if (!$mouse$$.enabled || !$mouse$$.emu_enabled) {
|
|
4270
4273
|
return !1;
|
|
4271
4274
|
}
|
|
4272
4275
|
var $parent$jscomp$5$$ = $screen_container$jscomp$1$$ || document.body, $JSCompiler_temp$jscomp$280$$;
|
|
4273
4276
|
if (!($JSCompiler_temp$jscomp$280$$ = document.pointerLockElement)) {
|
|
4274
4277
|
a: {
|
|
4275
|
-
for ($child$jscomp$inline_356_e$jscomp$
|
|
4276
|
-
if ($child$jscomp$inline_356_e$jscomp$
|
|
4278
|
+
for ($child$jscomp$inline_356_e$jscomp$28$$ = $child$jscomp$inline_356_e$jscomp$28$$.target; $child$jscomp$inline_356_e$jscomp$28$$.parentNode;) {
|
|
4279
|
+
if ($child$jscomp$inline_356_e$jscomp$28$$ === $parent$jscomp$5$$) {
|
|
4277
4280
|
$JSCompiler_temp$jscomp$280$$ = !0;
|
|
4278
4281
|
break a;
|
|
4279
4282
|
}
|
|
4280
|
-
$child$jscomp$inline_356_e$jscomp$
|
|
4283
|
+
$child$jscomp$inline_356_e$jscomp$28$$ = $child$jscomp$inline_356_e$jscomp$28$$.parentNode;
|
|
4281
4284
|
}
|
|
4282
4285
|
$JSCompiler_temp$jscomp$280$$ = !1;
|
|
4283
4286
|
}
|
|
4284
4287
|
}
|
|
4285
4288
|
return $JSCompiler_temp$jscomp$280$$;
|
|
4286
4289
|
}
|
|
4287
|
-
function $touch_start_handler$$($e$jscomp$
|
|
4288
|
-
$may_handle$jscomp$1$$($e$jscomp$
|
|
4290
|
+
function $touch_start_handler$$($e$jscomp$29_touch_touches$jscomp$2$$) {
|
|
4291
|
+
$may_handle$jscomp$1$$($e$jscomp$29_touch_touches$jscomp$2$$) && ($e$jscomp$29_touch_touches$jscomp$2$$ = $e$jscomp$29_touch_touches$jscomp$2$$.changedTouches) && $e$jscomp$29_touch_touches$jscomp$2$$.length && ($e$jscomp$29_touch_touches$jscomp$2$$ = $e$jscomp$29_touch_touches$jscomp$2$$[$e$jscomp$29_touch_touches$jscomp$2$$.length - 1], $last_x$$ = $e$jscomp$29_touch_touches$jscomp$2$$.clientX, $last_y$$ = $e$jscomp$29_touch_touches$jscomp$2$$.clientY);
|
|
4289
4292
|
}
|
|
4290
4293
|
function $touch_end_handler$$() {
|
|
4291
4294
|
if ($left_down$$ || $middle_down$$ || $right_down$$) {
|
|
4292
4295
|
$mouse$$.bus.send("mouse-click", [!1, !1, !1]), $left_down$$ = $middle_down$$ = $right_down$$ = !1;
|
|
4293
4296
|
}
|
|
4294
4297
|
}
|
|
4295
|
-
function $mousemove_handler$$($e$jscomp$
|
|
4296
|
-
if ($mouse$$.bus && $may_handle$jscomp$1$$($e$jscomp$
|
|
4297
|
-
var $delta_x$$ = 0, $delta_y$$ = 0, $touch$jscomp$1_touches$jscomp$3$$ = $e$jscomp$
|
|
4298
|
-
$touch$jscomp$1_touches$jscomp$3$$ ? $touch$jscomp$1_touches$jscomp$3$$.length && ($touch$jscomp$1_touches$jscomp$3$$ = $touch$jscomp$1_touches$jscomp$3$$[$touch$jscomp$1_touches$jscomp$3$$.length - 1], $delta_x$$ = $touch$jscomp$1_touches$jscomp$3$$.clientX - $last_x$$, $delta_y$$ = $touch$jscomp$1_touches$jscomp$3$$.clientY - $last_y$$, $last_x$$ = $touch$jscomp$1_touches$jscomp$3$$.clientX, $last_y$$ = $touch$jscomp$1_touches$jscomp$3$$.clientY, $e$jscomp$
|
|
4299
|
-
typeof $e$jscomp$
|
|
4300
|
-
$last_x$$ = $e$jscomp$
|
|
4298
|
+
function $mousemove_handler$$($e$jscomp$31$$) {
|
|
4299
|
+
if ($mouse$$.bus && $may_handle$jscomp$1$$($e$jscomp$31$$) && $mouse$$.is_running) {
|
|
4300
|
+
var $delta_x$$ = 0, $delta_y$$ = 0, $touch$jscomp$1_touches$jscomp$3$$ = $e$jscomp$31$$.changedTouches;
|
|
4301
|
+
$touch$jscomp$1_touches$jscomp$3$$ ? $touch$jscomp$1_touches$jscomp$3$$.length && ($touch$jscomp$1_touches$jscomp$3$$ = $touch$jscomp$1_touches$jscomp$3$$[$touch$jscomp$1_touches$jscomp$3$$.length - 1], $delta_x$$ = $touch$jscomp$1_touches$jscomp$3$$.clientX - $last_x$$, $delta_y$$ = $touch$jscomp$1_touches$jscomp$3$$.clientY - $last_y$$, $last_x$$ = $touch$jscomp$1_touches$jscomp$3$$.clientX, $last_y$$ = $touch$jscomp$1_touches$jscomp$3$$.clientY, $e$jscomp$31$$.preventDefault()) : "number" ===
|
|
4302
|
+
typeof $e$jscomp$31$$.movementX ? ($delta_x$$ = $e$jscomp$31$$.movementX, $delta_y$$ = $e$jscomp$31$$.movementY) : "number" === typeof $e$jscomp$31$$.webkitMovementX ? ($delta_x$$ = $e$jscomp$31$$.webkitMovementX, $delta_y$$ = $e$jscomp$31$$.webkitMovementY) : "number" === typeof $e$jscomp$31$$.mozMovementX ? ($delta_x$$ = $e$jscomp$31$$.mozMovementX, $delta_y$$ = $e$jscomp$31$$.mozMovementY) : ($delta_x$$ = $e$jscomp$31$$.clientX - $last_x$$, $delta_y$$ = $e$jscomp$31$$.clientY - $last_y$$,
|
|
4303
|
+
$last_x$$ = $e$jscomp$31$$.clientX, $last_y$$ = $e$jscomp$31$$.clientY);
|
|
4301
4304
|
$mouse$$.bus.send("mouse-delta", [1 * $delta_x$$, -(1 * $delta_y$$)]);
|
|
4302
|
-
$screen_container$jscomp$1$$ && !document.pointerLockElement && $mouse$$.bus.send("mouse-absolute", [$e$jscomp$
|
|
4305
|
+
$screen_container$jscomp$1$$ && !document.pointerLockElement && $mouse$$.bus.send("mouse-absolute", [$e$jscomp$31$$.pageX - $screen_container$jscomp$1$$.offsetLeft, $e$jscomp$31$$.pageY - $screen_container$jscomp$1$$.offsetTop, $screen_container$jscomp$1$$.offsetWidth, $screen_container$jscomp$1$$.offsetHeight]);
|
|
4303
4306
|
}
|
|
4304
4307
|
}
|
|
4305
|
-
function $mousedown_handler$$($e$jscomp$
|
|
4306
|
-
$may_handle$jscomp$1$$($e$jscomp$
|
|
4308
|
+
function $mousedown_handler$$($e$jscomp$32$$) {
|
|
4309
|
+
$may_handle$jscomp$1$$($e$jscomp$32$$) && $click_event$$($e$jscomp$32$$, !0);
|
|
4307
4310
|
}
|
|
4308
|
-
function $mouseup_handler$$($e$jscomp$
|
|
4309
|
-
$may_handle$jscomp$1$$($e$jscomp$
|
|
4311
|
+
function $mouseup_handler$$($e$jscomp$33$$) {
|
|
4312
|
+
$may_handle$jscomp$1$$($e$jscomp$33$$) && $click_event$$($e$jscomp$33$$, !1);
|
|
4310
4313
|
}
|
|
4311
|
-
function $click_event$$($e$jscomp$
|
|
4312
|
-
$mouse$$.bus && (1 === $e$jscomp$
|
|
4314
|
+
function $click_event$$($e$jscomp$34$$, $down$$) {
|
|
4315
|
+
$mouse$$.bus && (1 === $e$jscomp$34$$.which ? $left_down$$ = $down$$ : 2 === $e$jscomp$34$$.which ? $middle_down$$ = $down$$ : 3 === $e$jscomp$34$$.which ? $right_down$$ = $down$$ : $dbg_log$$module$src$log$$("Unknown event.which: " + $e$jscomp$34$$.which), $mouse$$.bus.send("mouse-click", [$left_down$$, $middle_down$$, $right_down$$]), $e$jscomp$34$$.preventDefault());
|
|
4313
4316
|
}
|
|
4314
|
-
function $mousewheel_handler$$($e$jscomp$
|
|
4315
|
-
if ($may_handle$jscomp$1$$($e$jscomp$
|
|
4316
|
-
var $delta_x$jscomp$1$$ = $e$jscomp$
|
|
4317
|
+
function $mousewheel_handler$$($e$jscomp$35$$) {
|
|
4318
|
+
if ($may_handle$jscomp$1$$($e$jscomp$35$$)) {
|
|
4319
|
+
var $delta_x$jscomp$1$$ = $e$jscomp$35$$.wheelDelta || -$e$jscomp$35$$.detail;
|
|
4317
4320
|
0 > $delta_x$jscomp$1$$ ? $delta_x$jscomp$1$$ = -1 : 0 < $delta_x$jscomp$1$$ && ($delta_x$jscomp$1$$ = 1);
|
|
4318
4321
|
$mouse$$.bus.send("mouse-wheel", [$delta_x$jscomp$1$$, 0]);
|
|
4319
|
-
$e$jscomp$
|
|
4322
|
+
$e$jscomp$35$$.preventDefault();
|
|
4320
4323
|
}
|
|
4321
4324
|
}
|
|
4322
4325
|
var $left_down$$ = !1, $right_down$$ = !1, $middle_down$$ = !1, $last_x$$ = 0, $last_y$$ = 0, $mouse$$ = this;
|
|
4323
4326
|
this.enabled = !1;
|
|
4324
4327
|
this.emu_enabled = !0;
|
|
4328
|
+
this.absolute_mouse = !1;
|
|
4325
4329
|
this.bus = $bus$jscomp$11$$;
|
|
4326
4330
|
this.bus.register("mouse-enable", function($enabled$jscomp$3$$) {
|
|
4327
4331
|
this.enabled = $enabled$jscomp$3$$;
|
|
4332
|
+
this.update_cursor();
|
|
4333
|
+
}, this);
|
|
4334
|
+
this.bus.register("vmware-absolute-mouse", function($enabled$jscomp$4$$) {
|
|
4335
|
+
this.absolute_mouse = $enabled$jscomp$4$$;
|
|
4336
|
+
this.update_cursor();
|
|
4328
4337
|
}, this);
|
|
4329
4338
|
this.is_running = !1;
|
|
4330
4339
|
this.bus.register("emulator-stopped", function() {
|
|
@@ -4333,13 +4342,16 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4333
4342
|
this.bus.register("emulator-started", function() {
|
|
4334
4343
|
this.is_running = !0;
|
|
4335
4344
|
}, this);
|
|
4345
|
+
this.update_cursor = function() {
|
|
4346
|
+
$screen_container$jscomp$1$$ && ($screen_container$jscomp$1$$.style.cursor = this.absolute_mouse && this.enabled && this.emu_enabled ? "none" : "");
|
|
4347
|
+
};
|
|
4336
4348
|
this.destroy = function() {
|
|
4337
4349
|
"undefined" !== typeof window && (window.removeEventListener("touchstart", $touch_start_handler$$, !1), window.removeEventListener("touchend", $touch_end_handler$$, !1), window.removeEventListener("touchmove", $mousemove_handler$$, !1), window.removeEventListener("mousemove", $mousemove_handler$$, !1), window.removeEventListener("mousedown", $mousedown_handler$$, !1), window.removeEventListener("mouseup", $mouseup_handler$$, !1), window.removeEventListener("wheel", $mousewheel_handler$$, {passive:!1}),
|
|
4338
|
-
document.removeEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
|
|
4350
|
+
window.removeEventListener("contextmenu", $contextmenu_handler$$, !1), document.removeEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
|
|
4339
4351
|
};
|
|
4340
4352
|
this.init = function() {
|
|
4341
4353
|
"undefined" !== typeof window && (this.destroy(), window.addEventListener("touchstart", $touch_start_handler$$, !1), window.addEventListener("touchend", $touch_end_handler$$, !1), window.addEventListener("touchmove", $mousemove_handler$$, !1), window.addEventListener("mousemove", $mousemove_handler$$, !1), window.addEventListener("mousedown", $mousedown_handler$$, !1), window.addEventListener("mouseup", $mouseup_handler$$, !1), window.addEventListener("wheel", $mousewheel_handler$$, {passive:!1}),
|
|
4342
|
-
document.addEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
|
|
4354
|
+
window.addEventListener("contextmenu", $contextmenu_handler$$, !1), document.addEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
|
|
4343
4355
|
};
|
|
4344
4356
|
this.init();
|
|
4345
4357
|
}
|
|
@@ -4456,23 +4468,23 @@ function $KeyboardAdapter$$module$src$browser$keyboard$$($bus$jscomp$10$$) {
|
|
|
4456
4468
|
this.set_size_text(80, 25);
|
|
4457
4469
|
}
|
|
4458
4470
|
;function $TextAreaAdapter$$module$src$browser$serial$$($element$jscomp$8$$) {
|
|
4459
|
-
function $keypress_handler$$($e$jscomp$
|
|
4460
|
-
$serial$$.enabled && ($serial$$.send_char($e$jscomp$
|
|
4471
|
+
function $keypress_handler$$($e$jscomp$37$$) {
|
|
4472
|
+
$serial$$.enabled && ($serial$$.send_char($e$jscomp$37$$.which), $e$jscomp$37$$.preventDefault());
|
|
4461
4473
|
}
|
|
4462
|
-
function $keydown_handler$jscomp$1$$($e$jscomp$
|
|
4463
|
-
var $chr$jscomp$10$$ = $e$jscomp$
|
|
4464
|
-
8 === $chr$jscomp$10$$ ? ($serial$$.send_char(127), $e$jscomp$
|
|
4474
|
+
function $keydown_handler$jscomp$1$$($e$jscomp$38$$) {
|
|
4475
|
+
var $chr$jscomp$10$$ = $e$jscomp$38$$.which;
|
|
4476
|
+
8 === $chr$jscomp$10$$ ? ($serial$$.send_char(127), $e$jscomp$38$$.preventDefault()) : 9 === $chr$jscomp$10$$ && ($serial$$.send_char(9), $e$jscomp$38$$.preventDefault());
|
|
4465
4477
|
}
|
|
4466
|
-
function $paste_handler$$($e$jscomp$
|
|
4478
|
+
function $paste_handler$$($e$jscomp$39$$) {
|
|
4467
4479
|
if ($serial$$.enabled) {
|
|
4468
|
-
for (var $data$jscomp$143$$ = $e$jscomp$
|
|
4480
|
+
for (var $data$jscomp$143$$ = $e$jscomp$39$$.clipboardData.getData("text/plain"), $i$jscomp$58$$ = 0; $i$jscomp$58$$ < $data$jscomp$143$$.length; $i$jscomp$58$$++) {
|
|
4469
4481
|
$serial$$.send_char($data$jscomp$143$$.charCodeAt($i$jscomp$58$$));
|
|
4470
4482
|
}
|
|
4471
|
-
$e$jscomp$
|
|
4483
|
+
$e$jscomp$39$$.preventDefault();
|
|
4472
4484
|
}
|
|
4473
4485
|
}
|
|
4474
|
-
function $window_click_handler$$($e$jscomp$
|
|
4475
|
-
$e$jscomp$
|
|
4486
|
+
function $window_click_handler$$($e$jscomp$40$$) {
|
|
4487
|
+
$e$jscomp$40$$.target !== $element$jscomp$8$$ && $element$jscomp$8$$.blur();
|
|
4476
4488
|
}
|
|
4477
4489
|
var $serial$$ = this;
|
|
4478
4490
|
this.enabled = !0;
|
|
@@ -4795,7 +4807,7 @@ $Modem$$module$src$browser$modem$$.prototype.cli_exec_dial = function($dial_addr
|
|
|
4795
4807
|
$dbg_log$$module$src$log$$(`connecting "${$offset$jscomp$50_ws_address$jscomp$1$$}"`, 33554432);
|
|
4796
4808
|
try {
|
|
4797
4809
|
this.socket = new WebSocket($offset$jscomp$50_ws_address$jscomp$1$$);
|
|
4798
|
-
} catch ($e$jscomp$
|
|
4810
|
+
} catch ($e$jscomp$41$$) {
|
|
4799
4811
|
$dbg_log$$module$src$log$$(`error: WebSocket constructor failed using address "${$offset$jscomp$50_ws_address$jscomp$1$$}"`, 33554432);
|
|
4800
4812
|
this.cli_write_response_code(4);
|
|
4801
4813
|
return;
|
|
@@ -5981,8 +5993,8 @@ function $V86$$module$src$browser$starter$$($options$jscomp$45$$) {
|
|
|
5981
5993
|
$resolve$jscomp$2$$($instance$jscomp$1$$.exports);
|
|
5982
5994
|
}, });
|
|
5983
5995
|
}
|
|
5984
|
-
}, progress:$e$jscomp$
|
|
5985
|
-
this.emulator_bus.send("download-progress", {file_index:0, file_count:1, file_name:$v86_bin$$, lengthComputable:$e$jscomp$
|
|
5996
|
+
}, progress:$e$jscomp$42$$ => {
|
|
5997
|
+
this.emulator_bus.send("download-progress", {file_index:0, file_count:1, file_name:$v86_bin$$, lengthComputable:$e$jscomp$42$$.lengthComputable, total:$e$jscomp$42$$.total, loaded:$e$jscomp$42$$.loaded, });
|
|
5986
5998
|
}});
|
|
5987
5999
|
}));
|
|
5988
6000
|
$wasm_fn$$({env:$bus$jscomp$19_wasm_shared_funcs$$}).then($emulator_exports$$ => {
|
|
@@ -6111,9 +6123,9 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
6111
6123
|
$options$jscomp$46$$.disable_keyboard || (this.keyboard_adapter = new $KeyboardAdapter$$module$src$browser$keyboard$$(this.bus));
|
|
6112
6124
|
$options$jscomp$46$$.disable_mouse || (this.mouse_adapter = new $MouseAdapter$$module$src$browser$mouse$$(this.bus, $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.container));
|
|
6113
6125
|
this.absolute_pointer_enabled = !1;
|
|
6114
|
-
this.bus.register("vmware-absolute-mouse", function($enabled$jscomp$
|
|
6115
|
-
$enabled$jscomp$
|
|
6116
|
-
this.absolute_pointer_enabled = $enabled$jscomp$
|
|
6126
|
+
this.bus.register("vmware-absolute-mouse", function($enabled$jscomp$5$$) {
|
|
6127
|
+
$enabled$jscomp$5$$ && !this.absolute_pointer_enabled && "undefined" !== typeof document && document.pointerLockElement && document.exitPointerLock();
|
|
6128
|
+
this.absolute_pointer_enabled = $enabled$jscomp$5$$;
|
|
6117
6129
|
}, this);
|
|
6118
6130
|
this.screen_adapter = $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.container ? new $ScreenAdapter$$module$src$browser$screen$$($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$, () => this.v86.cpu.devices.vga && this.v86.cpu.devices.vga.screen_fill_buffer()) : $add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$.ansi ? new $ANSIScreenAdapter$$module$src$browser$ansi_screen$$($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$) :
|
|
6119
6131
|
new $DummyScreenAdapter$$module$src$browser$dummy_screen$$($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$);
|
|
@@ -6191,8 +6203,8 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
|
|
|
6191
6203
|
$f$jscomp$1$$.url.endsWith(".zst") && "initial_state" !== $f$jscomp$1$$.name && ($dbg_assert$$module$src$log$$($f$jscomp$1$$.size, "A size must be provided for compressed images"), $result$jscomp$9$$ = this.zstd_decompress($f$jscomp$1$$.size, new Uint8Array($result$jscomp$9$$)));
|
|
6192
6204
|
$put_on_settings$$.call(this, $f$jscomp$1$$.name, $f$jscomp$1$$.as_json ? $result$jscomp$9$$ : new $SyncBuffer$$module$src$buffer$$($result$jscomp$9$$));
|
|
6193
6205
|
$cont$$($index$jscomp$83$$ + 1);
|
|
6194
|
-
}.bind(this), progress:function($e$jscomp$
|
|
6195
|
-
200 === $e$jscomp$
|
|
6206
|
+
}.bind(this), progress:function($e$jscomp$44$$) {
|
|
6207
|
+
200 === $e$jscomp$44$$.target.status ? $starter$$.emulator_bus.send("download-progress", {file_index:$index$jscomp$83$$, file_count:$total$jscomp$1$$, file_name:$f$jscomp$1$$.url, lengthComputable:$e$jscomp$44$$.lengthComputable, total:$e$jscomp$44$$.total || $f$jscomp$1$$.size, loaded:$e$jscomp$44$$.loaded, }) : $starter$$.emulator_bus.send("download-error", {file_index:$index$jscomp$83$$, file_count:$total$jscomp$1$$, file_name:$f$jscomp$1$$.url, request:$e$jscomp$44$$.target, });
|
|
6196
6208
|
}, as_json:$f$jscomp$1$$.as_json, });
|
|
6197
6209
|
}
|
|
6198
6210
|
}.bind(this);
|
|
@@ -6214,15 +6226,15 @@ $V86$$module$src$browser$starter$$.prototype.zstd_decompress_worker = async func
|
|
|
6214
6226
|
if (!this.zstd_worker) {
|
|
6215
6227
|
const $url$jscomp$26$$ = URL.createObjectURL(new Blob(["(" + function() {
|
|
6216
6228
|
let $wasm$$;
|
|
6217
|
-
globalThis.onmessage = function($e$jscomp$
|
|
6229
|
+
globalThis.onmessage = function($e$jscomp$45_exports$jscomp$1$$) {
|
|
6218
6230
|
if ($wasm$$) {
|
|
6219
|
-
var {src:$src$jscomp$6$$, decompressed_size:$decompressed_size$jscomp$2$$, id:$id$jscomp$21$$} = $e$jscomp$
|
|
6220
|
-
$e$jscomp$
|
|
6221
|
-
var $env$jscomp$1_zstd_context$$ = $e$jscomp$
|
|
6222
|
-
(new Uint8Array($e$jscomp$
|
|
6223
|
-
var $ptr$jscomp$6$$ = $e$jscomp$
|
|
6224
|
-
$e$jscomp$
|
|
6225
|
-
$e$jscomp$
|
|
6231
|
+
var {src:$src$jscomp$6$$, decompressed_size:$decompressed_size$jscomp$2$$, id:$id$jscomp$21$$} = $e$jscomp$45_exports$jscomp$1$$.data;
|
|
6232
|
+
$e$jscomp$45_exports$jscomp$1$$ = $wasm$$.exports;
|
|
6233
|
+
var $env$jscomp$1_zstd_context$$ = $e$jscomp$45_exports$jscomp$1$$.zstd_create_ctx($src$jscomp$6$$.length);
|
|
6234
|
+
(new Uint8Array($e$jscomp$45_exports$jscomp$1$$.memory.buffer)).set($src$jscomp$6$$, $e$jscomp$45_exports$jscomp$1$$.zstd_get_src_ptr($env$jscomp$1_zstd_context$$));
|
|
6235
|
+
var $ptr$jscomp$6$$ = $e$jscomp$45_exports$jscomp$1$$.zstd_read($env$jscomp$1_zstd_context$$, $decompressed_size$jscomp$2$$), $result$jscomp$11$$ = $e$jscomp$45_exports$jscomp$1$$.memory.buffer.slice($ptr$jscomp$6$$, $ptr$jscomp$6$$ + $decompressed_size$jscomp$2$$);
|
|
6236
|
+
$e$jscomp$45_exports$jscomp$1$$.zstd_read_free($ptr$jscomp$6$$, $decompressed_size$jscomp$2$$);
|
|
6237
|
+
$e$jscomp$45_exports$jscomp$1$$.zstd_free_ctx($env$jscomp$1_zstd_context$$);
|
|
6226
6238
|
postMessage({result:$result$jscomp$11$$, id:$id$jscomp$21$$}, [$result$jscomp$11$$]);
|
|
6227
6239
|
} else {
|
|
6228
6240
|
$env$jscomp$1_zstd_context$$ = Object.fromEntries("cpu_exception_hook run_hardware_timers cpu_event_halt microtick get_rand_int stop_idling io_port_read8 io_port_read16 io_port_read32 io_port_write8 io_port_write16 io_port_write32 mmap_read8 mmap_read32 mmap_write8 mmap_write16 mmap_write32 mmap_write64 mmap_write128 codegen_finalize jit_clear_func jit_clear_all_funcs".split(" ").map($f$jscomp$2$$ => [$f$jscomp$2$$, () => console.error("zstd worker unexpectedly called " + $f$jscomp$2$$)])),
|
|
@@ -6230,7 +6242,7 @@ $V86$$module$src$browser$starter$$.prototype.zstd_decompress_worker = async func
|
|
|
6230
6242
|
throw Error("zstd worker aborted");
|
|
6231
6243
|
}, $env$jscomp$1_zstd_context$$.log_from_wasm = $env$jscomp$1_zstd_context$$.console_log_from_wasm = ($off$$, $len$jscomp$25$$) => {
|
|
6232
6244
|
console.log($read_sized_string_from_mem$$module$src$lib$$($wasm$$.exports.memory.buffer, $off$$, $len$jscomp$25$$));
|
|
6233
|
-
}, $env$jscomp$1_zstd_context$$.dbg_trace_from_wasm = () => console.trace(), $wasm$$ = new WebAssembly.Instance(new WebAssembly.Module($e$jscomp$
|
|
6245
|
+
}, $env$jscomp$1_zstd_context$$.dbg_trace_from_wasm = () => console.trace(), $wasm$$ = new WebAssembly.Instance(new WebAssembly.Module($e$jscomp$45_exports$jscomp$1$$.data), {env:$env$jscomp$1_zstd_context$$});
|
|
6234
6246
|
}
|
|
6235
6247
|
};
|
|
6236
6248
|
}.toString() + ")()"], {type:"text/javascript"}));
|
|
@@ -6239,8 +6251,8 @@ $V86$$module$src$browser$starter$$.prototype.zstd_decompress_worker = async func
|
|
|
6239
6251
|
this.zstd_worker.postMessage(this.wasm_source, [this.wasm_source]);
|
|
6240
6252
|
}
|
|
6241
6253
|
return new Promise($resolve$jscomp$3$$ => {
|
|
6242
|
-
const $id$jscomp$22$$ = this.zstd_worker_request_id++, $done$jscomp$5$$ = async $e$jscomp$
|
|
6243
|
-
$e$jscomp$
|
|
6254
|
+
const $id$jscomp$22$$ = this.zstd_worker_request_id++, $done$jscomp$5$$ = async $e$jscomp$46$$ => {
|
|
6255
|
+
$e$jscomp$46$$.data.id === $id$jscomp$22$$ && (this.zstd_worker.removeEventListener("message", $done$jscomp$5$$), $dbg_assert$$module$src$log$$($decompressed_size$jscomp$1$$ === $e$jscomp$46$$.data.result.byteLength), $resolve$jscomp$3$$($e$jscomp$46$$.data.result));
|
|
6244
6256
|
};
|
|
6245
6257
|
this.zstd_worker.addEventListener("message", $done$jscomp$5$$);
|
|
6246
6258
|
this.zstd_worker.postMessage({src:$src$jscomp$5$$, decompressed_size:$decompressed_size$jscomp$1$$, id:$id$jscomp$22$$}, [$src$jscomp$5$$.buffer]);
|
|
@@ -6397,7 +6409,7 @@ $V86$$module$src$browser$starter$$.prototype.screen_go_fullscreen = function() {
|
|
|
6397
6409
|
$fn$jscomp$16$$ && ($fn$jscomp$16$$.call($elem$jscomp$2_focus_element$$), ($elem$jscomp$2_focus_element$$ = document.getElementsByClassName("phone_keyboard")[0]) && $elem$jscomp$2_focus_element$$.focus());
|
|
6398
6410
|
try {
|
|
6399
6411
|
navigator.keyboard.lock();
|
|
6400
|
-
} catch ($e$jscomp$
|
|
6412
|
+
} catch ($e$jscomp$47$$) {
|
|
6401
6413
|
}
|
|
6402
6414
|
this.lock_mouse();
|
|
6403
6415
|
}
|
|
@@ -6407,16 +6419,16 @@ $V86$$module$src$browser$starter$$.prototype.lock_mouse = async function() {
|
|
|
6407
6419
|
const $elem$jscomp$3$$ = document.body;
|
|
6408
6420
|
try {
|
|
6409
6421
|
await $elem$jscomp$3$$.requestPointerLock({unadjustedMovement:!0, });
|
|
6410
|
-
} catch ($e$jscomp$
|
|
6422
|
+
} catch ($e$jscomp$48$$) {
|
|
6411
6423
|
await $elem$jscomp$3$$.requestPointerLock();
|
|
6412
6424
|
}
|
|
6413
6425
|
};
|
|
6414
|
-
$V86$$module$src$browser$starter$$.prototype.mouse_set_enabled = function($enabled$jscomp$
|
|
6415
|
-
this.mouse_adapter && (this.mouse_adapter.emu_enabled = $enabled$jscomp$
|
|
6426
|
+
$V86$$module$src$browser$starter$$.prototype.mouse_set_enabled = function($enabled$jscomp$6$$) {
|
|
6427
|
+
this.mouse_adapter && (this.mouse_adapter.emu_enabled = $enabled$jscomp$6$$, this.mouse_adapter.update_cursor());
|
|
6416
6428
|
};
|
|
6417
6429
|
$V86$$module$src$browser$starter$$.prototype.mouse_set_status = $V86$$module$src$browser$starter$$.prototype.mouse_set_enabled;
|
|
6418
|
-
$V86$$module$src$browser$starter$$.prototype.keyboard_set_enabled = function($enabled$jscomp$
|
|
6419
|
-
this.keyboard_adapter && (this.keyboard_adapter.emu_enabled = $enabled$jscomp$
|
|
6430
|
+
$V86$$module$src$browser$starter$$.prototype.keyboard_set_enabled = function($enabled$jscomp$7$$) {
|
|
6431
|
+
this.keyboard_adapter && (this.keyboard_adapter.emu_enabled = $enabled$jscomp$7$$);
|
|
6420
6432
|
};
|
|
6421
6433
|
$V86$$module$src$browser$starter$$.prototype.keyboard_set_status = $V86$$module$src$browser$starter$$.prototype.keyboard_set_enabled;
|
|
6422
6434
|
$V86$$module$src$browser$starter$$.prototype.serial0_send = function($data$jscomp$163$$) {
|
|
@@ -6644,16 +6656,16 @@ if ("undefined" !== typeof process) {
|
|
|
6644
6656
|
if ("undefined" !== typeof Worker) {
|
|
6645
6657
|
function $the_worker$jscomp$1$$() {
|
|
6646
6658
|
let $timeout$jscomp$4$$;
|
|
6647
|
-
globalThis.onmessage = function($e$jscomp$
|
|
6648
|
-
const $t$jscomp$9$$ = $e$jscomp$
|
|
6659
|
+
globalThis.onmessage = function($e$jscomp$49$$) {
|
|
6660
|
+
const $t$jscomp$9$$ = $e$jscomp$49$$.data.t;
|
|
6649
6661
|
$timeout$jscomp$4$$ = $timeout$jscomp$4$$ && clearTimeout($timeout$jscomp$4$$);
|
|
6650
|
-
1 > $t$jscomp$9$$ ? postMessage($e$jscomp$
|
|
6662
|
+
1 > $t$jscomp$9$$ ? postMessage($e$jscomp$49$$.data.tick) : $timeout$jscomp$4$$ = setTimeout(() => postMessage($e$jscomp$49$$.data.tick), $t$jscomp$9$$);
|
|
6651
6663
|
};
|
|
6652
6664
|
}
|
|
6653
6665
|
$v86$$module$src$main$$.prototype.register_yield = function() {
|
|
6654
6666
|
const $url$jscomp$27$$ = URL.createObjectURL(new Blob(["(" + $the_worker$jscomp$1$$.toString() + ")()"], {type:"text/javascript"}));
|
|
6655
6667
|
this.worker = new Worker($url$jscomp$27$$);
|
|
6656
|
-
this.worker.onmessage = $e$jscomp$
|
|
6668
|
+
this.worker.onmessage = $e$jscomp$50$$ => this.yield_callback($e$jscomp$50$$.data);
|
|
6657
6669
|
URL.revokeObjectURL($url$jscomp$27$$);
|
|
6658
6670
|
};
|
|
6659
6671
|
$v86$$module$src$main$$.prototype.yield = function($t$jscomp$10$$, $tick$jscomp$6$$) {
|
|
@@ -12008,10 +12020,10 @@ $CPU$$module$src$cpu$$.prototype.codegen_finalize = function($wasm_table_index$j
|
|
|
12008
12020
|
this.wm.wasm_table.set($wasm_table_index$jscomp$2$$ + 1024, $result$jscomp$26$$.instance.exports.f);
|
|
12009
12021
|
this.codegen_finalize_finished($wasm_table_index$jscomp$2$$, $start$jscomp$45$$, $state_flags$jscomp$1$$);
|
|
12010
12022
|
this.test_hook_did_finalize_wasm && this.test_hook_did_finalize_wasm($code$jscomp$10$$);
|
|
12011
|
-
}).catch($e$jscomp$
|
|
12012
|
-
console.log($e$jscomp$
|
|
12023
|
+
}).catch($e$jscomp$51$$ => {
|
|
12024
|
+
console.log($e$jscomp$51$$);
|
|
12013
12025
|
debugger;
|
|
12014
|
-
throw $e$jscomp$
|
|
12026
|
+
throw $e$jscomp$51$$;
|
|
12015
12027
|
});
|
|
12016
12028
|
};
|
|
12017
12029
|
$CPU$$module$src$cpu$$.prototype.log_uncompiled_code = function() {
|
|
@@ -12176,7 +12188,7 @@ $CPU$$module$src$cpu$$.prototype.debug_dump_code = function($is_32$jscomp$1$$, $
|
|
|
12176
12188
|
this.capstone_decoder[+$is_32$jscomp$1$$].disasm($buffer$jscomp$66$$, $start$jscomp$51$$).forEach(function($instr$$) {
|
|
12177
12189
|
$dbg_log$$module$src$log$$($h$$module$src$lib$$($instr$$.address >>> 0) + ": " + $pads$$module$src$lib$$($instr$$.bytes.map($x$jscomp$125$$ => $h$$module$src$lib$$($x$jscomp$125$$, 2).slice(-2)).join(" "), 20) + " " + $instr$$.mnemonic + " " + $instr$$.op_str);
|
|
12178
12190
|
}), $dbg_log$$module$src$log$$("");
|
|
12179
|
-
} catch ($e$jscomp$
|
|
12191
|
+
} catch ($e$jscomp$52$$) {
|
|
12180
12192
|
$dbg_log$$module$src$log$$("Could not disassemble: " + Array.from($buffer$jscomp$66$$).map($x$jscomp$126$$ => $h$$module$src$lib$$($x$jscomp$126$$, 2)).join(" "));
|
|
12181
12193
|
}
|
|
12182
12194
|
};
|
|
@@ -12192,8 +12204,8 @@ $CPU$$module$src$cpu$$.prototype.dump_wasm = function($buffer$jscomp$67$$) {
|
|
|
12192
12204
|
$module$jscomp$2$$.applyNames();
|
|
12193
12205
|
const $result$jscomp$27$$ = $module$jscomp$2$$.toText({foldExprs:!0, inlineExport:!0});
|
|
12194
12206
|
$dbg_log$$module$src$log$$($result$jscomp$27$$);
|
|
12195
|
-
} catch ($e$jscomp$
|
|
12196
|
-
$dump_file$$module$src$lib$$($buffer$jscomp$67$$, "failed.wasm"), console.log($e$jscomp$
|
|
12207
|
+
} catch ($e$jscomp$53$$) {
|
|
12208
|
+
$dump_file$$module$src$lib$$($buffer$jscomp$67$$, "failed.wasm"), console.log($e$jscomp$53$$.toString());
|
|
12197
12209
|
} finally {
|
|
12198
12210
|
$module$jscomp$2$$ && $module$jscomp$2$$.destroy();
|
|
12199
12211
|
}
|
|
@@ -13274,10 +13286,10 @@ $Virtio9pProxy$$module$lib$9p$$.prototype.set_state = function($state$jscomp$73$
|
|
|
13274
13286
|
$Virtio9pProxy$$module$lib$9p$$.prototype.reset = function() {
|
|
13275
13287
|
this.virtio.reset();
|
|
13276
13288
|
};
|
|
13277
|
-
$Virtio9pProxy$$module$lib$9p$$.prototype.handle_message = function($e$jscomp$
|
|
13278
|
-
$e$jscomp$
|
|
13279
|
-
const $replytag$jscomp$1$$ = $Unmarshall$$module$lib$marshall$$(["w", "b", "h"], $e$jscomp$
|
|
13280
|
-
$bufchain$jscomp$25$$ ? ($bufchain$jscomp$25$$.set_next_blob($e$jscomp$
|
|
13289
|
+
$Virtio9pProxy$$module$lib$9p$$.prototype.handle_message = function($e$jscomp$54_replybuf$jscomp$1$$) {
|
|
13290
|
+
$e$jscomp$54_replybuf$jscomp$1$$ = new Uint8Array($e$jscomp$54_replybuf$jscomp$1$$.data);
|
|
13291
|
+
const $replytag$jscomp$1$$ = $Unmarshall$$module$lib$marshall$$(["w", "b", "h"], $e$jscomp$54_replybuf$jscomp$1$$, {offset:0})[2], $bufchain$jscomp$25$$ = this.tag_bufchain.get($replytag$jscomp$1$$);
|
|
13292
|
+
$bufchain$jscomp$25$$ ? ($bufchain$jscomp$25$$.set_next_blob($e$jscomp$54_replybuf$jscomp$1$$), this.virtqueue.push_reply($bufchain$jscomp$25$$), this.virtqueue.flush_replies(), this.tag_bufchain.delete($replytag$jscomp$1$$)) : console.error("Virtio9pProxy: No bufchain found for tag: " + $replytag$jscomp$1$$);
|
|
13281
13293
|
};
|
|
13282
13294
|
$Virtio9pProxy$$module$lib$9p$$.prototype.handle_close = function() {
|
|
13283
13295
|
this.destroyed || (this.connect(), setTimeout(this.connect.bind(this), this.reconnect_interval));
|
|
@@ -13307,8 +13319,8 @@ $Virtio9pProxy$$module$lib$9p$$.prototype.connect = function() {
|
|
|
13307
13319
|
this.last_connect_attempt = Date.now();
|
|
13308
13320
|
try {
|
|
13309
13321
|
this.socket = new WebSocket(this.url);
|
|
13310
|
-
} catch ($e$jscomp$
|
|
13311
|
-
console.error($e$jscomp$
|
|
13322
|
+
} catch ($e$jscomp$58$$) {
|
|
13323
|
+
console.error($e$jscomp$58$$);
|
|
13312
13324
|
return;
|
|
13313
13325
|
}
|
|
13314
13326
|
this.socket.binaryType = "arraybuffer";
|