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.
@@ -4264,66 +4264,75 @@ function $MouseAdapter$$module$src$browser$mouse$$($bus$jscomp$11$$, $screen_con
4264
4264
  function $pointerlockchange_handler$$() {
4265
4265
  $mouse$$.bus.send("mouse-pointer-lock", !!document.pointerLockElement);
4266
4266
  }
4267
- function $may_handle$jscomp$1$$($child$jscomp$inline_356_e$jscomp$27$$) {
4267
+ function $contextmenu_handler$$($e$jscomp$27$$) {
4268
+ $may_handle$jscomp$1$$($e$jscomp$27$$) && $e$jscomp$27$$.preventDefault();
4269
+ }
4270
+ function $may_handle$jscomp$1$$($child$jscomp$inline_356_e$jscomp$28$$) {
4268
4271
  if (!$mouse$$.enabled || !$mouse$$.emu_enabled) {
4269
4272
  return !1;
4270
4273
  }
4271
4274
  var $parent$jscomp$5$$ = $screen_container$jscomp$1$$ || document.body, $JSCompiler_temp$jscomp$280$$;
4272
4275
  if (!($JSCompiler_temp$jscomp$280$$ = document.pointerLockElement)) {
4273
4276
  a: {
4274
- for ($child$jscomp$inline_356_e$jscomp$27$$ = $child$jscomp$inline_356_e$jscomp$27$$.target; $child$jscomp$inline_356_e$jscomp$27$$.parentNode;) {
4275
- if ($child$jscomp$inline_356_e$jscomp$27$$ === $parent$jscomp$5$$) {
4277
+ for ($child$jscomp$inline_356_e$jscomp$28$$ = $child$jscomp$inline_356_e$jscomp$28$$.target; $child$jscomp$inline_356_e$jscomp$28$$.parentNode;) {
4278
+ if ($child$jscomp$inline_356_e$jscomp$28$$ === $parent$jscomp$5$$) {
4276
4279
  $JSCompiler_temp$jscomp$280$$ = !0;
4277
4280
  break a;
4278
4281
  }
4279
- $child$jscomp$inline_356_e$jscomp$27$$ = $child$jscomp$inline_356_e$jscomp$27$$.parentNode;
4282
+ $child$jscomp$inline_356_e$jscomp$28$$ = $child$jscomp$inline_356_e$jscomp$28$$.parentNode;
4280
4283
  }
4281
4284
  $JSCompiler_temp$jscomp$280$$ = !1;
4282
4285
  }
4283
4286
  }
4284
4287
  return $JSCompiler_temp$jscomp$280$$;
4285
4288
  }
4286
- function $touch_start_handler$$($e$jscomp$28_touch_touches$jscomp$2$$) {
4287
- $may_handle$jscomp$1$$($e$jscomp$28_touch_touches$jscomp$2$$) && ($e$jscomp$28_touch_touches$jscomp$2$$ = $e$jscomp$28_touch_touches$jscomp$2$$.changedTouches) && $e$jscomp$28_touch_touches$jscomp$2$$.length && ($e$jscomp$28_touch_touches$jscomp$2$$ = $e$jscomp$28_touch_touches$jscomp$2$$[$e$jscomp$28_touch_touches$jscomp$2$$.length - 1], $last_x$$ = $e$jscomp$28_touch_touches$jscomp$2$$.clientX, $last_y$$ = $e$jscomp$28_touch_touches$jscomp$2$$.clientY);
4289
+ function $touch_start_handler$$($e$jscomp$29_touch_touches$jscomp$2$$) {
4290
+ $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);
4288
4291
  }
4289
4292
  function $touch_end_handler$$() {
4290
4293
  if ($left_down$$ || $middle_down$$ || $right_down$$) {
4291
4294
  $mouse$$.bus.send("mouse-click", [!1, !1, !1]), $left_down$$ = $middle_down$$ = $right_down$$ = !1;
4292
4295
  }
4293
4296
  }
4294
- function $mousemove_handler$$($e$jscomp$30$$) {
4295
- if ($mouse$$.bus && $may_handle$jscomp$1$$($e$jscomp$30$$) && $mouse$$.is_running) {
4296
- var $delta_x$$ = 0, $delta_y$$ = 0, $touch$jscomp$1_touches$jscomp$3$$ = $e$jscomp$30$$.changedTouches;
4297
- $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$30$$.preventDefault()) : "number" ===
4298
- typeof $e$jscomp$30$$.movementX ? ($delta_x$$ = $e$jscomp$30$$.movementX, $delta_y$$ = $e$jscomp$30$$.movementY) : "number" === typeof $e$jscomp$30$$.webkitMovementX ? ($delta_x$$ = $e$jscomp$30$$.webkitMovementX, $delta_y$$ = $e$jscomp$30$$.webkitMovementY) : "number" === typeof $e$jscomp$30$$.mozMovementX ? ($delta_x$$ = $e$jscomp$30$$.mozMovementX, $delta_y$$ = $e$jscomp$30$$.mozMovementY) : ($delta_x$$ = $e$jscomp$30$$.clientX - $last_x$$, $delta_y$$ = $e$jscomp$30$$.clientY - $last_y$$,
4299
- $last_x$$ = $e$jscomp$30$$.clientX, $last_y$$ = $e$jscomp$30$$.clientY);
4297
+ function $mousemove_handler$$($e$jscomp$31$$) {
4298
+ if ($mouse$$.bus && $may_handle$jscomp$1$$($e$jscomp$31$$) && $mouse$$.is_running) {
4299
+ var $delta_x$$ = 0, $delta_y$$ = 0, $touch$jscomp$1_touches$jscomp$3$$ = $e$jscomp$31$$.changedTouches;
4300
+ $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" ===
4301
+ 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$$,
4302
+ $last_x$$ = $e$jscomp$31$$.clientX, $last_y$$ = $e$jscomp$31$$.clientY);
4300
4303
  $mouse$$.bus.send("mouse-delta", [1 * $delta_x$$, -(1 * $delta_y$$)]);
4301
- $screen_container$jscomp$1$$ && !document.pointerLockElement && $mouse$$.bus.send("mouse-absolute", [$e$jscomp$30$$.pageX - $screen_container$jscomp$1$$.offsetLeft, $e$jscomp$30$$.pageY - $screen_container$jscomp$1$$.offsetTop, $screen_container$jscomp$1$$.offsetWidth, $screen_container$jscomp$1$$.offsetHeight]);
4304
+ $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]);
4302
4305
  }
4303
4306
  }
4304
- function $mousedown_handler$$($e$jscomp$31$$) {
4305
- $may_handle$jscomp$1$$($e$jscomp$31$$) && $click_event$$($e$jscomp$31$$, !0);
4307
+ function $mousedown_handler$$($e$jscomp$32$$) {
4308
+ $may_handle$jscomp$1$$($e$jscomp$32$$) && $click_event$$($e$jscomp$32$$, !0);
4306
4309
  }
4307
- function $mouseup_handler$$($e$jscomp$32$$) {
4308
- $may_handle$jscomp$1$$($e$jscomp$32$$) && $click_event$$($e$jscomp$32$$, !1);
4310
+ function $mouseup_handler$$($e$jscomp$33$$) {
4311
+ $may_handle$jscomp$1$$($e$jscomp$33$$) && $click_event$$($e$jscomp$33$$, !1);
4309
4312
  }
4310
- function $click_event$$($e$jscomp$33$$, $down$$) {
4311
- $mouse$$.bus && (1 === $e$jscomp$33$$.which ? $left_down$$ = $down$$ : 2 === $e$jscomp$33$$.which ? $middle_down$$ = $down$$ : 3 === $e$jscomp$33$$.which ? $right_down$$ = $down$$ : $dbg_log$$module$src$log$$("Unknown event.which: " + $e$jscomp$33$$.which), $mouse$$.bus.send("mouse-click", [$left_down$$, $middle_down$$, $right_down$$]), $e$jscomp$33$$.preventDefault());
4313
+ function $click_event$$($e$jscomp$34$$, $down$$) {
4314
+ $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());
4312
4315
  }
4313
- function $mousewheel_handler$$($e$jscomp$34$$) {
4314
- if ($may_handle$jscomp$1$$($e$jscomp$34$$)) {
4315
- var $delta_x$jscomp$1$$ = $e$jscomp$34$$.wheelDelta || -$e$jscomp$34$$.detail;
4316
+ function $mousewheel_handler$$($e$jscomp$35$$) {
4317
+ if ($may_handle$jscomp$1$$($e$jscomp$35$$)) {
4318
+ var $delta_x$jscomp$1$$ = $e$jscomp$35$$.wheelDelta || -$e$jscomp$35$$.detail;
4316
4319
  0 > $delta_x$jscomp$1$$ ? $delta_x$jscomp$1$$ = -1 : 0 < $delta_x$jscomp$1$$ && ($delta_x$jscomp$1$$ = 1);
4317
4320
  $mouse$$.bus.send("mouse-wheel", [$delta_x$jscomp$1$$, 0]);
4318
- $e$jscomp$34$$.preventDefault();
4321
+ $e$jscomp$35$$.preventDefault();
4319
4322
  }
4320
4323
  }
4321
4324
  var $left_down$$ = !1, $right_down$$ = !1, $middle_down$$ = !1, $last_x$$ = 0, $last_y$$ = 0, $mouse$$ = this;
4322
4325
  this.enabled = !1;
4323
4326
  this.emu_enabled = !0;
4327
+ this.absolute_mouse = !1;
4324
4328
  this.bus = $bus$jscomp$11$$;
4325
4329
  this.bus.register("mouse-enable", function($enabled$jscomp$3$$) {
4326
4330
  this.enabled = $enabled$jscomp$3$$;
4331
+ this.update_cursor();
4332
+ }, this);
4333
+ this.bus.register("vmware-absolute-mouse", function($enabled$jscomp$4$$) {
4334
+ this.absolute_mouse = $enabled$jscomp$4$$;
4335
+ this.update_cursor();
4327
4336
  }, this);
4328
4337
  this.is_running = !1;
4329
4338
  this.bus.register("emulator-stopped", function() {
@@ -4332,13 +4341,16 @@ function $MouseAdapter$$module$src$browser$mouse$$($bus$jscomp$11$$, $screen_con
4332
4341
  this.bus.register("emulator-started", function() {
4333
4342
  this.is_running = !0;
4334
4343
  }, this);
4344
+ this.update_cursor = function() {
4345
+ $screen_container$jscomp$1$$ && ($screen_container$jscomp$1$$.style.cursor = this.absolute_mouse && this.enabled && this.emu_enabled ? "none" : "");
4346
+ };
4335
4347
  this.destroy = function() {
4336
4348
  "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}),
4337
- document.removeEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
4349
+ window.removeEventListener("contextmenu", $contextmenu_handler$$, !1), document.removeEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
4338
4350
  };
4339
4351
  this.init = function() {
4340
4352
  "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}),
4341
- document.addEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
4353
+ window.addEventListener("contextmenu", $contextmenu_handler$$, !1), document.addEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
4342
4354
  };
4343
4355
  this.init();
4344
4356
  }
@@ -4455,23 +4467,23 @@ function $ANSIScreenAdapter$$module$src$browser$ansi_screen$$($options$jscomp$43
4455
4467
  this.set_size_text(80, 25);
4456
4468
  }
4457
4469
  function $TextAreaAdapter$$module$src$browser$serial$$($element$jscomp$8$$) {
4458
- function $keypress_handler$$($e$jscomp$36$$) {
4459
- $serial$$.enabled && ($serial$$.send_char($e$jscomp$36$$.which), $e$jscomp$36$$.preventDefault());
4470
+ function $keypress_handler$$($e$jscomp$37$$) {
4471
+ $serial$$.enabled && ($serial$$.send_char($e$jscomp$37$$.which), $e$jscomp$37$$.preventDefault());
4460
4472
  }
4461
- function $keydown_handler$jscomp$1$$($e$jscomp$37$$) {
4462
- var $chr$jscomp$10$$ = $e$jscomp$37$$.which;
4463
- 8 === $chr$jscomp$10$$ ? ($serial$$.send_char(127), $e$jscomp$37$$.preventDefault()) : 9 === $chr$jscomp$10$$ && ($serial$$.send_char(9), $e$jscomp$37$$.preventDefault());
4473
+ function $keydown_handler$jscomp$1$$($e$jscomp$38$$) {
4474
+ var $chr$jscomp$10$$ = $e$jscomp$38$$.which;
4475
+ 8 === $chr$jscomp$10$$ ? ($serial$$.send_char(127), $e$jscomp$38$$.preventDefault()) : 9 === $chr$jscomp$10$$ && ($serial$$.send_char(9), $e$jscomp$38$$.preventDefault());
4464
4476
  }
4465
- function $paste_handler$$($e$jscomp$38$$) {
4477
+ function $paste_handler$$($e$jscomp$39$$) {
4466
4478
  if ($serial$$.enabled) {
4467
- for (var $data$jscomp$143$$ = $e$jscomp$38$$.clipboardData.getData("text/plain"), $i$jscomp$58$$ = 0; $i$jscomp$58$$ < $data$jscomp$143$$.length; $i$jscomp$58$$++) {
4479
+ 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$$++) {
4468
4480
  $serial$$.send_char($data$jscomp$143$$.charCodeAt($i$jscomp$58$$));
4469
4481
  }
4470
- $e$jscomp$38$$.preventDefault();
4482
+ $e$jscomp$39$$.preventDefault();
4471
4483
  }
4472
4484
  }
4473
- function $window_click_handler$$($e$jscomp$39$$) {
4474
- $e$jscomp$39$$.target !== $element$jscomp$8$$ && $element$jscomp$8$$.blur();
4485
+ function $window_click_handler$$($e$jscomp$40$$) {
4486
+ $e$jscomp$40$$.target !== $element$jscomp$8$$ && $element$jscomp$8$$.blur();
4475
4487
  }
4476
4488
  var $serial$$ = this;
4477
4489
  this.enabled = !0;
@@ -4794,7 +4806,7 @@ $Modem$$module$src$browser$modem$$.prototype.cli_exec_dial = function($dial_addr
4794
4806
  $dbg_log$$module$src$log$$(`connecting "${$offset$jscomp$50_ws_address$jscomp$1$$}"`, 33554432);
4795
4807
  try {
4796
4808
  this.socket = new WebSocket($offset$jscomp$50_ws_address$jscomp$1$$);
4797
- } catch ($e$jscomp$40$$) {
4809
+ } catch ($e$jscomp$41$$) {
4798
4810
  $dbg_log$$module$src$log$$(`error: WebSocket constructor failed using address "${$offset$jscomp$50_ws_address$jscomp$1$$}"`, 33554432);
4799
4811
  this.cli_write_response_code(4);
4800
4812
  return;
@@ -5980,8 +5992,8 @@ function $V86$$module$src$browser$starter$$($options$jscomp$45$$) {
5980
5992
  $resolve$jscomp$2$$($instance$jscomp$1$$.exports);
5981
5993
  }, });
5982
5994
  }
5983
- }, progress:$e$jscomp$41$$ => {
5984
- this.emulator_bus.send("download-progress", {file_index:0, file_count:1, file_name:$v86_bin$$, lengthComputable:$e$jscomp$41$$.lengthComputable, total:$e$jscomp$41$$.total, loaded:$e$jscomp$41$$.loaded, });
5995
+ }, progress:$e$jscomp$42$$ => {
5996
+ 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, });
5985
5997
  }});
5986
5998
  }));
5987
5999
  $wasm_fn$$({env:$bus$jscomp$19_wasm_shared_funcs$$}).then($emulator_exports$$ => {
@@ -6110,9 +6122,9 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
6110
6122
  $options$jscomp$46$$.disable_keyboard || (this.keyboard_adapter = new $KeyboardAdapter$$module$src$browser$keyboard$$(this.bus));
6111
6123
  $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));
6112
6124
  this.absolute_pointer_enabled = !1;
6113
- this.bus.register("vmware-absolute-mouse", function($enabled$jscomp$4$$) {
6114
- $enabled$jscomp$4$$ && !this.absolute_pointer_enabled && "undefined" !== typeof document && document.pointerLockElement && document.exitPointerLock();
6115
- this.absolute_pointer_enabled = $enabled$jscomp$4$$;
6125
+ this.bus.register("vmware-absolute-mouse", function($enabled$jscomp$5$$) {
6126
+ $enabled$jscomp$5$$ && !this.absolute_pointer_enabled && "undefined" !== typeof document && document.pointerLockElement && document.exitPointerLock();
6127
+ this.absolute_pointer_enabled = $enabled$jscomp$5$$;
6116
6128
  }, this);
6117
6129
  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$$) :
6118
6130
  new $DummyScreenAdapter$$module$src$browser$dummy_screen$$($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$);
@@ -6190,8 +6202,8 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
6190
6202
  $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$$)));
6191
6203
  $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$$));
