@elite-dangerous-almanac/core 0.1.0-beta.9 → 0.1.2
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/PROVENANCE/i18n/SOURCES.md +71 -12
- package/PROVENANCE/ships/SOURCES.md +74 -48
- package/README.md +34 -2
- package/THIRD_PARTY_NOTICES.md +3 -3
- package/dist/astro/codex-region-lookup.js +1 -1
- package/dist/astro/codex-region.js +1 -1
- package/dist/astro/galaxy-grid.js +1 -1
- package/dist/astro/index.js +1 -1
- package/dist/astro/mass-code.js +1 -1
- package/dist/astro/naming-region-origins.js +1 -1
- package/dist/astro/nebulae.js +1 -1
- package/dist/astro/permit-locked-regions.js +1 -1
- package/dist/astro/permit-locked-systems.js +1 -1
- package/dist/astro/permit-locks.js +1 -1
- package/dist/astro/procedural-system.js +1 -1
- package/dist/astro/sector-name.js +1 -1
- package/dist/astro/system-address-input.js +1 -1
- package/dist/astro/system-address.js +1 -1
- package/dist/astro/system-name.js +1 -1
- package/dist/{chunk-KQDJTDLV.js → chunk-2J2UV4ZX.js} +1 -1
- package/dist/{chunk-DB54PH3X.js → chunk-6EPYVBAX.js} +1 -1
- package/dist/{chunk-U6TMCYA6.js → chunk-6EUVIZAS.js} +1 -1
- package/dist/chunk-6RLMBSXE.js +1 -0
- package/dist/chunk-6RLMBSXE.js.map +1 -0
- package/dist/{chunk-NWPK6Q3S.js → chunk-ADLVPKUV.js} +1 -1
- package/dist/{chunk-S4DBNX2B.js → chunk-BKWLI44T.js} +1 -1
- package/dist/chunk-BMM6GQAU.js +1 -0
- package/dist/chunk-BMM6GQAU.js.map +1 -0
- package/dist/{chunk-WV5YM7H5.js → chunk-BMT3U46U.js} +1 -1
- package/dist/chunk-CTJQPQRA.js +1 -0
- package/dist/{chunk-NSSWYRHN.js.map → chunk-CTJQPQRA.js.map} +1 -1
- package/dist/chunk-DAQ3PJ4R.js +1 -0
- package/dist/chunk-DAQ3PJ4R.js.map +1 -0
- package/dist/{chunk-BTPV5CIF.js → chunk-DI5RXSJR.js} +1 -1
- package/dist/{chunk-YDBRGW4G.js → chunk-DLLBARN5.js} +1 -1
- package/dist/{chunk-J2PNZQY4.js → chunk-DVL5RBKX.js} +1 -1
- package/dist/{chunk-VXVUEF5U.js → chunk-E3BRVGJJ.js} +1 -1
- package/dist/{chunk-MFV4VZFP.js → chunk-EBAHNZ36.js} +1 -1
- package/dist/{chunk-BSOIPL4A.js → chunk-EJMNNQIS.js} +1 -1
- package/dist/{chunk-BSOIPL4A.js.map → chunk-EJMNNQIS.js.map} +1 -1
- package/dist/{chunk-QF3NYGUJ.js → chunk-EKWLAHRG.js} +1 -1
- package/dist/chunk-EU42PAV4.js +1 -0
- package/dist/{chunk-32PVERNH.js.map → chunk-EU42PAV4.js.map} +1 -1
- package/dist/{chunk-Q22LXT53.js → chunk-FEER4ERG.js} +1 -1
- package/dist/{chunk-G3AMKCOE.js → chunk-FGNJ7EVM.js} +1 -1
- package/dist/{chunk-JWJ7RSZC.js → chunk-G3265B27.js} +1 -1
- package/dist/chunk-GKDEI2SQ.js +1 -0
- package/dist/chunk-GKDEI2SQ.js.map +1 -0
- package/dist/chunk-GOMBLS2T.js +1 -0
- package/dist/chunk-GOMBLS2T.js.map +1 -0
- package/dist/{chunk-V3DW67W2.js → chunk-GRIK3EDH.js} +1 -1
- package/dist/chunk-H3HMVGEY.js +1 -0
- package/dist/chunk-H3HMVGEY.js.map +1 -0
- package/dist/{chunk-UXZJMZEU.js → chunk-HRVIHQ4A.js} +1 -1
- package/dist/{chunk-QTDBO7R2.js → chunk-IYU4WLFM.js} +1 -1
- package/dist/{chunk-5EUX3L76.js → chunk-JWWYAMGD.js} +1 -1
- package/dist/chunk-KAA4VOOB.js +1 -0
- package/dist/chunk-KAA4VOOB.js.map +1 -0
- package/dist/{chunk-ZFT56QFR.js → chunk-L7CLUYZ6.js} +1 -1
- package/dist/{chunk-4AE22CHV.js → chunk-M5IBENCW.js} +1 -1
- package/dist/chunk-M5IBENCW.js.map +1 -0
- package/dist/{chunk-IH4NXKVW.js → chunk-NEEFT7WH.js} +1 -1
- package/dist/{chunk-VZXL5KBR.js → chunk-NLBUKXNV.js} +1 -1
- package/dist/{chunk-4OSCSACF.js → chunk-OCND33TO.js} +1 -1
- package/dist/{chunk-PMJG7PHU.js → chunk-PHPLZEFS.js} +1 -1
- package/dist/chunk-PKWVG2JY.js +1 -0
- package/dist/chunk-PKWVG2JY.js.map +1 -0
- package/dist/chunk-PNZCLQDJ.js +1 -0
- package/dist/{chunk-53ERRGPM.js.map → chunk-PNZCLQDJ.js.map} +1 -1
- package/dist/{chunk-DACZE3HX.js → chunk-POZTXBSN.js} +1 -1
- package/dist/chunk-Q4E2V6RE.js +1 -0
- package/dist/chunk-Q4E2V6RE.js.map +1 -0
- package/dist/{chunk-DNTN34M4.js → chunk-QI22FKBG.js} +1 -1
- package/dist/chunk-QTZPA2FR.js +1 -0
- package/dist/{chunk-TH4S5MVD.js.map → chunk-QTZPA2FR.js.map} +1 -1
- package/dist/{chunk-MNXWK7PA.js → chunk-R26GVRMI.js} +1 -1
- package/dist/{chunk-I7PIDRMU.js → chunk-RAO35XDF.js} +1 -1
- package/dist/chunk-TFPIPIMU.js +1 -0
- package/dist/chunk-TFPIPIMU.js.map +1 -0
- package/dist/chunk-TLA6LHLN.js +1 -0
- package/dist/{chunk-V4C6FIE2.js.map → chunk-TLA6LHLN.js.map} +1 -1
- package/dist/{chunk-JYQE53FL.js → chunk-TMMGS6TC.js} +1 -1
- package/dist/{chunk-ZAHNOQGG.js → chunk-UBYO7VZR.js} +1 -1
- package/dist/{chunk-Z4GTTB7I.js → chunk-UXBCLFGU.js} +1 -1
- package/dist/{chunk-RKLJ7EEE.js → chunk-UXFMVZAY.js} +1 -1
- package/dist/chunk-VB3XZGIB.js +1 -0
- package/dist/chunk-VB3XZGIB.js.map +1 -0
- package/dist/chunk-VKN65H2U.js +1 -0
- package/dist/chunk-VKN65H2U.js.map +1 -0
- package/dist/chunk-VSNS7Y3M.js +1 -0
- package/dist/chunk-VSNS7Y3M.js.map +1 -0
- package/dist/{chunk-MPZGCTRG.js → chunk-VZZUNSDF.js} +1 -1
- package/dist/chunk-VZZUNSDF.js.map +1 -0
- package/dist/{chunk-ZJB5UYNE.js → chunk-W5G2NUCZ.js} +1 -1
- package/dist/{chunk-ZJB5UYNE.js.map → chunk-W5G2NUCZ.js.map} +1 -1
- package/dist/{chunk-IJRKEODR.js → chunk-WNGQ3IAM.js} +1 -1
- package/dist/{chunk-VARPO47V.js → chunk-XN6Q7LWU.js} +1 -1
- package/dist/chunk-XT6KKGSE.js +1 -0
- package/dist/chunk-XT6KKGSE.js.map +1 -0
- package/dist/{chunk-KMFUCORC.js → chunk-Y6UZWNP4.js} +1 -1
- package/dist/{chunk-QMQHIZGS.js → chunk-YU5GND2Q.js} +1 -1
- package/dist/chunk-YU5GND2Q.js.map +1 -0
- package/dist/commodities/commodities.js +1 -1
- package/dist/commodities/index.js +1 -1
- package/dist/equipment/index.js +1 -1
- package/dist/equipment/modification-costs.js +1 -1
- package/dist/equipment/modification-journal.js +1 -1
- package/dist/equipment/modifications.js +1 -1
- package/dist/equipment/suits.js +1 -1
- package/dist/equipment/upgrade-costs.js +1 -1
- package/dist/equipment/weapons.js +1 -1
- package/dist/i18n/blueprints.js +1 -1
- package/dist/i18n/diagnostics.d.ts +62 -0
- package/dist/i18n/diagnostics.js +1 -0
- package/dist/i18n/diagnostics.js.map +1 -0
- package/dist/i18n/engineering-groups.d.ts +20 -0
- package/dist/i18n/engineering-groups.js +1 -0
- package/dist/i18n/engineering-groups.js.map +1 -0
- package/dist/i18n/experimental-effect-descriptions.d.ts +20 -0
- package/dist/i18n/experimental-effect-descriptions.js +1 -0
- package/dist/i18n/experimental-effect-descriptions.js.map +1 -0
- package/dist/i18n/experimental-effects.js +1 -1
- package/dist/i18n/index.d.ts +27 -0
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/materials.js +1 -1
- package/dist/i18n/micro-resources.js +1 -1
- package/dist/i18n/modules.js +1 -1
- package/dist/i18n/pre-engineered.d.ts +39 -0
- package/dist/i18n/pre-engineered.js +1 -0
- package/dist/i18n/pre-engineered.js.map +1 -0
- package/dist/i18n/ships.d.ts +36 -0
- package/dist/i18n/ships.js +1 -0
- package/dist/i18n/ships.js.map +1 -0
- package/dist/i18n/slots.d.ts +42 -0
- package/dist/i18n/slots.js +1 -0
- package/dist/i18n/slots.js.map +1 -0
- package/dist/materials/index.js +1 -1
- package/dist/materials/materials-all.js +1 -1
- package/dist/materials/materials.js +1 -1
- package/dist/materials/micro-resources-all.js +1 -1
- package/dist/materials/micro-resources.js +1 -1
- package/dist/ships/blueprint-costs.d.ts +13 -11
- package/dist/ships/blueprint-costs.js +1 -1
- package/dist/ships/blueprint-costs.js.map +1 -1
- package/dist/ships/blueprint-journal.d.ts +6 -7
- package/dist/ships/blueprint-journal.js +1 -1
- package/dist/ships/blueprints.js +1 -1
- package/dist/ships/default-loadouts.js +1 -1
- package/dist/ships/engineering-options.d.ts +28 -29
- package/dist/ships/engineering-options.js +1 -1
- package/dist/ships/experimental-effect-costs.js +1 -1
- package/dist/ships/experimental-effects.js +1 -1
- package/dist/ships/gunsights.js +1 -1
- package/dist/ships/heat.d.ts +22 -0
- package/dist/ships/heat.js +1 -1
- package/dist/ships/index.d.ts +6 -5
- package/dist/ships/index.js +1 -1
- package/dist/ships/loadout-calculations.d.ts +21 -11
- package/dist/ships/loadout-calculations.js +1 -1
- package/dist/ships/loadout-validation.d.ts +7 -6
- package/dist/ships/loadout-validation.js +1 -1
- package/dist/ships/modules-all.js +1 -1
- package/dist/ships/modules-hardpoint.js +1 -1
- package/dist/ships/modules-internal.js +1 -1
- package/dist/ships/modules.d.ts +5 -5
- package/dist/ships/modules.js +1 -1
- package/dist/ships/power.d.ts +39 -11
- package/dist/ships/power.js +1 -1
- package/dist/ships/pre-engineered-stats.d.ts +20 -4
- package/dist/ships/pre-engineered-stats.js +1 -1
- package/dist/ships/pre-engineered.d.ts +7 -8
- package/dist/ships/pre-engineered.js +1 -1
- package/dist/ships/shield-recovery.d.ts +12 -6
- package/dist/ships/shield-recovery.js +1 -1
- package/dist/ships/ship-loadout.d.ts +1793 -19
- package/dist/ships/ship-loadout.js +1 -1
- package/dist/ships/ships.js +1 -1
- package/dist/ships/slef.js +1 -1
- package/dist/ships/slots.js +1 -1
- package/dist/ships/source-purchase.js +1 -1
- package/package.json +26 -2
- package/dist/chunk-32PVERNH.js +0 -1
- package/dist/chunk-4AE22CHV.js.map +0 -1
- package/dist/chunk-4WC5NHBJ.js +0 -1
- package/dist/chunk-4WC5NHBJ.js.map +0 -1
- package/dist/chunk-53ERRGPM.js +0 -1
- package/dist/chunk-5W43EQEQ.js +0 -1
- package/dist/chunk-5W43EQEQ.js.map +0 -1
- package/dist/chunk-76XKY2Y2.js +0 -1
- package/dist/chunk-76XKY2Y2.js.map +0 -1
- package/dist/chunk-B5TT26XE.js +0 -1
- package/dist/chunk-B5TT26XE.js.map +0 -1
- package/dist/chunk-BYBT5XSW.js +0 -1
- package/dist/chunk-BYBT5XSW.js.map +0 -1
- package/dist/chunk-KLIYDSYF.js +0 -1
- package/dist/chunk-KLIYDSYF.js.map +0 -1
- package/dist/chunk-MPZGCTRG.js.map +0 -1
- package/dist/chunk-NSSWYRHN.js +0 -1
- package/dist/chunk-QMQHIZGS.js.map +0 -1
- package/dist/chunk-RF2IKLWQ.js +0 -1
- package/dist/chunk-RF2IKLWQ.js.map +0 -1
- package/dist/chunk-TH4S5MVD.js +0 -1
- package/dist/chunk-V4C6FIE2.js +0 -1
- package/dist/ship-loadout-BsfKbvKe.d.ts +0 -1455
- /package/dist/{chunk-KQDJTDLV.js.map → chunk-2J2UV4ZX.js.map} +0 -0
- /package/dist/{chunk-DB54PH3X.js.map → chunk-6EPYVBAX.js.map} +0 -0
- /package/dist/{chunk-U6TMCYA6.js.map → chunk-6EUVIZAS.js.map} +0 -0
- /package/dist/{chunk-NWPK6Q3S.js.map → chunk-ADLVPKUV.js.map} +0 -0
- /package/dist/{chunk-S4DBNX2B.js.map → chunk-BKWLI44T.js.map} +0 -0
- /package/dist/{chunk-WV5YM7H5.js.map → chunk-BMT3U46U.js.map} +0 -0
- /package/dist/{chunk-BTPV5CIF.js.map → chunk-DI5RXSJR.js.map} +0 -0
- /package/dist/{chunk-YDBRGW4G.js.map → chunk-DLLBARN5.js.map} +0 -0
- /package/dist/{chunk-J2PNZQY4.js.map → chunk-DVL5RBKX.js.map} +0 -0
- /package/dist/{chunk-VXVUEF5U.js.map → chunk-E3BRVGJJ.js.map} +0 -0
- /package/dist/{chunk-MFV4VZFP.js.map → chunk-EBAHNZ36.js.map} +0 -0
- /package/dist/{chunk-QF3NYGUJ.js.map → chunk-EKWLAHRG.js.map} +0 -0
- /package/dist/{chunk-Q22LXT53.js.map → chunk-FEER4ERG.js.map} +0 -0
- /package/dist/{chunk-G3AMKCOE.js.map → chunk-FGNJ7EVM.js.map} +0 -0
- /package/dist/{chunk-JWJ7RSZC.js.map → chunk-G3265B27.js.map} +0 -0
- /package/dist/{chunk-V3DW67W2.js.map → chunk-GRIK3EDH.js.map} +0 -0
- /package/dist/{chunk-UXZJMZEU.js.map → chunk-HRVIHQ4A.js.map} +0 -0
- /package/dist/{chunk-QTDBO7R2.js.map → chunk-IYU4WLFM.js.map} +0 -0
- /package/dist/{chunk-5EUX3L76.js.map → chunk-JWWYAMGD.js.map} +0 -0
- /package/dist/{chunk-ZFT56QFR.js.map → chunk-L7CLUYZ6.js.map} +0 -0
- /package/dist/{chunk-IH4NXKVW.js.map → chunk-NEEFT7WH.js.map} +0 -0
- /package/dist/{chunk-VZXL5KBR.js.map → chunk-NLBUKXNV.js.map} +0 -0
- /package/dist/{chunk-4OSCSACF.js.map → chunk-OCND33TO.js.map} +0 -0
- /package/dist/{chunk-PMJG7PHU.js.map → chunk-PHPLZEFS.js.map} +0 -0
- /package/dist/{chunk-DACZE3HX.js.map → chunk-POZTXBSN.js.map} +0 -0
- /package/dist/{chunk-DNTN34M4.js.map → chunk-QI22FKBG.js.map} +0 -0
- /package/dist/{chunk-MNXWK7PA.js.map → chunk-R26GVRMI.js.map} +0 -0
- /package/dist/{chunk-I7PIDRMU.js.map → chunk-RAO35XDF.js.map} +0 -0
- /package/dist/{chunk-JYQE53FL.js.map → chunk-TMMGS6TC.js.map} +0 -0
- /package/dist/{chunk-ZAHNOQGG.js.map → chunk-UBYO7VZR.js.map} +0 -0
- /package/dist/{chunk-Z4GTTB7I.js.map → chunk-UXBCLFGU.js.map} +0 -0
- /package/dist/{chunk-RKLJ7EEE.js.map → chunk-UXFMVZAY.js.map} +0 -0
- /package/dist/{chunk-IJRKEODR.js.map → chunk-WNGQ3IAM.js.map} +0 -0
- /package/dist/{chunk-VARPO47V.js.map → chunk-XN6Q7LWU.js.map} +0 -0
- /package/dist/{chunk-KMFUCORC.js.map → chunk-Y6UZWNP4.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
export{LoadoutEditError,ShipLoadout}from"../chunk-
|
|
1
|
+
export{LoadoutEditError,ShipLoadout}from"../chunk-VSNS7Y3M.js"; //# sourceMappingURL=ship-loadout.js.map
|
package/dist/ships/ships.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SHIPS,getShipByName,getShipBySymbol,getShipSlots}from"../chunk-
|
|
1
|
+
export{SHIPS,getShipByName,getShipBySymbol,getShipSlots}from"../chunk-WNGQ3IAM.js"; //# sourceMappingURL=ships.js.map
|
package/dist/ships/slef.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{getLoadoutModifier,inspectSlef,parseSlef,stringifySlef,toSlef}from"../chunk-
|
|
1
|
+
export{getLoadoutModifier,inspectSlef,parseSlef,stringifySlef,toSlef}from"../chunk-UXFMVZAY.js"; //# sourceMappingURL=slef.js.map
|
package/dist/ships/slots.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SLOT_RESTRICTION_LABELS,enumerateSlots,parseSlotName}from"../chunk-
|
|
1
|
+
export{SLOT_RESTRICTION_LABELS,enumerateSlots,parseSlotName}from"../chunk-RAO35XDF.js"; //# sourceMappingURL=slots.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{getSourceModuleValue,sourcePurchaseFromLoadout,sumSourceModuleValues}from"../chunk-
|
|
1
|
+
export{getSourceModuleValue,sourcePurchaseFromLoadout,sumSourceModuleValues}from"../chunk-IYU4WLFM.js"; //# sourceMappingURL=source-purchase.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elite-dangerous-almanac/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Elite Dangerous static data and calculations: astronomy, ships and outfitting, personal equipment and engineering, materials, and market commodities.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -195,6 +195,18 @@
|
|
|
195
195
|
"types": "./dist/i18n/experimental-effects.d.ts",
|
|
196
196
|
"import": "./dist/i18n/experimental-effects.js"
|
|
197
197
|
},
|
|
198
|
+
"./i18n/experimental-effect-descriptions": {
|
|
199
|
+
"types": "./dist/i18n/experimental-effect-descriptions.d.ts",
|
|
200
|
+
"import": "./dist/i18n/experimental-effect-descriptions.js"
|
|
201
|
+
},
|
|
202
|
+
"./i18n/engineering-groups": {
|
|
203
|
+
"types": "./dist/i18n/engineering-groups.d.ts",
|
|
204
|
+
"import": "./dist/i18n/engineering-groups.js"
|
|
205
|
+
},
|
|
206
|
+
"./i18n/diagnostics": {
|
|
207
|
+
"types": "./dist/i18n/diagnostics.d.ts",
|
|
208
|
+
"import": "./dist/i18n/diagnostics.js"
|
|
209
|
+
},
|
|
198
210
|
"./i18n/internal/*": null,
|
|
199
211
|
"./i18n/materials": {
|
|
200
212
|
"types": "./dist/i18n/materials.d.ts",
|
|
@@ -208,6 +220,18 @@
|
|
|
208
220
|
"types": "./dist/i18n/modules.d.ts",
|
|
209
221
|
"import": "./dist/i18n/modules.js"
|
|
210
222
|
},
|
|
223
|
+
"./i18n/pre-engineered": {
|
|
224
|
+
"types": "./dist/i18n/pre-engineered.d.ts",
|
|
225
|
+
"import": "./dist/i18n/pre-engineered.js"
|
|
226
|
+
},
|
|
227
|
+
"./i18n/ships": {
|
|
228
|
+
"types": "./dist/i18n/ships.d.ts",
|
|
229
|
+
"import": "./dist/i18n/ships.js"
|
|
230
|
+
},
|
|
231
|
+
"./i18n/slots": {
|
|
232
|
+
"types": "./dist/i18n/slots.d.ts",
|
|
233
|
+
"import": "./dist/i18n/slots.js"
|
|
234
|
+
},
|
|
211
235
|
"./materials": {
|
|
212
236
|
"types": "./dist/materials/index.d.ts",
|
|
213
237
|
"import": "./dist/materials/index.js"
|
|
@@ -436,7 +460,7 @@
|
|
|
436
460
|
"test": "node --experimental-test-coverage --test-coverage-include=\"src/internal/**/*.ts\" --test-coverage-include=\"src/astro/**/*.ts\" --test-coverage-include=\"src/materials/**/*.ts\" --test-coverage-include=\"src/equipment/**/*.ts\" --test-coverage-include=\"src/i18n/**/*.ts\" --test-coverage-include=\"src/ships/**/*.ts\" --test-coverage-include=\"src/commodities/**/*.ts\" --test-coverage-exclude=\"src/**/*.test.ts\" --test-coverage-lines=80 --test-coverage-branches=80 --test-coverage-functions=80 --import tsx --import ./scripts/register-jsonc.mjs --test \"src/**/*.test.ts\"",
|
|
437
461
|
"typecheck": "tsc --noEmit",
|
|
438
462
|
"docs": "typedoc && node scripts/build-wiki-sidebar.mjs && node scripts/postprocess-wiki.mjs",
|
|
439
|
-
"check:examples": "node --test scripts/example-claims.test.mjs scripts/example-runtime.test.mjs && node scripts/check-examples.mjs
|
|
463
|
+
"check:examples": "node --test scripts/example-claims.test.mjs scripts/example-runtime.test.mjs && node scripts/check-examples.mjs",
|
|
440
464
|
"test:package": "node --test package.test.mjs"
|
|
441
465
|
},
|
|
442
466
|
"devDependencies": {
|
package/dist/chunk-32PVERNH.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{filterByKey}from"./chunk-S4DBNX2B.js";import{requireStringIfPresent}from"./chunk-B5TT26XE.js";import{deepFreeze}from"./chunk-DURKO7JU.js";var pre_engineered_default=[{symbol:"Hpt_Mining_AbrBlstr_Fixed_Small",name:"Abrasion Blaster",blueprint:"AbrasionBlaster_FarReaching",grade:1,acquisition:"mercenary",mercCoinCost:400},{symbol:"Hpt_CausticMissile_Fixed_Medium",name:"Enzyme Missile Rack",blueprint:"EnzymeMissileRack_HighYield",grade:1,acquisition:"mercenary",mercCoinCost:850},{symbol:"Hpt_Slugshot_Gimbal_Small",name:"Fragment Cannon",blueprint:"FragmentCannonSmall_DoubleScreaming",grade:1,acquisition:"mercenary",mercCoinCost:800},{symbol:"Hpt_Slugshot_Gimbal_Large",name:"Fragment Cannon",blueprint:"FragmentCannonLarge_DoubleScreaming",grade:1,acquisition:"mercenary",mercCoinCost:950},{symbol:"Hpt_MiningLaser_Fixed_Small",name:"Mining Laser",blueprint:"MiningLaser_LongRange",grade:1,acquisition:"mercenary",mercCoinCost:450},{symbol:"Hpt_MultiCannon_Fixed_Medium",name:"Multi-Cannon",blueprint:"MultiCannon_Rapid",grade:1,acquisition:"mercenary",mercCoinCost:850},{symbol:"Hpt_Railgun_Fixed_Medium",name:"Rail Gun",blueprint:"RailGun_LongShot",grade:1,acquisition:"mercenary",mercCoinCost:950},{symbol:"Hpt_BasicMissileRack_Fixed_Medium",name:"Seeker Missile Rack",blueprint:"SeekerMissileRack_Drag",grade:1,acquisition:"mercenary",mercCoinCost:800},{symbol:"Hpt_BasicMissileRack_Fixed_Large",name:"Seeker Missile Rack",blueprint:"SeekerMissileRack_Drag",grade:1,acquisition:"mercenary",mercCoinCost:900},{symbol:"Hpt_BasicMissileRack_Fixed_Medium",name:"Seeker Missile Rack",blueprint:"SeekerMissileRack_LightWeightThermal",grade:1,acquisition:"mercenary",mercCoinCost:800},{symbol:"Hpt_BasicMissileRack_Fixed_Medium",name:"Seeker Missile Rack",blueprint:"SeekerMissileRackMedium_Lockdown",grade:1,acquisition:"mercenary",mercCoinCost:800},{symbol:"Hpt_BasicMissileRack_Fixed_Large",name:"Seeker Missile Rack",blueprint:"SeekerMissileRackLarge_Lockdown",grade:1,acquisition:"mercenary",mercCoinCost:900},{symbol:"Int_CargoRack_Size5_Class1",name:"Cargo Rack",blueprint:"CargoRackS5C1_Extended",grade:1,acquisition:"mercenary",mercCoinCost:550},{symbol:"Int_CargoRack_Size6_Class1",name:"Cargo Rack",blueprint:"CargoRackS6C1_Extended",grade:1,acquisition:"mercenary",mercCoinCost:550},{symbol:"Int_DetailedSurfaceScanner_Tiny",name:"Detailed Surface Scanner",blueprint:"DetailedSurfaceScanner_LongRange",grade:1,acquisition:"mercenary",mercCoinCost:350},{symbol:"Int_ModuleReinforcement_Size5_Class2",name:"Module Reinforcement Package",blueprint:"ModuleReinforcement_HeavyDuty",grade:1,acquisition:"mercenary",mercCoinCost:450},{symbol:"Int_PowerDistributor_Size3_Class2",name:"Power Distributor",blueprint:"PowerDistributorS3C2_SupportFocused",grade:1,acquisition:"mercenary",mercCoinCost:300},{symbol:"Int_PowerDistributor_Size3_Class5",name:"Power Distributor",blueprint:"PowerDistributorS3C5_SupportFocused",grade:1,acquisition:"mercenary",mercCoinCost:350},{symbol:"Int_PowerDistributor_Size4_Class2",name:"Power Distributor",blueprint:"PowerDistributorS4C2_SupportFocused",grade:1,acquisition:"mercenary",mercCoinCost:400},{symbol:"Int_PowerDistributor_Size4_Class5",name:"Power Distributor",blueprint:"PowerDistributorS4C5_SupportFocused",grade:1,acquisition:"mercenary",mercCoinCost:450},{symbol:"Int_PowerDistributor_Size5_Class5",name:"Power Distributor",blueprint:"PowerDistributor_Balanced",grade:1,acquisition:"mercenary",mercCoinCost:500},{symbol:"Int_PowerDistributor_Size6_Class5",name:"Power Distributor",blueprint:"PowerDistributorS6C5_SupportFocused",grade:1,acquisition:"mercenary",mercCoinCost:550},{symbol:"Hpt_Mining_AbrBlstr_Fixed_Small",name:"Abrasion Blaster",blueprint:"Weapon_LongRange",grade:5,acquisition:"communityGoal",modifiers:[{label:"DistributorDraw",method:"multiplicative",value:-.5},{label:"FalloffRange",method:"multiplicative",value:4},{label:"Integrity",method:"multiplicative",value:-.5},{label:"MaximumRange",method:"multiplicative",value:4},{label:"PowerDraw",method:"multiplicative",value:-.5},{label:"ThermalLoad",method:"multiplicative",value:-.5}]},{symbol:"Hpt_CausticMissile_Fixed_Medium",name:"Enzyme Missile Rack",blueprint:"Weapon_HighCapacity",grade:5,acquisition:"communityGoal",modifiers:[{label:"AmmoClipSize",method:"multiplicative",value:.75},{label:"AmmoMaximum",method:"multiplicative",value:.25},{label:"Damage",method:"multiplicative",value:.5},{label:"Mass",method:"multiplicative",value:.6},{label:"PowerDraw",method:"multiplicative",value:.2}]},{symbol:"Hpt_Slugshot_Gimbal_Small",name:"Fragment Cannon",blueprint:"Weapon_DoubleShot",grade:5,acquisition:"communityGoal",experimental:"special_screening_shell",modifiers:[{label:"AmmoClipSize",method:"multiplicative",value:1.6667},{label:"AmmoMaximum",method:"multiplicative",value:.67776},{label:"BurstInterval",method:"multiplicative",value:-.06},{label:"BurstSize",method:"overwrite",value:2},{label:"Mass",method:"multiplicative",value:.6},{label:"MaximumRange",method:"multiplicative",value:-.1},{label:"PowerDraw",method:"multiplicative",value:.2}]},{symbol:"Hpt_Slugshot_Gimbal_Large",name:"Fragment Cannon",blueprint:"Weapon_DoubleShot",grade:5,acquisition:"communityGoal",experimental:"special_screening_shell",modifiers:[{label:"AmmoClipSize",method:"multiplicative",value:1.6667},{label:"AmmoMaximum",method:"multiplicative",value:.67776},{label:"BurstInterval",method:"multiplicative",value:-.06},{label:"BurstSize",method:"overwrite",value:2},{label:"Mass",method:"multiplicative",value:.6},{label:"MaximumRange",method:"multiplicative",value:-.1},{label:"PowerDraw",method:"multiplicative",value:.2}]},{symbol:"Hpt_Guardian_ShardCannon_Fixed_Medium",name:"Guardian Shard Cannon",blueprint:"Weapon_LongRange",grade:5,acquisition:"communityGoal",engineeringLocked:true,modifiers:[{label:"ArmourPenetration",method:"multiplicative",value:1.02},{label:"DistributorDraw",method:"multiplicative",value:5.05},{label:"Jitter",method:"additive",value:-3.5},{label:"Mass",method:"multiplicative",value:.5},{label:"MaximumRange",method:"multiplicative",value:4},{label:"PowerDraw",method:"multiplicative",value:1.3},{label:"ShotSpeed",method:"overwrite",value:1258.89},{label:"ThermalLoad",method:"multiplicative",value:15.5}]},{symbol:"Hpt_MultiCannon_Fixed_Medium",name:"Multi-Cannon",blueprint:"Weapon_RapidFire",grade:1,acquisition:"communityGoal",experimental:"special_phasing_sequence",modifiers:[{label:"AmmoClipSize",method:"multiplicative",value:3},{label:"AmmoMaximum",method:"overwrite",value:6400},{label:"BurstInterval",method:"overwrite",value:.1},{label:"FalloffRange",method:"multiplicative",value:-.1},{label:"Jitter",method:"additive",value:3},{label:"MaximumRange",method:"multiplicative",value:-.5},{label:"RoundsPerShot",method:"additive",value:2}]},{symbol:"Hpt_Railgun_Fixed_Medium",name:"Rail Gun",blueprint:"Weapon_HighCapacity",grade:5,acquisition:"communityGoal",experimental:"special_feedback_cascade_cooled",modifiers:[{label:"AmmoClipSize",method:"multiplicative",value:1},{label:"AmmoMaximum",method:"multiplicative",value:1},{label:"BurstInterval",method:"multiplicative",value:-.61145},{label:"FalloffRange",method:"multiplicative",value:5},{label:"Mass",method:"multiplicative",value:.9},{label:"MaximumRange",method:"multiplicative",value:1},{label:"PowerDraw",method:"multiplicative",value:.65},{label:"ReloadTime",method:"multiplicative",value:.25}]},{symbol:"Hpt_Railgun_Fixed_Medium_Burst",name:"Imperial Hammer Rail Gun",blueprint:"Weapon_HighCapacity",grade:5,acquisition:"communityGoal",experimental:"special_super_penetrator",modifiers:[{label:"AmmoClipSize",method:"multiplicative",value:1},{label:"AmmoMaximum",method:"multiplicative",value:1},{label:"BurstInterval",method:"multiplicative",value:-.2635},{label:"Damage",method:"multiplicative",value:-.2},{label:"Mass",method:"multiplicative",value:.7},{label:"PowerDraw",method:"multiplicative",value:.25}]},{symbol:"Hpt_BasicMissileRack_Fixed_Medium",name:"Seeker Missile Rack",blueprint:"Weapon_HighCapacity",grade:1,acquisition:"communityGoal",experimental:"special_drag_munitions",modifiers:[{label:"AmmoClipSize",method:"multiplicative",value:2},{label:"AmmoMaximum",method:"multiplicative",value:2},{label:"BurstInterval",method:"multiplicative",value:-.2},{label:"DistributorDraw",method:"overwrite",value:.34},{label:"Mass",method:"multiplicative",value:1.5},{label:"PowerDraw",method:"multiplicative",value:.25}]},{symbol:"Hpt_BasicMissileRack_Fixed_Medium",name:"Seeker Missile Rack",blueprint:"Weapon_HighCapacity",grade:5,acquisition:"communityGoal",experimental:"special_fsd_interrupt",modifiers:[{label:"AmmoClipSize",method:"multiplicative",value:1},{label:"AmmoMaximum",method:"multiplicative",value:1},{label:"ArmourPenetration",method:"multiplicative",value:.4},{label:"BurstInterval",method:"multiplicative",value:-.1},{label:"Damage",method:"multiplicative",value:.35},{label:"Integrity",method:"multiplicative",value:1},{label:"Mass",method:"multiplicative",value:1.2},{label:"PowerDraw",method:"multiplicative",value:.3},{label:"ThermalLoad",method:"multiplicative",value:-.1}]},{symbol:"Hpt_BasicMissileRack_Fixed_Large",name:"Seeker Missile Rack",blueprint:"Weapon_HighCapacity",grade:5,acquisition:"communityGoal",experimental:"special_fsd_interrupt",modifiers:[{label:"AmmoClipSize",method:"multiplicative",value:1},{label:"AmmoMaximum",method:"multiplicative",value:1},{label:"ArmourPenetration",method:"multiplicative",value:.4},{label:"BurstInterval",method:"multiplicative",value:-.1},{label:"Damage",method:"multiplicative",value:.35},{label:"Integrity",method:"multiplicative",value:1},{label:"Mass",method:"multiplicative",value:1.2},{label:"PowerDraw",method:"multiplicative",value:.3},{label:"ThermalLoad",method:"multiplicative",value:-.1}]},{symbol:"Hpt_ElectronicCountermeasure_Tiny",name:"Electronic Countermeasure",blueprint:"Misc_LightWeight",grade:5,acquisition:"communityGoal",modifiers:[{label:"Integrity",method:"multiplicative",value:1},{label:"Mass",method:"multiplicative",value:-.85},{label:"PowerDraw",method:"multiplicative",value:1}]},{symbol:"Hpt_CrimeScanner_Size0_Class5",name:"Kill Warrant Scanner",blueprint:"Sensor_FastScan",grade:5,acquisition:"communityGoal",modifiers:[{label:"Integrity",method:"multiplicative",value:-.5},{label:"MaxAngle",method:"multiplicative",value:-.3},{label:"PowerDraw",method:"multiplicative",value:.5},{label:"ScannerRange",method:"multiplicative",value:.65},{label:"ScannerTimeToScan",method:"multiplicative",value:-.8}]},{symbol:"Hpt_CrimeScanner_Size0_Class3",name:"Kill Warrant Scanner",blueprint:"Sensor_FastScan",grade:5,acquisition:"communityGoal",modifiers:[{label:"Integrity",method:"multiplicative",value:-.5},{label:"MaxAngle",method:"multiplicative",value:-.3},{label:"PowerDraw",method:"multiplicative",value:.5},{label:"ScannerRange",method:"multiplicative",value:.65},{label:"ScannerTimeToScan",method:"multiplicative",value:-.8}]},{symbol:"Hpt_PlasmaPointDefence_Turret_Tiny",name:"Point Defence",blueprint:"Misc_LightWeight",grade:5,acquisition:"communityGoal",modifiers:[{label:"Integrity",method:"multiplicative",value:-.5},{label:"Mass",method:"multiplicative",value:-.85},{label:"MaximumRange",method:"multiplicative",value:1},{label:"ThermalLoad",method:"multiplicative",value:.05}]},{symbol:"Int_PowerDistributor_Size3_Class5",name:"Power Distributor",blueprint:"PowerDistributor_PrioritySystems",grade:5,acquisition:"communityGoal",modifiers:[{label:"EnginesCapacity",method:"multiplicative",value:.45},{label:"EnginesRecharge",method:"multiplicative",value:.4},{label:"SystemsCapacity",method:"multiplicative",value:.45},{label:"SystemsRecharge",method:"multiplicative",value:.4},{label:"WeaponsCapacity",method:"multiplicative",value:-.25},{label:"WeaponsRecharge",method:"multiplicative",value:-.2}]},{symbol:"Int_PowerDistributor_Size3_Class2",name:"Power Distributor",blueprint:"PowerDistributor_PrioritySystems",grade:5,acquisition:"communityGoal",modifiers:[{label:"EnginesCapacity",method:"multiplicative",value:.45},{label:"EnginesRecharge",method:"multiplicative",value:.4},{label:"SystemsCapacity",method:"multiplicative",value:.45},{label:"SystemsRecharge",method:"multiplicative",value:.4},{label:"WeaponsCapacity",method:"multiplicative",value:-.25},{label:"WeaponsRecharge",method:"multiplicative",value:-.2}]},{symbol:"Int_PowerDistributor_Size4_Class5",name:"Power Distributor",blueprint:"PowerDistributor_PrioritySystems",grade:5,acquisition:"communityGoal",modifiers:[{label:"EnginesCapacity",method:"multiplicative",value:.45},{label:"EnginesRecharge",method:"multiplicative",value:.4},{label:"SystemsCapacity",method:"multiplicative",value:.45},{label:"SystemsRecharge",method:"multiplicative",value:.4},{label:"WeaponsCapacity",method:"multiplicative",value:-.25},{label:"WeaponsRecharge",method:"multiplicative",value:-.2}]},{symbol:"Int_PowerDistributor_Size4_Class2",name:"Power Distributor",blueprint:"PowerDistributor_PrioritySystems",grade:5,acquisition:"communityGoal",modifiers:[{label:"EnginesCapacity",method:"multiplicative",value:.45},{label:"EnginesRecharge",method:"multiplicative",value:.4},{label:"SystemsCapacity",method:"multiplicative",value:.45},{label:"SystemsRecharge",method:"multiplicative",value:.4},{label:"WeaponsCapacity",method:"multiplicative",value:-.25},{label:"WeaponsRecharge",method:"multiplicative",value:-.2}]},{symbol:"Int_PowerDistributor_Size6_Class5",name:"Power Distributor",blueprint:"PowerDistributor_PrioritySystems",grade:5,acquisition:"communityGoal",modifiers:[{label:"EnginesCapacity",method:"multiplicative",value:.45},{label:"EnginesRecharge",method:"multiplicative",value:.4},{label:"SystemsCapacity",method:"multiplicative",value:.45},{label:"SystemsRecharge",method:"multiplicative",value:.4},{label:"WeaponsCapacity",method:"multiplicative",value:-.25},{label:"WeaponsRecharge",method:"multiplicative",value:-.2}]},{symbol:"Int_Powerplant_Size3_Class5",name:"Power Plant",blueprint:"PowerPlant_Armoured",grade:5,acquisition:"communityGoal",modifiers:[{label:"HeatEfficiency",method:"multiplicative",value:.13},{label:"Integrity",method:"multiplicative",value:.95},{label:"Mass",method:"multiplicative",value:.2},{label:"PowerCapacity",method:"multiplicative",value:.52}]},{symbol:"Int_Powerplant_Size3_Class5",name:"Power Plant",blueprint:"PowerPlant_Boosted",grade:5,acquisition:"communityGoal",modifiers:[{label:"HeatEfficiency",method:"multiplicative",value:.35},{label:"Integrity",method:"multiplicative",value:-.3},{label:"PowerCapacity",method:"multiplicative",value:.6}]},{symbol:"Int_Powerplant_Size4_Class5",name:"Power Plant",blueprint:"PowerPlant_Boosted",grade:5,acquisition:"communityGoal",modifiers:[{label:"HeatEfficiency",method:"multiplicative",value:.35},{label:"Integrity",method:"multiplicative",value:-.3},{label:"PowerCapacity",method:"multiplicative",value:.6}]},{symbol:"Int_Powerplant_Size5_Class5",name:"Power Plant",blueprint:"PowerPlant_Boosted",grade:5,acquisition:"communityGoal",modifiers:[{label:"HeatEfficiency",method:"multiplicative",value:.35},{label:"Integrity",method:"overwrite",value:74},{label:"PowerCapacity",method:"multiplicative",value:.6}]},{symbol:"Int_Hyperdrive_Size3_Class5",name:"Frame Shift Drive",blueprint:"FSD_LongRange",grade:5,acquisition:"communityGoal",modifiers:[{label:"BootTime",method:"multiplicative",value:-.8},{label:"FSDHeatRate",method:"multiplicative",value:.2},{label:"FSDOptimalMass",method:"multiplicative",value:.7},{label:"Integrity",method:"multiplicative",value:-.3},{label:"Mass",method:"multiplicative",value:.3},{label:"PowerDraw",method:"multiplicative",value:.15}]},{symbol:"Int_Hyperdrive_Size4_Class5",name:"Frame Shift Drive",blueprint:"FSD_LongRange",grade:5,acquisition:"communityGoal",modifiers:[{label:"BootTime",method:"multiplicative",value:-.8},{label:"FSDHeatRate",method:"multiplicative",value:.2},{label:"FSDOptimalMass",method:"multiplicative",value:.7},{label:"Integrity",method:"multiplicative",value:-.3},{label:"Mass",method:"multiplicative",value:.3},{label:"PowerDraw",method:"multiplicative",value:.15}]},{symbol:"Int_Hyperdrive_Size6_Class5",name:"Frame Shift Drive",blueprint:"FSD_LongRange",grade:5,acquisition:"communityGoal",modifiers:[{label:"BootTime",method:"multiplicative",value:-.8},{label:"FSDHeatRate",method:"multiplicative",value:.2},{label:"FSDOptimalMass",method:"multiplicative",value:.7},{label:"Integrity",method:"multiplicative",value:-.3},{label:"Mass",method:"multiplicative",value:.3},{label:"PowerDraw",method:"multiplicative",value:.15}]},{symbol:"Int_CargoRack_Size5_Class1",name:"Cargo Rack",blueprint:"CargoRack_IncreasedCapacity",grade:5,acquisition:"communityGoal",modifiers:[{label:"CargoCapacity",method:"multiplicative",value:.34375}]},{symbol:"Int_CargoRack_Size6_Class1",name:"Cargo Rack",blueprint:"CargoRack_IncreasedCapacity",grade:5,acquisition:"communityGoal",modifiers:[{label:"CargoCapacity",method:"multiplicative",value:.34375}]},{symbol:"Int_ShieldGenerator_Size3_Class5",name:"Shield Generator",blueprint:"ShieldGenerator_Kinetic",grade:5,acquisition:"communityGoal",modifiers:[{label:"Integrity",method:"multiplicative",value:.2},{label:"KineticResistance",method:"additive",value:.18},{label:"PowerDraw",method:"multiplicative",value:.4},{label:"ThermicResistance",method:"additive",value:.42}]},{symbol:"Hpt_ATDumbfireMissile_Fixed_Medium",name:"AX Missile Rack",blueprint:"Weapon_HighCapacity",grade:5,acquisition:"techBroker",modifiers:[{label:"AmmoClipSize",method:"multiplicative",value:1},{label:"AmmoMaximum",method:"multiplicative",value:1},{label:"BurstInterval",method:"multiplicative",value:-.3},{label:"Damage",method:"multiplicative",value:-.03},{label:"DistributorDraw",method:"multiplicative",value:-.2},{label:"Jitter",method:"additive",value:.5},{label:"Mass",method:"multiplicative",value:.7},{label:"PowerDraw",method:"multiplicative",value:.2},{label:"ReloadTime",method:"multiplicative",value:-.45}]},{symbol:"Hpt_ATDumbfireMissile_Fixed_Large",name:"AX Missile Rack",blueprint:"Weapon_HighCapacity",grade:5,acquisition:"techBroker",modifiers:[{label:"AmmoClipSize",method:"multiplicative",value:1},{label:"AmmoMaximum",method:"multiplicative",value:1},{label:"BurstInterval",method:"multiplicative",value:-.3},{label:"Damage",method:"multiplicative",value:-.03},{label:"DistributorDraw",method:"multiplicative",value:-.2},{label:"Jitter",method:"additive",value:.5},{label:"Mass",method:"multiplicative",value:.7},{label:"PowerDraw",method:"multiplicative",value:.2},{label:"ReloadTime",method:"multiplicative",value:-.45}]},{symbol:"Hpt_ATMultiCannon_Gimbal_Medium",name:"Enhanced AX Multi-Cannon",blueprint:"MC_Overcharged",grade:5,acquisition:"techBroker",experimental:"special_auto_loader",modifiers:[{label:"Damage",method:"multiplicative",value:.1},{label:"PowerDraw",method:"multiplicative",value:.75},{label:"ThermalLoad",method:"multiplicative",value:3}]},{symbol:"Hpt_ATMultiCannon_Gimbal_Large",name:"Enhanced AX Multi-Cannon",blueprint:"MC_Overcharged",grade:5,acquisition:"techBroker",experimental:"special_auto_loader",modifiers:[{label:"Damage",method:"multiplicative",value:.1},{label:"PowerDraw",method:"multiplicative",value:.75},{label:"ThermalLoad",method:"multiplicative",value:3}]},{symbol:"Hpt_Guardian_GaussCannon_Fixed_Small",name:"Guardian Gauss Cannon",blueprint:"Weapon_RapidFire",grade:1,acquisition:"techBroker",engineeringLocked:true,modifiers:[{label:"AmmoClipSize",method:"multiplicative",value:3},{label:"AmmoMaximum",method:"multiplicative",value:4},{label:"BurstInterval",method:"multiplicative",value:-.38237},{label:"BurstRateOfFire",method:"overwrite",value:10},{label:"BurstSize",method:"overwrite",value:4},{label:"Damage",method:"multiplicative",value:-.75214},{label:"DistributorDraw",method:"multiplicative",value:-.75},{label:"FalloffRange",method:"multiplicative",value:-.2},{label:"ThermalLoad",method:"multiplicative",value:-.75}]},{symbol:"Hpt_Guardian_GaussCannon_Fixed_Medium",name:"Guardian Gauss Cannon",blueprint:"Weapon_RapidFire",grade:1,acquisition:"techBroker",engineeringLocked:true,modifiers:[{label:"AmmoClipSize",method:"multiplicative",value:3},{label:"AmmoMaximum",method:"multiplicative",value:4},{label:"BurstInterval",method:"multiplicative",value:-.38237},{label:"BurstRateOfFire",method:"overwrite",value:10},{label:"BurstSize",method:"overwrite",value:4},{label:"Damage",method:"multiplicative",value:-.75214},{label:"DistributorDraw",method:"multiplicative",value:-.75},{label:"FalloffRange",method:"multiplicative",value:-.2},{label:"ThermalLoad",method:"multiplicative",value:-.75}]},{symbol:"Hpt_Guardian_PlasmaLauncher_Fixed_Small",name:"Guardian Plasma Charger",blueprint:"Weapon_Overcharged",grade:1,acquisition:"techBroker",engineeringLocked:true,modifiers:[{label:"AmmoClipSize",method:"overwrite",value:20},{label:"ArmourPenetration",method:"multiplicative",value:.375},{label:"Damage",method:"multiplicative",value:.66},{label:"PowerDraw",method:"multiplicative",value:.3239},{label:"ShotSpeed",method:"multiplicative",value:4},{label:"ThermalLoad",method:"multiplicative",value:.5}]},{symbol:"Hpt_Guardian_PlasmaLauncher_Fixed_Medium",name:"Guardian Plasma Charger",blueprint:"Weapon_Overcharged",grade:1,acquisition:"techBroker",engineeringLocked:true,modifiers:[{label:"AmmoClipSize",method:"overwrite",value:20},{label:"ArmourPenetration",method:"multiplicative",value:.375},{label:"Damage",method:"multiplicative",value:.66},{label:"PowerDraw",method:"multiplicative",value:.3239},{label:"ShotSpeed",method:"multiplicative",value:4},{label:"ThermalLoad",method:"multiplicative",value:.5}]},{symbol:"Hpt_Guardian_ShardCannon_Fixed_Small",name:"Guardian Shard Cannon",blueprint:"Weapon_LongRange",grade:1,acquisition:"techBroker",engineeringLocked:true,modifiers:[{label:"ArmourPenetration",method:"multiplicative",value:1.02},{label:"DistributorDraw",method:"multiplicative",value:4.2769},{label:"FalloffRange",method:"overwrite",value:1500},{label:"Jitter",method:"additive",value:-3.5},{label:"Mass",method:"multiplicative",value:.5},{label:"MaximumRange",method:"overwrite",value:3e3},{label:"PowerDraw",method:"multiplicative",value:1.3},{label:"ShotSpeed",method:"overwrite",value:3568.6},{label:"ThermalLoad",method:"multiplicative",value:15.5}]},{symbol:"Hpt_Guardian_ShardCannon_Fixed_Medium",name:"Guardian Shard Cannon",blueprint:"Weapon_LongRange",grade:1,acquisition:"techBroker",engineeringLocked:true,modifiers:[{label:"ArmourPenetration",method:"multiplicative",value:1.02},{label:"DistributorDraw",method:"overwrite",value:3.43},{label:"FalloffRange",method:"overwrite",value:1500},{label:"Jitter",method:"additive",value:-3.5},{label:"Mass",method:"multiplicative",value:.5},{label:"MaximumRange",method:"overwrite",value:3e3},{label:"PowerDraw",method:"multiplicative",value:1.3},{label:"ShotSpeed",method:"overwrite",value:6299.209},{label:"ThermalLoad",method:"multiplicative",value:15.5}]},{symbol:"Hpt_MiningLaser_Fixed_Small",name:"Mining Laser",blueprint:"Weapon_LongRange",grade:5,acquisition:"techBroker",experimental:"special_incendiary_rounds",modifiers:[{label:"Damage",method:"multiplicative",value:-.05},{label:"DistributorDraw",method:"multiplicative",value:-.5},{label:"FalloffRange",method:"multiplicative",value:7.3333},{label:"Integrity",method:"multiplicative",value:-.5},{label:"MaximumRange",method:"multiplicative",value:4},{label:"PowerDraw",method:"multiplicative",value:-.5},{label:"ThermalLoad",method:"multiplicative",value:-.83}]},{symbol:"Hpt_BasicMissileRack_Fixed_Medium",name:"Seeker Missile Rack",blueprint:"Weapon_HighCapacity",grade:5,acquisition:"techBroker",experimental:"special_thermal_cascade",modifiers:[{label:"AmmoClipSize",method:"multiplicative",value:1},{label:"AmmoMaximum",method:"multiplicative",value:1},{label:"BurstInterval",method:"multiplicative",value:-.1},{label:"DistributorDraw",method:"multiplicative",value:-.4},{label:"Integrity",method:"multiplicative",value:-.6},{label:"Mass",method:"multiplicative",value:-.9},{label:"PowerDraw",method:"multiplicative",value:-.2}]},{symbol:"Hpt_HeatSinkLauncher_Turret_Tiny",name:"Heat Sink Launcher",blueprint:"Misc_HeatSinkCapacity",grade:1,acquisition:"techBroker",modifiers:[{label:"AmmoMaximum",method:"multiplicative",value:1},{label:"ReloadTime",method:"multiplicative",value:.75}]},{symbol:"Int_Hyperdrive_Size5_Class5",name:"Frame Shift Drive",blueprint:"FSD_LongRange",grade:5,acquisition:"techBroker",modifiers:[{label:"BootTime",method:"multiplicative",value:-.8},{label:"FSDHeatRate",method:"multiplicative",value:.2},{label:"FSDOptimalMass",method:"multiplicative",value:.7},{label:"Integrity",method:"multiplicative",value:-.3},{label:"Mass",method:"multiplicative",value:.3},{label:"PowerDraw",method:"multiplicative",value:.15}]},{symbol:"Int_Hyperdrive_Overcharge_Size2_Class5",name:"Frame Shift Drive (SCO)",blueprint:"FSD_LongRange",grade:5,acquisition:"techBroker",modifiers:[{label:"BootTime",method:"multiplicative",value:-.8},{label:"FSDHeatRate",method:"multiplicative",value:.2},{label:"FSDOptimalMass",method:"multiplicative",value:.7},{label:"Integrity",method:"multiplicative",value:-.3},{label:"Mass",method:"multiplicative",value:.3},{label:"PowerDraw",method:"multiplicative",value:.15}]},{symbol:"Int_Hyperdrive_Overcharge_Size3_Class5",name:"Frame Shift Drive (SCO)",blueprint:"FSD_LongRange",grade:5,acquisition:"techBroker",modifiers:[{label:"BootTime",method:"multiplicative",value:-.8},{label:"FSDHeatRate",method:"multiplicative",value:.2},{label:"FSDOptimalMass",method:"multiplicative",value:.7},{label:"Integrity",method:"multiplicative",value:-.3},{label:"Mass",method:"multiplicative",value:.3},{label:"PowerDraw",method:"multiplicative",value:.15}]},{symbol:"Int_Hyperdrive_Overcharge_Size4_Class5",name:"Frame Shift Drive (SCO)",blueprint:"FSD_LongRange",grade:5,acquisition:"techBroker",modifiers:[{label:"BootTime",method:"multiplicative",value:-.8},{label:"FSDHeatRate",method:"multiplicative",value:.2},{label:"FSDOptimalMass",method:"multiplicative",value:.7},{label:"Integrity",method:"multiplicative",value:-.3},{label:"Mass",method:"multiplicative",value:.3},{label:"PowerDraw",method:"multiplicative",value:.15}]},{symbol:"Int_Hyperdrive_Overcharge_Size5_Class5",name:"Frame Shift Drive (SCO)",blueprint:"FSD_LongRange",grade:5,acquisition:"techBroker",modifiers:[{label:"BootTime",method:"multiplicative",value:-.8},{label:"FSDHeatRate",method:"multiplicative",value:.2},{label:"FSDOptimalMass",method:"multiplicative",value:.7},{label:"Integrity",method:"multiplicative",value:-.3},{label:"Mass",method:"multiplicative",value:.3},{label:"PowerDraw",method:"multiplicative",value:.15}]},{symbol:"Int_Hyperdrive_Overcharge_Size6_Class5",name:"Frame Shift Drive (SCO)",blueprint:"FSD_LongRange",grade:5,acquisition:"techBroker",modifiers:[{label:"BootTime",method:"multiplicative",value:-.8},{label:"FSDHeatRate",method:"multiplicative",value:.2},{label:"FSDOptimalMass",method:"multiplicative",value:.7},{label:"Integrity",method:"multiplicative",value:-.3},{label:"Mass",method:"multiplicative",value:.3},{label:"PowerDraw",method:"multiplicative",value:.15}]},{symbol:"Int_Hyperdrive_Overcharge_Size7_Class5",name:"Frame Shift Drive (SCO)",blueprint:"FSD_LongRange",grade:5,acquisition:"techBroker",modifiers:[{label:"BootTime",method:"multiplicative",value:-.8},{label:"FSDHeatRate",method:"multiplicative",value:.2},{label:"FSDOptimalMass",method:"multiplicative",value:.7},{label:"Integrity",method:"multiplicative",value:-.3},{label:"Mass",method:"multiplicative",value:.3},{label:"PowerDraw",method:"multiplicative",value:.15}]},{symbol:"Int_DetailedSurfaceScanner_Tiny",name:"Detailed Surface Scanner",blueprint:"Sensor_Expanded",grade:5,acquisition:"techBroker",modifiers:[{label:"DSS_PatchRadius",method:"multiplicative",value:1}]},{symbol:"Hpt_FlakMortar_Turret_Medium",name:"Festive Green Remote Release Flak Launcher",blueprint:"Decorative_Green",grade:5,acquisition:"eventReward",modifiers:[{label:"Damage",method:"multiplicative",value:-.99}]},{symbol:"Hpt_FlakMortar_Turret_Medium",name:"Festive Red Remote Release Flak Launcher",blueprint:"Decorative_Red",grade:5,acquisition:"eventReward",modifiers:[{label:"Damage",method:"multiplicative",value:-.99}]},{symbol:"Hpt_FlakMortar_Turret_Medium",name:"Festive Yellow Remote Release Flak Launcher",blueprint:"Decorative_Yellow",grade:5,acquisition:"eventReward",modifiers:[{label:"Damage",method:"multiplicative",value:-.99}]}];var PRE_ENGINEERED_MODULES=deepFreeze(pre_engineered_default);function getPreEngineeredVariants(symbol){return filterByKey(PRE_ENGINEERED_MODULES,"symbol",symbol,"getPreEngineeredVariants: symbol")}function isPreEngineered(symbol){requireStringIfPresent(symbol,"isPreEngineered: symbol");return getPreEngineeredVariants(symbol).length>0}export{PRE_ENGINEERED_MODULES,getPreEngineeredVariants,isPreEngineered};//# sourceMappingURL=chunk-32PVERNH.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/i18n/internal/localized-name.ts"],"names":["normalizeKey","CATALOGUE_KEY","findInKeyIndex","requireString","CANONICAL_LOCALE","Object","freeze","en","de","es","fr","hu","it","ka","pt","ru","canonicalLocale","locale","hasOwn","localeCandidates","label","normalized","trim","replaceAll","toLowerCase","startsWith","exact","language","split","createLocalizedNameIndex","names","index","create","identifier","name","entries","key","createDeduplicatedLocalizedNameIndex","catalogue","nameKey","nameKeys","selectLocalizedName","functionName","candidates","candidate","getLocalizedName","identifierName","record"],"mappings":"O,mHA4BA,IAAMI,iBAA8DC,OAAOC,OAAO,CAC9EC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJ,QAAS,QACTC,GAAI,KACJ,QAAS,UAIb,SAASC,gBAAgBC,QACrB,OAAOZ,OAAOa,OAAOd,iBAAkBa,QAAUb,iBAAiBa,aAAU,CAChF,CAMA,SAASE,iBAAiBF,OAAgBG,OACtC,MAAMC,WAAalB,cAAcc,OAAQG,OAAOE,OAAOC,WAAW,IAAK,KAAKC,cAC5E,GAAIH,aAAe,MAAQA,aAAe,WAAaA,WAAWI,WAAW,YAAa,CACtF,MAAO,CAAC,QACZ,CACA,GAAIJ,WAAWI,WAAW,QAAUJ,aAAe,QAAA,MAAgB,GACnE,MAAMK,MAAQV,gBAAgBK,YAC9B,MAAMM,SAAWX,gBAAgBK,WAAWO,MAAM,IAAK,GAAG,IAC1D,GAAIF,aAAU,EAAW,OAAOC,gBAAa,EAAY,GAAK,CAACA,UAC/D,OAAOA,gBAAa,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B52N6S.js";import{CONSUMABLE_MICRO_RESOURCES}from"./chunk-K7L7SMIR.js";var ALL_MICRO_RESOURCES=Object.freeze([...COMPONENT_MICRO_RESOURCES,...CONSUMABLE_MICRO_RESOURCES,...DATA_MICRO_RESOURCES,...ITEM_MICRO_RESOURCES]);export{ALL_MICRO_RESOURCES};//# sourceMappingURL=chunk-4WC5NHBJ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/materials/micro-resources-all.ts"],"names":["DATA_MICRO_RESOURCES","ITEM_MICRO_RESOURCES","COMPONENT_MICRO_RESOURCES","CONSUMABLE_MICRO_RESOURCES","ALL_MICRO_RESOURCES","Object","freeze"],"mappings":"O,4NA6BO,IAAMI,oBAAgDC,OAAOC,OAAO,IACpEJ,6BACAC,8BACAH,wBACAC,8BACNG"}
|
package/dist/chunk-53ERRGPM.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{CORE_MODULES}from"./chunk-O72KI7RP.js";import{HARDPOINT_MODULES}from"./chunk-BSOIPL4A.js";import{INTERNAL_MODULES}from"./chunk-NSSWYRHN.js";import{UTILITY_MODULES}from"./chunk-3IMWUYXJ.js";var ALL_MODULES=Object.freeze([...CORE_MODULES,...INTERNAL_MODULES,...HARDPOINT_MODULES,...UTILITY_MODULES]);export{ALL_MODULES};//# sourceMappingURL=chunk-53ERRGPM.js.map
|
package/dist/chunk-5W43EQEQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{calculateModuleLimits}from"./chunk-KPETDYQX.js";import{truncate}from"./chunk-B5TT26XE.js";function validateLoadout(input){const issues=[];const seen=/* @__PURE__ */new Map;for(const module of input.modules){const normalized=module.slot.toLowerCase();const previous=seen.get(normalized);if(previous!==void 0){issues.push({code:"duplicateSlot",severity:"error",slot:module.slot,symbol:module.symbol,params:{slot:module.slot,previousSlot:previous,symbol:module.symbol},message:`Slot ${truncate(module.slot)} occurs more than once (also ${truncate(previous)})`})}else{seen.set(normalized,module.slot)}}const exclusive=/* @__PURE__ */new Map;for(const module of input.modules){if(!module.exclusionGroup)continue;const previous=exclusive.get(module.exclusionGroup);if(previous){issues.push({code:"duplicateExclusiveModule",severity:"error",slot:module.slot,symbol:module.symbol,params:{exclusionGroup:module.exclusionGroup,slot:module.slot,symbol:module.symbol,previousSlot:previous.slot,previousSymbol:previous.symbol},message:`${truncate(module.slot)}: ${truncate(module.symbol)} conflicts with ${truncate(previous.symbol)} in ${truncate(previous.slot)} (${module.exclusionGroup} is limited to one per ship)`})}else{exclusive.set(module.exclusionGroup,module)}}for(const usage of calculateModuleLimits(input.modules)){if(usage.excess===0)continue;issues.push({code:"moduleLimitExceeded",severity:"error",params:{group:usage.group,count:usage.count,limit:usage.limit},message:`${usage.group} has ${usage.count} fitted modules but the ship allows ${usage.limit}`})}if(input.slots===null){issues.push({code:"unknownHull",severity:"incomplete",message:`No slot layout is known for hull ${truncate(input.shipSymbol)}`,params:{shipSymbol:input.shipSymbol}})}else{const knownSlots=new Map(input.slots.map(slot=>[slot.key.toLowerCase(),slot]));for(const module of input.modules){if(module.requiresKnownSlot!==false&&!knownSlots.has(module.slot.toLowerCase())){issues.push({code:"unknownSlot",severity:"error",slot:module.slot,symbol:module.symbol,message:`${truncate(module.slot)} is not a slot on ${truncate(input.shipSymbol)}`,params:{shipSymbol:input.shipSymbol,slot:module.slot,symbol:module.symbol}})}}for(const slot of input.slots){if((slot.kind==="core"||slot.kind==="armour")&&!seen.has(slot.key.toLowerCase())){issues.push({code:"missingRequiredSlot",severity:"incomplete",slot:slot.key,message:`${truncate(slot.key)} is required for an operational build`,params:{slot:slot.key}})}}}for(const module of input.modules){if(!module.known){issues.push({code:"unknownModule",severity:"incomplete",slot:module.slot,symbol:module.symbol,message:`${truncate(module.slot)}: ${truncate(module.symbol)} is not in the module catalogue`,params:{slot:module.slot,symbol:module.symbol}})}else if(module.fitError!==null){issues.push({code:"incompatibleModule",severity:"error",slot:module.slot,symbol:module.symbol,message:`${truncate(module.slot)}: ${truncate(module.symbol)} ${truncate(module.fitError)}`,params:{...module.fitParams,slot:module.slot,symbol:module.symbol,constraint:module.fitConstraint??"unknownConstraint"}})}}const frozen=Object.freeze(issues.map(issue=>Object.freeze({...issue,...issue.params?{params:Object.freeze(Object.fromEntries(Object.entries(issue.params).map(([key,value])=>[key,Array.isArray(value)?Object.freeze([...value]):value])))}:{}})));return Object.freeze({valid:!issues.some(issue=>issue.severity==="error"),complete:issues.length===0,issues:frozen})}export{validateLoadout};//# sourceMappingURL=chunk-5W43EQEQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ships/loadout-validation.ts"],"names":["calculateModuleLimits","truncate","validateLoadout","input","issues","seen","Map","module","modules","normalized","slot","toLowerCase","previous","get","push","code","severity","symbol","params","previousSlot","message","set","exclusive","exclusionGroup","previousSymbol","usage","excess","group","count","limit","slots","shipSymbol","knownSlots","map","key","requiresKnownSlot","has","kind","known","fitError","fitParams","constraint","fitConstraint","frozen","Object","freeze","issue","fromEntries","entries","value","Array","isArray","valid","some","complete","length"],"mappings":"O,0FAqIO,SAASE,gBAAgBC,OAC5B,MAAMC,OAAyB,GAC/B,MAAMC,oBAAA,IAAWC,IACjB,IAAA,MAAWC,UAAUJ,MAAMK,QAAS,CAChC,MAAMC,WAAaF,OAAOG,KAAKC,cAC/B,MAAMC,SAAWP,KAAKQ,IAAIJ,YAC1B,GAAIG,gBAAa,EAAW,CACxBR,OAAOU,KAAK,CACRC,KAAM,gBACNC,SAAU,QACVN,KAAMH,OAAOG,KACbO,OAAQV,OAAOU,OACfC,OAAQ,CAAER,KAAMH,OAAOG,KAAMS,aAAcP,SAAUK,OAAQV,OAAOU,QACpEG,QAAS,QAAQnB,SAASM,OAAOG,qCAAqCT,SAASW,cAEvF,KAAO,CACHP,KAAKgB,IAAIZ,WAAYF,OAAOG,KAChC,CACJ,CAEA,MAAMY,yBAAA,IAAgBhB,IACtB,IAAA,MAAWC,UAAUJ,MAAMK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C/Cf,IACAgB,MAAMC,QAAQF,OAASL,OAAOC,OAAO,IAAII,QAAUA,WAKnE,CAAA,MAIlB,OAAOL,OAAOC,OAAO,CACjBO,OAAQhD,OAAOiD,KAAMP,OAAUA,MAAM9B,WAAa,SAClDsC,SAAUlD,OAAOmD,SAAW,EAC5BnD,OAAQuC,QAEhB,QAAAzC"}
|
package/dist/chunk-76XKY2Y2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var PRIORITY_GROUPS=5;var EPSILON=1e-9;function bandIndex(priority){if(priority===void 0||!Number.isFinite(priority))return 0;return Math.min(PRIORITY_GROUPS,Math.max(1,Math.trunc(priority)))-1}function powerBudget(available,consumers){if(!Number.isFinite(available)||available<0){throw new RangeError("powerBudget: available power must be a finite non-negative number")}const retractedByBand=Array(PRIORITY_GROUPS).fill(0);const deployedByBand=Array(PRIORITY_GROUPS).fill(0);const unknownDraws=[];for(const consumer of consumers){if(consumer.enabled===false)continue;if(consumer.drawUnknown){unknownDraws.push(consumer);continue}const draw=consumer.draw;if(draw===void 0||!Number.isFinite(draw)||draw<0){throw new RangeError("powerBudget: consumer draw must be a finite non-negative number")}if(draw===0)continue;const index=bandIndex(consumer.priority);if(consumer.deployedOnly)deployedByBand[index]+=draw;else retractedByBand[index]+=draw}const bands=[];let retractedTotal=0;let deployedTotal=0;for(let i=0;i<PRIORITY_GROUPS;i++){const retracted=retractedByBand[i];const deployed=deployedByBand[i];retractedTotal+=retracted;deployedTotal+=retracted+deployed;bands.push({priority:i+1,retracted:retracted,deployed:retracted+deployed,retractedTotal:retractedTotal,deployedTotal:deployedTotal,poweredRetracted:retractedTotal<=available+EPSILON,poweredDeployed:deployedTotal<=available+EPSILON})}return{available:available,retracted:retractedTotal,deployed:deployedTotal,headroom:available-deployedTotal,utilisation:available>0?deployedTotal/available:deployedTotal>0?Infinity:0,withinBudget:deployedTotal<=available+EPSILON,bands:bands,unknownDraws:unknownDraws}}export{powerBudget};//# sourceMappingURL=chunk-76XKY2Y2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ships/power.ts"],"names":["PRIORITY_GROUPS","EPSILON","bandIndex","priority","Number","isFinite","Math","min","max","trunc","powerBudget","available","consumers","RangeError","retractedByBand","Array","fill","deployedByBand","unknownDraws","consumer","enabled","drawUnknown","push","draw","index","deployedOnly","bands","retractedTotal","deployedTotal","i","retracted","deployed","poweredRetracted","poweredDeployed","headroom","utilisation","Infinity","withinBudget"],"mappings":"AAoCA,IAAMA,gBAAkB,EAOxB,IAAMC,QAAU,KAyGhB,SAASC,UAAUC,UACf,GAAIA,gBAAa,IAAcC,OAAOC,SAASF,UAAW,OAAO,EACjE,OAAOG,KAAKC,IAAIP,gBAAiBM,KAAKE,IAAI,EAAGF,KAAKG,MAAMN,YAAc,CAC1E,CAkCO,SAASO,YAAYC,UAAmBC,WAC3C,IAAKR,OAAOC,SAASM,YAAcA,UAAY,EAAG,CAC9C,MAAM,IAAIE,WAAW,oEACzB,CAEA,MAAMC,gBAAkBC,MAAcf,iBAAiBgB,KAAK,GAC5D,MAAMC,eAAiBF,MAAcf,iBAAiBgB,KAAK,GAC3D,MAAME,aAAgC,GAEtC,IAAA,MAAWC,YAAYP,UAAW,CAC9B,GAAIO,SAASC,UAAY,MAAO,SAChC,GAAID,SAASE,YAAa,CAGtBH,aAAaI,KAAKH,UAClB,QACJ,CACA,MAAMI,KAAOJ,SAASI,KACtB,GAAIA,YAAS,IAAcnB,OAAOC,SAASkB,OAASA,KAAO,EAAG,CAC1D,MAAM,IAAIV,WAAW,kEACzB,CACA,GAAIU,OAAS,EAAG,SAChB,MAAMC,MAAQtB,UAAUiB,SAAShB,UACjC,GAAIgB,SAASM,aAAcR,eAAeO,QAAWD,UAChDT,gBAAgBU,QAAWD,IACpC,CAEA,MAAMG,MAAqB,GAC3B,IAAIC,eAAiB,EACrB,IAAIC,cAAgB,EACpB,IAAA,IAASC,EAAI,EAAGA,EAAI7B,gBAAiB6B,IAAK,CACtC,MAAMC,UAAYhB,gBAAgBe,GAClC,MAAME,SAAWd,eAAeY,GAChCF,gBAAkBG,UAElBF,eAAiBE,UAAYC,SAC7BL,MAAMJ,KAAK,CACPnB,SAAU0B,EAAI,EACdC,oBAEAC,SAAUD,UAAYC,SACtBJ,8BACAC,4BACAI,iBAAkBL,gBAAkBhB,UAAYV,QAChDgC,gBAAiBL,eAAiBjB,UAAYV,SAEtD,CAEA,MAAO,CACHU,oBACAmB,UAAWH,eACXI,SAAUH,cACVM,SAAUvB,UAAYiB,cACtBO,YAAaxB,UAAY,EAAIiB,cAAgBjB,UAAYiB,cAAgB,EAAIQ,SAAW,EACxFC,aAAcT,eAAiBjB,UAAYV,QAC3CyB,YACAR,0BAER,QAAAR"}
|
package/dist/chunk-B5TT26XE.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var PREVIEW_LIMIT=60;function describeValue(value){if(value===null||value===void 0)return String(value);const type=typeof value;if(type==="string")return`string ${truncate(JSON.stringify(value))}`;if(type==="object"||type==="function"){const preview=previewOf(value);return preview===null?type:`${type} ${preview}`}return`${type} ${truncate(value)}`}function requireString(value,label){if(typeof value!=="string"){throw new TypeError(`${label} must be a string, received ${describeValue(value)}`)}return value}function requireStringIfPresent(value,label){if(value!==null&&value!==void 0)requireString(value,label)}function previewOf(value){let json;try{json=JSON.stringify(value)}catch{return null}if(json===void 0)return null;return truncate(json)}function truncate(value){let text;try{text=String(value)}catch{text="<unprintable>"}if(text.length<=PREVIEW_LIMIT)return text;const cut=/[\uD800-\uDBFF]$/.test(text.slice(0,PREVIEW_LIMIT))?PREVIEW_LIMIT-1:PREVIEW_LIMIT;return`${text.slice(0,cut)}…`}export{describeValue,requireString,requireStringIfPresent,truncate};//# sourceMappingURL=chunk-B5TT26XE.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/internal/argument-guards.ts"],"names":["PREVIEW_LIMIT","describeValue","value","String","type","truncate","JSON","stringify","preview","previewOf","requireString","label","TypeError","requireStringIfPresent","json","text","length","cut","test","slice"],"mappings":"AAkBA,IAAMA,cAAgB,GAcf,SAASC,cAAcC,OAC1B,GAAIA,QAAU,MAAQA,aAAU,EAAW,OAAOC,OAAOD,OAEzD,MAAME,YAAcF,MACpB,GAAIE,OAAS,SAAU,MAAO,UAAUC,SAASC,KAAKC,UAAUL,UAChE,GAAIE,OAAS,UAAYA,OAAS,WAAY,CAC1C,MAAMI,QAAUC,UAAUP,OAC1B,OAAOM,UAAY,KAAOJ,KAAO,GAAGA,QAAQI,SAChD,CACA,MAAO,GAAGJ,QAAQC,SAASH,QAC/B,CAYO,SAASQ,cAAcR,MAAgBS,OAC1C,UAAWT,QAAU,SAAU,CAC3B,MAAM,IAAIU,UAAU,GAAGD,oCAAoCV,cAAcC,SAC7E,CACA,OAAOA,KACX,CAeO,SAASW,uBAAuBX,MAAgBS,OACnD,GAAIT,QAAU,MAAQA,aAAU,EAAWQ,cAAcR,MAAOS,MACpE,CAGA,SAASF,UAAUP,OACf,IAAIY,KACJ,IACIA,KAAOR,KAAKC,UAAUL,MAC1B,CAAA,MACI,OAAO,IACX,CACA,GAAIY,YAAS,EAAW,OAAO,KAC/B,OAAOT,SAASS,KACpB,CAaO,SAAST,SAASH,OACrB,IAAIa,KACJ,IACIA,KAAOZ,OAAOD,MAClB,CAAA,MAGIa,KAAO,eACX,CACA,GAAIA,KAAKC,QAAUhB,cAAe,OAAOe,KAEzC,MAAME,IAAM,mBAAmBC,KAAKH,KAAKI,MAAM,EAAGnB,gBAC5CA,cAAgB,EAChBA,cACN,MAAO,GAAGe,KAAKI,MAAM,EAAGF,OAC5B,QAAAhB,cAAAS,cAAAG,uBAAAR"}
|
package/dist/chunk-BYBT5XSW.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{weaponsCapacitorMetrics}from"./chunk-FMPRCYKY.js";import{shieldRecovery,cellBankSummary}from"./chunk-MPZGCTRG.js";import{shieldMetrics}from"./chunk-2FHHMYDC.js";import{getShipSlots,getShipBySymbol,getShipByName}from"./chunk-IJRKEODR.js";import{parseSlef,toSlef,stringifySlef,getLoadoutModifier}from"./chunk-RKLJ7EEE.js";import{enumerateSlots,parseSlotName,SLOT_RESTRICTION_LABELS}from"./chunk-I7PIDRMU.js";import{sourcePurchaseFromLoadout,getSourceModuleValue}from"./chunk-QTDBO7R2.js";import{powerBudget}from"./chunk-76XKY2Y2.js";import{isNonOutfittingSlot,isBuiltInHullModule,cloneLoadoutModule,identifyPreEngineeredVariant,cloneModuleStats,availableBlueprintsFor,availableExperimentalsFor,blueprintAvailableFor,blueprintRoutesFor,experimentalAvailableFor,primitiveEngineeringInputsFor,missingBaseLabels,journalModifiersFor,getPreEngineeredStats,unresolvedModifiers,getPreEngineeredJournalModifiers,getPreEngineeredModifiers,matchingKeyIn,FITTED_ITEM,isFinalGuardianWeaponEngineering,scaleDamageComponents}from"./chunk-KLIYDSYF.js";import{weaponMetrics,sumWeaponMetrics,combinedRateOfFire}from"./chunk-LJI7VXJD.js";import{builtInModuleBySymbol,getBulkheadsForShip}from"./chunk-MNXWK7PA.js";import{getPreEngineeredVariants}from"./chunk-32PVERNH.js";import{singleJumpRange,frameShiftDriveMassFactor,fuelPerJump,totalRange}from"./chunk-GQ5GX5TB.js";import{completeResult,calculateUnladenMass,calculateCargoCapacity,calculateFuelCapacity}from"./chunk-RF2IKLWQ.js";import{validateLoadout}from"./chunk-5W43EQEQ.js";import{mobilityMetrics}from"./chunk-24INI4U7.js";import{calculateModuleLimits}from"./chunk-KPETDYQX.js";import{ALL_MODULES}from"./chunk-53ERRGPM.js";import{CORE_MODULES}from"./chunk-O72KI7RP.js";import{getDefaultLoadout}from"./chunk-V3DW67W2.js";import{distributorMetrics}from"./chunk-P2QOL63K.js";import{getExperimentalEffect}from"./chunk-PMJG7PHU.js";import{heatMetrics}from"./chunk-QMQHIZGS.js";import{ammunitionCapacity}from"./chunk-AA3K5XUE.js";import{armourMetrics}from"./chunk-FGXWVFN6.js";import{baseStats,computeModifiers,labelsForDamageType,scaleForLabel,fieldForLabel,labelsForField,capabilityValueForLabel,damageTypeForLabel}from"./chunk-SVZARHWP.js";import{resolveBlueprintForModule}from"./chunk-ZJB5UYNE.js";import{getExperimentalsForModule}from"./chunk-TH4S5MVD.js";import{getBlueprintGrade}from"./chunk-DNTN34M4.js";import{normalizeKey}from"./chunk-S4DBNX2B.js";import{truncate,describeValue,requireString,requireStringIfPresent}from"./chunk-B5TT26XE.js";import{deepFreeze}from"./chunk-DURKO7JU.js";var PREFIX={powerPlant:["int_powerplant","int_guardianpowerplant"],thrusters:["int_engine","int_mkiiagileboost_engine"],frameShiftDrive:["int_hyperdrive"],powerDistributor:["int_powerdistributor","int_guardianpowerdistributor"],shieldGenerator:["int_shieldgenerator"],shieldCellBank:["int_shieldcellbank"],shieldBooster:["hpt_shieldbooster"],shieldReinforcement:["int_guardianshieldreinforcement"],hullReinforcement:["int_hullreinforcement","int_guardianhullreinforcement","int_metaalloyhullreinforcement"],moduleReinforcement:["int_modulereinforcement","int_guardianmodulereinforcement"]};var startsWithAny=(symbol,prefixes)=>prefixes.some(prefix=>symbol.toLowerCase().startsWith(prefix));function isPowerDistributor(module,stats){return stats?.slot?stats.slot==="powerDistributor":startsWithAny(module.Item,PREFIX.powerDistributor)}function isEnabled(module){return module.On!==false}function priorityOf(module){return(module.Priority??0)+1}function effectiveStat(module,field,stats){const stated=statedModifier(module,field);if(stated!==void 0)return stated;const base=stats?.[field];return typeof base==="number"?base:void 0}function statedModifier(module,field){for(const label of labelsForField(field)){if(capabilityValueForLabel(label)!==null)continue;const modified=getLoadoutModifier(module,label);if(modified!==null)return modified/scaleForLabel(label)}return void 0}function effectiveCapability(module,field,stats){for(const label of labelsForField(field)){if(capabilityValueForLabel(label)===null)continue;if(module.Engineering?.Modifiers?.some(modifier=>modifier.Label.toLowerCase()===label.toLowerCase())){return true}}const base=stats[field];return typeof base==="boolean"?base:void 0}function effectiveDamageDistribution(module,stats){const fromEffect=module.Engineering?.ExperimentalEffect?getExperimentalEffect(module.Engineering.ExperimentalEffect)?.damageDistribution:void 0;const distribution={...fromEffect??stats.damageDistribution};let resolved=fromEffect!==void 0||stats.damageDistribution!==void 0;for(const modifier of module.Engineering?.Modifiers??[]){if(modifier.Value===void 0)continue;const type=damageTypeForLabel(modifier.Label);if(type===null)continue;distribution[type]=modifier.Value/scaleForLabel(modifier.Label);resolved=true}return resolved?distribution:void 0}function convertsDamage(module){if(module.Engineering?.ExperimentalEffect&&getExperimentalEffect(module.Engineering.ExperimentalEffect)?.damageDistribution){return true}return(module.Engineering?.Modifiers??[]).some(modifier=>damageTypeForLabel(modifier.Label)!==null)}function modifierRatio(module,stats,field){const base=stats?.[field];if(typeof base!=="number"||base===0)return 1;const effective=effectiveStat(module,field,stats);return effective===void 0?1:effective/base}function relatedStat(module,stats,field,ratio){const stated=statedModifier(module,field);if(stated!==void 0)return stated;const base=stats?.[field];return typeof base==="number"?base*ratio:void 0}function effectiveModule(module,stats){if(!stats||!module.Engineering)return stats;const merged={...stats};const fields=new Set(Object.keys(stats));for(const modifier of module.Engineering.Modifiers??[]){const field=fieldForLabel(modifier.Label,stats);if(field)fields.add(field)}for(const key of fields){const capability=effectiveCapability(module,key,stats);if(capability!==void 0){merged[key]=capability;continue}const value=effectiveStat(module,key,stats);if(value!==void 0)merged[key]=value}if(stats.engineeringGroup==="thrusters"){const massRatio=modifierRatio(module,stats,"optMass");const minMass=relatedStat(module,stats,"minMass",massRatio);const maxMass=relatedStat(module,stats,"maxMass",massRatio);if(minMass!==void 0)merged.minMass=minMass;if(maxMass!==void 0)merged.maxMass=maxMass}if(stats.engineeringGroup==="thrusters"||stats.engineeringGroup==="shieldGenerators"){const performanceRatio=modifierRatio(module,stats,"optMultiplier");const minMultiplier=relatedStat(module,stats,"minMultiplier",performanceRatio);const maxMultiplier=relatedStat(module,stats,"maxMultiplier",performanceRatio);if(minMultiplier!==void 0)merged.minMultiplier=minMultiplier;if(maxMultiplier!==void 0)merged.maxMultiplier=maxMultiplier;if(stats.engineeringGroup==="thrusters"){for(const field of["minSpeedMultiplier","optSpeedMultiplier","maxSpeedMultiplier","minRotationMultiplier","optRotationMultiplier","maxRotationMultiplier"]){const value=stats[field];if(value!==void 0)merged[field]=value*performanceRatio}}}const damageDistribution=effectiveDamageDistribution(module,stats);if(damageDistribution)merged.damageDistribution=damageDistribution;if(stats.category==="hardpoint")normalizeEffectiveWeapon(module,merged);if(convertsDamage(module)){delete merged.damageComponents}else if(stats.damageComponents){merged.damageComponents=scaleDamageComponents(stats.damageComponents,stats.damage,typeof merged.damage==="number"?merged.damage:void 0)}return merged}function powerConsumerFor(module,stats){const draw=effectiveStat(module,"powerDraw",stats);const parsedSlot=parseSlotName(module.Slot);const mounted=stats?.category==="hardpoint"||stats?.category==="utility";const deployedOnly=stats!==null?mounted&&stats.alwaysPowered!==true:parsedSlot?.kind==="hardpoint"?true:parsedSlot?.kind==="utility"?void 0:false;const common={priority:priorityOf(module),enabled:isEnabled(module),...deployedOnly===void 0?{}:{deployedOnly:deployedOnly},label:module.Slot};if(draw===void 0){const inherentlyPassiveSlot=parsedSlot?.kind==="armour"||parsedSlot?.kind==="core"&&(parsedSlot.core==="powerPlant"||parsedSlot.core==="fuelTank");if(stats!==null||inherentlyPassiveSlot||isNonOutfittingSlot(module.Slot))return null;return{drawUnknown:true,...common}}if(draw===0)return null;return{draw:draw,...common}}function powerAvailable(modules,statsFor){for(const module of modules){const stats=statsFor(module);const isPlant=stats?.slot?stats.slot==="powerPlant":startsWithAny(module.Item,PREFIX.powerPlant);if(!isPlant)continue;if(!isEnabled(module))return 0;return effectiveStat(module,"powerCapacity",stats)??0}return 0}function mapResistanceFields(read){return{kineticResistance:read("kineticResistance")??0,thermalResistance:read("thermalResistance")??0,explosiveResistance:read("explosiveResistance")??0,causticResistance:read("causticResistance")??0}}function resistancesOf(module,stats){return mapResistanceFields(field=>effectiveStat(module,field,stats))}function shieldInputFor(shipSymbol,modules,systemsPips,statsFor){const hull=getShipBySymbol(shipSymbol);let generator=null;const boosters=[];let reinforcement=0;for(const module of modules){if(!isEnabled(module))continue;const stats=statsFor(module);if(!generator&&startsWithAny(module.Item,PREFIX.shieldGenerator)){const massRatio=modifierRatio(module,stats,"optMass");const strengthRatio=modifierRatio(module,stats,"optMultiplier");const optMass=effectiveStat(module,"optMass",stats);const minMass=relatedStat(module,stats,"minMass",massRatio);const maxMass=relatedStat(module,stats,"maxMass",Math.max(1,massRatio));const optMultiplier=effectiveStat(module,"optMultiplier",stats);const minMultiplier=relatedStat(module,stats,"minMultiplier",strengthRatio);const maxMultiplier=relatedStat(module,stats,"maxMultiplier",strengthRatio);generator={...optMass===void 0?{}:{optMass:optMass},...minMass===void 0?{}:{minMass:minMass},...maxMass===void 0?{}:{maxMass:maxMass},...optMultiplier===void 0?{}:{optMultiplier:optMultiplier},...minMultiplier===void 0?{}:{minMultiplier:minMultiplier},...maxMultiplier===void 0?{}:{maxMultiplier:maxMultiplier},...resistancesOf(module,stats)}}else if(startsWithAny(module.Item,PREFIX.shieldBooster)){boosters.push({shieldBoost:effectiveStat(module,"shieldBoost",stats)??0,...resistancesOf(module,stats)})}else if(startsWithAny(module.Item,PREFIX.shieldReinforcement)){reinforcement+=effectiveStat(module,"shieldAddition",stats)??0}}return{hullMass:hull?.hullMass??0,baseShieldStrength:hull?.baseShieldStrength??0,generator:generator,boosters:boosters,reinforcement:reinforcement,systemsPips:systemsPips}}function mobilityInputFor(shipSymbol,modules,mass,enginesPips,statsFor){const hull=getShipBySymbol(shipSymbol);if(!hull)return null;let thrusters=null;for(const module of modules){const stats=statsFor(module);const isThruster=stats?.slot?stats.slot==="thrusters":startsWithAny(module.Item,PREFIX.thrusters);if(!isThruster)continue;if(!isEnabled(module))return null;const effective=effectiveModule(module,stats);const minMass=effective?.minMass;const optMass=effective?.optMass;const maxMass=effective?.maxMass;const minMultiplier=effective?.minMultiplier;const optMultiplier=effective?.optMultiplier;const maxMultiplier=effective?.maxMultiplier;if(minMass===void 0||optMass===void 0||maxMass===void 0||minMultiplier===void 0||optMultiplier===void 0||maxMultiplier===void 0){return null}thrusters={minMass:minMass,optMass:optMass,maxMass:maxMass,minMultiplier:minMultiplier,optMultiplier:optMultiplier,maxMultiplier:maxMultiplier,...effective?.optSpeedMultiplier===void 0?{}:{speedCurve:{minMass:minMass,optMass:optMass,maxMass:maxMass,minMultiplier:effective.minSpeedMultiplier??minMultiplier,optMultiplier:effective.optSpeedMultiplier,maxMultiplier:effective.maxSpeedMultiplier??maxMultiplier}},...effective?.optRotationMultiplier===void 0?{}:{rotationCurve:{minMass:minMass,optMass:optMass,maxMass:maxMass,minMultiplier:effective.minRotationMultiplier??minMultiplier,optMultiplier:effective.optRotationMultiplier,maxMultiplier:effective.maxRotationMultiplier??maxMultiplier}}};break}if(!thrusters)return null;return{minimumSpeed:hull.minimumSpeed,maximumSpeed:hull.maximumSpeed,boost:hull.boost,minPitch:hull.minPitch,pitch:hull.pitch,minRoll:hull.minRoll,roll:hull.roll,minYaw:hull.minYaw,yaw:hull.yaw,mass:typeof mass==="function"?mass():mass,thrusters:thrusters,enginesPips:enginesPips}}function shieldRecoveryInputFor(shipSymbol,modules,systemsPips,statsFor){let generator=null;let distributor=null;for(const module of modules){const stats=statsFor(module);if(!generator&&startsWithAny(module.Item,PREFIX.shieldGenerator)){if(!isEnabled(module))return null;generator=module}if(isPowerDistributor(module,stats)&&isEnabled(module))distributor=module}if(!generator)return null;const generatorStats=statsFor(generator);const distributorStats=distributor?statsFor(distributor):null;const strength=shieldMetrics(shieldInputFor(shipSymbol,modules,0,statsFor)).strength;return{strength:strength,regenRate:effectiveStat(generator,"shieldRegenRate",generatorStats)??0,brokenRegenRate:effectiveStat(generator,"shieldBrokenRegenRate",generatorStats)??0,distributorDraw:effectiveStat(generator,"distributorDraw",generatorStats)??.6,systemsCapacity:distributor?effectiveStat(distributor,"systemsCapacity",distributorStats)??0:0,systemsRecharge:distributor?effectiveStat(distributor,"systemsRecharge",distributorStats)??0:0,systemsPips:systemsPips}}function weaponsCapacitorInputFor(modules,weaponsPips,budget,statsFor){let weaponsCapacity=0;let weaponsRecharge=0;let sustainedEnergyPerSecond=0;for(const module of modules){if(!isEnabled(module))continue;const stats=statsFor(module);if(!poweredStates(module,stats,budget).deployed)continue;if(isPowerDistributor(module,stats)){weaponsCapacity=effectiveStat(module,"weaponsCapacity",stats)??0;weaponsRecharge=effectiveStat(module,"weaponsRecharge",stats)??0}const weapon=weaponStatsFor(module,stats);if(weapon){sustainedEnergyPerSecond+=weaponMetrics(weapon).sustainedEnergyPerSecond}}return{weaponsCapacity:weaponsCapacity,weaponsRecharge:weaponsRecharge,sustainedEnergyPerSecond:sustainedEnergyPerSecond,weaponsPips:weaponsPips}}function distributorInputFor(modules,pips,budget,statsFor){for(const module of modules){if(!isEnabled(module))continue;const stats=statsFor(module);if(!isPowerDistributor(module,stats))continue;if(!poweredStates(module,stats,budget).retracted)return null;const systemsCapacity=effectiveStat(module,"systemsCapacity",stats);const systemsRecharge=effectiveStat(module,"systemsRecharge",stats);const enginesCapacity=effectiveStat(module,"enginesCapacity",stats);const enginesRecharge=effectiveStat(module,"enginesRecharge",stats);const weaponsCapacity=effectiveStat(module,"weaponsCapacity",stats);const weaponsRecharge=effectiveStat(module,"weaponsRecharge",stats);if(systemsCapacity===void 0||systemsRecharge===void 0||enginesCapacity===void 0||enginesRecharge===void 0||weaponsCapacity===void 0||weaponsRecharge===void 0){return null}return{systemsCapacity:systemsCapacity,systemsRecharge:systemsRecharge,enginesCapacity:enginesCapacity,enginesRecharge:enginesRecharge,weaponsCapacity:weaponsCapacity,weaponsRecharge:weaponsRecharge,...pips}}return null}function heatInputFor(shipSymbol,modules,budget,statsFor){const hull=getShipBySymbol(shipSymbol);if(!hull)return null;let heatEfficiency;let thrusterHeatRate=0;let deployedThrusterHeatRate=0;let fsdHeatRate=0;let weaponsCapacity=0;const weapons=[];for(const module of modules){const stats=statsFor(module);const isPlant=stats?.slot?stats.slot==="powerPlant":startsWithAny(module.Item,PREFIX.powerPlant);if(isPlant){if(!isEnabled(module))return null;heatEfficiency=effectiveStat(module,"heatEfficiency",stats);continue}if(!isEnabled(module))continue;const running=poweredStates(module,stats,budget);if(stats?.slot?stats.slot==="thrusters":startsWithAny(module.Item,PREFIX.thrusters)){const heat=effectiveStat(module,"engineHeatRate",stats)??0;if(running.retracted)thrusterHeatRate+=heat;if(running.deployed)deployedThrusterHeatRate+=heat}else if(stats?.slot?stats.slot==="frameShiftDrive":startsWithAny(module.Item,PREFIX.frameShiftDrive)){if(running.retracted)fsdHeatRate+=effectiveStat(module,"fsdHeatRate",stats)??0}else if(isPowerDistributor(module,stats)){if(running.deployed){weaponsCapacity=effectiveStat(module,"weaponsCapacity",stats)??0}}const weapon=weaponStatsFor(module,stats);if(!weapon||!running.deployed)continue;weapons.push({heatPerSecond:weaponMetrics(weapon).sustainedHeatPerSecond,distributorDraw:weapon.distributorDraw??0})}if(heatEfficiency===void 0)return null;return{heatCapacity:hull.heatCapacity,heatDissipation:hull.heatDissipation,heatEfficiency:heatEfficiency,retractedPowerDraw:poweredDraw(budget,"retracted"),deployedPowerDraw:poweredDraw(budget,"deployed"),thrusterHeatRate:thrusterHeatRate,deployedThrusterHeatRate:deployedThrusterHeatRate,fsdHeatRate:fsdHeatRate,weaponsCapacity:weaponsCapacity,weapons:weapons,unknownDraws:budget.unknownDraws.map(consumer=>consumer.label??"(unnamed module)")}}function poweredDraw(budget,state){const powered=state==="retracted"?"poweredRetracted":"poweredDeployed";return budget.bands.reduce((total,band)=>band[powered]?total+band[state]:total,0)}function poweredStates(module,stats,budget){const draw=effectiveStat(module,"powerDraw",stats);if(draw===void 0||draw===0)return{retracted:true,deployed:true};const band=budget.bands[Math.min(budget.bands.length,Math.max(1,priorityOf(module)))-1];if(!band)return{retracted:true,deployed:true};return{retracted:band.poweredRetracted,deployed:band.poweredDeployed}}function cellBankInputsFor(modules,statsFor){const banks=[];for(const module of modules){if(!startsWithAny(module.Item,PREFIX.shieldCellBank))continue;const effective=effectiveModule(module,statsFor(module));const ammunition=effective?ammunitionCapacity(effective):null;banks.push({slot:module.Slot,symbol:module.Item,reinforcementRate:effective?.shieldBankReinforcement??0,cells:ammunition?.total??0,spinUp:effective?.shieldBankSpinUp??0,duration:effective?.shieldBankDuration??0,heat:effective?.shieldBankHeat??0})}return banks}function stockBulkhead(shipSymbol){const hull=getShipBySymbol(shipSymbol);if(!hull)return null;const variants=getBulkheadsForShip(hull.name,CORE_MODULES);return variants.find(v=>v.symbol.toLowerCase().endsWith("_default"))??variants.find(v=>v.mass===0)??variants[0]??null}function armourInputFor(shipSymbol,modules,statsFor){const hull=getShipBySymbol(shipSymbol);const reinforcements=[];const moduleReinforcements=[];let bulkhead=null;for(const module of modules){if(!isEnabled(module))continue;const stats=statsFor(module);if(module.Slot.toLowerCase()==="armour"){bulkhead={hullBoost:effectiveStat(module,"hullBoost",stats)??0,...resistancesOf(module,stats)}}else if(startsWithAny(module.Item,PREFIX.hullReinforcement)){const boost=getLoadoutModifier(module,"DefenceModifierHealthMultiplier");reinforcements.push({hullReinforcement:effectiveStat(module,"hullReinforcement",stats)??0,hullBoost:boost===null?0:boost/scaleForLabel("DefenceModifierHealthMultiplier"),...resistancesOf(module,stats)})}else if(startsWithAny(module.Item,PREFIX.moduleReinforcement)){moduleReinforcements.push({moduleProtection:effectiveStat(module,"moduleProtection",stats)??0,integrity:effectiveStat(module,"integrity",stats)??0})}}if(!bulkhead){const stock=stockBulkhead(shipSymbol);bulkhead=stock?{hullBoost:stock.hullBoost??0,...mapResistanceFields(field=>stock[field])}:null}return{baseArmour:hull?.baseArmour??0,bulkhead:bulkhead,reinforcements:reinforcements,moduleReinforcements:moduleReinforcements}}var WEAPON_FIELDS=["damage","roundsPerShot","rateOfFire","burstInterval","burstRounds","burstRateOfFire","chargeTime","clipSize","ammoMaximum","reloadTime","distributorDraw","thermalLoad","powerDraw","maximumRange","falloffRange","armourPiercing"];function weaponStatsFor(module,stats){if(!stats||stats.category!=="hardpoint")return null;const weapon={};for(const field of WEAPON_FIELDS){const value=effectiveStat(module,field,stats);if(value!==void 0)weapon[field]=value}normalizeEffectiveWeapon(module,weapon);const damageDistribution=effectiveDamageDistribution(module,stats);if(damageDistribution)weapon.damageDistribution=damageDistribution;if(stats.damageComponents&&!convertsDamage(module)){weapon.damageComponents=scaleDamageComponents(stats.damageComponents,stats.damage,typeof weapon.damage==="number"?weapon.damage:void 0)}if(stats.projectileRange)weapon.projectileRange={...stats.projectileRange};return weapon}function burstAdjustedRateOfFire(module,weapon){if(getLoadoutModifier(module,"RateOfFire")!==null)return void 0;const touched=["BurstSize","BurstRateOfFire","BurstInterval"].some(label=>getLoadoutModifier(module,label)!==null);if(!touched)return void 0;return combinedRateOfFire(weapon)}function normalizeEffectiveWeapon(module,weapon){const rate=burstAdjustedRateOfFire(module,weapon);if(rate!==void 0)weapon.rateOfFire=rate;const statedDamagePerSecond=getLoadoutModifier(module,"DamagePerSecond");const firingFactor=Number(weapon.roundsPerShot??1)*Number(weapon.rateOfFire??1);if(statedDamagePerSecond!==null&&firingFactor>0){weapon.damage=statedDamagePerSecond/firingFactor}const{maximumRange:maximumRange,falloffRange:falloffRange}=weapon;if(maximumRange!==void 0&&falloffRange!==void 0&&falloffRange>maximumRange){weapon.falloffRange=maximumRange}}var CORE_NAMES={powerPlant:"Power Plant",thrusters:"Thrusters",frameShiftDrive:"Frame Shift Drive",lifeSupport:"Life Support",powerDistributor:"Power Distributor",sensors:"Sensors",fuelTank:"Fuel Tank"};var RESTRICTED_OPTIONAL_NAMES={military:"Military Slot",cargo:"Cargo Slot",limpetController:"Limpet Controller Slot",vesselHangar:"Vessel Hangar Slot",passenger:"Passenger Slot"};function trailingDigits(key){let start=key.length;while(start>0){const code=key.charCodeAt(start-1);if(code<48||code>57)break;start--}return start===key.length?null:key.slice(start)}function loadoutSlotName(slot){switch(slot.kind){case"core":return CORE_NAMES[slot.core];case"hardpoint":{const match=/^(Small|Medium|Large|Huge)(Mining)?Hardpoint(\d+)$/.exec(slot.key);if(!match)return slot.key;return`${match[1]}${match[2]?" Mining":""} Hardpoint ${Number(match[3])}`}case"utility":{const match=/^TinyHardpoint(\d+)$/.exec(slot.key);return match?`Utility Mount ${Number(match[1])}`:slot.key}case"optional":{if(slot.restriction==="planetaryApproachSuite")return"Planetary Approach Suite";if(slot.restriction){const numbered=trailingDigits(slot.key);const label=RESTRICTED_OPTIONAL_NAMES[slot.restriction];return label&&numbered?`${label} ${Number(numbered)}`:slot.key}const optional=/^Slot(\d+)_Size(\d+)$/.exec(slot.key);return optional?`Optional Internal ${Number(optional[1])} (Size ${slot.size})`:slot.key}case"armour":return"Armour";case"cargoHatch":return"Cargo Hatch"}}var MILITARY_PREFIXES=["int_hullreinforcement","int_metaalloyhullreinforcement","int_modulereinforcement","int_shieldcellbank","int_guardianhullreinforcement","int_guardianmodulereinforcement","int_guardianshieldreinforcement"];var MINING_PREFIXES=["hpt_mininglaser","hpt_mining_abrblstr","hpt_mining_seismchrgwarhd","hpt_mining_subsurfdispmisle","hpt_human_extraction","hpt_miningtoolv2"];var CARGO_PREFIXES=["int_cargorack","int_largecargorack","int_corrosionproofcargorack","int_fueltank"];var RESTRICTED_SLOT_PREFIXES={mining:MINING_PREFIXES,military:MILITARY_PREFIXES,cargo:CARGO_PREFIXES,limpetController:["int_dronecontrol","int_multidronecontrol"],vesselHangar:["int_fighterbay"],passenger:["int_passengercabin","int_mkii_passengercabin"],planetaryApproachSuite:["int_planetapproachsuite"]};var problem=(constraint,message,params)=>({constraint:constraint,message:message,...params===void 0?{}:{params:params}});function restrictionProblem(slot,symbol){const restriction=slot.restriction;if(!restriction)return null;if(RESTRICTED_SLOT_PREFIXES[restriction].some(prefix=>symbol.startsWith(prefix))){return null}return problem("restrictedMount",`slot only takes ${SLOT_RESTRICTION_LABELS[restriction]}`,{restriction:restriction})}function moduleSlotProblem(slot,module){const required=module.restrictedToSlot;if(!required||slot.restriction===required)return null;return problem("restrictedMount",`module only fits a mount that takes ${SLOT_RESTRICTION_LABELS[required]}`,{restriction:required})}function moduleFitProblem(shipSymbol,slot,module){if(slot.kind==="cargoHatch"){return problem("immutableSlot","the cargoHatch slot cannot be changed")}if(slot.kind==="armour"){const hull=getShipBySymbol(shipSymbol);if(module.slot!=="armour"||module.ship===void 0){return problem("armourRequired","not a ship armour module")}if(!hull||module.ship.toLowerCase()!==hull.name.toLowerCase()){const armourHull=getShipByName(module.ship);return problem("wrongHullArmour",`armour belongs to ${truncate(module.ship)}, not ${truncate(hull?.name??shipSymbol)}`,{armourShipName:module.ship,...armourHull===null?{}:{armourShipSymbol:armourHull.symbol},shipSymbol:shipSymbol,...hull===null?{}:{shipName:hull.name}})}return null}const restricted=module.restrictedToShips;if(restricted&&!restricted.some(symbol2=>symbol2.toLowerCase()===shipSymbol.toLowerCase())){const allowedShipNames=restricted.map(symbol2=>{const hull=getShipBySymbol(symbol2);return hull?.name??symbol2});const labels=restricted.map((symbol2,index)=>{const name=allowedShipNames[index];return name===symbol2?symbol2:`${name} (${symbol2})`});return problem("restrictedHull",`module is restricted to ${truncate(labels.join(", "))}`,{allowedShipNames:allowedShipNames,allowedShipSymbols:[...restricted],shipSymbol:shipSymbol})}const wrongMount=moduleSlotProblem(slot,module);if(wrongMount)return wrongMount;const symbol=module.symbol.toLowerCase();const moduleSlot=module.slot;switch(slot.kind){case"core":if(moduleSlot!==slot.core){return problem("wrongCoreType",`not a ${slot.core} module`,{requiredCore:slot.core,moduleSlot:moduleSlot??"none"})}break;case"hardpoint":{if(module.category!=="hardpoint"){return problem("hardpointRequired","not a hardpoint weapon")}const restricted2=restrictionProblem(slot,symbol);if(restricted2)return restricted2;break}case"utility":if(module.category!=="utility"){return problem("utilityRequired","not a utility module")}return null;case"optional":{const isFuelTank=moduleSlot==="fuelTank";if(module.category!=="internal"&&!isFuelTank){return problem("optionalInternalRequired","not an optional-internal module")}if(moduleSlot&&!isFuelTank){return problem("coreModuleInOptionalSlot","a core module only fits its core slot")}const restricted2=restrictionProblem(slot,symbol);if(restricted2)return restricted2;break}}return module.class>slot.size?problem("oversized",`module size ${truncate(module.class)} exceeds slot size ${slot.size}`,{moduleClass:module.class,slotSize:slot.size}):null}function moduleFitError(shipSymbol,slot,module){return moduleFitProblem(shipSymbol,slot,module)?.message??null}var REBUY_FRACTION=.05;function exportLoadoutEvent(input,options){const fromSource=options.credits==="source";const source=fromSource?input.sourcePurchase:null;const totals=source!==null&&sourceTotalsHold(input.modules,source)?source:null;const hullValue=fromSource?source?.hullValue??null:input.retailHullValue;const modulesValue=fromSource?totals?.modulesValue??null:computedModulesValue(input.modules,input.statsFor);const rebuy=fromSource?totals?.rebuy??null:hullValue===null||modulesValue===null?null:Math.trunc((hullValue+modulesValue)*REBUY_FRACTION);return{event:"Loadout",Ship:input.shipSymbol.toLowerCase(),...input.shipName===void 0?{}:{ShipName:input.shipName},...input.shipIdent===void 0?{}:{ShipIdent:input.shipIdent},...hullValue===null?{}:{HullValue:hullValue},...modulesValue===null?{}:{ModulesValue:modulesValue},...input.unladenMass===null?{}:{UnladenMass:input.unladenMass},...input.cargoCapacity===null?{}:{CargoCapacity:input.cargoCapacity},...input.maxJumpRange===null?{}:{MaxJumpRange:input.maxJumpRange},...input.fuelCapacity===null?{}:{FuelCapacity:{Main:input.fuelCapacity.main,Reserve:input.fuelCapacity.reserve}},...rebuy===null?{}:{Rebuy:rebuy},Modules:exportModules(input,options,fromSource)}}function exportModules(input,options,fromSource){const ordered=options.moduleOrder==="slots"?slotOrderedModules(input.shipSymbol,input.modules,input.layout):[...input.modules.values()];return ordered.map(module=>{const on=module.On??(options.explicitPower?true:void 0);const priority=module.Priority??(options.explicitPower?0:void 0);const value=fromSource?sourceModuleValue(module,input.sourcePurchase):moduleValue(module,input.statsFor);return{Slot:module.Slot,Item:module.Item.toLowerCase(),...on===void 0?{}:{On:on},...priority===void 0?{}:{Priority:priority},...module.Health===void 0?{}:{Health:module.Health},...typeof value==="number"?{Value:value}:{},...module.Engineering===void 0?{}:{Engineering:cloneLoadoutModule(module).Engineering}}})}function slotOrderedModules(shipSymbol,modules,layout){if(!layout){throw new TypeError(`ShipLoadout.toLoadoutEvent: no slot layout for hull "${truncate(shipSymbol)}", so modules cannot be ordered by slot`)}const remaining=new Map(modules);const ordered=[];for(const slot of layout){const key=matchingKeyIn(remaining,slot.key);const module=key===null?void 0:remaining.get(key);if(module&&key!==null){ordered.push(module);remaining.delete(key)}}return[...ordered,...remaining.values()]}function computedModulesValue(modules,statsFor){let sum=0;for(const module of modules.values()){const value=moduleValue(module,statsFor);if(value==="unknown")return null;if(value!=="free")sum+=value}return sum}function moduleValue(module,statsFor){const stats=statsFor(module);if(stats!==null)return stats.cost??"unknown";return isNonOutfittingSlot(module.Slot)||isBuiltInHullModule(module)?"free":"unknown"}var SOURCE_ITEM="ShipLoadout: sourcePurchase moduleValues[].item";function sourceModuleValue(module,source){const entry=source===null?null:getSourceModuleValue(source,module.Slot);if(entry===null)return"unknown";return normalizeKey(entry.item,SOURCE_ITEM)===normalizeKey(module.Item,FITTED_ITEM)?entry.value:"unknown"}function sourceTotalsHold(modules,source){for(const entry of source.moduleValues){const key=matchingKeyIn(modules,entry.slot);const fitted=key===null?void 0:modules.get(key);if(!fitted||normalizeKey(fitted.Item,FITTED_ITEM)!==normalizeKey(entry.item,SOURCE_ITEM)){return false}}return true}function captureLoadoutEvent(event){const modules=event.Modules;const shipName=event.ShipName;const shipIdent=event.ShipIdent;const hullValue=event.HullValue;const modulesValue=event.ModulesValue;const rebuy=event.Rebuy;const unladenMass=event.UnladenMass;const cargoCapacity=event.CargoCapacity;const fuelCapacity=event.FuelCapacity;return{Ship:event.Ship,Modules:Array.isArray(modules)?captureEach(modules,captureModule):modules,...shipName===void 0?{}:{ShipName:shipName},...shipIdent===void 0?{}:{ShipIdent:shipIdent},...hullValue===void 0?{}:{HullValue:hullValue},...modulesValue===void 0?{}:{ModulesValue:modulesValue},...rebuy===void 0?{}:{Rebuy:rebuy},...unladenMass===void 0?{}:{UnladenMass:unladenMass},...cargoCapacity===void 0?{}:{CargoCapacity:cargoCapacity},...fuelCapacity===void 0?{}:{FuelCapacity:{...fuelCapacity}}}}function captureEach(values,capture){const captured=[];const{length:length}=values;for(let index=0;index<length;index++)captured.push(capture(values[index]));return captured}function captureModule(module){if(module===null||typeof module!=="object")return module;const on=module.On;const priority=module.Priority;const health=module.Health;const value=module.Value;const engineering=module.Engineering;return{Slot:module.Slot,Item:module.Item,...on===void 0?{}:{On:on},...priority===void 0?{}:{Priority:priority},...health===void 0?{}:{Health:health},...value===void 0?{}:{Value:value},...engineering===void 0?{}:{Engineering:captureEngineering(engineering)}}}function captureEngineering(engineering){if(engineering===null||typeof engineering!=="object")return engineering;const experimental=engineering.ExperimentalEffect;const experimentalLocalised=engineering.ExperimentalEffect_Localised;const modifiers=engineering.Modifiers;return{BlueprintName:engineering.BlueprintName,Level:engineering.Level,Quality:engineering.Quality,...experimental===void 0?{}:{ExperimentalEffect:experimental},...experimentalLocalised===void 0?{}:{ExperimentalEffect_Localised:experimentalLocalised},...modifiers===void 0?{}:{Modifiers:Array.isArray(modifiers)?captureEach(modifiers,modifier=>modifier!==null&&typeof modifier==="object"?{...modifier}:modifier):modifiers}}}function normalizeLoadoutEvent(rawEvent){const event=captureLoadoutEvent(rawEvent);requireStringIfPresent(event.Ship,"ShipLoadout.fromLoadout: event.Ship");if(!Array.isArray(event.Modules)){throw new TypeError(`ShipLoadout.fromLoadout: event.Modules must be an array, received ${describeValue(event.Modules)}`)}const modules=/* @__PURE__ */new Map;const slots=/* @__PURE__ */new Set;for(const module of event.Modules){if(module===null||typeof module!=="object"){throw new TypeError(`ShipLoadout.fromLoadout: event.Modules[] must hold module objects, received ${describeValue(module)}`)}requireString(module.Slot,"ShipLoadout.fromLoadout: module.Slot");requireString(module.Item,"ShipLoadout.fromLoadout: module.Item");if(module.Engineering!==void 0){if(module.Engineering===null||typeof module.Engineering!=="object"){throw new TypeError(`ShipLoadout.fromLoadout: module.Engineering must be an object, received ${describeValue(module.Engineering)}`)}requireStringIfPresent(module.Engineering.BlueprintName,"ShipLoadout.fromLoadout: module.Engineering.BlueprintName");requireStringIfPresent(module.Engineering.ExperimentalEffect,"ShipLoadout.fromLoadout: module.Engineering.ExperimentalEffect");if(module.Engineering.Modifiers!==void 0&&!Array.isArray(module.Engineering.Modifiers)){throw new TypeError(`ShipLoadout.fromLoadout: module.Engineering.Modifiers must be an array, received ${describeValue(module.Engineering.Modifiers)}`)}for(const[index,modifier]of(module.Engineering.Modifiers??[]).entries()){if(modifier===null||typeof modifier!=="object"){throw new TypeError(`ShipLoadout.fromLoadout: module.Engineering.Modifiers[${index}] must be an object, received ${describeValue(modifier)}`)}requireString(modifier.Label,`ShipLoadout.fromLoadout: module.Engineering.Modifiers[${index}].Label`)}}const normalizedSlot=module.Slot.toLowerCase();if(slots.has(normalizedSlot)){throw new TypeError(`ShipLoadout.fromLoadout: duplicate slot "${truncate(module.Slot)}"`)}slots.add(normalizedSlot);modules.set(module.Slot,cloneLoadoutModule(module))}const top={};if(event.ShipName!==void 0)top.ShipName=event.ShipName;if(event.ShipIdent!==void 0)top.ShipIdent=event.ShipIdent;if(event.HullValue!==void 0)top.HullValue=event.HullValue;if(event.ModulesValue!==void 0)top.ModulesValue=event.ModulesValue;if(event.Rebuy!==void 0)top.Rebuy=event.Rebuy;if(event.UnladenMass!==void 0)top.UnladenMass=event.UnladenMass;if(event.CargoCapacity!==void 0)top.CargoCapacity=event.CargoCapacity;if(event.FuelCapacity!==void 0)top.FuelCapacity={...event.FuelCapacity};const moduleStats=/* @__PURE__ */new Map;for(const module of modules.values()){const engineering=module.Engineering;const variant=identifyPreEngineeredVariant(module);const variantStats=variant?getPreEngineeredStats(variant):null;if(variantStats)moduleStats.set(module.Slot,cloneModuleStats(variantStats));if(variantStats?.engineeringLocked||typeof engineering?.BlueprintName!=="string"||!isFinalGuardianWeaponEngineering(module.Item,engineering.BlueprintName)){continue}const normalizedBlueprint=normalizeKey(engineering.BlueprintName,"ShipLoadout.fromLoadout: module.Engineering.BlueprintName");const normalizedExperimental=normalizeKey(engineering.ExperimentalEffect,"ShipLoadout.fromLoadout: module.Engineering.ExperimentalEffect");const exact=getPreEngineeredVariants(module.Item).find(candidate=>candidate.blueprint.toLowerCase()===normalizedBlueprint&&candidate.grade===engineering.Level&&candidate.experimental?.toLowerCase()===normalizedExperimental);const stats=exact?getPreEngineeredStats(exact):builtInModuleBySymbol(module.Item,"ShipLoadout.fromLoadout: module.Item");if(stats){moduleStats.set(module.Slot,cloneModuleStats({...stats,engineeringLocked:true}))}}return{shipSymbol:event.Ship,modules:modules,moduleStats:moduleStats,top:top,sourcePurchase:sourcePurchaseFromLoadout(event)}}var SLOT_KEY="ShipLoadout: slotKey";var requireLoadOptions=(scope,options)=>{for(const field of["fuel","cargo"]){const value=options[field];if(value!==void 0&&(!Number.isFinite(value)||value<0)){throw new RangeError(`${scope}: ${field} must be a finite non-negative number`)}}};var LoadoutEditError=class extends TypeError{code;constraint;params;constructor(message,code,params,constraint){super(message);this.code=code;this.params=deepFreeze(Object.fromEntries(Object.entries(params).map(([key,value])=>[key,Array.isArray(value)?[...value]:value])));if(constraint!==void 0)this.constraint=constraint}};var FSD_PREFIX="int_hyperdrive";var BOOSTER_PREFIX="int_guardianfsdbooster";var FUEL_TANK_PREFIX="int_fueltank";var ShipLoadout=class _ShipLoadout{#shipSymbol;#modules;#moduleStats;#primitiveModifiers=/* @__PURE__ */new Map;#top;#sourcePurchase;#version=0;#viewVersion=0;#layoutCache;#calculationCache=null;#validationCache=null;#fittedModuleCache=null;#slotCache=null;constructor(shipSymbol,modules,top,sourcePurchase=null,moduleStats=/* @__PURE__ */new Map){this.#shipSymbol=shipSymbol;this.#modules=modules;this.#top=top;this.#sourcePurchase=sourcePurchase;this.#moduleStats=moduleStats}static fromSlef(input,index=0){const entries=parseSlef(input);const entry=entries[index];if(!entry){throw new TypeError(`ShipLoadout.fromSlef: no entry at index ${truncate(index)} (have ${entries.length})`)}return _ShipLoadout.fromLoadout(entry.data)}static fromLoadout(event){if(event===null||typeof event!=="object"){throw new TypeError(`ShipLoadout.fromLoadout: event must be a Loadout event, received ${describeValue(event)}`)}const imported=normalizeLoadoutEvent(event);return new _ShipLoadout(imported.shipSymbol,imported.modules,imported.top,imported.sourcePurchase,imported.moduleStats)}static empty(shipSymbol){const layout=getShipSlots(requireString(shipSymbol,"ShipLoadout.empty: shipSymbol"));if(!layout){throw new TypeError(`ShipLoadout.empty: no slot layout for hull "${truncate(shipSymbol)}"`)}return new _ShipLoadout(layout.symbol,/* @__PURE__ */new Map,{})}static default(shipSymbol){const requested=requireString(shipSymbol,"ShipLoadout.default: shipSymbol");const loadout=getDefaultLoadout(requested);if(!loadout){throw new TypeError(`ShipLoadout.default: no default loadout for hull "${truncate(shipSymbol)}"`)}return new _ShipLoadout(loadout.symbol,new Map(loadout.modules.map(module=>[module.slot,{Slot:module.slot,Item:module.symbol}])),{})}get shipSymbol(){return this.#shipSymbol}get shipName(){return this.#top.ShipName??null}get shipIdent(){return this.#top.ShipIdent??null}get unladenMass(){return this.unladenMassResult.value}get unladenMassResult(){return this.#top.UnladenMass===void 0?this.#computedUnladenMass():completeResult(this.#top.UnladenMass)}#computedUnladenMass(){return calculateUnladenMass(getShipBySymbol(this.#shipSymbol)?.hullMass??null,this.#calculationModules())}get fuelCapacity(){return this.fuelCapacityResult.value}get fuelCapacityResult(){const cap=this.#top.FuelCapacity;if(cap?.Main!==void 0&&cap.Reserve!==void 0){return completeResult(Object.freeze({main:cap.Main,reserve:cap.Reserve}))}const computed=this.#computedFuelCapacity();if(computed.value===null)return computed;return completeResult(Object.freeze({main:cap?.Main??computed.value.main,reserve:cap?.Reserve??computed.value.reserve}))}get cargoCapacity(){return this.cargoCapacityResult.value}get cargoCapacityResult(){return this.#top.CargoCapacity===void 0?this.#computedCargoCapacity():completeResult(this.#top.CargoCapacity)}#computedCargoCapacity(){return calculateCargoCapacity(this.#calculationModules())}#computedFuelCapacity(){return calculateFuelCapacity(getShipBySymbol(this.#shipSymbol)?.reserveFuelCapacity??null,this.#calculationModules())}get hullValue(){return this.#top.HullValue??null}get modulesValue(){return this.#top.ModulesValue??null}get rebuy(){return this.#top.Rebuy??null}get sourcePurchase(){return this.#sourcePurchase}get validation(){const cached=this.#validationCache;if(cached!==null&&cached.version===this.#version)return cached.value;const slots=this.#layoutOrNull();const byKey=new Map(slots?.map(slot=>[slot.key.toLowerCase(),slot])??[]);const modules=[...this.#modules.values()].map(module=>{const stats=this.#statsFor(module);const slot=byKey.get(module.Slot.toLowerCase());const builtIn=stats===null&&isNonOutfittingSlot(module.Slot)||isBuiltInHullModule(module);const fitProblem=stats&&slot&&!builtIn?moduleFitProblem(this.#shipSymbol,slot,stats):null;return{slot:module.Slot,symbol:module.Item,known:stats!==null||builtIn,requiresKnownSlot:!builtIn,fitError:fitProblem?.message??null,...fitProblem===null?{}:{fitConstraint:fitProblem.constraint},...fitProblem?.params===void 0?{}:{fitParams:fitProblem.params},...stats?.exclusionGroup===void 0?{}:{exclusionGroup:stats.exclusionGroup},...stats?.limitGroup===void 0?{}:{limitGroup:stats.limitGroup},...stats?.limitIncrease===void 0?{}:{limitIncrease:stats.limitIncrease}}});const value=validateLoadout({shipSymbol:this.#shipSymbol,slots:slots,modules:modules});this.#validationCache={version:this.#version,value:value};return value}slots(kind){let cached=this.#slotCache;if(cached===null||cached.version!==this.#viewVersion){cached={version:this.#viewVersion,value:/* @__PURE__ */new Map};this.#slotCache=cached}const existing=cached.value.get(kind);if(existing!==void 0)return existing;const slots=kind===void 0?this.#layout():this.#layout().filter(slot=>slot.kind===kind);const currentLimits=this.#moduleLimits();const value=deepFreeze(slots.map(slot=>{const stats=this.#moduleStatsAt(slot.key);const immovableReason=slot.key.toLowerCase()==="cargohatch"?"cargoHatch":stats?.limitIncrease!==void 0&&this.#moduleLimitRegression(slot.key,null,currentLimits,stats)!==null?"moduleLimit":null;return{...slot,name:loadoutSlotName(slot),module:this.fittedModuleAt(slot.key),removable:immovableReason===null,...immovableReason===null?{}:{immovableReason:immovableReason}}}));cached.value.set(kind,value);return value}fittedModuleAt(slotKey){const module=this.#fittedModuleFor(slotKey);if(!module)return null;let cached=this.#fittedModuleCache;if(cached===null||cached.version!==this.#viewVersion){cached={version:this.#viewVersion,value:/* @__PURE__ */new Map};this.#fittedModuleCache=cached}const existing=cached.value.get(module.Slot);if(existing!==void 0)return existing;const raw=cloneLoadoutModule(module);const stats=this.#statsFor(module);const effective=effectiveModule(this.#moduleForEffectiveStats(module),stats);const value=deepFreeze({slot:module.Slot,symbol:raw.Item,on:raw.On,priority:raw.Priority,health:raw.Health,value:raw.Value,engineering:raw.Engineering,raw:raw,stats:stats===null?null:cloneModuleStats(stats),effectiveStats:effective===null?null:cloneModuleStats(effective),ammunition:ammunitionCapacity(effective),preEngineeredVariant:identifyPreEngineeredVariant(raw)});cached.value.set(module.Slot,value);return value}fittedModules(){return deepFreeze([...this.#modules.keys()].flatMap(key=>{const fitted=this.fittedModuleAt(key);return fitted===null?[]:[fitted]}))}availableBlueprints(slotKey){const module=this.#fittedModuleFor(slotKey);return deepFreeze(module?availableBlueprintsFor(module.Item,this.#statsFor(module)):[])}availableExperimentalEffects(slotKey){const module=this.#fittedModuleFor(slotKey);return deepFreeze(module?availableExperimentalsFor(module.Item,this.#statsFor(module)):[])}modulesForSlot(slotKey){const slot=this.#requireSlot(slotKey);const occupied=new Set([...this.#modules.values()].flatMap(fitted=>{if(fitted.Slot.toLowerCase()===slot.key.toLowerCase())return[];const group=this.#statsFor(fitted)?.exclusionGroup;return group===void 0?[]:[group]}));const currentLimits=this.#moduleLimits();const currentStats=this.#moduleStatsAt(slot.key);return ALL_MODULES.filter(module=>moduleFitError(this.#shipSymbol,slot,module)===null&&(module.exclusionGroup===void 0||!occupied.has(module.exclusionGroup))&&this.#moduleLimitRegression(slot.key,module,currentLimits,currentStats)===null)}setModule(slotKey,module){const slot=this.#requireSlot(slotKey);if(module===null||module===void 0){throw new TypeError(`ShipLoadout.setModule: no module supplied for "${truncate(slotKey)}" (did the module lookup return undefined?)`)}if(typeof module.symbol!=="string"){throw new TypeError(`ShipLoadout.setModule: module for "${truncate(slotKey)}" must be an outfitting module, received ${describeValue(module)}`)}const problem2=moduleFitProblem(this.#shipSymbol,slot,module);if(problem2){if(problem2.constraint==="immutableSlot"){throw new LoadoutEditError(`ShipLoadout.setModule: ${truncate(module.symbol)} → ${truncate(slotKey)}: ${problem2.message}`,"immutableSlot",{slot:slot.key})}throw new LoadoutEditError(`ShipLoadout.setModule: ${truncate(module.symbol)} → ${truncate(slotKey)}: ${problem2.message}`,"incompatibleModule",{...problem2.params,slot:slot.key,symbol:module.symbol,constraint:problem2.constraint},problem2.constraint)}if(module.exclusionGroup!==void 0){const conflict=[...this.#modules.values()].find(fitted=>fitted.Slot.toLowerCase()!==slot.key.toLowerCase()&&this.#statsFor(fitted)?.exclusionGroup===module.exclusionGroup);if(conflict){throw new LoadoutEditError(`ShipLoadout.setModule: ${truncate(module.symbol)} → ${truncate(slotKey)}: ${module.exclusionGroup} is limited to one per ship (already fitted in ${truncate(conflict.Slot)})`,"duplicateExclusiveModule",{exclusionGroup:module.exclusionGroup,slot:slot.key,symbol:module.symbol,previousSlot:conflict.Slot,previousSymbol:conflict.Item})}}const limitProblem=this.#moduleLimitRegression(slot.key,module);if(limitProblem!==null){throw new LoadoutEditError(`ShipLoadout.setModule: ${truncate(module.symbol)} → ${truncate(slotKey)}: ${limitProblem.group} would have ${limitProblem.count} modules but the ship allows ${limitProblem.limit}`,"moduleLimitExceeded",{group:limitProblem.group,count:limitProblem.count,limit:limitProblem.limit,slot:slot.key,symbol:module.symbol})}const key=this.#fittedKey(slotKey)??slot.key;this.#replaceModule(key,{Slot:key,Item:module.symbol},cloneModuleStats(module));return this}removeModule(slotKey){if(requireString(slotKey,SLOT_KEY).toLowerCase()==="cargohatch"){throw new LoadoutEditError("ShipLoadout.removeModule: the cargoHatch slot cannot be changed","immutableSlot",{slot:"CargoHatch"})}const key=this.#fittedKey(slotKey);if(key!==null){const limitProblem=this.#moduleLimitRegression(key,null);if(limitProblem!==null){const fitted=this.#modules.get(key);throw new LoadoutEditError(`ShipLoadout.removeModule: ${truncate(slotKey)}: ${limitProblem.group} would have ${limitProblem.count} modules but the ship allows ${limitProblem.limit}`,"moduleLimitExceeded",{group:limitProblem.group,count:limitProblem.count,limit:limitProblem.limit,slot:key,...fitted===void 0?{}:{symbol:fitted.Item}})}this.#replaceModule(key,null)}return this}applyBlueprint(slotKey,fdname,options){requireString(fdname,"ShipLoadout.applyBlueprint: fdname");if(options===null||typeof options!=="object"){throw new TypeError(`ShipLoadout.applyBlueprint: options must be an object with a grade, received ${describeValue(options)}`)}const wantedGrade=options.grade;const wantedQuality=options.quality;const wantedExperimental=options.experimental??void 0;requireStringIfPresent(wantedExperimental,"ShipLoadout.applyBlueprint: options.experimental");const module=this.#fittedModuleFor(slotKey);if(!module){throw new RangeError(`ShipLoadout.applyBlueprint: slot "${truncate(slotKey)}" is empty`)}const fittedStats=this.#statsFor(module);if(!fittedStats){throw new TypeError(`ShipLoadout.applyBlueprint: no stats for module "${truncate(module.Item)}"`)}const recipe=resolveBlueprintForModule(module.Item,fdname);const named=recipe===fdname?`"${truncate(fdname)}"`:`"${truncate(fdname)}" (${truncate(recipe)} on this module)`;const written=fdname.trim().toLowerCase();const resolved=recipe.trim().toLowerCase();if(getPreEngineeredVariants(module.Item).some(variant=>variant.acquisition==="eventReward"&&(variant.blueprint.toLowerCase()===written||variant.blueprint.toLowerCase()===resolved))){throw new TypeError(`ShipLoadout.applyBlueprint: ${named} is a fixed pre-engineered identity, not a craftable blueprint; use setPreEngineeredVariant to fit its fixed article`)}if(!Number.isInteger(wantedGrade)||wantedGrade<1||wantedGrade>5){throw new RangeError(`ShipLoadout.applyBlueprint: no blueprint ${named} grade ${truncate(wantedGrade)}`)}const grade=getBlueprintGrade(recipe,wantedGrade);if(!grade){throw new RangeError(`ShipLoadout.applyBlueprint: no blueprint ${named} grade ${truncate(wantedGrade)}`)}let experimental;if(wantedExperimental!==void 0){experimental=getExperimentalEffect(wantedExperimental);if(!experimental){throw new RangeError(`ShipLoadout.applyBlueprint: unknown experimental effect "${truncate(wantedExperimental)}"`)}}const quality=wantedQuality??1;if(!Number.isFinite(quality)||quality<0||quality>1){throw new RangeError(`ShipLoadout.applyBlueprint: quality must be a finite number in [0, 1]`)}if(fittedStats.engineeringLocked){throw new TypeError(`ShipLoadout.applyBlueprint: module "${truncate(module.Item)}" is a final pre-engineered article and accepts no further engineering`)}if(!blueprintAvailableFor(module.Item,fdname)){const offered=[...blueprintRoutesFor(module.Item)].map(([blueprint,route])=>`${blueprint} (${route})`);throw new TypeError(offered.length>0?`ShipLoadout.applyBlueprint: module "${truncate(module.Item)}" is not offered blueprint ${named}; available candidates are ${offered.join(", ")}`:`ShipLoadout.applyBlueprint: no registry lists an engineering menu for module "${truncate(module.Item)}"`)}if(wantedExperimental!==void 0&&!experimentalAvailableFor(module.Item,wantedExperimental)){const offered=getExperimentalsForModule(module.Item);throw new TypeError(`ShipLoadout.applyBlueprint: module "${truncate(module.Item)}" is not offered experimental effect "${truncate(wantedExperimental)}"; it takes ${offered.length>0?offered.join(", "):"no experimental effect"}`)}const stats=this.#engineeringBaseStats(module)??fittedStats;const base=baseStats(stats);const canonical=primitiveEngineeringInputsFor(stats,grade,experimental);const missing=missingBaseLabels(stats,base,canonical.grade.features,canonical.experimental?.modifiers);if(missing.length>0){throw new TypeError(`ShipLoadout.applyBlueprint: cannot compute ${named} for module "${truncate(module.Item)}"; missing base stats for ${missing.join(", ")}`)}const damageDistribution=experimental?.damageDistribution??grade.damageDistribution;const primitiveModifiers=computeModifiers(base,canonical.grade,quality,canonical.experimental);const modifiers=journalModifiersFor(stats,primitiveModifiers);if(damageDistribution){for(const type of["kinetic","thermal","explosive","absolute"]){const value=damageDistribution[type];if(value===void 0)continue;const label=labelsForDamageType(type)[0];if(label===void 0)continue;const damageModifier={Label:label,Value:value*scaleForLabel(label),OriginalValue:(stats.damageDistribution?.[type]??0)*scaleForLabel(label)};modifiers.push(damageModifier);primitiveModifiers.push(damageModifier)}}const engineering={BlueprintName:fdname,Level:wantedGrade,Quality:quality,...wantedExperimental!==void 0?{ExperimentalEffect:wantedExperimental}:{},Modifiers:modifiers};this.#replaceModule(module.Slot,{...module,Engineering:engineering},stats,primitiveModifiers);return this}setPreEngineeredVariant(slotKey,variant){if(variant===null||typeof variant!=="object"){throw new TypeError(`ShipLoadout.setPreEngineeredVariant: variant must be a pre-engineered variant, received ${describeValue(variant)}`)}requireString(variant.symbol,"ShipLoadout.setPreEngineeredVariant: variant.symbol");requireString(variant.blueprint,"ShipLoadout.setPreEngineeredVariant: variant.blueprint");requireString(variant.acquisition,"ShipLoadout.setPreEngineeredVariant: variant.acquisition");requireStringIfPresent(variant.experimental,"ShipLoadout.setPreEngineeredVariant: variant.experimental");const known=getPreEngineeredVariants(variant.symbol).find(candidate=>candidate.blueprint.toLowerCase()===variant.blueprint.toLowerCase()&&candidate.grade===variant.grade&&(candidate.experimental?.toLowerCase()??"")===(variant.experimental?.toLowerCase()??"")&&candidate.acquisition===variant.acquisition);if(!known){throw new RangeError(`ShipLoadout.setPreEngineeredVariant: no catalogued variant "${truncate(variant.blueprint)}" for module "${truncate(variant.symbol)}"`)}const stats=getPreEngineeredStats(known);const unresolved=unresolvedModifiers(known);if(unresolved.length>0){throw new TypeError(`ShipLoadout.setPreEngineeredVariant: cannot resolve "${truncate(variant.blueprint)}" for module "${truncate(variant.symbol)}"; missing base stats for ${unresolved.join(", ")}`)}this.setModule(slotKey,stats);const module=this.#fittedModuleFor(slotKey);const engineering={BlueprintName:known.blueprint,Level:known.grade,Quality:1,...known.experimental===void 0?{}:{ExperimentalEffect:known.experimental},...known.modifiers?.length?{Modifiers:getPreEngineeredJournalModifiers(known)}:{}};this.#replaceModule(module.Slot,{...module,Engineering:engineering},cloneModuleStats(stats),getPreEngineeredModifiers(known));return this}clearEngineering(slotKey){const module=this.#fittedModuleFor(slotKey);if(module&&this.#statsFor(module)?.engineeringLocked){throw new TypeError(`ShipLoadout.clearEngineering: module "${truncate(module.Item)}" is a final pre-engineered article and its engineering cannot be removed`)}if(module?.Engineering){const baseStats2=this.#engineeringBaseStats(module);const bare={Slot:module.Slot,Item:module.Item};if(module.On!==void 0)bare.On=module.On;if(module.Priority!==void 0){bare.Priority=module.Priority}if(module.Health!==void 0)bare.Health=module.Health;if(module.Value!==void 0)bare.Value=module.Value;this.#replaceModule(module.Slot,bare,baseStats2??void 0)}return this}setModuleEnabled(slotKey,on){this.#patchModule(slotKey,{On:on});return this}setModulePriority(slotKey,priority){if(!Number.isInteger(priority)||priority<0||priority>4){throw new RangeError(`ShipLoadout: power priority must be an integer 0-4, got ${truncate(priority)}`)}this.#patchModule(slotKey,{Priority:priority});return this}#patchModule(slotKey,patch){const module=this.#fittedModuleFor(slotKey);if(!module){throw new RangeError(`ShipLoadout: slot "${truncate(slotKey)}" is empty`)}this.#modules.set(module.Slot,cloneLoadoutModule({...module,...patch}));this.#viewVersion++}toLoadoutEvent(options={}){const hull=getShipBySymbol(this.#shipSymbol);const unladenMass=this.#computedUnladenMass().value;const cargoCapacity=this.#computedCargoCapacity().value;const fuel=this.#computedFuelCapacity().value;const maxJumpRange=this.#exportableJumpRange(unladenMass);return exportLoadoutEvent({shipSymbol:this.#shipSymbol,...this.#top.ShipName===void 0?{}:{shipName:this.#top.ShipName},...this.#top.ShipIdent===void 0?{}:{shipIdent:this.#top.ShipIdent},modules:this.#modules,...options.moduleOrder==="slots"?{layout:this.#layoutOrNull()}:{},sourcePurchase:this.#sourcePurchase,retailHullValue:hull?.hullCost??null,unladenMass:unladenMass,cargoCapacity:cargoCapacity,fuelCapacity:fuel,maxJumpRange:maxJumpRange,statsFor:module=>this.#statsFor(module)},options)}toSlef(options){return toSlef(this.toLoadoutEvent(options),options.header)}toSlefString(options){return stringifySlef(this.toSlef(options),{indent:options.indent??0})}#exportableJumpRange(unladenMass){if(unladenMass===null)return null;let drive;try{drive=this.#resolveDrive()}catch{return null}if(drive===null)return null;const tank=this.#computedFuelCapacity().value;if(tank===null)return null;return singleJumpRange(unladenMass,Math.min(tank.main,drive.maxFuel),drive)}get frameShiftDrive(){const drive=this.#resolveDrive();if(drive===null)throw new TypeError("ShipLoadout: build has no frame shift drive");return drive}#maxJumpFuel(fsd){return Math.min(this.#requireFuelCapacity().main,fsd.maxFuel)}frameShiftDriveMassFactor(options={}){requireLoadOptions("ShipLoadout.frameShiftDriveMassFactor",options);const fuel=options.fuel??this.#requireFuelCapacity().main;return frameShiftDriveMassFactor(this.#requireMass(options.cargo??0),fuel,this.frameShiftDrive)}maxJumpRange(){const fsd=this.frameShiftDrive;return singleJumpRange(this.#requireMass(0),this.#maxJumpFuel(fsd),fsd)}jumpRange(options={}){requireLoadOptions("ShipLoadout.jumpRange",options);const fsd=this.frameShiftDrive;const fuel=options.fuel??this.#requireFuelCapacity().main;return singleJumpRange(this.#requireMass(options.cargo??0),fuel,fsd)}ladenJumpRange(){return this.jumpRange({cargo:this.#requireCargoCapacity()})}fuelPerJump(distance,options={}){requireLoadOptions("ShipLoadout.fuelPerJump",options);const fsd=this.frameShiftDrive;const fuel=options.fuel??this.#requireFuelCapacity().main;return fuelPerJump(distance,this.#requireMass(options.cargo??0),fuel,fsd)}totalRange(options={}){requireLoadOptions("ShipLoadout.totalRange",options);return totalRange(this.#requireMass(options.cargo??0),options.fuel??this.#requireFuelCapacity().main,this.frameShiftDrive)}jumpRangeSummary(){const cargo=this.#requireCargoCapacity();const fsd=this.frameShiftDrive;const maxFuel=this.#maxJumpFuel(fsd);return{max:this.maxJumpRange(),unladen:this.jumpRange(),laden:this.jumpRange({cargo:cargo}),totalMax:this.totalRange({fuel:maxFuel}),totalUnladen:this.totalRange(),totalLaden:this.totalRange({cargo:cargo})}}powerBudget(){const modules=[...this.#modules.values()];const consumers=[];for(const module of modules){const consumer=powerConsumerFor(module,this.#statsFor(module));if(consumer)consumers.push(consumer)}return powerBudget(powerAvailable(modules,module=>this.#statsFor(module)),consumers)}heatMetrics(){const input=heatInputFor(this.#shipSymbol,this.#modulesForEffectiveStats(),this.powerBudget(),module=>this.#statsFor(module));return input?heatMetrics(input):null}mobilityMetrics(options={}){const enginesPips=options.enginesPips??4;if(!Number.isFinite(enginesPips)||enginesPips<0||enginesPips>4){throw new RangeError("ShipLoadout.mobilityMetrics: enginesPips must be a finite number from 0 to 4")}requireLoadOptions("ShipLoadout.mobilityMetrics",options);const input=mobilityInputFor(this.#shipSymbol,[...this.#modules.values()],()=>{const main=options.fuel??this.#top.FuelCapacity?.Main??this.#requireFuelCapacity().main;return this.#requireMass(options.cargo??0)+main},enginesPips,module=>this.#statsFor(module));return input?mobilityMetrics(input):null}shieldMetrics(options={}){const input=shieldInputFor(this.#shipSymbol,[...this.#modules.values()],options.systemsPips??0,module=>this.#statsFor(module));if(!input.generator)return null;return shieldMetrics(input)}shieldRecovery(options={}){const systemsPips=options.systemsPips??4;if(!Number.isFinite(systemsPips)||systemsPips<0||systemsPips>4){throw new RangeError("ShipLoadout.shieldRecovery: systemsPips must be a finite number from 0 to 4")}const input=shieldRecoveryInputFor(this.#shipSymbol,[...this.#modules.values()],systemsPips,module=>this.#statsFor(module));return input?shieldRecovery(input):null}cellBanks(){const banks=cellBankInputsFor([...this.#modules.values()],module=>this.#statsFor(module));const layout=this.#layoutOrNull();if(layout){const order=new Map(layout.map((slot,index)=>[slot.key.toLowerCase(),index]));banks.sort((left,right)=>(order.get(left.slot.toLowerCase())??Number.MAX_SAFE_INTEGER)-(order.get(right.slot.toLowerCase())??Number.MAX_SAFE_INTEGER))}return cellBankSummary(banks)}retailCredits(){const hull=getShipBySymbol(this.#shipSymbol)?.hullCost??null;let modules=0;const unpriced=[];for(const module of this.#modules.values()){const stats=this.#statsFor(module);if(stats?.cost!==void 0){modules+=stats.cost}else if(stats!==null||!isNonOutfittingSlot(module.Slot)&&!isBuiltInHullModule(module)){unpriced.push({slot:module.Slot,symbol:module.Item})}}return deepFreeze({hull:hull,modules:modules,rebuy:hull===null?null:Math.trunc((hull+modules)*.05),unpriced:unpriced})}armourMetrics(){return armourMetrics(armourInputFor(this.#shipSymbol,[...this.#modules.values()],module=>this.#statsFor(module)))}weaponMetrics(){const weapons=[];for(const module of this.#modules.values()){const record=this.#statsFor(module);const stats=weaponStatsFor(this.#moduleForEffectiveStats(module),record);if(!stats)continue;weapons.push({slot:module.Slot,symbol:module.Item,name:record?.name??module.Item,enabled:module.On!==false,metrics:weaponMetrics(stats),ammunition:ammunitionCapacity(stats)})}return{weapons:weapons,total:sumWeaponMetrics(weapons.filter(weapon=>weapon.enabled).map(weapon=>weapon.metrics))}}weaponsCapacitorMetrics(options={}){const weaponsPips=options.weaponsPips??4;if(!Number.isFinite(weaponsPips)||weaponsPips<0||weaponsPips>4){throw new RangeError("ShipLoadout.weaponsCapacitorMetrics: weaponsPips must be a finite number from 0 to 4")}return weaponsCapacitorMetrics(weaponsCapacitorInputFor(this.#modulesForEffectiveStats(),weaponsPips,this.powerBudget(),module=>this.#statsFor(module)))}distributorMetrics(options={}){const pips={systemsPips:options.systemsPips??4,enginesPips:options.enginesPips??4,weaponsPips:options.weaponsPips??4};for(const field of["systemsPips","enginesPips","weaponsPips"]){const value=pips[field];if(!Number.isFinite(value)||value<0||value>4){throw new RangeError(`ShipLoadout.distributorMetrics: ${field} must be a finite number from 0 to 4`)}}const input=distributorInputFor(this.#modulesForEffectiveStats(),pips,this.powerBudget(),module=>this.#statsFor(module));return input?distributorMetrics(input):null}#layoutOrNull(){if(this.#layoutCache===void 0){const layout=getShipSlots(this.#shipSymbol);this.#layoutCache=layout===null?null:Object.freeze(enumerateSlots(layout))}return this.#layoutCache}#invalidate(){this.#version++;this.#viewVersion++}#layout(){const layout=this.#layoutOrNull();if(!layout){throw new TypeError(`ShipLoadout: no slot layout for hull "${truncate(this.#shipSymbol)}"`)}return layout}#requireSlot(slotKey){const wanted=requireString(slotKey,SLOT_KEY).toLowerCase();const slot=this.#layout().find(s=>s.key.toLowerCase()===wanted);if(!slot){throw new RangeError(`ShipLoadout: hull "${truncate(this.#shipSymbol)}" has no slot "${truncate(slotKey)}"`)}return slot}#fittedKey(slotKey){return matchingKeyIn(this.#modules,requireString(slotKey,SLOT_KEY))}#fittedModuleFor(slotKey){const key=this.#fittedKey(slotKey);return key===null?void 0:this.#modules.get(key)}#require(result,what){if(result.value===null){throw new TypeError(`ShipLoadout: cannot determine ${what} (${result.issues.map(i=>i.message).join("; ")})`)}return result.value}#requireMass(cargo){return this.#require(this.unladenMassResult,"mass")+cargo}#requireFuelCapacity(){return this.#require(this.fuelCapacityResult,"fuel capacity")}#requireCargoCapacity(){return this.#require(this.cargoCapacityResult,"cargo capacity")}#calculationModules(){const cached=this.#calculationCache;if(cached!==null&&cached.version===this.#version)return cached.value;const value=this.#resolveCalculationModules();this.#calculationCache={version:this.#version,value:value};return value}#resolveCalculationModules(){return[...this.#modules.values()].map(module=>{const stats=this.#statsFor(module);const symbol=module.Item.toLowerCase();const parsedSlot=parseSlotName(module.Slot);const unresolvedOutfitting=stats===null&&!isNonOutfittingSlot(module.Slot)&&!isBuiltInHullModule(module);const isCargoRack=stats?.cargoCapacity!==void 0||stats?.engineeringGroup==="cargoRacks"||symbol.includes("cargorack");const isFuelTank=stats?.fuelCapacity!==void 0||stats?.slot==="fuelTank"||symbol.startsWith(FUEL_TANK_PREFIX);const mayCarryCapacity=unresolvedOutfitting&&(parsedSlot===null||parsedSlot.kind==="optional");const mayCarryFuel=mayCarryCapacity||unresolvedOutfitting&&parsedSlot?.kind==="core"&&parsedSlot.core==="fuelTank";return{slot:module.Slot,symbol:module.Item,mass:this.#moduleMass(module),...isCargoRack||mayCarryCapacity?{cargoCapacity:isCargoRack?this.#moduleCapacity(module,"CargoCapacity","cargoCapacity"):null}:{},...isFuelTank||mayCarryFuel?{fuelCapacity:isFuelTank?this.#moduleCapacity(module,"FuelCapacity","fuelCapacity"):null}:{}}})}#moduleLimits(){const entries=[...this.#modules.values()].flatMap(module=>{const stats=this.#statsFor(module);return stats===null?[]:[stats]});return calculateModuleLimits(entries)}#moduleStatsAt(slotKey){const fitted=this.#fittedModuleFor(slotKey);return fitted===void 0?null:this.#statsFor(fitted)}#engineeringBaseStats(module){const fitted=this.#statsFor(module);if(!module.Engineering||identifyPreEngineeredVariant(module)===null)return fitted;const stock=builtInModuleBySymbol(module.Item,FITTED_ITEM);if(!stock)return fitted;return fitted?.engineeringLocked?cloneModuleStats({...stock,engineeringLocked:true}):stock}#moduleForEffectiveStats(module){const modifiers=this.#primitiveModifiers.get(module.Slot);if(modifiers===void 0||module.Engineering===void 0)return module;return{...module,Engineering:{...module.Engineering,Modifiers:modifiers}}}#modulesForEffectiveStats(){return[...this.#modules.values()].map(module=>this.#moduleForEffectiveStats(module))}#moduleLimitRegression(slotKey,replacement,current=this.#moduleLimits(),previous=this.#moduleStatsAt(slotKey)){if(previous?.limitGroup===void 0&&previous?.limitIncrease===void 0&&replacement?.limitGroup===void 0&&replacement?.limitIncrease===void 0){return null}for(const usage of current){const count=usage.count-Number(previous?.limitGroup===usage.group)+Number(replacement?.limitGroup===usage.group);const increase=usage.increase-(previous?.limitIncrease?.group===usage.group?previous.limitIncrease.amount:0)+(replacement?.limitIncrease?.group===usage.group?replacement.limitIncrease.amount:0);const limit=usage.baseLimit+increase;const excess=Math.max(0,count-limit);if(excess>usage.excess){return{...usage,increase:increase,limit:limit,count:count,excess:excess}}}return null}#replaceModule(slotKey,replacement,replacementStats,primitiveModifiers){const previous=this.#modules.get(slotKey)??null;this.#adjustImportedFigures(previous,replacement,replacementStats);if(replacement===null){this.#modules.delete(slotKey);this.#moduleStats.delete(slotKey);this.#primitiveModifiers.delete(slotKey)}else{this.#modules.set(slotKey,cloneLoadoutModule(replacement));if(replacementStats!==void 0)this.#moduleStats.set(slotKey,replacementStats);if(primitiveModifiers===void 0)this.#primitiveModifiers.delete(slotKey);else this.#primitiveModifiers.set(slotKey,primitiveModifiers)}this.#invalidate()}#adjustImportedFigures(previous,next,nextStats){const previousMass=this.#moduleMass(previous);const nextMass=this.#moduleMass(next,nextStats);if(this.#top.UnladenMass!==void 0){if(previousMass===null||nextMass===null)delete this.#top.UnladenMass;else this.#top.UnladenMass+=nextMass-previousMass}const previousCargo=this.#moduleCapacity(previous,"CargoCapacity","cargoCapacity");const nextCargo=this.#moduleCapacity(next,"CargoCapacity","cargoCapacity",nextStats);if(this.#top.CargoCapacity!==void 0){if(previousCargo===null||nextCargo===null)delete this.#top.CargoCapacity;else this.#top.CargoCapacity+=nextCargo-previousCargo}const previousFuel=this.#moduleCapacity(previous,"FuelCapacity","fuelCapacity");const nextFuel=this.#moduleCapacity(next,"FuelCapacity","fuelCapacity",nextStats);if(this.#top.FuelCapacity?.Main!==void 0){const reserve=this.#top.FuelCapacity.Reserve;if(previousFuel===null||nextFuel===null){if(reserve===void 0)delete this.#top.FuelCapacity;else this.#top.FuelCapacity={Reserve:reserve}}else{this.#top.FuelCapacity={Main:this.#top.FuelCapacity.Main+nextFuel-previousFuel,...reserve===void 0?{}:{Reserve:reserve}}}}if(normalizeKey(previous?.Item,FITTED_ITEM)===normalizeKey(next?.Item,FITTED_ITEM)){return}delete this.#top.ModulesValue;delete this.#top.Rebuy}#moduleMass(module,statsOverride){if(module===null)return 0;const modified=getLoadoutModifier(module,"Mass");if(modified!==null)return modified;const stats=statsOverride??this.#statsFor(module);if(stats?.mass!==void 0)return stats.mass;if(isBuiltInHullModule(module))return 0;return stats===null&&isNonOutfittingSlot(module.Slot)?0:null}#moduleCapacity(module,modifierLabel,field,statsOverride){if(module===null)return 0;const modified=getLoadoutModifier(module,modifierLabel);if(modified!==null)return modified;const stats=statsOverride??this.#statsFor(module);if(stats?.[field]!==void 0)return stats[field];const symbol=module.Item.toLowerCase();const isFuelTank=stats?.slot?stats.slot==="fuelTank":symbol.startsWith(FUEL_TANK_PREFIX);const shouldCarryCapacity=field==="cargoCapacity"?symbol.includes("cargorack"):isFuelTank;return shouldCarryCapacity?null:0}#resolveDrive(){let fsdModule;for(const m of this.#modules.values()){const stats=this.#statsFor(m);const isDrive=stats?.slot?stats.slot==="frameShiftDrive":m.Item.toLowerCase().startsWith(FSD_PREFIX);if(isDrive){fsdModule=m;break}}if(!fsdModule)return null;const base=this.#statsFor(fsdModule);if(!base||base.fuelMul===void 0||base.fuelPower===void 0){throw new TypeError(`ShipLoadout: no jump constants in the stats catalogue for frame shift drive "${truncate(fsdModule.Item)}"`)}const optMass=getLoadoutModifier(fsdModule,"FSDOptimalMass")??base.optMass;const maxFuel=getLoadoutModifier(fsdModule,"MaxFuelPerJump")??base.maxFuel;if(optMass===void 0||maxFuel===void 0){const missing=[...optMass===void 0?["optMass"]:[],...maxFuel===void 0?["maxFuel"]:[]];throw new TypeError(`ShipLoadout: frame shift drive "${truncate(fsdModule.Item)}" has no ${missing.join(" or ")} in the stats catalogue`)}return{optMass:optMass,maxFuel:maxFuel,fuelMul:base.fuelMul,fuelPower:base.fuelPower,jumpBoost:this.#resolveJumpBoost()}}#resolveJumpBoost(){for(const m of this.#modules.values()){const stats=this.#statsFor(m);if(stats?.engineeringGroup!=="fsdBoosters"&&!m.Item.toLowerCase().startsWith(BOOSTER_PREFIX)){continue}if(m.On===false)continue;if(stats?.jumpBoost===void 0){throw new TypeError(`ShipLoadout: FSD booster "${truncate(m.Item)}" has no jumpBoost in the stats catalogue`)}return stats.jumpBoost}return 0}#statsFor(module){if(module===null)return null;const stats=this.#moduleStats.get(module.Slot)??builtInModuleBySymbol(module.Item,FITTED_ITEM);if(stats)return stats;return isBuiltInHullModule(module)?builtInModuleBySymbol("ModularCargoBayDoor","ShipLoadout: built-in module"):null}};export{LoadoutEditError,ShipLoadout};//# sourceMappingURL=chunk-BYBT5XSW.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ships/internal/loadout-metrics.ts","../src/ships/internal/loadout-views.ts","../src/ships/internal/loadout-fitting.ts","../src/ships/internal/loadout-export.ts","../src/ships/internal/loadout-import.ts","../src/ships/ship-loadout.ts"],"names":["weaponsCapacitorMetrics","shieldRecovery","cellBankSummary","shieldMetrics","getShipSlots","getShipBySymbol","getShipByName","parseSlef","toSlef","stringifySlef","getLoadoutModifier","enumerateSlots","parseSlotName","SLOT_RESTRICTION_LABELS","sourcePurchaseFromLoadout","getSourceModuleValue","powerBudget","isNonOutfittingSlot","isBuiltInHullModule","cloneLoadoutModule","identifyPreEngineeredVariant","cloneModuleStats","availableBlueprintsFor","availableExperimentalsFor","blueprintAvailableFor","blueprintRoutesFor","experimentalAvailableFor","primitiveEngineeringInputsFor","missingBaseLabels","journalModifiersFor","getPreEngineeredStats","unresolvedModifiers","getPreEngineeredJournalModifiers","getPreEngineeredModifiers","matchingKeyIn","FITTED_ITEM","isFinalGuardianWeaponEngineering","scaleDamageComponents","weaponMetrics","sumWeaponMetrics","combinedRateOfFire","builtInModuleBySymbol","getBulkheadsForShip","getPreEngineeredVariants","singleJumpRange","frameShiftDriveMassFactor","fuelPerJump","totalRange","completeResult","calculateUnladenMass","calculateCargoCapacity","calculateFuelCapacity","validateLoadout","mobilityMetrics","calculateModuleLimits","ALL_MODULES","CORE_MODULES","getDefaultLoadout","distributorMetrics","getExperimentalEffect","heatMetrics","ammunitionCapacity","armourMetrics","baseStats","computeModifiers","labelsForDamageType","scaleForLabel","fieldForLabel","labelsForField","capabilityValueForLabel","damageTypeForLabel","resolveBlueprintForModule","getExperimentalsForModule","getBlueprintGrade","normalizeKey","truncate","describeValue","requireString","requireStringIfPresent","deepFreeze","PREFIX","powerPlant","thrusters","frameShiftDrive","powerDistributor","shieldGenerator","shieldCellBank","shieldBooster","shieldReinforcement","hullReinforcement","moduleReinforcement","startsWithAny","symbol","prefixes","some","prefix","toLowerCase","startsWith","isPowerDistributor","module","stats","slot","Item","isEnabled","On","priorityOf","Priority","effectiveStat","field","stated","statedModifier","base","label","modified","effectiveCapability","Engineering","Modifiers","modifier","Label","effectiveDamageDistribution","fromEffect","ExperimentalEffect","damageDistribution","distribution","resolved","Value","type","convertsDamage","modifierRatio","effective","relatedStat","ratio","effectiveModule","merged","fields","Set","Object","keys","add","key","capability","value","engineeringGroup","massRatio","minMass","maxMass","performanceRatio","minMultiplier","maxMultiplier","category","normalizeEffectiveWeapon","damageComponents","damage","powerConsumerFor","draw","parsedSlot","Slot","mounted","deployedOnly","alwaysPowered","kind","common","priority","enabled","inherentlyPassiveSlot","core","drawUnknown","powerAvailable","modules","statsFor","isPlant","mapResistanceFields","read","kineticResistance","thermalResistance","explosiveResistance","causticResistance","resistancesOf","shieldInputFor","shipSymbol","systemsPips","hull","generator","boosters","reinforcement","strengthRatio","optMass","Math","max","optMultiplier","push","shieldBoost","hullMass","baseShieldStrength","mobilityInputFor","mass","enginesPips","isThruster","optSpeedMultiplier","speedCurve","minSpeedMultiplier","maxSpeedMultiplier","optRotationMultiplier","rotationCurve","minRotationMultiplier","maxRotationMultiplier","minimumSpeed","maximumSpeed","boost","minPitch","pitch","minRoll","roll","minYaw","yaw","shieldRecoveryInputFor","distributor","generatorStats","distributorStats","strength","regenRate","brokenRegenRate","distributorDraw","systemsCapacity","systemsRecharge","weaponsCapacitorInputFor","weaponsPips","budget","weaponsCapacity","weaponsRecharge","sustainedEnergyPerSecond","poweredStates","deployed","weapon","weaponStatsFor","distributorInputFor","pips","retracted","enginesCapacity","enginesRecharge","heatInputFor","heatEfficiency","thrusterHeatRate","deployedThrusterHeatRate","fsdHeatRate","weapons","running","heat","heatPerSecond","sustainedHeatPerSecond","heatCapacity","heatDissipation","retractedPowerDraw","poweredDraw","deployedPowerDraw","unknownDraws","map","consumer","state","powered","bands","reduce","total","band","min","length","poweredRetracted","poweredDeployed","cellBankInputsFor","banks","ammunition","reinforcementRate","shieldBankReinforcement","cells","spinUp","shieldBankSpinUp","duration","shieldBankDuration","shieldBankHeat","stockBulkhead","variants","name","find","v","endsWith","armourInputFor","reinforcements","moduleReinforcements","bulkhead","hullBoost","moduleProtection","integrity","stock","baseArmour","WEAPON_FIELDS","projectileRange","burstAdjustedRateOfFire","touched","rate","rateOfFire","statedDamagePerSecond","firingFactor","Number","roundsPerShot","maximumRange","falloffRange","CORE_NAMES","lifeSupport","sensors","fuelTank","RESTRICTED_OPTIONAL_NAMES","military","cargo","limpetController","vesselHangar","passenger","trailingDigits","start","code","charCodeAt","slice","loadoutSlotName","match","exec","restriction","numbered","optional","size","MILITARY_PREFIXES","MINING_PREFIXES","CARGO_PREFIXES","RESTRICTED_SLOT_PREFIXES","mining","planetaryApproachSuite","problem","constraint","message","params","restrictionProblem","moduleSlotProblem","required","restrictedToSlot","moduleFitProblem","ship","armourHull","armourShipName","armourShipSymbol","shipName","restricted","restrictedToShips","allowedShipNames","labels","index","join","allowedShipSymbols","wrongMount","moduleSlot","requiredCore","isFuelTank","class","moduleClass","slotSize","moduleFitError","REBUY_FRACTION","exportLoadoutEvent","input","options","fromSource","credits","source","sourcePurchase","totals","sourceTotalsHold","hullValue","retailHullValue","modulesValue","computedModulesValue","rebuy","trunc","event","Ship","ShipName","shipIdent","ShipIdent","HullValue","ModulesValue","unladenMass","UnladenMass","cargoCapacity","CargoCapacity","maxJumpRange","MaxJumpRange","fuelCapacity","FuelCapacity","Main","main","Reserve","reserve","Rebuy","Modules","exportModules","ordered","moduleOrder","slotOrderedModules","layout","values","on","explicitPower","sourceModuleValue","moduleValue","Health","TypeError","remaining","Map","get","delete","sum","cost","SOURCE_ITEM","entry","item","moduleValues","fitted","captureLoadoutEvent","Array","isArray","captureEach","captureModule","capture","captured","health","engineering","captureEngineering","experimental","experimentalLocalised","ExperimentalEffect_Localised","modifiers","BlueprintName","Level","Quality","normalizeLoadoutEvent","rawEvent","slots","entries","normalizedSlot","has","set","top","moduleStats","variant","variantStats","engineeringLocked","normalizedBlueprint","normalizedExperimental","exact","candidate","blueprint","grade","SLOT_KEY","requireLoadOptions","scope","isFinite","RangeError","LoadoutEditError","constructor","super","this","fromEntries","FSD_PREFIX","BOOSTER_PREFIX","FUEL_TANK_PREFIX","ShipLoadout","_ShipLoadout","primitiveModifiers","version","viewVersion","layoutCache","calculationCache","validationCache","fittedModuleCache","slotCache","fromSlef","fromLoadout","data","imported","empty","requested","loadout","unladenMassResult","computedUnladenMass","calculationModules","fuelCapacityResult","cap","freeze","computed","computedFuelCapacity","cargoCapacityResult","computedCargoCapacity","reserveFuelCapacity","validation","cached","layoutOrNull","byKey","builtIn","fitProblem","known","requiresKnownSlot","fitError","fitConstraint","fitParams","exclusionGroup","limitGroup","limitIncrease","existing","filter","currentLimits","moduleLimits","moduleStatsAt","immovableReason","moduleLimitRegression","fittedModuleAt","removable","slotKey","fittedModuleFor","raw","moduleForEffectiveStats","effectiveStats","preEngineeredVariant","fittedModules","flatMap","availableBlueprints","availableExperimentalEffects","modulesForSlot","requireSlot","occupied","group","currentStats","setModule","conflict","previousSlot","previousSymbol","limitProblem","count","limit","fittedKey","replaceModule","removeModule","applyBlueprint","fdname","wantedGrade","wantedQuality","quality","wantedExperimental","fittedStats","recipe","named","written","trim","acquisition","isInteger","offered","route","engineeringBaseStats","canonical","missing","features","damageModifier","OriginalValue","setPreEngineeredVariant","unresolved","clearEngineering","bare","setModuleEnabled","patchModule","setModulePriority","patch","toLoadoutEvent","fuel","exportableJumpRange","hullCost","header","toSlefString","indent","drive","resolveDrive","tank","maxFuel","maxJumpFuel","fsd","requireFuelCapacity","requireMass","jumpRange","ladenJumpRange","requireCargoCapacity","distance","jumpRangeSummary","unladen","laden","totalMax","totalUnladen","totalLaden","consumers","modulesForEffectiveStats","cellBanks","order","sort","left","right","MAX_SAFE_INTEGER","retailCredits","unpriced","record","metrics","invalidate","wanted","s","require","result","what","issues","i","resolveCalculationModules","unresolvedOutfitting","isCargoRack","includes","mayCarryCapacity","mayCarryFuel","moduleMass","moduleCapacity","replacement","current","previous","usage","increase","amount","baseLimit","excess","replacementStats","adjustImportedFigures","next","nextStats","previousMass","nextMass","previousCargo","nextCargo","previousFuel","nextFuel","statsOverride","modifierLabel","shouldCarryCapacity","fsdModule","m","isDrive","fuelMul","fuelPower","jumpBoost","resolveJumpBo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