v86 0.5.366 → 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.
@@ -495,6 +495,9 @@ function $ScreenAdapter$$module$src$browser$screen$$($options$jscomp$36$$, $scre
495
495
  $paused$$ = !1;
496
496
  $cursor_element$$.classList.add("blinking-cursor");
497
497
  };
498
+ this.clear_text_state = function() {
499
+ $font_page_b$$ = $font_page_a$$ = $text_mode_height$$ = $text_mode_width$$ = $font_height$$ = $font_width$$ = null;
500
+ };
498
501
  this.set_mode = function($graphical$$) {
499
502
  $mode$jscomp$15$$ = $graphical$$ ? 1 : $options$jscomp$36$$.use_graphical_text ? 2 : 0;
500
503
  0 === $mode$jscomp$15$$ ? ($text_screen$$.style.display = "block", $graphic_screen$$.style.display = "none") : ($text_screen$$.style.display = "none", $graphic_screen$$.style.display = "block", 2 === $mode$jscomp$15$$ && $changed_rows$$ && $changed_rows$$.fill(1));
@@ -523,7 +526,7 @@ function $ScreenAdapter$$module$src$browser$screen$$($options$jscomp$36$$, $scre
523
526
  };
524
527
  this.set_size_text = function($cols_i$jscomp$6$$, $rows$$) {
525
528
  if ($cols_i$jscomp$6$$ !== $text_mode_width$$ || $rows$$ !== $text_mode_height$$) {
526
- if ($changed_rows$$ = new Int8Array($rows$$), $text_mode_data$$ = new Int32Array($cols_i$jscomp$6$$ * $rows$$ * 4), $text_mode_width$$ = $cols_i$jscomp$6$$, $text_mode_height$$ = $rows$$, 0 === $mode$jscomp$15$$) {
529
+ if ($changed_rows$$ = new Int8Array($rows$$), $changed_rows$$.fill(1), $text_mode_data$$ = new Int32Array($cols_i$jscomp$6$$ * $rows$$ * 4), $text_mode_width$$ = $cols_i$jscomp$6$$, $text_mode_height$$ = $rows$$, 0 === $mode$jscomp$15$$) {
527
530
  for (; $text_screen$$.childNodes.length > $rows$$;) {
528
531
  $text_screen$$.removeChild($text_screen$$.firstChild);
529
532
  }
@@ -4261,66 +4264,75 @@ function $MouseAdapter$$module$src$browser$mouse$$($bus$jscomp$11$$, $screen_con
4261
4264
  function $pointerlockchange_handler$$() {
4262
4265
  $mouse$$.bus.send("mouse-pointer-lock", !!document.pointerLockElement);
4263
4266
  }
4264
- 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$$) {
4265
4271
  if (!$mouse$$.enabled || !$mouse$$.emu_enabled) {
4266
4272
  return !1;
4267
4273
  }
4268
4274
  var $parent$jscomp$5$$ = $screen_container$jscomp$1$$ || document.body, $JSCompiler_temp$jscomp$280$$;
4269
4275
  if (!($JSCompiler_temp$jscomp$280$$ = document.pointerLockElement)) {
4270
4276
  a: {
4271
- for ($child$jscomp$inline_356_e$jscomp$27$$ = $child$jscomp$inline_356_e$jscomp$27$$.target; $child$jscomp$inline_356_e$jscomp$27$$.parentNode;) {
4272
- 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$$) {
4273
4279
  $JSCompiler_temp$jscomp$280$$ = !0;
4274
4280
  break a;
4275
4281
  }
4276
- $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;
4277
4283
  }
4278
4284
  $JSCompiler_temp$jscomp$280$$ = !1;
4279
4285
  }
4280
4286
  }
4281
4287
  return $JSCompiler_temp$jscomp$280$$;
4282
4288
  }
4283
- function $touch_start_handler$$($e$jscomp$28_touch_touches$jscomp$2$$) {
4284
- $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);
4285
4291
  }
4286
4292
  function $touch_end_handler$$() {
4287
4293
  if ($left_down$$ || $middle_down$$ || $right_down$$) {
4288
4294
  $mouse$$.bus.send("mouse-click", [!1, !1, !1]), $left_down$$ = $middle_down$$ = $right_down$$ = !1;
4289
4295
  }
4290
4296
  }
4291
- function $mousemove_handler$$($e$jscomp$30$$) {
4292
- if ($mouse$$.bus && $may_handle$jscomp$1$$($e$jscomp$30$$) && $mouse$$.is_running) {
4293
- var $delta_x$$ = 0, $delta_y$$ = 0, $touch$jscomp$1_touches$jscomp$3$$ = $e$jscomp$30$$.changedTouches;
4294
- $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" ===
4295
- 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$$,
4296
- $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);
4297
4303
  $mouse$$.bus.send("mouse-delta", [1 * $delta_x$$, -(1 * $delta_y$$)]);
4298
- $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]);
4299
4305
  }
4300
4306
  }
