import {respond} from "@sveltejs/kit/ssr"; import {create_ssr_component, validate_component, missing_component, escape, each, add_attribute, subscribe} from "svelte/internal"; import {setContext, afterUpdate, onMount, createEventDispatcher, getContext} from "svelte"; import {readable} from "svelte/store"; import {applyMiddleware, compose} from "redux"; import flow from "lodash/fp/flow.js"; import sumBy from "lodash/fp/sumBy.js"; import pick from "lodash/fp/pick.js"; import filter from "lodash/fp/filter.js"; import flattenDeep from "lodash/fp/flattenDeep.js"; import has from "lodash/fp/has.js"; import Updux, {Updux as Updux$1} from "updux"; import {action, payload} from "ts-action"; import u from "@yanick/updeep"; import {createSelector} from "reselect"; import _$1 from "lodash"; import "svelte/transition"; import "lodash/get.js"; var root_svelte_svelte_type_style_lang = "#svelte-announcer.svelte-1j55zn5{position:absolute;left:0;top:0;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;white-space:nowrap;width:1px;height:1px}"; const css$w = { code: "#svelte-announcer.svelte-1j55zn5{position:absolute;left:0;top:0;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden;white-space:nowrap;width:1px;height:1px}", map: `{"version":3,"file":"root.svelte","sources":["root.svelte"],"sourcesContent":["\\n\\n\\n\\n\\t{#if components[1]}\\n\\t\\t\\n\\t\\t\\t{#if components[2]}\\n\\t\\t\\t\\t\\n\\t\\t\\t{/if}\\n\\t\\t\\n\\t{/if}\\n\\n\\n{#if mounted}\\n\\t
\\n\\t\\t{#if navigated}\\n\\t\\t\\t{title}\\n\\t\\t{/if}\\n\\t
\\n{/if}\\n\\n"],"names":[],"mappings":"AAsDC,iBAAiB,eAAC,CAAC,AAClB,QAAQ,CAAE,QAAQ,CAClB,IAAI,CAAE,CAAC,CACP,GAAG,CAAE,CAAC,CACN,IAAI,CAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACnB,SAAS,CAAE,MAAM,GAAG,CAAC,CACrB,QAAQ,CAAE,MAAM,CAChB,WAAW,CAAE,MAAM,CACnB,KAAK,CAAE,GAAG,CACV,MAAM,CAAE,GAAG,AACZ,CAAC"}` }; const Root = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {stores} = $$props; let {page} = $$props; let {components} = $$props; let {props_0 = null} = $$props; let {props_1 = null} = $$props; let {props_2 = null} = $$props; setContext("__svelte__", stores); afterUpdate(stores.page.notify); let mounted = false; let navigated = false; let title = null; onMount(() => { const unsubscribe = stores.page.subscribe(() => { if (mounted) { navigated = true; title = document.title || "untitled page"; } }); mounted = true; return unsubscribe; }); if ($$props.stores === void 0 && $$bindings.stores && stores !== void 0) $$bindings.stores(stores); if ($$props.page === void 0 && $$bindings.page && page !== void 0) $$bindings.page(page); if ($$props.components === void 0 && $$bindings.components && components !== void 0) $$bindings.components(components); if ($$props.props_0 === void 0 && $$bindings.props_0 && props_0 !== void 0) $$bindings.props_0(props_0); if ($$props.props_1 === void 0 && $$bindings.props_1 && props_1 !== void 0) $$bindings.props_1(props_1); if ($$props.props_2 === void 0 && $$bindings.props_2 && props_2 !== void 0) $$bindings.props_2(props_2); $$result.css.add(css$w); { stores.page.set(page); } return ` ${validate_component(components[0] || missing_component, "svelte:component").$$render($$result, Object.assign(props_0 || {}), {}, { default: () => `${components[1] ? `${validate_component(components[1] || missing_component, "svelte:component").$$render($$result, Object.assign(props_1 || {}), {}, { default: () => `${components[2] ? `${validate_component(components[2] || missing_component, "svelte:component").$$render($$result, Object.assign(props_2 || {}), {}, {})}` : ``}` })}` : ``}` })} ${mounted ? `
${navigated ? `${escape(title)}` : ``}
` : ``}`; }); function set_paths(paths) { } function set_prerendering(value) { } var user_hooks = /* @__PURE__ */ Object.freeze({ __proto__: null, [Symbol.toStringTag]: "Module" }); const template = ({head, body}) => '\n\n \n \n \n \n ' + head + '\n \n \n
' + body + "
\n \n\n"; let options = null; function init(settings) { set_paths(settings.paths); set_prerendering(settings.prerendering || false); options = { amp: false, dev: false, entry: { file: "/./_app/start-0f46efe9.js", css: ["/./_app/assets/start-a8cd1609.css"], js: ["/./_app/start-0f46efe9.js", "/./_app/chunks/vendor-72fdd61e.js"] }, fetched: void 0, floc: false, get_component_path: (id) => "/./_app/" + entry_lookup[id], get_stack: (error2) => String(error2), handle_error: (error2) => { console.error(error2.stack); error2.stack = options.get_stack(error2); }, hooks: get_hooks(user_hooks), hydrate: true, initiator: void 0, load_component, manifest, paths: settings.paths, read: settings.read, root: Root, router: true, ssr: true, target: "#svelte", template, trailing_slash: "never" }; } const empty = () => ({}); const manifest = { assets: [{"file": "favicon.ico", "size": 1150, "type": "image/vnd.microsoft.icon"}], layout: ".svelte-kit/build/components/layout.svelte", error: ".svelte-kit/build/components/error.svelte", routes: [ { type: "page", pattern: /^\/$/, params: empty, a: [".svelte-kit/build/components/layout.svelte", "src/routes/index.svelte"], b: [".svelte-kit/build/components/error.svelte"] } ] }; const get_hooks = (hooks) => ({ getSession: hooks.getSession || (() => ({})), handle: hooks.handle || (({request, render: render2}) => render2(request)) }); const module_lookup = { ".svelte-kit/build/components/layout.svelte": () => Promise.resolve().then(function() { return layout; }), ".svelte-kit/build/components/error.svelte": () => Promise.resolve().then(function() { return error; }), "src/routes/index.svelte": () => Promise.resolve().then(function() { return index; }) }; const metadata_lookup = {".svelte-kit/build/components/layout.svelte": {"entry": "/./_app/layout.svelte-a2a1094c.js", "css": [], "js": ["/./_app/layout.svelte-a2a1094c.js", "/./_app/chunks/vendor-72fdd61e.js"], "styles": null}, ".svelte-kit/build/components/error.svelte": {"entry": "/./_app/error.svelte-49d2d5aa.js", "css": [], "js": ["/./_app/error.svelte-49d2d5aa.js", "/./_app/chunks/vendor-72fdd61e.js"], "styles": null}, "src/routes/index.svelte": {"entry": "/./_app/pages/index.svelte-080d4e4c.js", "css": ["/./_app/assets/pages/index.svelte-91a0f1d4.css"], "js": ["/./_app/pages/index.svelte-080d4e4c.js", "/./_app/chunks/vendor-72fdd61e.js"], "styles": null}}; async function load_component(file) { return { module: await module_lookup[file](), ...metadata_lookup[file] }; } init({paths: {"base": "", "assets": "/."}}); function render(request, { prerender } = {}) { const host = request.headers["host"]; return respond({...request, host}, options, {prerender}); } const Layout = create_ssr_component(($$result, $$props, $$bindings, slots) => { return `${slots.default ? slots.default({}) : ``}`; }); var layout = /* @__PURE__ */ Object.freeze({ __proto__: null, [Symbol.toStringTag]: "Module", "default": Layout }); function load({error: error2, status}) { return {props: {error: error2, status}}; } const Error = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {status} = $$props; let {error: error2} = $$props; if ($$props.status === void 0 && $$bindings.status && status !== void 0) $$bindings.status(status); if ($$props.error === void 0 && $$bindings.error && error2 !== void 0) $$bindings.error(error2); return `

${escape(status)}

${escape(error2.message)}

${error2.stack ? `
${escape(error2.stack)}
` : ``}`; }); var error = /* @__PURE__ */ Object.freeze({ __proto__: null, [Symbol.toStringTag]: "Module", "default": Error, load }); var Header_svelte_svelte_type_style_lang = "header.svelte-1me5k9w{display:flex;align-items:baseline;width:var(--main-width);margin-left:auto;margin-right:auto}h1.svelte-1me5k9w,h2.svelte-1me5k9w{font-family:Faktos;padding:0px;margin:0px}h2.svelte-1me5k9w{text-align:right;flex:1;padding-left:2em;font-size:var(--font-scale-12)}"; const css$v = { code: "header.svelte-1me5k9w{display:flex;align-items:baseline;width:var(--main-width);margin-left:auto;margin-right:auto}h1.svelte-1me5k9w,h2.svelte-1me5k9w{font-family:Faktos;padding:0px;margin:0px}h2.svelte-1me5k9w{text-align:right;flex:1;padding-left:2em;font-size:var(--font-scale-12)}", map: '{"version":3,"file":"Header.svelte","sources":["Header.svelte"],"sourcesContent":["
\\n

The Docks

\\n

a Full Thrust ship builder

\\n
\\n\\n \\n"],"names":[],"mappings":"AAQI,MAAM,eAAC,CAAC,AACR,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,QAAQ,CACnB,KAAK,CAAE,IAAI,YAAY,CAAC,CACxB,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,IAAI,AACpB,CAAC,AACH,iBAAE,CAAE,EAAE,eAAC,CAAC,AACN,WAAW,CAAE,MAAM,CACnB,OAAO,CAAE,GAAG,CACZ,MAAM,CAAE,GAAG,AACb,CAAC,AAED,EAAE,eAAC,CAAC,AACF,UAAU,CAAE,KAAK,CACjB,IAAI,CAAE,CAAC,CACP,YAAY,CAAE,GAAG,CACjB,SAAS,CAAE,IAAI,eAAe,CAAC,AACjC,CAAC"}' }; const Header = create_ssr_component(($$result, $$props, $$bindings, slots) => { $$result.css.add(css$v); return `

The Docks

a Full Thrust ship builder

