@elite-dangerous-almanac/core 0.2.10 → 0.2.11

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.
Files changed (36) hide show
  1. package/README.md +5 -3
  2. package/dist/chunk-36I5QLTL.js +1 -0
  3. package/dist/chunk-36I5QLTL.js.map +1 -0
  4. package/dist/chunk-4WC5NHBJ.js +1 -0
  5. package/dist/chunk-4WC5NHBJ.js.map +1 -0
  6. package/dist/{chunk-HIJR7DOC.js → chunk-53EBUFVU.js} +1 -1
  7. package/dist/{chunk-HIJR7DOC.js.map → chunk-53EBUFVU.js.map} +1 -1
  8. package/dist/chunk-A6QTYK2D.js +1 -0
  9. package/dist/chunk-A6QTYK2D.js.map +1 -0
  10. package/dist/{chunk-5VWACBTN.js → chunk-DBJKLXLS.js} +1 -1
  11. package/dist/{chunk-5VWACBTN.js.map → chunk-DBJKLXLS.js.map} +1 -1
  12. package/dist/{chunk-X3MXPE7G.js → chunk-RA6SY445.js} +1 -1
  13. package/dist/{chunk-G7WARJ3X.js → chunk-ZWT5Y3JR.js} +1 -1
  14. package/dist/chunk-ZWT5Y3JR.js.map +1 -0
  15. package/dist/equipment/index.d.ts +7 -0
  16. package/dist/equipment/index.js +1 -1
  17. package/dist/equipment/suit-loadout.d.ts +284 -0
  18. package/dist/equipment/suit-loadout.js +1 -0
  19. package/dist/equipment/suit-loadout.js.map +1 -0
  20. package/dist/i18n/index.js +1 -1
  21. package/dist/materials/index.js +1 -1
  22. package/dist/materials/micro-resources-all.js +1 -1
  23. package/dist/materials/micro-resources.js +1 -1
  24. package/dist/ships/build-metrics.js +1 -1
  25. package/dist/ships/index.js +1 -1
  26. package/dist/ships/shields.d.ts +4 -1
  27. package/dist/ships/shields.js +1 -1
  28. package/dist/ships/ship-loadout.d.ts +5 -1
  29. package/dist/ships/ship-loadout.js +1 -1
  30. package/package.json +5 -1
  31. package/dist/chunk-G7WARJ3X.js.map +0 -1
  32. package/dist/chunk-GVNTKCVF.js +0 -1
  33. package/dist/chunk-GVNTKCVF.js.map +0 -1
  34. package/dist/chunk-ZBUTGTZ3.js +0 -1
  35. package/dist/chunk-ZBUTGTZ3.js.map +0 -1
  36. /package/dist/{chunk-X3MXPE7G.js.map → chunk-RA6SY445.js.map} +0 -0
@@ -1 +1 @@
1
- export{shieldMassCurveMultiplier,shieldMetrics,shieldStrength}from"../chunk-5VWACBTN.js"; //# sourceMappingURL=shields.js.map
1
+ export{shieldMassCurveMultiplier,shieldMetrics,shieldStrength}from"../chunk-DBJKLXLS.js"; //# sourceMappingURL=shields.js.map
@@ -72,7 +72,11 @@ interface FittedModule {
72
72
  * A module engineered through {@link ShipLoadout.applyBlueprint} also retains
73
73
  * recipe-only burst values that its journal-shaped modifier block does not serialize.
74
74
  * A festive variant fitted through {@link ShipLoadout.setPreEngineeredVariant} uses
75
- * its fixed modifier block.
75
+ * its fixed modifier block. A thruster's or shield generator's mass curve moves as a
76
+ * whole. A recipe names the optimal mass and the optimal multiplier, and the four
77
+ * endpoints follow them. A generator's maximum mass is the exception: a lightened
78
+ * optimum leaves it where it was. So this record carries the curve the build's own
79
+ * metrics read.
76
80
  */
77
81
  readonly effectiveStats: OutfittingModule | null;
78
82
  /** Fully rearmed ammunition capacity, or `null` for modules without ammunition. */
@@ -1 +1 @@
1
- export{LoadoutEditError,ShipLoadout}from"../chunk-HIJR7DOC.js"; //# sourceMappingURL=ship-loadout.js.map
1
+ export{LoadoutEditError,ShipLoadout}from"../chunk-53EBUFVU.js"; //# sourceMappingURL=ship-loadout.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elite-dangerous-almanac/core",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
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,
@@ -186,6 +186,10 @@
186
186
  "types": "./dist/equipment/modifications.d.ts",
187
187
  "import": "./dist/equipment/modifications.js"
188
188
  },