4301
- function $mousedown_handler$$($e$jscomp$31$$) {
4302
- $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);
4303
4309
  }
4304
- function $mouseup_handler$$($e$jscomp$32$$) {
4305
- $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);
4306
4312
  }
4307
- function $click_event$$($e$jscomp$33$$, $down$$) {
4308
- $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());
4309
4315
  }
4310
- function $mousewheel_handler$$($e$jscomp$34$$) {
4311
- if ($may_handle$jscomp$1$$($e$jscomp$34$$)) {
4312
- 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;
4313
4319
  0 > $delta_x$jscomp$1$$ ? $delta_x$jscomp$1$$ = -1 : 0 < $delta_x$jscomp$1$$ && ($delta_x$jscomp$1$$ = 1);
4314
4320
  $mouse$$.bus.send("mouse-wheel", [$delta_x$jscomp$1$$, 0]);
4315
- $e$jscomp$34$$.preventDefault();
4321
+ $e$jscomp$35$$.preventDefault();
4316
4322
  }
4317
4323
  }
4318
4324
  var $left_down$$ = !1, $right_down$$ = !1, $middle_down$$ = !1, $last_x$$ = 0, $last_y$$ = 0, $mouse$$ = this;
4319
4325
  this.enabled = !1;
4320
4326
  this.emu_enabled = !0;
4327
+ this.absolute_mouse = !1;
4321
4328
  this.bus = $bus$jscomp$11$$;
4322
4329
  this.bus.register("mouse-enable", function($enabled$jscomp$3$$) {
4323
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();
4324
4336
  }, this);
4325
4337
  this.is_running = !1;
4326
4338
  this.bus.register("emulator-stopped", function() {
@@ -4329,13 +4341,16 @@ function $MouseAdapter$$module$src$browser$mouse$$($bus$jscomp$11$$, $screen_con
4329
4341
  this.bus.register("emulator-started", function() {
4330
4342
  this.is_running = !0;
4331
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
+ };
4332
4347
  this.destroy = function() {
4333
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}),
4334
- document.removeEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
4349
+ window.removeEventListener("contextmenu", $contextmenu_handler$$, !1), document.removeEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
4335
4350
  };
4336
4351
  this.init = function() {
4337
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}),
4338
- document.addEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
4353
+ window.addEventListener("contextmenu", $contextmenu_handler$$, !1), document.addEventListener("pointerlockchange", $pointerlockchange_handler$$, !1));
4339
4354
  };
4340
4355
  this.init();
4341
4356
  }
@@ -4352,6 +4367,9 @@ function $DummyScreenAdapter$$module$src$browser$dummy_screen$$($options$jscomp$
4352
4367
  };
4353
4368
  this.continue = function() {
4354
4369
  };
4370
+ this.clear_text_state = function() {
4371
+ $text_mode_height$jscomp$1$$ = $text_mode_width$jscomp$1$$ = null;
4372
+ };
4355
4373
  this.set_mode = function() {
4356
4374
  };
