@eveshipfit/ui-ingame 1.15.0 → 2.0.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.mjs CHANGED
@@ -2,7 +2,7 @@ import './style.css';
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { Activity, Fragment, createContext, useContext, useDeferredValue, useEffect, useEffectEvent, useId, useLayoutEffect, useRef, useState } from "react";
4
4
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
5
- import { UNIFORM, canSaveFits, formatAttribute, formatClock, formatDuration, formatNumber, useAttribute, useAttributeTooltip, useBayContents, useBayUsage, useBoosters, useBrowse, useCanFit, useCharacters, useChargeSearch, useChargeTree, useChargedModules, useCharges, useDamageProfiles, useDrag, useDroneRoom, useEngine, useFighterTubeUsage, useFighterTubes, useFit, useFitHistory, useFitPrice, useFitSaving, useFitStore, useHardpoints, useHasRoom, useHullRefuses, useHullTree, useImages, useImplantSearch, useImplantTree, useImplants, useInfo, useLocalFits, useMissingSkills, useModes, useModuleSearch, useModuleTree, useMutate, usePersonalFits, usePlacement, usePreview, useRackUsage, useRefusal, useSde, useShowInfo, useShownSnapshot, useSlots, useSnapshot, useStats, useType, useTypeBonuses, useTypePrice } from "@eveshipfit/react-hooks";
5
+ import { UNIFORM, canSaveFits, formatAttribute, formatClock, formatDuration, formatNumber, useAttribute, useAttributeTooltip, useBayContents, useBayUsage, useBoosters, useBrowse, useCanFit, useCharacters, useChargeSearch, useChargeTree, useChargedModules, useCharges, useDamageProfiles, useDrag, useDroneRoom, useEngine, useFighterTubeUsage, useFighterTubes, useFit, useFitHistory, useFitPrice, useFitSaving, useFitStore, useHardpoints, useHasFit, useHasRoom, useHullRefuses, useHullTree, useImages, useImplantSearch, useImplantTree, useImplants, useInfo, useLocalFits, useMissingSkills, useModes, useModuleSearch, useModuleTree, useMutate, usePersonalFits, usePlacement, usePreview, useRackUsage, useRefusal, useSde, useShowInfo, useShownSnapshot, useSlots, useSnapshot, useSnapshotIfAny, useStats, useType, useTypeBonuses, useTypePrice } from "@eveshipfit/react-hooks";
6
6
  import { baseValue, canMutate, clampToRange, mutaplasmidsOf, mutatedDronesOf, mutationRanges, mutationRollOf, parseItemLink, parseMutationText, rollFits, rollMutation, squadronSize, tubeTakes, withMutaplasmid } from "@eveshipfit/fitting";
7
7
  // src/primitives/Dialog/Dialog.module.css