6192
6204
  $cont$$($index$jscomp$83$$ + 1);
6193
- }.bind(this), progress:function($e$jscomp$43$$) {
6194
- 200 === $e$jscomp$43$$.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$43$$.lengthComputable, total:$e$jscomp$43$$.total || $f$jscomp$1$$.size, loaded:$e$jscomp$43$$.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$43$$.target, });
6205
+ }.bind(this), progress:function($e$jscomp$44$$) {
6206
+ 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, });
6195
6207
  }, as_json:$f$jscomp$1$$.as_json, });
6196
6208
  }
6197
6209
  }.bind(this);
@@ -6213,15 +6225,15 @@ $V86$$module$src$browser$starter$$.prototype.zstd_decompress_worker = async func
6213
6225
  if (!this.zstd_worker) {
6214
6226
  const $url$jscomp$26$$ = URL.createObjectURL(new Blob(["(" + function() {
6215
6227
  let $wasm$$;
6216
- globalThis.onmessage = function($e$jscomp$44_exports$jscomp$1$$) {
6228
+ globalThis.onmessage = function($e$jscomp$45_exports$jscomp$1$$) {
6217
6229
  if ($wasm$$) {
6218
- var {src:$src$jscomp$6$$, decompressed_size:$decompressed_size$jscomp$2$$, id:$id$jscomp$21$$} = $e$jscomp$44_exports$jscomp$1$$.data;
6219
- $e$jscomp$44_exports$jscomp$1$$ = $wasm$$.exports;
6220
- var $env$jscomp$1_zstd_context$$ = $e$jscomp$44_exports$jscomp$1$$.zstd_create_ctx($src$jscomp$6$$.length);
6221
- (new Uint8Array($e$jscomp$44_exports$jscomp$1$$.memory.buffer)).set($src$jscomp$6$$, $e$jscomp$44_exports$jscomp$1$$.zstd_get_src_ptr($env$jscomp$1_zstd_context$$));
6222
- var $ptr$jscomp$6$$ = $e$jscomp$44_exports$jscomp$1$$.zstd_read($env$jscomp$1_zstd_context$$, $decompressed_size$jscomp$2$$), $result$jscomp$11$$ = $e$jscomp$44_exports$jscomp$1$$.memory.buffer.slice($ptr$jscomp$6$$, $ptr$jscomp$6$$ + $decompressed_size$jscomp$2$$);
6223
- $e$jscomp$44_exports$jscomp$1$$.zstd_read_free($ptr$jscomp$6$$, $decompressed_size$jscomp$2$$);
6224
- $e$jscomp$44_exports$jscomp$1$$.zstd_free_ctx($env$jscomp$1_zstd_context$$);
6230
+ var {src:$src$jscomp$6$$, decompressed_size:$decompressed_size$jscomp$2$$, id:$id$jscomp$21$$} = $e$jscomp$45_exports$jscomp$1$$.data;
6231
+ $e$jscomp$45_exports$jscomp$1$$ = $wasm$$.exports;
6232
+ var $env$jscomp$1_zstd_context$$ = $e$jscomp$45_exports$jscomp$1$$.zstd_create_ctx($src$jscomp$6$$.length);
6233
+ (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$$));
6234
+ 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$$);
6235
+ $e$jscomp$45_exports$jscomp$1$$.zstd_read_free($ptr$jscomp$6$$, $decompressed_size$jscomp$2$$);
6236
+ $e$jscomp$45_exports$jscomp$1$$.zstd_free_ctx($env$jscomp$1_zstd_context$$);
6225
6237
  postMessage({result:$result$jscomp$11$$, id:$id$jscomp$21$$}, [$result$jscomp$11$$]);
6226
6238
  } else {
6227
6239
  $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$$)])),
@@ -6229,7 +6241,7 @@ $V86$$module$src$browser$starter$$.prototype.zstd_decompress_worker = async func
6229
6241
  throw Error("zstd worker aborted");
6230
6242
  }, $env$jscomp$1_zstd_context$$.log_from_wasm = $env$jscomp$1_zstd_context$$.console_log_from_wasm = ($off$$, $len$jscomp$25$$) => {
6231
6243
  console.log($read_sized_string_from_mem$$module$src$lib$$($wasm$$.exports.memory.buffer, $off$$, $len$jscomp$25$$));
6232
- }, $env$jscomp$1_zstd_context$$.dbg_trace_from_wasm = () => console.trace(), $wasm$$ = new WebAssembly.Instance(new WebAssembly.Module($e$jscomp$44_exports$jscomp$1$$.data), {env:$env$jscomp$1_zstd_context$$});
6244
+ }, $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$$});
6233
6245
  }