189
+ "./equipment/suit-loadout": {
190
+ "types": "./dist/equipment/suit-loadout.d.ts",
191
+ "import": "./dist/equipment/suit-loadout.js"
192
+ },
189
193
  "./equipment/suits": {
190
194
  "types": "./dist/equipment/suits.d.ts",
191
195
  "import": "./dist/equipment/suits.js"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/ships/build-metrics.ts"],"names":["weaponsCapacitorMetrics","shieldCapacitorMetrics","cellBankSummary","shieldRecovery","loadoutInternals","fittedThrusterParamsFor","preEngineeredVariantFor","powerConsumerFor","powerAvailable","heatInputResultFor","completeResult","cellBankInputsFor","armourInputFor","weaponStatsFor","weaponsCapacitorInputFor","mobilityInputResultFor","shieldInputResultFor","shieldCapacitorInputResultFor","shieldRecoveryInputResultFor","distributorInputResultFor","incompleteResult","weaponMetrics","sumWeaponMetrics","isNonOutfittingSlot","isBuiltInHullModule","orderBySlotLayout","shieldMetrics","powerBudget","frameShiftDriveMassFactor","singleJumpRange","fuelPerJump","totalRange","calculateUnladenMass","mobilityCapacitorMetrics","mobilityMetrics","distributorMetrics","getExperimentalEffectCost","heatMetrics","ammunitionCapacity","armourMetrics","requirePips","requireFiniteNonNegative","getBlueprintCost","sumMaterials","deepFreeze","FACADE","requireLoadOptions","scope","options","field","value","BuildMetrics","_BuildMetrics","build","state","constructor","this","of","loadout","frameShiftDrive","drive","resolveDrive","TypeError","thrusters","modules","statsFor","loadedMass","cargo","fuel","fuelCapacity","main","maxJumpRange","fsd","maxJumpFuel","jumpRange","ladenJumpRange","cargoCapacity","distance","standardLoadResult","load","standardLoad","jumpRangeSummary","maximum","require","unladen","laden","max","totalMax","totalUnladen","totalLaden","buildMass","unladenMass","Object","freeze","hull","ship","hullMass","calculationModules","total","buildCost","hullCost","mercCoins","unpriced","materials","module","stats","cost","Slot","push","slot","symbol","Item","variant","mercCoinCost","engineering","Engineering","grade","Level","bought","Number","isInteger","climb","BlueprintName","experimental","ExperimentalEffect","toLowerCase","experimentalEffectSymbol","credits","rebuy","Math","trunc","consumers","consumer","heatMetricsResult","input","effectiveModules","complete","mobilityMetricsResult","mobility","mobilityCapacitorMetricsResult","mobilityCapacitor","shieldMetricsResult","shields","shieldCapacitorMetricsResult","shieldCapacitor","shieldRecoveryResult","recovery","cellBanks","layout","bank","weapons","record","effectiveModule","name","enabled","On","metrics","ammunition","maximumRange","falloffRange","projectileRange","armourPiercing","orderedWeapons","weapon","filter","map","weaponsPips","distributorMetricsResult","distributor","mobilityInput","enginesPips","statedMainFuel","systemsPips","pips","RangeError","mass","maximumFuel","fitted","frameShiftDriveModule","driveError","maxFuel","error","Error","reason","message","params","carriedFuel","min","isFinite","driveParams","result","what","issues","issue","join"],"mappings":"O,o/CAmHA,IAAM6C,OAAS,eAuQf,SAASC,mBAAmBC,MAAeC,SACvC,IAAA,MAAWC,QAAS,CAAC,OAAQ,SAAmB,CAC5C,MAAMC,MAAQF,QAAQC,OACtB,GAAIC,aAAU,EAAWT,yBAAyBM,MAAOE,MAAOC,MACpE,CACJ,CAuBO,IAAMC,aAAN,MAAMC,cACAC,OACAC,OAED,WAAAC,CAAYF,MAAoBC,OACpCE,MAAKH,MAASA,MACdG,MAAKF,MAASA,KAClB,CAqBA,SAAOG,CAAGJ,OACN,OAAO,IAAID,cAAaC,MAAOjD,iBAAiBiD,MAAO,GAAGR,oBAC9D,CASA,OAAAa,GACI,OAAOF,MAAKH,KAChB,CAUA,eAAAM,GACI,MAAMC,MAAQJ,MAAKF,MAAOO,eAC1B,GAAID,QAAU,KAAM,CAChB,MAAM,IAAIE,UAAU,GAAGjB,yCAC3B,CACA,OAAOe,KACX,CAgCA,SAAAG,GACI,OAAO1D,wBAAwBmD,MAAKF,MAAOU,UAAWR,MAAKF,MAAOW,SACtE,CAyBA,yBAAArC,CAA0BoB,QAAuB,CAAA,GAC7CF,mBAAmB,GAAGD,mCAAoCG,SAC1D,OAAOpB,0BACH4B,MAAKU,WAAYlB,QAAQmB,OAAS,GAClCnB,Q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OAAOnL,eAAewC,MAC1B,CAGA,QAAAiC,CAAY2G,OAA8BC,MACtC,GAAID,OAAO5I,QAAU,KAAM,CACvB,MAAM,IAAIY,UACN,GAAGjB,4BAA4BkJ,SAASD,OAAOE,OAAO3B,IAAK4B,OAAUA,MAAMT,SAASU,KAAK,SAEjG,CACA,OAAOJ,OAAO5I,KAClB,CAGA,WAAAgB,CAAYC,OACR,OAAOX,MAAKH,MAAOsC,YAAcxB,KACrC,CAGA,YAAAM,CAAaD,KACT,OAAOyD,KAAK0D,IAAInI,MAAKH,MAAOgB,aAAaC,KAAME,IAAI4G,QACvD,UACJjI"}
@@ -1 +0,0 @@
1
- import{ITEM_MICRO_RESOURCES}from"./chunk-WHWFKHV3.js";import{COMPONENT_MICRO_RESOURCES}from"./chunk-HTB52N6S.js";import{CONSUMABLE_MICRO_RESOURCES}from"./chunk-K7L7SMIR.js";import{DATA_MICRO_RESOURCES}from"./chunk-GVLDFJEY.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-GVNTKCVF.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/materials/micro-resources-all.ts"],"names":["ITEM_MICRO_RESOURCES","COMPONENT_MICRO_RESOURCES","CONSUMABLE_MICRO_RESOURCES","DATA_MICRO_RESOURCES","ALL_MICRO_RESOURCES","Object","freeze"],"mappings":"O,4NA6BO,IAAMI,oBAAgDC,OAAOC,OAAO,IACpEL,6BACAC,8BACAC,wBACAH,8BACNI"}
@@ -1 +0,0 @@
1
- import{getLoadoutModifier}from"./chunk-T4MKUKYS.js";import{sourcePurchaseFromLoadout}from"./chunk-NIURLW2F.js";import{weaponMetrics}from"./chunk-AAU7OM47.js";import{isBuiltInHullSymbol,identifyPreEngineeredVariant,unrollableFixedArticle,cloneLoadoutModule,isNonOutfittingSlot,isBuiltInHullModule,matchingKeyIn,ownKeyIn,getPreEngineeredStats,getPreEngineeredModifiers,cloneModuleStats,isFinalGuardianWeaponEngineering,scaleDamageComponents}from"./chunk-C3YZ5KTA.js";import{getPreEngineeredVariants}from"./chunk-AUBV6S7V.js";import{shieldMetrics}from"./chunk-5VWACBTN.js";import{getShipBySymbol,getShipByName,getShipSlots}from"./chunk-C4FUV6GF.js";import{builtInModuleBySymbol,getBulkheadsForShip}from"./chunk-OSMBAFRW.js";import{CORE_MODULES}from"./chunk-ZZTDEDXJ.js";import{stockedMountKind}from"./chunk-M6J7KP7G.js";import{getDefaultLoadout}from"./chunk-KY7KSPU6.js";import{getExperimentalEffect}from"./chunk-77I24V6B.js";import{ammunitionCapacity}from"./chunk-AA3K5XUE.js";import{fieldForLabel,scaleForLabel,labelsForField,capabilityValueForLabel,damageTypeForLabel}from"./chunk-U73MBQ45.js";import{BURST_PATTERN_LABELS,journalRateOfFire,preciseValueFor}from"./chunk-EFQOUATZ.js";import{parseSlotName,SLOT_RESTRICTION_LABELS,enumerateSlots}from"./chunk-RAO35XDF.js";import{normalizeKey}from"./chunk-BKWLI44T.js";import{truncate,requireString,describeValue,requireStringIfPresent}from"./chunk-PKWVG2JY.js";import{deepFreeze}from"./chunk-DURKO7JU.js";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","int_largebuggybay","int_mkiilargebuggybay"],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(isBuiltInHullSymbol(module.symbol)){return problem("builtInHullModule","the cargo hatch is part of the hull, not an outfitting module")}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}function preEngineeredVariantFor(module){return identifyPreEngineeredVariant(module)??(module.Engineering?unrollableFixedArticle(module.Item,module.Engineering):null)}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 hullLayout(shipSymbol){const slots=getShipSlots(shipSymbol);return slots?enumerateSlots(slots):[]}function stockedMountRejects(shipSymbol,layout,slot,stats){const mount=layout.find(candidate=>candidate.key.toLowerCase()===slot.toLowerCase());return mount!==void 0&&moduleFitProblem(shipSymbol,mount,stats)!==null}function normalizeLoadoutEvent(rawEvent){const event=captureLoadoutEvent(rawEvent);requireString(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};let invalidatesAggregates=false;const outcomes=[];const defaults=getDefaultLoadout(event.Ship)?.modules??[];let layout;for(const[slot,module]of modules){if(isNonOutfittingSlot(slot)||isBuiltInHullModule(module))continue;const stats=builtInModuleBySymbol(module.Item,"ShipLoadout.fromLoadout: module.Item");const parsed=parseSlotName(slot);const stocked=parsed===null?null:stockedMountKind(parsed);const fallback=stocked===null?void 0:defaults.find(candidate=>candidate.slot.toLowerCase()===slot.toLowerCase());const rejected=fallback!==void 0&&(stats===null||stocked==="cargoHatch"||stockedMountRejects(event.Ship,layout??=hullLayout(event.Ship),slot,stats));if(stats!==null&&!rejected)continue;if(fallback){modules.set(slot,{Slot:slot,Item:fallback.symbol,...module.On===void 0?{}:{On:module.On},...module.Priority===void 0?{}:{Priority:module.Priority},...module.Health===void 0?{}:{Health:module.Health}});outcomes.push({action:"defaulted",slot:slot,sourceSymbol:module.Item,replacementSymbol:fallback.symbol})}else{modules.delete(slot);outcomes.push({action:"emptied",slot:slot,sourceSymbol:module.Item})}invalidatesAggregates=true}for(const fallback of defaults){const parsed=parseSlotName(fallback.slot);const stocked=parsed===null?null:stockedMountKind(parsed);if(stocked===null||matchingKeyIn(modules,fallback.slot)!==null)continue;const slot=ownKeyIn(modules,fallback.slot);modules.set(slot,{Slot:slot,Item:fallback.symbol});outcomes.push({action:"defaulted",slot:slot,sourceSymbol:null,replacementSymbol:fallback.symbol});if(stocked==="core")invalidatesAggregates=true}if(invalidatesAggregates){delete top.ModulesValue;delete top.Rebuy;delete top.UnladenMass;delete top.CargoCapacity;delete top.FuelCapacity}const moduleStats=/* @__PURE__ */new Map;const primitiveModifiers=/* @__PURE__ */new Map;for(const module of modules.values()){const engineering=module.Engineering;const variant=preEngineeredVariantFor(module);const catalogueVariantStats=variant?getPreEngineeredStats(variant):null;let variantStats=catalogueVariantStats;const retainsBakedExperimental=variant?.experimentalEffectSymbol!==void 0&&typeof engineering?.ExperimentalEffect==="string"&&variant.experimentalEffectSymbol.trim().toLowerCase()===engineering.ExperimentalEffect.trim().toLowerCase();if(variant&&catalogueVariantStats&&!catalogueVariantStats.engineeringLocked&&!retainsBakedExperimental){const{experimentalEffectSymbol:originalExperimental,...withoutExperimental}=variant;const currentExperimental=engineering?.ExperimentalEffect;const currentVariant=typeof currentExperimental==="string"?{...withoutExperimental,experimentalEffectSymbol:currentExperimental}:withoutExperimental;variantStats=getPreEngineeredStats(withoutExperimental);primitiveModifiers.set(module.Slot,[...engineering?.Modifiers??[],...getPreEngineeredModifiers(currentVariant)])}if(variantStats)moduleStats.set(module.Slot,cloneModuleStats(variantStats));const guardianFinal=typeof engineering?.BlueprintName==="string"&&isFinalGuardianWeaponEngineering(module.Item,engineering.BlueprintName);if(variantStats?.engineeringLocked||typeof engineering?.BlueprintName!=="string"||!guardianFinal){continue}const normalizedBlueprint=normalizeKey(engineering.BlueprintName,"ShipLoadout.fromLoadout: module.Engineering.BlueprintName");const normalizedExperimental=normalizeKey(engineering.ExperimentalEffect,"ShipLoadout.fromLoadout: module.Engineering.ExperimentalEffect");const variants=getPreEngineeredVariants(module.Item);const exact=variants.find(candidate=>candidate.engineeringLocked===true&&candidate.blueprintSymbol.toLowerCase()===normalizedBlueprint&&candidate.grade===engineering.Level&&candidate.experimentalEffectSymbol?.toLowerCase()===normalizedExperimental);const guardianBase=variants.find(candidate=>candidate.engineeringLocked===true&&candidate.blueprintSymbol.toLowerCase()===normalizedBlueprint&&candidate.grade===engineering.Level&&candidate.experimentalEffectSymbol===void 0);const stats=exact?getPreEngineeredStats(exact):guardianBase&&engineering.ExperimentalEffect!==void 0?getPreEngineeredStats({...guardianBase,experimentalEffectSymbol:engineering.ExperimentalEffect}):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,primitiveModifiers:primitiveModifiers,top:top,sourcePurchase:sourcePurchaseFromLoadout(event),outcomes:deepFreeze(outcomes)}}var NO_ISSUES=Object.freeze([]);function completeResult(value){return Object.freeze({value:value,complete:true,issues:NO_ISSUES})}function incompleteResult(issues){return Object.freeze({value:null,complete:false,issues:Object.freeze(issues.map(issue=>Object.freeze({...issue,...issue.params?{params:Object.freeze({...issue.params})}:{}})))})}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 isPowerPlant(module,stats){const parsed=parseSlotName(module.Slot);if(parsed?.kind==="core"&&parsed.core==="powerPlant")return true;return stats?.slot?stats.slot==="powerPlant":startsWithAny(module.Item,PREFIX.powerPlant)}function isThruster(module,stats){const parsed=parseSlotName(module.Slot);if(parsed?.kind==="core"&&parsed.core==="thrusters")return true;return stats?.slot?stats.slot==="thrusters":startsWithAny(module.Item,PREFIX.thrusters)}function isFrameShiftDrive(module,stats){const parsed=parseSlotName(module.Slot);if(parsed?.kind==="core"&&parsed.core==="frameShiftDrive")return true;return stats?.slot?stats.slot==="frameShiftDrive":startsWithAny(module.Item,PREFIX.frameShiftDrive)}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;const seen=/* @__PURE__ */new Set;for(const modifier of module.Engineering?.Modifiers??[]){const type=damageTypeForLabel(modifier.Label);if(type===null||seen.has(type))continue;seen.add(type);if(modifier.Value===void 0)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);if(draw===void 0||draw===0)return null;const mounted=stats?.category==="hardpoint"||stats?.category==="utility";return{draw:draw,priority:priorityOf(module),enabled:isEnabled(module),deployedOnly:mounted&&stats?.alwaysPowered!==true,label:module.Slot,symbol:module.Item}}function powerAvailable(modules,statsFor){for(const module of modules){const stats=statsFor(module);if(!isPowerPlant(module,stats))continue;if(!isEnabled(module))return 0;return effectiveStat(module,"powerCapacity",stats)??0}return 0}var DEFAULT_SLOT={powerCapacity:"PowerPlant",heatEfficiency:"PowerPlant",thrusters:"MainEngines",powerDistributor:"PowerDistributor"};var UNRESOLVED_FACT={thrusters:"thruster stats",shieldGenerator:"shield-generator stats",powerCapacity:"power capacity",heatEfficiency:"heat efficiency",powerDistributor:"power-distributor stats"};var NOTHING_FITTED={powerCapacity:"PowerPlant: no power plant is fitted",heatEfficiency:"PowerPlant: no power plant is fitted",thrusters:"MainEngines: no thrusters are fitted",powerDistributor:"PowerDistributor: no power distributor is fitted"};function metricIssue(field,reason,module){const defaultSlot=DEFAULT_SLOT[field];const slot=module?.Slot??defaultSlot;const symbol=module?.Item;const params={field:field,reason:reason,...slot===void 0?{}:{slot:slot},...symbol===void 0?{}:{symbol:symbol}};let message;if(reason==="missing"){message=NOTHING_FITTED[field]??"no shield generator is fitted"}else if(reason==="unresolved"){const unavailable=UNRESOLVED_FACT[field]??field;message=`${truncate(slot??field)}: ${unavailable} unavailable for ${truncate(symbol??field)}`}else if(reason==="disabled"){message=`${truncate(slot??field)}: ${truncate(symbol??field)} is switched off`}else if(reason==="invalid"){message=`${truncate(slot??field)}: ${truncate(symbol??field)} has invalid ${field}`}else{message=`${truncate(slot??field)}: ${truncate(symbol??field)} is not powered with hardpoints retracted`}return{field:field,reason:reason,...slot===void 0?{}:{slot:slot},...symbol===void 0?{}:{symbol:symbol},message:message,params:params}}function powerPlantIssueFor(modules,statsFor){for(const module of modules){const stats=statsFor(module);if(!isPowerPlant(module,stats))continue;if(!isEnabled(module))return metricIssue("powerCapacity","disabled",module);const capacity=effectiveStat(module,"powerCapacity",stats);if(capacity===void 0)return metricIssue("powerCapacity","unresolved",module);return!Number.isFinite(capacity)||capacity<=0?metricIssue("powerCapacity","invalid",module):null}return metricIssue("powerCapacity","missing")}function powerDrawIssueFor(modules,statsFor){for(const module of modules){const consumer=powerConsumerFor(module,statsFor(module));if(consumer&&(!Number.isFinite(consumer.draw)||consumer.draw<0)){return metricIssue("powerDraw","invalid",module)}}return null}function poweredMetricBudgetFor(field,module,stats,modules,getBudget,statsFor){if(!isEnabled(module))return incompleteResult([metricIssue(field,"disabled",module)]);const plantIssue=powerPlantIssueFor(modules,statsFor);if(plantIssue)return incompleteResult([plantIssue]);const drawIssue=powerDrawIssueFor(modules,statsFor);if(drawIssue)return incompleteResult([drawIssue]);const budget=getBudget();return budget.available>0&&poweredStates(module,stats,budget).retracted?completeResult(budget):incompleteResult([metricIssue(field,"shed",module)])}function poweredShieldGeneratorResultFor(modules,getBudget,statsFor){for(const module of modules){if(!startsWithAny(module.Item,PREFIX.shieldGenerator))continue;const stats=statsFor(module);const powered=poweredMetricBudgetFor("shieldGenerator",module,stats,modules,getBudget,statsFor);if(!powered.complete)return powered;return stats===null?incompleteResult([metricIssue("shieldGenerator","unresolved",module)]):completeResult({module:module,budget:powered.value})}return incompleteResult([metricIssue("shieldGenerator","missing")])}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(ship,modules,budget,statsFor){let generator=null;const boosters=[];let reinforcement=0;for(const module of modules){if(!isEnabled(module))continue;const stats=statsFor(module);if(!(budget.available>0&&poweredStates(module,stats,budget).retracted))continue;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:ship.hullMass,baseShieldStrength:ship.baseShieldStrength,generator:generator,boosters:boosters,reinforcement:reinforcement}}function shieldInputResultFor(ship,modules,getBudget,statsFor){const fitted=poweredShieldGeneratorResultFor(modules,getBudget,statsFor);if(!fitted.complete)return fitted;return completeResult(shieldInputFor(ship,modules,fitted.value.budget,statsFor))}function shieldCapacitorInputResultFor(ship,modules,getBudget,systemsPips,statsFor){const fitted=poweredShieldGeneratorResultFor(modules,getBudget,statsFor);if(!fitted.complete)return fitted;const budget=fitted.value.budget;const capacitor=systemsCapacitorResultFor(modules,budget,statsFor);if(!capacitor.complete)return capacitor;const shields=shieldMetrics(shieldInputFor(ship,modules,budget,statsFor));return completeResult({strength:shields.strength,resistances:shields.resistances,systemsCapacity:capacitor.value.systemsCapacity,systemsRecharge:capacitor.value.systemsRecharge,systemsPips:systemsPips})}function systemsCapacitorResultFor(modules,budget,statsFor){let distributor=null;for(const module of modules){const stats2=statsFor(module);if(isPowerDistributor(module,stats2)&&isEnabled(module)&&budget.available>0&&poweredStates(module,stats2,budget).retracted)distributor=module}if(!distributor)return completeResult({systemsCapacity:0,systemsRecharge:0});const stats=statsFor(distributor);const systemsCapacity=effectiveStat(distributor,"systemsCapacity",stats);const systemsRecharge=effectiveStat(distributor,"systemsRecharge",stats);return systemsCapacity===void 0||systemsRecharge===void 0?incompleteResult([metricIssue("powerDistributor","unresolved",distributor)]):completeResult({systemsCapacity:systemsCapacity,systemsRecharge:systemsRecharge})}function thrusterCurveFor(module,stats){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}return{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}}}}function fittedThrusterParamsFor(modules,statsFor){for(const module of modules){const stats=statsFor(module);if(isThruster(module,stats))return thrusterCurveFor(module,stats)}return null}function mobilityInputResultFor(ship,modules,getBudget,mass,statsFor){let thrusters=null;for(const module of modules){const stats=statsFor(module);if(!isThruster(module,stats))continue;const powered=poweredMetricBudgetFor("thrusters",module,stats,modules,getBudget,statsFor);if(!powered.complete)return powered;thrusters=thrusterCurveFor(module,stats);if(!thrusters)return incompleteResult([metricIssue("thrusters","unresolved",module)]);break}if(!thrusters)return incompleteResult([metricIssue("thrusters","missing")]);return completeResult({minimumSpeed:ship.minimumSpeed,maximumSpeed:ship.maximumSpeed,boost:ship.boost,minPitch:ship.minPitch,pitch:ship.pitch,minRoll:ship.minRoll,roll:ship.roll,minYaw:ship.minYaw,yaw:ship.yaw,mass:typeof mass==="function"?mass():mass,thrusters:thrusters})}function shieldRecoveryInputResultFor(ship,modules,getBudget,systemsPips,statsFor){const generator=poweredShieldGeneratorResultFor(modules,getBudget,statsFor);if(!generator.complete)return generator;const{module:generatorModule,budget:budget}=generator.value;const generatorStats=statsFor(generatorModule);const distributorDraw=effectiveStat(generatorModule,"distributorDraw",generatorStats);const regenRate=effectiveStat(generatorModule,"shieldRegenRate",generatorStats);const brokenRegenRate=effectiveStat(generatorModule,"shieldBrokenRegenRate",generatorStats);if(distributorDraw===void 0||regenRate===void 0||brokenRegenRate===void 0){return incompleteResult([metricIssue("shieldGenerator","unresolved",generatorModule)])}const capacitor=systemsCapacitorResultFor(modules,budget,statsFor);if(!capacitor.complete)return capacitor;const strength=shieldMetrics(shieldInputFor(ship,modules,budget,statsFor)).strength;return completeResult({strength:strength,regenRate:regenRate,brokenRegenRate:brokenRegenRate,distributorDraw:distributorDraw,systemsCapacity:capacitor.value.systemsCapacity,systemsRecharge:capacitor.value.systemsRecharge,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 distributorInputResultFor(modules,pips,budget,statsFor){let disabled=null;for(const module of modules){const stats=statsFor(module);if(!isPowerDistributor(module,stats))continue;if(!isEnabled(module)){disabled??=module;continue}if(!poweredStates(module,stats,budget).retracted){return incompleteResult([metricIssue("powerDistributor","shed",module)])}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 incompleteResult([metricIssue("powerDistributor","unresolved",module)])}return completeResult({systemsCapacity:systemsCapacity,systemsRecharge:systemsRecharge,enginesCapacity:enginesCapacity,enginesRecharge:enginesRecharge,weaponsCapacity:weaponsCapacity,weaponsRecharge:weaponsRecharge,...pips})}return incompleteResult([disabled===null?metricIssue("powerDistributor","missing"):metricIssue("powerDistributor","disabled",disabled)])}function heatInputResultFor(ship,modules,budget,statsFor){let plant=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);if(isPowerPlant(module,stats)){if(!isEnabled(module)){return incompleteResult([metricIssue("powerCapacity","disabled",module)])}plant=module;heatEfficiency=effectiveStat(module,"heatEfficiency",stats);continue}if(!isEnabled(module))continue;const running=poweredStates(module,stats,budget);if(isThruster(module,stats)){const heat=effectiveStat(module,"engineHeatRate",stats)??0;if(running.retracted)thrusterHeatRate+=heat;if(running.deployed)deployedThrusterHeatRate+=heat}else if(isFrameShiftDrive(module,stats)){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(!running.deployed)continue;if(!weapon)continue;weapons.push({heatPerSecond:weaponMetrics(weapon).sustainedHeatPerSecond,distributorDraw:weapon.distributorDraw??0})}if(heatEfficiency===void 0){return incompleteResult([plant===null?metricIssue("powerCapacity","missing"):metricIssue("heatEfficiency","unresolved",plant)])}return completeResult({heatCapacity:ship.heatCapacity,heatDissipation:ship.heatDissipation,heatEfficiency:heatEfficiency,retractedPowerDraw:poweredDraw(budget,"retracted"),deployedPowerDraw:poweredDraw(budget,"deployed"),thrusterHeatRate:thrusterHeatRate,deployedThrusterHeatRate:deployedThrusterHeatRate,fsdHeatRate:fsdHeatRate,weaponsCapacity:weaponsCapacity,weapons:weapons})}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,budget,statsFor){const banks=[];for(const module of modules){if(!startsWithAny(module.Item,PREFIX.shieldCellBank))continue;const stats=statsFor(module);const effective=effectiveModule(module,stats);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,powered:budget.available>0&&isEnabled(module)&&poweredStates(module,stats,budget).deployed})}return banks}function stockBulkhead(ship){const variants=getBulkheadsForShip(ship.name,CORE_MODULES);return variants.find(v=>v.symbol.toLowerCase().endsWith("_default"))??variants.find(v=>v.mass===0)??variants[0]??null}function armourInputFor(ship,modules,statsFor){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(ship);bulkhead=stock?{hullBoost:stock.hullBoost??0,...mapResistanceFields(field=>stock[field])}:null}return{baseArmour:ship.baseArmour,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 modifiers=module.Engineering?.Modifiers;const touched=BURST_PATTERN_LABELS.some(label=>getLoadoutModifier(module,label)!==null);if(!touched)return void 0;const stated=(label,field)=>preciseValueFor(modifiers,label)??weapon[field];return journalRateOfFire(stated("BurstInterval","burstInterval"),stated("BurstSize","burstRounds"),stated("BurstRateOfFire","burstRateOfFire"))}var FIRING_RATE_LABELS=["RateOfFire","BurstRateOfFire","BurstSize","BurstInterval","RoundsPerShot","Rounds"];function readsDamageFromPerSecond(module){return getLoadoutModifier(module,"Damage")===null&&FIRING_RATE_LABELS.every(label=>getLoadoutModifier(module,label)===null)}function normalizeEffectiveWeapon(module,weapon){const rate=burstAdjustedRateOfFire(module,weapon);if(rate!==void 0)weapon.rateOfFire=rate;if(readsDamageFromPerSecond(module)){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 INTERNALS=/* @__PURE__ */new WeakMap;function publishLoadoutInternals(build,internals){INTERNALS.set(build,internals)}function loadoutInternals(build,label){const internals=typeof build==="object"&&build!==null?INTERNALS.get(build):void 0;if(internals===void 0){throw new TypeError(`${label} must be a ShipLoadout, received ${describeValue(build)}`)}return internals}export{armourInputFor,cellBankInputsFor,completeResult,distributorInputResultFor,effectiveModule,fittedThrusterParamsFor,heatInputResultFor,incompleteResult,loadoutInternals,mobilityInputResultFor,moduleFitError,moduleFitProblem,normalizeLoadoutEvent,powerAvailable,powerConsumerFor,preEngineeredVariantFor,publishLoadoutInternals,shieldCapacitorInputResultFor,shieldInputResultFor,shieldRecoveryInputResultFor,weaponStatsFor,weaponsCapacitorInputFor};//# sourceMappingURL=chunk-ZBUTGTZ3.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/ships/internal/loadout-fitting.ts","../src/ships/internal/loadout-import.ts","../src/ships/internal/calculation-result.ts","../src/ships/internal/loadout-metrics.ts","../src/ships/internal/loadout-internals.ts"],"names":["getLoadoutModifier","sourcePurchaseFromLoadout","weaponMetrics","isBuiltInHullSymbol","identifyPreEngineeredVariant","unrollableFixedArticle","cloneLoadoutModule","isNonOutfittingSlot","isBuiltInHullModule","matchingKeyIn","ownKeyIn","getPreEngineeredStats","getPreEngineeredModifiers","cloneModuleStats","isFinalGuardianWeaponEngineering","scaleDamageComponents","getPreEngineeredVariants","shieldMetrics","getShipBySymbol","getShipByName","getShipSlots","builtInModuleBySymbol","getBulkheadsForShip","CORE_MODULES","stockedMountKind","getDefaultLoadout","getExperimentalEffect","ammunitionCapacity","fieldForLabel","scaleForLabel","labelsForField","capabilityValueForLabel","damageTypeForLabel","BURST_PATTERN_LABELS","journalRateOfFire","preciseValueFor","parseSlotName","SLOT_RESTRICTION_LABELS","enumerateSlots","normalizeKey","truncate","requireString","describeValue","requireStringIfPresent","deepFreeze","MILITARY_PREFIXES","MINING_PREFIXES","CARGO_PREFIXES","RESTRICTED_SLOT_PREFIXES","mining","military","cargo","limpetController","vesselHangar","passenger","planetaryApproachSuite","problem","constraint","message","params","restrictionProblem","slot","symbol","restriction","some","prefix","startsWith","moduleSlotProblem","module","required","restrictedToSlot","moduleFitProblem","shipSymbol","kind","hull","ship","toLowerCase","name","armourHull","armourShipName","armourShipSymbol","shipName","restricted","restrictedToShips","allowedShipNames","map","labels","index","join","allowedShipSymbols","wrongMount","moduleSlot","core","requiredCore","category","isFuelTank","class","size","moduleClass","slotSize","moduleFitError","preEngineeredVariantFor","Engineering","Item","captureLoadoutEvent","event","modules","Modules","ShipName","shipIdent","ShipIdent","hullValue","HullValue","modulesValue","ModulesValue","rebuy","Rebuy","unladenMass","UnladenMass","cargoCapacity","CargoCapacity","fuelCapacity","FuelCapacity","Ship","Array","isArray","captureEach","captureModule","values","capture","captured","length","push","on","On","priority","Priority","health","Health","value","Value","engineering","Slot","captureEngineering","experimental","ExperimentalEffect","experimentalLocalised","ExperimentalEffect_Localised","modifiers","Modifiers","BlueprintName","Level","Quality","modifier","hullLayout","slots","stockedMountRejects","layout","stats","mount","find","candidate","key","normalizeLoadoutEvent","rawEvent","TypeError","Map","Set","entries","Label","normalizedSlot","has","add","set","top","invalidatesAggregates","outcomes","defaults","parsed","stocked","fallback","rejected","action","sourceSymbol","replacementSymbol","delete","moduleStats","primitiveModifiers","variant","catalogueVariantStats","variantStats","retainsBakedExperimental","experimentalEffectSymbol","trim","engineeringLocked","originalExperimental","withoutExperimental","currentExperimental","currentVariant","guardianFinal","normalizedBlueprint","normalizedExperimental","variants","exact","blueprintSymbol","grade","guardianBase","sourcePurchase","NO_ISSUES","Object","freeze","completeResult","complete","issues","incompleteResult","issue","PREFIX","powerPlant","thrusters","frameShiftDrive","powerDistributor","shieldGenerator","shieldCellBank","shieldBooster","shieldReinforcement","hullReinforcement","moduleReinforcement","startsWithAny","prefixes","isPowerDistributor","isPowerPlant","isThruster","isFrameShiftDrive","isEnabled","priorityOf","effectiveStat","field","stated","statedModifier","base","label","modified","effectiveCapability","effectiveDamageDistribution","fromEffect","damageDistribution","distribution","resolved","seen","type","convertsDamage","modifierRatio","effective","relatedStat","ratio","effectiveModule","merged","fields","keys","capability","engineeringGroup","massRatio","minMass","maxMass","performanceRatio","minMultiplier","maxMultiplier","normalizeEffectiveWeapon","damageComponents","damage","powerConsumerFor","draw","mounted","enabled","deployedOnly","alwaysPowered","powerAvailable","statsFor","DEFAULT_SLOT","powerCapacity","heatEfficiency","UNRESOLVED_FACT","NOTHING_FITTED","metricIssue","reason","defaultSlot","unavailable","powerPlantIssueFor","capacity","Number","isFinite","powerDrawIssueFor","consumer","poweredMetricBudgetFor","getBudget","plantIssue","drawIssue","budget","available","poweredStates","retracted","poweredShieldGeneratorResultFor","powered","mapResistanceFields","read","kineticResistance","thermalResistance","explosiveResistance","causticResistance","resistancesOf","shieldInputFor","generator","boosters","reinforcement","strengthRatio","optMass","Math","max","optMultiplier","shieldBoost","hullMass","baseShieldStrength","shieldInputResultFor","fitted","shieldCapacitorInputResultFor","systemsPips","capacitor","systemsCapacitorResultFor","shields","strength","resistances","systemsCapacity","systemsRecharge","distributor","thrusterCurveFor","optSpeedMultiplier","speedCurve","minSpeedMultiplier","maxSpeedMultiplier","optRotationMultiplier","rotationCurve","minRotationMultiplier","maxRotationMultiplier","fittedThrusterParamsFor","mobilityInputResultFor","mass","minimumSpeed","maximumSpeed","boost","minPitch","pitch","minRoll","roll","minYaw","yaw","shieldRecoveryInputResultFor","generatorModule","generatorStats","distributorDraw","regenRate","brokenRegenRate","weaponsCapacitorInputFor","weaponsPips","weaponsCapacity","weaponsRecharge","sustainedEnergyPerSecond","deployed","weapon","weaponStatsFor","distributorInputResultFor","pips","disabled","enginesCapacity","enginesRecharge","heatInputResultFor","plant","thrusterHeatRate","deployedThrusterHeatRate","fsdHeatRate","weapons","running","heat","heatPerSecond","sustainedHeatPerSecond","heatCapacity","heatDissipation","retractedPowerDraw","poweredDraw","deployedPowerDraw","state","bands","reduce","total","band","min","poweredRetracted","poweredDeployed","cellBankInputsFor","banks","ammunition","reinforcementRate","shieldBankReinforcement","cells","spinUp","shieldBankSpinUp","duration","shieldBankDuration","shieldBankHeat","stockBulkhead","v","endsWith","armourInputFor","reinforcements","moduleReinforcements","bulkhead","hullBoost","moduleProtection","integrity","stock","baseArmour","WEAPON_FIELDS","projectileRange","burstAdjustedRateOfFire","touched","FIRING_RATE_LABELS","readsDamageFromPerSecond","every","rate","rateOfFire","statedDamagePerSecond","firingFactor","roundsPerShot","maximumRange","falloffRange","INTERNALS","WeakMap","publishLoadoutInternals","build","internals","loadoutInternals","get"],"mappings":"O,o6CAUA,IAAM6C,kBAAuC,CACzC,wBACA,iCACA,0BACA,qBACA,gCACA,kCACA,mCAUJ,IAAMC,gBAAqC,CACvC,kBACA,sBACA,4BACA,8BACA,uBACA,oBAOJ,IAAMC,eAAoC,CACtC,gBACA,qBACA,8BACA,gBAUJ,IAAMC,yBAAuE,CACzEC,OAAQH,gBACRI,SAAUL,kBACVM,MAAOJ,eAEPK,iBAAkB,CAAC,mBAAoB,yBAOvCC,aAAc,CAAC,iBAAkB,oBAAqB,yBAEtDC,UAAW,CAAC,qBAAsB,2BAElCC,uBAAwB,CAAC,4BAU7B,IAAMC,QAAU,CACZC,WACAC,QACAC,UAAA,CACsBF,sBAAYC,mBAAaC,cAAW,EAAY,CAAA,EAAK,CAAEA,iBAEjF,SAASC,mBAAmBC,KAAiBC,QACzC,MAAMC,YAAcF,KAAKE,YACzB,IAAKA,YAAa,OAAO,KACzB,GAAIf,yBAAyBe,aAAaC,KAAMC,QAAWH,OAAOI,WAAWD,SAAU,CACnF,OAAO,IACX,CACA,OAAOT,QAAQ,kBAAmB,mBAAmBnB,wBAAwB0B,eAAgB,CACzFA,yBAER,CAEA,SAASI,kBAAkBN,KAAiBO,QACxC,MAAMC,SAAWD,OAAOE,iBACxB,IAAKD,UAAYR,KAAKE,cAAgBM,SAAU,OAAO,KACvD,OAAOb,QACH,kBACA,uCAAuCnB,wBAAwBgC,YAC/D,CAAEN,Y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