4357
4375
  this.set_font_bitmap = function() {
@@ -4449,23 +4467,23 @@ function $ANSIScreenAdapter$$module$src$browser$ansi_screen$$($options$jscomp$43
4449
4467
  this.set_size_text(80, 25);
4450
4468
  }
4451
4469
  function $TextAreaAdapter$$module$src$browser$serial$$($element$jscomp$8$$) {
4452
- function $keypress_handler$$($e$jscomp$36$$) {
4453
- $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());
4454
4472
  }
4455
- function $keydown_handler$jscomp$1$$($e$jscomp$37$$) {
4456
- var $chr$jscomp$10$$ = $e$jscomp$37$$.which;
4457
- 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());
4458
4476
  }
4459
- function $paste_handler$$($e$jscomp$38$$) {
4477
+ function $paste_handler$$($e$jscomp$39$$) {
4460
4478
  if ($serial$$.enabled) {
4461
- 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$$++) {
4462
4480
  $serial$$.send_char($data$jscomp$143$$.charCodeAt($i$jscomp$58$$));
4463
4481
  }
4464
- $e$jscomp$38$$.preventDefault();
4482
+ $e$jscomp$39$$.preventDefault();
4465
4483
  }
4466
4484
  }
4467
- function $window_click_handler$$($e$jscomp$39$$) {
4468
- $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();
4469
4487
  }
4470
4488
  var $serial$$ = this;
4471
4489
  this.enabled = !0;
@@ -4788,7 +4806,7 @@ $Modem$$module$src$browser$modem$$.prototype.cli_exec_dial = function($dial_addr
4788
4806
  $dbg_log$$module$src$log$$(`connecting "${$offset$jscomp$50_ws_address$jscomp$1$$}"`, 33554432);
4789
4807
  try {
4790
4808
  this.socket = new WebSocket($offset$jscomp$50_ws_address$jscomp$1$$);
4791
- } catch ($e$jscomp$40$$) {
4809
+ } catch ($e$jscomp$41$$) {
4792
4810
  $dbg_log$$module$src$log$$(`error: WebSocket constructor failed using address "${$offset$jscomp$50_ws_address$jscomp$1$$}"`, 33554432);
4793
4811
  this.cli_write_response_code(4);
4794
4812
  return;
@@ -5974,8 +5992,8 @@ function $V86$$module$src$browser$starter$$($options$jscomp$45$$) {
5974
5992
  $resolve$jscomp$2$$($instance$jscomp$1$$.exports);
5975
5993
  }, });
5976
5994
  }
5977
- }, progress:$e$jscomp$41$$ => {
5978
- 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, });
5979
5997
  }});
5980
5998
  }));
5981
5999
  $wasm_fn$$({env:$bus$jscomp$19_wasm_shared_funcs$$}).then($emulator_exports$$ => {
@@ -6104,9 +6122,9 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
6104
6122
  $options$jscomp$46$$.disable_keyboard || (this.keyboard_adapter = new $KeyboardAdapter$$module$src$browser$keyboard$$(this.bus));
6105
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));
6106
6124
  this.absolute_pointer_enabled = !1;
6107
- this.bus.register("vmware-absolute-mouse", function($enabled$jscomp$4$$) {
6108
- $enabled$jscomp$4$$ && !this.absolute_pointer_enabled && "undefined" !== typeof document && document.pointerLockElement && document.exitPointerLock();
6109
- 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$$;
6110
6128
  }, this);
6111
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$$) :
6112
6130
  new $DummyScreenAdapter$$module$src$browser$dummy_screen$$($add_file_boot_order_fs_url_relay_url_screen_options_virtio_console_settings$$);
@@ -6184,8 +6202,8 @@ $V86$$module$src$browser$starter$$.prototype.continue_init = async function($emu
6184
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$$)));
6185
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$$));
6186
6204
  $cont$$($index$jscomp$83$$ + 1);
