@eveshipfit/ui-ingame 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +25 -8
- package/dist/index.mjs +2501 -866
- package/dist/style.css +271 -3
- package/dist/theme.css +1 -1
- package/package.json +6 -6
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import './style.css';
|
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { createContext, useContext, useEffect, useId, useRef, useState } from "react";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { formatClock, formatDuration, formatNumber, useAttribute, useAttributeTooltip, useBayContents, useBayUsage, useCanFit, useChargeSearch, useChargeTree, useChargedModules, useCharges, useDrag, useDroneRoom, useFighterTubeUsage, useFighterTubes, useFit, useFitHistory, useFitPrice, useFitStore, useHardpoints, useHullTree, useImages, useLocalFits, useMissingSkills, useModuleSearch, useModuleTree, usePlacement, usePreview, useRackUsage, useSde, useShownSnapshot, useSlots, useSnapshot, useStats, useType } from "@eveshipfit/react-hooks";
|
|
5
|
+
import { formatClock, formatDuration, formatNumber, useAttribute, useAttributeTooltip, useBayContents, useBayUsage, useCanFit, useChargeSearch, useChargeTree, useChargedModules, useCharges, useDrag, useDroneRoom, useEngine, useFighterTubeUsage, useFighterTubes, useFit, useFitHistory, useFitPrice, useFitStore, useHardpoints, useHullTree, useImages, useLocalFits, useMissingSkills, useModes, useModuleSearch, useModuleTree, usePersonalFits, usePlacement, usePreview, useRackUsage, useSde, useShownSnapshot, useSlots, useSnapshot, useStats, useType } from "@eveshipfit/react-hooks";
|
|
6
6
|
//#region src/primitives/Dialog/Dialog.module.css
|
|
7
7
|
var Dialog_module_default = {
|
|
8
8
|
"close": "kwi1cG_close",
|
|
@@ -13,7 +13,7 @@ var Dialog_module_default = {
|
|
|
13
13
|
};
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region src/primitives/Dialog/Dialog.tsx
|
|
16
|
-
/** A modal; `onClose` is called when the user closes it, by Escape or the close button. */
|
|
16
|
+
/** A modal that opens on its first field; `onClose` is called when the user closes it, by Escape or the close button. */
|
|
17
17
|
function Dialog(t0) {
|
|
18
18
|
const $ = c(22);
|
|
19
19
|
const { open, title, onClose, children } = t0;
|
|
@@ -25,7 +25,10 @@ function Dialog(t0) {
|
|
|
25
25
|
t1 = () => {
|
|
26
26
|
const element = dialog.current;
|
|
27
27
|
if (element === null) return;
|
|
28
|
-
if (open && !element.open)
|
|
28
|
+
if (open && !element.open) {
|
|
29
|
+
element.showModal();
|
|
30
|
+
element.querySelector("input, textarea")?.focus();
|
|
31
|
+
}
|
|
29
32
|
if (!open && element.open) element.close();
|
|
30
33
|
};
|
|
31
34
|
t2 = [open];
|
|
@@ -357,85 +360,90 @@ function TreeGroup(t0) {
|
|
|
357
360
|
} else t14 = $[33];
|
|
358
361
|
return t14;
|
|
359
362
|
}
|
|
360
|
-
/** Activates on double click, as EVE's own lists do
|
|
363
|
+
/** Activates on double click, as EVE's own lists do, unless `activateOnClick` is set. */
|
|
361
364
|
function TreeLeaf(t0) {
|
|
362
|
-
const $ = c(
|
|
363
|
-
const { label, typeId, title, onActivate, onHover, onDragStart, onDragEnd, after } = t0;
|
|
364
|
-
const
|
|
365
|
-
|
|
365
|
+
const $ = c(24);
|
|
366
|
+
const { label, typeId, title, onActivate, activateOnClick: t1, onHover, onDragStart, onDragEnd, after } = t0;
|
|
367
|
+
const activateOnClick = t1 === void 0 ? false : t1;
|
|
368
|
+
const t2 = onDragStart !== void 0;
|
|
369
|
+
const t3 = activateOnClick ? onActivate : void 0;
|
|
370
|
+
const t4 = activateOnClick ? void 0 : onActivate;
|
|
371
|
+
let t5;
|
|
366
372
|
if ($[0] !== onActivate) {
|
|
367
|
-
|
|
373
|
+
t5 = (event) => {
|
|
368
374
|
if (event.key === "Enter") onActivate?.();
|
|
369
375
|
};
|
|
370
376
|
$[0] = onActivate;
|
|
371
|
-
$[1] =
|
|
372
|
-
} else
|
|
373
|
-
let
|
|
374
|
-
let
|
|
377
|
+
$[1] = t5;
|
|
378
|
+
} else t5 = $[1];
|
|
379
|
+
let t6;
|
|
380
|
+
let t7;
|
|
375
381
|
if ($[2] !== onHover) {
|
|
376
|
-
|
|
377
|
-
|
|
382
|
+
t6 = () => onHover?.(true);
|
|
383
|
+
t7 = () => onHover?.(false);
|
|
378
384
|
$[2] = onHover;
|
|
379
|
-
$[3] =
|
|
380
|
-
$[4] =
|
|
385
|
+
$[3] = t6;
|
|
386
|
+
$[4] = t7;
|
|
381
387
|
} else {
|
|
382
|
-
|
|
383
|
-
|
|
388
|
+
t6 = $[3];
|
|
389
|
+
t7 = $[4];
|
|
384
390
|
}
|
|
385
|
-
let
|
|
391
|
+
let t8;
|
|
386
392
|
if ($[5] !== typeId) {
|
|
387
|
-
|
|
393
|
+
t8 = typeId !== void 0 && /* @__PURE__ */ jsx(RowIcon, { typeId });
|
|
388
394
|
$[5] = typeId;
|
|
389
|
-
$[6] =
|
|
390
|
-
} else
|
|
391
|
-
let
|
|
395
|
+
$[6] = t8;
|
|
396
|
+
} else t8 = $[6];
|
|
397
|
+
let t9;
|
|
392
398
|
if ($[7] !== label) {
|
|
393
|
-
|
|
399
|
+
t9 = /* @__PURE__ */ jsx("span", {
|
|
394
400
|
className: TreeList_module_default.label,
|
|
395
401
|
children: label
|
|
396
402
|
});
|
|
397
403
|
$[7] = label;
|
|
398
|
-
$[8] =
|
|
399
|
-
} else
|
|
400
|
-
let
|
|
401
|
-
if ($[9] !==
|
|
402
|
-
|
|
404
|
+
$[8] = t9;
|
|
405
|
+
} else t9 = $[8];
|
|
406
|
+
let t10;
|
|
407
|
+
if ($[9] !== onDragEnd || $[10] !== onDragStart || $[11] !== t2 || $[12] !== t3 || $[13] !== t4 || $[14] !== t5 || $[15] !== t6 || $[16] !== t7 || $[17] !== t8 || $[18] !== t9 || $[19] !== title) {
|
|
408
|
+
t10 = /* @__PURE__ */ jsxs("div", {
|
|
403
409
|
role: "button",
|
|
404
410
|
tabIndex: 0,
|
|
405
411
|
className: TreeList_module_default.row,
|
|
406
412
|
title,
|
|
407
|
-
draggable:
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
413
|
+
draggable: t2,
|
|
414
|
+
onClick: t3,
|
|
415
|
+
onDoubleClick: t4,
|
|
416
|
+
onKeyDown: t5,
|
|
417
|
+
onMouseEnter: t6,
|
|
418
|
+
onMouseLeave: t7,
|
|
412
419
|
onDragStart,
|
|
413
420
|
onDragEnd,
|
|
414
|
-
children: [
|
|
421
|
+
children: [t8, t9]
|
|
415
422
|
});
|
|
416
|
-
$[9] =
|
|
417
|
-
$[10] =
|
|
418
|
-
$[11] =
|
|
419
|
-
$[12] =
|
|
420
|
-
$[13] =
|
|
421
|
-
$[14] =
|
|
422
|
-
$[15] =
|
|
423
|
-
$[16] =
|
|
424
|
-
$[17] =
|
|
425
|
-
$[18] =
|
|
426
|
-
$[19] =
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
423
|
+
$[9] = onDragEnd;
|
|
424
|
+
$[10] = onDragStart;
|
|
425
|
+
$[11] = t2;
|
|
426
|
+
$[12] = t3;
|
|
427
|
+
$[13] = t4;
|
|
428
|
+
$[14] = t5;
|
|
429
|
+
$[15] = t6;
|
|
430
|
+
$[16] = t7;
|
|
431
|
+
$[17] = t8;
|
|
432
|
+
$[18] = t9;
|
|
433
|
+
$[19] = title;
|
|
434
|
+
$[20] = t10;
|
|
435
|
+
} else t10 = $[20];
|
|
436
|
+
let t11;
|
|
437
|
+
if ($[21] !== after || $[22] !== t10) {
|
|
438
|
+
t11 = /* @__PURE__ */ jsxs("li", {
|
|
431
439
|
className: `${TreeList_module_default.head} ${TreeList_module_default.leaf}`,
|
|
432
|
-
children: [
|
|
440
|
+
children: [t10, after]
|
|
433
441
|
});
|
|
434
|
-
$[
|
|
435
|
-
$[
|
|
436
|
-
$[
|
|
437
|
-
} else
|
|
438
|
-
return
|
|
442
|
+
$[21] = after;
|
|
443
|
+
$[22] = t10;
|
|
444
|
+
$[23] = t11;
|
|
445
|
+
} else t11 = $[23];
|
|
446
|
+
return t11;
|
|
439
447
|
}
|
|
440
448
|
function RowIcon(t0) {
|
|
441
449
|
const $ = c(2);
|
|
@@ -468,12 +476,16 @@ const textures = {
|
|
|
468
476
|
"module-unfit": "icons/38_16_200",
|
|
469
477
|
"module-power": "icons/38_16_207",
|
|
470
478
|
"module-info": "icons/38_16_208",
|
|
479
|
+
"mode-defense": "icons/defence",
|
|
480
|
+
"mode-sharpshooter": "icons/target",
|
|
481
|
+
"mode-propulsion": "icons/speed",
|
|
471
482
|
link: "eveicon/system_icons/link_16px",
|
|
472
483
|
search: "eveicon/system_icons/search_16px",
|
|
473
484
|
collapse: "eveicon/system_icons/collapse_16px",
|
|
474
485
|
checkmark: "eveicon/system_icons/checkmark_16px",
|
|
475
486
|
close: "eveicon/system_icons/close_16px",
|
|
476
487
|
folder: "eveicon/system_icons/folder_16px",
|
|
488
|
+
export: "eveicon/system_icons/export_16px",
|
|
477
489
|
"fits-browser": "windowicons/browser",
|
|
478
490
|
"fits-personal": "windowicons/member",
|
|
479
491
|
"fits-corporation": "windowicons/corporation",
|
|
@@ -630,44 +642,45 @@ function Tooltip(t0) {
|
|
|
630
642
|
let t10;
|
|
631
643
|
let t11;
|
|
632
644
|
let t12;
|
|
645
|
+
let t13;
|
|
633
646
|
let t8;
|
|
634
647
|
let t9;
|
|
635
648
|
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
636
649
|
t8 = () => show(true);
|
|
637
650
|
t9 = () => show(false);
|
|
638
|
-
t10 = (
|
|
651
|
+
t10 = () => show(true);
|
|
652
|
+
t11 = (event) => {
|
|
639
653
|
const target = event.target;
|
|
640
|
-
setTimeout(() =>
|
|
654
|
+
setTimeout(() => {
|
|
655
|
+
if (target.matches(":focus-visible")) show(true);
|
|
656
|
+
});
|
|
641
657
|
};
|
|
642
|
-
|
|
643
|
-
|
|
658
|
+
t12 = () => show(false);
|
|
659
|
+
t13 = (event_0) => {
|
|
644
660
|
if (event_0.key === "Escape") show(false);
|
|
645
661
|
};
|
|
646
662
|
$[7] = t10;
|
|
647
663
|
$[8] = t11;
|
|
648
664
|
$[9] = t12;
|
|
649
|
-
$[10] =
|
|
650
|
-
$[11] =
|
|
665
|
+
$[10] = t13;
|
|
666
|
+
$[11] = t8;
|
|
667
|
+
$[12] = t9;
|
|
651
668
|
} else {
|
|
652
669
|
t10 = $[7];
|
|
653
670
|
t11 = $[8];
|
|
654
671
|
t12 = $[9];
|
|
655
|
-
|
|
656
|
-
|
|
672
|
+
t13 = $[10];
|
|
673
|
+
t8 = $[11];
|
|
674
|
+
t9 = $[12];
|
|
657
675
|
}
|
|
658
|
-
let t13;
|
|
659
|
-
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
660
|
-
t13 = /* @__PURE__ */ jsx("span", { className: Tooltip_module_default.notch });
|
|
661
|
-
$[12] = t13;
|
|
662
|
-
} else t13 = $[12];
|
|
663
676
|
let t14;
|
|
664
677
|
if ($[13] !== label) {
|
|
665
|
-
t14 = /* @__PURE__ */ jsxs("span", {
|
|
678
|
+
t14 = label !== void 0 && /* @__PURE__ */ jsxs("span", {
|
|
666
679
|
ref: tooltip,
|
|
667
680
|
className: Tooltip_module_default.tooltip,
|
|
668
681
|
popover: "hint",
|
|
669
682
|
"aria-hidden": true,
|
|
670
|
-
children: [
|
|
683
|
+
children: [/* @__PURE__ */ jsx("span", { className: Tooltip_module_default.notch }), /* @__PURE__ */ jsx("span", {
|
|
671
684
|
className: Tooltip_module_default.label,
|
|
672
685
|
children: label
|
|
673
686
|
})]
|
|
@@ -683,9 +696,10 @@ function Tooltip(t0) {
|
|
|
683
696
|
style: t7,
|
|
684
697
|
onPointerEnter: t8,
|
|
685
698
|
onPointerLeave: t9,
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
699
|
+
onClick: t10,
|
|
700
|
+
onFocus: t11,
|
|
701
|
+
onBlur: t12,
|
|
702
|
+
onKeyDown: t13,
|
|
689
703
|
children: [children, t14]
|
|
690
704
|
});
|
|
691
705
|
$[15] = children;
|
|
@@ -993,63 +1007,66 @@ var Wheel_module_default = {
|
|
|
993
1007
|
//#region src/primitives/Wheel/Wheel.tsx
|
|
994
1008
|
/** Square, and as big as EVE's at `--esf-scale`, or as wide as `--esf-wheel-size`. */
|
|
995
1009
|
function Wheel(t0) {
|
|
996
|
-
const $ = c(
|
|
997
|
-
const { label, children } = t0;
|
|
1010
|
+
const $ = c(15);
|
|
1011
|
+
const { label, hideScales: t1, children } = t0;
|
|
1012
|
+
const hideScales = t1 === void 0 ? false : t1;
|
|
998
1013
|
const images = useImages();
|
|
999
|
-
let
|
|
1014
|
+
let t2;
|
|
1000
1015
|
if ($[0] !== images) {
|
|
1001
|
-
|
|
1016
|
+
t2 = (name) => ({ "--texture": `url(${images.uiTexture(name)})` });
|
|
1002
1017
|
$[0] = images;
|
|
1003
|
-
$[1] =
|
|
1004
|
-
} else
|
|
1005
|
-
const texture =
|
|
1006
|
-
let
|
|
1018
|
+
$[1] = t2;
|
|
1019
|
+
} else t2 = $[1];
|
|
1020
|
+
const texture = t2;
|
|
1021
|
+
let t3;
|
|
1007
1022
|
if ($[2] !== texture) {
|
|
1008
|
-
|
|
1023
|
+
t3 = /* @__PURE__ */ jsx("div", {
|
|
1009
1024
|
className: Wheel_module_default.rings,
|
|
1010
1025
|
style: texture("classes/fitting/fittingbase")
|
|
1011
1026
|
});
|
|
1012
1027
|
$[2] = texture;
|
|
1013
|
-
$[3] =
|
|
1014
|
-
} else
|
|
1015
|
-
let
|
|
1028
|
+
$[3] = t3;
|
|
1029
|
+
} else t3 = $[3];
|
|
1030
|
+
let t4;
|
|
1016
1031
|
if ($[4] !== texture) {
|
|
1017
|
-
|
|
1032
|
+
t4 = /* @__PURE__ */ jsx("div", {
|
|
1018
1033
|
className: Wheel_module_default.edges,
|
|
1019
1034
|
style: texture("classes/fitting/fittingbase_dotproduct")
|
|
1020
1035
|
});
|
|
1021
1036
|
$[4] = texture;
|
|
1022
|
-
$[5] =
|
|
1023
|
-
} else
|
|
1024
|
-
let
|
|
1025
|
-
if ($[6] !== texture) {
|
|
1026
|
-
|
|
1037
|
+
$[5] = t4;
|
|
1038
|
+
} else t4 = $[5];
|
|
1039
|
+
let t5;
|
|
1040
|
+
if ($[6] !== hideScales || $[7] !== texture) {
|
|
1041
|
+
t5 = !hideScales && /* @__PURE__ */ jsx("div", {
|
|
1027
1042
|
className: Wheel_module_default.scales,
|
|
1043
|
+
"data-scales": true,
|
|
1028
1044
|
style: texture("classes/fitting/fittingbase_overlay")
|
|
1029
1045
|
});
|
|
1030
|
-
$[6] =
|
|
1031
|
-
$[7] =
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1046
|
+
$[6] = hideScales;
|
|
1047
|
+
$[7] = texture;
|
|
1048
|
+
$[8] = t5;
|
|
1049
|
+
} else t5 = $[8];
|
|
1050
|
+
let t6;
|
|
1051
|
+
if ($[9] !== children || $[10] !== label || $[11] !== t3 || $[12] !== t4 || $[13] !== t5) {
|
|
1052
|
+
t6 = /* @__PURE__ */ jsxs("section", {
|
|
1036
1053
|
className: Wheel_module_default.wheel,
|
|
1037
1054
|
"aria-label": label,
|
|
1038
1055
|
children: [
|
|
1039
|
-
t2,
|
|
1040
1056
|
t3,
|
|
1057
|
+
t4,
|
|
1041
1058
|
children,
|
|
1042
|
-
|
|
1059
|
+
t5
|
|
1043
1060
|
]
|
|
1044
1061
|
});
|
|
1045
|
-
$[
|
|
1046
|
-
$[
|
|
1047
|
-
$[10] = t2;
|
|
1062
|
+
$[9] = children;
|
|
1063
|
+
$[10] = label;
|
|
1048
1064
|
$[11] = t3;
|
|
1049
1065
|
$[12] = t4;
|
|
1050
1066
|
$[13] = t5;
|
|
1051
|
-
|
|
1052
|
-
|
|
1067
|
+
$[14] = t6;
|
|
1068
|
+
} else t6 = $[14];
|
|
1069
|
+
return t6;
|
|
1053
1070
|
}
|
|
1054
1071
|
/** `angle` in degrees clockwise from the top, as CSS rotations go. */
|
|
1055
1072
|
function polar(angle, radius) {
|
|
@@ -1195,7 +1212,7 @@ function SlotPress(t0) {
|
|
|
1195
1212
|
className,
|
|
1196
1213
|
"aria-label": label,
|
|
1197
1214
|
onClick: onPress,
|
|
1198
|
-
onKeyDown: _temp$
|
|
1215
|
+
onKeyDown: _temp$12
|
|
1199
1216
|
});
|
|
1200
1217
|
$[0] = className;
|
|
1201
1218
|
$[1] = label;
|
|
@@ -1204,7 +1221,7 @@ function SlotPress(t0) {
|
|
|
1204
1221
|
} else t1 = $[3];
|
|
1205
1222
|
return t1;
|
|
1206
1223
|
}
|
|
1207
|
-
function _temp$
|
|
1224
|
+
function _temp$12(event) {
|
|
1208
1225
|
if (event.key !== "Enter" && event.key !== " ") return;
|
|
1209
1226
|
event.preventDefault();
|
|
1210
1227
|
event.currentTarget.dispatchEvent(new MouseEvent("click", {
|
|
@@ -1218,6 +1235,7 @@ var WheelSlot_module_default = {
|
|
|
1218
1235
|
"action": "T6VD6G_action",
|
|
1219
1236
|
"actions": "T6VD6G_actions",
|
|
1220
1237
|
"ammo": "T6VD6G_ammo",
|
|
1238
|
+
"anchor": "T6VD6G_anchor",
|
|
1221
1239
|
"body": "T6VD6G_body",
|
|
1222
1240
|
"bridge": "T6VD6G_bridge",
|
|
1223
1241
|
"empty": "T6VD6G_empty",
|
|
@@ -1250,7 +1268,7 @@ const ammoBars = [
|
|
|
1250
1268
|
];
|
|
1251
1269
|
const emptyIconScale = { rig: 1.2 };
|
|
1252
1270
|
function WheelSlot(t0) {
|
|
1253
|
-
const $ = c(
|
|
1271
|
+
const $ = c(95);
|
|
1254
1272
|
let angle;
|
|
1255
1273
|
let chargeTypeId;
|
|
1256
1274
|
let className;
|
|
@@ -1269,10 +1287,12 @@ function WheelSlot(t0) {
|
|
|
1269
1287
|
let t3;
|
|
1270
1288
|
let t4;
|
|
1271
1289
|
let t5;
|
|
1290
|
+
let t6;
|
|
1291
|
+
let tooltip;
|
|
1272
1292
|
let typeId;
|
|
1273
1293
|
let typeName;
|
|
1274
1294
|
if ($[0] !== t0) {
|
|
1275
|
-
({rack, angle, typeId, typeName, chargeTypeId, chargeable: t1, state: t2, activatable: t3, available: t4, preview: t5, onPress, onDragStart, onDragEnd, label, onUnfit, onRemoveCharge, onTogglePower, className, style, ...props} = t0);
|
|
1295
|
+
({rack, angle, typeId, typeName, chargeTypeId, chargeable: t1, state: t2, activatable: t3, available: t4, preview: t5, tooltip, onPress, onDragStart, onDragEnd, label, actions: t6, onUnfit, onRemoveCharge, onTogglePower, className, style, ...props} = t0);
|
|
1276
1296
|
$[0] = t0;
|
|
1277
1297
|
$[1] = angle;
|
|
1278
1298
|
$[2] = chargeTypeId;
|
|
@@ -1292,8 +1312,10 @@ function WheelSlot(t0) {
|
|
|
1292
1312
|
$[16] = t3;
|
|
1293
1313
|
$[17] = t4;
|
|
1294
1314
|
$[18] = t5;
|
|
1295
|
-
$[19] =
|
|
1296
|
-
$[20] =
|
|
1315
|
+
$[19] = t6;
|
|
1316
|
+
$[20] = tooltip;
|
|
1317
|
+
$[21] = typeId;
|
|
1318
|
+
$[22] = typeName;
|
|
1297
1319
|
} else {
|
|
1298
1320
|
angle = $[1];
|
|
1299
1321
|
chargeTypeId = $[2];
|
|
@@ -1313,29 +1335,32 @@ function WheelSlot(t0) {
|
|
|
1313
1335
|
t3 = $[16];
|
|
1314
1336
|
t4 = $[17];
|
|
1315
1337
|
t5 = $[18];
|
|
1316
|
-
|
|
1317
|
-
|
|
1338
|
+
t6 = $[19];
|
|
1339
|
+
tooltip = $[20];
|
|
1340
|
+
typeId = $[21];
|
|
1341
|
+
typeName = $[22];
|
|
1318
1342
|
}
|
|
1319
1343
|
const chargeable = t1 === void 0 ? false : t1;
|
|
1320
1344
|
const state = t2 === void 0 ? "online" : t2;
|
|
1321
1345
|
const activatable = t3 === void 0 ? false : t3;
|
|
1322
1346
|
const available = t4 === void 0 ? true : t4;
|
|
1323
1347
|
const preview = t5 === void 0 ? false : t5;
|
|
1348
|
+
const showActions = t6 === void 0 ? true : t6;
|
|
1324
1349
|
const images = useImages();
|
|
1325
|
-
let
|
|
1326
|
-
if ($[
|
|
1327
|
-
|
|
1328
|
-
$[
|
|
1329
|
-
$[
|
|
1330
|
-
} else
|
|
1331
|
-
const texture =
|
|
1350
|
+
let t7;
|
|
1351
|
+
if ($[23] !== images) {
|
|
1352
|
+
t7 = (name) => ({ "--texture": `url(${images.uiTexture(name)})` });
|
|
1353
|
+
$[23] = images;
|
|
1354
|
+
$[24] = t7;
|
|
1355
|
+
} else t7 = $[24];
|
|
1356
|
+
const texture = t7;
|
|
1332
1357
|
const fitted = typeId !== void 0;
|
|
1333
1358
|
const iconTypeId = chargeTypeId ?? typeId;
|
|
1334
1359
|
let row;
|
|
1335
|
-
let
|
|
1336
|
-
if ($[
|
|
1360
|
+
let t8;
|
|
1361
|
+
if ($[25] !== chargeTypeId || $[26] !== fitted || $[27] !== onRemoveCharge || $[28] !== onTogglePower || $[29] !== onUnfit || $[30] !== preview || $[31] !== showActions || $[32] !== state || $[33] !== typeId || $[34] !== typeName) {
|
|
1337
1362
|
row = [];
|
|
1338
|
-
if (fitted && !preview) {
|
|
1363
|
+
if (fitted && !preview && showActions) {
|
|
1339
1364
|
if (chargeTypeId !== void 0) {
|
|
1340
1365
|
row.push(onRemoveCharge && {
|
|
1341
1366
|
key: "charge",
|
|
@@ -1345,14 +1370,14 @@ function WheelSlot(t0) {
|
|
|
1345
1370
|
onPress: onRemoveCharge
|
|
1346
1371
|
})
|
|
1347
1372
|
});
|
|
1348
|
-
let
|
|
1349
|
-
if ($[
|
|
1350
|
-
|
|
1351
|
-
$[
|
|
1352
|
-
} else
|
|
1373
|
+
let t9;
|
|
1374
|
+
if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1375
|
+
t9 = /* @__PURE__ */ jsx(SlotInfo, {});
|
|
1376
|
+
$[37] = t9;
|
|
1377
|
+
} else t9 = $[37];
|
|
1353
1378
|
row.push({
|
|
1354
1379
|
key: "charge-info",
|
|
1355
|
-
node:
|
|
1380
|
+
node: t9
|
|
1356
1381
|
});
|
|
1357
1382
|
row.push(typeName === void 0 ? void 0 : {
|
|
1358
1383
|
key: "module",
|
|
@@ -1377,14 +1402,14 @@ function WheelSlot(t0) {
|
|
|
1377
1402
|
onPress: onUnfit
|
|
1378
1403
|
})
|
|
1379
1404
|
});
|
|
1380
|
-
let
|
|
1381
|
-
if ($[
|
|
1382
|
-
|
|
1383
|
-
$[
|
|
1384
|
-
} else
|
|
1405
|
+
let t9;
|
|
1406
|
+
if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
|
|
1407
|
+
t9 = /* @__PURE__ */ jsx(SlotInfo, {});
|
|
1408
|
+
$[38] = t9;
|
|
1409
|
+
} else t9 = $[38];
|
|
1385
1410
|
row.push({
|
|
1386
1411
|
key: "info",
|
|
1387
|
-
node:
|
|
1412
|
+
node: t9
|
|
1388
1413
|
});
|
|
1389
1414
|
const power = state === "offline" ? "Put Online" : "Put Offline";
|
|
1390
1415
|
row.push(onTogglePower && {
|
|
@@ -1396,85 +1421,64 @@ function WheelSlot(t0) {
|
|
|
1396
1421
|
})
|
|
1397
1422
|
});
|
|
1398
1423
|
}
|
|
1399
|
-
|
|
1400
|
-
$[
|
|
1401
|
-
$[
|
|
1402
|
-
$[
|
|
1403
|
-
$[
|
|
1404
|
-
$[
|
|
1405
|
-
$[
|
|
1406
|
-
$[
|
|
1407
|
-
$[
|
|
1408
|
-
$[
|
|
1409
|
-
$[
|
|
1410
|
-
$[
|
|
1424
|
+
t8 = row.findLastIndex(_temp$11);
|
|
1425
|
+
$[25] = chargeTypeId;
|
|
1426
|
+
$[26] = fitted;
|
|
1427
|
+
$[27] = onRemoveCharge;
|
|
1428
|
+
$[28] = onTogglePower;
|
|
1429
|
+
$[29] = onUnfit;
|
|
1430
|
+
$[30] = preview;
|
|
1431
|
+
$[31] = showActions;
|
|
1432
|
+
$[32] = state;
|
|
1433
|
+
$[33] = typeId;
|
|
1434
|
+
$[34] = typeName;
|
|
1435
|
+
$[35] = row;
|
|
1436
|
+
$[36] = t8;
|
|
1411
1437
|
} else {
|
|
1412
|
-
row = $[
|
|
1413
|
-
|
|
1438
|
+
row = $[35];
|
|
1439
|
+
t8 = $[36];
|
|
1414
1440
|
}
|
|
1415
|
-
const last =
|
|
1441
|
+
const last = t8;
|
|
1416
1442
|
const innermost = actions.first - last * actions.step - actions.size / 2;
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
$[37] = t8;
|
|
1422
|
-
} else t8 = $[37];
|
|
1423
|
-
const t9 = t8.join(" ");
|
|
1424
|
-
const t10 = `${angle}deg`;
|
|
1425
|
-
let t11;
|
|
1426
|
-
if ($[38] !== style || $[39] !== t10) {
|
|
1427
|
-
t11 = {
|
|
1428
|
-
...box,
|
|
1429
|
-
"--angle": t10,
|
|
1430
|
-
...style
|
|
1431
|
-
};
|
|
1432
|
-
$[38] = style;
|
|
1433
|
-
$[39] = t10;
|
|
1434
|
-
$[40] = t11;
|
|
1435
|
-
} else t11 = $[40];
|
|
1436
|
-
const t12 = t11;
|
|
1437
|
-
const t13 = fitted ? state : available ? "empty" : "unavailable";
|
|
1438
|
-
const t14 = preview || void 0;
|
|
1439
|
-
const t15 = onDragStart !== void 0 || void 0;
|
|
1440
|
-
let t16;
|
|
1441
|
-
if ($[41] !== fitted || $[42] !== texture) {
|
|
1442
|
-
t16 = fitted && /* @__PURE__ */ jsx("span", {
|
|
1443
|
+
const t9 = onDragStart !== void 0 || void 0;
|
|
1444
|
+
let t10;
|
|
1445
|
+
if ($[39] !== fitted || $[40] !== texture) {
|
|
1446
|
+
t10 = fitted && /* @__PURE__ */ jsx("span", {
|
|
1443
1447
|
className: WheelSlot_module_default.fill,
|
|
1444
1448
|
style: texture("classes/fitting/moduleslotfill")
|
|
1445
1449
|
});
|
|
1446
|
-
$[
|
|
1447
|
-
$[
|
|
1448
|
-
$[
|
|
1449
|
-
} else
|
|
1450
|
-
let
|
|
1451
|
-
if ($[
|
|
1452
|
-
|
|
1450
|
+
$[39] = fitted;
|
|
1451
|
+
$[40] = texture;
|
|
1452
|
+
$[41] = t10;
|
|
1453
|
+
} else t10 = $[41];
|
|
1454
|
+
let t11;
|
|
1455
|
+
if ($[42] !== activatable || $[43] !== fitted || $[44] !== preview || $[45] !== state || $[46] !== texture) {
|
|
1456
|
+
t11 = /* @__PURE__ */ jsx("span", {
|
|
1453
1457
|
className: WheelSlot_module_default.frame,
|
|
1454
1458
|
style: texture(frameTexture(fitted, preview, state, activatable))
|
|
1455
1459
|
});
|
|
1456
|
-
$[
|
|
1457
|
-
$[
|
|
1458
|
-
$[
|
|
1459
|
-
$[
|
|
1460
|
-
$[
|
|
1461
|
-
$[
|
|
1462
|
-
} else
|
|
1463
|
-
let
|
|
1464
|
-
if ($[
|
|
1465
|
-
|
|
1460
|
+
$[42] = activatable;
|
|
1461
|
+
$[43] = fitted;
|
|
1462
|
+
$[44] = preview;
|
|
1463
|
+
$[45] = state;
|
|
1464
|
+
$[46] = texture;
|
|
1465
|
+
$[47] = t11;
|
|
1466
|
+
} else t11 = $[47];
|
|
1467
|
+
let t12;
|
|
1468
|
+
if ($[48] !== chargeTypeId || $[49] !== chargeable || $[50] !== fitted) {
|
|
1469
|
+
t12 = fitted && chargeable && ammoBars.map((offset) => /* @__PURE__ */ jsx("span", {
|
|
1466
1470
|
className: WheelSlot_module_default.ammo,
|
|
1467
1471
|
style: { "--offset": `${offset}deg` },
|
|
1468
1472
|
"data-loaded": chargeTypeId !== void 0 || void 0
|
|
1469
1473
|
}, offset));
|
|
1470
|
-
$[
|
|
1471
|
-
$[
|
|
1472
|
-
$[
|
|
1473
|
-
$[
|
|
1474
|
-
} else
|
|
1475
|
-
let
|
|
1476
|
-
if ($[
|
|
1477
|
-
|
|
1474
|
+
$[48] = chargeTypeId;
|
|
1475
|
+
$[49] = chargeable;
|
|
1476
|
+
$[50] = fitted;
|
|
1477
|
+
$[51] = t12;
|
|
1478
|
+
} else t12 = $[51];
|
|
1479
|
+
let t13;
|
|
1480
|
+
if ($[52] !== available || $[53] !== iconTypeId || $[54] !== rack) {
|
|
1481
|
+
t13 = iconTypeId !== void 0 ? /* @__PURE__ */ jsx("span", {
|
|
1478
1482
|
className: WheelSlot_module_default.icon,
|
|
1479
1483
|
children: /* @__PURE__ */ jsx(TypeIcon, {
|
|
1480
1484
|
typeId: iconTypeId,
|
|
@@ -1486,50 +1490,99 @@ function WheelSlot(t0) {
|
|
|
1486
1490
|
style: { scale: emptyIconScale[rack] },
|
|
1487
1491
|
children: /* @__PURE__ */ jsx(Icon, { name: `slot-${rack}` })
|
|
1488
1492
|
});
|
|
1489
|
-
$[
|
|
1490
|
-
$[
|
|
1491
|
-
$[
|
|
1492
|
-
$[
|
|
1493
|
-
} else
|
|
1494
|
-
let
|
|
1495
|
-
if ($[
|
|
1496
|
-
|
|
1493
|
+
$[52] = available;
|
|
1494
|
+
$[53] = iconTypeId;
|
|
1495
|
+
$[54] = rack;
|
|
1496
|
+
$[55] = t13;
|
|
1497
|
+
} else t13 = $[55];
|
|
1498
|
+
let t14;
|
|
1499
|
+
if ($[56] !== label || $[57] !== onPress) {
|
|
1500
|
+
t14 = onPress && /* @__PURE__ */ jsx(SlotPress, {
|
|
1497
1501
|
className: WheelSlot_module_default.press,
|
|
1498
1502
|
label,
|
|
1499
1503
|
onPress
|
|
1500
1504
|
});
|
|
1501
|
-
$[
|
|
1502
|
-
$[
|
|
1503
|
-
$[
|
|
1504
|
-
} else
|
|
1505
|
-
let
|
|
1506
|
-
if ($[
|
|
1507
|
-
|
|
1505
|
+
$[56] = label;
|
|
1506
|
+
$[57] = onPress;
|
|
1507
|
+
$[58] = t14;
|
|
1508
|
+
} else t14 = $[58];
|
|
1509
|
+
let t15;
|
|
1510
|
+
if ($[59] !== onDragEnd || $[60] !== onDragStart || $[61] !== t10 || $[62] !== t11 || $[63] !== t12 || $[64] !== t13 || $[65] !== t14 || $[66] !== t9) {
|
|
1511
|
+
t15 = /* @__PURE__ */ jsxs("div", {
|
|
1508
1512
|
className: WheelSlot_module_default.body,
|
|
1509
|
-
draggable:
|
|
1513
|
+
draggable: t9,
|
|
1510
1514
|
onDragStart,
|
|
1511
1515
|
onDragEnd,
|
|
1512
1516
|
children: [
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1517
|
+
t10,
|
|
1518
|
+
t11,
|
|
1519
|
+
t12,
|
|
1520
|
+
t13,
|
|
1521
|
+
t14
|
|
1518
1522
|
]
|
|
1519
1523
|
});
|
|
1520
|
-
$[
|
|
1521
|
-
$[
|
|
1522
|
-
$[
|
|
1523
|
-
$[
|
|
1524
|
-
$[
|
|
1525
|
-
$[
|
|
1526
|
-
$[
|
|
1527
|
-
$[
|
|
1528
|
-
$[
|
|
1529
|
-
} else
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1524
|
+
$[59] = onDragEnd;
|
|
1525
|
+
$[60] = onDragStart;
|
|
1526
|
+
$[61] = t10;
|
|
1527
|
+
$[62] = t11;
|
|
1528
|
+
$[63] = t12;
|
|
1529
|
+
$[64] = t13;
|
|
1530
|
+
$[65] = t14;
|
|
1531
|
+
$[66] = t9;
|
|
1532
|
+
$[67] = t15;
|
|
1533
|
+
} else t15 = $[67];
|
|
1534
|
+
const body = t15;
|
|
1535
|
+
let t16;
|
|
1536
|
+
if ($[68] !== className) {
|
|
1537
|
+
t16 = [WheelSlot_module_default.slot, className].filter(Boolean);
|
|
1538
|
+
$[68] = className;
|
|
1539
|
+
$[69] = t16;
|
|
1540
|
+
} else t16 = $[69];
|
|
1541
|
+
const t17 = t16.join(" ");
|
|
1542
|
+
const t18 = `${angle}deg`;
|
|
1543
|
+
let t19;
|
|
1544
|
+
if ($[70] !== style || $[71] !== t18) {
|
|
1545
|
+
t19 = {
|
|
1546
|
+
...box,
|
|
1547
|
+
"--angle": t18,
|
|
1548
|
+
...style
|
|
1549
|
+
};
|
|
1550
|
+
$[70] = style;
|
|
1551
|
+
$[71] = t18;
|
|
1552
|
+
$[72] = t19;
|
|
1553
|
+
} else t19 = $[72];
|
|
1554
|
+
const t20 = t19;
|
|
1555
|
+
const t21 = fitted ? state : available ? "empty" : "unavailable";
|
|
1556
|
+
const t22 = preview || void 0;
|
|
1557
|
+
let t23;
|
|
1558
|
+
if ($[73] !== angle) {
|
|
1559
|
+
t23 = placeAt(angle, box["--slot-centre"]);
|
|
1560
|
+
$[73] = angle;
|
|
1561
|
+
$[74] = t23;
|
|
1562
|
+
} else t23 = $[74];
|
|
1563
|
+
let t24;
|
|
1564
|
+
if ($[75] !== t23) {
|
|
1565
|
+
t24 = /* @__PURE__ */ jsx("span", {
|
|
1566
|
+
className: WheelSlot_module_default.anchor,
|
|
1567
|
+
style: t23
|
|
1568
|
+
});
|
|
1569
|
+
$[75] = t23;
|
|
1570
|
+
$[76] = t24;
|
|
1571
|
+
} else t24 = $[76];
|
|
1572
|
+
let t25;
|
|
1573
|
+
if ($[77] !== body || $[78] !== t24 || $[79] !== tooltip) {
|
|
1574
|
+
t25 = /* @__PURE__ */ jsxs(Tooltip, {
|
|
1575
|
+
label: tooltip,
|
|
1576
|
+
children: [t24, body]
|
|
1577
|
+
});
|
|
1578
|
+
$[77] = body;
|
|
1579
|
+
$[78] = t24;
|
|
1580
|
+
$[79] = tooltip;
|
|
1581
|
+
$[80] = t25;
|
|
1582
|
+
} else t25 = $[80];
|
|
1583
|
+
let t26;
|
|
1584
|
+
if ($[81] !== angle || $[82] !== innermost || $[83] !== last || $[84] !== row || $[85] !== typeName) {
|
|
1585
|
+
t26 = last >= 0 && /* @__PURE__ */ jsxs("fieldset", {
|
|
1533
1586
|
className: WheelSlot_module_default.actions,
|
|
1534
1587
|
style: { "--action-size": actions.size },
|
|
1535
1588
|
"aria-label": typeName,
|
|
@@ -1542,35 +1595,35 @@ function WheelSlot(t0) {
|
|
|
1542
1595
|
children: action_0.node
|
|
1543
1596
|
}, action_0.key))]
|
|
1544
1597
|
});
|
|
1545
|
-
$[
|
|
1546
|
-
$[
|
|
1547
|
-
$[
|
|
1548
|
-
$[
|
|
1549
|
-
$[
|
|
1550
|
-
$[
|
|
1551
|
-
} else
|
|
1552
|
-
let
|
|
1553
|
-
if ($[
|
|
1554
|
-
|
|
1598
|
+
$[81] = angle;
|
|
1599
|
+
$[82] = innermost;
|
|
1600
|
+
$[83] = last;
|
|
1601
|
+
$[84] = row;
|
|
1602
|
+
$[85] = typeName;
|
|
1603
|
+
$[86] = t26;
|
|
1604
|
+
} else t26 = $[86];
|
|
1605
|
+
let t27;
|
|
1606
|
+
if ($[87] !== props || $[88] !== t17 || $[89] !== t20 || $[90] !== t21 || $[91] !== t22 || $[92] !== t25 || $[93] !== t26) {
|
|
1607
|
+
t27 = /* @__PURE__ */ jsxs("div", {
|
|
1555
1608
|
...props,
|
|
1556
|
-
className:
|
|
1557
|
-
style:
|
|
1558
|
-
"data-state":
|
|
1559
|
-
"data-preview":
|
|
1560
|
-
children: [
|
|
1561
|
-
});
|
|
1562
|
-
$[
|
|
1563
|
-
$[
|
|
1564
|
-
$[
|
|
1565
|
-
$[
|
|
1566
|
-
$[
|
|
1567
|
-
$[
|
|
1568
|
-
$[
|
|
1569
|
-
$[
|
|
1570
|
-
} else
|
|
1571
|
-
return
|
|
1572
|
-
}
|
|
1573
|
-
function _temp$
|
|
1609
|
+
className: t17,
|
|
1610
|
+
style: t20,
|
|
1611
|
+
"data-state": t21,
|
|
1612
|
+
"data-preview": t22,
|
|
1613
|
+
children: [t25, t26]
|
|
1614
|
+
});
|
|
1615
|
+
$[87] = props;
|
|
1616
|
+
$[88] = t17;
|
|
1617
|
+
$[89] = t20;
|
|
1618
|
+
$[90] = t21;
|
|
1619
|
+
$[91] = t22;
|
|
1620
|
+
$[92] = t25;
|
|
1621
|
+
$[93] = t26;
|
|
1622
|
+
$[94] = t27;
|
|
1623
|
+
} else t27 = $[94];
|
|
1624
|
+
return t27;
|
|
1625
|
+
}
|
|
1626
|
+
function _temp$11(action) {
|
|
1574
1627
|
return action !== void 0;
|
|
1575
1628
|
}
|
|
1576
1629
|
function frameTexture(fitted, preview, state, activatable) {
|
|
@@ -1737,19 +1790,56 @@ const gauges = {
|
|
|
1737
1790
|
sweep: 30.5
|
|
1738
1791
|
}
|
|
1739
1792
|
};
|
|
1793
|
+
const decoded = /* @__PURE__ */ new Set();
|
|
1794
|
+
function useDecoded(src) {
|
|
1795
|
+
const $ = c(6);
|
|
1796
|
+
const [ready, setReady] = useState();
|
|
1797
|
+
let t0;
|
|
1798
|
+
let t1;
|
|
1799
|
+
if ($[0] !== src) {
|
|
1800
|
+
t0 = () => {
|
|
1801
|
+
if (src === void 0 || decoded.has(src)) return;
|
|
1802
|
+
const image = new Image();
|
|
1803
|
+
image.src = src;
|
|
1804
|
+
image.decode().then(() => {
|
|
1805
|
+
decoded.add(src);
|
|
1806
|
+
setReady(src);
|
|
1807
|
+
}, _temp$10);
|
|
1808
|
+
};
|
|
1809
|
+
t1 = [src];
|
|
1810
|
+
$[0] = src;
|
|
1811
|
+
$[1] = t0;
|
|
1812
|
+
$[2] = t1;
|
|
1813
|
+
} else {
|
|
1814
|
+
t0 = $[1];
|
|
1815
|
+
t1 = $[2];
|
|
1816
|
+
}
|
|
1817
|
+
useEffect(t0, t1);
|
|
1818
|
+
let t2;
|
|
1819
|
+
if ($[3] !== ready || $[4] !== src) {
|
|
1820
|
+
t2 = src !== void 0 && (ready === src || decoded.has(src));
|
|
1821
|
+
$[3] = ready;
|
|
1822
|
+
$[4] = src;
|
|
1823
|
+
$[5] = t2;
|
|
1824
|
+
} else t2 = $[5];
|
|
1825
|
+
return t2;
|
|
1826
|
+
}
|
|
1827
|
+
function _temp$10() {}
|
|
1740
1828
|
function WheelGauge(t0) {
|
|
1741
|
-
const $ = c(
|
|
1829
|
+
const $ = c(15);
|
|
1742
1830
|
const { resource, used, total, valueText } = t0;
|
|
1743
1831
|
const images = useImages();
|
|
1744
1832
|
const { name, turn, from, sweep } = gauges[resource];
|
|
1745
|
-
const to = from - sweep * (total > 0 ? Math.min(used / total, 1) : 0);
|
|
1746
1833
|
let t1;
|
|
1747
1834
|
if ($[0] !== images) {
|
|
1748
1835
|
t1 = images.uiTexture("classes/fitting/fittingbase_gauge");
|
|
1749
1836
|
$[0] = images;
|
|
1750
1837
|
$[1] = t1;
|
|
1751
1838
|
} else t1 = $[1];
|
|
1752
|
-
const
|
|
1839
|
+
const texture = t1;
|
|
1840
|
+
const ready = useDecoded(texture);
|
|
1841
|
+
const to = from - sweep * (total > 0 ? Math.min(used / total, 1) : 0);
|
|
1842
|
+
const t2 = `url(${texture})`;
|
|
1753
1843
|
const t3 = `conic-gradient(transparent ${to}deg, black ${to}deg ${from}deg, transparent ${from}deg)`;
|
|
1754
1844
|
let t4;
|
|
1755
1845
|
if ($[2] !== t2 || $[3] !== t3 || $[4] !== turn) {
|
|
@@ -1765,9 +1855,10 @@ function WheelGauge(t0) {
|
|
|
1765
1855
|
} else t4 = $[5];
|
|
1766
1856
|
const t5 = t4;
|
|
1767
1857
|
const t6 = used > total || void 0;
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1858
|
+
const t7 = !ready || void 0;
|
|
1859
|
+
let t8;
|
|
1860
|
+
if ($[6] !== name || $[7] !== resource || $[8] !== t5 || $[9] !== t6 || $[10] !== t7 || $[11] !== total || $[12] !== used || $[13] !== valueText) {
|
|
1861
|
+
t8 = /* @__PURE__ */ jsx("div", {
|
|
1771
1862
|
className: WheelGauge_module_default.gauge,
|
|
1772
1863
|
style: t5,
|
|
1773
1864
|
role: "meter",
|
|
@@ -1777,18 +1868,20 @@ function WheelGauge(t0) {
|
|
|
1777
1868
|
"aria-valuenow": used,
|
|
1778
1869
|
"aria-valuetext": valueText,
|
|
1779
1870
|
"data-resource": resource,
|
|
1780
|
-
"data-over": t6
|
|
1871
|
+
"data-over": t6,
|
|
1872
|
+
"data-loading": t7
|
|
1781
1873
|
});
|
|
1782
1874
|
$[6] = name;
|
|
1783
1875
|
$[7] = resource;
|
|
1784
1876
|
$[8] = t5;
|
|
1785
1877
|
$[9] = t6;
|
|
1786
|
-
$[10] =
|
|
1787
|
-
$[11] =
|
|
1788
|
-
$[12] =
|
|
1789
|
-
$[13] =
|
|
1790
|
-
|
|
1791
|
-
|
|
1878
|
+
$[10] = t7;
|
|
1879
|
+
$[11] = total;
|
|
1880
|
+
$[12] = used;
|
|
1881
|
+
$[13] = valueText;
|
|
1882
|
+
$[14] = t8;
|
|
1883
|
+
} else t8 = $[14];
|
|
1884
|
+
return t8;
|
|
1792
1885
|
}
|
|
1793
1886
|
//#endregion
|
|
1794
1887
|
//#region src/primitives/Wheel/WheelHull.module.css
|
|
@@ -2120,94 +2213,883 @@ function CapacitorRing(t0) {
|
|
|
2120
2213
|
return t8;
|
|
2121
2214
|
}
|
|
2122
2215
|
//#endregion
|
|
2123
|
-
//#region src/
|
|
2124
|
-
|
|
2125
|
-
"
|
|
2126
|
-
"
|
|
2127
|
-
"
|
|
2128
|
-
|
|
2129
|
-
];
|
|
2130
|
-
/** The state after `state` among those up to `max`, going round to offline after the last; before it with `back`. */
|
|
2131
|
-
function nextState(state, max, back = false) {
|
|
2132
|
-
const allowed = states.slice(0, states.indexOf(max) + 1);
|
|
2133
|
-
const step = back ? allowed.length - 1 : 1;
|
|
2134
|
-
return allowed[(allowed.indexOf(state) + step) % allowed.length];
|
|
2135
|
-
}
|
|
2216
|
+
//#region src/primitives/Wheel/WheelModes.module.css
|
|
2217
|
+
var WheelModes_module_default = {
|
|
2218
|
+
"mode": "_9_b9FW_mode",
|
|
2219
|
+
"modes": "_9_b9FW_modes",
|
|
2220
|
+
"place": "_9_b9FW_place"
|
|
2221
|
+
};
|
|
2136
2222
|
//#endregion
|
|
2137
|
-
//#region src/
|
|
2138
|
-
/**
|
|
2139
|
-
const
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2223
|
+
//#region src/primitives/Wheel/WheelModes.tsx
|
|
2224
|
+
/** Measured from EVE, in the order it shows the modes. */
|
|
2225
|
+
const places = [
|
|
2226
|
+
{
|
|
2227
|
+
angle: -99,
|
|
2228
|
+
icon: "mode-defense"
|
|
2229
|
+
},
|
|
2230
|
+
{
|
|
2231
|
+
angle: -109,
|
|
2232
|
+
icon: "mode-sharpshooter"
|
|
2233
|
+
},
|
|
2234
|
+
{
|
|
2235
|
+
angle: -119,
|
|
2236
|
+
icon: "mode-propulsion"
|
|
2237
|
+
}
|
|
2144
2238
|
];
|
|
2145
|
-
/**
|
|
2146
|
-
function
|
|
2147
|
-
const $ = c(
|
|
2148
|
-
const
|
|
2149
|
-
const
|
|
2150
|
-
const fit = useFit();
|
|
2151
|
-
const placement = usePlacement();
|
|
2152
|
-
const { show, clear } = usePreview();
|
|
2153
|
-
const { dragging, start, end } = useDrag();
|
|
2154
|
-
const item = content?.item;
|
|
2155
|
-
const stats = content?.stats;
|
|
2156
|
-
const type = useType(item?.type_id);
|
|
2157
|
-
const charges = useCharges(item?.type_id);
|
|
2158
|
-
const ref = content?.ref;
|
|
2159
|
-
let t0;
|
|
2160
|
-
if ($[0] !== rack || $[1] !== ref || $[2] !== stats) {
|
|
2161
|
-
t0 = ref !== void 0 && stats !== void 0 && switchedRacks.includes(rack);
|
|
2162
|
-
$[0] = rack;
|
|
2163
|
-
$[1] = ref;
|
|
2164
|
-
$[2] = stats;
|
|
2165
|
-
$[3] = t0;
|
|
2166
|
-
} else t0 = $[3];
|
|
2167
|
-
const switchable = t0;
|
|
2168
|
-
const target = `${rack}-${index}`;
|
|
2239
|
+
/** The modes of a ship, like a tactical destroyer's; the active one lit. */
|
|
2240
|
+
function WheelModes(t0) {
|
|
2241
|
+
const $ = c(11);
|
|
2242
|
+
const { modes, active, onSelect } = t0;
|
|
2243
|
+
const group = useId();
|
|
2169
2244
|
let t1;
|
|
2170
|
-
if ($[
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2245
|
+
if ($[0] !== active || $[1] !== group || $[2] !== modes || $[3] !== onSelect) {
|
|
2246
|
+
let t2;
|
|
2247
|
+
if ($[5] !== active || $[6] !== group || $[7] !== onSelect) {
|
|
2248
|
+
t2 = (mode, index) => /* @__PURE__ */ jsx("span", {
|
|
2249
|
+
className: WheelModes_module_default.place,
|
|
2250
|
+
style: placeAt(places[index].angle, 242),
|
|
2251
|
+
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
2252
|
+
label: mode.name,
|
|
2253
|
+
children: /* @__PURE__ */ jsxs("label", {
|
|
2254
|
+
className: WheelModes_module_default.mode,
|
|
2255
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
2256
|
+
type: "radio",
|
|
2257
|
+
name: group,
|
|
2258
|
+
"aria-label": mode.name,
|
|
2259
|
+
checked: mode.typeId === active,
|
|
2260
|
+
disabled: onSelect === void 0,
|
|
2261
|
+
onChange: () => onSelect?.(mode.typeId)
|
|
2262
|
+
}), /* @__PURE__ */ jsx(Icon, {
|
|
2263
|
+
name: places[index].icon,
|
|
2264
|
+
size: 32
|
|
2265
|
+
})]
|
|
2266
|
+
})
|
|
2267
|
+
})
|
|
2268
|
+
}, mode.typeId);
|
|
2269
|
+
$[5] = active;
|
|
2270
|
+
$[6] = group;
|
|
2271
|
+
$[7] = onSelect;
|
|
2272
|
+
$[8] = t2;
|
|
2273
|
+
} else t2 = $[8];
|
|
2274
|
+
t1 = modes.slice(0, places.length).map(t2);
|
|
2275
|
+
$[0] = active;
|
|
2276
|
+
$[1] = group;
|
|
2277
|
+
$[2] = modes;
|
|
2278
|
+
$[3] = onSelect;
|
|
2279
|
+
$[4] = t1;
|
|
2280
|
+
} else t1 = $[4];
|
|
2281
|
+
let t2;
|
|
2282
|
+
if ($[9] !== t1) {
|
|
2283
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
2284
|
+
className: WheelModes_module_default.modes,
|
|
2285
|
+
role: "radiogroup",
|
|
2286
|
+
"aria-label": "Mode",
|
|
2287
|
+
children: t1
|
|
2288
|
+
});
|
|
2289
|
+
$[9] = t1;
|
|
2290
|
+
$[10] = t2;
|
|
2291
|
+
} else t2 = $[10];
|
|
2292
|
+
return t2;
|
|
2293
|
+
}
|
|
2294
|
+
//#endregion
|
|
2295
|
+
//#region src/components/ShipStatistics/units.ts
|
|
2296
|
+
/** For the `format` of `useAttribute`. */
|
|
2297
|
+
function unit(suffix, divisor = 1) {
|
|
2298
|
+
return (value, format) => `${formatNumber(value / divisor, format)}${suffix}`;
|
|
2299
|
+
}
|
|
2300
|
+
/** Like EVE's "0.11B hp": in billions above 100 million, in millions above 100 thousand. */
|
|
2301
|
+
function hitpoints(value, format) {
|
|
2302
|
+
const short = {
|
|
2303
|
+
...format,
|
|
2304
|
+
decimals: 2,
|
|
2305
|
+
fixed: true,
|
|
2306
|
+
rounding: "nearest"
|
|
2307
|
+
};
|
|
2308
|
+
if (value > 1e8) return unit("B hp", 1e9)(value, short);
|
|
2309
|
+
if (value > 1e5) return unit("M hp", 1e6)(value, short);
|
|
2310
|
+
return unit(" hp")(value, format);
|
|
2311
|
+
}
|
|
2312
|
+
//#endregion
|
|
2313
|
+
//#region src/components/FittingWheel/ModuleTooltip.module.css
|
|
2314
|
+
var ModuleTooltip_module_default = {
|
|
2315
|
+
"block": "_f5iUa_block",
|
|
2316
|
+
"bonus": "_f5iUa_bonus",
|
|
2317
|
+
"bonuses": "_f5iUa_bonuses",
|
|
2318
|
+
"damages": "_f5iUa_damages",
|
|
2319
|
+
"iconless": "_f5iUa_iconless",
|
|
2320
|
+
"line": "_f5iUa_line",
|
|
2321
|
+
"status": "_f5iUa_status",
|
|
2322
|
+
"tooltip": "_f5iUa_tooltip",
|
|
2323
|
+
"type": "_f5iUa_type"
|
|
2324
|
+
};
|
|
2325
|
+
//#endregion
|
|
2326
|
+
//#region src/components/FittingWheel/ModuleLines/Attribute.tsx
|
|
2327
|
+
/** A tooltip line with an icon. */
|
|
2328
|
+
function Line(t0) {
|
|
2329
|
+
const $ = c(6);
|
|
2330
|
+
const { src, className: t1, children } = t0;
|
|
2331
|
+
const className = t1 === void 0 ? ModuleTooltip_module_default.line : t1;
|
|
2332
|
+
let t2;
|
|
2333
|
+
if ($[0] !== src) {
|
|
2334
|
+
t2 = /* @__PURE__ */ jsx("img", {
|
|
2335
|
+
src,
|
|
2336
|
+
width: 24,
|
|
2337
|
+
height: 24,
|
|
2338
|
+
alt: "",
|
|
2339
|
+
draggable: false
|
|
2340
|
+
});
|
|
2341
|
+
$[0] = src;
|
|
2342
|
+
$[1] = t2;
|
|
2343
|
+
} else t2 = $[1];
|
|
2344
|
+
let t3;
|
|
2345
|
+
if ($[2] !== children || $[3] !== className || $[4] !== t2) {
|
|
2346
|
+
t3 = /* @__PURE__ */ jsxs("span", {
|
|
2347
|
+
className,
|
|
2348
|
+
children: [t2, children]
|
|
2349
|
+
});
|
|
2350
|
+
$[2] = children;
|
|
2351
|
+
$[3] = className;
|
|
2352
|
+
$[4] = t2;
|
|
2353
|
+
$[5] = t3;
|
|
2354
|
+
} else t3 = $[5];
|
|
2355
|
+
return t3;
|
|
2356
|
+
}
|
|
2357
|
+
/** A tooltip line with the icon of an attribute. */
|
|
2358
|
+
function Attribute(t0) {
|
|
2359
|
+
const $ = c(3);
|
|
2360
|
+
const { name, children } = t0;
|
|
2361
|
+
const t1 = useAttributeIcon(name);
|
|
2362
|
+
let t2;
|
|
2363
|
+
if ($[0] !== children || $[1] !== t1) {
|
|
2364
|
+
t2 = /* @__PURE__ */ jsx(Line, {
|
|
2365
|
+
src: t1,
|
|
2366
|
+
children
|
|
2367
|
+
});
|
|
2368
|
+
$[0] = children;
|
|
2369
|
+
$[1] = t1;
|
|
2370
|
+
$[2] = t2;
|
|
2371
|
+
} else t2 = $[2];
|
|
2372
|
+
return t2;
|
|
2373
|
+
}
|
|
2374
|
+
/** One value in a row of values, with the icon of its attribute. */
|
|
2375
|
+
function Bonus(t0) {
|
|
2376
|
+
const $ = c(3);
|
|
2377
|
+
const { name, text } = t0;
|
|
2378
|
+
const t1 = useAttributeIcon(name);
|
|
2379
|
+
let t2;
|
|
2380
|
+
if ($[0] !== t1 || $[1] !== text) {
|
|
2381
|
+
t2 = /* @__PURE__ */ jsx(Line, {
|
|
2382
|
+
src: t1,
|
|
2383
|
+
className: ModuleTooltip_module_default.bonus,
|
|
2384
|
+
children: text
|
|
2385
|
+
});
|
|
2386
|
+
$[0] = t1;
|
|
2387
|
+
$[1] = text;
|
|
2388
|
+
$[2] = t2;
|
|
2389
|
+
} else t2 = $[2];
|
|
2390
|
+
return t2;
|
|
2391
|
+
}
|
|
2392
|
+
function useAttributeIcon(name) {
|
|
2393
|
+
const $ = c(4);
|
|
2394
|
+
const sde = useSde();
|
|
2395
|
+
const images = useImages();
|
|
2396
|
+
let t0;
|
|
2397
|
+
if ($[0] !== images || $[1] !== name || $[2] !== sde) {
|
|
2398
|
+
const id = sde.attributeId(name);
|
|
2399
|
+
t0 = id === void 0 ? void 0 : images.attributeIcon(id);
|
|
2400
|
+
$[0] = images;
|
|
2401
|
+
$[1] = name;
|
|
2402
|
+
$[2] = sde;
|
|
2403
|
+
$[3] = t0;
|
|
2404
|
+
} else t0 = $[3];
|
|
2405
|
+
return t0;
|
|
2406
|
+
}
|
|
2407
|
+
//#endregion
|
|
2408
|
+
//#region src/components/FittingWheel/ModuleLines/MaxVelocity.tsx
|
|
2409
|
+
function MaxVelocity(t0) {
|
|
2410
|
+
const $ = c(4);
|
|
2411
|
+
const { state } = t0;
|
|
2412
|
+
let t1;
|
|
2413
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2414
|
+
t1 = {
|
|
2415
|
+
decimals: 2,
|
|
2416
|
+
fixed: true,
|
|
2417
|
+
grouping: false,
|
|
2418
|
+
format: unit(" m/s")
|
|
2419
|
+
};
|
|
2420
|
+
$[0] = t1;
|
|
2421
|
+
} else t1 = $[0];
|
|
2422
|
+
const velocity = useAttribute("maxVelocity", t1);
|
|
2423
|
+
const t2 = state === "active" || state === "overload" ? "with" : "without";
|
|
2424
|
+
let t3;
|
|
2425
|
+
if ($[1] !== t2 || $[2] !== velocity.text) {
|
|
2426
|
+
t3 = /* @__PURE__ */ jsxs(Attribute, {
|
|
2427
|
+
name: "maxVelocity",
|
|
2428
|
+
children: [
|
|
2429
|
+
"Max Velocity ",
|
|
2430
|
+
t2,
|
|
2431
|
+
": ",
|
|
2432
|
+
velocity.text
|
|
2433
|
+
]
|
|
2434
|
+
});
|
|
2435
|
+
$[1] = t2;
|
|
2436
|
+
$[2] = velocity.text;
|
|
2437
|
+
$[3] = t3;
|
|
2438
|
+
} else t3 = $[3];
|
|
2439
|
+
return t3;
|
|
2440
|
+
}
|
|
2441
|
+
//#endregion
|
|
2442
|
+
//#region src/components/FittingWheel/ModuleLines/ResistanceBonus.tsx
|
|
2443
|
+
function ResistanceBonus(t0) {
|
|
2444
|
+
const $ = c(13);
|
|
2445
|
+
const { itemRef } = t0;
|
|
2446
|
+
const sde = useSde();
|
|
2447
|
+
const t1 = useBonus("emDamageResistanceBonus", itemRef);
|
|
2448
|
+
const t2 = useBonus("explosiveDamageResistanceBonus", itemRef);
|
|
2449
|
+
const t3 = useBonus("kineticDamageResistanceBonus", itemRef);
|
|
2450
|
+
const t4 = useBonus("thermalDamageResistanceBonus", itemRef);
|
|
2451
|
+
let bonuses;
|
|
2452
|
+
let t5;
|
|
2453
|
+
if ($[0] !== sde || $[1] !== t1 || $[2] !== t2 || $[3] !== t3 || $[4] !== t4) {
|
|
2454
|
+
t5 = Symbol.for("react.early_return_sentinel");
|
|
2455
|
+
bb0: {
|
|
2456
|
+
bonuses = [
|
|
2457
|
+
t1,
|
|
2458
|
+
t2,
|
|
2459
|
+
t3,
|
|
2460
|
+
t4
|
|
2461
|
+
].filter(_temp$9);
|
|
2462
|
+
const [first] = bonuses;
|
|
2463
|
+
if (first === void 0) {
|
|
2464
|
+
t5 = null;
|
|
2465
|
+
break bb0;
|
|
2466
|
+
}
|
|
2467
|
+
if (bonuses.length === 1) {
|
|
2468
|
+
const { name, text } = first;
|
|
2469
|
+
const displayName = sde.attribute(sde.attributeId(name) ?? 0)?.displayName;
|
|
2470
|
+
let t6;
|
|
2471
|
+
if ($[7] !== displayName || $[8] !== name || $[9] !== text) {
|
|
2472
|
+
t6 = /* @__PURE__ */ jsxs(Attribute, {
|
|
2473
|
+
name,
|
|
2474
|
+
children: [
|
|
2475
|
+
text,
|
|
2476
|
+
" ",
|
|
2477
|
+
displayName
|
|
2478
|
+
]
|
|
2479
|
+
});
|
|
2480
|
+
$[7] = displayName;
|
|
2481
|
+
$[8] = name;
|
|
2482
|
+
$[9] = text;
|
|
2483
|
+
$[10] = t6;
|
|
2484
|
+
} else t6 = $[10];
|
|
2485
|
+
t5 = t6;
|
|
2486
|
+
break bb0;
|
|
2487
|
+
}
|
|
2488
|
+
}
|
|
2489
|
+
$[0] = sde;
|
|
2490
|
+
$[1] = t1;
|
|
2491
|
+
$[2] = t2;
|
|
2492
|
+
$[3] = t3;
|
|
2493
|
+
$[4] = t4;
|
|
2494
|
+
$[5] = bonuses;
|
|
2495
|
+
$[6] = t5;
|
|
2496
|
+
} else {
|
|
2497
|
+
bonuses = $[5];
|
|
2498
|
+
t5 = $[6];
|
|
2499
|
+
}
|
|
2500
|
+
if (t5 !== Symbol.for("react.early_return_sentinel")) return t5;
|
|
2501
|
+
let t6;
|
|
2502
|
+
if ($[11] !== bonuses) {
|
|
2503
|
+
t6 = /* @__PURE__ */ jsxs("span", {
|
|
2504
|
+
className: ModuleTooltip_module_default.block,
|
|
2505
|
+
children: ["Resistance Bonus:", /* @__PURE__ */ jsx("span", {
|
|
2506
|
+
className: ModuleTooltip_module_default.bonuses,
|
|
2507
|
+
children: bonuses.map(_temp2$7)
|
|
2508
|
+
})]
|
|
2509
|
+
});
|
|
2510
|
+
$[11] = bonuses;
|
|
2511
|
+
$[12] = t6;
|
|
2512
|
+
} else t6 = $[12];
|
|
2513
|
+
return t6;
|
|
2514
|
+
}
|
|
2515
|
+
function _temp2$7(t0) {
|
|
2516
|
+
const { name: name_0, text: text_0 } = t0;
|
|
2517
|
+
return /* @__PURE__ */ jsx(Bonus, {
|
|
2518
|
+
name: name_0,
|
|
2519
|
+
text: text_0
|
|
2520
|
+
}, name_0);
|
|
2521
|
+
}
|
|
2522
|
+
function _temp$9(bonus) {
|
|
2523
|
+
return bonus.value;
|
|
2524
|
+
}
|
|
2525
|
+
function useBonus(name, itemRef) {
|
|
2526
|
+
const $ = c(7);
|
|
2527
|
+
let t0;
|
|
2528
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2529
|
+
t0 = unit("%");
|
|
2530
|
+
$[0] = t0;
|
|
2531
|
+
} else t0 = $[0];
|
|
2532
|
+
let t1;
|
|
2533
|
+
if ($[1] !== itemRef) {
|
|
2534
|
+
t1 = {
|
|
2535
|
+
of: itemRef,
|
|
2536
|
+
decimals: 1,
|
|
2537
|
+
format: t0
|
|
2538
|
+
};
|
|
2539
|
+
$[1] = itemRef;
|
|
2540
|
+
$[2] = t1;
|
|
2541
|
+
} else t1 = $[2];
|
|
2542
|
+
const { value, text } = useAttribute(name, t1);
|
|
2543
|
+
let t2;
|
|
2544
|
+
if ($[3] !== name || $[4] !== text || $[5] !== value) {
|
|
2545
|
+
t2 = {
|
|
2546
|
+
name,
|
|
2547
|
+
value,
|
|
2548
|
+
text
|
|
2549
|
+
};
|
|
2550
|
+
$[3] = name;
|
|
2551
|
+
$[4] = text;
|
|
2552
|
+
$[5] = value;
|
|
2553
|
+
$[6] = t2;
|
|
2554
|
+
} else t2 = $[6];
|
|
2555
|
+
return t2;
|
|
2556
|
+
}
|
|
2557
|
+
//#endregion
|
|
2558
|
+
//#region src/components/FittingWheel/ModuleLines/Turret.tsx
|
|
2559
|
+
const meters = unit(" m");
|
|
2560
|
+
const hp = unit(" HP");
|
|
2561
|
+
function Turret(t0) {
|
|
2562
|
+
const $ = c(34);
|
|
2563
|
+
const { itemRef } = t0;
|
|
2564
|
+
let t1;
|
|
2565
|
+
if ($[0] !== itemRef) {
|
|
2566
|
+
t1 = {
|
|
2567
|
+
of: itemRef,
|
|
2568
|
+
decimals: 0,
|
|
2569
|
+
format: meters
|
|
2570
|
+
};
|
|
2571
|
+
$[0] = itemRef;
|
|
2572
|
+
$[1] = t1;
|
|
2573
|
+
} else t1 = $[1];
|
|
2574
|
+
const optimal = useAttribute("maxRange", t1);
|
|
2575
|
+
let t2;
|
|
2576
|
+
if ($[2] !== optimal.value) {
|
|
2577
|
+
t2 = (value, format) => meters(value + (optimal.value ?? 0), format);
|
|
2578
|
+
$[2] = optimal.value;
|
|
2579
|
+
$[3] = t2;
|
|
2580
|
+
} else t2 = $[3];
|
|
2581
|
+
let t3;
|
|
2582
|
+
if ($[4] !== itemRef || $[5] !== t2) {
|
|
2583
|
+
t3 = {
|
|
2584
|
+
of: itemRef,
|
|
2585
|
+
decimals: 0,
|
|
2586
|
+
format: t2
|
|
2587
|
+
};
|
|
2588
|
+
$[4] = itemRef;
|
|
2589
|
+
$[5] = t2;
|
|
2590
|
+
$[6] = t3;
|
|
2591
|
+
} else t3 = $[6];
|
|
2592
|
+
const falloff = useAttribute("falloff", t3);
|
|
2593
|
+
let t4;
|
|
2594
|
+
if ($[7] !== itemRef) {
|
|
2595
|
+
t4 = { of: itemRef };
|
|
2596
|
+
$[7] = itemRef;
|
|
2597
|
+
$[8] = t4;
|
|
2598
|
+
} else t4 = $[8];
|
|
2599
|
+
const spool = useAttribute("damageMultiplierBonusMax", t4).value;
|
|
2600
|
+
let t5;
|
|
2601
|
+
if ($[9] !== spool) {
|
|
2602
|
+
t5 = (value_0, format_0) => spool ? `${formatNumber(value_0 / (1 + spool), format_0)}-${formatNumber(value_0, format_0)}` : formatNumber(value_0, format_0);
|
|
2603
|
+
$[9] = spool;
|
|
2604
|
+
$[10] = t5;
|
|
2605
|
+
} else t5 = $[10];
|
|
2606
|
+
let t6;
|
|
2607
|
+
if ($[11] !== itemRef || $[12] !== t5) {
|
|
2608
|
+
t6 = {
|
|
2609
|
+
of: itemRef,
|
|
2610
|
+
decimals: 1,
|
|
2611
|
+
fixed: true,
|
|
2612
|
+
fallback: 0,
|
|
2613
|
+
format: t5
|
|
2614
|
+
};
|
|
2615
|
+
$[11] = itemRef;
|
|
2616
|
+
$[12] = t5;
|
|
2617
|
+
$[13] = t6;
|
|
2618
|
+
} else t6 = $[13];
|
|
2619
|
+
const dps = useAttribute("damagePerSecondWithoutReload", t6);
|
|
2620
|
+
let t7;
|
|
2621
|
+
if ($[14] !== itemRef) {
|
|
2622
|
+
t7 = {
|
|
2623
|
+
of: itemRef,
|
|
2624
|
+
decimals: 2,
|
|
2625
|
+
fixed: true
|
|
2626
|
+
};
|
|
2627
|
+
$[14] = itemRef;
|
|
2628
|
+
$[15] = t7;
|
|
2629
|
+
} else t7 = $[15];
|
|
2630
|
+
const tracking = useAttribute("trackingSpeed", t7);
|
|
2631
|
+
let t8;
|
|
2632
|
+
if ($[16] !== falloff.text) {
|
|
2633
|
+
t8 = /* @__PURE__ */ jsxs("span", { children: ["Falloff range within ", falloff.text] });
|
|
2634
|
+
$[16] = falloff.text;
|
|
2635
|
+
$[17] = t8;
|
|
2636
|
+
} else t8 = $[17];
|
|
2637
|
+
let t9;
|
|
2638
|
+
if ($[18] !== optimal.text) {
|
|
2639
|
+
t9 = /* @__PURE__ */ jsxs("span", { children: ["Optimal range within ", optimal.text] });
|
|
2640
|
+
$[18] = optimal.text;
|
|
2641
|
+
$[19] = t9;
|
|
2642
|
+
} else t9 = $[19];
|
|
2643
|
+
let t10;
|
|
2644
|
+
if ($[20] !== t8 || $[21] !== t9) {
|
|
2645
|
+
t10 = /* @__PURE__ */ jsx(Attribute, {
|
|
2646
|
+
name: "maxRange",
|
|
2647
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
2648
|
+
className: ModuleTooltip_module_default.block,
|
|
2649
|
+
children: [t8, t9]
|
|
2650
|
+
})
|
|
2651
|
+
});
|
|
2652
|
+
$[20] = t8;
|
|
2653
|
+
$[21] = t9;
|
|
2654
|
+
$[22] = t10;
|
|
2655
|
+
} else t10 = $[22];
|
|
2656
|
+
let t11;
|
|
2657
|
+
if ($[23] !== dps.text) {
|
|
2658
|
+
t11 = /* @__PURE__ */ jsxs(Attribute, {
|
|
2659
|
+
name: "damageMultiplier",
|
|
2660
|
+
children: ["Damage Per Second ", dps.text]
|
|
2661
|
+
});
|
|
2662
|
+
$[23] = dps.text;
|
|
2663
|
+
$[24] = t11;
|
|
2664
|
+
} else t11 = $[24];
|
|
2665
|
+
let t12;
|
|
2666
|
+
if ($[25] !== itemRef) {
|
|
2667
|
+
t12 = /* @__PURE__ */ jsx(DamageCaused, { itemRef });
|
|
2668
|
+
$[25] = itemRef;
|
|
2669
|
+
$[26] = t12;
|
|
2670
|
+
} else t12 = $[26];
|
|
2671
|
+
let t13;
|
|
2672
|
+
if ($[27] !== tracking.text) {
|
|
2673
|
+
t13 = /* @__PURE__ */ jsxs(Attribute, {
|
|
2674
|
+
name: "trackingSpeed",
|
|
2675
|
+
children: ["Turret Tracking: ", tracking.text]
|
|
2676
|
+
});
|
|
2677
|
+
$[27] = tracking.text;
|
|
2678
|
+
$[28] = t13;
|
|
2679
|
+
} else t13 = $[28];
|
|
2680
|
+
let t14;
|
|
2681
|
+
if ($[29] !== t10 || $[30] !== t11 || $[31] !== t12 || $[32] !== t13) {
|
|
2682
|
+
t14 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2683
|
+
t10,
|
|
2684
|
+
t11,
|
|
2685
|
+
t12,
|
|
2686
|
+
t13
|
|
2687
|
+
] });
|
|
2688
|
+
$[29] = t10;
|
|
2689
|
+
$[30] = t11;
|
|
2690
|
+
$[31] = t12;
|
|
2691
|
+
$[32] = t13;
|
|
2692
|
+
$[33] = t14;
|
|
2693
|
+
} else t14 = $[33];
|
|
2694
|
+
return t14;
|
|
2695
|
+
}
|
|
2696
|
+
function DamageCaused(t0) {
|
|
2697
|
+
const $ = c(9);
|
|
2698
|
+
const { itemRef } = t0;
|
|
2699
|
+
const multiplier = useAttribute("damageMultiplier", { of: itemRef }).value ?? 1;
|
|
2700
|
+
const t1 = useDamage("emDamage", itemRef);
|
|
2701
|
+
const t2 = useDamage("thermalDamage", itemRef);
|
|
2702
|
+
const t3 = useDamage("kineticDamage", itemRef);
|
|
2703
|
+
const t4 = useDamage("explosiveDamage", itemRef);
|
|
2704
|
+
let t5;
|
|
2705
|
+
if ($[0] !== t1 || $[1] !== t2 || $[2] !== t3 || $[3] !== t4) {
|
|
2706
|
+
t5 = [
|
|
2707
|
+
t1,
|
|
2708
|
+
t2,
|
|
2709
|
+
t3,
|
|
2710
|
+
t4
|
|
2711
|
+
].filter(_temp$8);
|
|
2712
|
+
$[0] = t1;
|
|
2713
|
+
$[1] = t2;
|
|
2714
|
+
$[2] = t3;
|
|
2715
|
+
$[3] = t4;
|
|
2716
|
+
$[4] = t5;
|
|
2717
|
+
} else t5 = $[4];
|
|
2718
|
+
const damages = t5;
|
|
2719
|
+
if (damages.length === 0) return null;
|
|
2720
|
+
let t6;
|
|
2721
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
2722
|
+
t6 = /* @__PURE__ */ jsx("span", {
|
|
2723
|
+
className: ModuleTooltip_module_default.iconless,
|
|
2724
|
+
children: "Damage caused"
|
|
2725
|
+
});
|
|
2726
|
+
$[5] = t6;
|
|
2727
|
+
} else t6 = $[5];
|
|
2728
|
+
let t7;
|
|
2729
|
+
if ($[6] !== damages || $[7] !== multiplier) {
|
|
2730
|
+
t7 = /* @__PURE__ */ jsxs(Fragment, { children: [t6, /* @__PURE__ */ jsx("span", {
|
|
2731
|
+
className: ModuleTooltip_module_default.damages,
|
|
2732
|
+
children: damages.map((t8) => {
|
|
2733
|
+
const { name, value: t9 } = t8;
|
|
2734
|
+
return /* @__PURE__ */ jsx(Bonus, {
|
|
2735
|
+
name,
|
|
2736
|
+
text: hp((t9 === void 0 ? 0 : t9) * multiplier, { decimals: 0 })
|
|
2737
|
+
}, name);
|
|
2738
|
+
})
|
|
2739
|
+
})] });
|
|
2740
|
+
$[6] = damages;
|
|
2741
|
+
$[7] = multiplier;
|
|
2742
|
+
$[8] = t7;
|
|
2743
|
+
} else t7 = $[8];
|
|
2744
|
+
return t7;
|
|
2745
|
+
}
|
|
2746
|
+
function _temp$8(damage) {
|
|
2747
|
+
return damage.value;
|
|
2748
|
+
}
|
|
2749
|
+
function useDamage(name, itemRef) {
|
|
2750
|
+
const $ = c(5);
|
|
2751
|
+
let t0;
|
|
2752
|
+
if ($[0] !== itemRef) {
|
|
2753
|
+
t0 = {
|
|
2754
|
+
of: itemRef,
|
|
2755
|
+
charge: true
|
|
2756
|
+
};
|
|
2757
|
+
$[0] = itemRef;
|
|
2758
|
+
$[1] = t0;
|
|
2759
|
+
} else t0 = $[1];
|
|
2760
|
+
const t1 = useAttribute(name, t0);
|
|
2761
|
+
let t2;
|
|
2762
|
+
if ($[2] !== name || $[3] !== t1.value) {
|
|
2763
|
+
t2 = {
|
|
2764
|
+
name,
|
|
2765
|
+
value: t1.value
|
|
2766
|
+
};
|
|
2767
|
+
$[2] = name;
|
|
2768
|
+
$[3] = t1.value;
|
|
2769
|
+
$[4] = t2;
|
|
2770
|
+
} else t2 = $[4];
|
|
2771
|
+
return t2;
|
|
2772
|
+
}
|
|
2773
|
+
//#endregion
|
|
2774
|
+
//#region src/components/FittingWheel/ModuleLines/index.tsx
|
|
2775
|
+
const lines = /* @__PURE__ */ new Map([
|
|
2776
|
+
["moduleBonusMicrowarpdrive", [MaxVelocity]],
|
|
2777
|
+
["moduleBonusAfterburner", [MaxVelocity]],
|
|
2778
|
+
["modifyArmorResonancePostPercent", [ResistanceBonus]],
|
|
2779
|
+
["modifyShieldResonancePostPercent", [ResistanceBonus]],
|
|
2780
|
+
["modifyActiveShieldResonancePostPercent", [ResistanceBonus]],
|
|
2781
|
+
["modifyActiveArmorResonancePostPercent", [ResistanceBonus]],
|
|
2782
|
+
["targetAttack", [Turret]],
|
|
2783
|
+
["projectileFired", [Turret]],
|
|
2784
|
+
["targetDisintegratorAttack", [Turret]]
|
|
2785
|
+
]);
|
|
2786
|
+
/** Tooltip lines from the effects of a module. */
|
|
2787
|
+
function ModuleLines(t0) {
|
|
2788
|
+
const $ = c(11);
|
|
2789
|
+
let props;
|
|
2790
|
+
let typeId;
|
|
2791
|
+
if ($[0] !== t0) {
|
|
2792
|
+
({typeId, ...props} = t0);
|
|
2793
|
+
$[0] = t0;
|
|
2794
|
+
$[1] = props;
|
|
2795
|
+
$[2] = typeId;
|
|
2796
|
+
} else {
|
|
2797
|
+
props = $[1];
|
|
2798
|
+
typeId = $[2];
|
|
2799
|
+
}
|
|
2800
|
+
const sde = useSde();
|
|
2801
|
+
const type = useType(typeId);
|
|
2802
|
+
let t1;
|
|
2803
|
+
if ($[3] !== sde || $[4] !== type?.effectIds) {
|
|
2804
|
+
t1 = new Set([...type?.effectIds ?? []].flatMap((id) => lines.get(sde.effect(id)?.name ?? "") ?? []));
|
|
2805
|
+
$[3] = sde;
|
|
2806
|
+
$[4] = type?.effectIds;
|
|
2807
|
+
$[5] = t1;
|
|
2808
|
+
} else t1 = $[5];
|
|
2809
|
+
const shown = t1;
|
|
2810
|
+
let t2;
|
|
2811
|
+
if ($[6] !== shown) {
|
|
2812
|
+
t2 = [...shown];
|
|
2813
|
+
$[6] = shown;
|
|
2814
|
+
$[7] = t2;
|
|
2815
|
+
} else t2 = $[7];
|
|
2816
|
+
let t3;
|
|
2817
|
+
if ($[8] !== props || $[9] !== t2) {
|
|
2818
|
+
t3 = t2.map((Line, index) => /* @__PURE__ */ jsx(Line, { ...props }, index));
|
|
2819
|
+
$[8] = props;
|
|
2820
|
+
$[9] = t2;
|
|
2821
|
+
$[10] = t3;
|
|
2822
|
+
} else t3 = $[10];
|
|
2823
|
+
return t3;
|
|
2824
|
+
}
|
|
2825
|
+
//#endregion
|
|
2826
|
+
//#region src/components/FittingWheel/ModuleTooltip.tsx
|
|
2827
|
+
/** What EVE shows when hovering a fitted module. */
|
|
2828
|
+
function ModuleTooltip(t0) {
|
|
2829
|
+
const $ = c(19);
|
|
2830
|
+
const { rack, itemRef, typeId, chargeTypeId, state, maxState } = t0;
|
|
2831
|
+
let t1;
|
|
2832
|
+
if ($[0] !== maxState || $[1] !== rack || $[2] !== state) {
|
|
2833
|
+
t1 = moduleStatus(rack, state, maxState);
|
|
2834
|
+
$[0] = maxState;
|
|
2835
|
+
$[1] = rack;
|
|
2836
|
+
$[2] = state;
|
|
2837
|
+
$[3] = t1;
|
|
2838
|
+
} else t1 = $[3];
|
|
2839
|
+
const status = t1;
|
|
2840
|
+
let t2;
|
|
2841
|
+
if ($[4] !== typeId) {
|
|
2842
|
+
t2 = /* @__PURE__ */ jsx(TypeRow, { typeId });
|
|
2843
|
+
$[4] = typeId;
|
|
2844
|
+
$[5] = t2;
|
|
2845
|
+
} else t2 = $[5];
|
|
2846
|
+
let t3;
|
|
2847
|
+
if ($[6] !== chargeTypeId) {
|
|
2848
|
+
t3 = chargeTypeId !== void 0 && /* @__PURE__ */ jsx(TypeRow, { typeId: chargeTypeId });
|
|
2849
|
+
$[6] = chargeTypeId;
|
|
2850
|
+
$[7] = t3;
|
|
2851
|
+
} else t3 = $[7];
|
|
2852
|
+
let t4;
|
|
2853
|
+
if ($[8] !== itemRef || $[9] !== state || $[10] !== typeId) {
|
|
2854
|
+
t4 = /* @__PURE__ */ jsx(ModuleLines, {
|
|
2855
|
+
typeId,
|
|
2856
|
+
itemRef,
|
|
2857
|
+
state
|
|
2858
|
+
});
|
|
2859
|
+
$[8] = itemRef;
|
|
2860
|
+
$[9] = state;
|
|
2861
|
+
$[10] = typeId;
|
|
2862
|
+
$[11] = t4;
|
|
2863
|
+
} else t4 = $[11];
|
|
2864
|
+
let t5;
|
|
2865
|
+
if ($[12] !== status) {
|
|
2866
|
+
t5 = status && /* @__PURE__ */ jsx("span", {
|
|
2867
|
+
className: ModuleTooltip_module_default.status,
|
|
2868
|
+
"data-tone": status.tone,
|
|
2869
|
+
children: status.text
|
|
2870
|
+
});
|
|
2871
|
+
$[12] = status;
|
|
2872
|
+
$[13] = t5;
|
|
2873
|
+
} else t5 = $[13];
|
|
2874
|
+
let t6;
|
|
2875
|
+
if ($[14] !== t2 || $[15] !== t3 || $[16] !== t4 || $[17] !== t5) {
|
|
2876
|
+
t6 = /* @__PURE__ */ jsxs("span", {
|
|
2877
|
+
className: ModuleTooltip_module_default.tooltip,
|
|
2878
|
+
children: [
|
|
2879
|
+
t2,
|
|
2880
|
+
t3,
|
|
2881
|
+
t4,
|
|
2882
|
+
t5
|
|
2883
|
+
]
|
|
2884
|
+
});
|
|
2885
|
+
$[14] = t2;
|
|
2886
|
+
$[15] = t3;
|
|
2887
|
+
$[16] = t4;
|
|
2888
|
+
$[17] = t5;
|
|
2889
|
+
$[18] = t6;
|
|
2890
|
+
} else t6 = $[18];
|
|
2891
|
+
return t6;
|
|
2892
|
+
}
|
|
2893
|
+
function TypeRow(t0) {
|
|
2894
|
+
const $ = c(5);
|
|
2895
|
+
const { typeId } = t0;
|
|
2896
|
+
const type = useType(typeId);
|
|
2897
|
+
let t1;
|
|
2898
|
+
if ($[0] !== typeId) {
|
|
2899
|
+
t1 = /* @__PURE__ */ jsx(TypeIcon, {
|
|
2900
|
+
typeId,
|
|
2901
|
+
size: 24
|
|
2902
|
+
});
|
|
2903
|
+
$[0] = typeId;
|
|
2904
|
+
$[1] = t1;
|
|
2905
|
+
} else t1 = $[1];
|
|
2906
|
+
const t2 = type?.name;
|
|
2907
|
+
let t3;
|
|
2908
|
+
if ($[2] !== t1 || $[3] !== t2) {
|
|
2909
|
+
t3 = /* @__PURE__ */ jsxs("span", {
|
|
2910
|
+
className: ModuleTooltip_module_default.type,
|
|
2911
|
+
children: [t1, t2]
|
|
2912
|
+
});
|
|
2913
|
+
$[2] = t1;
|
|
2914
|
+
$[3] = t2;
|
|
2915
|
+
$[4] = t3;
|
|
2916
|
+
} else t3 = $[4];
|
|
2917
|
+
return t3;
|
|
2918
|
+
}
|
|
2919
|
+
/** The last line of the tooltip; none for subsystems. */
|
|
2920
|
+
function moduleStatus(rack, state, maxState) {
|
|
2921
|
+
if (rack === "subsystem") return void 0;
|
|
2922
|
+
if (rack === "rig") return state === "offline" ? {
|
|
2923
|
+
text: "Inactive Rig",
|
|
2924
|
+
tone: "muted"
|
|
2925
|
+
} : {
|
|
2926
|
+
text: "Active Rig",
|
|
2927
|
+
tone: "normal"
|
|
2928
|
+
};
|
|
2929
|
+
const module = maxState === "online" ? "Passive Module" : "Module";
|
|
2930
|
+
if (state === "offline") return {
|
|
2931
|
+
text: `Offline ${module}`,
|
|
2932
|
+
tone: "muted"
|
|
2933
|
+
};
|
|
2934
|
+
if (state === "overload") return {
|
|
2935
|
+
text: "Overheated Module",
|
|
2936
|
+
tone: "overload"
|
|
2937
|
+
};
|
|
2938
|
+
if (state === "active") return {
|
|
2939
|
+
text: "Active Module",
|
|
2940
|
+
tone: "active"
|
|
2941
|
+
};
|
|
2942
|
+
return {
|
|
2943
|
+
text: `Online ${module}`,
|
|
2944
|
+
tone: "normal"
|
|
2945
|
+
};
|
|
2946
|
+
}
|
|
2947
|
+
//#endregion
|
|
2948
|
+
//#region src/components/FittingWheel/states.ts
|
|
2949
|
+
const states = [
|
|
2950
|
+
"offline",
|
|
2951
|
+
"online",
|
|
2952
|
+
"active",
|
|
2953
|
+
"overload"
|
|
2954
|
+
];
|
|
2955
|
+
/** The state after `state` among those up to `max`, going round to offline after the last; before it with `back`. */
|
|
2956
|
+
function nextState(state, max, back = false) {
|
|
2957
|
+
const allowed = states.slice(0, states.indexOf(max) + 1);
|
|
2958
|
+
const step = back ? allowed.length - 1 : 1;
|
|
2959
|
+
return allowed[(allowed.indexOf(state) + step) % allowed.length];
|
|
2960
|
+
}
|
|
2961
|
+
//#endregion
|
|
2962
|
+
//#region src/components/FittingWheel/fittingSlot.tsx
|
|
2963
|
+
const switchedRacks = [
|
|
2964
|
+
"high",
|
|
2965
|
+
"medium",
|
|
2966
|
+
"low",
|
|
2967
|
+
"rig",
|
|
2968
|
+
"service"
|
|
2969
|
+
];
|
|
2970
|
+
/** What a slot of the fit shows, and what clicking, dragging and dropping on it does. */
|
|
2971
|
+
function useFittingSlot(rack, index, content, available, t0) {
|
|
2972
|
+
const $ = c(86);
|
|
2973
|
+
const readOnly = t0 === void 0 ? false : t0;
|
|
2974
|
+
const store = useFitStore();
|
|
2975
|
+
const sde = useSde();
|
|
2976
|
+
const fit = useFit();
|
|
2977
|
+
const placement = usePlacement();
|
|
2978
|
+
const { show, clear } = usePreview();
|
|
2979
|
+
const { dragging, start, end } = useDrag();
|
|
2980
|
+
const item = content?.item;
|
|
2981
|
+
const stats = content?.stats;
|
|
2982
|
+
const type = useType(item?.type_id);
|
|
2983
|
+
const charges = useCharges(item?.type_id);
|
|
2984
|
+
const ref = content?.ref;
|
|
2985
|
+
let t1;
|
|
2986
|
+
if ($[0] !== rack || $[1] !== ref || $[2] !== stats) {
|
|
2987
|
+
t1 = ref !== void 0 && stats !== void 0 && switchedRacks.includes(rack);
|
|
2988
|
+
$[0] = rack;
|
|
2989
|
+
$[1] = ref;
|
|
2990
|
+
$[2] = stats;
|
|
2991
|
+
$[3] = t1;
|
|
2992
|
+
} else t1 = $[3];
|
|
2993
|
+
const switchable = t1;
|
|
2994
|
+
const target = `${rack}-${index}`;
|
|
2995
|
+
let t2;
|
|
2996
|
+
if ($[4] !== available || $[5] !== charges || $[6] !== fit || $[7] !== index || $[8] !== placement || $[9] !== rack || $[10] !== ref || $[11] !== sde) {
|
|
2997
|
+
t2 = (drop) => {
|
|
2998
|
+
if (!available || drop === void 0 || drop.type === "hull") return false;
|
|
2999
|
+
if (drop.type === "item") return movesTo(fit, drop.ref, rack, index);
|
|
3000
|
+
const dropped = sde.type(drop.typeId);
|
|
3001
|
+
if (dropped === void 0) return false;
|
|
3002
|
+
const place = placement(dropped);
|
|
3003
|
+
if (place?.type === "charge") return ref !== void 0 && charges.includes(dropped);
|
|
3004
|
+
return place?.type === rack && (place.type !== "subsystem" || place.index === index);
|
|
3005
|
+
};
|
|
3006
|
+
$[4] = available;
|
|
3007
|
+
$[5] = charges;
|
|
3008
|
+
$[6] = fit;
|
|
3009
|
+
$[7] = index;
|
|
3010
|
+
$[8] = placement;
|
|
2185
3011
|
$[9] = rack;
|
|
2186
3012
|
$[10] = ref;
|
|
2187
3013
|
$[11] = sde;
|
|
2188
|
-
$[12] =
|
|
2189
|
-
} else
|
|
2190
|
-
const takes =
|
|
2191
|
-
const
|
|
2192
|
-
const
|
|
2193
|
-
const
|
|
2194
|
-
const
|
|
2195
|
-
const
|
|
2196
|
-
const
|
|
2197
|
-
const
|
|
2198
|
-
const
|
|
2199
|
-
let t10;
|
|
2200
|
-
if ($[13] !== ref || $[14] !== stats || $[15] !== store || $[16] !== switchable) {
|
|
2201
|
-
t10 = switchable ? (event) => store.setState(ref, nextState(stats.state, stats.maxState, event.shiftKey)) : void 0;
|
|
2202
|
-
$[13] = ref;
|
|
2203
|
-
$[14] = stats;
|
|
2204
|
-
$[15] = store;
|
|
2205
|
-
$[16] = switchable;
|
|
2206
|
-
$[17] = t10;
|
|
2207
|
-
} else t10 = $[17];
|
|
3014
|
+
$[12] = t2;
|
|
3015
|
+
} else t2 = $[12];
|
|
3016
|
+
const takes = t2;
|
|
3017
|
+
const t3 = content?.preview;
|
|
3018
|
+
const t4 = item?.type_id;
|
|
3019
|
+
const t5 = type?.name;
|
|
3020
|
+
const t6 = item?.charge?.type_id;
|
|
3021
|
+
const t7 = charges.length > 0;
|
|
3022
|
+
const t8 = stats?.state;
|
|
3023
|
+
const t9 = stats?.maxState === "active" || stats?.maxState === "overload";
|
|
3024
|
+
const t10 = type && stats && `${type.name}, ${stats.state}`;
|
|
2208
3025
|
let t11;
|
|
2209
|
-
if ($[
|
|
2210
|
-
t11 = ref
|
|
3026
|
+
if ($[13] !== content || $[14] !== item || $[15] !== rack || $[16] !== ref || $[17] !== stats) {
|
|
3027
|
+
t11 = item && stats && ref !== void 0 && !content.preview ? /* @__PURE__ */ jsx(ModuleTooltip, {
|
|
3028
|
+
rack,
|
|
3029
|
+
itemRef: ref,
|
|
3030
|
+
typeId: item.type_id,
|
|
3031
|
+
chargeTypeId: item.charge?.type_id,
|
|
3032
|
+
state: stats.state,
|
|
3033
|
+
maxState: stats.maxState
|
|
3034
|
+
}) : void 0;
|
|
3035
|
+
$[13] = content;
|
|
3036
|
+
$[14] = item;
|
|
3037
|
+
$[15] = rack;
|
|
3038
|
+
$[16] = ref;
|
|
3039
|
+
$[17] = stats;
|
|
3040
|
+
$[18] = t11;
|
|
3041
|
+
} else t11 = $[18];
|
|
3042
|
+
let t12;
|
|
3043
|
+
if ($[19] !== available || $[20] !== t10 || $[21] !== t11 || $[22] !== t3 || $[23] !== t4 || $[24] !== t5 || $[25] !== t6 || $[26] !== t7 || $[27] !== t8 || $[28] !== t9) {
|
|
3044
|
+
t12 = {
|
|
3045
|
+
available,
|
|
3046
|
+
preview: t3,
|
|
3047
|
+
typeId: t4,
|
|
3048
|
+
typeName: t5,
|
|
3049
|
+
chargeTypeId: t6,
|
|
3050
|
+
chargeable: t7,
|
|
3051
|
+
state: t8,
|
|
3052
|
+
activatable: t9,
|
|
3053
|
+
label: t10,
|
|
3054
|
+
tooltip: t11
|
|
3055
|
+
};
|
|
3056
|
+
$[19] = available;
|
|
3057
|
+
$[20] = t10;
|
|
3058
|
+
$[21] = t11;
|
|
3059
|
+
$[22] = t3;
|
|
3060
|
+
$[23] = t4;
|
|
3061
|
+
$[24] = t5;
|
|
3062
|
+
$[25] = t6;
|
|
3063
|
+
$[26] = t7;
|
|
3064
|
+
$[27] = t8;
|
|
3065
|
+
$[28] = t9;
|
|
3066
|
+
$[29] = t12;
|
|
3067
|
+
} else t12 = $[29];
|
|
3068
|
+
const shown = t12;
|
|
3069
|
+
if (readOnly) {
|
|
3070
|
+
let t13;
|
|
3071
|
+
if ($[30] !== shown) {
|
|
3072
|
+
t13 = {
|
|
3073
|
+
...shown,
|
|
3074
|
+
actions: false
|
|
3075
|
+
};
|
|
3076
|
+
$[30] = shown;
|
|
3077
|
+
$[31] = t13;
|
|
3078
|
+
} else t13 = $[31];
|
|
3079
|
+
return t13;
|
|
3080
|
+
}
|
|
3081
|
+
let t13;
|
|
3082
|
+
if ($[32] !== ref || $[33] !== stats || $[34] !== store || $[35] !== switchable) {
|
|
3083
|
+
t13 = switchable ? (event) => store.setState(ref, nextState(stats.state, stats.maxState, event.shiftKey)) : void 0;
|
|
3084
|
+
$[32] = ref;
|
|
3085
|
+
$[33] = stats;
|
|
3086
|
+
$[34] = store;
|
|
3087
|
+
$[35] = switchable;
|
|
3088
|
+
$[36] = t13;
|
|
3089
|
+
} else t13 = $[36];
|
|
3090
|
+
let t14;
|
|
3091
|
+
if ($[37] !== ref || $[38] !== start || $[39] !== type?.name) {
|
|
3092
|
+
t14 = ref === void 0 ? void 0 : (event_0) => {
|
|
2211
3093
|
event_0.dataTransfer.effectAllowed = "move";
|
|
2212
3094
|
event_0.dataTransfer.setData("text/plain", type?.name ?? "");
|
|
2213
3095
|
start({
|
|
@@ -2215,14 +3097,14 @@ function useFittingSlot(rack, index, content, available) {
|
|
|
2215
3097
|
ref
|
|
2216
3098
|
});
|
|
2217
3099
|
};
|
|
2218
|
-
$[
|
|
2219
|
-
$[
|
|
2220
|
-
$[
|
|
2221
|
-
$[
|
|
2222
|
-
} else
|
|
2223
|
-
let
|
|
2224
|
-
if ($[
|
|
2225
|
-
|
|
3100
|
+
$[37] = ref;
|
|
3101
|
+
$[38] = start;
|
|
3102
|
+
$[39] = type?.name;
|
|
3103
|
+
$[40] = t14;
|
|
3104
|
+
} else t14 = $[40];
|
|
3105
|
+
let t15;
|
|
3106
|
+
if ($[41] !== dragging || $[42] !== index || $[43] !== rack || $[44] !== show || $[45] !== takes || $[46] !== target) {
|
|
3107
|
+
t15 = () => {
|
|
2226
3108
|
if (!takes(dragging)) return;
|
|
2227
3109
|
const slot = {
|
|
2228
3110
|
type: rack,
|
|
@@ -2236,36 +3118,36 @@ function useFittingSlot(rack, index, content, available) {
|
|
|
2236
3118
|
show((draft_0) => draft_0.move(moved, slot), target);
|
|
2237
3119
|
}
|
|
2238
3120
|
};
|
|
2239
|
-
$[
|
|
2240
|
-
$[
|
|
2241
|
-
$[
|
|
2242
|
-
$[
|
|
2243
|
-
$[
|
|
2244
|
-
$[
|
|
2245
|
-
$[
|
|
2246
|
-
} else
|
|
2247
|
-
let
|
|
2248
|
-
if ($[
|
|
2249
|
-
|
|
3121
|
+
$[41] = dragging;
|
|
3122
|
+
$[42] = index;
|
|
3123
|
+
$[43] = rack;
|
|
3124
|
+
$[44] = show;
|
|
3125
|
+
$[45] = takes;
|
|
3126
|
+
$[46] = target;
|
|
3127
|
+
$[47] = t15;
|
|
3128
|
+
} else t15 = $[47];
|
|
3129
|
+
let t16;
|
|
3130
|
+
if ($[48] !== clear || $[49] !== target) {
|
|
3131
|
+
t16 = (event_1) => {
|
|
2250
3132
|
if (event_1.currentTarget.contains(event_1.relatedTarget)) return;
|
|
2251
3133
|
clear(target);
|
|
2252
3134
|
};
|
|
2253
|
-
$[
|
|
2254
|
-
$[
|
|
2255
|
-
$[
|
|
2256
|
-
} else
|
|
2257
|
-
let
|
|
2258
|
-
if ($[
|
|
2259
|
-
|
|
3135
|
+
$[48] = clear;
|
|
3136
|
+
$[49] = target;
|
|
3137
|
+
$[50] = t16;
|
|
3138
|
+
} else t16 = $[50];
|
|
3139
|
+
let t17;
|
|
3140
|
+
if ($[51] !== dragging || $[52] !== takes) {
|
|
3141
|
+
t17 = (event_2) => {
|
|
2260
3142
|
if (takes(dragging)) allowDrop(event_2, dragging);
|
|
2261
3143
|
};
|
|
2262
|
-
$[
|
|
2263
|
-
$[
|
|
2264
|
-
$[
|
|
2265
|
-
} else
|
|
2266
|
-
let
|
|
2267
|
-
if ($[
|
|
2268
|
-
|
|
3144
|
+
$[51] = dragging;
|
|
3145
|
+
$[52] = takes;
|
|
3146
|
+
$[53] = t17;
|
|
3147
|
+
} else t17 = $[53];
|
|
3148
|
+
let t18;
|
|
3149
|
+
if ($[54] !== clear || $[55] !== dragging || $[56] !== end || $[57] !== index || $[58] !== rack || $[59] !== store || $[60] !== takes || $[61] !== target) {
|
|
3150
|
+
t18 = (event_3) => {
|
|
2269
3151
|
if (!takes(dragging)) return;
|
|
2270
3152
|
event_3.preventDefault();
|
|
2271
3153
|
clear(target);
|
|
@@ -2279,84 +3161,68 @@ function useFittingSlot(rack, index, content, available) {
|
|
|
2279
3161
|
});
|
|
2280
3162
|
end();
|
|
2281
3163
|
};
|
|
2282
|
-
$[
|
|
2283
|
-
$[
|
|
2284
|
-
$[
|
|
2285
|
-
$[
|
|
2286
|
-
$[
|
|
2287
|
-
$[
|
|
2288
|
-
$[
|
|
2289
|
-
$[
|
|
2290
|
-
$[
|
|
2291
|
-
} else
|
|
2292
|
-
let t16;
|
|
2293
|
-
if ($[44] !== ref || $[45] !== store) {
|
|
2294
|
-
t16 = ref === void 0 ? void 0 : () => store.remove(ref);
|
|
2295
|
-
$[44] = ref;
|
|
2296
|
-
$[45] = store;
|
|
2297
|
-
$[46] = t16;
|
|
2298
|
-
} else t16 = $[46];
|
|
2299
|
-
let t17;
|
|
2300
|
-
if ($[47] !== ref || $[48] !== store) {
|
|
2301
|
-
t17 = ref === void 0 ? void 0 : () => store.setCharge(ref, void 0);
|
|
2302
|
-
$[47] = ref;
|
|
2303
|
-
$[48] = store;
|
|
2304
|
-
$[49] = t17;
|
|
2305
|
-
} else t17 = $[49];
|
|
2306
|
-
let t18;
|
|
2307
|
-
if ($[50] !== ref || $[51] !== stats || $[52] !== store || $[53] !== switchable) {
|
|
2308
|
-
t18 = switchable && stats.maxState !== "offline" ? () => store.setState(ref, stats.state === "offline" ? "online" : "offline") : void 0;
|
|
2309
|
-
$[50] = ref;
|
|
2310
|
-
$[51] = stats;
|
|
2311
|
-
$[52] = store;
|
|
2312
|
-
$[53] = switchable;
|
|
2313
|
-
$[54] = t18;
|
|
2314
|
-
} else t18 = $[54];
|
|
3164
|
+
$[54] = clear;
|
|
3165
|
+
$[55] = dragging;
|
|
3166
|
+
$[56] = end;
|
|
3167
|
+
$[57] = index;
|
|
3168
|
+
$[58] = rack;
|
|
3169
|
+
$[59] = store;
|
|
3170
|
+
$[60] = takes;
|
|
3171
|
+
$[61] = target;
|
|
3172
|
+
$[62] = t18;
|
|
3173
|
+
} else t18 = $[62];
|
|
2315
3174
|
let t19;
|
|
2316
|
-
if ($[
|
|
2317
|
-
t19 =
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
3175
|
+
if ($[63] !== ref || $[64] !== store) {
|
|
3176
|
+
t19 = ref === void 0 ? void 0 : () => store.remove(ref);
|
|
3177
|
+
$[63] = ref;
|
|
3178
|
+
$[64] = store;
|
|
3179
|
+
$[65] = t19;
|
|
3180
|
+
} else t19 = $[65];
|
|
3181
|
+
let t20;
|
|
3182
|
+
if ($[66] !== ref || $[67] !== store) {
|
|
3183
|
+
t20 = ref === void 0 ? void 0 : () => store.setCharge(ref, void 0);
|
|
3184
|
+
$[66] = ref;
|
|
3185
|
+
$[67] = store;
|
|
3186
|
+
$[68] = t20;
|
|
3187
|
+
} else t20 = $[68];
|
|
3188
|
+
let t21;
|
|
3189
|
+
if ($[69] !== ref || $[70] !== stats || $[71] !== store || $[72] !== switchable) {
|
|
3190
|
+
t21 = switchable && stats.maxState !== "offline" ? () => store.setState(ref, stats.state === "offline" ? "online" : "offline") : void 0;
|
|
3191
|
+
$[69] = ref;
|
|
3192
|
+
$[70] = stats;
|
|
3193
|
+
$[71] = store;
|
|
3194
|
+
$[72] = switchable;
|
|
3195
|
+
$[73] = t21;
|
|
3196
|
+
} else t21 = $[73];
|
|
3197
|
+
let t22;
|
|
3198
|
+
if ($[74] !== end || $[75] !== shown || $[76] !== t13 || $[77] !== t14 || $[78] !== t15 || $[79] !== t16 || $[80] !== t17 || $[81] !== t18 || $[82] !== t19 || $[83] !== t20 || $[84] !== t21) {
|
|
3199
|
+
t22 = {
|
|
3200
|
+
...shown,
|
|
3201
|
+
onPress: t13,
|
|
3202
|
+
onDragStart: t14,
|
|
2329
3203
|
onDragEnd: end,
|
|
2330
|
-
onDragEnter:
|
|
2331
|
-
onDragLeave:
|
|
2332
|
-
onDragOver:
|
|
2333
|
-
onDrop:
|
|
2334
|
-
onUnfit:
|
|
2335
|
-
onRemoveCharge:
|
|
2336
|
-
onTogglePower:
|
|
3204
|
+
onDragEnter: t15,
|
|
3205
|
+
onDragLeave: t16,
|
|
3206
|
+
onDragOver: t17,
|
|
3207
|
+
onDrop: t18,
|
|
3208
|
+
onUnfit: t19,
|
|
3209
|
+
onRemoveCharge: t20,
|
|
3210
|
+
onTogglePower: t21
|
|
2337
3211
|
};
|
|
2338
|
-
$[
|
|
2339
|
-
$[
|
|
2340
|
-
$[
|
|
2341
|
-
$[
|
|
2342
|
-
$[
|
|
2343
|
-
$[
|
|
2344
|
-
$[
|
|
2345
|
-
$[
|
|
2346
|
-
$[
|
|
2347
|
-
$[
|
|
2348
|
-
$[
|
|
2349
|
-
$[
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
$[69] = t5;
|
|
2353
|
-
$[70] = t6;
|
|
2354
|
-
$[71] = t7;
|
|
2355
|
-
$[72] = t8;
|
|
2356
|
-
$[73] = t9;
|
|
2357
|
-
$[74] = t19;
|
|
2358
|
-
} else t19 = $[74];
|
|
2359
|
-
return t19;
|
|
3212
|
+
$[74] = end;
|
|
3213
|
+
$[75] = shown;
|
|
3214
|
+
$[76] = t13;
|
|
3215
|
+
$[77] = t14;
|
|
3216
|
+
$[78] = t15;
|
|
3217
|
+
$[79] = t16;
|
|
3218
|
+
$[80] = t17;
|
|
3219
|
+
$[81] = t18;
|
|
3220
|
+
$[82] = t19;
|
|
3221
|
+
$[83] = t20;
|
|
3222
|
+
$[84] = t21;
|
|
3223
|
+
$[85] = t22;
|
|
3224
|
+
} else t22 = $[85];
|
|
3225
|
+
return t22;
|
|
2360
3226
|
}
|
|
2361
3227
|
function allowDrop(event, dragging) {
|
|
2362
3228
|
event.preventDefault();
|
|
@@ -2387,76 +3253,79 @@ const racks = [
|
|
|
2387
3253
|
];
|
|
2388
3254
|
/** The fitting wheel of the fit in the surrounding `EveShipFitProvider`. */
|
|
2389
3255
|
function FittingWheel(t0) {
|
|
2390
|
-
const $ = c(
|
|
2391
|
-
const { label: t1 } = t0;
|
|
3256
|
+
const $ = c(21);
|
|
3257
|
+
const { label: t1, readOnly: t2, hideStats: t3 } = t0;
|
|
2392
3258
|
const label = t1 === void 0 ? "Fitting" : t1;
|
|
3259
|
+
const readOnly = t2 === void 0 ? false : t2;
|
|
3260
|
+
const hideStats = t3 === void 0 ? false : t3;
|
|
2393
3261
|
const ship = useFit().ship.type_id;
|
|
2394
3262
|
const { turret, launcher } = useHardpoints();
|
|
2395
|
-
let
|
|
3263
|
+
let t4;
|
|
2396
3264
|
if ($[0] !== ship) {
|
|
2397
|
-
|
|
3265
|
+
t4 = /* @__PURE__ */ jsx(WheelHull, { typeId: ship });
|
|
2398
3266
|
$[0] = ship;
|
|
2399
|
-
$[1] =
|
|
2400
|
-
} else
|
|
2401
|
-
let t3;
|
|
2402
|
-
let t4;
|
|
3267
|
+
$[1] = t4;
|
|
3268
|
+
} else t4 = $[1];
|
|
2403
3269
|
let t5;
|
|
2404
|
-
if ($[2]
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
$[3] = t4;
|
|
2410
|
-
$[4] = t5;
|
|
2411
|
-
} else {
|
|
2412
|
-
t3 = $[2];
|
|
2413
|
-
t4 = $[3];
|
|
2414
|
-
t5 = $[4];
|
|
2415
|
-
}
|
|
3270
|
+
if ($[2] !== readOnly) {
|
|
3271
|
+
t5 = !readOnly && /* @__PURE__ */ jsx(FittingCentre, {});
|
|
3272
|
+
$[2] = readOnly;
|
|
3273
|
+
$[3] = t5;
|
|
3274
|
+
} else t5 = $[3];
|
|
2416
3275
|
let t6;
|
|
2417
|
-
if ($[
|
|
2418
|
-
t6 =
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
});
|
|
2422
|
-
$[5] = launcher;
|
|
2423
|
-
$[6] = turret;
|
|
2424
|
-
$[7] = t6;
|
|
2425
|
-
} else t6 = $[7];
|
|
3276
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
3277
|
+
t6 = markedRacks.map(_temp$7);
|
|
3278
|
+
$[4] = t6;
|
|
3279
|
+
} else t6 = $[4];
|
|
2426
3280
|
let t7;
|
|
3281
|
+
if ($[5] !== readOnly) {
|
|
3282
|
+
t7 = racks.map((rack_0) => /* @__PURE__ */ jsx(FittingRack, {
|
|
3283
|
+
rack: rack_0,
|
|
3284
|
+
readOnly
|
|
3285
|
+
}, rack_0));
|
|
3286
|
+
$[5] = readOnly;
|
|
3287
|
+
$[6] = t7;
|
|
3288
|
+
} else t7 = $[6];
|
|
2427
3289
|
let t8;
|
|
3290
|
+
if ($[7] !== readOnly) {
|
|
3291
|
+
t8 = /* @__PURE__ */ jsx(FittingModes, { readOnly });
|
|
3292
|
+
$[7] = readOnly;
|
|
3293
|
+
$[8] = t8;
|
|
3294
|
+
} else t8 = $[8];
|
|
2428
3295
|
let t9;
|
|
2429
|
-
if ($[
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
3296
|
+
if ($[9] !== hideStats || $[10] !== launcher || $[11] !== turret) {
|
|
3297
|
+
t9 = !hideStats && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3298
|
+
/* @__PURE__ */ jsx(WheelHardpoints, {
|
|
3299
|
+
turrets: turret,
|
|
3300
|
+
launchers: launcher
|
|
3301
|
+
}),
|
|
3302
|
+
/* @__PURE__ */ jsx(FittingGauge, {
|
|
3303
|
+
resource: "cpu",
|
|
3304
|
+
load: "cpuLoad",
|
|
3305
|
+
output: "cpuOutput"
|
|
3306
|
+
}),
|
|
3307
|
+
/* @__PURE__ */ jsx(FittingGauge, {
|
|
3308
|
+
resource: "powergrid",
|
|
3309
|
+
load: "powerLoad",
|
|
3310
|
+
output: "powerOutput"
|
|
3311
|
+
}),
|
|
3312
|
+
/* @__PURE__ */ jsx(FittingGauge, {
|
|
3313
|
+
resource: "calibration",
|
|
3314
|
+
load: "upgradeLoad",
|
|
3315
|
+
output: "upgradeCapacity"
|
|
3316
|
+
})
|
|
3317
|
+
] });
|
|
3318
|
+
$[9] = hideStats;
|
|
3319
|
+
$[10] = launcher;
|
|
3320
|
+
$[11] = turret;
|
|
3321
|
+
$[12] = t9;
|
|
3322
|
+
} else t9 = $[12];
|
|
2453
3323
|
let t10;
|
|
2454
|
-
if ($[
|
|
3324
|
+
if ($[13] !== hideStats || $[14] !== label || $[15] !== t4 || $[16] !== t5 || $[17] !== t7 || $[18] !== t8 || $[19] !== t9) {
|
|
2455
3325
|
t10 = /* @__PURE__ */ jsxs(Wheel, {
|
|
2456
3326
|
label,
|
|
3327
|
+
hideScales: hideStats,
|
|
2457
3328
|
children: [
|
|
2458
|
-
t2,
|
|
2459
|
-
t3,
|
|
2460
3329
|
t4,
|
|
2461
3330
|
t5,
|
|
2462
3331
|
t6,
|
|
@@ -2465,38 +3334,41 @@ function FittingWheel(t0) {
|
|
|
2465
3334
|
t9
|
|
2466
3335
|
]
|
|
2467
3336
|
});
|
|
2468
|
-
$[
|
|
2469
|
-
$[
|
|
2470
|
-
$[
|
|
2471
|
-
$[
|
|
2472
|
-
|
|
3337
|
+
$[13] = hideStats;
|
|
3338
|
+
$[14] = label;
|
|
3339
|
+
$[15] = t4;
|
|
3340
|
+
$[16] = t5;
|
|
3341
|
+
$[17] = t7;
|
|
3342
|
+
$[18] = t8;
|
|
3343
|
+
$[19] = t9;
|
|
3344
|
+
$[20] = t10;
|
|
3345
|
+
} else t10 = $[20];
|
|
2473
3346
|
return t10;
|
|
2474
3347
|
}
|
|
2475
|
-
function
|
|
2476
|
-
return /* @__PURE__ */ jsx(FittingRack, { rack: rack_0 }, rack_0);
|
|
2477
|
-
}
|
|
2478
|
-
function _temp$6(rack) {
|
|
3348
|
+
function _temp$7(rack) {
|
|
2479
3349
|
return /* @__PURE__ */ jsx(WheelRackMarker, { rack }, rack);
|
|
2480
3350
|
}
|
|
2481
3351
|
function FittingRack(t0) {
|
|
2482
|
-
const $ = c(
|
|
2483
|
-
const { rack } = t0;
|
|
3352
|
+
const $ = c(5);
|
|
3353
|
+
const { rack, readOnly } = t0;
|
|
2484
3354
|
const slots = useSlots(rack);
|
|
2485
3355
|
const { total } = useRackUsage(rack);
|
|
2486
3356
|
let t1;
|
|
2487
|
-
if ($[0] !== rack || $[1] !==
|
|
3357
|
+
if ($[0] !== rack || $[1] !== readOnly || $[2] !== slots || $[3] !== total) {
|
|
2488
3358
|
const shown = markedRacks.includes(rack) ? rackSize(rack) : Math.min(slots.length, rackSize(rack));
|
|
2489
3359
|
t1 = Array.from({ length: shown }, (_, index) => /* @__PURE__ */ jsx(FittingSlot, {
|
|
2490
3360
|
rack,
|
|
2491
3361
|
index,
|
|
2492
3362
|
content: slots[index],
|
|
2493
|
-
available: index < total
|
|
3363
|
+
available: index < total,
|
|
3364
|
+
readOnly
|
|
2494
3365
|
}, index));
|
|
2495
3366
|
$[0] = rack;
|
|
2496
|
-
$[1] =
|
|
2497
|
-
$[2] =
|
|
2498
|
-
$[3] =
|
|
2499
|
-
|
|
3367
|
+
$[1] = readOnly;
|
|
3368
|
+
$[2] = slots;
|
|
3369
|
+
$[3] = total;
|
|
3370
|
+
$[4] = t1;
|
|
3371
|
+
} else t1 = $[4];
|
|
2500
3372
|
return t1;
|
|
2501
3373
|
}
|
|
2502
3374
|
/** Fits a type dropped in the middle of the wheel, and unfits a fitted item. */
|
|
@@ -2591,10 +3463,51 @@ function FittingCentre() {
|
|
|
2591
3463
|
} else t6 = $[24];
|
|
2592
3464
|
return t6;
|
|
2593
3465
|
}
|
|
3466
|
+
function FittingModes(t0) {
|
|
3467
|
+
const $ = c(9);
|
|
3468
|
+
const { readOnly } = t0;
|
|
3469
|
+
const store = useFitStore();
|
|
3470
|
+
const modes = useModes();
|
|
3471
|
+
const active = useFit().ship.mode;
|
|
3472
|
+
if (modes.length === 0) return null;
|
|
3473
|
+
let t1;
|
|
3474
|
+
if ($[0] !== modes) {
|
|
3475
|
+
t1 = modes.map(_temp2$6);
|
|
3476
|
+
$[0] = modes;
|
|
3477
|
+
$[1] = t1;
|
|
3478
|
+
} else t1 = $[1];
|
|
3479
|
+
let t2;
|
|
3480
|
+
if ($[2] !== readOnly || $[3] !== store) {
|
|
3481
|
+
t2 = readOnly ? void 0 : (typeId) => store.setMode(typeId);
|
|
3482
|
+
$[2] = readOnly;
|
|
3483
|
+
$[3] = store;
|
|
3484
|
+
$[4] = t2;
|
|
3485
|
+
} else t2 = $[4];
|
|
3486
|
+
let t3;
|
|
3487
|
+
if ($[5] !== active || $[6] !== t1 || $[7] !== t2) {
|
|
3488
|
+
t3 = /* @__PURE__ */ jsx(WheelModes, {
|
|
3489
|
+
modes: t1,
|
|
3490
|
+
active,
|
|
3491
|
+
onSelect: t2
|
|
3492
|
+
});
|
|
3493
|
+
$[5] = active;
|
|
3494
|
+
$[6] = t1;
|
|
3495
|
+
$[7] = t2;
|
|
3496
|
+
$[8] = t3;
|
|
3497
|
+
} else t3 = $[8];
|
|
3498
|
+
return t3;
|
|
3499
|
+
}
|
|
3500
|
+
function _temp2$6(t0) {
|
|
3501
|
+
const { id, name } = t0;
|
|
3502
|
+
return {
|
|
3503
|
+
typeId: id,
|
|
3504
|
+
name
|
|
3505
|
+
};
|
|
3506
|
+
}
|
|
2594
3507
|
function FittingSlot(t0) {
|
|
2595
3508
|
const $ = c(7);
|
|
2596
|
-
const { rack, index, content, available } = t0;
|
|
2597
|
-
const slot = useFittingSlot(rack, index, content, available);
|
|
3509
|
+
const { rack, index, content, available, readOnly } = t0;
|
|
3510
|
+
const slot = useFittingSlot(rack, index, content, available, readOnly);
|
|
2598
3511
|
let t1;
|
|
2599
3512
|
if ($[0] !== index || $[1] !== rack) {
|
|
2600
3513
|
t1 = slotAngle(rack, index);
|
|
@@ -3507,8 +4420,8 @@ function BayContents(t0) {
|
|
|
3507
4420
|
const maxActive = t1;
|
|
3508
4421
|
let t2;
|
|
3509
4422
|
if ($[2] !== contents || $[3] !== fighters || $[4] !== fit) {
|
|
3510
|
-
const launched = fighters ? fit.items.flatMap(_temp$
|
|
3511
|
-
t2 = [...contents.flatMap(_temp2$
|
|
4423
|
+
const launched = fighters ? fit.items.flatMap(_temp$6) : [];
|
|
4424
|
+
t2 = [...contents.flatMap(_temp2$5), ...launched];
|
|
3512
4425
|
$[2] = contents;
|
|
3513
4426
|
$[3] = fighters;
|
|
3514
4427
|
$[4] = fit;
|
|
@@ -3671,11 +4584,11 @@ function BayContents(t0) {
|
|
|
3671
4584
|
return t10;
|
|
3672
4585
|
}
|
|
3673
4586
|
/** One box per drone the character can launch. */
|
|
3674
|
-
function _temp2$
|
|
4587
|
+
function _temp2$5(t0) {
|
|
3675
4588
|
const { refs } = t0;
|
|
3676
4589
|
return refs;
|
|
3677
4590
|
}
|
|
3678
|
-
function _temp$
|
|
4591
|
+
function _temp$6(item, ref) {
|
|
3679
4592
|
return item.slot.type === "fighter_tube" ? [ref] : [];
|
|
3680
4593
|
}
|
|
3681
4594
|
function DroneSelection(t0) {
|
|
@@ -3922,6 +4835,7 @@ var FittingWindow_module_default = {
|
|
|
3922
4835
|
"browser": "L9t91q_browser",
|
|
3923
4836
|
"count": "L9t91q_count",
|
|
3924
4837
|
"fitName": "L9t91q_fitName",
|
|
4838
|
+
"fitNameInput": "L9t91q_fitNameInput",
|
|
3925
4839
|
"frame": "L9t91q_frame",
|
|
3926
4840
|
"free": "L9t91q_free",
|
|
3927
4841
|
"history": "L9t91q_history",
|
|
@@ -4333,46 +5247,105 @@ function popover(id) {
|
|
|
4333
5247
|
return element?.matches(":popover-open") ? null : element;
|
|
4334
5248
|
}
|
|
4335
5249
|
function FitName() {
|
|
4336
|
-
const $ = c(
|
|
5250
|
+
const $ = c(13);
|
|
4337
5251
|
const fit = useFit();
|
|
5252
|
+
const store = useFitStore();
|
|
4338
5253
|
const ship = useType(fit.ship.type_id);
|
|
5254
|
+
const [editing, setEditing] = useState(false);
|
|
5255
|
+
const input = useRef(null);
|
|
5256
|
+
const button = useRef(null);
|
|
5257
|
+
const refocus = useRef(false);
|
|
4339
5258
|
let t0;
|
|
4340
5259
|
let t1;
|
|
4341
|
-
if ($[0]
|
|
4342
|
-
t0 =
|
|
5260
|
+
if ($[0] !== editing) {
|
|
5261
|
+
t0 = () => {
|
|
5262
|
+
if (editing) input.current?.focus();
|
|
5263
|
+
else if (refocus.current) button.current?.focus();
|
|
5264
|
+
refocus.current = false;
|
|
5265
|
+
};
|
|
5266
|
+
t1 = [editing];
|
|
5267
|
+
$[0] = editing;
|
|
5268
|
+
$[1] = t0;
|
|
5269
|
+
$[2] = t1;
|
|
5270
|
+
} else {
|
|
5271
|
+
t0 = $[1];
|
|
5272
|
+
t1 = $[2];
|
|
5273
|
+
}
|
|
5274
|
+
useEffect(t0, t1);
|
|
5275
|
+
let t2;
|
|
5276
|
+
if ($[3] !== fit.name || $[4] !== store) {
|
|
5277
|
+
t2 = (name) => {
|
|
5278
|
+
setEditing(false);
|
|
5279
|
+
if (name.trim() !== (fit.name ?? "")) store.setName(name.trim());
|
|
5280
|
+
};
|
|
5281
|
+
$[3] = fit.name;
|
|
5282
|
+
$[4] = store;
|
|
5283
|
+
$[5] = t2;
|
|
5284
|
+
} else t2 = $[5];
|
|
5285
|
+
const rename = t2;
|
|
5286
|
+
let t3;
|
|
5287
|
+
let t4;
|
|
5288
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5289
|
+
t3 = /* @__PURE__ */ jsx(NotImplementedButton, {
|
|
4343
5290
|
className: FittingWindow_module_default.icon,
|
|
4344
5291
|
icon: "module-info",
|
|
4345
5292
|
label: "Show Info"
|
|
4346
5293
|
});
|
|
4347
|
-
|
|
5294
|
+
t4 = /* @__PURE__ */ jsx(NotImplementedButton, {
|
|
4348
5295
|
className: FittingWindow_module_default.icon,
|
|
4349
5296
|
icon: "link",
|
|
4350
5297
|
label: "Link Fit"
|
|
4351
5298
|
});
|
|
4352
|
-
$[
|
|
4353
|
-
$[
|
|
5299
|
+
$[6] = t3;
|
|
5300
|
+
$[7] = t4;
|
|
4354
5301
|
} else {
|
|
4355
|
-
|
|
4356
|
-
|
|
5302
|
+
t3 = $[6];
|
|
5303
|
+
t4 = $[7];
|
|
4357
5304
|
}
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
t3 = /* @__PURE__ */ jsxs("div", {
|
|
5305
|
+
let t5;
|
|
5306
|
+
if ($[8] !== editing || $[9] !== fit.name || $[10] !== rename || $[11] !== ship?.name) {
|
|
5307
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
4362
5308
|
className: FittingWindow_module_default.name,
|
|
4363
5309
|
children: [
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
/* @__PURE__ */ jsx("
|
|
4367
|
-
className: FittingWindow_module_default.
|
|
4368
|
-
|
|
5310
|
+
t3,
|
|
5311
|
+
t4,
|
|
5312
|
+
editing ? /* @__PURE__ */ jsx("input", {
|
|
5313
|
+
className: FittingWindow_module_default.fitNameInput,
|
|
5314
|
+
"aria-label": "Fit Name",
|
|
5315
|
+
defaultValue: fit.name,
|
|
5316
|
+
placeholder: ship?.name,
|
|
5317
|
+
ref: input,
|
|
5318
|
+
onFocus: _temp$5,
|
|
5319
|
+
onBlur: (event_0) => rename(event_0.currentTarget.value),
|
|
5320
|
+
onKeyDown: (event_1) => {
|
|
5321
|
+
if (event_1.key === "Escape") event_1.currentTarget.value = fit.name ?? "";
|
|
5322
|
+
if (event_1.key !== "Enter" && event_1.key !== "Escape") return;
|
|
5323
|
+
event_1.preventDefault();
|
|
5324
|
+
refocus.current = true;
|
|
5325
|
+
event_1.currentTarget.blur();
|
|
5326
|
+
}
|
|
5327
|
+
}) : /* @__PURE__ */ jsx(Tooltip, {
|
|
5328
|
+
label: "Rename Fit",
|
|
5329
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
5330
|
+
ref: button,
|
|
5331
|
+
type: "button",
|
|
5332
|
+
className: FittingWindow_module_default.fitName,
|
|
5333
|
+
onClick: () => setEditing(true),
|
|
5334
|
+
children: fit.name || ship?.name
|
|
5335
|
+
})
|
|
4369
5336
|
})
|
|
4370
5337
|
]
|
|
4371
5338
|
});
|
|
4372
|
-
$[
|
|
4373
|
-
$[
|
|
4374
|
-
|
|
4375
|
-
|
|
5339
|
+
$[8] = editing;
|
|
5340
|
+
$[9] = fit.name;
|
|
5341
|
+
$[10] = rename;
|
|
5342
|
+
$[11] = ship?.name;
|
|
5343
|
+
$[12] = t5;
|
|
5344
|
+
} else t5 = $[12];
|
|
5345
|
+
return t5;
|
|
5346
|
+
}
|
|
5347
|
+
function _temp$5(event) {
|
|
5348
|
+
return event.currentTarget.select();
|
|
4376
5349
|
}
|
|
4377
5350
|
const violationKinds = [
|
|
4378
5351
|
{
|
|
@@ -4424,7 +5397,7 @@ function Violations() {
|
|
|
4424
5397
|
group: t2
|
|
4425
5398
|
};
|
|
4426
5399
|
const linesOf = (kind) => {
|
|
4427
|
-
const violations = kind === "skill" ? missingSkills(stats.violations).map(
|
|
5400
|
+
const violations = kind === "skill" ? missingSkills(stats.violations).map(_temp2$4) : stats.violations.filter((t5) => {
|
|
4428
5401
|
const { rule: rule_0 } = t5;
|
|
4429
5402
|
return violationKind(rule_0) === kind;
|
|
4430
5403
|
});
|
|
@@ -4447,7 +5420,7 @@ function Violations() {
|
|
|
4447
5420
|
className: FittingWindow_module_default.alertTitle,
|
|
4448
5421
|
children: title
|
|
4449
5422
|
}),
|
|
4450
|
-
description: lines.map(
|
|
5423
|
+
description: lines.map(_temp3$1)
|
|
4451
5424
|
})
|
|
4452
5425
|
}),
|
|
4453
5426
|
children: /* @__PURE__ */ jsxs("span", {
|
|
@@ -4493,13 +5466,13 @@ function Violations() {
|
|
|
4493
5466
|
} else t5 = $[16];
|
|
4494
5467
|
return t5;
|
|
4495
5468
|
}
|
|
4496
|
-
function
|
|
5469
|
+
function _temp3$1(line) {
|
|
4497
5470
|
return /* @__PURE__ */ jsx("span", {
|
|
4498
5471
|
className: FittingWindow_module_default.alertLine,
|
|
4499
5472
|
children: line
|
|
4500
5473
|
}, line);
|
|
4501
5474
|
}
|
|
4502
|
-
function
|
|
5475
|
+
function _temp2$4(rule) {
|
|
4503
5476
|
return {
|
|
4504
5477
|
target: { type: "ship" },
|
|
4505
5478
|
rule
|
|
@@ -4935,7 +5908,7 @@ function FittingServiceSlot(t0) {
|
|
|
4935
5908
|
const t1 = useFittingSlot("service", index, content, available);
|
|
4936
5909
|
let slot;
|
|
4937
5910
|
if ($[0] !== t1) {
|
|
4938
|
-
const { chargeTypeId, chargeable, activatable, onRemoveCharge, ...t2 } = t1;
|
|
5911
|
+
const { chargeTypeId, chargeable, activatable, onRemoveCharge, tooltip, ...t2 } = t1;
|
|
4939
5912
|
slot = t2;
|
|
4940
5913
|
$[0] = t1;
|
|
4941
5914
|
$[1] = slot;
|
|
@@ -4972,18 +5945,27 @@ function SimulationHistory(t0) {
|
|
|
4972
5945
|
//#endregion
|
|
4973
5946
|
//#region src/components/ItemBrowser/ItemBrowser.module.css
|
|
4974
5947
|
var ItemBrowser_module_default = {
|
|
5948
|
+
"action": "xFSZwa_action",
|
|
5949
|
+
"actions": "xFSZwa_actions",
|
|
4975
5950
|
"browser": "xFSZwa_browser",
|
|
4976
5951
|
"collapse": "xFSZwa_collapse",
|
|
5952
|
+
"confirm": "xFSZwa_confirm",
|
|
5953
|
+
"copy": "xFSZwa_copy",
|
|
5954
|
+
"copyAnchor": "xFSZwa_copyAnchor",
|
|
4977
5955
|
"count": "xFSZwa_count",
|
|
4978
5956
|
"counts": "xFSZwa_counts",
|
|
5957
|
+
"dialogButtons": "xFSZwa_dialogButtons",
|
|
4979
5958
|
"dragImage": "xFSZwa_dragImage",
|
|
4980
5959
|
"empty": "xFSZwa_empty",
|
|
4981
5960
|
"field": "xFSZwa_field",
|
|
4982
5961
|
"filters": "xFSZwa_filters",
|
|
4983
5962
|
"flyable": "xFSZwa_flyable",
|
|
5963
|
+
"form": "xFSZwa_form",
|
|
4984
5964
|
"hull": "xFSZwa_hull",
|
|
5965
|
+
"importError": "xFSZwa_importError",
|
|
4985
5966
|
"info": "xFSZwa_info",
|
|
4986
5967
|
"kind": "xFSZwa_kind",
|
|
5968
|
+
"menu": "xFSZwa_menu",
|
|
4987
5969
|
"panel": "xFSZwa_panel",
|
|
4988
5970
|
"search": "xFSZwa_search",
|
|
4989
5971
|
"simulate": "xFSZwa_simulate",
|
|
@@ -5558,44 +6540,641 @@ function Charges() {
|
|
|
5558
6540
|
} else t11 = $[47];
|
|
5559
6541
|
return t11;
|
|
5560
6542
|
}
|
|
5561
|
-
function ChargeGroup(t0) {
|
|
5562
|
-
const $ = c(11);
|
|
5563
|
-
const { node, actions } = t0;
|
|
5564
|
-
const marketGroupIcon = useMarketGroupIcon();
|
|
5565
|
-
const t1 = node.group.name;
|
|
5566
|
-
let t2;
|
|
5567
|
-
if ($[0] !== marketGroupIcon || $[1] !== node.group.id) {
|
|
5568
|
-
t2 = marketGroupIcon(node.group.id);
|
|
5569
|
-
$[0] = marketGroupIcon;
|
|
5570
|
-
$[1] = node.group.id;
|
|
5571
|
-
$[2] = t2;
|
|
5572
|
-
} else t2 = $[2];
|
|
6543
|
+
function ChargeGroup(t0) {
|
|
6544
|
+
const $ = c(11);
|
|
6545
|
+
const { node, actions } = t0;
|
|
6546
|
+
const marketGroupIcon = useMarketGroupIcon();
|
|
6547
|
+
const t1 = node.group.name;
|
|
6548
|
+
let t2;
|
|
6549
|
+
if ($[0] !== marketGroupIcon || $[1] !== node.group.id) {
|
|
6550
|
+
t2 = marketGroupIcon(node.group.id);
|
|
6551
|
+
$[0] = marketGroupIcon;
|
|
6552
|
+
$[1] = node.group.id;
|
|
6553
|
+
$[2] = t2;
|
|
6554
|
+
} else t2 = $[2];
|
|
6555
|
+
let t3;
|
|
6556
|
+
if ($[3] !== actions || $[4] !== node.children || $[5] !== node.types) {
|
|
6557
|
+
t3 = () => /* @__PURE__ */ jsxs(Fragment, { children: [node.children.map((child) => /* @__PURE__ */ jsx(ChargeGroup, {
|
|
6558
|
+
node: child,
|
|
6559
|
+
actions
|
|
6560
|
+
}, child.group.id)), node.types.map((type) => /* @__PURE__ */ jsx(TypeLeaf, {
|
|
6561
|
+
type,
|
|
6562
|
+
actions
|
|
6563
|
+
}, type.id))] });
|
|
6564
|
+
$[3] = actions;
|
|
6565
|
+
$[4] = node.children;
|
|
6566
|
+
$[5] = node.types;
|
|
6567
|
+
$[6] = t3;
|
|
6568
|
+
} else t3 = $[6];
|
|
6569
|
+
let t4;
|
|
6570
|
+
if ($[7] !== node.group.name || $[8] !== t2 || $[9] !== t3) {
|
|
6571
|
+
t4 = /* @__PURE__ */ jsx(TreeGroup, {
|
|
6572
|
+
label: t1,
|
|
6573
|
+
icon: t2,
|
|
6574
|
+
children: t3
|
|
6575
|
+
});
|
|
6576
|
+
$[7] = node.group.name;
|
|
6577
|
+
$[8] = t2;
|
|
6578
|
+
$[9] = t3;
|
|
6579
|
+
$[10] = t4;
|
|
6580
|
+
} else t4 = $[10];
|
|
6581
|
+
return t4;
|
|
6582
|
+
}
|
|
6583
|
+
//#endregion
|
|
6584
|
+
//#region src/components/ItemBrowser/FitActions.tsx
|
|
6585
|
+
const FLASH_MS = 2e3;
|
|
6586
|
+
/** The buttons under the `ItemBrowser`: save the fit in the browser, import one, or copy it out. */
|
|
6587
|
+
function FitActions() {
|
|
6588
|
+
const $ = c(66);
|
|
6589
|
+
const engine = useEngine();
|
|
6590
|
+
const fit = useFit();
|
|
6591
|
+
const store = useFitStore();
|
|
6592
|
+
const { fits, save } = useLocalFits();
|
|
6593
|
+
const menu = useId();
|
|
6594
|
+
const [saved, flashSaved] = useFlash();
|
|
6595
|
+
const [copied, flashCopied] = useFlash();
|
|
6596
|
+
const [importing, setImporting] = useState(false);
|
|
6597
|
+
const [naming, setNaming] = useState(false);
|
|
6598
|
+
const [overwriting, setOverwriting] = useState();
|
|
6599
|
+
let t0;
|
|
6600
|
+
if ($[0] !== flashSaved || $[1] !== save || $[2] !== store) {
|
|
6601
|
+
t0 = (named) => {
|
|
6602
|
+
setOverwriting(void 0);
|
|
6603
|
+
store.setName(named.name ?? "");
|
|
6604
|
+
save(named);
|
|
6605
|
+
flashSaved();
|
|
6606
|
+
};
|
|
6607
|
+
$[0] = flashSaved;
|
|
6608
|
+
$[1] = save;
|
|
6609
|
+
$[2] = store;
|
|
6610
|
+
$[3] = t0;
|
|
6611
|
+
} else t0 = $[3];
|
|
6612
|
+
const saveNow = t0;
|
|
6613
|
+
let t1;
|
|
6614
|
+
if ($[4] !== fits || $[5] !== saveNow) {
|
|
6615
|
+
t1 = (named_0) => {
|
|
6616
|
+
const existing = fits.find((one) => one.ship.type_id === named_0.ship.type_id && one.name === named_0.name);
|
|
6617
|
+
if (existing === void 0 || JSON.stringify(existing) === JSON.stringify(named_0)) saveNow(named_0);
|
|
6618
|
+
else setOverwriting(named_0);
|
|
6619
|
+
};
|
|
6620
|
+
$[4] = fits;
|
|
6621
|
+
$[5] = saveNow;
|
|
6622
|
+
$[6] = t1;
|
|
6623
|
+
} else t1 = $[6];
|
|
6624
|
+
const trySave = t1;
|
|
6625
|
+
let t2;
|
|
6626
|
+
if ($[7] !== engine || $[8] !== fit || $[9] !== flashCopied || $[10] !== menu) {
|
|
6627
|
+
t2 = (format) => {
|
|
6628
|
+
document.getElementById(menu)?.hidePopover();
|
|
6629
|
+
navigator.clipboard.writeText(engine.saveText(fit, format)).then(flashCopied);
|
|
6630
|
+
};
|
|
6631
|
+
$[7] = engine;
|
|
6632
|
+
$[8] = fit;
|
|
6633
|
+
$[9] = flashCopied;
|
|
6634
|
+
$[10] = menu;
|
|
6635
|
+
$[11] = t2;
|
|
6636
|
+
} else t2 = $[11];
|
|
6637
|
+
const copy = t2;
|
|
6638
|
+
let t3;
|
|
6639
|
+
if ($[12] !== fit || $[13] !== trySave) {
|
|
6640
|
+
t3 = () => fit.name ? trySave(fit) : setNaming(true);
|
|
6641
|
+
$[12] = fit;
|
|
6642
|
+
$[13] = trySave;
|
|
6643
|
+
$[14] = t3;
|
|
6644
|
+
} else t3 = $[14];
|
|
6645
|
+
const t4 = saved ? "Saved" : "Save";
|
|
6646
|
+
let t5;
|
|
6647
|
+
if ($[15] !== t3 || $[16] !== t4) {
|
|
6648
|
+
t5 = /* @__PURE__ */ jsx("button", {
|
|
6649
|
+
type: "button",
|
|
6650
|
+
className: ItemBrowser_module_default.action,
|
|
6651
|
+
onClick: t3,
|
|
6652
|
+
children: t4
|
|
6653
|
+
});
|
|
6654
|
+
$[15] = t3;
|
|
6655
|
+
$[16] = t4;
|
|
6656
|
+
$[17] = t5;
|
|
6657
|
+
} else t5 = $[17];
|
|
6658
|
+
let t6;
|
|
6659
|
+
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6660
|
+
t6 = /* @__PURE__ */ jsx("button", {
|
|
6661
|
+
type: "button",
|
|
6662
|
+
className: ItemBrowser_module_default.action,
|
|
6663
|
+
onClick: () => setImporting(true),
|
|
6664
|
+
children: "Import…"
|
|
6665
|
+
});
|
|
6666
|
+
$[18] = t6;
|
|
6667
|
+
} else t6 = $[18];
|
|
6668
|
+
const t7 = copied ? "Copied" : "Copy";
|
|
6669
|
+
const t8 = copied ? "checkmark" : "export";
|
|
6670
|
+
let t9;
|
|
6671
|
+
if ($[19] !== t8) {
|
|
6672
|
+
t9 = /* @__PURE__ */ jsx(Icon, { name: t8 });
|
|
6673
|
+
$[19] = t8;
|
|
6674
|
+
$[20] = t9;
|
|
6675
|
+
} else t9 = $[20];
|
|
6676
|
+
let t10;
|
|
6677
|
+
if ($[21] !== menu || $[22] !== t9) {
|
|
6678
|
+
t10 = /* @__PURE__ */ jsx("button", {
|
|
6679
|
+
type: "button",
|
|
6680
|
+
className: `${ItemBrowser_module_default.action} ${ItemBrowser_module_default.copy}`,
|
|
6681
|
+
"aria-label": "Copy",
|
|
6682
|
+
popoverTarget: menu,
|
|
6683
|
+
children: t9
|
|
6684
|
+
});
|
|
6685
|
+
$[21] = menu;
|
|
6686
|
+
$[22] = t9;
|
|
6687
|
+
$[23] = t10;
|
|
6688
|
+
} else t10 = $[23];
|
|
6689
|
+
let t11;
|
|
6690
|
+
if ($[24] !== t10 || $[25] !== t7) {
|
|
6691
|
+
t11 = /* @__PURE__ */ jsx("span", {
|
|
6692
|
+
className: ItemBrowser_module_default.copyAnchor,
|
|
6693
|
+
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
6694
|
+
label: t7,
|
|
6695
|
+
children: t10
|
|
6696
|
+
})
|
|
6697
|
+
});
|
|
6698
|
+
$[24] = t10;
|
|
6699
|
+
$[25] = t7;
|
|
6700
|
+
$[26] = t11;
|
|
6701
|
+
} else t11 = $[26];
|
|
6702
|
+
let t12;
|
|
6703
|
+
if ($[27] !== copy) {
|
|
6704
|
+
t12 = /* @__PURE__ */ jsx("button", {
|
|
6705
|
+
type: "button",
|
|
6706
|
+
role: "menuitem",
|
|
6707
|
+
onClick: () => copy("eft"),
|
|
6708
|
+
children: "Copy as EFT"
|
|
6709
|
+
});
|
|
6710
|
+
$[27] = copy;
|
|
6711
|
+
$[28] = t12;
|
|
6712
|
+
} else t12 = $[28];
|
|
6713
|
+
let t13;
|
|
6714
|
+
if ($[29] !== copy) {
|
|
6715
|
+
t13 = /* @__PURE__ */ jsx("button", {
|
|
6716
|
+
type: "button",
|
|
6717
|
+
role: "menuitem",
|
|
6718
|
+
onClick: () => copy("esf"),
|
|
6719
|
+
children: "Copy as esf/1"
|
|
6720
|
+
});
|
|
6721
|
+
$[29] = copy;
|
|
6722
|
+
$[30] = t13;
|
|
6723
|
+
} else t13 = $[30];
|
|
6724
|
+
let t14;
|
|
6725
|
+
if ($[31] !== menu || $[32] !== t12 || $[33] !== t13) {
|
|
6726
|
+
t14 = /* @__PURE__ */ jsxs("div", {
|
|
6727
|
+
id: menu,
|
|
6728
|
+
className: ItemBrowser_module_default.menu,
|
|
6729
|
+
popover: "auto",
|
|
6730
|
+
role: "menu",
|
|
6731
|
+
children: [t12, t13]
|
|
6732
|
+
});
|
|
6733
|
+
$[31] = menu;
|
|
6734
|
+
$[32] = t12;
|
|
6735
|
+
$[33] = t13;
|
|
6736
|
+
$[34] = t14;
|
|
6737
|
+
} else t14 = $[34];
|
|
6738
|
+
let t15;
|
|
6739
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6740
|
+
t15 = () => setNaming(false);
|
|
6741
|
+
$[35] = t15;
|
|
6742
|
+
} else t15 = $[35];
|
|
6743
|
+
let t16;
|
|
6744
|
+
if ($[36] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6745
|
+
t16 = () => setNaming(false);
|
|
6746
|
+
$[36] = t16;
|
|
6747
|
+
} else t16 = $[36];
|
|
6748
|
+
let t17;
|
|
6749
|
+
if ($[37] !== trySave) {
|
|
6750
|
+
t17 = /* @__PURE__ */ jsx(NameForm, {
|
|
6751
|
+
onCancel: t16,
|
|
6752
|
+
onSave: (named_1) => {
|
|
6753
|
+
setNaming(false);
|
|
6754
|
+
trySave(named_1);
|
|
6755
|
+
}
|
|
6756
|
+
});
|
|
6757
|
+
$[37] = trySave;
|
|
6758
|
+
$[38] = t17;
|
|
6759
|
+
} else t17 = $[38];
|
|
6760
|
+
let t18;
|
|
6761
|
+
if ($[39] !== naming || $[40] !== t17) {
|
|
6762
|
+
t18 = /* @__PURE__ */ jsx(Dialog, {
|
|
6763
|
+
open: naming,
|
|
6764
|
+
title: "Save Fit",
|
|
6765
|
+
onClose: t15,
|
|
6766
|
+
children: t17
|
|
6767
|
+
});
|
|
6768
|
+
$[39] = naming;
|
|
6769
|
+
$[40] = t17;
|
|
6770
|
+
$[41] = t18;
|
|
6771
|
+
} else t18 = $[41];
|
|
6772
|
+
const t19 = overwriting !== void 0;
|
|
6773
|
+
let t20;
|
|
6774
|
+
if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6775
|
+
t20 = () => setOverwriting(void 0);
|
|
6776
|
+
$[42] = t20;
|
|
6777
|
+
} else t20 = $[42];
|
|
6778
|
+
const t21 = overwriting?.name;
|
|
6779
|
+
let t22;
|
|
6780
|
+
if ($[43] !== t21) {
|
|
6781
|
+
t22 = /* @__PURE__ */ jsxs("p", { children: [
|
|
6782
|
+
"A fit named \"",
|
|
6783
|
+
t21,
|
|
6784
|
+
"\" is already saved for this hull. Overwrite it?"
|
|
6785
|
+
] });
|
|
6786
|
+
$[43] = t21;
|
|
6787
|
+
$[44] = t22;
|
|
6788
|
+
} else t22 = $[44];
|
|
6789
|
+
let t23;
|
|
6790
|
+
if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6791
|
+
t23 = /* @__PURE__ */ jsx("button", {
|
|
6792
|
+
type: "button",
|
|
6793
|
+
className: ItemBrowser_module_default.action,
|
|
6794
|
+
onClick: () => setOverwriting(void 0),
|
|
6795
|
+
children: "Cancel"
|
|
6796
|
+
});
|
|
6797
|
+
$[45] = t23;
|
|
6798
|
+
} else t23 = $[45];
|
|
6799
|
+
let t24;
|
|
6800
|
+
if ($[46] !== overwriting || $[47] !== saveNow) {
|
|
6801
|
+
t24 = /* @__PURE__ */ jsxs("div", {
|
|
6802
|
+
className: ItemBrowser_module_default.dialogButtons,
|
|
6803
|
+
children: [t23, /* @__PURE__ */ jsx("button", {
|
|
6804
|
+
type: "button",
|
|
6805
|
+
className: ItemBrowser_module_default.action,
|
|
6806
|
+
onClick: () => overwriting && saveNow(overwriting),
|
|
6807
|
+
children: "Overwrite"
|
|
6808
|
+
})]
|
|
6809
|
+
});
|
|
6810
|
+
$[46] = overwriting;
|
|
6811
|
+
$[47] = saveNow;
|
|
6812
|
+
$[48] = t24;
|
|
6813
|
+
} else t24 = $[48];
|
|
6814
|
+
let t25;
|
|
6815
|
+
if ($[49] !== t22 || $[50] !== t24) {
|
|
6816
|
+
t25 = /* @__PURE__ */ jsxs("div", {
|
|
6817
|
+
className: ItemBrowser_module_default.confirm,
|
|
6818
|
+
children: [t22, t24]
|
|
6819
|
+
});
|
|
6820
|
+
$[49] = t22;
|
|
6821
|
+
$[50] = t24;
|
|
6822
|
+
$[51] = t25;
|
|
6823
|
+
} else t25 = $[51];
|
|
6824
|
+
let t26;
|
|
6825
|
+
if ($[52] !== t19 || $[53] !== t25) {
|
|
6826
|
+
t26 = /* @__PURE__ */ jsx(Dialog, {
|
|
6827
|
+
open: t19,
|
|
6828
|
+
title: "Overwrite Fit?",
|
|
6829
|
+
onClose: t20,
|
|
6830
|
+
children: t25
|
|
6831
|
+
});
|
|
6832
|
+
$[52] = t19;
|
|
6833
|
+
$[53] = t25;
|
|
6834
|
+
$[54] = t26;
|
|
6835
|
+
} else t26 = $[54];
|
|
6836
|
+
let t27;
|
|
6837
|
+
if ($[55] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6838
|
+
t27 = () => setImporting(false);
|
|
6839
|
+
$[55] = t27;
|
|
6840
|
+
} else t27 = $[55];
|
|
6841
|
+
let t28;
|
|
6842
|
+
if ($[56] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6843
|
+
t28 = /* @__PURE__ */ jsx(ImportForm, { onDone: () => setImporting(false) });
|
|
6844
|
+
$[56] = t28;
|
|
6845
|
+
} else t28 = $[56];
|
|
6846
|
+
let t29;
|
|
6847
|
+
if ($[57] !== importing) {
|
|
6848
|
+
t29 = /* @__PURE__ */ jsx(Dialog, {
|
|
6849
|
+
open: importing,
|
|
6850
|
+
title: "Import Fit",
|
|
6851
|
+
onClose: t27,
|
|
6852
|
+
children: t28
|
|
6853
|
+
});
|
|
6854
|
+
$[57] = importing;
|
|
6855
|
+
$[58] = t29;
|
|
6856
|
+
} else t29 = $[58];
|
|
6857
|
+
let t30;
|
|
6858
|
+
if ($[59] !== t11 || $[60] !== t14 || $[61] !== t18 || $[62] !== t26 || $[63] !== t29 || $[64] !== t5) {
|
|
6859
|
+
t30 = /* @__PURE__ */ jsxs("div", {
|
|
6860
|
+
className: ItemBrowser_module_default.actions,
|
|
6861
|
+
children: [
|
|
6862
|
+
t5,
|
|
6863
|
+
t6,
|
|
6864
|
+
t11,
|
|
6865
|
+
t14,
|
|
6866
|
+
t18,
|
|
6867
|
+
t26,
|
|
6868
|
+
t29
|
|
6869
|
+
]
|
|
6870
|
+
});
|
|
6871
|
+
$[59] = t11;
|
|
6872
|
+
$[60] = t14;
|
|
6873
|
+
$[61] = t18;
|
|
6874
|
+
$[62] = t26;
|
|
6875
|
+
$[63] = t29;
|
|
6876
|
+
$[64] = t5;
|
|
6877
|
+
$[65] = t30;
|
|
6878
|
+
} else t30 = $[65];
|
|
6879
|
+
return t30;
|
|
6880
|
+
}
|
|
6881
|
+
function NameForm(t0) {
|
|
6882
|
+
const $ = c(27);
|
|
6883
|
+
const { onCancel, onSave } = t0;
|
|
6884
|
+
const engine = useEngine();
|
|
6885
|
+
const fit = useFit();
|
|
6886
|
+
const id = useId();
|
|
6887
|
+
let t1;
|
|
6888
|
+
if ($[0] !== engine.sde || $[1] !== fit.ship.type_id) {
|
|
6889
|
+
t1 = () => engine.sde.type(fit.ship.type_id)?.name ?? "";
|
|
6890
|
+
$[0] = engine.sde;
|
|
6891
|
+
$[1] = fit.ship.type_id;
|
|
6892
|
+
$[2] = t1;
|
|
6893
|
+
} else t1 = $[2];
|
|
6894
|
+
const [name, setName] = useState(t1);
|
|
6895
|
+
let t2;
|
|
6896
|
+
if ($[3] !== fit || $[4] !== name || $[5] !== onSave) {
|
|
6897
|
+
t2 = (event) => {
|
|
6898
|
+
event.preventDefault();
|
|
6899
|
+
onSave({
|
|
6900
|
+
...fit,
|
|
6901
|
+
name: name.trim()
|
|
6902
|
+
});
|
|
6903
|
+
};
|
|
6904
|
+
$[3] = fit;
|
|
6905
|
+
$[4] = name;
|
|
6906
|
+
$[5] = onSave;
|
|
6907
|
+
$[6] = t2;
|
|
6908
|
+
} else t2 = $[6];
|
|
6909
|
+
let t3;
|
|
6910
|
+
if ($[7] !== id) {
|
|
6911
|
+
t3 = /* @__PURE__ */ jsx("label", {
|
|
6912
|
+
htmlFor: id,
|
|
6913
|
+
children: "Name this fit."
|
|
6914
|
+
});
|
|
6915
|
+
$[7] = id;
|
|
6916
|
+
$[8] = t3;
|
|
6917
|
+
} else t3 = $[8];
|
|
6918
|
+
let t4;
|
|
6919
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
6920
|
+
t4 = (event_1) => setName(event_1.target.value);
|
|
6921
|
+
$[9] = t4;
|
|
6922
|
+
} else t4 = $[9];
|
|
6923
|
+
let t5;
|
|
6924
|
+
if ($[10] !== id || $[11] !== name) {
|
|
6925
|
+
t5 = /* @__PURE__ */ jsx("input", {
|
|
6926
|
+
id,
|
|
6927
|
+
value: name,
|
|
6928
|
+
onFocus: _temp$4,
|
|
6929
|
+
onChange: t4
|
|
6930
|
+
});
|
|
6931
|
+
$[10] = id;
|
|
6932
|
+
$[11] = name;
|
|
6933
|
+
$[12] = t5;
|
|
6934
|
+
} else t5 = $[12];
|
|
6935
|
+
let t6;
|
|
6936
|
+
if ($[13] !== onCancel) {
|
|
6937
|
+
t6 = /* @__PURE__ */ jsx("button", {
|
|
6938
|
+
type: "button",
|
|
6939
|
+
className: ItemBrowser_module_default.action,
|
|
6940
|
+
onClick: onCancel,
|
|
6941
|
+
children: "Cancel"
|
|
6942
|
+
});
|
|
6943
|
+
$[13] = onCancel;
|
|
6944
|
+
$[14] = t6;
|
|
6945
|
+
} else t6 = $[14];
|
|
6946
|
+
let t7;
|
|
6947
|
+
if ($[15] !== name) {
|
|
6948
|
+
t7 = name.trim();
|
|
6949
|
+
$[15] = name;
|
|
6950
|
+
$[16] = t7;
|
|
6951
|
+
} else t7 = $[16];
|
|
6952
|
+
const t8 = t7 === "";
|
|
6953
|
+
let t9;
|
|
6954
|
+
if ($[17] !== t8) {
|
|
6955
|
+
t9 = /* @__PURE__ */ jsx("button", {
|
|
6956
|
+
type: "submit",
|
|
6957
|
+
className: ItemBrowser_module_default.action,
|
|
6958
|
+
disabled: t8,
|
|
6959
|
+
children: "Save"
|
|
6960
|
+
});
|
|
6961
|
+
$[17] = t8;
|
|
6962
|
+
$[18] = t9;
|
|
6963
|
+
} else t9 = $[18];
|
|
6964
|
+
let t10;
|
|
6965
|
+
if ($[19] !== t6 || $[20] !== t9) {
|
|
6966
|
+
t10 = /* @__PURE__ */ jsxs("div", {
|
|
6967
|
+
className: ItemBrowser_module_default.dialogButtons,
|
|
6968
|
+
children: [t6, t9]
|
|
6969
|
+
});
|
|
6970
|
+
$[19] = t6;
|
|
6971
|
+
$[20] = t9;
|
|
6972
|
+
$[21] = t10;
|
|
6973
|
+
} else t10 = $[21];
|
|
6974
|
+
let t11;
|
|
6975
|
+
if ($[22] !== t10 || $[23] !== t2 || $[24] !== t3 || $[25] !== t5) {
|
|
6976
|
+
t11 = /* @__PURE__ */ jsxs("form", {
|
|
6977
|
+
className: ItemBrowser_module_default.form,
|
|
6978
|
+
onSubmit: t2,
|
|
6979
|
+
children: [
|
|
6980
|
+
t3,
|
|
6981
|
+
t5,
|
|
6982
|
+
t10
|
|
6983
|
+
]
|
|
6984
|
+
});
|
|
6985
|
+
$[22] = t10;
|
|
6986
|
+
$[23] = t2;
|
|
6987
|
+
$[24] = t3;
|
|
6988
|
+
$[25] = t5;
|
|
6989
|
+
$[26] = t11;
|
|
6990
|
+
} else t11 = $[26];
|
|
6991
|
+
return t11;
|
|
6992
|
+
}
|
|
6993
|
+
function _temp$4(event_0) {
|
|
6994
|
+
return event_0.currentTarget.select();
|
|
6995
|
+
}
|
|
6996
|
+
function ImportForm(t0) {
|
|
6997
|
+
const $ = c(32);
|
|
6998
|
+
const { onDone } = t0;
|
|
6999
|
+
const engine = useEngine();
|
|
7000
|
+
const store = useFitStore();
|
|
7001
|
+
const id = useId();
|
|
7002
|
+
const [text, setText] = useState("");
|
|
7003
|
+
const [error, setError] = useState();
|
|
7004
|
+
let t1;
|
|
7005
|
+
let t2;
|
|
7006
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
7007
|
+
t1 = () => {
|
|
7008
|
+
navigator.clipboard.readText().then((clipboard) => setText((typed) => typed || clipboard), _temp2$3);
|
|
7009
|
+
};
|
|
7010
|
+
t2 = [];
|
|
7011
|
+
$[0] = t1;
|
|
7012
|
+
$[1] = t2;
|
|
7013
|
+
} else {
|
|
7014
|
+
t1 = $[0];
|
|
7015
|
+
t2 = $[1];
|
|
7016
|
+
}
|
|
7017
|
+
useEffect(t1, t2);
|
|
7018
|
+
let t3;
|
|
7019
|
+
if ($[2] !== engine || $[3] !== onDone || $[4] !== store || $[5] !== text) {
|
|
7020
|
+
t3 = () => {
|
|
7021
|
+
try {
|
|
7022
|
+
store.replace(engine.loadText(text, store.character));
|
|
7023
|
+
onDone();
|
|
7024
|
+
} catch (t4) {
|
|
7025
|
+
const failure = t4;
|
|
7026
|
+
setError(failure instanceof Error ? failure.message : String(failure));
|
|
7027
|
+
}
|
|
7028
|
+
};
|
|
7029
|
+
$[2] = engine;
|
|
7030
|
+
$[3] = onDone;
|
|
7031
|
+
$[4] = store;
|
|
7032
|
+
$[5] = text;
|
|
7033
|
+
$[6] = t3;
|
|
7034
|
+
} else t3 = $[6];
|
|
7035
|
+
const load = t3;
|
|
7036
|
+
let t4;
|
|
7037
|
+
if ($[7] !== load) {
|
|
7038
|
+
t4 = (event) => {
|
|
7039
|
+
event.preventDefault();
|
|
7040
|
+
load();
|
|
7041
|
+
};
|
|
7042
|
+
$[7] = load;
|
|
7043
|
+
$[8] = t4;
|
|
7044
|
+
} else t4 = $[8];
|
|
7045
|
+
let t5;
|
|
7046
|
+
if ($[9] !== id) {
|
|
7047
|
+
t5 = /* @__PURE__ */ jsx("label", {
|
|
7048
|
+
htmlFor: id,
|
|
7049
|
+
children: "Paste a fit in EFT, DNA or esf/1 format."
|
|
7050
|
+
});
|
|
7051
|
+
$[9] = id;
|
|
7052
|
+
$[10] = t5;
|
|
7053
|
+
} else t5 = $[10];
|
|
7054
|
+
let t6;
|
|
7055
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
7056
|
+
t6 = (event_0) => {
|
|
7057
|
+
setText(event_0.target.value);
|
|
7058
|
+
setError(void 0);
|
|
7059
|
+
};
|
|
7060
|
+
$[11] = t6;
|
|
7061
|
+
} else t6 = $[11];
|
|
7062
|
+
let t7;
|
|
7063
|
+
if ($[12] !== id || $[13] !== text) {
|
|
7064
|
+
t7 = /* @__PURE__ */ jsx("textarea", {
|
|
7065
|
+
id,
|
|
7066
|
+
rows: 12,
|
|
7067
|
+
placeholder: "[Rifter, My Rifter]\nDamage Control II\n…",
|
|
7068
|
+
value: text,
|
|
7069
|
+
onChange: t6
|
|
7070
|
+
});
|
|
7071
|
+
$[12] = id;
|
|
7072
|
+
$[13] = text;
|
|
7073
|
+
$[14] = t7;
|
|
7074
|
+
} else t7 = $[14];
|
|
7075
|
+
let t8;
|
|
7076
|
+
if ($[15] !== error) {
|
|
7077
|
+
t8 = error !== void 0 && /* @__PURE__ */ jsxs("p", {
|
|
7078
|
+
className: ItemBrowser_module_default.importError,
|
|
7079
|
+
role: "alert",
|
|
7080
|
+
children: ["Could not import: ", error]
|
|
7081
|
+
});
|
|
7082
|
+
$[15] = error;
|
|
7083
|
+
$[16] = t8;
|
|
7084
|
+
} else t8 = $[16];
|
|
7085
|
+
let t9;
|
|
7086
|
+
if ($[17] !== onDone) {
|
|
7087
|
+
t9 = /* @__PURE__ */ jsx("button", {
|
|
7088
|
+
type: "button",
|
|
7089
|
+
className: ItemBrowser_module_default.action,
|
|
7090
|
+
onClick: onDone,
|
|
7091
|
+
children: "Cancel"
|
|
7092
|
+
});
|
|
7093
|
+
$[17] = onDone;
|
|
7094
|
+
$[18] = t9;
|
|
7095
|
+
} else t9 = $[18];
|
|
7096
|
+
let t10;
|
|
7097
|
+
if ($[19] !== text) {
|
|
7098
|
+
t10 = text.trim();
|
|
7099
|
+
$[19] = text;
|
|
7100
|
+
$[20] = t10;
|
|
7101
|
+
} else t10 = $[20];
|
|
7102
|
+
const t11 = t10 === "";
|
|
7103
|
+
let t12;
|
|
7104
|
+
if ($[21] !== t11) {
|
|
7105
|
+
t12 = /* @__PURE__ */ jsx("button", {
|
|
7106
|
+
type: "submit",
|
|
7107
|
+
className: ItemBrowser_module_default.action,
|
|
7108
|
+
disabled: t11,
|
|
7109
|
+
children: "Import"
|
|
7110
|
+
});
|
|
7111
|
+
$[21] = t11;
|
|
7112
|
+
$[22] = t12;
|
|
7113
|
+
} else t12 = $[22];
|
|
7114
|
+
let t13;
|
|
7115
|
+
if ($[23] !== t12 || $[24] !== t9) {
|
|
7116
|
+
t13 = /* @__PURE__ */ jsxs("div", {
|
|
7117
|
+
className: ItemBrowser_module_default.dialogButtons,
|
|
7118
|
+
children: [t9, t12]
|
|
7119
|
+
});
|
|
7120
|
+
$[23] = t12;
|
|
7121
|
+
$[24] = t9;
|
|
7122
|
+
$[25] = t13;
|
|
7123
|
+
} else t13 = $[25];
|
|
7124
|
+
let t14;
|
|
7125
|
+
if ($[26] !== t13 || $[27] !== t4 || $[28] !== t5 || $[29] !== t7 || $[30] !== t8) {
|
|
7126
|
+
t14 = /* @__PURE__ */ jsxs("form", {
|
|
7127
|
+
className: ItemBrowser_module_default.form,
|
|
7128
|
+
onSubmit: t4,
|
|
7129
|
+
children: [
|
|
7130
|
+
t5,
|
|
7131
|
+
t7,
|
|
7132
|
+
t8,
|
|
7133
|
+
t13
|
|
7134
|
+
]
|
|
7135
|
+
});
|
|
7136
|
+
$[26] = t13;
|
|
7137
|
+
$[27] = t4;
|
|
7138
|
+
$[28] = t5;
|
|
7139
|
+
$[29] = t7;
|
|
7140
|
+
$[30] = t8;
|
|
7141
|
+
$[31] = t14;
|
|
7142
|
+
} else t14 = $[31];
|
|
7143
|
+
return t14;
|
|
7144
|
+
}
|
|
7145
|
+
function _temp2$3() {}
|
|
7146
|
+
function useFlash() {
|
|
7147
|
+
const $ = c(6);
|
|
7148
|
+
const [shown, setShown] = useState(0);
|
|
7149
|
+
let t0;
|
|
7150
|
+
let t1;
|
|
7151
|
+
if ($[0] !== shown) {
|
|
7152
|
+
t0 = () => {
|
|
7153
|
+
if (shown === 0) return;
|
|
7154
|
+
const timer = setTimeout(() => setShown(0), FLASH_MS);
|
|
7155
|
+
return () => clearTimeout(timer);
|
|
7156
|
+
};
|
|
7157
|
+
t1 = [shown];
|
|
7158
|
+
$[0] = shown;
|
|
7159
|
+
$[1] = t0;
|
|
7160
|
+
$[2] = t1;
|
|
7161
|
+
} else {
|
|
7162
|
+
t0 = $[1];
|
|
7163
|
+
t1 = $[2];
|
|
7164
|
+
}
|
|
7165
|
+
useEffect(t0, t1);
|
|
7166
|
+
const t2 = shown > 0;
|
|
5573
7167
|
let t3;
|
|
5574
|
-
if ($[3]
|
|
5575
|
-
t3 = () =>
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
}, child.group.id)), node.types.map((type) => /* @__PURE__ */ jsx(TypeLeaf, {
|
|
5579
|
-
type,
|
|
5580
|
-
actions
|
|
5581
|
-
}, type.id))] });
|
|
5582
|
-
$[3] = actions;
|
|
5583
|
-
$[4] = node.children;
|
|
5584
|
-
$[5] = node.types;
|
|
5585
|
-
$[6] = t3;
|
|
5586
|
-
} else t3 = $[6];
|
|
7168
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
7169
|
+
t3 = () => setShown(Date.now());
|
|
7170
|
+
$[3] = t3;
|
|
7171
|
+
} else t3 = $[3];
|
|
5587
7172
|
let t4;
|
|
5588
|
-
if ($[
|
|
5589
|
-
t4 =
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
});
|
|
5594
|
-
$[7] = node.group.name;
|
|
5595
|
-
$[8] = t2;
|
|
5596
|
-
$[9] = t3;
|
|
5597
|
-
$[10] = t4;
|
|
5598
|
-
} else t4 = $[10];
|
|
7173
|
+
if ($[4] !== t2) {
|
|
7174
|
+
t4 = [t2, t3];
|
|
7175
|
+
$[4] = t2;
|
|
7176
|
+
$[5] = t4;
|
|
7177
|
+
} else t4 = $[5];
|
|
5599
7178
|
return t4;
|
|
5600
7179
|
}
|
|
5601
7180
|
//#endregion
|
|
@@ -5604,15 +7183,17 @@ const noFits = [];
|
|
|
5604
7183
|
const SHIPS_MARKET_GROUP_ID = 4;
|
|
5605
7184
|
/** The Hulls & Fits tab of the `ItemBrowser`: EVE's hulls by group and race, with the fits saved for each. */
|
|
5606
7185
|
function HullsAndFits() {
|
|
5607
|
-
const $ = c(
|
|
7186
|
+
const $ = c(62);
|
|
5608
7187
|
const currentShipId = useFit().ship.type_id;
|
|
5609
7188
|
const images = useImages();
|
|
5610
7189
|
const store = useFitStore();
|
|
5611
7190
|
const missingSkills = useMissingSkills();
|
|
5612
7191
|
const { fits } = useLocalFits();
|
|
7192
|
+
const personal = usePersonalFits();
|
|
5613
7193
|
const { start, end } = useDrag();
|
|
5614
7194
|
const [search, setSearch] = useState("");
|
|
5615
7195
|
const [browserFits, setBrowserFits] = useState(false);
|
|
7196
|
+
const [personalFits, setPersonalFits] = useState(false);
|
|
5616
7197
|
const [currentHull, setCurrentHull] = useState(false);
|
|
5617
7198
|
const [flyable, setFlyable] = useState(false);
|
|
5618
7199
|
const [collapses, setCollapses] = useState(0);
|
|
@@ -5630,94 +7211,114 @@ function HullsAndFits() {
|
|
|
5630
7211
|
$[3] = t1;
|
|
5631
7212
|
} else t1 = $[3];
|
|
5632
7213
|
const matches = t1;
|
|
7214
|
+
const anySource = browserFits || personalFits;
|
|
5633
7215
|
let t2;
|
|
5634
|
-
if ($[4] !== fits) {
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
$[
|
|
5638
|
-
|
|
7216
|
+
if ($[4] !== anySource || $[5] !== browserFits || $[6] !== fits || $[7] !== personal.fits || $[8] !== personalFits) {
|
|
7217
|
+
const listed = [...!anySource || browserFits ? fits.map(_temp$3) : [], ...!anySource || personalFits ? personal.fits.map(_temp2$2) : []];
|
|
7218
|
+
t2 = Map.groupBy(listed, _temp3);
|
|
7219
|
+
$[4] = anySource;
|
|
7220
|
+
$[5] = browserFits;
|
|
7221
|
+
$[6] = fits;
|
|
7222
|
+
$[7] = personal.fits;
|
|
7223
|
+
$[8] = personalFits;
|
|
7224
|
+
$[9] = t2;
|
|
7225
|
+
} else t2 = $[9];
|
|
5639
7226
|
const fitsByHull = t2;
|
|
7227
|
+
const browserByHull = Map.groupBy(fits, _temp4);
|
|
7228
|
+
const personalByHull = Map.groupBy(personal.fits, _temp5);
|
|
5640
7229
|
let t3;
|
|
5641
|
-
if ($[
|
|
7230
|
+
if ($[10] !== fitsByHull || $[11] !== flyable || $[12] !== matches || $[13] !== missingSkills) {
|
|
5642
7231
|
t3 = (ship) => {
|
|
5643
|
-
const
|
|
5644
|
-
const kept = flyable ?
|
|
5645
|
-
|
|
7232
|
+
const saved = fitsByHull.get(ship.id) ?? noFits;
|
|
7233
|
+
const kept = flyable ? saved.filter((t4) => {
|
|
7234
|
+
const { fit: fit_4 } = t4;
|
|
7235
|
+
return missingSkills(fit_4).length === 0;
|
|
7236
|
+
}) : saved;
|
|
7237
|
+
return matches(ship.name) ? kept : kept.filter((t5) => {
|
|
7238
|
+
const { fit: fit_5 } = t5;
|
|
7239
|
+
return matches(fit_5.name);
|
|
7240
|
+
});
|
|
5646
7241
|
};
|
|
5647
|
-
$[
|
|
5648
|
-
$[
|
|
5649
|
-
$[
|
|
5650
|
-
$[
|
|
5651
|
-
$[
|
|
5652
|
-
} else t3 = $[
|
|
7242
|
+
$[10] = fitsByHull;
|
|
7243
|
+
$[11] = flyable;
|
|
7244
|
+
$[12] = matches;
|
|
7245
|
+
$[13] = missingSkills;
|
|
7246
|
+
$[14] = t3;
|
|
7247
|
+
} else t3 = $[14];
|
|
5653
7248
|
const shownFits = t3;
|
|
5654
7249
|
let t4;
|
|
5655
|
-
if ($[
|
|
5656
|
-
t4 = query !== "" || currentHull ||
|
|
7250
|
+
if ($[15] !== anySource || $[16] !== currentHull || $[17] !== currentShipId || $[18] !== flyable || $[19] !== matches || $[20] !== missingSkills || $[21] !== query || $[22] !== shownFits) {
|
|
7251
|
+
t4 = query !== "" || currentHull || anySource || flyable ? (ship_0) => {
|
|
5657
7252
|
if (currentHull && ship_0.id !== currentShipId) return false;
|
|
5658
7253
|
if (flyable && missingSkills([ship_0.id]).length > 0) return false;
|
|
5659
7254
|
const shown = shownFits(ship_0);
|
|
5660
|
-
if (
|
|
7255
|
+
if (anySource && shown.length === 0) return false;
|
|
5661
7256
|
return matches(ship_0.name) || shown.length > 0;
|
|
5662
7257
|
} : void 0;
|
|
5663
|
-
$[
|
|
5664
|
-
$[
|
|
5665
|
-
$[
|
|
5666
|
-
$[
|
|
5667
|
-
$[
|
|
5668
|
-
$[
|
|
5669
|
-
$[
|
|
5670
|
-
$[
|
|
5671
|
-
$[
|
|
5672
|
-
} else t4 = $[
|
|
7258
|
+
$[15] = anySource;
|
|
7259
|
+
$[16] = currentHull;
|
|
7260
|
+
$[17] = currentShipId;
|
|
7261
|
+
$[18] = flyable;
|
|
7262
|
+
$[19] = matches;
|
|
7263
|
+
$[20] = missingSkills;
|
|
7264
|
+
$[21] = query;
|
|
7265
|
+
$[22] = shownFits;
|
|
7266
|
+
$[23] = t4;
|
|
7267
|
+
} else t4 = $[23];
|
|
5673
7268
|
const groups = useHullTree(t4);
|
|
5674
7269
|
let t5;
|
|
5675
|
-
if ($[
|
|
7270
|
+
if ($[24] !== store) {
|
|
5676
7271
|
t5 = (shipTypeId) => store.replace({
|
|
5677
7272
|
ship: { type_id: shipTypeId },
|
|
5678
7273
|
items: []
|
|
5679
7274
|
});
|
|
5680
|
-
$[
|
|
5681
|
-
$[
|
|
5682
|
-
} else t5 = $[
|
|
7275
|
+
$[24] = store;
|
|
7276
|
+
$[25] = t5;
|
|
7277
|
+
} else t5 = $[25];
|
|
5683
7278
|
const simulate = t5;
|
|
5684
7279
|
let t6;
|
|
5685
|
-
if ($[
|
|
7280
|
+
if ($[26] !== collapses) {
|
|
5686
7281
|
t6 = () => setCollapses(collapses + 1);
|
|
5687
|
-
$[
|
|
5688
|
-
$[
|
|
5689
|
-
} else t6 = $[
|
|
7282
|
+
$[26] = collapses;
|
|
7283
|
+
$[27] = t6;
|
|
7284
|
+
} else t6 = $[27];
|
|
5690
7285
|
let t7;
|
|
5691
|
-
if ($[
|
|
7286
|
+
if ($[28] !== search || $[29] !== t6) {
|
|
5692
7287
|
t7 = /* @__PURE__ */ jsx(Search, {
|
|
5693
7288
|
value: search,
|
|
5694
7289
|
onChange: setSearch,
|
|
5695
7290
|
onCollapse: t6
|
|
5696
7291
|
});
|
|
5697
|
-
$[
|
|
5698
|
-
$[
|
|
5699
|
-
$[
|
|
5700
|
-
} else t7 = $[
|
|
7292
|
+
$[28] = search;
|
|
7293
|
+
$[29] = t6;
|
|
7294
|
+
$[30] = t7;
|
|
7295
|
+
} else t7 = $[30];
|
|
5701
7296
|
let t8;
|
|
5702
|
-
if ($[
|
|
7297
|
+
if ($[31] !== browserFits) {
|
|
5703
7298
|
t8 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
5704
7299
|
icon: "fits-browser",
|
|
5705
7300
|
label: "Browser Fittings",
|
|
5706
7301
|
pressed: browserFits,
|
|
5707
7302
|
onPressedChange: setBrowserFits
|
|
5708
7303
|
});
|
|
5709
|
-
$[
|
|
5710
|
-
$[
|
|
5711
|
-
} else t8 = $[
|
|
5712
|
-
let t10;
|
|
5713
|
-
let t11;
|
|
5714
|
-
let t12;
|
|
7304
|
+
$[31] = browserFits;
|
|
7305
|
+
$[32] = t8;
|
|
7306
|
+
} else t8 = $[32];
|
|
5715
7307
|
let t9;
|
|
5716
|
-
if ($[
|
|
7308
|
+
if ($[33] !== personalFits) {
|
|
5717
7309
|
t9 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
5718
7310
|
icon: "fits-personal",
|
|
5719
|
-
label: "Personal Fittings"
|
|
7311
|
+
label: "Personal Fittings",
|
|
7312
|
+
pressed: personalFits,
|
|
7313
|
+
onPressedChange: setPersonalFits
|
|
5720
7314
|
});
|
|
7315
|
+
$[33] = personalFits;
|
|
7316
|
+
$[34] = t9;
|
|
7317
|
+
} else t9 = $[34];
|
|
7318
|
+
let t10;
|
|
7319
|
+
let t11;
|
|
7320
|
+
let t12;
|
|
7321
|
+
if ($[35] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5721
7322
|
t10 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
5722
7323
|
icon: "fits-corporation",
|
|
5723
7324
|
label: "Corporation Fittings"
|
|
@@ -5730,40 +7331,38 @@ function HullsAndFits() {
|
|
|
5730
7331
|
icon: "fits-community",
|
|
5731
7332
|
label: "Community Fittings"
|
|
5732
7333
|
});
|
|
5733
|
-
$[
|
|
5734
|
-
$[
|
|
5735
|
-
$[
|
|
5736
|
-
$[32] = t9;
|
|
7334
|
+
$[35] = t10;
|
|
7335
|
+
$[36] = t11;
|
|
7336
|
+
$[37] = t12;
|
|
5737
7337
|
} else {
|
|
5738
|
-
t10 = $[
|
|
5739
|
-
t11 = $[
|
|
5740
|
-
t12 = $[
|
|
5741
|
-
t9 = $[32];
|
|
7338
|
+
t10 = $[35];
|
|
7339
|
+
t11 = $[36];
|
|
7340
|
+
t12 = $[37];
|
|
5742
7341
|
}
|
|
5743
7342
|
let t13;
|
|
5744
|
-
if ($[
|
|
7343
|
+
if ($[38] !== currentHull) {
|
|
5745
7344
|
t13 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
5746
7345
|
icon: "current-hull",
|
|
5747
7346
|
label: "Current Hull",
|
|
5748
7347
|
pressed: currentHull,
|
|
5749
7348
|
onPressedChange: setCurrentHull
|
|
5750
7349
|
});
|
|
5751
|
-
$[
|
|
5752
|
-
$[
|
|
5753
|
-
} else t13 = $[
|
|
7350
|
+
$[38] = currentHull;
|
|
7351
|
+
$[39] = t13;
|
|
7352
|
+
} else t13 = $[39];
|
|
5754
7353
|
let t14;
|
|
5755
|
-
if ($[
|
|
7354
|
+
if ($[40] !== flyable) {
|
|
5756
7355
|
t14 = /* @__PURE__ */ jsx(FilterToggle, {
|
|
5757
7356
|
icon: "skills",
|
|
5758
7357
|
label: "Skills",
|
|
5759
7358
|
pressed: flyable,
|
|
5760
7359
|
onPressedChange: setFlyable
|
|
5761
7360
|
});
|
|
5762
|
-
$[
|
|
5763
|
-
$[
|
|
5764
|
-
} else t14 = $[
|
|
7361
|
+
$[40] = flyable;
|
|
7362
|
+
$[41] = t14;
|
|
7363
|
+
} else t14 = $[41];
|
|
5765
7364
|
let t15;
|
|
5766
|
-
if ($[
|
|
7365
|
+
if ($[42] !== t13 || $[43] !== t14 || $[44] !== t8 || $[45] !== t9) {
|
|
5767
7366
|
t15 = /* @__PURE__ */ jsxs("fieldset", {
|
|
5768
7367
|
className: ItemBrowser_module_default.filters,
|
|
5769
7368
|
"aria-label": "Filters",
|
|
@@ -5777,120 +7376,145 @@ function HullsAndFits() {
|
|
|
5777
7376
|
t14
|
|
5778
7377
|
]
|
|
5779
7378
|
});
|
|
5780
|
-
$[
|
|
5781
|
-
$[
|
|
5782
|
-
$[
|
|
5783
|
-
$[
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
7379
|
+
$[42] = t13;
|
|
7380
|
+
$[43] = t14;
|
|
7381
|
+
$[44] = t8;
|
|
7382
|
+
$[45] = t9;
|
|
7383
|
+
$[46] = t15;
|
|
7384
|
+
} else t15 = $[46];
|
|
7385
|
+
const t16 = ItemBrowser_module_default;
|
|
7386
|
+
let t17;
|
|
7387
|
+
if ($[47] !== personal.character || $[48] !== personalFits) {
|
|
7388
|
+
t17 = personalFits && personal.character?.canReadFits !== true && /* @__PURE__ */ jsx("p", {
|
|
7389
|
+
className: ItemBrowser_module_default.empty,
|
|
7390
|
+
children: personal.character === void 0 ? "Pick a logged-in character" : "Log in again to see fittings"
|
|
7391
|
+
});
|
|
7392
|
+
$[47] = personal.character;
|
|
7393
|
+
$[48] = personalFits;
|
|
7394
|
+
$[49] = t17;
|
|
7395
|
+
} else t17 = $[49];
|
|
7396
|
+
const T0 = TreeList;
|
|
7397
|
+
const t18 = "Hulls";
|
|
7398
|
+
const t22 = groups.map((t19) => {
|
|
7399
|
+
const { group, races } = t19;
|
|
7400
|
+
return /* @__PURE__ */ jsx(TreeGroup, {
|
|
7401
|
+
label: group.name,
|
|
7402
|
+
children: () => races.map((t20) => {
|
|
7403
|
+
const { race, factionId, ships } = t20;
|
|
5791
7404
|
return /* @__PURE__ */ jsx(TreeGroup, {
|
|
5792
|
-
label:
|
|
5793
|
-
|
|
5794
|
-
|
|
7405
|
+
label: `${raceName(race)} [${ships.length}]`,
|
|
7406
|
+
icon: factionId === void 0 ? images.marketGroupIcon(SHIPS_MARKET_GROUP_ID) : images.factionIcon(factionId),
|
|
7407
|
+
children: () => ships.map((ship_1) => {
|
|
7408
|
+
const shown_0 = shownFits(ship_1);
|
|
7409
|
+
const simulateShip = /* @__PURE__ */ jsx(Tooltip, {
|
|
7410
|
+
label: "Simulate Ship",
|
|
7411
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
7412
|
+
type: "button",
|
|
7413
|
+
className: ItemBrowser_module_default.simulate,
|
|
7414
|
+
"aria-label": `Simulate ${ship_1.name}`,
|
|
7415
|
+
onClick: () => simulate(ship_1.id),
|
|
7416
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "simulate" })
|
|
7417
|
+
})
|
|
7418
|
+
});
|
|
5795
7419
|
return /* @__PURE__ */ jsx(TreeGroup, {
|
|
5796
|
-
label:
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5806
|
-
|
|
5807
|
-
|
|
5808
|
-
|
|
7420
|
+
label: /* @__PURE__ */ jsx("span", {
|
|
7421
|
+
className: ItemBrowser_module_default.hull,
|
|
7422
|
+
children: ship_1.name
|
|
7423
|
+
}),
|
|
7424
|
+
description: shown_0.length > 0 ? /* @__PURE__ */ jsx(Counts, {
|
|
7425
|
+
browserFits: browserByHull.get(ship_1.id)?.length ?? 0,
|
|
7426
|
+
personalFits: personalByHull.get(ship_1.id)?.length ?? 0
|
|
7427
|
+
}) : void 0,
|
|
7428
|
+
typeId: ship_1.id,
|
|
7429
|
+
after: simulateShip,
|
|
7430
|
+
onDragStart: (event) => {
|
|
7431
|
+
event.dataTransfer.effectAllowed = "copy";
|
|
7432
|
+
event.dataTransfer.setData("text/plain", ship_1.name);
|
|
7433
|
+
start({
|
|
7434
|
+
type: "hull",
|
|
7435
|
+
typeId: ship_1.id
|
|
5809
7436
|
});
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
typeId: ship_1.id
|
|
5824
|
-
});
|
|
5825
|
-
},
|
|
5826
|
-
onDragEnd: end,
|
|
5827
|
-
children: () => shown_0.length === 0 ? /* @__PURE__ */ jsx(TreeLeaf, { label: "No Item" }) : shown_0.map((saved_1) => /* @__PURE__ */ jsx(TreeLeaf, {
|
|
5828
|
-
label: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
5829
|
-
className: ItemBrowser_module_default.kind,
|
|
5830
|
-
children: /* @__PURE__ */ jsx(Icon, { name: "fits-browser" })
|
|
5831
|
-
}), saved_1.name || ship_1.name] }),
|
|
5832
|
-
onActivate: () => store.replace(saved_1),
|
|
5833
|
-
after: /* @__PURE__ */ jsx(Flyable, { fit: saved_1 })
|
|
5834
|
-
}, saved_1.name ?? ""))
|
|
5835
|
-
}, ship_1.id);
|
|
7437
|
+
},
|
|
7438
|
+
onDragEnd: end,
|
|
7439
|
+
children: () => shown_0.length === 0 ? /* @__PURE__ */ jsx(TreeLeaf, { label: "No Item" }) : shown_0.map((t21, index) => {
|
|
7440
|
+
const { fit: fit_6, kind } = t21;
|
|
7441
|
+
return /* @__PURE__ */ jsx(TreeLeaf, {
|
|
7442
|
+
label: /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
7443
|
+
className: ItemBrowser_module_default.kind,
|
|
7444
|
+
children: /* @__PURE__ */ jsx(Icon, { name: kind })
|
|
7445
|
+
}), fit_6.name || ship_1.name] }),
|
|
7446
|
+
onActivate: () => store.replace(fit_6),
|
|
7447
|
+
activateOnClick: true,
|
|
7448
|
+
after: /* @__PURE__ */ jsx(Flyable, { fit: fit_6 })
|
|
7449
|
+
}, `${kind}:${fit_6.name ?? ""}:${index}`);
|
|
5836
7450
|
})
|
|
5837
|
-
},
|
|
7451
|
+
}, ship_1.id);
|
|
5838
7452
|
})
|
|
5839
|
-
},
|
|
5840
|
-
}
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
$[
|
|
5852
|
-
$[
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
}, collapses)
|
|
5869
|
-
});
|
|
5870
|
-
$[58] = collapses;
|
|
5871
|
-
$[59] = t16;
|
|
5872
|
-
$[60] = t17;
|
|
5873
|
-
} else t17 = $[60];
|
|
5874
|
-
let t18;
|
|
5875
|
-
if ($[61] !== t15 || $[62] !== t17 || $[63] !== t7) {
|
|
5876
|
-
t18 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7453
|
+
}, race);
|
|
7454
|
+
})
|
|
7455
|
+
}, group.id);
|
|
7456
|
+
});
|
|
7457
|
+
let t23;
|
|
7458
|
+
if ($[50] !== T0 || $[51] !== collapses || $[52] !== t22) {
|
|
7459
|
+
t23 = /* @__PURE__ */ jsx(T0, {
|
|
7460
|
+
label: t18,
|
|
7461
|
+
children: t22
|
|
7462
|
+
}, collapses);
|
|
7463
|
+
$[50] = T0;
|
|
7464
|
+
$[51] = collapses;
|
|
7465
|
+
$[52] = t22;
|
|
7466
|
+
$[53] = t23;
|
|
7467
|
+
} else t23 = $[53];
|
|
7468
|
+
let t24;
|
|
7469
|
+
if ($[54] !== t16.tree || $[55] !== t17 || $[56] !== t23) {
|
|
7470
|
+
t24 = /* @__PURE__ */ jsxs("div", {
|
|
7471
|
+
className: t16.tree,
|
|
7472
|
+
children: [t17, t23]
|
|
7473
|
+
});
|
|
7474
|
+
$[54] = t16.tree;
|
|
7475
|
+
$[55] = t17;
|
|
7476
|
+
$[56] = t23;
|
|
7477
|
+
$[57] = t24;
|
|
7478
|
+
} else t24 = $[57];
|
|
7479
|
+
let t25;
|
|
7480
|
+
if ($[58] !== t15 || $[59] !== t24 || $[60] !== t7) {
|
|
7481
|
+
t25 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5877
7482
|
t7,
|
|
5878
7483
|
t15,
|
|
5879
|
-
|
|
7484
|
+
t24
|
|
5880
7485
|
] });
|
|
5881
|
-
$[
|
|
5882
|
-
$[
|
|
5883
|
-
$[
|
|
5884
|
-
$[
|
|
5885
|
-
} else
|
|
5886
|
-
return
|
|
7486
|
+
$[58] = t15;
|
|
7487
|
+
$[59] = t24;
|
|
7488
|
+
$[60] = t7;
|
|
7489
|
+
$[61] = t25;
|
|
7490
|
+
} else t25 = $[61];
|
|
7491
|
+
return t25;
|
|
7492
|
+
}
|
|
7493
|
+
function _temp5(fit_3) {
|
|
7494
|
+
return fit_3.ship.type_id;
|
|
7495
|
+
}
|
|
7496
|
+
function _temp4(fit_2) {
|
|
7497
|
+
return fit_2.ship.type_id;
|
|
7498
|
+
}
|
|
7499
|
+
function _temp3(t0) {
|
|
7500
|
+
const { fit: fit_1 } = t0;
|
|
7501
|
+
return fit_1.ship.type_id;
|
|
5887
7502
|
}
|
|
5888
|
-
function
|
|
5889
|
-
return
|
|
7503
|
+
function _temp2$2(fit_0) {
|
|
7504
|
+
return {
|
|
7505
|
+
fit: fit_0,
|
|
7506
|
+
kind: "fits-personal"
|
|
7507
|
+
};
|
|
7508
|
+
}
|
|
7509
|
+
function _temp$3(fit) {
|
|
7510
|
+
return {
|
|
7511
|
+
fit,
|
|
7512
|
+
kind: "fits-browser"
|
|
7513
|
+
};
|
|
5890
7514
|
}
|
|
5891
7515
|
function Counts(t0) {
|
|
5892
|
-
const $ = c(
|
|
5893
|
-
const { browserFits } = t0;
|
|
7516
|
+
const $ = c(10);
|
|
7517
|
+
const { browserFits, personalFits } = t0;
|
|
5894
7518
|
let t1;
|
|
5895
7519
|
if ($[0] !== browserFits) {
|
|
5896
7520
|
t1 = /* @__PURE__ */ jsx(Count, {
|
|
@@ -5902,47 +7526,59 @@ function Counts(t0) {
|
|
|
5902
7526
|
$[1] = t1;
|
|
5903
7527
|
} else t1 = $[1];
|
|
5904
7528
|
let t2;
|
|
7529
|
+
if ($[2] !== personalFits) {
|
|
7530
|
+
t2 = /* @__PURE__ */ jsx(Count, {
|
|
7531
|
+
icon: "fits-personal",
|
|
7532
|
+
label: "Personal Fittings",
|
|
7533
|
+
count: personalFits
|
|
7534
|
+
});
|
|
7535
|
+
$[2] = personalFits;
|
|
7536
|
+
$[3] = t2;
|
|
7537
|
+
} else t2 = $[3];
|
|
5905
7538
|
let t3;
|
|
5906
7539
|
let t4;
|
|
5907
|
-
|
|
5908
|
-
|
|
7540
|
+
let t5;
|
|
7541
|
+
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
7542
|
+
t3 = /* @__PURE__ */ jsx(Count, {
|
|
5909
7543
|
icon: "fits-corporation",
|
|
5910
7544
|
label: "Corporation Fittings",
|
|
5911
7545
|
count: 0
|
|
5912
7546
|
});
|
|
5913
|
-
|
|
7547
|
+
t4 = /* @__PURE__ */ jsx(Count, {
|
|
5914
7548
|
icon: "fits-community-small",
|
|
5915
7549
|
label: "Community Fittings",
|
|
5916
7550
|
count: 0
|
|
5917
7551
|
});
|
|
5918
|
-
|
|
7552
|
+
t5 = /* @__PURE__ */ jsx(Count, {
|
|
5919
7553
|
icon: "fits-alliance-small",
|
|
5920
7554
|
label: "Alliance Fittings",
|
|
5921
7555
|
count: 0
|
|
5922
7556
|
});
|
|
5923
|
-
$[
|
|
5924
|
-
$[
|
|
5925
|
-
$[
|
|
7557
|
+
$[4] = t3;
|
|
7558
|
+
$[5] = t4;
|
|
7559
|
+
$[6] = t5;
|
|
5926
7560
|
} else {
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
7561
|
+
t3 = $[4];
|
|
7562
|
+
t4 = $[5];
|
|
7563
|
+
t5 = $[6];
|
|
5930
7564
|
}
|
|
5931
|
-
let
|
|
5932
|
-
if ($[
|
|
5933
|
-
|
|
7565
|
+
let t6;
|
|
7566
|
+
if ($[7] !== t1 || $[8] !== t2) {
|
|
7567
|
+
t6 = /* @__PURE__ */ jsxs("span", {
|
|
5934
7568
|
className: ItemBrowser_module_default.counts,
|
|
5935
7569
|
children: [
|
|
5936
7570
|
t1,
|
|
5937
7571
|
t2,
|
|
5938
7572
|
t3,
|
|
5939
|
-
t4
|
|
7573
|
+
t4,
|
|
7574
|
+
t5
|
|
5940
7575
|
]
|
|
5941
7576
|
});
|
|
5942
|
-
$[
|
|
5943
|
-
$[
|
|
5944
|
-
|
|
5945
|
-
|
|
7577
|
+
$[7] = t1;
|
|
7578
|
+
$[8] = t2;
|
|
7579
|
+
$[9] = t6;
|
|
7580
|
+
} else t6 = $[9];
|
|
7581
|
+
return t6;
|
|
5946
7582
|
}
|
|
5947
7583
|
function Count(t0) {
|
|
5948
7584
|
const $ = c(8);
|
|
@@ -6269,7 +7905,7 @@ function _temp$2() {
|
|
|
6269
7905
|
//#region src/components/ItemBrowser/ItemBrowser.tsx
|
|
6270
7906
|
/** EVE's browser of hulls and fits, modules and charges, left of the fitting wheel. */
|
|
6271
7907
|
function ItemBrowser(t0) {
|
|
6272
|
-
const $ = c(
|
|
7908
|
+
const $ = c(12);
|
|
6273
7909
|
const { label: t1 } = t0;
|
|
6274
7910
|
const label = t1 === void 0 ? "Item Browser" : t1;
|
|
6275
7911
|
const [tab, setTab] = useState("hulls");
|
|
@@ -6340,18 +7976,27 @@ function ItemBrowser(t0) {
|
|
|
6340
7976
|
t6 = $[6];
|
|
6341
7977
|
}
|
|
6342
7978
|
let t7;
|
|
6343
|
-
if ($[7]
|
|
6344
|
-
t7 = /* @__PURE__ */
|
|
7979
|
+
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
7980
|
+
t7 = /* @__PURE__ */ jsx(FitActions, {});
|
|
7981
|
+
$[7] = t7;
|
|
7982
|
+
} else t7 = $[7];
|
|
7983
|
+
let t8;
|
|
7984
|
+
if ($[8] !== label || $[9] !== t5 || $[10] !== t6) {
|
|
7985
|
+
t8 = /* @__PURE__ */ jsxs("section", {
|
|
6345
7986
|
className: ItemBrowser_module_default.browser,
|
|
6346
7987
|
"aria-label": label,
|
|
6347
|
-
children: [
|
|
7988
|
+
children: [
|
|
7989
|
+
t5,
|
|
7990
|
+
t6,
|
|
7991
|
+
t7
|
|
7992
|
+
]
|
|
6348
7993
|
});
|
|
6349
|
-
$[
|
|
6350
|
-
$[
|
|
6351
|
-
$[
|
|
6352
|
-
$[
|
|
6353
|
-
} else
|
|
6354
|
-
return
|
|
7994
|
+
$[8] = label;
|
|
7995
|
+
$[9] = t5;
|
|
7996
|
+
$[10] = t6;
|
|
7997
|
+
$[11] = t8;
|
|
7998
|
+
} else t8 = $[11];
|
|
7999
|
+
return t8;
|
|
6355
8000
|
}
|
|
6356
8001
|
//#endregion
|
|
6357
8002
|
//#region src/components/ShipStatistics/ShipStatistics.module.css
|
|
@@ -6362,6 +8007,7 @@ var ShipStatistics_module_default = {
|
|
|
6362
8007
|
"defense": "lebA7G_defense",
|
|
6363
8008
|
"fighters": "lebA7G_fighters",
|
|
6364
8009
|
"good": "lebA7G_good",
|
|
8010
|
+
"limit": "lebA7G_limit",
|
|
6365
8011
|
"lines": "lebA7G_lines",
|
|
6366
8012
|
"manage": "lebA7G_manage",
|
|
6367
8013
|
"menu": "lebA7G_menu",
|
|
@@ -6390,24 +8036,6 @@ function AttributeText(t0) {
|
|
|
6390
8036
|
return t1;
|
|
6391
8037
|
}
|
|
6392
8038
|
//#endregion
|
|
6393
|
-
//#region src/components/ShipStatistics/units.ts
|
|
6394
|
-
/** For the `format` of `useAttribute`. */
|
|
6395
|
-
function unit(suffix, divisor = 1) {
|
|
6396
|
-
return (value, format) => `${formatNumber(value / divisor, format)}${suffix}`;
|
|
6397
|
-
}
|
|
6398
|
-
/** Like EVE's "0.11B hp": in billions above 100 million, in millions above 100 thousand. */
|
|
6399
|
-
function hitpoints(value, format) {
|
|
6400
|
-
const short = {
|
|
6401
|
-
...format,
|
|
6402
|
-
decimals: 2,
|
|
6403
|
-
fixed: true,
|
|
6404
|
-
rounding: "nearest"
|
|
6405
|
-
};
|
|
6406
|
-
if (value > 1e8) return unit("B hp", 1e9)(value, short);
|
|
6407
|
-
if (value > 1e5) return unit("M hp", 1e6)(value, short);
|
|
6408
|
-
return unit(" hp")(value, format);
|
|
6409
|
-
}
|
|
6410
|
-
//#endregion
|
|
6411
8039
|
//#region src/components/ShipStatistics/CapacitorStats.tsx
|
|
6412
8040
|
function CapacitorStats() {
|
|
6413
8041
|
const $ = c(37);
|
|
@@ -7030,7 +8658,7 @@ function _temp(damage) {
|
|
|
7030
8658
|
//#endregion
|
|
7031
8659
|
//#region src/components/ShipStatistics/DroneStats.tsx
|
|
7032
8660
|
function DroneStats() {
|
|
7033
|
-
const $ = c(
|
|
8661
|
+
const $ = c(25);
|
|
7034
8662
|
let t0;
|
|
7035
8663
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
7036
8664
|
t0 = {
|
|
@@ -7072,6 +8700,7 @@ function DroneStats() {
|
|
|
7072
8700
|
$[3] = t3;
|
|
7073
8701
|
} else t3 = $[3];
|
|
7074
8702
|
const controlRange = useAttribute("droneControlDistance", t3);
|
|
8703
|
+
const over = (bandwidthUsed.value ?? 0) > (bandwidth.value ?? 0);
|
|
7075
8704
|
let t4;
|
|
7076
8705
|
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
7077
8706
|
t4 = {
|
|
@@ -7093,72 +8722,78 @@ function DroneStats() {
|
|
|
7093
8722
|
t6 = /* @__PURE__ */ jsx(AttributeTooltip, { attribute: "droneBandwidth" });
|
|
7094
8723
|
$[7] = t6;
|
|
7095
8724
|
} else t6 = $[7];
|
|
7096
|
-
|
|
8725
|
+
const t7 = over || void 0;
|
|
8726
|
+
let t8;
|
|
7097
8727
|
if ($[8] !== bandwidthUsed) {
|
|
7098
|
-
|
|
8728
|
+
t8 = /* @__PURE__ */ jsx(AttributeText, { value: bandwidthUsed });
|
|
7099
8729
|
$[8] = bandwidthUsed;
|
|
7100
|
-
$[9] =
|
|
7101
|
-
} else
|
|
7102
|
-
let
|
|
8730
|
+
$[9] = t8;
|
|
8731
|
+
} else t8 = $[9];
|
|
8732
|
+
let t9;
|
|
7103
8733
|
if ($[10] !== bandwidth) {
|
|
7104
|
-
|
|
8734
|
+
t9 = /* @__PURE__ */ jsx(AttributeText, { value: bandwidth });
|
|
7105
8735
|
$[10] = bandwidth;
|
|
7106
|
-
$[11] =
|
|
7107
|
-
} else
|
|
7108
|
-
let
|
|
7109
|
-
if ($[12] !== t7 || $[13] !== t8) {
|
|
7110
|
-
|
|
8736
|
+
$[11] = t9;
|
|
8737
|
+
} else t9 = $[11];
|
|
8738
|
+
let t10;
|
|
8739
|
+
if ($[12] !== t7 || $[13] !== t8 || $[14] !== t9) {
|
|
8740
|
+
t10 = /* @__PURE__ */ jsx(Stat, {
|
|
7111
8741
|
icon: "stat-drone-bandwidth",
|
|
7112
8742
|
label: "Drone Bandwidth",
|
|
7113
8743
|
tooltip: t6,
|
|
7114
|
-
children:
|
|
7115
|
-
|
|
7116
|
-
"
|
|
7117
|
-
|
|
7118
|
-
|
|
8744
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
8745
|
+
className: ShipStatistics_module_default.limit,
|
|
8746
|
+
"data-over": t7,
|
|
8747
|
+
children: [
|
|
8748
|
+
t8,
|
|
8749
|
+
"/",
|
|
8750
|
+
t9
|
|
8751
|
+
]
|
|
8752
|
+
})
|
|
7119
8753
|
});
|
|
7120
8754
|
$[12] = t7;
|
|
7121
8755
|
$[13] = t8;
|
|
7122
8756
|
$[14] = t9;
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
8757
|
+
$[15] = t10;
|
|
8758
|
+
} else t10 = $[15];
|
|
8759
|
+
let t11;
|
|
8760
|
+
if ($[16] !== controlRange) {
|
|
8761
|
+
t11 = /* @__PURE__ */ jsx(Stat, {
|
|
7127
8762
|
icon: "stat-drone-control-range",
|
|
7128
8763
|
label: "Drone Control Range",
|
|
7129
8764
|
children: /* @__PURE__ */ jsx(AttributeText, { value: controlRange })
|
|
7130
8765
|
});
|
|
7131
|
-
$[
|
|
7132
|
-
$[
|
|
7133
|
-
} else
|
|
7134
|
-
let
|
|
7135
|
-
if ($[
|
|
7136
|
-
|
|
8766
|
+
$[16] = controlRange;
|
|
8767
|
+
$[17] = t11;
|
|
8768
|
+
} else t11 = $[17];
|
|
8769
|
+
let t12;
|
|
8770
|
+
if ($[18] !== active) {
|
|
8771
|
+
t12 = /* @__PURE__ */ jsx(Stat, {
|
|
7137
8772
|
label: "Active Drones",
|
|
7138
8773
|
children: /* @__PURE__ */ jsx(AttributeText, { value: active })
|
|
7139
8774
|
});
|
|
7140
|
-
$[
|
|
7141
|
-
$[
|
|
7142
|
-
} else
|
|
7143
|
-
let
|
|
7144
|
-
if ($[
|
|
7145
|
-
|
|
8775
|
+
$[18] = active;
|
|
8776
|
+
$[19] = t12;
|
|
8777
|
+
} else t12 = $[19];
|
|
8778
|
+
let t13;
|
|
8779
|
+
if ($[20] !== t10 || $[21] !== t11 || $[22] !== t12 || $[23] !== t5) {
|
|
8780
|
+
t13 = /* @__PURE__ */ jsxs(StatsSection, {
|
|
7146
8781
|
title: "Drones",
|
|
7147
8782
|
summary: t5,
|
|
7148
8783
|
columns: 2,
|
|
7149
8784
|
children: [
|
|
7150
|
-
t9,
|
|
7151
8785
|
t10,
|
|
7152
|
-
t11
|
|
8786
|
+
t11,
|
|
8787
|
+
t12
|
|
7153
8788
|
]
|
|
7154
8789
|
});
|
|
7155
|
-
$[
|
|
7156
|
-
$[
|
|
7157
|
-
$[
|
|
7158
|
-
$[
|
|
7159
|
-
$[
|
|
7160
|
-
} else
|
|
7161
|
-
return
|
|
8790
|
+
$[20] = t10;
|
|
8791
|
+
$[21] = t11;
|
|
8792
|
+
$[22] = t12;
|
|
8793
|
+
$[23] = t5;
|
|
8794
|
+
$[24] = t13;
|
|
8795
|
+
} else t13 = $[24];
|
|
8796
|
+
return t13;
|
|
7162
8797
|
}
|
|
7163
8798
|
//#endregion
|
|
7164
8799
|
//#region src/components/ShipStatistics/FighterStats.tsx
|