6234
6246
  };
6235
6247
  }.toString() + ")()"], {type:"text/javascript"}));
@@ -6238,8 +6250,8 @@ $V86$$module$src$browser$starter$$.prototype.zstd_decompress_worker = async func
6238
6250
  this.zstd_worker.postMessage(this.wasm_source, [this.wasm_source]);
6239
6251
  }
6240
6252
  return new Promise($resolve$jscomp$3$$ => {
6241
- const $id$jscomp$22$$ = this.zstd_worker_request_id++, $done$jscomp$5$$ = async $e$jscomp$45$$ => {
6242
- $e$jscomp$45$$.data.id === $id$jscomp$22$$ && (this.zstd_worker.removeEventListener("message", $done$jscomp$5$$), $dbg_assert$$module$src$log$$($decompressed_size$jscomp$1$$ === $e$jscomp$45$$.data.result.byteLength), $resolve$jscomp$3$$($e$jscomp$45$$.data.result));
6253
+ const $id$jscomp$22$$ = this.zstd_worker_request_id++, $done$jscomp$5$$ = async $e$jscomp$46$$ => {
6254
+ $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));
6243
6255
  };
6244
6256
  this.zstd_worker.addEventListener("message", $done$jscomp$5$$);
6245
6257
  this.zstd_worker.postMessage({src:$src$jscomp$5$$, decompressed_size:$decompressed_size$jscomp$1$$, id:$id$jscomp$22$$}, [$src$jscomp$5$$.buffer]);
@@ -6396,7 +6408,7 @@ $V86$$module$src$browser$starter$$.prototype.screen_go_fullscreen = function() {
6396
6408
  $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());
6397
6409
  try {
6398
6410
  navigator.keyboard.lock();
6399
- } catch ($e$jscomp$46$$) {
6411
+ } catch ($e$jscomp$47$$) {
6400
6412
  }
6401
6413
  this.lock_mouse();
6402
6414
  }