6187
- }.bind(this), progress:function($e$jscomp$43$$) {
6188
- 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, });
6189
6207
  }, as_json:$f$jscomp$1$$.as_json, });
6190
6208
  }
6191
6209
  }.bind(this);
@@ -6207,15 +6225,15 @@ $V86$$module$src$browser$starter$$.prototype.zstd_decompress_worker = async func
6207
6225
  if (!this.zstd_worker) {
6208
6226
  const $url$jscomp$26$$ = URL.createObjectURL(new Blob(["(" + function() {
6209
6227
  let $wasm$$;
6210
- globalThis.onmessage = function($e$jscomp$44_exports$jscomp$1$$) {
6228
+ globalThis.onmessage = function($e$jscomp$45_exports$jscomp$1$$) {
6211
6229
  if ($wasm$$) {
6212
- var {src:$src$jscomp$6$$, decompressed_size:$decompressed_size$jscomp$2$$, id:$id$jscomp$21$$} = $e$jscomp$44_exports$jscomp$1$$.data;
6213
- $e$jscomp$44_exports$jscomp$1$$ = $wasm$$.exports;
6214
- var $env$jscomp$1_zstd_context$$ = $e$jscomp$44_exports$jscomp$1$$.zstd_create_ctx($src$jscomp$6$$.length);
6215
- (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$$));
6216
- 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$$);
6217
- $e$jscomp$44_exports$jscomp$1$$.zstd_read_free($ptr$jscomp$6$$, $decompressed_size$jscomp$2$$);
6218
- $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$$);
6219
6237
  postMessage({result:$result$jscomp$11$$, id:$id$jscomp$21$$}, [$result$jscomp$11$$]);
6220
6238
  } else {
6221
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$$)])),
@@ -6223,7 +6241,7 @@ $V86$$module$src$browser$starter$$.prototype.zstd_decompress_worker = async func
6223
6241
  throw Error("zstd worker aborted");
6224
6242
  }, $env$jscomp$1_zstd_context$$.log_from_wasm = $env$jscomp$1_zstd_context$$.console_log_from_wasm = ($off$$, $len$jscomp$25$$) => {
6225
6243
  console.log($read_sized_string_from_mem$$module$src$lib$$($wasm$$.exports.memory.buffer, $off$$, $len$jscomp$25$$));
6226
- }, $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$$});
6227
6245
  }
6228
6246
  };
6229
6247
  }.toString() + ")()"], {type:"text/javascript"}));
@@ -6232,8 +6250,8 @@ $V86$$module$src$browser$starter$$.prototype.zstd_decompress_worker = async func
6232
6250
  this.zstd_worker.postMessage(this.wasm_source, [this.wasm_source]);
6233
6251
  }
6234
6252
  return new Promise($resolve$jscomp$3$$ => {
6235
- const $id$jscomp$22$$ = this.zstd_worker_request_id++, $done$jscomp$5$$ = async $e$jscomp$45$$ => {
6236
- $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));
6237
6255
  };
6238
6256
  this.zstd_worker.addEventListener("message", $done$jscomp$5$$);
6239
6257
  this.zstd_worker.postMessage({src:$src$jscomp$5$$, decompressed_size:$decompressed_size$jscomp$1$$, id:$id$jscomp$22$$}, [$src$jscomp$5$$.buffer]);
@@ -6390,7 +6408,7 @@ $V86$$module$src$browser$starter$$.prototype.screen_go_fullscreen = function() {
6390
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());
6391
6409
  try {
6392
6410
  navigator.keyboard.lock();
6393
- } catch ($e$jscomp$46$$) {
6411
+ } catch ($e$jscomp$47$$) {
6394
6412
  }
6395
6413
  this.lock_mouse();
6396
6414
  }
@@ -6400,16 +6418,16 @@ $V86$$module$src$browser$starter$$.prototype.lock_mouse = async function() {
6400
6418
  const $elem$jscomp$3$$ = document.body;
6401
6419
  try {
6402
6420
  await $elem$jscomp$3$$.requestPointerLock({unadjustedMovement:!0, });
6403
- } catch ($e$jscomp$47$$) {
6421
+ } catch ($e$jscomp$48$$) {
6404
6422
  await $elem$jscomp$3$$.requestPointerLock();
6405
6423
  }
6406
6424
  };