8
8
  var Dialog_module_default = {
@@ -6763,8 +6763,8 @@ function Variations(t0) {
6763
6763
  $[5] = t5;
6764
6764
  } else t5 = $[5];
6765
6765
  useEffect(t4, t5);
6766
- const fit = useFit();
6767
- const module = typeof ref === "number" ? fit.items[ref] : void 0;
6766
+ const fit = useSnapshotIfAny()?.fit;
6767
+ const module = typeof ref === "number" ? fit?.items[ref] : void 0;
6768
6768
  const charges = useCharges(fitted?.charge ? module?.type_id : void 0);
6769
6769
  let t6;
6770
6770
  if ($[6] !== anchor || $[7] !== charges || $[8] !== fitted || $[9] !== hold || $[10] !== preview || $[11] !== ref || $[12] !== refuse || $[13] !== refuses || $[14] !== release || $[15] !== show || $[16] !== store) {
@@ -10003,8 +10003,9 @@ const oneDecimal = new Intl.NumberFormat("en-US", {
10003
10003
  /** EVE draws eight, those the structure does not have as a faint outline. */
10004
10004
  const SERVICE_SLOTS = 8;
10005
10005
  /** EVE's fitting window around the `FittingWheel`. */
10006
- function FittingWindow({ label = "Fitting Window", browser, statistics: givenStatistics, preview = false, placeholder }) {
10007
- const statistics = placeholder === void 0 ? givenStatistics : void 0;
10006
+ function FittingWindow({ label = "Fitting Window", browser, statistics: givenStatistics, preview = false, placeholder = "Pick a hull to start." }) {
10007
+ const hasFit = useHasFit();
10008
+ const statistics = hasFit ? givenStatistics : void 0;
10008
10009
  const [browserOpen, setBrowserOpen] = useState(true);
10009
10010
  const { request } = useBrowse();
10010
10011
  const [browsed, setBrowsed] = useState(request);
@@ -10017,131 +10018,250 @@ function FittingWindow({ label = "Fitting Window", browser, statistics: givenSta
10017
10018
  const statisticsId = useId();
10018
10019
  const browserShown = browser !== void 0 && browserOpen;
10019
10020
  const statisticsShown = statistics !== void 0 && statisticsOpen;
10020
- const { stats } = useShownSnapshot();
10021
- const { structure } = stats;
10022
- const fighters = structure || stats.fighterBay.total > 0;
10023
10021
  const fighterBay = useId();
10024
- return /* @__PURE__ */ jsx(ManageFightersContext, {
10025
- value: fighters && !preview ? () => popover(fighterBay)?.showPopover() : void 0,
10026
- children: /* @__PURE__ */ jsxs("section", {
10027
- className: FittingWindow_module_default.window,
10028
- "aria-label": label,
10029
- "data-browser": browserShown || void 0,
10030
- "data-statistics": statisticsShown || void 0,
10031
- children: [
10032
- !preview && /* @__PURE__ */ jsx(ItemInfo, {}),
10033
- !preview && /* @__PURE__ */ jsx(Mutate, {}),
10034
- browser !== void 0 && /* @__PURE__ */ jsx("div", {
10035
- id: browserId,
10036
- className: FittingWindow_module_default.browser,
10037
- inert: !browserShown,
10038
- children: /* @__PURE__ */ jsx("div", {
10039
- className: FittingWindow_module_default.slide,
10040
- children: browser
10041
- })
10042
- }),
10043
- /* @__PURE__ */ jsxs("div", {
10044
- className: FittingWindow_module_default.frame,
10045
- children: [
10046
- /* @__PURE__ */ jsx("div", {
10047
- className: FittingWindow_module_default.wheel,
10048
- children: placeholder === void 0 ? /* @__PURE__ */ jsx(FittingWheel, {
10049
- readOnly: preview,
10050
- credit: preview
10051
- }) : /* @__PURE__ */ jsx(Wheel, {
10052
- label: "Fitting",
10053
- children: /* @__PURE__ */ jsx(Placeholder, { text: placeholder })
10054
- })
10055
- }),
10056
- preview && placeholder === void 0 && /* @__PURE__ */ jsx(PreviewName, {}),
10057
- !preview && placeholder === void 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(FitName, {}), /* @__PURE__ */ jsx(Violations, {})] }),
10058
- !preview && browser !== void 0 && /* @__PURE__ */ jsx("div", {
10059
- className: FittingWindow_module_default.tools,
10060
- children: /* @__PURE__ */ jsx(Tooltip, {
10061
- label: "Item Browser",
10062
- children: /* @__PURE__ */ jsx("button", {
10063
- type: "button",
10064
- className: FittingWindow_module_default.tool,
10065
- "aria-label": "Item Browser",
10066
- "aria-expanded": browserShown,
10067
- "aria-controls": browserId,
10068
- onClick: () => setBrowserOpen(!browserShown),
10069
- children: /* @__PURE__ */ jsx(Icon, { name: "hardware" })
10070
- })
10071
- })
10072
- }),
10073
- !preview && statistics !== void 0 && /* @__PURE__ */ jsx("div", {
10074
- className: FittingWindow_module_default.panels,
10075
- children: /* @__PURE__ */ jsx(Tooltip, {
10076
- label: "Statistics",
10077
- children: /* @__PURE__ */ jsx("button", {
10078
- type: "button",
10079
- className: FittingWindow_module_default.tool,
10080
- "aria-label": "Statistics",
10081
- "aria-expanded": statisticsShown,
10082
- "aria-controls": statisticsId,
10083
- onClick: () => setStatisticsOpen(!statisticsShown),
10084
- children: /* @__PURE__ */ jsx(Icon, { name: "statistics" })
10085
- })
10022
+ return /* @__PURE__ */ jsxs("section", {
10023
+ className: FittingWindow_module_default.window,
10024
+ "aria-label": label,
10025
+ "data-browser": browserShown || void 0,
10026
+ "data-statistics": statisticsShown || void 0,
10027
+ children: [
10028
+ !preview && /* @__PURE__ */ jsx(ItemInfo, {}),
10029
+ !preview && /* @__PURE__ */ jsx(Mutate, {}),
10030
+ browser !== void 0 && /* @__PURE__ */ jsx("div", {
10031
+ id: browserId,
10032
+ className: FittingWindow_module_default.browser,
10033
+ inert: !browserShown,
10034
+ children: /* @__PURE__ */ jsx("div", {
10035
+ className: FittingWindow_module_default.slide,
10036
+ children: browser
10037
+ })
10038
+ }),
10039
+ /* @__PURE__ */ jsxs("div", {
10040
+ className: FittingWindow_module_default.frame,
10041
+ children: [
10042
+ /* @__PURE__ */ jsx("div", {
10043
+ className: FittingWindow_module_default.wheel,
10044
+ children: hasFit ? /* @__PURE__ */ jsx(FittingWheel, {
10045
+ readOnly: preview,
10046
+ credit: preview
10047
+ }) : /* @__PURE__ */ jsx(Wheel, {
10048
+ label: "Fitting",
10049
+ children: /* @__PURE__ */ jsx(Placeholder, { text: placeholder })
10050
+ })
10051
+ }),
10052
+ hasFit && preview && /* @__PURE__ */ jsx(PreviewName, {}),
10053
+ hasFit && !preview && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(FitName, {}), /* @__PURE__ */ jsx(Violations, {})] }),
10054
+ !preview && browser !== void 0 && /* @__PURE__ */ jsx("div", {
10055
+ className: FittingWindow_module_default.tools,
10056
+ children: /* @__PURE__ */ jsx(Tooltip, {
10057
+ label: "Item Browser",
10058
+ children: /* @__PURE__ */ jsx("button", {
10059
+ type: "button",
10060
+ className: FittingWindow_module_default.tool,
10061
+ "aria-label": "Item Browser",
10062
+ "aria-expanded": browserShown,
10063
+ "aria-controls": browserId,
10064
+ onClick: () => setBrowserOpen(!browserShown),
10065
+ children: /* @__PURE__ */ jsx(Icon, { name: "hardware" })
10086
10066
  })
10087
- }),
10088
- placeholder === void 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [
10089
- /* @__PURE__ */ jsxs("div", {
10090
- className: FittingWindow_module_default.bays,
10091
- children: [structure ? /* @__PURE__ */ jsx(Bay, {
10092
- bay: "cargo",
10093
- icon: "ammo-hold",
10094
- label: "Ammo Hold",
10095
- unlimited: true,
10096
- readOnly: preview
10097
- }) : /* @__PURE__ */ jsx(Bay, {
10098
- bay: "cargo",
10099
- icon: "cargo",
10100
- label: "Cargo Hold",
10101
- readOnly: preview
10102
- }), fighters ? /* @__PURE__ */ jsx(Bay, {
10103
- id: fighterBay,
10104
- bay: "fighterBay",
10105
- icon: "fighter-bay",
10106
- label: "Fighter Bay",
10107
- readOnly: preview
10108
- }) : /* @__PURE__ */ jsx(Bay, {
10109
- bay: "droneBay",
10110
- icon: "drone-bay",
10111
- label: "Drone Bay",
10112
- readOnly: preview
10113
- })]
10114
- }),
10115
- structure && /* @__PURE__ */ jsx(ServiceRack, { readOnly: preview }),
10116
- !preview && /* @__PURE__ */ jsx("div", {
10117
- className: FittingWindow_module_default.history,
10118
- children: /* @__PURE__ */ jsx(SimulationHistory, {})
10119
- }),
10120
- /* @__PURE__ */ jsxs("div", {
10121
- className: FittingWindow_module_default.resources,
10122
- children: [/* @__PURE__ */ jsx(Resource, {
10123
- title: "CPU",
10124
- free: "cpuFree",
10125
- output: "cpuOutput"
10126
- }), /* @__PURE__ */ jsx(Resource, {
10127
- title: "Power Grid",
10128
- free: "powerFree",
10129
- output: "powerOutput"
10130
- })]
10067
+ })
10068
+ }),
10069
+ !preview && statistics !== void 0 && /* @__PURE__ */ jsx("div", {
10070
+ className: FittingWindow_module_default.panels,
10071
+ children: /* @__PURE__ */ jsx(Tooltip, {
10072
+ label: "Statistics",
10073
+ children: /* @__PURE__ */ jsx("button", {
10074
+ type: "button",
10075
+ className: FittingWindow_module_default.tool,
10076
+ "aria-label": "Statistics",
10077
+ "aria-expanded": statisticsShown,
10078
+ "aria-controls": statisticsId,
10079
+ onClick: () => setStatisticsOpen(!statisticsShown),
10080
+ children: /* @__PURE__ */ jsx(Icon, { name: "statistics" })
10131
10081
  })
10132
- ] })
10133
- ]
10134
- }),
10135
- statistics !== void 0 && /* @__PURE__ */ jsx("div", {
10136
- id: statisticsId,
10137
- className: FittingWindow_module_default.statistics,
10138
- inert: !statisticsShown,
10139
- children: /* @__PURE__ */ jsx("div", {
10140
- className: FittingWindow_module_default.slide,
10082
+ })
10083
+ }),
10084
+ hasFit && /* @__PURE__ */ jsx(FitBays, {
10085
+ fighterBay,
10086
+ readOnly: preview
10087
+ })
10088
+ ]
10089
+ }),
10090
+ statistics !== void 0 && /* @__PURE__ */ jsx("div", {
10091
+ id: statisticsId,
10092
+ className: FittingWindow_module_default.statistics,
10093
+ inert: !statisticsShown,
10094
+ children: /* @__PURE__ */ jsx("div", {
10095
+ className: FittingWindow_module_default.slide,
10096
+ children: /* @__PURE__ */ jsx(ManageFighters, {
10097
+ fighterBay,
10098
+ readOnly: preview,
10141
10099
  children: statistics
10142
10100
  })
10143
10101
  })
10144
- ]
10102
+ })
10103
+ ]
10104
+ });
10105
+ }
10106
+ function useFighters() {
10107
+ const $ = c(3);
10108
+ const { stats } = useShownSnapshot();
10109
+ const t0 = stats.structure || stats.fighterBay.total > 0;
10110
+ let t1;
10111
+ if ($[0] !== stats.structure || $[1] !== t0) {
10112
+ t1 = {
10113
+ structure: stats.structure,
10114
+ fighters: t0
10115
+ };
10116
+ $[0] = stats.structure;
10117
+ $[1] = t0;
10118
+ $[2] = t1;
10119
+ } else t1 = $[2];
10120
+ return t1;
10121
+ }
10122
+ function ManageFighters(t0) {
10123
+ const $ = c(7);
10124
+ const { fighterBay, readOnly, children } = t0;
10125
+ const { fighters } = useFighters();
10126
+ let t1;
10127
+ if ($[0] !== fighterBay || $[1] !== fighters || $[2] !== readOnly) {
10128
+ t1 = fighters && !readOnly ? () => popover(fighterBay)?.showPopover() : void 0;
10129
+ $[0] = fighterBay;
10130
+ $[1] = fighters;
10131
+ $[2] = readOnly;
10132
+ $[3] = t1;
10133
+ } else t1 = $[3];
10134
+ const manage = t1;
10135
+ let t2;
10136
+ if ($[4] !== children || $[5] !== manage) {
10137
+ t2 = /* @__PURE__ */ jsx(ManageFightersContext, {
10138
+ value: manage,
10139
+ children
10140
+ });
10141
+ $[4] = children;
10142
+ $[5] = manage;
10143
+ $[6] = t2;
10144
+ } else t2 = $[6];
10145
+ return t2;
10146
+ }
10147
+ function FitBays(t0) {
10148
+ const $ = c(20);
10149
+ const { fighterBay, readOnly } = t0;
10150
+ const { structure, fighters } = useFighters();
10151
+ let t1;
10152
+ if ($[0] !== readOnly || $[1] !== structure) {
10153
+ t1 = structure ? /* @__PURE__ */ jsx(Bay, {
10154
+ bay: "cargo",
10155
+ icon: "ammo-hold",
10156
+ label: "Ammo Hold",
10157
+ unlimited: true,
10158
+ readOnly
10159
+ }) : /* @__PURE__ */ jsx(Bay, {
10160
+ bay: "cargo",
10161
+ icon: "cargo",
10162
+ label: "Cargo Hold",
10163
+ readOnly
10164
+ });
10165
+ $[0] = readOnly;
10166
+ $[1] = structure;
10167
+ $[2] = t1;
10168
+ } else t1 = $[2];
10169
+ let t2;
10170
+ if ($[3] !== fighterBay || $[4] !== fighters || $[5] !== readOnly) {
10171
+ t2 = fighters ? /* @__PURE__ */ jsx(Bay, {
10172
+ id: fighterBay,
10173
+ bay: "fighterBay",
10174
+ icon: "fighter-bay",
10175
+ label: "Fighter Bay",
10176
+ readOnly
10177
+ }) : /* @__PURE__ */ jsx(Bay, {
10178
+ bay: "droneBay",
10179
+ icon: "drone-bay",
10180
+ label: "Drone Bay",
10181
+ readOnly
10182
+ });
10183
+ $[3] = fighterBay;
10184
+ $[4] = fighters;
10185
+ $[5] = readOnly;
10186
+ $[6] = t2;
10187
+ } else t2 = $[6];
10188
+ let t3;
10189
+ if ($[7] !== t1 || $[8] !== t2) {
10190
+ t3 = /* @__PURE__ */ jsxs("div", {
10191
+ className: FittingWindow_module_default.bays,
10192
+ children: [t1, t2]
10193
+ });
10194
+ $[7] = t1;
10195
+ $[8] = t2;
10196
+ $[9] = t3;
10197
+ } else t3 = $[9];
10198
+ let t4;
10199
+ if ($[10] !== readOnly || $[11] !== structure) {
10200
+ t4 = structure && /* @__PURE__ */ jsx(ServiceRack, { readOnly });
10201
+ $[10] = readOnly;
10202
+ $[11] = structure;
10203
+ $[12] = t4;
10204
+ } else t4 = $[12];
10205
+ let t5;
10206
+ if ($[13] !== readOnly) {
10207
+ t5 = !readOnly && /* @__PURE__ */ jsx("div", {
10208
+ className: FittingWindow_module_default.history,
10209
+ children: /* @__PURE__ */ jsx(SimulationHistory, {})
10210
+ });
10211
+ $[13] = readOnly;
10212
+ $[14] = t5;
10213
+ } else t5 = $[14];
10214
+ let t6;
10215
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
10216
+ t6 = /* @__PURE__ */ jsxs("div", {
10217
+ className: FittingWindow_module_default.resources,
10218
+ children: [/* @__PURE__ */ jsx(Resource, {
10219
+ title: "CPU",
10220
+ free: "cpuFree",
10221
+ output: "cpuOutput"
10222
+ }), /* @__PURE__ */ jsx(Resource, {
10223
+ title: "Power Grid",
10224
+ free: "powerFree",
10225
+ output: "powerOutput"
10226
+ })]
10227
+ });
10228
+ $[15] = t6;
10229
+ } else t6 = $[15];
10230
+ let t7;
10231
+ if ($[16] !== t3 || $[17] !== t4 || $[18] !== t5) {
10232
+ t7 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
10233
+ t3,
10234
+ t4,
10235
+ t5,
10236
+ t6
10237
+ ] });
10238
+ $[16] = t3;
10239
+ $[17] = t4;
10240
+ $[18] = t5;
10241
+ $[19] = t7;
10242
+ } else t7 = $[19];
10243
+ return t7;
10244
+ }
10245
+ /** An empty `FittingWindow` while the fit loads; it needs only images. */
10246
+ function FittingWindowLoading({ label = "Fitting Window", text, browser = false, statistics = false }) {
10247
+ return /* @__PURE__ */ jsx("section", {
10248
+ className: FittingWindow_module_default.window,
10249
+ "aria-label": label,
10250
+ "aria-busy": true,
10251
+ "data-browser": browser || void 0,
10252
+ "data-statistics": statistics || void 0,
10253
+ children: /* @__PURE__ */ jsx("div", {
10254
+ className: FittingWindow_module_default.frame,
10255
+ children: /* @__PURE__ */ jsx("div", {
10256
+ className: FittingWindow_module_default.wheel,
10257
+ children: /* @__PURE__ */ jsx(Wheel, {
10258
+ label: "Fitting",
10259
+ children: /* @__PURE__ */ jsx("div", {
10260
+ className: FittingWindow_module_default.placeholder,
10261
+ children: /* @__PURE__ */ jsx("p", { children: text })
10262
+ })
10263
+ })
10264
+ })
10145
10265
  })
10146
10266
  });
10147
10267
  }
@@ -11063,9 +11183,10 @@ const folders = {
11063
11183
  }
11064
11184
  };
11065
11185
  /** Previews a type on hover, fits it on double click, drags it to the wheel, shows its info and its menu; render `overlays` once. */
11066
- function useTypeActions(noHullSelected) {
11186
+ function useTypeActions() {
11067
11187
  const $ = c(57);
11068
11188
  const store = useFitStore();
11189
+ const noHullSelected = !useHasFit();
11069
11190
  const sde = useSde();
11070
11191
  const refuses = useHullRefuses();
11071
11192
  const hasRoom = useHasRoom();
@@ -11532,124 +11653,123 @@ function SearchResults(t0) {
11532
11653
  }
11533
11654
  // src/components/ItemBrowser/Charges.tsx
11534
11655
  /** The Charges tab of the `ItemBrowser`: every charge by market group, or only those a fitted module loads. */
11535
- function Charges(t0) {
11656
+ function Charges() {
11536
11657
  const $ = c(48);
11537
- const { noHullSelected } = t0;
11538
11658
  const sde = useSde();
11539
- const { actions, clear, overlays } = useTypeActions(noHullSelected);
11659
+ const { actions, clear, overlays } = useTypeActions();
11540
11660
  const modules = useChargedModules();
11541
11661
  const [picked, setPicked] = useState();
11542
11662
  const [search, setSearch] = useState("");
11543
11663
  const [collapses, setCollapses] = useState(0);
11544
- let t1;
11664
+ let t0;
11545
11665
  if ($[0] !== modules || $[1] !== picked) {
11546
- t1 = modules.some((module) => module.id === picked) ? picked : void 0;
11666
+ t0 = modules.some((module) => module.id === picked) ? picked : void 0;
11547
11667
  $[0] = modules;
11548
11668
  $[1] = picked;
11549
- $[2] = t1;
11550
- } else t1 = $[2];
11551
- const selected = t1;
11552
- let t2;
11669
+ $[2] = t0;
11670
+ } else t0 = $[2];
11671
+ const selected = t0;
11672
+ let t1;
11553
11673
  if ($[3] !== search) {
11554
- t2 = search.trim().toLowerCase();
11674
+ t1 = search.trim().toLowerCase();
11555
11675
  $[3] = search;
11556
- $[4] = t2;
11557
- } else t2 = $[4];
11558
- const query = t2;
11559
- let t3;
11676
+ $[4] = t1;
11677
+ } else t1 = $[4];
11678
+ const query = t1;
11679
+ let t2;
11560
11680
  if ($[5] !== query || $[6] !== selected) {
11561
- t3 = selected === void 0 && query !== "" ? (type) => type.name.toLowerCase().includes(query) : void 0;
11681
+ t2 = selected === void 0 && query !== "" ? (type) => type.name.toLowerCase().includes(query) : void 0;
11562
11682
  $[5] = query;
11563
11683
  $[6] = selected;
11564
- $[7] = t3;
11565
- } else t3 = $[7];
11566
- const matches = t3;
11684
+ $[7] = t2;
11685
+ } else t2 = $[7];
11686
+ const matches = t2;
11567
11687
  const groups = useChargeTree();
11568
11688
  const found = useChargeSearch(matches);
11569
11689
  const charges = useCharges(selected);
11570
- let t4;
11690
+ let t3;
11571
11691
  if ($[8] !== charges || $[9] !== query || $[10] !== sde) {
11572
- let t5;
11692
+ let t4;
11573
11693
  if ($[12] !== query) {
11574
- t5 = (type_0) => type_0.name.toLowerCase().includes(query);
11694
+ t4 = (type_0) => type_0.name.toLowerCase().includes(query);
11575
11695
  $[12] = query;
11576
- $[13] = t5;
11577
- } else t5 = $[13];
11578
- t4 = sde.sortByMeta(charges.filter(t5));
11696
+ $[13] = t4;
11697
+ } else t4 = $[13];
11698
+ t3 = sde.sortByMeta(charges.filter(t4));
11579
11699
  $[8] = charges;
11580
11700
  $[9] = query;
11581
11701
  $[10] = sde;
11582
- $[11] = t4;
11583
- } else t4 = $[11];
11584
- const loadable = t4;
11585
- let t5;
11702
+ $[11] = t3;
11703
+ } else t3 = $[11];
11704
+ const loadable = t3;
11705
+ let t4;
11586
11706
  if ($[14] !== found || $[15] !== loadable || $[16] !== matches || $[17] !== selected) {
11587
- t5 = selected === void 0 ? matches !== void 0 && found.length === 0 : countLeaves(loadable) === 0;
11707
+ t4 = selected === void 0 ? matches !== void 0 && found.length === 0 : countLeaves(loadable) === 0;
11588
11708
  $[14] = found;
11589
11709
  $[15] = loadable;
11590
11710
  $[16] = matches;
11591
11711
  $[17] = selected;
11592
- $[18] = t5;
11593
- } else t5 = $[18];
11594
- const empty = t5;
11595
- let t6;
11712
+ $[18] = t4;
11713
+ } else t4 = $[18];
11714
+ const empty = t4;
11715
+ let t5;
11596
11716
  if ($[19] !== clear) {
11597
- t6 = (value) => {
11717
+ t5 = (value) => {
11598
11718
  clear();
11599
11719
  setSearch(value);
11600
11720
  };
11601
11721
  $[19] = clear;
11602
- $[20] = t6;
11603
- } else t6 = $[20];
11604
- let t7;
11722
+ $[20] = t5;
11723
+ } else t5 = $[20];
11724
+ let t6;
11605
11725
  if ($[21] !== collapses) {
11606
- t7 = () => setCollapses(collapses + 1);
11726
+ t6 = () => setCollapses(collapses + 1);
11607
11727
  $[21] = collapses;
11608
- $[22] = t7;
11609
- } else t7 = $[22];
11610
- let t8;
11611
- if ($[23] !== search || $[24] !== t6 || $[25] !== t7) {
11612
- t8 = /* @__PURE__ */ jsx(Search, {
11728
+ $[22] = t6;
11729
+ } else t6 = $[22];
11730
+ let t7;
11731
+ if ($[23] !== search || $[24] !== t5 || $[25] !== t6) {
11732
+ t7 = /* @__PURE__ */ jsx(Search, {
11613
11733
  value: search,
11614
- onChange: t6,
11615
- onCollapse: t7
11734
+ onChange: t5,
11735
+ onCollapse: t6
11616
11736
  });
11617
11737
  $[23] = search;
11618
- $[24] = t6;
11619
- $[25] = t7;
11620
- $[26] = t8;
11621
- } else t8 = $[26];
11622
- let t9;
11738
+ $[24] = t5;
11739
+ $[25] = t6;
11740
+ $[26] = t7;
11741
+ } else t7 = $[26];
11742
+ let t8;
11623
11743
  if ($[27] !== modules || $[28] !== selected) {
11624
- let t10;
11744
+ let t9;
11625
11745
  if ($[30] !== selected) {
11626
- t10 = (module_0) => /* @__PURE__ */ jsx(FilterToggle, {
11746
+ t9 = (module_0) => /* @__PURE__ */ jsx(FilterToggle, {
11627
11747
  typeId: module_0.id,
11628
11748
  label: module_0.name,
11629
11749
  pressed: selected === module_0.id,
11630
11750
  onPressedChange: (pressed) => setPicked(pressed ? module_0.id : void 0)
11631
11751
  }, module_0.id);
11632
11752
  $[30] = selected;
11633
- $[31] = t10;
11634
- } else t10 = $[31];
11635
- t9 = modules.map(t10);
11753
+ $[31] = t9;
11754
+ } else t9 = $[31];
11755
+ t8 = modules.map(t9);
11636
11756
  $[27] = modules;
11637
11757
  $[28] = selected;
11638
- $[29] = t9;
11639
- } else t9 = $[29];
11640
- let t10;
11641
- if ($[32] !== t9) {
11642
- t10 = /* @__PURE__ */ jsx("fieldset", {
11758
+ $[29] = t8;
11759
+ } else t8 = $[29];
11760
+ let t9;
11761
+ if ($[32] !== t8) {
11762
+ t9 = /* @__PURE__ */ jsx("fieldset", {
11643
11763
  className: ItemBrowser_module_default.filters,
11644
11764
  "aria-label": "Filters",
11645
- children: t9
11765
+ children: t8
11646
11766
  });
11647
- $[32] = t9;
11648
- $[33] = t10;
11649
- } else t10 = $[33];
11650
- let t11;
11767
+ $[32] = t8;
11768
+ $[33] = t9;
11769
+ } else t9 = $[33];
11770
+ let t10;
11651
11771
  if ($[34] !== actions || $[35] !== collapses || $[36] !== empty || $[37] !== found || $[38] !== groups || $[39] !== loadable || $[40] !== matches || $[41] !== selected) {
11652
- t11 = /* @__PURE__ */ jsx("div", {
11772
+ t10 = /* @__PURE__ */ jsx("div", {
11653
11773
  className: ItemBrowser_module_default.tree,
11654
11774
  children: empty ? /* @__PURE__ */ jsx("p", {
11655
11775
  className: ItemBrowser_module_default.empty,
@@ -11677,23 +11797,23 @@ function Charges(t0) {
11677
11797
  $[39] = loadable;
11678
11798
  $[40] = matches;
11679
11799
  $[41] = selected;
11680
- $[42] = t11;
11681
- } else t11 = $[42];
11682
- let t12;
11683
- if ($[43] !== overlays || $[44] !== t10 || $[45] !== t11 || $[46] !== t8) {
11684
- t12 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
11685
- t8,
11800
+ $[42] = t10;
11801
+ } else t10 = $[42];
11802
+ let t11;
11803
+ if ($[43] !== overlays || $[44] !== t10 || $[45] !== t7 || $[46] !== t9) {
11804
+ t11 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
11805
+ t7,
11806
+ t9,
11686
11807
  t10,
11687
- t11,
11688
11808
  overlays
11689
11809
  ] });
11690
11810
  $[43] = overlays;
11691
11811
  $[44] = t10;
11692
- $[45] = t11;
11693
- $[46] = t8;
11694
- $[47] = t12;
11695
- } else t12 = $[47];
11696
- return t12;
11812
+ $[45] = t7;
11813
+ $[46] = t9;
11814
+ $[47] = t11;
11815
+ } else t11 = $[47];
11816
+ return t11;
11697
11817
  }
11698
11818
  // src/components/ItemBrowser/saveFit.tsx
11699
11819
  const MAX_ESI_NAME = 50;
@@ -12197,11 +12317,11 @@ function _temp2$4(event_0) {
12197
12317
  // src/components/ItemBrowser/FitActions.tsx
12198
12318
  /** The buttons under the `ItemBrowser`: save the fit in the browser, import one, or copy it out. */
12199
12319
  function FitActions(t0) {
12200
- const $ = c(56);
12201
- const { noHullSelected, pasteToOpen } = t0;
12320
+ const $ = c(55);
12321
+ const { pasteToOpen } = t0;
12202
12322
  const engine = useEngine();
12203
- const fit = useFit();
12204
12323
  const store = useFitStore();
12324
+ const noHullSelected = !useHasFit();
12205
12325
  const menu = useId();
12206
12326
  const [saved, flashSaved] = useFlash();
12207
12327
  const [copied, flashCopied] = useFlash();
@@ -12210,10 +12330,10 @@ function FitActions(t0) {
12210
12330
  const saver = useSaveFit();
12211
12331
  const [savedTo, setSavedTo] = useState("");
12212
12332
  let t1;
12213
- if ($[0] !== fit || $[1] !== flashSaved || $[2] !== saver || $[3] !== store) {
12333
+ if ($[0] !== flashSaved || $[1] !== saver || $[2] !== store) {
12214
12334
  t1 = () => {
12215
12335
  const where = saver.target?.name ?? "browser";
12216
- saver.save(fit, {
12336
+ saver.save(store.getSnapshot().fit, {
12217
12337
  onStart: (named) => store.setName(named.name ?? ""),
12218
12338
  onSaved: () => {
12219
12339
  setSavedTo(where);
@@ -12221,16 +12341,15 @@ function FitActions(t0) {
12221
12341
  }
12222
12342
  });
12223
12343
  };
12224
- $[0] = fit;
12225
- $[1] = flashSaved;
12226
- $[2] = saver;
12227
- $[3] = store;
12228
- $[4] = t1;
12229
- } else t1 = $[4];
12344
+ $[0] = flashSaved;
12345
+ $[1] = saver;
12346
+ $[2] = store;
12347
+ $[3] = t1;
12348
+ } else t1 = $[3];
12230
12349
  const saveCurrent = t1;
12231
12350
  let t2;
12232
12351
  let t3;
12233
- if ($[5] !== engine || $[6] !== noHullSelected || $[7] !== pasteToOpen || $[8] !== store) {
12352
+ if ($[4] !== engine || $[5] !== noHullSelected || $[6] !== pasteToOpen || $[7] !== store) {
12234
12353
  t2 = () => {
12235
12354
  if (!pasteToOpen) return;
12236
12355
  const onPaste = (event) => {
@@ -12276,32 +12395,32 @@ function FitActions(t0) {
12276
12395
  pasteToOpen,
12277
12396
  noHullSelected
12278
12397
  ];
12279
- $[5] = engine;
12280
- $[6] = noHullSelected;
12281
- $[7] = pasteToOpen;
12282
- $[8] = store;
12283
- $[9] = t2;
12284
- $[10] = t3;
12398
+ $[4] = engine;
12399
+ $[5] = noHullSelected;
12400
+ $[6] = pasteToOpen;
12401
+ $[7] = store;
12402
+ $[8] = t2;
12403
+ $[9] = t3;
12285
12404
  } else {
12286
- t2 = $[9];
12287
- t3 = $[10];
12405
+ t2 = $[8];
12406
+ t3 = $[9];
12288
12407
  }
12289
12408
  useEffect(t2, t3);
12290
12409
  let t4;
12291
- if ($[11] !== copyFit || $[12] !== fit || $[13] !== flashCopied || $[14] !== menu) {
12410
+ if ($[10] !== copyFit || $[11] !== flashCopied || $[12] !== menu || $[13] !== store) {
12292
12411
  t4 = (format) => {
12293
12412
  document.getElementById(menu)?.hidePopover();
12294
- copyFit(fit, format, flashCopied);
12413
+ copyFit(store.getSnapshot().fit, format, flashCopied);
12295
12414
  };
12296
- $[11] = copyFit;
12297
- $[12] = fit;
12298
- $[13] = flashCopied;
12299
- $[14] = menu;
12300
- $[15] = t4;
12301
- } else t4 = $[15];
12415
+ $[10] = copyFit;
12416
+ $[11] = flashCopied;
12417
+ $[12] = menu;
12418
+ $[13] = store;
12419
+ $[14] = t4;
12420
+ } else t4 = $[14];
12302
12421
  const copy = t4;
12303
12422
  let t5;
12304
- if ($[16] !== noHullSelected || $[17] !== saveCurrent || $[18] !== saved || $[19] !== savedTo || $[20] !== saver) {
12423
+ if ($[15] !== noHullSelected || $[16] !== saveCurrent || $[17] !== saved || $[18] !== savedTo || $[19] !== saver) {
12305
12424
  t5 = saver.characters === void 0 ? /* @__PURE__ */ jsx("button", {
12306
12425
  type: "button",
12307
12426
  className: ItemBrowser_module_default.action,
@@ -12314,33 +12433,33 @@ function FitActions(t0) {
12314
12433
  disabled: noHullSelected,
12315
12434
  onSave: saveCurrent
12316
12435
  });
12317
- $[16] = noHullSelected;
12318
- $[17] = saveCurrent;
12319
- $[18] = saved;
12320
- $[19] = savedTo;
12321
- $[20] = saver;
12322
- $[21] = t5;
12323
- } else t5 = $[21];
12436
+ $[15] = noHullSelected;
12437
+ $[16] = saveCurrent;
12438
+ $[17] = saved;
12439
+ $[18] = savedTo;
12440
+ $[19] = saver;
12441
+ $[20] = t5;
12442
+ } else t5 = $[20];
12324
12443
  let t6;
12325
- if ($[22] === Symbol.for("react.memo_cache_sentinel")) {
12444
+ if ($[21] === Symbol.for("react.memo_cache_sentinel")) {
12326
12445
  t6 = /* @__PURE__ */ jsx("button", {
12327
12446
  type: "button",
12328
12447
  className: ItemBrowser_module_default.action,
12329
12448
  onClick: () => setImporting({ text: "" }),
12330
12449
  children: "Import…"
12331
12450
  });
12332
- $[22] = t6;
12333
- } else t6 = $[22];
12451
+ $[21] = t6;
12452
+ } else t6 = $[21];
12334
12453
  const t7 = copied ? "Copied" : "Copy";
12335
12454
  const t8 = copied ? "checkmark" : "export";
12336
12455
  let t9;
12337
- if ($[23] !== t8) {
12456
+ if ($[22] !== t8) {
12338
12457
  t9 = /* @__PURE__ */ jsx(Icon, { name: t8 });
12339
- $[23] = t8;
12340
- $[24] = t9;
12341
- } else t9 = $[24];
12458
+ $[22] = t8;
12459
+ $[23] = t9;
12460
+ } else t9 = $[23];
12342
12461
  let t10;
12343
- if ($[25] !== menu || $[26] !== noHullSelected || $[27] !== t9) {
12462
+ if ($[24] !== menu || $[25] !== noHullSelected || $[26] !== t9) {
12344
12463
  t10 = /* @__PURE__ */ jsx("button", {
12345
12464
  type: "button",
12346
12465
  className: `${ItemBrowser_module_default.action} ${ItemBrowser_module_default.copy}`,
@@ -12349,13 +12468,13 @@ function FitActions(t0) {
12349
12468
  disabled: noHullSelected,
12350
12469
  children: t9
12351
12470
  });
12352
- $[25] = menu;
12353
- $[26] = noHullSelected;
12354
- $[27] = t9;
12355
- $[28] = t10;
12356
- } else t10 = $[28];
12471
+ $[24] = menu;
12472
+ $[25] = noHullSelected;
12473
+ $[26] = t9;
12474
+ $[27] = t10;
12475
+ } else t10 = $[27];
12357
12476
  let t11;
12358
- if ($[29] !== t10 || $[30] !== t7) {
12477
+ if ($[28] !== t10 || $[29] !== t7) {
12359
12478
  t11 = /* @__PURE__ */ jsx("span", {
12360
12479
  className: ItemBrowser_module_default.copyAnchor,
12361
12480
  children: /* @__PURE__ */ jsx(Tooltip, {
@@ -12363,34 +12482,34 @@ function FitActions(t0) {
12363
12482
  children: t10
12364
12483
  })
12365
12484
  });
12366
- $[29] = t10;
12367
- $[30] = t7;
12368
- $[31] = t11;
12369
- } else t11 = $[31];
12485
+ $[28] = t10;
12486
+ $[29] = t7;
12487
+ $[30] = t11;
12488
+ } else t11 = $[30];
12370
12489
  let t12;
12371
- if ($[32] !== copy) {
12490
+ if ($[31] !== copy) {
12372
12491
  t12 = /* @__PURE__ */ jsx("button", {
12373
12492
  type: "button",
12374
12493
  role: "menuitem",
12375
12494
  onClick: () => copy("eft"),
12376
12495
  children: "Copy as EFT"
12377
12496
  });
12378
- $[32] = copy;
12379
- $[33] = t12;
12380
- } else t12 = $[33];
12497
+ $[31] = copy;
12498
+ $[32] = t12;
12499
+ } else t12 = $[32];
12381
12500
  let t13;
12382
- if ($[34] !== copy) {
12501
+ if ($[33] !== copy) {
12383
12502
  t13 = /* @__PURE__ */ jsx("button", {
12384
12503
  type: "button",
12385
12504
  role: "menuitem",
12386
12505
  onClick: () => copy("esf"),
12387
12506
  children: "Copy as esf/1"
12388
12507
  });
12389
- $[34] = copy;
12390
- $[35] = t13;
12391
- } else t13 = $[35];
12508
+ $[33] = copy;
12509
+ $[34] = t13;
12510
+ } else t13 = $[34];
12392
12511
  let t14;
12393
- if ($[36] !== menu || $[37] !== t12 || $[38] !== t13) {
12512
+ if ($[35] !== menu || $[36] !== t12 || $[37] !== t13) {
12394
12513
  t14 = /* @__PURE__ */ jsxs("div", {
12395
12514
  id: menu,
12396
12515
  className: ItemBrowser_module_default.menu,
@@ -12398,51 +12517,51 @@ function FitActions(t0) {
12398
12517
  role: "menu",
12399
12518
  children: [t12, t13]
12400
12519
  });
12401
- $[36] = menu;
12402
- $[37] = t12;
12403
- $[38] = t13;
12404
- $[39] = t14;
12405
- } else t14 = $[39];
12520
+ $[35] = menu;
12521
+ $[36] = t12;
12522
+ $[37] = t13;
12523
+ $[38] = t14;
12524
+ } else t14 = $[38];
12406
12525
  const t15 = importing !== void 0;
12407
12526
  let t16;
12408
- if ($[40] === Symbol.for("react.memo_cache_sentinel")) {
12527
+ if ($[39] === Symbol.for("react.memo_cache_sentinel")) {
12409
12528
  t16 = () => setImporting(void 0);
12410
- $[40] = t16;
12411
- } else t16 = $[40];
12529
+ $[39] = t16;
12530
+ } else t16 = $[39];
12412
12531
  let t17;
12413
- if ($[41] !== importing) {
12532
+ if ($[40] !== importing) {
12414
12533
  t17 = importing ?? { text: "" };
12415
- $[41] = importing;
12416
- $[42] = t17;
12417
- } else t17 = $[42];
12534
+ $[40] = importing;
12535
+ $[41] = t17;
12536
+ } else t17 = $[41];
12418
12537
  let t18;
12419
- if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
12538
+ if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
12420
12539
  t18 = () => setImporting(void 0);
12421
- $[43] = t18;
12422
- } else t18 = $[43];
12540
+ $[42] = t18;
12541
+ } else t18 = $[42];
12423
12542
  let t19;
12424
- if ($[44] !== t17) {
12543
+ if ($[43] !== t17) {
12425
12544
  t19 = /* @__PURE__ */ jsx(ImportForm, {
12426
12545
  draft: t17,
12427
12546
  onDone: t18
12428
12547
  });
12429
- $[44] = t17;
12430
- $[45] = t19;
12431
- } else t19 = $[45];
12548
+ $[43] = t17;
12549
+ $[44] = t19;
12550
+ } else t19 = $[44];
12432
12551
  let t20;
12433
- if ($[46] !== t15 || $[47] !== t19) {
12552
+ if ($[45] !== t15 || $[46] !== t19) {
12434
12553
  t20 = /* @__PURE__ */ jsx(Dialog, {
12435
12554
  open: t15,
12436
12555
  title: "Import Fit",
12437
12556
  onClose: t16,
12438
12557
  children: t19
12439
12558
  });
12440
- $[46] = t15;
12441
- $[47] = t19;
12442
- $[48] = t20;
12443
- } else t20 = $[48];
12559
+ $[45] = t15;
12560
+ $[46] = t19;
12561
+ $[47] = t20;
12562
+ } else t20 = $[47];
12444
12563
  let t21;
12445
- if ($[49] !== copyDialog || $[50] !== saver.dialog || $[51] !== t11 || $[52] !== t14 || $[53] !== t20 || $[54] !== t5) {
12564
+ if ($[48] !== copyDialog || $[49] !== saver.dialog || $[50] !== t11 || $[51] !== t14 || $[52] !== t20 || $[53] !== t5) {
12446
12565
  t21 = /* @__PURE__ */ jsxs("div", {
12447
12566
  className: ItemBrowser_module_default.actions,
12448
12567
  children: [
@@ -12455,14 +12574,14 @@ function FitActions(t0) {
12455
12574
  saver.dialog
12456
12575
  ]
12457
12576
  });
12458
- $[49] = copyDialog;
12459
- $[50] = saver.dialog;
12460
- $[51] = t11;
12461
- $[52] = t14;
12462
- $[53] = t20;
12463
- $[54] = t5;
12464
- $[55] = t21;
12465
- } else t21 = $[55];
12577
+ $[48] = copyDialog;
12578
+ $[49] = saver.dialog;
12579
+ $[50] = t11;
12580
+ $[51] = t14;
12581
+ $[52] = t20;
12582
+ $[53] = t5;
12583
+ $[54] = t21;
12584
+ } else t21 = $[54];
12466
12585
  return t21;
12467
12586
  }
12468
12587
  function SaveSplit(t0) {
@@ -12856,10 +12975,10 @@ async function fitMutated(engine, store, typeId, itemId) {
12856
12975
  const noFits = [];
12857
12976
  const SHIPS_MARKET_GROUP_ID = 4;
12858
12977
  /** The Hulls & Fits tab of the `ItemBrowser`: EVE's hulls by group and race, with the fits saved for each. */
12859
- function HullsAndFits(t0) {
12978
+ function HullsAndFits() {
12860
12979
  const $ = c(115);
12861
- const { noHullSelected } = t0;
12862
- const fitShipId = useFit().ship.type_id;
12980
+ const fitShipId = useSnapshotIfAny()?.fit.ship.type_id;
12981
+ const noHullSelected = fitShipId === void 0;
12863
12982
  const images = useImages();
12864
12983
  const store = useFitStore();
12865
12984
  const missingSkills = useMissingSkills();
@@ -12878,56 +12997,56 @@ function HullsAndFits(t0) {
12878
12997
  const [currentHull, setCurrentHull] = useState(false);
12879
12998
  const [flyable, setFlyable] = useState(false);
12880
12999
  const [collapses, setCollapses] = useState(0);
12881
- let t1;
13000
+ let t0;
12882
13001
  if ($[0] !== search) {
12883
- t1 = search.trim().toLowerCase();
13002
+ t0 = search.trim().toLowerCase();
12884
13003
  $[0] = search;
12885
- $[1] = t1;
12886
- } else t1 = $[1];
12887
- const query = t1;
13004
+ $[1] = t0;
13005
+ } else t0 = $[1];
13006
+ const query = t0;
12888
13007
  const anySource = browserFits || personalFits;
12889
13008
  const currentShipId = currentHull && !noHullSelected ? fitShipId : void 0;
12890
- let t2;
13009
+ let t1;
12891
13010
  if ($[2] !== query) {
12892
- t2 = (name) => (name ?? "").toLowerCase().includes(query);
13011
+ t1 = (name) => (name ?? "").toLowerCase().includes(query);
12893
13012
  $[2] = query;
12894
- $[3] = t2;
12895
- } else t2 = $[3];
12896
- const matches = t2;
12897
- let t3;
13013
+ $[3] = t1;
13014
+ } else t1 = $[3];
13015
+ const matches = t1;
13016
+ let t2;
12898
13017
  if ($[4] !== anySource || $[5] !== browserFits || $[6] !== fits || $[7] !== personal.fits || $[8] !== personalFits) {
12899
13018
  const listed = [...!anySource || browserFits ? fits.map(_temp$4) : [], ...!anySource || personalFits ? personal.fits.map(_temp2$2) : []].toSorted(_temp3);
12900
- t3 = Map.groupBy(listed, _temp4);
13019
+ t2 = Map.groupBy(listed, _temp4);
12901
13020
  $[4] = anySource;
12902
13021
  $[5] = browserFits;
12903
13022
  $[6] = fits;
12904
13023
  $[7] = personal.fits;
12905
13024
  $[8] = personalFits;
12906
- $[9] = t3;
12907
- } else t3 = $[9];
12908
- const fitsByHull = t3;
12909
- let t4;
13025
+ $[9] = t2;
13026
+ } else t2 = $[9];
13027
+ const fitsByHull = t2;
13028
+ let t3;
12910
13029
  if ($[10] !== fits) {
12911
- t4 = Map.groupBy(fits, _temp5);
13030
+ t3 = Map.groupBy(fits, _temp5);
12912
13031
  $[10] = fits;
12913
- $[11] = t4;
12914
- } else t4 = $[11];
12915
- let t5;
13032
+ $[11] = t3;
13033
+ } else t3 = $[11];
13034
+ let t4;
12916
13035
  if ($[12] !== personal.fits) {
12917
- t5 = Map.groupBy(personal.fits, _temp6);
13036
+ t4 = Map.groupBy(personal.fits, _temp6);
12918
13037
  $[12] = personal.fits;
12919
- $[13] = t5;
12920
- } else t5 = $[13];
12921
- let t6;
13038
+ $[13] = t4;
13039
+ } else t4 = $[13];
13040
+ let t5;
12922
13041
  if ($[14] !== fitsByHull || $[15] !== flyable || $[16] !== matches || $[17] !== missingSkills) {
12923
- t6 = (ship) => {
13042
+ t5 = (ship) => {
12924
13043
  const saved = fitsByHull.get(ship.id) ?? noFits;
12925
- const kept = flyable ? saved.filter((t7) => {
12926
- const { fit: fit_4 } = t7;
13044
+ const kept = flyable ? saved.filter((t6) => {
13045
+ const { fit: fit_4 } = t6;
12927
13046
  return missingSkills(fit_4).length === 0;
12928
13047
  }) : saved;
12929
- return matches(ship.name) ? kept : kept.filter((t8) => {
12930
- const { fit: fit_5 } = t8;
13048
+ return matches(ship.name) ? kept : kept.filter((t7) => {
13049
+ const { fit: fit_5 } = t7;
12931
13050
  return matches(fit_5.name);
12932
13051
  });
12933
13052
  };
@@ -12935,30 +13054,30 @@ function HullsAndFits(t0) {
12935
13054
  $[15] = flyable;
12936
13055
  $[16] = matches;
12937
13056
  $[17] = missingSkills;
12938
- $[18] = t6;
12939
- } else t6 = $[18];
12940
- let t7;
12941
- if ($[19] !== t4 || $[20] !== t5 || $[21] !== t6) {
12942
- t7 = {
12943
- browserByHull: t4,
12944
- personalByHull: t5,
12945
- shownFits: t6
13057
+ $[18] = t5;
13058
+ } else t5 = $[18];
13059
+ let t6;
13060
+ if ($[19] !== t3 || $[20] !== t4 || $[21] !== t5) {
13061
+ t6 = {
13062
+ browserByHull: t3,
13063
+ personalByHull: t4,
13064
+ shownFits: t5
12946
13065
  };
12947
- $[19] = t4;
12948
- $[20] = t5;
12949
- $[21] = t6;
12950
- $[22] = t7;
12951
- } else t7 = $[22];
12952
- const { browserByHull, personalByHull, shownFits } = t7;
12953
- let t8;
13066
+ $[19] = t3;
13067
+ $[20] = t4;
13068
+ $[21] = t5;
13069
+ $[22] = t6;
13070
+ } else t6 = $[22];
13071
+ const { browserByHull, personalByHull, shownFits } = t6;
13072
+ let t7;
12954
13073
  bb0: {
12955
13074
  if (query === "" && !currentHull && !anySource && !flyable) {
12956
- t8 = void 0;
13075
+ t7 = void 0;
12957
13076
  break bb0;
12958
13077
  }
12959
- let t9;
13078
+ let t8;
12960
13079
  if ($[23] !== anySource || $[24] !== currentHull || $[25] !== currentShipId || $[26] !== flyable || $[27] !== missingSkills || $[28] !== query || $[29] !== shownFits) {
12961
- t9 = (ship_0) => {
13080
+ t8 = (ship_0) => {
12962
13081
  if (currentShipId !== void 0 && ship_0.id !== currentShipId) return false;
12963
13082
  if (flyable && missingSkills([ship_0.id]).length > 0) return false;
12964
13083
  const shown = shownFits(ship_0);
@@ -12972,24 +13091,24 @@ function HullsAndFits(t0) {
12972
13091
  $[27] = missingSkills;
12973
13092
  $[28] = query;
12974
13093
  $[29] = shownFits;
12975
- $[30] = t9;
12976
- } else t9 = $[30];
12977
- t8 = t9;
13094
+ $[30] = t8;
13095
+ } else t8 = $[30];
13096
+ t7 = t8;
12978
13097
  }
12979
- const groups = useHullTree(t8);
12980
- let t9;
13098
+ const groups = useHullTree(t7);
13099
+ let t8;
12981
13100
  if ($[31] !== store) {
12982
- t9 = (shipTypeId) => store.replace({
13101
+ t8 = (shipTypeId) => store.replace({
12983
13102
  ship: { type_id: shipTypeId },
12984
13103
  items: []
12985
13104
  });
12986
13105
  $[31] = store;
12987
- $[32] = t9;
12988
- } else t9 = $[32];
12989
- const simulate = t9;
12990
- let t10;
13106
+ $[32] = t8;
13107
+ } else t8 = $[32];
13108
+ const simulate = t8;
13109
+ let t9;
12991
13110
  if ($[33] !== open || $[34] !== showInfo || $[35] !== simulate) {
12992
- t10 = (event, ship_1) => {
13111
+ t9 = (event, ship_1) => {
12993
13112
  const anchor = event.currentTarget;
12994
13113
  open(event, [
12995
13114
  {
@@ -13010,13 +13129,13 @@ function HullsAndFits(t0) {
13010
13129
  $[33] = open;
13011
13130
  $[34] = showInfo;
13012
13131
  $[35] = simulate;
13013
- $[36] = t10;
13014
- } else t10 = $[36];
13015
- const hullMenu = t10;
13016
- let t11;
13132
+ $[36] = t9;
13133
+ } else t9 = $[36];
13134
+ const hullMenu = t9;
13135
+ let t10;
13017
13136
  if ($[37] !== copy || $[38] !== open || $[39] !== personal.remove || $[40] !== saveFit || $[41] !== saveTarget || $[42] !== store) {
13018
- t11 = (event_0, t12) => {
13019
- const { fit: fit_6, kind } = t12;
13137
+ t10 = (event_0, t11) => {
13138
+ const { fit: fit_6, kind } = t11;
13020
13139
  open(event_0, [
13021
13140
  {
13022
13141
  label: "Simulate Fitting",
@@ -13051,75 +13170,75 @@ function HullsAndFits(t0) {
13051
13170
  $[40] = saveFit;
13052
13171
  $[41] = saveTarget;
13053
13172
  $[42] = store;
13054
- $[43] = t11;
13055
- } else t11 = $[43];
13056
- const fitMenu = t11;
13057
- let t12;
13173
+ $[43] = t10;
13174
+ } else t10 = $[43];
13175
+ const fitMenu = t10;
13176
+ let t11;
13058
13177
  if ($[44] !== collapses) {
13059
- t12 = () => setCollapses(collapses + 1);
13178
+ t11 = () => setCollapses(collapses + 1);
13060
13179
  $[44] = collapses;
13061
- $[45] = t12;
13062
- } else t12 = $[45];
13063
- let t13;
13064
- if ($[46] !== search || $[47] !== t12) {
13065
- t13 = /* @__PURE__ */ jsx(Search, {
13180
+ $[45] = t11;
13181
+ } else t11 = $[45];
13182
+ let t12;
13183
+ if ($[46] !== search || $[47] !== t11) {
13184
+ t12 = /* @__PURE__ */ jsx(Search, {
13066
13185
  value: search,
13067
13186
  onChange: setSearch,
13068
- onCollapse: t12
13187
+ onCollapse: t11
13069
13188
  });
13070
13189
  $[46] = search;
13071
- $[47] = t12;
13072
- $[48] = t13;
13073
- } else t13 = $[48];
13074
- let t14;
13190
+ $[47] = t11;
13191
+ $[48] = t12;
13192
+ } else t12 = $[48];
13193
+ let t13;
13075
13194
  if ($[49] !== browserFits) {
13076
- t14 = /* @__PURE__ */ jsx(FilterToggle, {
13195
+ t13 = /* @__PURE__ */ jsx(FilterToggle, {
13077
13196
  icon: "fits-browser",
13078
13197
  label: "Browser Fittings",
13079
13198
  pressed: browserFits,
13080
13199
  onPressedChange: setBrowserFits
13081
13200
  });
13082
13201
  $[49] = browserFits;
13083
- $[50] = t14;
13084
- } else t14 = $[50];
13085
- let t15;
13202
+ $[50] = t13;
13203
+ } else t13 = $[50];
13204
+ let t14;
13086
13205
  if ($[51] !== personalFits) {
13087
- t15 = /* @__PURE__ */ jsx(FilterToggle, {
13206
+ t14 = /* @__PURE__ */ jsx(FilterToggle, {
13088
13207
  icon: "fits-personal",
13089
13208
  label: "Personal Fittings",
13090
13209
  pressed: personalFits,
13091
13210
  onPressedChange: setPersonalFits
13092
13211
  });
13093
13212
  $[51] = personalFits;
13094
- $[52] = t15;
13095
- } else t15 = $[52];
13213
+ $[52] = t14;
13214
+ } else t14 = $[52];
13215
+ let t15;
13096
13216
  let t16;
13097
13217
  let t17;
13098
- let t18;
13099
13218
  if ($[53] === Symbol.for("react.memo_cache_sentinel")) {
13100
- t16 = /* @__PURE__ */ jsx(FilterToggle, {
13219
+ t15 = /* @__PURE__ */ jsx(FilterToggle, {
13101
13220
  icon: "fits-corporation",
13102
13221
  label: "Corporation Fittings"
13103
13222
  });
13104
- t17 = /* @__PURE__ */ jsx(FilterToggle, {
13223
+ t16 = /* @__PURE__ */ jsx(FilterToggle, {
13105
13224
  icon: "fits-alliance",
13106
13225
  label: "Alliance Fittings"
13107
13226
  });
13108
- t18 = /* @__PURE__ */ jsx(FilterToggle, {
13227
+ t17 = /* @__PURE__ */ jsx(FilterToggle, {
13109
13228
  icon: "fits-community",
13110
13229
  label: "Community Fittings"
13111
13230
  });
13112
- $[53] = t16;
13113
- $[54] = t17;
13114
- $[55] = t18;
13231
+ $[53] = t15;
13232
+ $[54] = t16;
13233
+ $[55] = t17;
13115
13234
  } else {
13116
- t16 = $[53];
13117
- t17 = $[54];
13118
- t18 = $[55];
13235
+ t15 = $[53];
13236
+ t16 = $[54];
13237
+ t17 = $[55];
13119
13238
  }
13120
- let t19;
13239
+ let t18;
13121
13240
  if ($[56] !== currentHull || $[57] !== noHullSelected) {
13122
- t19 = /* @__PURE__ */ jsx(FilterToggle, {
13241
+ t18 = /* @__PURE__ */ jsx(FilterToggle, {
13123
13242
  icon: "current-hull",
13124
13243
  label: "Current Hull",
13125
13244
  pressed: currentHull,
@@ -13128,43 +13247,43 @@ function HullsAndFits(t0) {
13128
13247
  });
13129
13248
  $[56] = currentHull;
13130
13249
  $[57] = noHullSelected;
13131
- $[58] = t19;
13132
- } else t19 = $[58];
13133
- let t20;
13250
+ $[58] = t18;
13251
+ } else t18 = $[58];
13252
+ let t19;
13134
13253
  if ($[59] !== flyable) {
13135
- t20 = /* @__PURE__ */ jsx(FilterToggle, {
13254
+ t19 = /* @__PURE__ */ jsx(FilterToggle, {
13136
13255
  icon: "skills",
13137
13256
  label: "Skills",
13138
13257
  pressed: flyable,
13139
13258
  onPressedChange: setFlyable
13140
13259
  });
13141
13260
  $[59] = flyable;
13142
- $[60] = t20;
13143
- } else t20 = $[60];
13144
- let t21;
13145
- if ($[61] !== t14 || $[62] !== t15 || $[63] !== t19 || $[64] !== t20) {
13146
- t21 = /* @__PURE__ */ jsxs("fieldset", {
13261
+ $[60] = t19;
13262
+ } else t19 = $[60];
13263
+ let t20;
13264
+ if ($[61] !== t13 || $[62] !== t14 || $[63] !== t18 || $[64] !== t19) {
13265
+ t20 = /* @__PURE__ */ jsxs("fieldset", {
13147
13266
  className: ItemBrowser_module_default.filters,
13148
13267
  "aria-label": "Filters",
13149
13268
  children: [
13269
+ t13,
13150
13270
  t14,
13151
13271
  t15,
13152
13272
  t16,
13153
13273
  t17,
13154
13274
  t18,
13155
- t19,
13156
- t20
13275
+ t19
13157
13276
  ]
13158
13277
  });
13159
- $[61] = t14;
13160
- $[62] = t15;
13161
- $[63] = t19;
13162
- $[64] = t20;
13163
- $[65] = t21;
13164
- } else t21 = $[65];
13165
- let t22;
13278
+ $[61] = t13;
13279
+ $[62] = t14;
13280
+ $[63] = t18;
13281
+ $[64] = t19;
13282
+ $[65] = t20;
13283
+ } else t20 = $[65];
13284
+ let t21;
13166
13285
  if ($[66] !== groups.length || $[67] !== personal.character || $[68] !== personalFits) {
13167
- t22 = personalFits && personal.character?.canReadFits !== true ? /* @__PURE__ */ jsx("p", {
13286
+ t21 = personalFits && personal.character?.canReadFits !== true ? /* @__PURE__ */ jsx("p", {
13168
13287
  className: ItemBrowser_module_default.empty,
13169
13288
  children: personal.character === void 0 ? "Log in or pick a character with the Character button" : "Log in again with the Character button to see fittings"
13170
13289
  }) : groups.length === 0 ? /* @__PURE__ */ jsx("p", {
@@ -13174,18 +13293,18 @@ function HullsAndFits(t0) {
13174
13293
  $[66] = groups.length;
13175
13294
  $[67] = personal.character;
13176
13295
  $[68] = personalFits;
13177
- $[69] = t22;
13178
- } else t22 = $[69];
13179
- let t23;
13296
+ $[69] = t21;
13297
+ } else t21 = $[69];
13298
+ let t22;
13180
13299
  if ($[70] !== browserByHull || $[71] !== collapses || $[72] !== end || $[73] !== fitMenu || $[74] !== groups || $[75] !== hullMenu || $[76] !== images || $[77] !== personalByHull || $[78] !== shownFits || $[79] !== simulate || $[80] !== start || $[81] !== store) {
13181
- t23 = groups.length > 0 && /* @__PURE__ */ jsx(TreeList, {
13300
+ t22 = groups.length > 0 && /* @__PURE__ */ jsx(TreeList, {
13182
13301
  label: "Hulls",
13183
- children: groups.map((t24) => {
13184
- const { group, races } = t24;
13302
+ children: groups.map((t23) => {
13303
+ const { group, races } = t23;
13185
13304
  return /* @__PURE__ */ jsx(TreeGroup, {
13186
13305
  label: group.name,
13187
- children: () => races.map((t25) => {
13188
- const { race, factionId, ships } = t25;
13306
+ children: () => races.map((t24) => {
13307
+ const { race, factionId, ships } = t24;
13189
13308
  return /* @__PURE__ */ jsx(TreeGroup, {
13190
13309
  label: `${raceName(race)} [${ships.length}]`,
13191
13310
  icon: factionId === void 0 ? images.marketGroupIcon(SHIPS_MARKET_GROUP_ID) : images.factionIcon(factionId),
@@ -13255,55 +13374,55 @@ function HullsAndFits(t0) {
13255
13374
  $[79] = simulate;
13256
13375
  $[80] = start;
13257
13376
  $[81] = store;
13258
- $[82] = t23;
13259
- } else t23 = $[82];
13260
- let t24;
13261
- if ($[83] !== t22 || $[84] !== t23) {
13262
- t24 = /* @__PURE__ */ jsxs("div", {
13377
+ $[82] = t22;
13378
+ } else t22 = $[82];
13379
+ let t23;
13380
+ if ($[83] !== t21 || $[84] !== t22) {
13381
+ t23 = /* @__PURE__ */ jsxs("div", {
13263
13382
  className: ItemBrowser_module_default.tree,
13264
- children: [t22, t23]
13383
+ children: [t21, t22]
13265
13384
  });
13266
- $[83] = t22;
13267
- $[84] = t23;
13268
- $[85] = t24;
13269
- } else t24 = $[85];
13270
- const t25 = deleting !== void 0;
13271
- let t26;
13385
+ $[83] = t21;
13386
+ $[84] = t22;
13387
+ $[85] = t23;
13388
+ } else t23 = $[85];
13389
+ const t24 = deleting !== void 0;
13390
+ let t25;
13272
13391
  if ($[86] === Symbol.for("react.memo_cache_sentinel")) {
13273
- t26 = () => setDeleting(void 0);
13274
- $[86] = t26;
13275
- } else t26 = $[86];
13276
- const t27 = deleting?.fit.name || "Unnamed";
13277
- const t28 = deleting?.kind === "fits-personal" ? `${personal.character?.name} in EVE` : "this browser";
13278
- let t29;
13279
- if ($[87] !== t27 || $[88] !== t28) {
13280
- t29 = /* @__PURE__ */ jsxs("p", { children: [
13392
+ t25 = () => setDeleting(void 0);
13393
+ $[86] = t25;
13394
+ } else t25 = $[86];
13395
+ const t26 = deleting?.fit.name || "Unnamed";
13396
+ const t27 = deleting?.kind === "fits-personal" ? `${personal.character?.name} in EVE` : "this browser";
13397
+ let t28;
13398
+ if ($[87] !== t26 || $[88] !== t27) {
13399
+ t28 = /* @__PURE__ */ jsxs("p", { children: [
13281
13400
  "Delete the fit \"",
13282
- t27,
13401
+ t26,
13283
13402
  "\" from",
13284
13403
  " ",
13285
- t28,
13404
+ t27,
13286
13405
  "?"
13287
13406
  ] });
13288
- $[87] = t27;
13289
- $[88] = t28;
13290
- $[89] = t29;
13291
- } else t29 = $[89];
13292
- let t30;
13407
+ $[87] = t26;
13408
+ $[88] = t27;
13409
+ $[89] = t28;
13410
+ } else t28 = $[89];
13411
+ let t29;
13293
13412
  if ($[90] === Symbol.for("react.memo_cache_sentinel")) {
13294
- t30 = /* @__PURE__ */ jsx("button", {
13413
+ t29 = /* @__PURE__ */ jsx("button", {
13295
13414
  type: "button",
13296
13415
  className: ItemBrowser_module_default.action,
13297
13416
  onClick: () => setDeleting(void 0),
13298
13417
  children: "Cancel"
13299
13418
  });
13300
- $[90] = t30;
13301
- } else t30 = $[90];
13302
- let t31;
13419
+ $[90] = t29;
13420
+ } else t29 = $[90];
13421
+ let t30;
13303
13422
  if ($[91] !== deleting || $[92] !== personal || $[93] !== remove) {
13304
- t31 = /* @__PURE__ */ jsxs("div", {
13423
+ t30 = /* @__PURE__ */ jsxs("div", {
13305
13424
  className: ItemBrowser_module_default.dialogButtons,
13306
- children: [t30, /* @__PURE__ */ jsx("button", {
13425
+ children: [t29, /* @__PURE__ */ jsx("button", {
13307
13426
  type: "button",
13308
13427
  className: ItemBrowser_module_default.action,
13309
13428
  onClick: () => {
@@ -13320,45 +13439,45 @@ function HullsAndFits(t0) {
13320
13439
  $[91] = deleting;
13321
13440
  $[92] = personal;
13322
13441
  $[93] = remove;
13323
- $[94] = t31;
13324
- } else t31 = $[94];
13325
- let t32;
13326
- if ($[95] !== t29 || $[96] !== t31) {
13327
- t32 = /* @__PURE__ */ jsxs("div", {
13442
+ $[94] = t30;
13443
+ } else t30 = $[94];
13444
+ let t31;
13445
+ if ($[95] !== t28 || $[96] !== t30) {
13446
+ t31 = /* @__PURE__ */ jsxs("div", {
13328
13447
  className: ItemBrowser_module_default.confirm,
13329
- children: [t29, t31]
13448
+ children: [t28, t30]
13330
13449
  });
13331
- $[95] = t29;
13332
- $[96] = t31;
13333
- $[97] = t32;
13334
- } else t32 = $[97];
13335
- let t33;
13336
- if ($[98] !== t25 || $[99] !== t32) {
13337
- t33 = /* @__PURE__ */ jsx(Dialog, {
13338
- open: t25,
13450
+ $[95] = t28;
13451
+ $[96] = t30;
13452
+ $[97] = t31;
13453
+ } else t31 = $[97];
13454
+ let t32;
13455
+ if ($[98] !== t24 || $[99] !== t31) {
13456
+ t32 = /* @__PURE__ */ jsx(Dialog, {
13457
+ open: t24,
13339
13458
  title: "Delete Fitting?",
13340
- onClose: t26,
13341
- children: t32
13459
+ onClose: t25,
13460
+ children: t31
13342
13461
  });
13343
- $[98] = t25;
13344
- $[99] = t32;
13345
- $[100] = t33;
13346
- } else t33 = $[100];
13347
- let t34;
13462
+ $[98] = t24;
13463
+ $[99] = t31;
13464
+ $[100] = t32;
13465
+ } else t32 = $[100];
13466
+ let t33;
13348
13467
  if ($[101] === Symbol.for("react.memo_cache_sentinel")) {
13349
- t34 = () => setDeleteFailed(false);
13350
- $[101] = t34;
13351
- } else t34 = $[101];
13352
- let t35;
13468
+ t33 = () => setDeleteFailed(false);
13469
+ $[101] = t33;
13470
+ } else t33 = $[101];
13471
+ let t34;
13353
13472
  if ($[102] === Symbol.for("react.memo_cache_sentinel")) {
13354
- t35 = /* @__PURE__ */ jsx("p", { children: "EVE did not delete this fit. Please try again." });
13355
- $[102] = t35;
13356
- } else t35 = $[102];
13357
- let t36;
13473
+ t34 = /* @__PURE__ */ jsx("p", { children: "EVE did not delete this fit. Please try again." });
13474
+ $[102] = t34;
13475
+ } else t34 = $[102];
13476
+ let t35;
13358
13477
  if ($[103] === Symbol.for("react.memo_cache_sentinel")) {
13359
- t36 = /* @__PURE__ */ jsxs("div", {
13478
+ t35 = /* @__PURE__ */ jsxs("div", {
13360
13479
  className: ItemBrowser_module_default.confirm,
13361
- children: [t35, /* @__PURE__ */ jsx("div", {
13480
+ children: [t34, /* @__PURE__ */ jsx("div", {
13362
13481
  className: ItemBrowser_module_default.dialogButtons,
13363
13482
  children: /* @__PURE__ */ jsx("button", {
13364
13483
  type: "button",
@@ -13368,42 +13487,42 @@ function HullsAndFits(t0) {
13368
13487
  })
13369
13488
  })]
13370
13489
  });
13371
- $[103] = t36;
13372
- } else t36 = $[103];
13373
- let t37;
13490
+ $[103] = t35;
13491
+ } else t35 = $[103];
13492
+ let t36;
13374
13493
  if ($[104] !== deleteFailed) {
13375
- t37 = /* @__PURE__ */ jsx(Dialog, {
13494
+ t36 = /* @__PURE__ */ jsx(Dialog, {
13376
13495
  open: deleteFailed,
13377
13496
  title: "Delete Fitting",
13378
- onClose: t34,
13379
- children: t36
13497
+ onClose: t33,
13498
+ children: t35
13380
13499
  });
13381
13500
  $[104] = deleteFailed;
13382
- $[105] = t37;
13383
- } else t37 = $[105];
13384
- let t38;
13385
- if ($[106] !== copyDialog || $[107] !== menu || $[108] !== saveDialog || $[109] !== t13 || $[110] !== t21 || $[111] !== t24 || $[112] !== t33 || $[113] !== t37) {
13386
- t38 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
13387
- t13,
13388
- t21,
13389
- t24,
13501
+ $[105] = t36;
13502
+ } else t36 = $[105];
13503
+ let t37;
13504
+ if ($[106] !== copyDialog || $[107] !== menu || $[108] !== saveDialog || $[109] !== t12 || $[110] !== t20 || $[111] !== t23 || $[112] !== t32 || $[113] !== t36) {
13505
+ t37 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
13506
+ t12,
13507
+ t20,
13508
+ t23,
13390
13509
  menu,
13391
13510
  copyDialog,
13392
13511
  saveDialog,
13393
- t33,
13394
- t37
13512
+ t32,
13513
+ t36
13395
13514
  ] });
13396
13515
  $[106] = copyDialog;
13397
13516
  $[107] = menu;
13398
13517
  $[108] = saveDialog;
13399
- $[109] = t13;
13400
- $[110] = t21;
13401
- $[111] = t24;
13402
- $[112] = t33;
13403
- $[113] = t37;
13404
- $[114] = t38;
13405
- } else t38 = $[114];
13406
- return t38;
13518
+ $[109] = t12;
13519
+ $[110] = t20;
13520
+ $[111] = t23;
13521
+ $[112] = t32;
13522
+ $[113] = t36;
13523
+ $[114] = t37;
13524
+ } else t37 = $[114];
13525
+ return t37;
13407
13526
  }
13408
13527
  function _temp6(fit_3) {
13409
13528
  return fit_3.ship.type_id;
@@ -13600,10 +13719,9 @@ const kindLabels = {
13600
13719
  booster: "Booster"
13601
13720
  };
13602
13721
  /** The Implants tab of the `ItemBrowser`: implants and boosters by market group or by slot. */
13603
- function Implants(t0) {
13722
+ function Implants() {
13604
13723
  const $ = c(61);
13605
- const { noHullSelected } = t0;
13606
- const { actions, clear, overlays } = useTypeActions(noHullSelected);
13724
+ const { actions, clear, overlays } = useTypeActions();
13607
13725
  const placement = usePlacement();
13608
13726
  const missingSkills = useMissingSkills();
13609
13727
  const [search, setSearch] = useState("");
@@ -13627,22 +13745,22 @@ function Implants(t0) {
13627
13745
  setCollapses(collapses + 1);
13628
13746
  }
13629
13747
  }
13630
- let t1;
13748
+ let t0;
13631
13749
  if ($[0] !== search) {
13632
- t1 = search.trim().toLowerCase();
13750
+ t0 = search.trim().toLowerCase();
13633
13751
  $[0] = search;
13634
- $[1] = t1;
13635
- } else t1 = $[1];
13636
- const query = t1;
13637
- let t2;
13752
+ $[1] = t0;
13753
+ } else t0 = $[1];
13754
+ const query = t0;
13755
+ let t1;
13638
13756
  bb0: {
13639
13757
  if (query === "" && kinds.size === 0 && !flyable) {
13640
- t2 = void 0;
13758
+ t1 = void 0;
13641
13759
  break bb0;
13642
13760
  }
13643
- let t3;
13761
+ let t2;
13644
13762
  if ($[2] !== flyable || $[3] !== kinds || $[4] !== missingSkills || $[5] !== placement || $[6] !== query) {
13645
- t3 = (type) => {
13763
+ t2 = (type) => {
13646
13764
  if (kinds.size > 0) {
13647
13765
  const place = placement(type)?.type;
13648
13766
  if (place !== "implant" && place !== "booster") return false;
@@ -13656,75 +13774,75 @@ function Implants(t0) {
13656
13774
  $[4] = missingSkills;
13657
13775
  $[5] = placement;
13658
13776
  $[6] = query;
13659
- $[7] = t3;
13660
- } else t3 = $[7];
13661
- t2 = t3;
13777
+ $[7] = t2;
13778
+ } else t2 = $[7];
13779
+ t1 = t2;
13662
13780
  }
13663
- const keep = t2;
13781
+ const keep = t1;
13664
13782
  const tree = useImplantTree(view === "slot" || query === "" ? keep : void 0);
13665
13783
  const found = useImplantSearch(view === "market" && query !== "" ? keep : void 0);
13666
- let t3;
13784
+ let t2;
13667
13785
  if ($[8] !== placement || $[9] !== tree || $[10] !== view) {
13668
- t3 = view === "slot" ? slotGroups(tree, placement) : [];
13786
+ t2 = view === "slot" ? slotGroups(tree, placement) : [];
13669
13787
  $[8] = placement;
13670
13788
  $[9] = tree;
13671
13789
  $[10] = view;
13672
- $[11] = t3;
13673
- } else t3 = $[11];
13674
- const slots = t3;
13790
+ $[11] = t2;
13791
+ } else t2 = $[11];
13792
+ const slots = t2;
13675
13793
  const empty = view === "slot" ? slots.length === 0 : query === "" ? tree.length === 0 : found.length === 0;
13676
13794
  const treeRef = useRef(null);
13677
13795
  const scrolledTo = useRef(opened);
13796
+ let t3;
13678
13797
  let t4;
13679
- let t5;
13680
13798
  if ($[12] !== opened) {
13681
- t4 = () => {
13799
+ t3 = () => {
13682
13800
  if (scrolledTo.current === opened) return;
13683
13801
  scrolledTo.current = opened;
13684
13802
  treeRef.current?.querySelector("[aria-expanded=true]")?.scrollIntoView({ block: "start" });
13685
13803
  };
13686
- t5 = [opened];
13804
+ t4 = [opened];
13687
13805
  $[12] = opened;
13688
- $[13] = t4;
13689
- $[14] = t5;
13806
+ $[13] = t3;
13807
+ $[14] = t4;
13690
13808
  } else {
13691
- t4 = $[13];
13692
- t5 = $[14];
13809
+ t3 = $[13];
13810
+ t4 = $[14];
13693
13811
  }
13694
- useEffect(t4, t5);
13695
- let t6;
13812
+ useEffect(t3, t4);
13813
+ let t5;
13696
13814
  if ($[15] !== kinds) {
13697
- t6 = (kind, pressed) => {
13815
+ t5 = (kind, pressed) => {
13698
13816
  const next = new Set(kinds);
13699
13817
  if (pressed) next.add(kind);
13700
13818
  else next.delete(kind);
13701
13819
  setKinds(next);
13702
13820
  };
13703
13821
  $[15] = kinds;
13704
- $[16] = t6;
13705
- } else t6 = $[16];
13706
- const toggleKind = t6;
13707
- let t7;
13822
+ $[16] = t5;
13823
+ } else t5 = $[16];
13824
+ const toggleKind = t5;
13825
+ let t6;
13708
13826
  if ($[17] !== clear) {
13709
- t7 = (value) => {
13827
+ t6 = (value) => {
13710
13828
  clear();
13711
13829
  setSearch(value);
13712
13830
  };
13713
13831
  $[17] = clear;
13714
- $[18] = t7;
13715
- } else t7 = $[18];
13716
- let t8;
13832
+ $[18] = t6;
13833
+ } else t6 = $[18];
13834
+ let t7;
13717
13835
  if ($[19] !== collapses) {
13718
- t8 = () => {
13836
+ t7 = () => {
13719
13837
  setOpened(void 0);
13720
13838
  setCollapses(collapses + 1);
13721
13839
  };
13722
13840
  $[19] = collapses;
13723
- $[20] = t8;
13724
- } else t8 = $[20];
13725
- let t9;
13841
+ $[20] = t7;
13842
+ } else t7 = $[20];
13843
+ let t8;
13726
13844
  if ($[21] !== view) {
13727
- t9 = views.map((each) => /* @__PURE__ */ jsx(Tooltip, {
13845
+ t8 = views.map((each) => /* @__PURE__ */ jsx(Tooltip, {
13728
13846
  label: each.label,
13729
13847
  children: /* @__PURE__ */ jsx("button", {
13730
13848
  type: "button",
@@ -13739,96 +13857,96 @@ function Implants(t0) {
13739
13857
  })
13740
13858
  }, each.view));
13741
13859
  $[21] = view;
13742
- $[22] = t9;
13743
- } else t9 = $[22];
13744
- let t10;
13745
- if ($[23] !== t9) {
13746
- t10 = /* @__PURE__ */ jsx("fieldset", {
13860
+ $[22] = t8;
13861
+ } else t8 = $[22];
13862
+ let t9;
13863
+ if ($[23] !== t8) {
13864
+ t9 = /* @__PURE__ */ jsx("fieldset", {
13747
13865
  className: ItemBrowser_module_default.views,
13748
13866
  "aria-label": "View",
13749
- children: t9
13867
+ children: t8
13750
13868
  });
13751
- $[23] = t9;
13752
- $[24] = t10;
13753
- } else t10 = $[24];
13754
- let t11;
13755
- if ($[25] !== search || $[26] !== t10 || $[27] !== t7 || $[28] !== t8) {
13756
- t11 = /* @__PURE__ */ jsx(Search, {
13869
+ $[23] = t8;
13870
+ $[24] = t9;
13871
+ } else t9 = $[24];
13872
+ let t10;
13873
+ if ($[25] !== search || $[26] !== t6 || $[27] !== t7 || $[28] !== t9) {
13874
+ t10 = /* @__PURE__ */ jsx(Search, {
13757
13875
  value: search,
13758
- onChange: t7,
13759
- onCollapse: t8,
13760
- after: t10
13876
+ onChange: t6,
13877
+ onCollapse: t7,
13878
+ after: t9
13761
13879
  });
13762
13880
  $[25] = search;
13763
- $[26] = t10;
13881
+ $[26] = t6;
13764
13882
  $[27] = t7;
13765
- $[28] = t8;
13766
- $[29] = t11;
13767
- } else t11 = $[29];
13768
- let t12;
13883
+ $[28] = t9;
13884
+ $[29] = t10;
13885
+ } else t10 = $[29];
13886
+ let t11;
13769
13887
  if ($[30] !== kinds) {
13770
- t12 = kinds.has("implant");
13888
+ t11 = kinds.has("implant");
13771
13889
  $[30] = kinds;
13772
- $[31] = t12;
13773
- } else t12 = $[31];
13774
- let t13;
13775
- if ($[32] !== t12 || $[33] !== toggleKind) {
13776
- t13 = /* @__PURE__ */ jsx(KindToggle, {
13890
+ $[31] = t11;
13891
+ } else t11 = $[31];
13892
+ let t12;
13893
+ if ($[32] !== t11 || $[33] !== toggleKind) {
13894
+ t12 = /* @__PURE__ */ jsx(KindToggle, {
13777
13895
  kind: "implant",
13778
- pressed: t12,
13896
+ pressed: t11,
13779
13897
  onPressedChange: toggleKind
13780
13898
  });
13781
- $[32] = t12;
13899
+ $[32] = t11;
13782
13900
  $[33] = toggleKind;
13783
- $[34] = t13;
13784
- } else t13 = $[34];
13785
- let t14;
13901
+ $[34] = t12;
13902
+ } else t12 = $[34];
13903
+ let t13;
13786
13904
  if ($[35] !== kinds) {
13787
- t14 = kinds.has("booster");
13905
+ t13 = kinds.has("booster");
13788
13906
  $[35] = kinds;
13789
- $[36] = t14;
13790
- } else t14 = $[36];
13791
- let t15;
13792
- if ($[37] !== t14 || $[38] !== toggleKind) {
13793
- t15 = /* @__PURE__ */ jsx(KindToggle, {
13907
+ $[36] = t13;
13908
+ } else t13 = $[36];
13909
+ let t14;
13910
+ if ($[37] !== t13 || $[38] !== toggleKind) {
13911
+ t14 = /* @__PURE__ */ jsx(KindToggle, {
13794
13912
  kind: "booster",
13795
- pressed: t14,
13913
+ pressed: t13,
13796
13914
  onPressedChange: toggleKind
13797
13915
  });
13798
- $[37] = t14;
13916
+ $[37] = t13;
13799
13917
  $[38] = toggleKind;
13800
- $[39] = t15;
13801
- } else t15 = $[39];
13802
- let t16;
13918
+ $[39] = t14;
13919
+ } else t14 = $[39];
13920
+ let t15;
13803
13921
  if ($[40] !== flyable) {
13804
- t16 = /* @__PURE__ */ jsx(FilterToggle, {
13922
+ t15 = /* @__PURE__ */ jsx(FilterToggle, {
13805
13923
  icon: "skills",
13806
13924
  label: "Skills",
13807
13925
  pressed: flyable,
13808
13926
  onPressedChange: setFlyable
13809
13927
  });
13810
13928
  $[40] = flyable;
13811
- $[41] = t16;
13812
- } else t16 = $[41];
13813
- let t17;
13814
- if ($[42] !== t13 || $[43] !== t15 || $[44] !== t16) {
13815
- t17 = /* @__PURE__ */ jsxs("fieldset", {
13929
+ $[41] = t15;
13930
+ } else t15 = $[41];
13931
+ let t16;
13932
+ if ($[42] !== t12 || $[43] !== t14 || $[44] !== t15) {
13933
+ t16 = /* @__PURE__ */ jsxs("fieldset", {
13816
13934
  className: ItemBrowser_module_default.filters,
13817
13935
  "aria-label": "Filters",
13818
13936
  children: [
13819
- t13,
13820
- t15,
13821
- t16
13937
+ t12,
13938
+ t14,
13939
+ t15
13822
13940
  ]
13823
13941
  });
13824
- $[42] = t13;
13825
- $[43] = t15;
13826
- $[44] = t16;
13827
- $[45] = t17;
13828
- } else t17 = $[45];
13829
- let t18;
13942
+ $[42] = t12;
13943
+ $[43] = t14;
13944
+ $[44] = t15;
13945
+ $[45] = t16;
13946
+ } else t16 = $[45];
13947
+ let t17;
13830
13948
  if ($[46] !== actions || $[47] !== collapses || $[48] !== empty || $[49] !== found || $[50] !== opened || $[51] !== query || $[52] !== slots || $[53] !== tree || $[54] !== view) {
13831
- t18 = /* @__PURE__ */ jsx("div", {
13949
+ t17 = /* @__PURE__ */ jsx("div", {
13832
13950
  ref: treeRef,
13833
13951
  className: ItemBrowser_module_default.tree,
13834
13952
  children: empty ? /* @__PURE__ */ jsx("p", {
@@ -13859,23 +13977,23 @@ function Implants(t0) {
13859
13977
  $[52] = slots;
13860
13978
  $[53] = tree;
13861
13979
  $[54] = view;
13862
- $[55] = t18;
13863
- } else t18 = $[55];
13864
- let t19;
13865
- if ($[56] !== overlays || $[57] !== t11 || $[58] !== t17 || $[59] !== t18) {
13866
- t19 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
13867
- t11,
13980
+ $[55] = t17;
13981
+ } else t17 = $[55];
13982
+ let t18;
13983
+ if ($[56] !== overlays || $[57] !== t10 || $[58] !== t16 || $[59] !== t17) {
13984
+ t18 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
13985
+ t10,
13986
+ t16,
13868
13987
  t17,
13869
- t18,
13870
13988
  overlays
13871
13989
  ] });
13872
13990
  $[56] = overlays;
13873
- $[57] = t11;
13874
- $[58] = t17;
13875
- $[59] = t18;
13876
- $[60] = t19;
13877
- } else t19 = $[60];
13878
- return t19;
13991
+ $[57] = t10;
13992
+ $[58] = t16;
13993
+ $[59] = t17;
13994
+ $[60] = t18;
13995
+ } else t18 = $[60];
13996
+ return t18;
13879
13997
  }
13880
13998
  function _temp$3() {
13881
13999
  return /* @__PURE__ */ new Set();
@@ -14010,24 +14128,25 @@ const slotFilters = [
14010
14128
  }
14011
14129
  ];
14012
14130
  /** The Modules tab of the `ItemBrowser`: what goes on a ship, by market group. */
14013
- function Modules(t0) {
14131
+ function Modules() {
14014
14132
  const $ = c(52);
14015
- const { noHullSelected } = t0;
14016
- const { actions, clear, overlays } = useTypeActions(noHullSelected);
14133
+ const { actions, clear, overlays } = useTypeActions();
14017
14134
  const placement = usePlacement();
14018
14135
  const canFit = useCanFit();
14019
14136
  const missingSkills = useMissingSkills();
14020
- const services = useSnapshot().stats.slots.service.total > 0;
14021
- let t1;
14137
+ const snapshot = useSnapshotIfAny();
14138
+ const noHullSelected = snapshot === void 0;
14139
+ const services = (snapshot?.stats.slots.service.total ?? 0) > 0;
14140
+ let t0;
14022
14141
  if ($[0] !== services) {
14023
- t1 = (t2) => {
14024
- const { filter } = t2;
14142
+ t0 = (t1) => {
14143
+ const { filter } = t1;
14025
14144
  return services || filter !== "service";
14026
14145
  };
14027
14146
  $[0] = services;
14028
- $[1] = t1;
14029
- } else t1 = $[1];
14030
- const shownFilters = slotFilters.filter(t1);
14147
+ $[1] = t0;
14148
+ } else t0 = $[1];
14149
+ const shownFilters = slotFilters.filter(t0);
14031
14150
  const [search, setSearch] = useState("");
14032
14151
  const [slots, setSlots] = useState(_temp$2);
14033
14152
  const [hullRestrictions, setHullRestrictions] = useState(false);
@@ -14038,8 +14157,8 @@ function Modules(t0) {
14038
14157
  if (request !== browsed) {
14039
14158
  setBrowsed(request);
14040
14159
  const target = request?.target;
14041
- const filter_0 = typeof target === "string" ? slotFilters.find((t2) => {
14042
- const { places } = t2;
14160
+ const filter_0 = typeof target === "string" ? slotFilters.find((t1) => {
14161
+ const { places } = t1;
14043
14162
  return places.includes(target);
14044
14163
  })?.filter : void 0;
14045
14164
  if (filter_0 !== void 0) {
@@ -14047,33 +14166,33 @@ function Modules(t0) {
14047
14166
  setHullRestrictions(true);
14048
14167
  }
14049
14168
  }
14050
- let t2;
14169
+ let t1;
14051
14170
  if ($[2] !== search) {
14052
- t2 = search.trim().toLowerCase();
14171
+ t1 = search.trim().toLowerCase();
14053
14172
  $[2] = search;
14054
- $[3] = t2;
14055
- } else t2 = $[3];
14056
- const query = t2;
14057
- let t3;
14173
+ $[3] = t1;
14174
+ } else t1 = $[3];
14175
+ const query = t1;
14176
+ let t2;
14058
14177
  bb0: {
14059
- let t4;
14178
+ let t3;
14060
14179
  if ($[4] !== services || $[5] !== slots) {
14061
- t4 = new Set(slotFilters.filter((t5) => {
14062
- const { filter: filter_1 } = t5;
14180
+ t3 = new Set(slotFilters.filter((t4) => {
14181
+ const { filter: filter_1 } = t4;
14063
14182
  return slots.has(filter_1) && (services || filter_1 !== "service");
14064
14183
  }).flatMap(_temp2$1));
14065
14184
  $[4] = services;
14066
14185
  $[5] = slots;
14067
- $[6] = t4;
14068
- } else t4 = $[6];
14069
- const places_0 = t4;
14186
+ $[6] = t3;
14187
+ } else t3 = $[6];
14188
+ const places_0 = t3;
14070
14189
  if (query === "" && places_0.size === 0 && !hullRestrictions && !flyable) {
14071
- t3 = void 0;
14190
+ t2 = void 0;
14072
14191
  break bb0;
14073
14192
  }
14074
- let t5;
14193
+ let t4;
14075
14194
  if ($[7] !== canFit || $[8] !== flyable || $[9] !== hullRestrictions || $[10] !== missingSkills || $[11] !== noHullSelected || $[12] !== placement || $[13] !== places_0 || $[14] !== query) {
14076
- t5 = (type) => {
14195
+ t4 = (type) => {
14077
14196
  if (places_0.size > 0) {
14078
14197
  const place = placement(type)?.type;
14079
14198
  if (place === void 0 || !places_0.has(place)) return false;
@@ -14090,59 +14209,59 @@ function Modules(t0) {
14090
14209
  $[12] = placement;
14091
14210
  $[13] = places_0;
14092
14211
  $[14] = query;
14093
- $[15] = t5;
14094
- } else t5 = $[15];
14095
- t3 = t5;
14212
+ $[15] = t4;
14213
+ } else t4 = $[15];
14214
+ t2 = t4;
14096
14215
  }
14097
- const keep = t3;
14216
+ const keep = t2;
14098
14217
  const tree = useModuleTree(query === "" ? keep : void 0);
14099
14218
  const found = useModuleSearch(query === "" ? void 0 : keep);
14100
14219
  const groups = query === "" ? tree : found;
14101
- let t4;
14220
+ let t3;
14102
14221
  if ($[16] !== slots) {
14103
- t4 = (filter_2, pressed) => {
14222
+ t3 = (filter_2, pressed) => {
14104
14223
  const next = new Set(slots);
14105
14224
  if (pressed) next.add(filter_2);
14106
14225
  else next.delete(filter_2);
14107
14226
  setSlots(next);
14108
14227
  };
14109
14228
  $[16] = slots;
14110
- $[17] = t4;
14111
- } else t4 = $[17];
14112
- const toggleSlot = t4;
14113
- let t5;
14229
+ $[17] = t3;
14230
+ } else t3 = $[17];
14231
+ const toggleSlot = t3;
14232
+ let t4;
14114
14233
  if ($[18] !== clear) {
14115
- t5 = (value) => {
14234
+ t4 = (value) => {
14116
14235
  clear();
14117
14236
  setSearch(value);
14118
14237
  };
14119
14238
  $[18] = clear;
14120
- $[19] = t5;
14121
- } else t5 = $[19];
14122
- let t6;
14239
+ $[19] = t4;
14240
+ } else t4 = $[19];
14241
+ let t5;
14123
14242
  if ($[20] !== collapses) {
14124
- t6 = () => setCollapses(collapses + 1);
14243
+ t5 = () => setCollapses(collapses + 1);
14125
14244
  $[20] = collapses;
14126
- $[21] = t6;
14127
- } else t6 = $[21];
14128
- let t7;
14129
- if ($[22] !== search || $[23] !== t5 || $[24] !== t6) {
14130
- t7 = /* @__PURE__ */ jsx(Search, {
14245
+ $[21] = t5;
14246
+ } else t5 = $[21];
14247
+ let t6;
14248
+ if ($[22] !== search || $[23] !== t4 || $[24] !== t5) {
14249
+ t6 = /* @__PURE__ */ jsx(Search, {
14131
14250
  value: search,
14132
- onChange: t5,
14133
- onCollapse: t6
14251
+ onChange: t4,
14252
+ onCollapse: t5
14134
14253
  });
14135
14254
  $[22] = search;
14136
- $[23] = t5;
14137
- $[24] = t6;
14138
- $[25] = t7;
14139
- } else t7 = $[25];
14140
- const t8 = ItemBrowser_module_default;
14141
- const t9 = "Filters";
14142
- let t10;
14255
+ $[23] = t4;
14256
+ $[24] = t5;
14257
+ $[25] = t6;
14258
+ } else t6 = $[25];
14259
+ const t7 = ItemBrowser_module_default;
14260
+ const t8 = "Filters";
14261
+ let t9;
14143
14262
  if ($[26] !== slots || $[27] !== toggleSlot) {
14144
- t10 = (t11) => {
14145
- const { filter: filter_3, icon, label } = t11;
14263
+ t9 = (t10) => {
14264
+ const { filter: filter_3, icon, label } = t10;
14146
14265
  return /* @__PURE__ */ jsx(FilterToggle, {
14147
14266
  icon,
14148
14267
  label,
@@ -14152,12 +14271,12 @@ function Modules(t0) {
14152
14271
  };
14153
14272
  $[26] = slots;
14154
14273
  $[27] = toggleSlot;
14155
- $[28] = t10;
14156
- } else t10 = $[28];
14157
- const t11 = shownFilters.map(t10);
14158
- let t12;
14274
+ $[28] = t9;
14275
+ } else t9 = $[28];
14276
+ const t10 = shownFilters.map(t9);
14277
+ let t11;
14159
14278
  if ($[29] !== hullRestrictions || $[30] !== noHullSelected || $[31] !== setHullRestrictions) {
14160
- t12 = /* @__PURE__ */ jsx(FilterToggle, {
14279
+ t11 = /* @__PURE__ */ jsx(FilterToggle, {
14161
14280
  icon: "filter-hull-restrictions",
14162
14281
  label: "Hull Restrictions",
14163
14282
  pressed: hullRestrictions,
@@ -14167,19 +14286,19 @@ function Modules(t0) {
14167
14286
  $[29] = hullRestrictions;
14168
14287
  $[30] = noHullSelected;
14169
14288
  $[31] = setHullRestrictions;
14170
- $[32] = t12;
14171
- } else t12 = $[32];
14172
- let t13;
14289
+ $[32] = t11;
14290
+ } else t11 = $[32];
14291
+ let t12;
14173
14292
  if ($[33] === Symbol.for("react.memo_cache_sentinel")) {
14174
- t13 = /* @__PURE__ */ jsx(FilterToggle, {
14293
+ t12 = /* @__PURE__ */ jsx(FilterToggle, {
14175
14294
  icon: "filter-resources",
14176
14295
  label: "Resources"
14177
14296
  });
14178
- $[33] = t13;
14179
- } else t13 = $[33];
14180
- let t14;
14297
+ $[33] = t12;
14298
+ } else t12 = $[33];
14299
+ let t13;
14181
14300
  if ($[34] !== flyable || $[35] !== setFlyable) {
14182
- t14 = /* @__PURE__ */ jsx(FilterToggle, {
14301
+ t13 = /* @__PURE__ */ jsx(FilterToggle, {
14183
14302
  icon: "skills",
14184
14303
  label: "Skills",
14185
14304
  pressed: flyable,
@@ -14187,29 +14306,29 @@ function Modules(t0) {
14187
14306
  });
14188
14307
  $[34] = flyable;
14189
14308
  $[35] = setFlyable;
14190
- $[36] = t14;
14191
- } else t14 = $[36];
14192
- let t15;
14193
- if ($[37] !== t11 || $[38] !== t12 || $[39] !== t14 || $[40] !== t8.filters) {
14194
- t15 = /* @__PURE__ */ jsxs("fieldset", {
14195
- className: t8.filters,
14196
- "aria-label": t9,
14309
+ $[36] = t13;
14310
+ } else t13 = $[36];
14311
+ let t14;
14312
+ if ($[37] !== t10 || $[38] !== t11 || $[39] !== t13 || $[40] !== t7.filters) {
14313
+ t14 = /* @__PURE__ */ jsxs("fieldset", {
14314
+ className: t7.filters,
14315
+ "aria-label": t8,
14197
14316
  children: [
14317
+ t10,
14198
14318
  t11,
14199
14319
  t12,
14200
- t13,
14201
- t14
14320
+ t13
14202
14321
  ]
14203
14322
  });
14204
- $[37] = t11;
14205
- $[38] = t12;
14206
- $[39] = t14;
14207
- $[40] = t8.filters;
14208
- $[41] = t15;
14209
- } else t15 = $[41];
14210
- let t16;
14323
+ $[37] = t10;
14324
+ $[38] = t11;
14325
+ $[39] = t13;
14326
+ $[40] = t7.filters;
14327
+ $[41] = t14;
14328
+ } else t14 = $[41];
14329
+ let t15;
14211
14330
  if ($[42] !== actions || $[43] !== collapses || $[44] !== groups || $[45] !== query) {
14212
- t16 = /* @__PURE__ */ jsx("div", {
14331
+ t15 = /* @__PURE__ */ jsx("div", {
14213
14332
  className: ItemBrowser_module_default.tree,
14214
14333
  children: groups.length === 0 ? /* @__PURE__ */ jsx("p", {
14215
14334
  className: ItemBrowser_module_default.empty,
@@ -14229,23 +14348,23 @@ function Modules(t0) {
14229
14348
  $[43] = collapses;
14230
14349
  $[44] = groups;
14231
14350
  $[45] = query;
14232
- $[46] = t16;
14233
- } else t16 = $[46];
14234
- let t17;
14235
- if ($[47] !== overlays || $[48] !== t15 || $[49] !== t16 || $[50] !== t7) {
14236
- t17 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
14237
- t7,
14351
+ $[46] = t15;
14352
+ } else t15 = $[46];
14353
+ let t16;
14354
+ if ($[47] !== overlays || $[48] !== t14 || $[49] !== t15 || $[50] !== t6) {
14355
+ t16 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
14356
+ t6,
14357
+ t14,
14238
14358
  t15,
14239
- t16,
14240
14359
  overlays
14241
14360
  ] });
14242
14361
  $[47] = overlays;
14243
- $[48] = t15;
14244
- $[49] = t16;
14245
- $[50] = t7;
14246
- $[51] = t17;
14247
- } else t17 = $[51];
14248
- return t17;
14362
+ $[48] = t14;
14363
+ $[49] = t15;
14364
+ $[50] = t6;
14365
+ $[51] = t16;
14366
+ } else t16 = $[51];
14367
+ return t16;
14249
14368
  }
14250
14369
  function _temp2$1(slot) {
14251
14370
  return slot.places;
@@ -14255,7 +14374,7 @@ function _temp$2() {
14255
14374
  }
14256
14375
  // src/components/ItemBrowser/ItemBrowser.tsx
14257
14376
  /** EVE's browser of hulls and fits, modules, charges, and implants, left of the fitting wheel. */
14258
- function ItemBrowser({ label = "Item Browser", noHullSelected = false, pasteToOpen = false }) {
14377
+ function ItemBrowser({ label = "Item Browser", pasteToOpen = false }) {
14259
14378
  const [tab, setTab] = useState("hulls");
14260
14379
  const { request } = useBrowse();
14261
14380
  const [browsed, setBrowsed] = useState(request);
@@ -14269,22 +14388,22 @@ function ItemBrowser({ label = "Item Browser", noHullSelected = false, pasteToOp
14269
14388
  {
14270
14389
  tab: "hulls",
14271
14390
  label: "Hulls & Fits",
14272
- panel: /* @__PURE__ */ jsx(HullsAndFits, { noHullSelected })
14391
+ panel: /* @__PURE__ */ jsx(HullsAndFits, {})
14273
14392
  },
14274
14393
  {
14275
14394
  tab: "modules",
14276
14395
  label: "Modules",
14277
- panel: /* @__PURE__ */ jsx(Modules, { noHullSelected })
14396
+ panel: /* @__PURE__ */ jsx(Modules, {})
14278
14397
  },
14279
14398
  {
14280
14399
  tab: "charges",
14281
14400
  label: "Charges",
14282
- panel: /* @__PURE__ */ jsx(Charges, { noHullSelected })
14401
+ panel: /* @__PURE__ */ jsx(Charges, {})
14283
14402
  },
14284
14403
  {
14285
14404
  tab: "implants",
14286
14405
  label: "Implants",
14287
- panel: /* @__PURE__ */ jsx(Implants, { noHullSelected })
14406
+ panel: /* @__PURE__ */ jsx(Implants, {})
14288
14407
  }
14289
14408
  ];
14290
14409
  return /* @__PURE__ */ jsxs("section", {
@@ -14333,10 +14452,7 @@ function ItemBrowser({ label = "Item Browser", noHullSelected = false, pasteToOp
14333
14452
  children: "Loading…"
14334
14453
  })
14335
14454
  }, each_0.tab)),
14336
- /* @__PURE__ */ jsx(FitActions, {
14337
- noHullSelected,
14338
- pasteToOpen
14339
- })
14455
+ /* @__PURE__ */ jsx(FitActions, { pasteToOpen })
14340
14456
  ]
14341
14457
  });
14342
14458
  }
@@ -16288,4 +16404,4 @@ function ShipStatistics({ label = "Statistics" }) {
16288
16404
  })]
16289
16405
  });
16290
16406
  }
16291
- export { CapacitorRing, CapacitorStats, DefenseStats, Dialog, DroneStats, FilterToggle, FitPrice, FittingWheel, FittingWindow, HistoryBar, Icon, ItemBrowser, NavigationStats, OffenseStats, RepairRate, ResistanceBar, Resistances, ShipStatistics, Stat, StatsSection, TargetingStats, Tooltip, TooltipText, TreeGroup, TreeLeaf, TreeList, TypeIcon, Wheel, WheelGauge, WheelHardpoints, WheelHull, WheelLink, WheelRackMarker, WheelSlot, iconNames, rackSize, slotAngle };
16407
+ export { CapacitorRing, CapacitorStats, DefenseStats, Dialog, DroneStats, FilterToggle, FitPrice, FittingWheel, FittingWindow, FittingWindowLoading, HistoryBar, Icon, ItemBrowser, NavigationStats, OffenseStats, RepairRate, ResistanceBar, Resistances, ShipStatistics, Stat, StatsSection, TargetingStats, Tooltip, TooltipText, TreeGroup, TreeLeaf, TreeList, TypeIcon, Wheel, WheelGauge, WheelHardpoints, WheelHull, WheelLink, WheelRackMarker, WheelSlot, iconNames, rackSize, slotAngle };