`; }); const expand_cost_mass = (obj = {}) => [ pick(["cost", "mass"], obj), ...Object.values(obj || {}).filter((val) => typeof val === "object").map((val) => expand_cost_mass(val)) ]; function calc_ship_req(ship) { console.log(ship); let {general, ...rest} = ship; const items = flow(expand_cost_mass, flattenDeep, filter(has("cost")))({ ...rest, cost: general.mass, mass: 0 }); return { mass: sumBy("mass", items), cost: sumBy("cost", items) }; } const ceil = (number) => Math.ceil(Math.round(10 * number) / 10); function calc_ftl_reqs(type, ship_mass) { if (type === "none") return {cost: 0, mass: 0}; const mass = Math.ceil(ship_mass / 10); return { mass, cost: mass * (type === "advanced" ? 3 : 2) }; } const set_ftl = action("set_ftl", payload()); const set_ftl_reqs = action("set_ftl_reqs", payload()); const dux$g = new Updux({ initial: { mass: 0, cost: 0, type: "none" } }); dux$g.addMutation(set_ftl, (type) => u.update({type})); dux$g.addMutation(set_ftl_reqs, (reqs) => u.update(reqs)); var ftl = dux$g.asDux; const set_engine = action("set_engine", payload()); const set_drive_reqs = action("set_drive_reqs", payload()); const dux$f = new Updux({ initial: { mass: 1, cost: 2, rating: 1 } }); dux$f.addMutation(set_engine, (engine2) => u.update(engine2)); dux$f.addMutation(set_drive_reqs, (rate) => u.update(rate)); function calc_drive_reqs(ship_mass, rating, advanced = false) { const mass = Math.ceil(rating * 0.05 * ship_mass); const cost = mass * (advanced ? 3 : 2); return {mass, cost}; } var engine = dux$f.asDux; function weapon_cost_mass(weapon) { let cost = 0; let mass = 0; if (weapon.weapon_type === "beam") { return beam_cost_mass(weapon); } if (weapon.weapon_type == "submunition") { return {mass: 1, cost: 3}; } if (weapon.weapon_type === "pds") { return {mass: 1, cost: 3}; } if (weapon.weapon_type === "scattergun") { return {mass: 1, cost: 4}; } if (weapon.weapon_type === "needle") { return {mass: 2, cost: 6}; } return {cost, mass}; } const is_broadside = (arcs) => { if (arcs.length !== 4) return false; return !arcs.some((a) => a.length === 1); }; function beam_cost_mass({weapon_class, arcs}) { let mass; if (weapon_class === 1) { mass = 1; } if (weapon_class == 2) { mass = 2 + (arcs.length > 3 ? 1 : 0); } if (weapon_class == 3) { mass = 4; if (is_broadside(arcs)) { mass += 2; } else { mass += arcs.length - 1; } } if (weapon_class == 4) { mass = 8; if (is_broadside(arcs)) { mass += 4; } else { mass += 2 * (arcs.length - 1); } } return { mass, cost: 3 * mass }; } const add_weapon = action("add_weapon", payload()); const remove_weapon = action("remove_weapon", payload()); const uu = (transform) => (state) => transform(state)(state); const with_reqs = uu((weapon) => u(weapon_cost_mass(weapon))); const dux$e = new Updux$1({ initial: [] }); const weapon_initial = { beam: { weapon_type: "beam", weapon_class: 1, arcs: ["F", "A", "FS", "FP", "AS", "AP"] }, submunition: { weapon_type: "submunition", arcs: ["F"] }, pds: {weapon_type: "pds"}, scattergun: {weapon_type: "scattergun"}, needle: {weapon_type: "needle", arcs: ["F"]} }; dux$e.addMutation(add_weapon, (type) => (state) => { const id = 1 + Math.max(0, ...state.map(({id: id2}) => id2)); return [...state, {...with_reqs(weapon_initial[type]), id}]; }); dux$e.addMutation(remove_weapon, (id) => (state) => state.filter((w) => w.id !== id)); const set_weapon = action("set_weapon", payload()); dux$e.addMutation(set_weapon, (payload2) => u.map(u.if(_.matches({id: payload2.id}), (state) => with_reqs(u(payload2, state))))); var weapons = dux$e.asDux; const dux$d = new Updux$1({ initial: { rating: 0, cost: 0, mass: 0 } }); dux$d.addMutation(action("set_adfc", payload()), (rating) => u.update({rating, mass: 2 * rating, cost: 8 * rating})); var adfc = dux$d.asDux; const dux$c = new Updux$1({ initial: { firecons: { nbr: 0, cost: 0, mass: 0 } }, subduxes: { weapons, adfc } }); var weaponry = dux$c.asDux; const ship_types = [ {name: "Scout", mass: [4, 10], abbrev: "SC"}, {name: "Courier", mass: [4, 10], abbrev: "SC"}, {name: "Corvette", mass: [8, 16], abbrev: "CT"}, {name: "Frigate", mass: [14, 28], abbrev: "FF"}, {name: "Destroyer", mass: [24, 36], abbrev: "DD"}, {name: "Heavy Destroyer", mass: [30, 40], abbrev: "DH"}, {name: "Light Cruiser", mass: [40, 60], abbrev: "CL"}, {name: "Patrol", mass: [50, 70], abbrev: "CE"}, {name: "Escort Cruiser", mass: [50, 70], abbrev: "CE"}, {name: "Heavy Cruiser", mass: [60, 90], abbrev: "CA"}, {name: "Battlecruiser", mass: [80, 110], abbrev: "BC"}, {name: "Battleship", mass: [100, 140], abbrev: "BB"}, {name: "Heavy Battleship", mass: [120, 160], abbrev: "BDN"}, {name: "Dreadnought", mass: [140, 180], abbrev: "DN"}, {name: "Superdreadnought", mass: [160, 300], abbrev: "SDN"}, {name: "Escort Carrier", mass: [60, 140], abbrev: "CVE", carrier: true}, {name: "Light Carrier", mass: [120, 180], abbrev: "CVL", carrier: true}, {name: "Heavy Carrier", mass: [160, 300], abbrev: "CVH", carrier: true}, {name: "Attack Carrier", mass: [150, 300], abbrev: "CVA", carrier: true} ]; function candidate_ship_types(mass = 0, carrier = false) { console.log({carrier}); return ship_types.filter((c) => carrier == !!c.carrier).filter((c) => c.mass[0] <= mass).filter((c) => c.mass[1] >= mass); } const dux$b = new Updux$1({ initial: { standard: 0, advanced: 0, cost: 0, mass: 0 } }); const set_screens = action("set_screens", payload()); dux$b.addMutation(set_screens, (payload2) => u.update(payload2)); const set_screens_reqs = action("set_screens_reqs", payload()); dux$b.addMutation(set_screens_reqs, (payload2) => u.update(payload2)); var screens = dux$b.asDux; const dux$9 = new Updux$1({ initial: [] }); const set_armour_nbr_layers = action("set_armour_nbr_layers", payload()); dux$9.addMutation(set_armour_nbr_layers, (nbr_layers) => (state) => { if (state.length > nbr_layers) state = state.slice(0, nbr_layers); if (state.length < nbr_layers) { state = [state, _$1.times(nbr_layers - state.length, () => [])].flat(); } state = u.map((el, i) => ({layer: i + 1, rating: 0, cost: 0, mass: 0, ...el}), state); return state; }); dux$9.addMutation(action("set_armour_layer", payload()), ({layer, rating}) => u.map(u.if(_$1.matches({layer}), u({ rating, cost: 2 * layer * rating, mass: 2 * rating })))); var dux$a = dux$9.asDux; const dux$8 = new Updux$1({ initial: { mass: 0, cost: 0, hull: { rating: 1, advanced: false, cost: 2, mass: 1 } }, subduxes: { screens, armour: dux$a } }); var structure = dux$8.asDux; const dux$6 = new Updux$1({ initial: { space: 0, cost: 0, mass: 0 } }); const set_cargo = action("set_cargo", payload()); dux$6.addMutation(set_cargo, (space) => () => ({ space, cost: 0, mass: space })); var dux$7 = dux$6.asDux; const dux$4 = new Updux$1({ initial: { type: "none", cost: 0, mass: 0 } }); const set_streamlining = action("set_streamlining", payload()); dux$4.addMutation(set_streamlining, (type) => u.update({type})); const set_streamlining_cost_mass = action("set_streamlining_cost_mass", payload()); dux$4.addMutation(set_streamlining_cost_mass, (reqs) => u.update(reqs)); var dux$5 = dux$4.asDux; var squadron_types = [ {type: "standard", cost: 3}, {type: "fast", cost: 4}, {type: "heavy", cost: 5}, {type: "interceptor", cost: 3}, {type: "attack", cost: 4}, {type: "long range", cost: 4}, {type: "torpedo", cost: 6} ]; const dux$2 = new Updux$1({ initial: { bays: 0, cost: 0, mass: 0, squadrons: [] } }); const set_squadron = action("set_squadron", payload()); dux$2.addMutation(set_squadron, ({id, type}) => u.update({squadrons: u.map(u.if(_$1.matches({id}), u({type, cost: 6 * _$1.find(squadron_types, {type}).cost, mass: 6})))})); const set_carrier_bays = action("set_carrier_bays", payload()); dux$2.addMutation(set_carrier_bays, (bays) => (state) => { state = u.update({ bays, mass: 1.5 * 6 * bays, cost: 3 * 1.5 * 6 * bays })(state); if (state.squadrons.length > bays) { state = u.update({ squadrons: (squadrons) => squadrons.slice(0, bays) }, state); } if (state.squadrons.length < bays) { state = u.update({ squadrons: (squadrons) => [...squadrons, ..._$1.times(bays - state.squadrons.length, (i) => ({ id: 1 + i + state.squadrons.length, cost: 6 * squadron_types[0].cost, mass: 6, type: squadron_types[0].type }))] }, state); } return state; }); var dux$3 = dux$2.asDux; const set_ship_mass = action("set_ship_mass", payload()); const set_name = action("set_name", payload()); const set_ship_reqs = action("set_ship_reqs", payload()); const set_hull = action("set_hull", payload()); const set_ship_type = action("set_ship_type", payload()); const reset = action("reset"); const initial = { general: { ship_class: "", name: "", ship_type: "", mass: 10, used_mass: 0, cost: 10 } }; const dux = new Updux$1({ subduxes: {ftl, engine, weaponry, structure, cargo: dux$7, streamlining: dux$5, carrier: dux$3}, initial }); dux.addMutation(reset, () => () => initial); dux.addMutation(set_hull, ({rating}) => (state) => { return u.updateIn("structure.hull", { cost: 2 * rating, rating, mass: rating })(state); }); dux.addMutation(set_ship_mass, (mass) => u.updateIn("general", {mass})); dux.addMutation(set_name, (name) => u.updateIn("general", {name})); dux.addMutation(action("set_ship_class", payload()), (ship_class) => u.updateIn("general", {ship_class})); dux.addMutation(set_ship_reqs, ({cost, mass: used_mass}) => u.updateIn("general", {cost, used_mass})); dux.addSubscription((store) => createSelector(calc_ship_req, (reqs) => store.dispatch(set_ship_reqs(reqs)))); dux.addSubscription((store) => createSelector((store2) => store2.general.mass, (store2) => store2.streamlining.type, (ship_mass, streamlining) => { const mass = ceil(ship_mass * (streamlining === "none" ? 0 : streamlining === "partial" ? 5 : 10) / 100); const cost = 2 * mass; store.dispatch(dux.actions.set_streamlining_cost_mass({cost, mass})); })); dux.addSubscription((store) => createSelector((store2) => store2.general.mass, (store2) => store2.general.ship_type, (store2) => store2.carrier.bays, (mass, type, bays) => { console.log({bays}); const candidates = candidate_ship_types(mass, bays > 0); console.log({candidates}); if (candidates.length === 0) return; if (candidates.find(({name}) => name === type)) return; store.dispatch(store.actions.set_ship_type(candidates[0].name)); })); dux.addMutation(set_ship_type, (type) => u.updateIn("general.ship_type", type)); dux.addSubscription((store) => createSelector([(ship) => ship.general.mass, (ship) => ship.ftl.type], (ship_mass, type) => store.dispatch(ftl.actions.set_ftl_reqs(calc_ftl_reqs(type, ship_mass))))); dux.addSubscription((store) => createSelector((ship) => ship.general.mass, (ship) => ship.structure.screens.standard, (ship) => ship.structure.screens.advanced, (mass, standard, advanced) => { console.log({ mass, standard, advanced }); const standard_mass = standard * Math.max(3, ceil(0.05 * mass)); const advanced_mass = advanced * Math.max(4, ceil(0.075 * mass)); store.dispatch(dux.actions.set_screens_reqs({ mass: standard_mass + advanced_mass, cost: 3 * standard_mass + 4 * advanced_mass })); })); dux.addSubscription((store) => createSelector([ (ship) => ship.general.mass, (ship) => ship.engine.rating, (ship) => ship.engine.advanced ], (ship_mass, rating, advanced) => store.dispatch(dux.actions.set_drive_reqs(calc_drive_reqs(ship_mass, rating, advanced))))); const calc_firecons_reqs = (nbr) => ({ cost: 4 * nbr, mass: nbr }); const set_firecons = action("set_firecons", payload()); dux.addMutation(set_firecons, (nbr) => u.updateIn("weaponry.firecons", { nbr, ...calc_firecons_reqs(nbr) })); var dux$1 = dux.asDux; let composeEnhancers = compose; var shipStore = () => { let saved; if (saved) { saved = JSON.parse(saved); } else { saved = void 0; } console.log(saved); const duxStore = dux$1.createStore(saved, (mw) => composeEnhancers(applyMiddleware(mw))); duxStore.dispatch(duxStore.actions.set_ship_reqs(calc_ship_req(duxStore.getState()))); Object.entries(duxStore.actions).forEach(([type, action2]) => { duxStore.dispatch[type] = (payload2) => duxStore.dispatch(action2(payload2)); }); let previous = void 0; duxStore.subscribe(() => { let current = duxStore.getState(); if (previous === current) return; previous = current; console.log(current); }); const state = readable(duxStore.getState(), (set) => duxStore.subscribe(() => { set(duxStore.getState()); })); return { subscribe: state.subscribe, dispatch: duxStore.dispatch, actions: duxStore.actions, selectors: duxStore.selectors }; }; var Json_svelte_svelte_type_style_lang = "pre.svelte-2g9858{font-family:monospace;font-size:var(--font-scale-9);overflow:scroll;height:90%}aside.svelte-2g9858{padding:1em;border:3px solid var(--indigo-dye);border-radius:1em;font-size:var(--font-scale-11)}"; const css$u = { code: "pre.svelte-2g9858{font-family:monospace;font-size:var(--font-scale-9);overflow:scroll;height:90%}aside.svelte-2g9858{padding:1em;border:3px solid var(--indigo-dye);border-radius:1em;font-size:var(--font-scale-11)}", map: `{"version":3,"file":"Json.svelte","sources":["Json.svelte"],"sourcesContent":["\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAiBE,GAAG,cAAC,CAAC,AACH,WAAW,CAAE,SAAS,CACtB,SAAS,CAAE,IAAI,cAAc,CAAC,CAC9B,QAAQ,CAAE,MAAM,CAChB,MAAM,CAAE,GAAG,AAEb,CAAC,AAID,KAAK,cAAC,CAAC,AAEL,OAAO,CAAE,GAAG,CACZ,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,CACnC,aAAa,CAAE,GAAG,CAClB,SAAS,CAAE,IAAI,eAAe,CAAC,AACjC,CAAC"}` }; create_ssr_component(($$result, $$props, $$bindings, slots) => { let {ship = {}} = $$props; let json; createEventDispatcher(); if ($$props.ship === void 0 && $$bindings.ship && ship !== void 0) $$bindings.ship(ship); $$result.css.add(css$u); json = JSON.stringify(ship, null, 2); return ``; }); var Cost_svelte_svelte_type_style_lang = "div.svelte-1oeefsn:after{content:'\\00A4';margin-left:0.5em}"; const css$t = { code: "div.svelte-1oeefsn:after{content:'\\00A4';margin-left:0.5em}", map: `{"version":3,"file":"Cost.svelte","sources":["Cost.svelte"],"sourcesContent":["
{cost}
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAOE,kBAAG,MAAM,AAAC,CAAC,AAAC,OAAO,CAAE,OAAO,CAAE,WAAW,CAAE,KAAK,AAAE,CAAC"}` }; const Cost = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {cost = 0} = $$props; if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); $$result.css.add(css$t); return `
${escape(cost)}
`; }); var Mass_svelte_svelte_type_style_lang = "div.svelte-wps6ap:after{content:url(mass.svg);width:0.75em;display:inline-block;margin-left:0.5em}"; const css$s = { code: "div.svelte-wps6ap:after{content:url(mass.svg);width:0.75em;display:inline-block;margin-left:0.5em}", map: '{"version":3,"file":"Mass.svelte","sources":["Mass.svelte"],"sourcesContent":["
{mass}
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAOE,iBAAG,MAAM,AAAC,CAAC,AACT,OAAO,CAAE,IAAI,QAAQ,CAAC,CACtB,KAAK,CAAE,MAAM,CACb,OAAO,CAAE,YAAY,CACrB,WAAW,CAAE,KAAK,AACpB,CAAC"}' }; const Mass = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {mass = 0} = $$props; if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); $$result.css.add(css$s); return `
${escape(mass)}
`; }); var index_svelte_svelte_type_style_lang$m = "h1.svelte-bo35k{width:100%;display:flex;font-size:var(--font-scale-8)}h2.svelte-bo35k{font-size:var(--font-scale-7);flex:1}.fill.svelte-bo35k{margin-left:0.5em;display:inline-block;flex:1;border-bottom:1px solid black}.details.svelte-bo35k{display:flex;align-items:baseline}.reqs.svelte-bo35k{display:flex}"; const css$r = { code: "h1.svelte-bo35k{width:100%;display:flex;font-size:var(--font-scale-8)}h2.svelte-bo35k{font-size:var(--font-scale-7);flex:1}.fill.svelte-bo35k{margin-left:0.5em;display:inline-block;flex:1;border-bottom:1px solid black}.details.svelte-bo35k{display:flex;align-items:baseline}.reqs.svelte-bo35k{display:flex}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["

ship name:

\\n\\n
\\n

{ship_class}-class, {ship_type}

\\n
\\n \\n  \\n \\n
\\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAqBE,EAAE,aAAC,CAAC,AACF,KAAK,CAAE,IAAI,CACX,OAAO,CAAE,IAAI,CACb,SAAS,CAAE,IAAI,cAAc,CAAC,AAChC,CAAC,AACD,EAAE,aAAC,CAAC,AACF,SAAS,CAAE,IAAI,cAAc,CAAC,CAC9B,IAAI,CAAE,CAAC,AACT,CAAC,AACD,KAAK,aAAC,CAAC,AACL,WAAW,CAAE,KAAK,CAClB,OAAO,CAAE,YAAY,CACrB,IAAI,CAAE,CAAC,CACP,aAAa,CAAE,GAAG,CAAC,KAAK,CAAC,KAAK,AAChC,CAAC,AACD,QAAQ,aAAC,CAAC,AACR,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,QAAQ,AACvB,CAAC,AACD,KAAK,aAAC,CAAC,AACL,OAAO,CAAE,IAAI,AACf,CAAC"}` }; const Identification$1 = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {ship_class} = $$props; let {ship_type} = $$props; let {cost} = $$props, {mass = 0} = $$props; if ($$props.ship_class === void 0 && $$bindings.ship_class && ship_class !== void 0) $$bindings.ship_class(ship_class); if ($$props.ship_type === void 0 && $$bindings.ship_type && ship_type !== void 0) $$bindings.ship_type(ship_type); if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); $$result.css.add(css$r); return `

ship name:

${escape(ship_class)}-class, ${escape(ship_type)}

${validate_component(Cost, "Cost").$$render($$result, {cost}, {}, {})} \xA0 ${validate_component(Mass, "Mass").$$render($$result, {mass}, {}, {})}
`; }); var index_svelte_svelte_type_style_lang$l = ".thrust.svelte-w7le23{background-image:url(icons/standard-drive.svg);width:2em;background-size:2em;background-repeat:no-repeat;height:2em;line-height:2em;text-align:center}.main_systems.svelte-w7le23{display:flex;align-items:center;gap:1em;justify-content:space-evenly;margin-top:1em}img.ftl.svelte-w7le23{height:2em}img.internal.svelte-w7le23{height:2em}"; const css$q = { code: ".thrust.svelte-w7le23{background-image:url(icons/standard-drive.svg);width:2em;background-size:2em;background-repeat:no-repeat;height:2em;line-height:2em;text-align:center}.main_systems.svelte-w7le23{display:flex;align-items:center;gap:1em;justify-content:space-evenly;margin-top:1em}img.ftl.svelte-w7le23{height:2em}img.internal.svelte-w7le23{height:2em}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["
\\n\\n {#if ftl !== \\"none\\" }\\n \\"ftl\\n {/if}\\n\\n {#if engine > 0}\\n
{engine}
\\n {/if}\\n\\n \\"internal\\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAoBE,OAAO,cAAC,CAAC,AACP,gBAAgB,CAAE,IAAI,wBAAwB,CAAC,CAC/C,KAAK,CAAE,GAAG,CACV,eAAe,CAAE,GAAG,CACpB,iBAAiB,CAAE,SAAS,CAC5B,MAAM,CAAE,GAAG,CACX,WAAW,CAAE,GAAG,CAChB,UAAU,CAAE,MAAM,AACpB,CAAC,AACH,aAAa,cAAC,CAAC,AACb,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,MAAM,CACnB,GAAG,CAAE,GAAG,CACR,eAAe,CAAE,YAAY,CAC7B,UAAU,CAAE,GAAG,AACjB,CAAC,AACC,GAAG,IAAI,cAAC,CAAC,AAAC,MAAM,CAAE,GAAG,AAAE,CAAC,AACxB,GAAG,SAAS,cAAC,CAAC,AACZ,MAAM,CAAE,GAAG,AACb,CAAC"}` }; const MainSystems = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {ftl: ftl2 = "none"} = $$props; let {engine: engine2 = 0} = $$props; if ($$props.ftl === void 0 && $$bindings.ftl && ftl2 !== void 0) $$bindings.ftl(ftl2); if ($$props.engine === void 0 && $$bindings.engine && engine2 !== void 0) $$bindings.engine(engine2); $$result.css.add(css$q); return `
${ftl2 !== "none" ? `${` : ``} ${engine2 > 0 ? `
${escape(engine2)}
` : ``} ${
`; }); var index_svelte_svelte_type_style_lang$k = ".cell.svelte-qekx9g{display:inline-block;margin-right:0.5em;width:1em;height:1em;border:1px solid black}img.svelte-qekx9g{width:1em}"; const css$p = { code: ".cell.svelte-qekx9g{display:inline-block;margin-right:0.5em;width:1em;height:1em;border:1px solid black}img.svelte-qekx9g{width:1em}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["
\\n {#each rows as row,i (i)}\\n
\\n {#each row as item,j (j)}\\n
\\n {#if item}\\n \\"crew\\n {/if}\\n
\\n {/each}\\n
\\n {/each}\\n\\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AA6DA,KAAK,cAAC,CAAC,AACL,OAAO,CAAE,YAAY,CACrB,YAAY,CAAE,KAAK,CACnB,KAAK,CAAE,GAAG,CACV,MAAM,CAAE,GAAG,CACX,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,KAAK,AACzB,CAAC,AACC,GAAG,cAAC,CAAC,AACH,KAAK,CAAE,GAAG,AACZ,CAAC"}` }; function divide(list, divider) { if (divider <= 1) return [list]; let div = list.length / divider; const mod = list.length % divider; if (mod) div++; return [list.slice(0, div), ...divide(list.slice(div), divider - 1)]; } const Integrity = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {ship_mass = 0} = $$props; let {rating = 0} = $$props; let {advanced = false} = $$props; let nbr_rows; let cells; let dcp; let rows = []; if ($$props.ship_mass === void 0 && $$bindings.ship_mass && ship_mass !== void 0) $$bindings.ship_mass(ship_mass); if ($$props.rating === void 0 && $$bindings.rating && rating !== void 0) $$bindings.rating(rating); if ($$props.advanced === void 0 && $$bindings.advanced && advanced !== void 0) $$bindings.advanced(advanced); $$result.css.add(css$p); nbr_rows = advanced ? 3 : 4; cells = Array(rating).fill(false); dcp = ceil(ship_mass / 20); cells = divide(cells, dcp).map((g) => { g[g.length - 1] = true; return g; }).flat(); rows = divide(cells, nbr_rows); return `
${each(rows, (row, i) => `
${each(row, (item, j) => `
${item ? `${` : ``}
`)}
`)}
`; }); var index_svelte_svelte_type_style_lang$j = ".cell.svelte-15e5q3d{display:inline-block;margin-right:0.5em;width:1em;height:1em;border:1px solid black;border-radius:0.5em}.layers.svelte-15e5q3d{display:flex;flex-direction:column-reverse}"; const css$o = { code: ".cell.svelte-15e5q3d{display:inline-block;margin-right:0.5em;width:1em;height:1em;border:1px solid black;border-radius:0.5em}.layers.svelte-15e5q3d{display:flex;flex-direction:column-reverse}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["
\\n {#each armour as layer (layer)}\\n
\\n {#each _.range(layer.rating) as i (i) }\\n
\\n
\\n {/each}\\n
\\n {/each}\\n\\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAqBA,KAAK,eAAC,CAAC,AACL,OAAO,CAAE,YAAY,CACrB,YAAY,CAAE,KAAK,CACnB,KAAK,CAAE,GAAG,CACV,MAAM,CAAE,GAAG,CACX,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,KAAK,CACvB,aAAa,CAAE,KAAK,AACtB,CAAC,AACC,OAAO,eAAC,CAAC,AACP,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,cAAc,AAChC,CAAC"}` }; const Armour$1 = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {armour = []} = $$props; if ($$props.armour === void 0 && $$bindings.armour && armour !== void 0) $$bindings.armour(armour); $$result.css.add(css$o); { console.log(armour); } return `
${each(armour, (layer) => `
${each(_$1.range(layer.rating), (i) => `
`)}
`)}
`; }); const Hull$1 = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {structure: structure2 = {}} = $$props; let {ship_mass = 0} = $$props; if ($$props.structure === void 0 && $$bindings.structure && structure2 !== void 0) $$bindings.structure(structure2); if ($$props.ship_mass === void 0 && $$bindings.ship_mass && ship_mass !== void 0) $$bindings.ship_mass(ship_mass); return `
${validate_component(Armour$1, "Armour").$$render($$result, {armour: structure2.armour}, {}, {})} ${validate_component(Integrity, "Integrity").$$render($$result, { rating: structure2.hull.rating, advanced: structure2.hull.advanced, ship_mass }, {}, {})}
`; }); var Arc_svelte_svelte_type_style_lang = "path.svelte-7q6uh5{fill:lightgrey;stroke:white;stroke-width:2px}path.svelte-7q6uh5:hover{fill:pink}path.active.svelte-7q6uh5:hover{fill:pink}path.active.svelte-7q6uh5{fill:#313131}"; const css$n = { code: "path.svelte-7q6uh5{fill:lightgrey;stroke:white;stroke-width:2px}path.svelte-7q6uh5:hover{fill:pink}path.active.svelte-7q6uh5:hover{fill:pink}path.active.svelte-7q6uh5{fill:#313131}", map: '{"version":3,"file":"Arc.svelte","sources":["Arc.svelte"],"sourcesContent":["\\n\\n \\n \\n \\n\\n\\n\\n"],"names":[],"mappings":"AA+BA,IAAI,cAAC,CAAC,AACF,IAAI,CAAE,SAAS,CACf,MAAM,CAAE,KAAK,CACb,YAAY,CAAE,GAAG,AACrB,CAAC,AAED,kBAAI,MAAM,AAAC,CAAC,AACR,IAAI,CAAE,IAAI,AACd,CAAC,AAED,IAAI,qBAAO,MAAM,AAAC,CAAC,AACf,IAAI,CAAE,IAAI,AACd,CAAC,AAED,IAAI,OAAO,cAAC,CAAC,AACT,IAAI,CAAE,OAAO,AACjB,CAAC"}' }; const Arc = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {arc} = $$props; let {radius} = $$props; let {active = false} = $$props; const rotation = { F: 0, FS: 300, AS: 240, A: 180, AP: 120, FP: 60 }; let y, x_delta; let path; let transform; if ($$props.arc === void 0 && $$bindings.arc && arc !== void 0) $$bindings.arc(arc); if ($$props.radius === void 0 && $$bindings.radius && radius !== void 0) $$bindings.radius(radius); if ($$props.active === void 0 && $$bindings.active && active !== void 0) $$bindings.active(active); $$result.css.add(css$n); y = Math.round(radius * (1 - Math.sin(60 / 180 * Math.PI))); x_delta = Math.round(radius * Math.cos(60 / 180 * Math.PI)); path = `M ${radius},${radius} L ${radius - x_delta},${y} A ${radius},${radius} 0 0 1 ${radius + x_delta},${y} Z`; transform = `rotate(${rotation[arc]},${radius},${radius})`; return ``; }); var index_svelte_svelte_type_style_lang$i = "circle.svelte-qqgo8u{fill:white}"; const css$m = { code: "circle.svelte-qqgo8u{fill:white}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["\\n\\n{#each all_arcs as arc (arc)}\\n click_arc(arc)}\\n />\\n{/each}\\n \\n \\n\\n\\n\\n\\n\\n"],"names":[],"mappings":"AA4BA,MAAM,cAAC,CAAC,AACJ,IAAI,CAAE,KAAK,AACf,CAAC"}` }; const Arcs = create_ssr_component(($$result, $$props, $$bindings, slots) => { const all_arcs = ["FS", "F", "FP", "AP", "A", "AS"]; let {selected = []} = $$props; let {size = 60} = $$props; createEventDispatcher(); if ($$props.selected === void 0 && $$bindings.selected && selected !== void 0) $$bindings.selected(selected); if ($$props.size === void 0 && $$bindings.size && size !== void 0) $$bindings.size(size); $$result.css.add(css$m); return `${each(all_arcs, (arc) => `${validate_component(Arc, "Arc").$$render($$result, { arc, radius: size / 2, active: selected.includes(arc) }, {}, {})}`)}${slots.default ? slots.default({}) : ``}`; }); var index_svelte_svelte_type_style_lang$h = "div.svelte-1u8rlr5 path:hover{fill:white}div.svelte-1u8rlr5 path.active:hover{fill:black}text.svelte-1u8rlr5{text-anchor:middle;dominant-baseline:central;font-size:var(--font-scale-10)}"; const css$l = { code: "div.svelte-1u8rlr5 path:hover{fill:white}div.svelte-1u8rlr5 path.active:hover{fill:black}text.svelte-1u8rlr5{text-anchor:middle;dominant-baseline:central;font-size:var(--font-scale-10)}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["
\\n \\n \\n {weapon_class}\\n \\n \\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAiBE,kBAAG,CAAC,AAAQ,UAAU,AAAE,CAAC,AACvB,IAAI,CAAE,KAAK,AACb,CAAC,AACD,kBAAG,CAAC,AAAQ,iBAAiB,AAAE,CAAC,AAC9B,IAAI,CAAE,KAAK,AACb,CAAC,AACD,IAAI,eAAC,CAAC,AACJ,WAAW,CAAE,MAAM,CACnB,iBAAiB,CAAE,OAAO,CAC1B,SAAS,CAAE,IAAI,eAAe,CAAC,AACjC,CAAC"}` }; const Beam$1 = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {weapon_class = 1} = $$props; let {arcs = []} = $$props; if ($$props.weapon_class === void 0 && $$bindings.weapon_class && weapon_class !== void 0) $$bindings.weapon_class(weapon_class); if ($$props.arcs === void 0 && $$bindings.arcs && arcs !== void 0) $$bindings.arcs(arcs); $$result.css.add(css$l); return `
${validate_component(Arcs, "Arcs").$$render($$result, {selected: arcs, size: "40"}, {}, { default: () => `${escape(weapon_class)}` })}
`; }); var index_svelte_svelte_type_style_lang$g = "div.svelte-18nuiwu{margin-bottom:2em}.beams.svelte-18nuiwu{display:flex;justify-content:space-evenly}"; const css$k = { code: "div.svelte-18nuiwu{margin-bottom:2em}.beams.svelte-18nuiwu{display:flex;justify-content:space-evenly}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["
\\n\\n
\\n {#each beams as beam}\\n \\n {/each}\\n
\\n\\n\\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAqBE,GAAG,eAAC,CAAC,AACH,aAAa,CAAE,GAAG,AACpB,CAAC,AACD,MAAM,eAAC,CAAC,AACN,OAAO,CAAE,IAAI,CACb,eAAe,CAAE,YAAY,AAC/B,CAAC"}` }; const Weapons = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {weapons: weapons2 = []} = $$props; let beams = []; if ($$props.weapons === void 0 && $$bindings.weapons && weapons2 !== void 0) $$bindings.weapons(weapons2); $$result.css.add(css$k); beams = weapons2.filter(({weapon_type}) => weapon_type === "beam"); return `
${each(beams, (beam) => `${validate_component(Beam$1, "Beam").$$render($$result, Object.assign(beam), {}, {})}`)}
`; }); var index_svelte_svelte_type_style_lang$f = "div.svelte-10x4b15{display:flex;gap:0.5em}img.firecon.svelte-10x4b15{width:1em}"; const css$j = { code: "div.svelte-10x4b15{display:flex;gap:0.5em}img.firecon.svelte-10x4b15{width:1em}", map: '{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["
\\n {#each _.range(firecons) as firecon }\\n \\"firecon\\"\\n {/each}\\n
\\n\\n \\n\\n \\n"],"names":[],"mappings":"AAWI,GAAG,eAAC,CAAC,AACH,OAAO,CAAE,IAAI,CACb,GAAG,CAAE,KAAK,AACZ,CAAC,AACH,GAAG,QAAQ,eAAC,CAAC,AACX,KAAK,CAAE,GAAG,AACZ,CAAC"}' }; const Firecons$1 = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {firecons = 0} = $$props; if ($$props.firecons === void 0 && $$bindings.firecons && firecons !== void 0) $$bindings.firecons(firecons); $$result.css.add(css$j); return `
${each(_.range(firecons), (firecon) => `${`)}
`; }); var index_svelte_svelte_type_style_lang$e = "img.svelte-kh7po5{width:1em}div.svelte-kh7po5{display:flex;gap:0.5em}"; const css$i = { code: "img.svelte-kh7po5{width:1em}div.svelte-kh7po5{display:flex;gap:0.5em}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["
\\n {#each _.range(standard) as i }\\n \\"screen\\"\\n {/each}\\n {#each _.range(advanced) as i }\\n \\"advanced\\n {/each}\\n\\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAkBE,GAAG,cAAC,CAAC,AACH,KAAK,CAAE,GAAG,AACZ,CAAC,AACD,GAAG,cAAC,CAAC,AACH,OAAO,CAAE,IAAI,CACb,GAAG,CAAE,KAAK,AACZ,CAAC"}` }; const Screens$1 = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {standard = 0} = $$props; let {advanced = 0} = $$props; if ($$props.standard === void 0 && $$bindings.standard && standard !== void 0) $$bindings.standard(standard); if ($$props.advanced === void 0 && $$bindings.advanced && advanced !== void 0) $$bindings.advanced(advanced); $$result.css.add(css$i); return `
${each(_$1.range(standard), (i) => `${`)} ${each(_$1.range(advanced), (i) => `${`)}
`; }); var index_svelte_svelte_type_style_lang$d = "div.svelte-ytgy37{text-align:center;flex:1;display:flex;flex-direction:column;align-items:center}div.svelte-ytgy37>*{margin-bottom:1em}"; const css$h = { code: "div.svelte-ytgy37{text-align:center;flex:1;display:flex;flex-direction:column;align-items:center}div.svelte-ytgy37>*{margin-bottom:1em}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["
\\n \\n\\n \\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAgBE,GAAG,cAAC,CAAC,AACH,UAAU,CAAE,MAAM,CAClB,IAAI,CAAE,CAAC,CACP,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,MAAM,CACtB,WAAW,CAAE,MAAM,AACrB,CAAC,AACD,iBAAG,CAAW,CAAC,AAAE,CAAC,AAChB,aAAa,CAAE,GAAG,AAEpB,CAAC"}` }; const Systems = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {firecons = 0} = $$props; let {screens: screens2 = {}} = $$props; if ($$props.firecons === void 0 && $$bindings.firecons && firecons !== void 0) $$bindings.firecons(firecons); if ($$props.screens === void 0 && $$bindings.screens && screens2 !== void 0) $$bindings.screens(screens2); $$result.css.add(css$h); return `
${validate_component(Firecons$1, "Firecons").$$render($$result, {firecons}, {}, {})} ${validate_component(Screens$1, "Screens").$$render($$result, Object.assign(screens2), {}, {})}
`; }); var index_svelte_svelte_type_style_lang$c = ".ship-sheet.svelte-5wh1p{width:4.25in;height:5.5in;border:1px solid black;padding:1em}.section-2.svelte-5wh1p{display:flex;align-items:start}"; const css$g = { code: ".ship-sheet.svelte-5wh1p{width:4.25in;height:5.5in;border:1px solid black;padding:1em}.section-2.svelte-5wh1p{display:flex;align-items:start}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAsCA,WAAW,aAAC,CAAC,AACX,KAAK,CAAE,MAAM,CACb,MAAM,CAAE,KAAK,CACb,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,KAAK,CACvB,OAAO,CAAE,GAAG,AACd,CAAC,AAED,UAAU,aAAC,CAAC,AACV,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,KAAK,AACpB,CAAC"}` }; create_ssr_component(($$result, $$props, $$bindings, slots) => { let {ship} = $$props; if ($$props.ship === void 0 && $$bindings.ship && ship !== void 0) $$bindings.ship(ship); $$result.css.add(css$g); return ``; }); var index_svelte_svelte_type_style_lang$b = "div.svelte-1urp5hr>*{margin-left:1em}div.svelte-1urp5hr>label.svelte-1urp5hr{margin-left:0em}label.svelte-1urp5hr.svelte-1urp5hr{font-size:var(--font-scale-8);font-weight:lighter;font-family:Dosis;color:var(--indigo-dye)}"; const css$f = { code: "div.svelte-1urp5hr>*{margin-left:1em}div.svelte-1urp5hr>label.svelte-1urp5hr{margin-left:0em}label.svelte-1urp5hr.svelte-1urp5hr{font-size:var(--font-scale-8);font-weight:lighter;font-family:Dosis;color:var(--indigo-dye)}", map: '{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["
\\n{#if label}\\n\\n{/if}\\n\\n\\n\\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAgBE,kBAAG,CAAW,CAAC,AAAE,CAAC,AAChB,WAAW,CAAE,GAAG,AAClB,CAAC,AACD,kBAAG,CAAG,KAAK,eAAC,CAAC,AACX,WAAW,CAAE,GAAG,AAClB,CAAC,AACH,KAAK,8BAAC,CAAC,AACH,SAAS,CAAE,IAAI,cAAc,CAAC,CAC9B,WAAW,CAAE,OAAO,CACpB,WAAW,CAAE,KAAK,CAClB,KAAK,CAAG,IAAI,YAAY,CAAC,AAC7B,CAAC"}' }; const Field = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {label = ""} = $$props; let {value = ""} = $$props; let {placeholder} = $$props; if ($$props.label === void 0 && $$bindings.label && label !== void 0) $$bindings.label(label); if ($$props.value === void 0 && $$bindings.value && value !== void 0) $$bindings.value(value); if ($$props.placeholder === void 0 && $$bindings.placeholder && placeholder !== void 0) $$bindings.placeholder(placeholder); $$result.css.add(css$f); return `
${label ? `` : ``} ${slots.default ? slots.default({}) : ` `}
`; }); var Identification_svelte_svelte_type_style_lang = "div.svelte-fc2507{display:flex;align-items:end;gap:2em}"; const css$e = { code: "div.svelte-fc2507{display:flex;align-items:end;gap:2em}", map: `{"version":3,"file":"Identification.svelte","sources":["Identification.svelte"],"sourcesContent":["
\\n \\n\\n \\n \\n \\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAyCE,GAAG,cAAC,CAAC,AACH,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,GAAG,CAChB,GAAG,CAAE,GAAG,AACV,CAAC"}` }; const Identification = create_ssr_component(($$result, $$props, $$bindings, slots) => { let $ship, $$unsubscribe_ship; let {ship = getContext("ship")} = $$props; $$unsubscribe_ship = subscribe(ship, (value) => $ship = value); let general; let ship_type; let ship_types2; if ($$props.ship === void 0 && $$bindings.ship && ship !== void 0) $$bindings.ship(ship); $$result.css.add(css$e); general = $ship.general; ship_type = $ship.general.ship_type; ship_types2 = candidate_ship_types($ship.general.mass, $ship.carrier.bays > 0).map(({name}) => name); $$unsubscribe_ship(); return `
${validate_component(Field, "Field").$$render($$result, { label: "ship class", value: general.ship_class }, {}, {})} ${validate_component(Field, "Field").$$render($$result, {label: "ship type"}, {}, { default: () => `${each(ship_types2, (type) => `${escape(type)}`)}` })}
`; }); var ShipCost_svelte_svelte_type_style_lang = "input.svelte-15yh1sv{width:5em}.mass_symbol.svelte-15yh1sv:after{content:url(mass.svg);width:0.75em;display:inline-block;margin-left:0.5em}.warning.svelte-15yh1sv{color:red}.note.svelte-15yh1sv{font-size:smaller}.mass.svelte-15yh1sv,div.cost.svelte-15yh1sv{padding:0px 2em;justify-self:right}.mass.svelte-15yh1sv{grid-column:2}div.cost.svelte-15yh1sv{grid-column:3}span.cost.svelte-15yh1sv:after{content:'\\00A4';margin-left:0.5em}"; const css$d = { code: "input.svelte-15yh1sv{width:5em}.mass_symbol.svelte-15yh1sv:after{content:url(mass.svg);width:0.75em;display:inline-block;margin-left:0.5em}.warning.svelte-15yh1sv{color:red}.note.svelte-15yh1sv{font-size:smaller}.mass.svelte-15yh1sv,div.cost.svelte-15yh1sv{padding:0px 2em;justify-self:right}.mass.svelte-15yh1sv{grid-column:2}div.cost.svelte-15yh1sv{grid-column:3}span.cost.svelte-15yh1sv:after{content:'\\00A4';margin-left:0.5em}", map: `{"version":3,"file":"ShipCost.svelte","sources":["ShipCost.svelte"],"sourcesContent":["
\\n \\n \\n \\n\\n
\\n {#if within_budget}\\n mass unused: {mass_unused}\\n {:else}excessive mass: {-mass_unused}{/if}\\n
\\n
\\n
\\n\\n
\\n \\n {$ship.general.cost}\\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AA8CE,KAAK,eAAC,CAAC,AACL,KAAK,CAAE,GAAG,AACZ,CAAC,AACD,2BAAY,MAAM,AAAC,CAAC,AAClB,OAAO,CAAE,IAAI,QAAQ,CAAC,CACtB,KAAK,CAAE,MAAM,CACb,OAAO,CAAE,YAAY,CACrB,WAAW,CAAE,KAAK,AACpB,CAAC,AACD,QAAQ,eAAC,CAAC,AACR,KAAK,CAAE,GAAG,AACZ,CAAC,AACD,KAAK,eAAC,CAAC,AACL,SAAS,CAAE,OAAO,AACpB,CAAC,AAED,oBAAK,CAAC,GAAG,KAAK,eAAC,CAAC,AACd,OAAO,CAAE,GAAG,CAAC,GAAG,CAAE,YAAY,CAAE,KAAK,AACvC,CAAC,AAED,KAAK,eAAC,CAAC,AACL,WAAW,CAAE,CAAC,AAChB,CAAC,AACD,GAAG,KAAK,eAAC,CAAC,AACR,WAAW,CAAE,CAAC,AAChB,CAAC,AACD,IAAI,oBAAK,MAAM,AAAC,CAAC,AACf,OAAO,CAAE,OAAO,CAChB,WAAW,CAAE,KAAK,AACpB,CAAC"}` }; const ShipCost = create_ssr_component(($$result, $$props, $$bindings, slots) => { let $ship, $$unsubscribe_ship; let {ship = getContext("ship")} = $$props; $$unsubscribe_ship = subscribe(ship, (value) => $ship = value); let mass_unused; let within_budget = true; if ($$props.ship === void 0 && $$bindings.ship && ship !== void 0) $$bindings.ship(ship); $$result.css.add(css$d); mass_unused = $ship.general.mass - $ship.general.used_mass; within_budget = mass_unused >= 0; $$unsubscribe_ship(); return `
${validate_component(Field, "Field").$$render($$result, {label: "ship tonnage"}, {}, { default: () => `
${within_budget ? `mass unused: ${escape(mass_unused)}` : `excessive mass: ${escape(-mass_unused)}`}
` })}
${validate_component(Field, "Field").$$render($$result, {label: "cost"}, {}, { default: () => `${escape($ship.general.cost)}` })}
`; }); const ShipSpecs = create_ssr_component(($$result, $$props, $$bindings, slots) => { return `${validate_component(Identification, "Identification").$$render($$result, {}, {}, {})} ${validate_component(ShipCost, "ShipCost").$$render($$result, {}, {}, {})}`; }); var Notes_svelte_svelte_type_style_lang = "aside.svelte-16mfw8u{background-color:rgb(254, 218, 184);position:absolute;height:20em;max-width:50%;z-index:200;padding:1em;border:3px solid var(--indigo-dye);border-radius:1em;left:0px;border-left:0px;border-top-left-radius:0;border-bottom-left-radius:0;top:6em;font-size:var(--font-scale-11)}h3.svelte-16mfw8u{text-align:center;margin:0px}div.svelte-16mfw8u{text-align:right}"; const css$c = { code: "aside.svelte-16mfw8u{background-color:rgb(254, 218, 184);position:absolute;height:20em;max-width:50%;z-index:200;padding:1em;border:3px solid var(--indigo-dye);border-radius:1em;left:0px;border-left:0px;border-top-left-radius:0;border-bottom-left-radius:0;top:6em;font-size:var(--font-scale-11)}h3.svelte-16mfw8u{text-align:center;margin:0px}div.svelte-16mfw8u{text-align:right}", map: `{"version":3,"file":"Notes.svelte","sources":["Notes.svelte"],"sourcesContent":[" \\n\\n \\n\\n\\n"],"names":[],"mappings":"AA2CE,KAAK,eAAC,CAAC,AACL,gBAAgB,CAAE,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CACpC,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,IAAI,CACZ,SAAS,CAAE,GAAG,CACd,OAAO,CAAE,GAAG,CAEZ,OAAO,CAAE,GAAG,CACZ,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,IAAI,YAAY,CAAC,CACnC,aAAa,CAAE,GAAG,CAClB,IAAI,CAAE,GAAG,CACT,WAAW,CAAE,GAAG,CAChB,sBAAsB,CAAE,CAAC,CACzB,yBAAyB,CAAE,CAAC,CAC5B,GAAG,CAAE,GAAG,CACR,SAAS,CAAE,IAAI,eAAe,CAAC,AACjC,CAAC,AAED,EAAE,eAAC,CAAC,AACF,UAAU,CAAE,MAAM,CAClB,MAAM,CAAE,GAAG,AACb,CAAC,AACD,GAAG,eAAC,CAAC,AACL,UAAU,CAAE,KAAK,AACjB,CAAC"}` }; create_ssr_component(($$result, $$props, $$bindings, slots) => { createEventDispatcher(); $$result.css.add(css$c); return ``; }); var index_svelte_svelte_type_style_lang$a = "div.svelte-14c1p7f{margin-bottom:1em}.cost.svelte-14c1p7f,.mass.svelte-14c1p7f{padding:0px 2em;text-align:right}.cost.svelte-14c1p7f{grid-column:3 }.mass.svelte-14c1p7f{grid-column:2 }.cost.svelte-14c1p7f:after{content:'\\00A4';margin-left:0.5em}.mass.svelte-14c1p7f:after{content:url(mass.svg);width:0.75em;display:inline-block;margin-left:0.5em}.updated{animation-name:svelte-14c1p7f-update;animation-duration:1.5s;animation-fill-mode:forwards}@keyframes svelte-14c1p7f-update{0%{color:inherit;font-weight:inherit}20%{color:red;font-weight:bold}80%{color:red;font-weight:bold}100%{color:inherit;font-weight:inherit}}"; const css$b = { code: "div.svelte-14c1p7f{margin-bottom:1em}.cost.svelte-14c1p7f,.mass.svelte-14c1p7f{padding:0px 2em;text-align:right}.cost.svelte-14c1p7f{grid-column:3 }.mass.svelte-14c1p7f{grid-column:2 }.cost.svelte-14c1p7f:after{content:'\\00A4';margin-left:0.5em}.mass.svelte-14c1p7f:after{content:url(mass.svg);width:0.75em;display:inline-block;margin-left:0.5em}.updated{animation-name:svelte-14c1p7f-update;animation-duration:1.5s;animation-fill-mode:forwards}@keyframes svelte-14c1p7f-update{0%{color:inherit;font-weight:inherit}20%{color:red;font-weight:bold}80%{color:red;font-weight:bold}100%{color:inherit;font-weight:inherit}}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["
\\n\\n
{ mass }
\\n
{ cost }
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AA2BE,GAAG,eAAC,CAAC,AACH,aAAa,CAAE,GAAG,AAEpB,CAAC,AACD,oBAAK,CAAC,KAAK,eAAC,CAAC,AAAC,OAAO,CAAE,GAAG,CAAC,GAAG,CAAG,UAAU,CAAE,KAAK,AAAE,CAAC,AACrD,KAAK,eAAC,CAAC,AAAC,WAAW,CAAE,CAAC,CAAC,CAAC,AACxB,KAAK,eAAC,CAAC,AAAC,WAAW,CAAE,CAAC,CAAC,CAAC,AAaxB,oBAAK,MAAM,AAAC,CAAC,AAAC,OAAO,CAAE,OAAO,CAAE,WAAW,CAAE,KAAK,AAAE,CAAC,AACrD,oBAAK,MAAM,AAAC,CAAC,AAAC,OAAO,CAAE,IAAI,QAAQ,CAAC,CAAE,KAAK,CAAE,MAAM,CAAE,OAAO,CAC5D,YAAY,CAAE,WAAW,CAAE,KAAK,AAAE,CAAC,AAE3B,QAAQ,AAAE,CAAC,AACjB,cAAc,CAAE,qBAAM,CACtB,kBAAkB,CAAE,IAAI,CACxB,mBAAmB,CAAE,QAAQ,AAC/B,CAAC,AAEH,WAAW,qBAAO,CAAC,AACjB,EAAE,AAAG,CAAC,MAAM,OAAO,CAAE,WAAW,CAAE,OAAO,AAAC,CAAC,AAC3C,GAAG,AAAC,CAAC,MAAM,GAAG,CAAE,WAAW,CAAE,IAAI,AAAC,CAAC,AACnC,GAAG,AAAC,CAAC,MAAM,GAAG,CAAE,WAAW,CAAE,IAAI,AAAC,CAAC,AACnC,IAAI,AAAC,CAAC,MAAM,OAAO,CAAE,WAAW,CAAE,OAAO,AAAE,CAAC,AAC9C,CAAC"}` }; const ShipItem = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {mass} = $$props; let {cost} = $$props; let mass_el; let cost_el; const update_el = async (el) => { if (!el) return; el.classList.remove("updated"); void el.offsetWidth; el.classList.add("updated"); }; if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); $$result.css.add(css$b); { update_el(mass_el); } { update_el(cost_el); } return `
${slots.default ? slots.default({}) : ``}
${escape(mass)}
${escape(cost)}
`; }); var index_svelte_svelte_type_style_lang$9 = "div.svelte-12m93xd{display:flex;grid-column:1 / span 3 !important;align-items:baseline;gap:1em}hr.svelte-12m93xd{flex:1;heigth:0px}"; const css$a = { code: "div.svelte-12m93xd{display:flex;grid-column:1 / span 3 !important;align-items:baseline;gap:1em}hr.svelte-12m93xd{flex:1;heigth:0px}", map: '{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["
\\n

{label}

\\n
\\n
\\n\\n\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAYE,GAAG,eAAC,CAAC,AACH,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAClC,WAAW,CAAE,QAAQ,CACrB,GAAG,CAAE,GAAG,AACV,CAAC,AACD,EAAE,eAAC,CAAC,AACF,IAAI,CAAE,CAAC,CACP,MAAM,CAAE,GAAG,AACb,CAAC"}' }; const Section = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {label} = $$props; if ($$props.label === void 0 && $$bindings.label && label !== void 0) $$bindings.label(label); $$result.css.add(css$a); return `

${escape(label)}


${slots.default ? slots.default({}) : ``}`; }); var index_svelte_svelte_type_style_lang$8 = "input.svelte-11x6jvv{width:3em}div.svelte-11x6jvv{display:flex;gap:2em}"; const css$9 = { code: "input.svelte-11x6jvv{width:3em}div.svelte-11x6jvv{display:flex;gap:2em}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["\\n
\\n\\n \\n \\n \\n\\n \\n \\n \\n
\\n\\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAkCE,KAAK,eAAC,CAAC,AACL,KAAK,CAAE,GAAG,AACZ,CAAC,AACD,GAAG,eAAC,CAAC,AACH,OAAO,CAAE,IAAI,CACb,GAAG,CAAE,GAAG,AACV,CAAC"}` }; const Screens = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {cost = 0} = $$props; let {mass = 0} = $$props; let {standard = 0} = $$props; let {advanced = 0} = $$props; const dispatch = createEventDispatcher(); if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); if ($$props.standard === void 0 && $$bindings.standard && standard !== void 0) $$bindings.standard(standard); if ($$props.advanced === void 0 && $$bindings.advanced && advanced !== void 0) $$bindings.advanced(advanced); $$result.css.add(css$9); { dispatch("set_screens", {standard, advanced}); } return `${validate_component(ShipItem, "ShipItem").$$render($$result, {cost, mass}, {}, { default: () => `
${validate_component(Field, "Field").$$render($$result, {label: "screens"}, {}, { default: () => `` })} ${validate_component(Field, "Field").$$render($$result, {label: "advanced screens"}, {}, { default: () => `` })}
` })}`; }); var index_svelte_svelte_type_style_lang$7 = "input.svelte-qworsx{width:5em}"; const css$8 = { code: "input.svelte-qworsx{width:5em}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["\\n \\n\\n\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAyBE,KAAK,cAAC,CAAC,AACL,KAAK,CAAE,GAAG,AACZ,CAAC"}` }; const Layer = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {layer = 1} = $$props; let {rating = 0} = $$props; const dispatch = createEventDispatcher(); if ($$props.layer === void 0 && $$bindings.layer && layer !== void 0) $$bindings.layer(layer); if ($$props.rating === void 0 && $$bindings.rating && rating !== void 0) $$bindings.rating(rating); $$result.css.add(css$8); { dispatch("ship_change", dux$a.actions.set_armour_layer({layer, rating})); } return `${validate_component(Field, "Field").$$render($$result, {label: `layer ${layer}`}, {}, { default: () => `` })}`; }); var index_svelte_svelte_type_style_lang$6 = ".layers.svelte-1bx91qz{display:flex}input.svelte-1bx91qz{width:5em}"; const css$7 = { code: ".layers.svelte-1bx91qz{display:flex}input.svelte-1bx91qz{width:5em}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["\\n\\n
\\n\\n
\\n\\n \\n\\n
\\n\\n
\\n {#each armour as layer ( layer.layer )}\\n \\n {/each}\\n
\\n\\n\\n
\\n\\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AA8CI,OAAO,eAAC,CAAC,AACL,OAAO,CAAE,IAAI,AAEjB,CAAC,AAED,KAAK,eAAC,CAAC,AACL,KAAK,CAAE,GAAG,AACZ,CAAC"}` }; const Armour = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {armour = []} = $$props; let {cost = 0} = $$props; let {mass = 0} = $$props; let nbr_layers = armour.length; const dispatch = createEventDispatcher(); if ($$props.armour === void 0 && $$bindings.armour && armour !== void 0) $$bindings.armour(armour); if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); $$result.css.add(css$7); cost = _$1.sum(_$1.map(armour, "cost")); mass = _$1.sum(_$1.map(armour, "mass")); { dispatch("ship_change", dux$a.actions.set_armour_nbr_layers(nbr_layers)); } return `${validate_component(ShipItem, "ShipItem").$$render($$result, {cost, mass}, {}, { default: () => `
${validate_component(Field, "Field").$$render($$result, {label: "armour layers"}, {}, { default: () => `` })}
${each(armour, (layer) => `${validate_component(Layer, "Layer").$$render($$result, Object.assign(layer), {}, {})}`)}
` })}`; }); var index_svelte_svelte_type_style_lang$5 = "input.svelte-qworsx{width:5em}"; const css$6 = { code: "input.svelte-qworsx{width:5em}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["\\n \\n \\n \\n\\n\\n \\n\\n \\n"],"names":[],"mappings":"AA0BE,KAAK,cAAC,CAAC,AACL,KAAK,CAAE,GAAG,AACZ,CAAC"}` }; const Cargo = create_ssr_component(($$result, $$props, $$bindings, slots) => { getContext("ship"); let {space = 0} = $$props; let {cost = 0} = $$props; let {mass = 0} = $$props; const dispatch = createEventDispatcher(); if ($$props.space === void 0 && $$bindings.space && space !== void 0) $$bindings.space(space); if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); $$result.css.add(css$6); { dispatch("set_cargo", dux$7.actions.set_cargo(space)); } return `${validate_component(ShipItem, "ShipItem").$$render($$result, {cost, mass}, {}, { default: () => `${validate_component(Field, "Field").$$render($$result, {label: "cargo"}, {}, { default: () => `` })}` })}`; }); var index_svelte_svelte_type_style_lang$4 = "div.svelte-6w28yb{display:flex }label.svelte-6w28yb{margin-left:1em}"; const css$5 = { code: "div.svelte-6w28yb{display:flex }label.svelte-6w28yb{margin-left:1em}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["\\n \\n
\\n \\n \\n \\n
\\n
\\n
\\n\\n \\n\\n \\n"],"names":[],"mappings":"AAmCE,GAAG,cAAC,CAAC,AAAC,OAAO,CAAE,IAAI,CAAC,CAAC,AACrB,KAAK,cAAC,CAAC,AACL,WAAW,CAAE,GAAG,AAClB,CAAC"}` }; const Streamlining = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {type = "none"} = $$props; let {cost = 0} = $$props; let {mass = 0} = $$props; let {ship_change = getContext("ship_change") || (() => { })} = $$props; if ($$props.type === void 0 && $$bindings.type && type !== void 0) $$bindings.type(type); if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); if ($$props.ship_change === void 0 && $$bindings.ship_change && ship_change !== void 0) $$bindings.ship_change(ship_change); $$result.css.add(css$5); { ship_change(dux$5.actions.set_streamlining(type)); } return `${validate_component(ShipItem, "ShipItem").$$render($$result, {cost, mass}, {}, { default: () => `${validate_component(Field, "Field").$$render($$result, {label: "streamlining"}, {}, { default: () => `
` })}` })}`; }); var index_svelte_svelte_type_style_lang$3 = "input.svelte-x10nn1{width:5em}"; const css$4 = { code: "input.svelte-x10nn1{width:5em}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["
\\n\\n\\n \\n \\n \\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAiDE,KAAK,cAAC,CAAC,AAAC,KAAK,CAAE,GAAG,AAAE,CAAC"}` }; const Hull = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {cost} = $$props, {mass} = $$props, {ship_mass} = $$props, {rating} = $$props, {screens: screens2} = $$props, {armour = []} = $$props; let {cargo = {}} = $$props; let {streamlining = {}} = $$props; let min, max; const dispatch = createEventDispatcher(); if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); if ($$props.ship_mass === void 0 && $$bindings.ship_mass && ship_mass !== void 0) $$bindings.ship_mass(ship_mass); if ($$props.rating === void 0 && $$bindings.rating && rating !== void 0) $$bindings.rating(rating); if ($$props.screens === void 0 && $$bindings.screens && screens2 !== void 0) $$bindings.screens(screens2); if ($$props.armour === void 0 && $$bindings.armour && armour !== void 0) $$bindings.armour(armour); if ($$props.cargo === void 0 && $$bindings.cargo && cargo !== void 0) $$bindings.cargo(cargo); if ($$props.streamlining === void 0 && $$bindings.streamlining && streamlining !== void 0) $$bindings.streamlining(streamlining); $$result.css.add(css$4); min = Math.ceil(ship_mass / 10); max = ship_mass; { dispatch("change_hull", {rating}); } return `${validate_component(Section, "Section").$$render($$result, {label: "hull"}, {}, { default: () => `${validate_component(ShipItem, "ShipItem").$$render($$result, {cost, mass}, {}, { default: () => `${validate_component(Field, "Field").$$render($$result, {label: "integrity"}, {}, { default: () => `` })}` })} ${validate_component(Screens, "Screens").$$render($$result, Object.assign(screens2), {}, {})} ${validate_component(Armour, "Armour").$$render($$result, {armour}, {}, {})} ${validate_component(Cargo, "Cargo").$$render($$result, Object.assign(cargo), {}, {})} ${validate_component(Streamlining, "Streamlining").$$render($$result, Object.assign(streamlining), {}, {})}` })}`; }); const Firecons = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {nbr} = $$props, {cost} = $$props, {mass = 0} = $$props; const dispatch = createEventDispatcher(); if ($$props.nbr === void 0 && $$bindings.nbr && nbr !== void 0) $$bindings.nbr(nbr); if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); { dispatch("change_firecons", nbr); } return `${validate_component(ShipItem, "ShipItem").$$render($$result, {cost, mass}, {}, { default: () => `${validate_component(Field, "Field").$$render($$result, {label: "firecons"}, {}, { default: () => `` })}` })}`; }); var index_svelte_svelte_type_style_lang$2 = "label.svelte-1ozsoxu{display:inline;margin-right:1em}"; const css$3 = { code: "label.svelte-1ozsoxu{display:inline;margin-right:1em}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["\\n\\n\\n \\n\\n {#each types as t (t)}\\n \\n {/each}\\n \\n\\n\\n\\n"],"names":[],"mappings":"AA8BA,KAAK,eAAC,CAAC,AACH,OAAO,CAAE,MAAM,CACf,YAAY,CAAE,GAAG,AACrB,CAAC"}` }; const Ftl = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {type = "none"} = $$props; let {cost = 0} = $$props; let {mass = 0} = $$props; createEventDispatcher(); const types = ["none", "standard", "advanced"]; if ($$props.type === void 0 && $$bindings.type && type !== void 0) $$bindings.type(type); if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); $$result.css.add(css$3); return `${validate_component(ShipItem, "ShipItem").$$render($$result, {mass, cost}, {}, { default: () => `${validate_component(Field, "Field").$$render($$result, {label: "FTL drive"}, {}, { default: () => `${each(types, (t) => ``)}` })}` })}`; }); var index_svelte_svelte_type_style_lang$1 = 'div.svelte-3grq2v{display:flex;align-items:end}label.svelte-3grq2v{margin-left:2em}input[type="number"].svelte-3grq2v{width:5em}'; const css$2 = { code: 'div.svelte-3grq2v{display:flex;align-items:end}label.svelte-3grq2v{margin-left:2em}input[type="number"].svelte-3grq2v{width:5em}', map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["\\n\\n
\\n\\n \\n\\n\\n\\n
\\n\\n
\\n\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAiCA,GAAG,cAAC,CAAC,AACD,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,GAAG,AACpB,CAAC,AACD,KAAK,cAAC,CAAC,AAAC,WAAW,CAAE,GAAG,AAAE,CAAC,AACzB,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAC,CAAC,AAAC,KAAK,CAAE,GAAG,AAAE,CAAC"}` }; const Engine = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {cost} = $$props; let {mass} = $$props; let {advanced = false} = $$props; let {rating = 0} = $$props; const dispatch = createEventDispatcher(); console.log(advanced); if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); if ($$props.advanced === void 0 && $$bindings.advanced && advanced !== void 0) $$bindings.advanced(advanced); if ($$props.rating === void 0 && $$bindings.rating && rating !== void 0) $$bindings.rating(rating); $$result.css.add(css$2); { dispatch("change_engine", {rating, advanced}); } return `${validate_component(ShipItem, "ShipItem").$$render($$result, {cost, mass}, {}, { default: () => `
${validate_component(Field, "Field").$$render($$result, {label: "thrust rating"}, {}, { default: () => `` })}
` })}`; }); const Propulsion = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {ftl: ftl2 = {}} = $$props; let {engine: engine2 = {}} = $$props; if ($$props.ftl === void 0 && $$bindings.ftl && ftl2 !== void 0) $$bindings.ftl(ftl2); if ($$props.engine === void 0 && $$bindings.engine && engine2 !== void 0) $$bindings.engine(engine2); return `${validate_component(Section, "Section").$$render($$result, {label: "propulsion"}, {}, { default: () => `${validate_component(Engine, "Engine").$$render($$result, Object.assign(engine2), {}, {})} ${validate_component(Ftl, "Ftl").$$render($$result, Object.assign(ftl2), {}, {})}` })}`; }); const Beam = create_ssr_component(($$result, $$props, $$bindings, slots) => { const all_arcs = ["FS", "F", "FP", "AP", "A", "AS"]; let {weapon_type} = $$props; let {id} = $$props; let {weapon_class = 1} = $$props; let {arcs = ["F"]} = $$props; let {ship_change = getContext("ship_change") || (() => { })} = $$props; let arc_options = { 1: [6], 2: [3, 6], 3: [1, 2, 3, 4, 5, 6, "broadside"], 4: [1, 2, 3, 4, 5, 6, "broadside"] }; let nbr_arcs = 6; let cache = ""; const dispatch = createEventDispatcher(); if ($$props.weapon_type === void 0 && $$bindings.weapon_type && weapon_type !== void 0) $$bindings.weapon_type(weapon_type); if ($$props.id === void 0 && $$bindings.id && id !== void 0) $$bindings.id(id); if ($$props.weapon_class === void 0 && $$bindings.weapon_class && weapon_class !== void 0) $$bindings.weapon_class(weapon_class); if ($$props.arcs === void 0 && $$bindings.arcs && arcs !== void 0) $$bindings.arcs(arcs); if ($$props.ship_change === void 0 && $$bindings.ship_change && ship_change !== void 0) $$bindings.ship_change(ship_change); nbr_arcs = arc_options[weapon_class][0]; { if (arcs.length !== nbr_arcs) { if (nbr_arcs === "broadside") { arcs = all_arcs.filter((arc) => arc.length === 1); } else { let first_index = all_arcs.findIndex((arc) => arcs[0]); if (first_index === -1) first_index = 0; const new_arcs = []; _$1.range(nbr_arcs).forEach((i) => { new_arcs.push(all_arcs[first_index]); first_index = (first_index + 1) % all_arcs.length; }); arcs = new_arcs; } } } { console.log({arcs, nbr_arcs}); } cache = arcs.join(":"); { dispatch("change", {weapon_class, arcs: cache.split(":")}); } return ` ${validate_component(Field, "Field").$$render($$result, {label: "beam class"}, {}, { default: () => `` })} ${validate_component(Field, "Field").$$render($$result, {label: "arcs"}, {}, { default: () => `${each(arc_options[weapon_class] || [], (nbr_arcs2) => `${escape(nbr_arcs2)}`)}` })} ${validate_component(Arcs, "Arcs").$$render($$result, {selected: arcs}, {}, {})}`; }); const Submunition = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {arcs = ["F"]} = $$props; let {ship_change = getContext("ship_change") || (() => { })} = $$props; const dispatch = createEventDispatcher(); let cache; if ($$props.arcs === void 0 && $$bindings.arcs && arcs !== void 0) $$bindings.arcs(arcs); if ($$props.ship_change === void 0 && $$bindings.ship_change && ship_change !== void 0) $$bindings.ship_change(ship_change); cache = arcs.join(":"); { dispatch("change", {arcs: cache.split(":")}); } return ` ${validate_component(Arcs, "Arcs").$$render($$result, {selected: arcs}, {}, {})}`; }); const PointDefenceSystem = create_ssr_component(($$result, $$props, $$bindings, slots) => { return ``; }); const Scattergun = create_ssr_component(($$result, $$props, $$bindings, slots) => { return ``; }); const Needle = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {arcs = ["F"]} = $$props; let {ship_change = getContext("ship_change") || (() => { })} = $$props; const dispatch = createEventDispatcher(); let cache; if ($$props.arcs === void 0 && $$bindings.arcs && arcs !== void 0) $$bindings.arcs(arcs); if ($$props.ship_change === void 0 && $$bindings.ship_change && ship_change !== void 0) $$bindings.ship_change(ship_change); cache = arcs.join(":"); { dispatch("change", {arcs: cache.split(":")}); } return ` ${validate_component(Arcs, "Arcs").$$render($$result, {selected: arcs}, {}, {})}`; }); var index_svelte_svelte_type_style_lang = ".weapon_row.svelte-1vypk50{display:flex;align-items:center}.weapon_row.svelte-1vypk50>*{margin-right:2em}"; const css$1 = { code: ".weapon_row.svelte-1vypk50{display:flex;align-items:center}.weapon_row.svelte-1vypk50>*{margin-right:2em}", map: `{"version":3,"file":"index.svelte","sources":["index.svelte"],"sourcesContent":["\\n\\n
\\n\\n \\n\\n\\n\\n
\\n
\\n\\n\\n\\n\\n"],"names":[],"mappings":"AAmHE,WAAW,eAAC,CAAC,AACX,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,MAAM,AACrB,CAAC,AAED,0BAAW,CAAW,CAAC,AAAE,CAAC,AACxB,YAAY,CAAE,GAAG,AACnB,CAAC"}` }; const Weapon = create_ssr_component(($$result, $$props, $$bindings, slots) => { const weapon_component = { beam: Beam, "submunition": Submunition, "pds": PointDefenceSystem, scattergun: Scattergun, needle: Needle }; let {weapon = {}} = $$props; let {id} = $$props; let {cost} = $$props; let {mass} = $$props; let {ship_change = getContext("ship_change") || (() => { })} = $$props; let weapon_type = weapon.weapon_type; if ($$props.weapon === void 0 && $$bindings.weapon && weapon !== void 0) $$bindings.weapon(weapon); if ($$props.id === void 0 && $$bindings.id && id !== void 0) $$bindings.id(id); if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); if ($$props.ship_change === void 0 && $$bindings.ship_change && ship_change !== void 0) $$bindings.ship_change(ship_change); $$result.css.add(css$1); return `${validate_component(ShipItem, "ShipItem").$$render($$result, {cost, mass}, {}, { default: () => `
${validate_component(weapon_component[weapon_type] || missing_component, "svelte:component").$$render($$result, Object.assign(weapon), {}, {})}
` })}`; }); const Squadron = create_ssr_component(($$result, $$props, $$bindings, slots) => { const types = squadron_types.map(({type: type2}) => type2); let {id = 1} = $$props; let {type = "standard"} = $$props; let {ftl: ftl2 = false} = $$props; let {cost = 0} = $$props; let {mass = 0} = $$props; let {ship_change = getContext("ship_change") || (() => { })} = $$props; if ($$props.id === void 0 && $$bindings.id && id !== void 0) $$bindings.id(id); if ($$props.type === void 0 && $$bindings.type && type !== void 0) $$bindings.type(type); if ($$props.ftl === void 0 && $$bindings.ftl && ftl2 !== void 0) $$bindings.ftl(ftl2); if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); if ($$props.ship_change === void 0 && $$bindings.ship_change && ship_change !== void 0) $$bindings.ship_change(ship_change); { ship_change(dux$3.actions.set_squadron({id, type})); } return `${validate_component(ShipItem, "ShipItem").$$render($$result, {cost, mass}, {}, { default: () => `${validate_component(Field, "Field").$$render($$result, {label: `squadron ${id}`}, {}, { default: () => `${each(types, (type2) => `${escape(type2)}`)}` })}` })}`; }); const Carrier = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {bays = 0} = $$props; let {squadrons = []} = $$props; let {cost = 0} = $$props; let {mass = 0} = $$props; let {ship_change = getContext("ship_change") || (() => { })} = $$props; if ($$props.bays === void 0 && $$bindings.bays && bays !== void 0) $$bindings.bays(bays); if ($$props.squadrons === void 0 && $$bindings.squadrons && squadrons !== void 0) $$bindings.squadrons(squadrons); if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); if ($$props.ship_change === void 0 && $$bindings.ship_change && ship_change !== void 0) $$bindings.ship_change(ship_change); { ship_change(dux$3.actions.set_carrier_bays(bays)); } return `${validate_component(Section, "Section").$$render($$result, {label: "carrier"}, {}, { default: () => `${validate_component(ShipItem, "ShipItem").$$render($$result, {cost, mass}, {}, { default: () => `${validate_component(Field, "Field").$$render($$result, {label: "bays"}, {}, { default: () => `` })}` })} ${each(squadrons, (squad) => `${validate_component(Squadron, "Squadron").$$render($$result, Object.assign(squad), {}, {})}`)}` })}`; }); const ADFC = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {rating = 0} = $$props; let {cost = 0} = $$props; let {mass = 0} = $$props; let {ship_change = getContext("ship_change") || (() => { })} = $$props; if ($$props.rating === void 0 && $$bindings.rating && rating !== void 0) $$bindings.rating(rating); if ($$props.cost === void 0 && $$bindings.cost && cost !== void 0) $$bindings.cost(cost); if ($$props.mass === void 0 && $$bindings.mass && mass !== void 0) $$bindings.mass(mass); if ($$props.ship_change === void 0 && $$bindings.ship_change && ship_change !== void 0) $$bindings.ship_change(ship_change); { ship_change(dux$1.actions.set_adfc(rating)); } return `${validate_component(ShipItem, "ShipItem").$$render($$result, {cost, mass}, {}, { default: () => `${validate_component(Field, "Field").$$render($$result, {label: "ADFC"}, {}, { default: () => `` })}` })}`; }); const AddWeapon = create_ssr_component(($$result, $$props, $$bindings, slots) => { let {weapon_type = "beam"} = $$props; let {ship_change = getContext("ship_change") || (() => { })} = $$props; if ($$props.weapon_type === void 0 && $$bindings.weapon_type && weapon_type !== void 0) $$bindings.weapon_type(weapon_type); if ($$props.ship_change === void 0 && $$bindings.ship_change && ship_change !== void 0) $$bindings.ship_change(ship_change); return `${validate_component(Field, "Field").$$render($$result, {label: "weapon type"}, {}, { default: () => ` ` })}`; }); var App_svelte_svelte_type_style_lang = "main.svelte-4zjur4.svelte-4zjur4{display:grid;grid-template-columns:1fr 14em 8em;width:60em;margin-left:auto;margin-right:auto}nav.svelte-4zjur4.svelte-4zjur4{grid-column:1 / span 3 !important;display:flex;width:60em;margin-left:auto;margin-right:auto;margin-bottom:1em}nav.svelte-4zjur4 .spacer.svelte-4zjur4{flex:1}main > *{grid-column:1}input.reset.svelte-4zjur4.svelte-4zjur4{grid-column:2}footer.svelte-4zjur4.svelte-4zjur4{width:var(--main-width);margin:0 auto;text-align:right}.notes.svelte-4zjur4.svelte-4zjur4{margin-right:2em}"; const css = { code: "main.svelte-4zjur4.svelte-4zjur4{display:grid;grid-template-columns:1fr 14em 8em;width:60em;margin-left:auto;margin-right:auto}nav.svelte-4zjur4.svelte-4zjur4{grid-column:1 / span 3 !important;display:flex;width:60em;margin-left:auto;margin-right:auto;margin-bottom:1em}nav.svelte-4zjur4 .spacer.svelte-4zjur4{flex:1}main > *{grid-column:1}input.reset.svelte-4zjur4.svelte-4zjur4{grid-column:2}footer.svelte-4zjur4.svelte-4zjur4{width:var(--main-width);margin:0 auto;text-align:right}.notes.svelte-4zjur4.svelte-4zjur4{margin-right:2em}", map: `{"version":3,"file":"App.svelte","sources":["App.svelte"],"sourcesContent":["
\\n\\n \\n\\n{#if show_notes}\\n\\n{/if}\\n\\n{#if output === 'json'}\\n set_output(null)}/>\\n {:else if output === 'print' }\\n \\n{:else}\\n\\n
\\n\\n \\n\\n \\n\\n \\n\\n
\\n \\n\\n \\n\\n \\n\\n {#each weapons as weapon (weapon.id)}\\n \\n {/each}\\n\\n
\\n\\n \\n\\n\\n
\\n \\n\\n{/if}\\n\\n\\n\\n"],"names":[],"mappings":"AA4IE,IAAI,4BAAC,CAAC,AACJ,OAAO,CAAE,IAAI,CACb,qBAAqB,CAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CACnC,KAAK,CAAE,IAAI,CACX,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,IAAI,AACpB,CAAC,AAED,GAAG,4BAAC,CAAC,AACH,WAAW,CAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAClC,OAAO,CAAE,IAAI,CACb,KAAK,CAAE,IAAI,CACX,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,IAAI,CAClB,aAAa,CAAE,GAAG,AACpB,CAAC,AAED,iBAAG,CAAC,OAAO,cAAC,CAAC,AACX,IAAI,CAAE,CAAC,AACT,CAAC,AAGO,QAAQ,AAAE,CAAC,AACjB,WAAW,CAAE,CAAC,AAChB,CAAC,AAED,KAAK,MAAM,4BAAC,CAAC,AACX,WAAW,CAAE,CAAC,AAChB,CAAC,AAED,MAAM,4BAAC,CAAC,AACN,KAAK,CAAE,IAAI,YAAY,CAAC,CACxB,MAAM,CAAE,CAAC,CAAC,IAAI,CACd,UAAU,CAAE,KAAK,AACnB,CAAC,AAED,MAAM,4BAAC,CAAC,AACN,YAAY,CAAE,GAAG,AACnB,CAAC"}` }; const App = create_ssr_component(($$result, $$props, $$bindings, slots) => { let $ship, $$unsubscribe_ship; const ship = shipStore(); $$unsubscribe_ship = subscribe(ship, (value) => $ship = value); setContext("ship", ship); $ship.general.name; let weapons2 = []; ship.dispatch.reset; setContext("ship_change", ship.dispatch); $$result.css.add(css); weapons2 = $ship.weaponry.weapons; { console.log(weapons2); } $$unsubscribe_ship(); return `${validate_component(Header, "Header").$$render($$result, {}, {}, {})} ${``} ${`${`
${validate_component(ShipSpecs, "ShipSpecs").$$render($$result, {}, {}, {})} ${validate_component(Propulsion, "Propulsion").$$render($$result, {ftl: $ship.ftl, engine: $ship.engine}, {}, {})} ${validate_component(Hull, "Hull").$$render($$result, Object.assign({ship_mass: $ship.general.mass}, $ship.structure.hull, {screens: $ship.structure.screens}, {armour: $ship.structure.armour}, {cargo: $ship.cargo}, {streamlining: $ship.streamlining}), {}, {})} ${validate_component(Section, "Section").$$render($$result, {label: "weaponry"}, {}, { default: () => `${validate_component(Firecons, "Firecons").$$render($$result, Object.assign($ship.weaponry.firecons), {}, {})} ${validate_component(ADFC, "ADFC").$$render($$result, Object.assign($ship.weaponry.adfc), {}, {})} ${validate_component(AddWeapon, "AddWeapon").$$render($$result, {}, {}, {})} ${each(weapons2, (weapon) => `${validate_component(Weapon, "Weapon").$$render($$result, { weapon, id: weapon.id, cost: weapon.cost, mass: weapon.mass }, {}, {})}`)}` })} ${validate_component(Carrier, "Carrier").$$render($$result, Object.assign($ship.carrier), {}, {})}
`}`}`; }); const Routes = create_ssr_component(($$result, $$props, $$bindings, slots) => { return `${validate_component(App, "App").$$render($$result, {}, {}, {})}`; }); var index = /* @__PURE__ */ Object.freeze({ __proto__: null, [Symbol.toStringTag]: "Module", "default": Routes }); export {init, render};