6407
- $V86$$module$src$browser$starter$$.prototype.mouse_set_enabled = function($enabled$jscomp$5$$) {
6408
- 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());
6409
6427
  };
6410
6428
  $V86$$module$src$browser$starter$$.prototype.mouse_set_status = $V86$$module$src$browser$starter$$.prototype.mouse_set_enabled;
6411
- $V86$$module$src$browser$starter$$.prototype.keyboard_set_enabled = function($enabled$jscomp$6$$) {
6412
- 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$$);
6413
6431
  };
6414
6432
  $V86$$module$src$browser$starter$$.prototype.keyboard_set_status = $V86$$module$src$browser$starter$$.prototype.keyboard_set_enabled;
6415
6433
  $V86$$module$src$browser$starter$$.prototype.serial0_send = function($data$jscomp$163$$) {
@@ -6637,16 +6655,16 @@ if ("undefined" !== typeof process) {
6637
6655
  if ("undefined" !== typeof Worker) {
6638
6656
  function $the_worker$jscomp$1$$() {
6639
6657
  let $timeout$jscomp$4$$;
6640
- globalThis.onmessage = function($e$jscomp$48$$) {
6641
- 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;
6642
6660
  $timeout$jscomp$4$$ = $timeout$jscomp$4$$ && clearTimeout($timeout$jscomp$4$$);
6643
- 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$$);
6644
6662
  };
6645
6663
  }
6646
6664
  $v86$$module$src$main$$.prototype.register_yield = function() {
6647
6665
  const $url$jscomp$27$$ = URL.createObjectURL(new Blob(["(" + $the_worker$jscomp$1$$.toString() + ")()"], {type:"text/javascript"}));
6648
6666
  this.worker = new Worker($url$jscomp$27$$);
6649
- 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);
6650
6668
  URL.revokeObjectURL($url$jscomp$27$$);
6651
6669
  };
6652
6670
  $v86$$module$src$main$$.prototype.yield = function($t$jscomp$10$$, $tick$jscomp$6$$) {
@@ -10062,7 +10080,8 @@ $VGAScreen$$module$src$vga$$.prototype.set_state = function($state$jscomp$54$$)
10062
10080
  this.character_map_select = void 0 === $state$jscomp$54$$[63] ? 0 : $state$jscomp$54$$[63];
10063
10081
  this.font_page_ab_enabled = void 0 === $state$jscomp$54$$[64] ? 0 : $state$jscomp$54$$[64];
10064
10082
  this.screen.set_mode(this.graphical_mode);
10065
- this.graphical_mode ? (this.screen_height = this.screen_width = 0, this.svga_enabled ? (this.set_size_graphical(this.svga_width, this.svga_height, this.svga_width, this.svga_height, this.svga_bpp), this.update_layers()) : (this.update_vga_size(), this.update_layers(), this.complete_replot())) : (this.set_font_bitmap(!0), this.set_size_text(this.max_cols, this.max_rows), this.set_font_page(), this.update_cursor_scanline(), this.update_cursor());
10083
+ this.screen_height = this.screen_width = 0;
10084
+ this.graphical_mode ? this.svga_enabled ? (this.set_size_graphical(this.svga_width, this.svga_height, this.svga_width, this.svga_height, this.svga_bpp), this.update_layers()) : (this.update_vga_size(), this.update_layers(), this.complete_replot()) : (this.screen.clear_text_state(), this.set_font_bitmap(!0), this.set_size_text(this.max_cols, this.max_rows), this.set_font_page(), this.update_cursor_scanline(), this.update_cursor());
10066
10085
  this.complete_redraw();
10067
10086
  };
10068
10087
  $VGAScreen$$module$src$vga$$.prototype.vga_memory_read = function($addr$jscomp$31$$) {
@@ -12000,10 +12019,10 @@ $CPU$$module$src$cpu$$.prototype.codegen_finalize = function($wasm_table_index$j
12000
12019
  this.wm.wasm_table.set($wasm_table_index$jscomp$2$$ + 1024, $result$jscomp$26$$.instance.exports.f);
12001
12020
  this.codegen_finalize_finished($wasm_table_index$jscomp$2$$, $start$jscomp$45$$, $state_flags$jscomp$1$$);
12002
12021
  this.test_hook_did_finalize_wasm && this.test_hook_did_finalize_wasm($code$jscomp$10$$);
12003
- }).catch($e$jscomp$50$$ => {
12004
- console.log($e$jscomp$50$$);
12022
+ }).catch($e$jscomp$51$$ => {
12023
+ console.log($e$jscomp$51$$);
12005
12024
  debugger;
12006
- throw $e$jscomp$50$$;
12025
+ throw $e$jscomp$51$$;
12007
12026
  });
12008
12027
  };
