(cs.loadedExisting = null)}
onchange={() => loadExisting(cs.name)}
aria-invalid={nameValidation.ok ? "false" : "true"}
data-testid="calculator-name"
/>
{#if cs.mode === "ship"}
{/if}
{#if cs.mode === "ship" && canDelete}
{/if}
{#if cs.mode === "ship"}
{i18n.t("game.calculator.load.label")}
{#each LOAD_MODES as m (m)}
{/each}
{#if cs.loadMode === "custom"}
{:else if cs.loadMode === "full"}
{fmt(result.cargoCapacity)}
{/if}
{i18n.t("game.calculator.col.empty")}
{i18n.t("game.calculator.col.loaded")}
{i18n.t("game.calculator.out.mass")}
{@render lockable("emptyMass", result.outputs?.emptyMass)}
{@render lockable("loadedMass", result.outputs?.loadedMass)}
{i18n.t("game.calculator.out.speed")}
{@render lockable("speedEmpty", result.outputs?.speedEmpty)}
{@render lockable("speedLoaded", result.outputs?.speedLoaded)}
{i18n.t("game.calculator.out.attack")}
{@render lockable("attack", result.outputs?.attack)}
{i18n.t("game.calculator.out.defense")}
{@render lockable("defense", result.outputs?.defense)}
{i18n.t("game.calculator.out.bombing")}
{fmt(result.outputs?.bombing)}
{i18n.t("game.calculator.out.cargo_capacity")}
{fmt(result.outputs === null ? null : result.cargoCapacity)}
{#if selectedPlanet === null}
{i18n.t("game.calculator.planet.none")}
{:else}
{i18n.t("game.calculator.planet.label", {
name: selectedPlanet.name,
number: String(selectedPlanet.number),
})}
{i18n.t("game.calculator.planet.mat")}
{#if cs.matOverridden}
{/if}
- {i18n.t("game.calculator.planet.ships_per_turn")}
-
{fmt(planetBuild?.shipsPerTurn)}
- {i18n.t("game.calculator.planet.turns_per_ship")}
-
{fmt(planetBuild?.turnsPerShip ?? null)}
{/if}
{:else}
{i18n.t("game.calculator.modern.target")}
{i18n.t("game.calculator.modern.cost")}
{#each modernCosts?.perBlock ?? [] as row (row.key)}
{i18n.t(`game.calculator.field.${row.key}` as TranslationKey)}
{fmt(row.cost)}
{/each}
{i18n.t("game.calculator.modern.total")}
{fmt(modernCosts?.total)}
{/if}