@@ -6406,16 +6418,16 @@ $V86$$module$src$browser$starter$$.prototype.lock_mouse = async function() {
6406
6418
  const $elem$jscomp$3$$ = document.body;
6407
6419
  try {
6408
6420
  await $elem$jscomp$3$$.requestPointerLock({unadjustedMovement:!0, });
6409
- } catch ($e$jscomp$47$$) {
6421
+ } catch ($e$jscomp$48$$) {
6410
6422
  await $elem$jscomp$3$$.requestPointerLock();
6411
6423
  }
6412
6424
  };
6413
- $V86$$module$src$browser$starter$$.prototype.mouse_set_enabled = function($enabled$jscomp$5$$) {
6414
- this.mouse_adapter && (this.mouse_adapter.emu_enabled = $enabled$jscomp$5$$);
6425
+ $V86$$module$src$browser$starter$$.prototype.mouse_set_enabled = function($enabled$jscomp$6$$) {
6426
+ this.mouse_adapter && (this.mouse_adapter.emu_enabled = $enabled$jscomp$6$$, this.mouse_adapter.update_cursor());
6415
6427
  };
6416
6428
  $V86$$module$src$browser$starter$$.prototype.mouse_set_status = $V86$$module$src$browser$starter$$.prototype.mouse_set_enabled;
6417
- $V86$$module$src$browser$starter$$.prototype.keyboard_set_enabled = function($enabled$jscomp$6$$) {
6418
- this.keyboard_adapter && (this.keyboard_adapter.emu_enabled = $enabled$jscomp$6$$);
6429
+ $V86$$module$src$browser$starter$$.prototype.keyboard_set_enabled = function($enabled$jscomp$7$$) {
6430
+ this.keyboard_adapter && (this.keyboard_adapter.emu_enabled = $enabled$jscomp$7$$);
6419
6431
  };
6420
6432
  $V86$$module$src$browser$starter$$.prototype.keyboard_set_status = $V86$$module$src$browser$starter$$.prototype.keyboard_set_enabled;
6421
6433
  $V86$$module$src$browser$starter$$.prototype.serial0_send = function($data$jscomp$163$$) {
@@ -6643,16 +6655,16 @@ if ("undefined" !== typeof process) {
6643
6655
  if ("undefined" !== typeof Worker) {
6644
6656
  function $the_worker$jscomp$1$$() {
6645
6657
  let $timeout$jscomp$4$$;
6646
- globalThis.onmessage = function($e$jscomp$48$$) {
6647
- const $t$jscomp$9$$ = $e$jscomp$48$$.data.t;
6658
+ globalThis.onmessage = function($e$jscomp$49$$) {
6659
+ const $t$jscomp$9$$ = $e$jscomp$49$$.data.t;
6648
6660
  $timeout$jscomp$4$$ = $timeout$jscomp$4$$ && clearTimeout($timeout$jscomp$4$$);
6649
- 1 > $t$jscomp$9$$ ? postMessage($e$jscomp$48$$.data.tick) : $timeout$jscomp$4$$ = setTimeout(() => postMessage($e$jscomp$48$$.data.tick), $t$jscomp$9$$);
6661
+ 1 > $t$jscomp$9$$ ? postMessage($e$jscomp$49$$.data.tick) : $timeout$jscomp$4$$ = setTimeout(() => postMessage($e$jscomp$49$$.data.tick), $t$jscomp$9$$);
6650
6662
  };
6651
6663
  }
6652
6664
  $v86$$module$src$main$$.prototype.register_yield = function() {
6653
6665
  const $url$jscomp$27$$ = URL.createObjectURL(new Blob(["(" + $the_worker$jscomp$1$$.toString() + ")()"], {type:"text/javascript"}));
6654
6666
  this.worker = new Worker($url$jscomp$27$$);
6655
- this.worker.onmessage = $e$jscomp$49$$ => this.yield_callback($e$jscomp$49$$.data);
6667
+ this.worker.onmessage = $e$jscomp$50$$ => this.yield_callback($e$jscomp$50$$.data);
6656
6668
  URL.revokeObjectURL($url$jscomp$27$$);
6657
6669
  };
6658
6670
  $v86$$module$src$main$$.prototype.yield = function($t$jscomp$10$$, $tick$jscomp$6$$) {
@@ -12007,10 +12019,10 @@ $CPU$$module$src$cpu$$.prototype.codegen_finalize = function($wasm_table_index$j
12007
12019
  this.wm.wasm_table.set($wasm_table_index$jscomp$2$$ + 1024, $result$jscomp$26$$.instance.exports.f);
12008
12020
  this.codegen_finalize_finished($wasm_table_index$jscomp$2$$, $start$jscomp$45$$, $state_flags$jscomp$1$$);
12009
12021
  this.test_hook_did_finalize_wasm && this.test_hook_did_finalize_wasm($code$jscomp$10$$);
12010
- }).catch($e$jscomp$50$$ => {
12011
- console.log($e$jscomp$50$$);
12022
+ }).catch($e$jscomp$51$$ => {
12023
+ console.log($e$jscomp$51$$);
12012
12024
  debugger;
12013
- throw $e$jscomp$50$$;
12025
+ throw $e$jscomp$51$$;
12014
12026
  });
12015
12027
  };
12016
12028
  $CPU$$module$src$cpu$$.prototype.log_uncompiled_code = function() {
@@ -12175,7 +12187,7 @@ $CPU$$module$src$cpu$$.prototype.debug_dump_code = function($is_32$jscomp$1$$, $
12175
12187
  this.capstone_decoder[+$is_32$jscomp$1$$].disasm($buffer$jscomp$66$$, $start$jscomp$51$$).forEach(function($instr$$) {
12176
12188
  $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);
12177
12189
  }), $dbg_log$$module$src$log$$("");
12178
- } catch ($e$jscomp$51$$) {
12190
+ } catch ($e$jscomp$52$$) {
12179
12191
  $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(" "));
12180
12192
  }
12181
12193
  };
@@ -12191,8 +12203,8 @@ $CPU$$module$src$cpu$$.prototype.dump_wasm = function($buffer$jscomp$67$$) {
12191
12203
  $module$jscomp$2$$.applyNames();
12192
12204
  const $result$jscomp$27$$ = $module$jscomp$2$$.toText({foldExprs:!0, inlineExport:!0});
12193
12205
  $dbg_log$$module$src$log$$($result$jscomp$27$$);
12194
- } catch ($e$jscomp$52$$) {
12195
- $dump_file$$module$src$lib$$($buffer$jscomp$67$$, "failed.wasm"), console.log($e$jscomp$52$$.toString());
12206
+ } catch ($e$jscomp$53$$) {
12207
+ $dump_file$$module$src$lib$$($buffer$jscomp$67$$, "failed.wasm"), console.log($e$jscomp$53$$.toString());
12196
12208
  } finally {
12197
12209
  $module$jscomp$2$$ && $module$jscomp$2$$.destroy();
12198
12210
  }
@@ -13273,10 +13285,10 @@ $Virtio9pProxy$$module$lib$9p$$.prototype.set_state = function($state$jscomp$73$
13273
13285
  $Virtio9pProxy$$module$lib$9p$$.prototype.reset = function() {
13274
13286
  this.virtio.reset();
13275
13287
  };
13276
- $Virtio9pProxy$$module$lib$9p$$.prototype.handle_message = function($e$jscomp$53_replybuf$jscomp$1$$) {
13277
- $e$jscomp$53_replybuf$jscomp$1$$ = new Uint8Array($e$jscomp$53_replybuf$jscomp$1$$.data);
13278
- const $replytag$jscomp$1$$ = $Unmarshall$$module$lib$marshall$$(["w", "b", "h"], $e$jscomp$53_replybuf$jscomp$1$$, {offset:0})[2], $bufchain$jscomp$25$$ = this.tag_bufchain.get($replytag$jscomp$1$$);
13279
- $bufchain$jscomp$25$$ ? ($bufchain$jscomp$25$$.set_next_blob($e$jscomp$53_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$$);
13288
+ $Virtio9pProxy$$module$lib$9p$$.prototype.handle_message = function($e$jscomp$54_replybuf$jscomp$1$$) {
13289
+ $e$jscomp$54_replybuf$jscomp$1$$ = new Uint8Array($e$jscomp$54_replybuf$jscomp$1$$.data);
13290
+ 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$$);
13291
+ $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$$);
13280
13292
  };
13281
13293
  $Virtio9pProxy$$module$lib$9p$$.prototype.handle_close = function() {
13282
13294
  this.destroyed || (this.connect(), setTimeout(this.connect.bind(this), this.reconnect_interval));
@@ -13306,8 +13318,8 @@ $Virtio9pProxy$$module$lib$9p$$.prototype.connect = function() {
13306
13318
  this.last_connect_attempt = Date.now();
13307
13319
  try {
13308
13320
  this.socket = new WebSocket(this.url);
13309
- } catch ($e$jscomp$57$$) {
13310
- console.error($e$jscomp$57$$);
13321
+ } catch ($e$jscomp$58$$) {
13322
+ console.error($e$jscomp$58$$);
13311
13323
  return;
13312
13324
  }
13313
13325
  this.socket.binaryType = "arraybuffer";