12009
12028
  $CPU$$module$src$cpu$$.prototype.log_uncompiled_code = function() {
@@ -12168,7 +12187,7 @@ $CPU$$module$src$cpu$$.prototype.debug_dump_code = function($is_32$jscomp$1$$, $
12168
12187
  this.capstone_decoder[+$is_32$jscomp$1$$].disasm($buffer$jscomp$66$$, $start$jscomp$51$$).forEach(function($instr$$) {
12169
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);
12170
12189
  }), $dbg_log$$module$src$log$$("");
12171
- } catch ($e$jscomp$51$$) {
12190
+ } catch ($e$jscomp$52$$) {
12172
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(" "));
12173
12192
  }
12174
12193
  };
@@ -12184,8 +12203,8 @@ $CPU$$module$src$cpu$$.prototype.dump_wasm = function($buffer$jscomp$67$$) {
12184
12203
  $module$jscomp$2$$.applyNames();
12185
12204
  const $result$jscomp$27$$ = $module$jscomp$2$$.toText({foldExprs:!0, inlineExport:!0});
12186
12205
  $dbg_log$$module$src$log$$($result$jscomp$27$$);
12187
- } catch ($e$jscomp$52$$) {
12188
- $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());
12189
12208
  } finally {
12190
12209
  $module$jscomp$2$$ && $module$jscomp$2$$.destroy();
12191
12210
  }
@@ -13266,10 +13285,10 @@ $Virtio9pProxy$$module$lib$9p$$.prototype.set_state = function($state$jscomp$73$
13266
13285
  $Virtio9pProxy$$module$lib$9p$$.prototype.reset = function() {
13267
13286
  this.virtio.reset();
13268
13287
  };
13269
- $Virtio9pProxy$$module$lib$9p$$.prototype.handle_message = function($e$jscomp$53_replybuf$jscomp$1$$) {
13270
- $e$jscomp$53_replybuf$jscomp$1$$ = new Uint8Array($e$jscomp$53_replybuf$jscomp$1$$.data);
13271
- 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$$);
13272
- $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$$);
13273
13292
  };
13274
13293
  $Virtio9pProxy$$module$lib$9p$$.prototype.handle_close = function() {
13275
13294
  this.destroyed || (this.connect(), setTimeout(this.connect.bind(this), this.reconnect_interval));
@@ -13299,8 +13318,8 @@ $Virtio9pProxy$$module$lib$9p$$.prototype.connect = function() {
13299
13318
  this.last_connect_attempt = Date.now();
13300
13319
  try {
13301
13320
  this.socket = new WebSocket(this.url);
13302
- } catch ($e$jscomp$57$$) {
13303
- console.error($e$jscomp$57$$);
13321
+ } catch ($e$jscomp$58$$) {
13322
+ console.error($e$jscomp$58$$);
13304
13323
  return;
13305
13324
  }
13306
13325
  this.socket.binaryType = "arraybuffer";