!(function (e) {
function t(t) {
for (var n, o, s = t[0], l = t[1], c = t[2], m = 0, h = []; m < s.length; m++)
(o = s[m]), Object.prototype.hasOwnProperty.call(r, o) && r[o] && h.push(r[o][0]), (r[o] = 0);
for (n in l) Object.prototype.hasOwnProperty.call(l, n) && (e[n] = l[n]);
for (u && u(t); h.length; ) h.shift()();
return i.push.apply(i, c || []), a();
}
function a() {
for (var e, t = 0; t < i.length; t++) {
for (var a = i[t], n = !0, s = 1; s < a.length; s++) {
var l = a[s];
0 !== r[l] && (n = !1);
}
n && (i.splice(t--, 1), (e = o((o.s = a[0]))));
}
return e;
}
var n = {},
r = { 1: 0 },
i = [];
function o(t) {
if (n[t]) return n[t].exports;
var a = (n[t] = { i: t, l: !1, exports: {} });
return e[t].call(a.exports, a, a.exports, o), (a.l = !0), a.exports;
}
(o.m = e),
(o.c = n),
(o.d = function (e, t, a) {
o.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: a });
}),
(o.r = function (e) {
"undefined" != typeof Symbol &&
Symbol.toStringTag &&
Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }),
Object.defineProperty(e, "__esModule", { value: !0 });
}),
(o.t = function (e, t) {
if ((1 & t && (e = o(e)), 8 & t)) return e;
if (4 & t && "object" == typeof e && e && e.__esModule) return e;
var a = Object.create(null);
if ((o.r(a), Object.defineProperty(a, "default", { enumerable: !0, value: e }), 2 & t && "string" != typeof e))
for (var n in e)
o.d(
a,
n,
function (t) {
return e[t];
}.bind(null, n),
);
return a;
}),
(o.n = function (e) {
var t =
e && e.__esModule
? function () {
return e.default;
}
: function () {
return e;
};
return o.d(t, "a", t), t;
}),
(o.o = function (e, t) {
return Object.prototype.hasOwnProperty.call(e, t);
}),
(o.p = "");
var s = (window.webpackJsonp = window.webpackJsonp || []),
l = s.push.bind(s);
(s.push = t), (s = s.slice());
for (var c = 0; c < s.length; c++) t(s[c]);
var u = l;
i.push([1225, 0]), a();
})([
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
}),
a.d(t, "b", function () {
return c;
});
var n = a(302),
r = a(791),
i = a(213),
o = a(21),
s = a(97);
let l = new r.a();
function c(e) {
if (((l = JSON.parse(e, o.c)), (l.money = new s.a(l.money)), l.corporation instanceof n.a)) {
(l.corporation.funds = new s.a(l.corporation.funds)),
(l.corporation.revenue = new s.a(l.corporation.revenue)),
(l.corporation.expenses = new s.a(l.corporation.expenses));
for (let e = 0; e < l.corporation.divisions.length; ++e) {
const t = l.corporation.divisions[e];
(t.lastCycleRevenue = new s.a(t.lastCycleRevenue)),
(t.lastCycleExpenses = new s.a(t.lastCycleExpenses)),
(t.thisCycleRevenue = new s.a(t.thisCycleRevenue)),
(t.thisCycleExpenses = new s.a(t.thisCycleExpenses));
}
}
l.exploits = Object(i.c)(l.exploits);
}
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return s;
});
var n = a(158),
r = a.n(n);
a(1235),
a(1236),
a(1237),
a(1238),
a(1239),
a(1240),
a(1241),
a(1242),
a(1243),
a(1244),
a(1245),
a(1246),
a(1247),
a(1248);
const i = [1e15, 1e18, 1e21, 1e24, 1e27, 1e30],
o = ["q", "Q", "s", "S", "o", "n"];
const s = new (class {
constructor() {
var e, t, a;
(a = "en"),
(t = "defaultLocale") in (e = this)
? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 })
: (e[t] = a),
(this.defaultLocale = "en");
}
updateLocale(e) {
return (
null != r.a.locale(e) ||
(console.warn("Invalid locale for numeral: " + e), r.a.locale(this.defaultLocale), !1)
);
}
format(e, t) {
Math.abs(e) < 1e-6 && (e = 0);
const a = r()(e).format(t);
return "NaN" === a ? "" + e : a;
}
formatBigNumber(e) {
return this.format(e, "0.000a");
}
formatReallyBigNumber(e, t = 3) {
if (e === 1 / 0) return "∞";
for (let a = 0; a < i.length; a++)
if (i[a] < e && e <= 1e3 * i[a]) return this.format(e / i[a], "0." + "0".repeat(t)) + o[a];
if (Math.abs(e) < 1e3) return this.format(e, "0." + "0".repeat(t));
const a = this.format(e, "0." + "0".repeat(t) + "a");
return "NaNt" === a ? this.format(e, "0." + " ".repeat(t) + "e+0") : a;
}
formatHp(e) {
return e < 1e6 ? this.format(e, "0,0") : this.formatReallyBigNumber(e);
}
formatMoney(e) {
return "$" + this.formatReallyBigNumber(e);
}
formatSkill(e) {
return e < 1e15 ? this.format(e, "0,0") : this.formatReallyBigNumber(e);
}
formatExp(e) {
return this.formatReallyBigNumber(e);
}
formatHashes(e) {
return this.formatReallyBigNumber(e);
}
formatReputation(e) {
return this.formatReallyBigNumber(e);
}
formatFavor(e) {
return this.format(e, "0,0");
}
formatRAM(e) {
return this.format(e, "0.00") + "GB";
}
formatPercentage(e, t = 2) {
const a = "0." + "0".repeat(t) + "%";
return this.format(e, a);
}
formatServerSecurity(e) {
return this.format(e, "0,0.000");
}
formatRespect(e) {
return this.formatReallyBigNumber(e, 5);
}
formatWanted(e) {
return this.formatReallyBigNumber(e, 5);
}
formatMultiplier(e) {
return this.format(e, "0,0.00");
}
formatSleeveShock(e) {
return this.format(e, "0,0.000");
}
formatSleeveSynchro(e) {
return this.format(e, "0,0.000");
}
formatSleeveMemory(e) {
return this.format(e, "0");
}
formatPopulation(e) {
return this.format(e, "0.000a");
}
formatStamina(e) {
return this.format(e, "0.0");
}
formatShares(e) {
return e < 1e3 ? this.format(e, "0") : this.formatReallyBigNumber(e);
}
formatInfiltrationSecurity(e) {
return this.formatReallyBigNumber(e);
}
formatThreads(e) {
return this.format(e, "0,0");
}
parseMoney(e) {
const t = r()(e).value(),
a = parseFloat(e);
return isNaN(a) && null === t ? NaN : isNaN(a) ? t : null === t ? a : Math.max(t, a);
}
})();
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
Targeting1: "Augmented Targeting I",
Targeting2: "Augmented Targeting II",
Targeting3: "Augmented Targeting III",
SyntheticHeart: "Synthetic Heart",
SynfibrilMuscle: "Synfibril Muscle",
CombatRib1: "Combat Rib I",
CombatRib2: "Combat Rib II",
CombatRib3: "Combat Rib III",
NanofiberWeave: "Nanofiber Weave",
SubdermalArmor: "NEMEAN Subdermal Weave",
WiredReflexes: "Wired Reflexes",
GrapheneBoneLacings: "Graphene Bone Lacings",
BionicSpine: "Bionic Spine",
GrapheneBionicSpine: "Graphene Bionic Spine Upgrade",
BionicLegs: "Bionic Legs",
GrapheneBionicLegs: "Graphene Bionic Legs Upgrade",
SpeechProcessor: "Speech Processor Implant",
TITN41Injection: "TITN-41 Gene-Modification Injection",
EnhancedSocialInteractionImplant: "Enhanced Social Interaction Implant",
BitWire: "BitWire",
ArtificialBioNeuralNetwork: "Artificial Bio-neural Network Implant",
ArtificialSynapticPotentiation: "Artificial Synaptic Potentiation",
EnhancedMyelinSheathing: "Enhanced Myelin Sheathing",
SynapticEnhancement: "Synaptic Enhancement Implant",
NeuralRetentionEnhancement: "Neural-Retention Enhancement",
DataJack: "DataJack",
ENM: "Embedded Netburner Module",
ENMCore: "Embedded Netburner Module Core Implant",
ENMCoreV2: "Embedded Netburner Module Core V2 Upgrade",
ENMCoreV3: "Embedded Netburner Module Core V3 Upgrade",
ENMAnalyzeEngine: "Embedded Netburner Module Analyze Engine",
ENMDMA: "Embedded Netburner Module Direct Memory Access Upgrade",
Neuralstimulator: "Neuralstimulator",
NeuralAccelerator: "Neural Accelerator",
CranialSignalProcessorsG1: "Cranial Signal Processors - Gen I",
CranialSignalProcessorsG2: "Cranial Signal Processors - Gen II",
CranialSignalProcessorsG3: "Cranial Signal Processors - Gen III",
CranialSignalProcessorsG4: "Cranial Signal Processors - Gen IV",
CranialSignalProcessorsG5: "Cranial Signal Processors - Gen V",
NeuronalDensification: "Neuronal Densification",
NeuroreceptorManager: "Neuroreceptor Management Implant",
NuoptimalInjectorImplant: "Nuoptimal Nootropic Injector Implant",
SpeechEnhancement: "Speech Enhancement",
FocusWire: "FocusWire",
PCDNI: "PC Direct-Neural Interface",
PCDNIOptimizer: "PC Direct-Neural Interface Optimization Submodule",
PCDNINeuralNetwork: "PC Direct-Neural Interface NeuroNet Injector",
PCMatrix: "PCMatrix",
ADRPheromone1: "ADR-V1 Pheromone Gene",
ADRPheromone2: "ADR-V2 Pheromone Gene",
ShadowsSimulacrum: "The Shadow's Simulacrum",
HacknetNodeCPUUpload: "Hacknet Node CPU Architecture Neural-Upload",
HacknetNodeCacheUpload: "Hacknet Node Cache Architecture Neural-Upload",
HacknetNodeNICUpload: "Hacknet Node NIC Architecture Neural-Upload",
HacknetNodeKernelDNI: "Hacknet Node Kernel Direct-Neural Interface",
HacknetNodeCoreDNI: "Hacknet Node Core Direct-Neural Interface",
NeuroFluxGovernor: "NeuroFlux Governor",
Neurotrainer1: "Neurotrainer I",
Neurotrainer2: "Neurotrainer II",
Neurotrainer3: "Neurotrainer III",
Hypersight: "HyperSight Corneal Implant",
LuminCloaking1: "LuminCloaking-V1 Skin Implant",
LuminCloaking2: "LuminCloaking-V2 Skin Implant",
HemoRecirculator: "HemoRecirculator",
SmartSonar: "SmartSonar Implant",
PowerRecirculator: "Power Recirculation Core",
QLink: "QLink",
TheRedPill: "The Red Pill",
SPTN97: "SPTN-97 Gene Modification",
HiveMind: "ECorp HVMind Implant",
CordiARCReactor: "CordiARC Fusion Reactor",
SmartJaw: "SmartJaw",
Neotra: "Neotra",
Xanipher: "Xanipher",
nextSENS: "nextSENS Gene Modification",
OmniTekInfoLoad: "OmniTek InfoLoad",
PhotosyntheticCells: "Photosynthetic Cells",
Neurolink: "BitRunners Neurolink",
TheBlackHand: "The Black Hand",
UnstableCircadianModulator: "Unstable Circadian Modulator",
CRTX42AA: "CRTX42-AA Gene Modification",
Neuregen: "Neuregen Gene Modification",
CashRoot: "CashRoot Starter Kit",
NutriGen: "NutriGen Implant",
INFRARet: "INFRARET Enhancement",
DermaForce: "DermaForce Particle Barrier",
GrapheneBrachiBlades: "Graphene BranchiBlades Upgrade",
GrapheneBionicArms: "Graphene Bionic Arms Upgrade",
BrachiBlades: "BrachiBlades",
BionicArms: "Bionic Arms",
SNA: "Social Negotiation Assistant (S.N.A)",
HydroflameLeftArm: "Hydroflame Left Arm",
EsperEyewear: "EsperTech Bladeburner Eyewear",
EMS4Recombination: "EMS-4 Recombination",
OrionShoulder: "ORION-MKIV Shoulder",
HyperionV1: "Hyperion Plasma Cannon V1",
HyperionV2: "Hyperion Plasma Cannon V2",
GolemSerum: "GOLEM Serum",
VangelisVirus: "Vangelis Virus",
VangelisVirus3: "Vangelis Virus 3.0",
INTERLINKED: "I.N.T.E.R.L.I.N.K.E.D",
BladeRunner: "Blade's Runners",
BladeArmor: "BLADE-51b Tesla Armor",
BladeArmorPowerCells: "BLADE-51b Tesla Armor: Power Cells Upgrade",
BladeArmorEnergyShielding: "BLADE-51b Tesla Armor: Energy Shielding Upgrade",
BladeArmorUnibeam: "BLADE-51b Tesla Armor: Unibeam Upgrade",
BladeArmorOmnibeam: "BLADE-51b Tesla Armor: Omnibeam Upgrade",
BladeArmorIPU: "BLADE-51b Tesla Armor: IPU Upgrade",
BladesSimulacrum: "The Blade's Simulacrum",
};
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
Version: "0.55.0",
_idleSpeed: 200,
MaxSkillLevel: 975,
MilliPerCycle: 200,
CorpFactionRepRequirement: 2e5,
BaseCostFor1GBOfRamHome: 32e3,
BaseCostFor1GBOfRamServer: 55e3,
TravelCost: 2e5,
BaseFavorToDonate: 150,
DonateMoneyToRepDivisor: 1e6,
FactionReputationToFavorBase: 500,
FactionReputationToFavorMult: 1.02,
CompanyReputationToFavorBase: 500,
CompanyReputationToFavorMult: 1.02,
NeuroFluxGovernorLevelMult: 1.14,
NumNetscriptPorts: 20,
HomeComputerMaxRam: 1073741824,
ServerBaseGrowthRate: 1.03,
ServerMaxGrowthRate: 1.0035,
ServerFortifyAmount: 0.002,
ServerWeakenAmount: 0.05,
PurchasedServerLimit: 25,
PurchasedServerMaxRam: 1048576,
MultipleAugMultiplier: 1.9,
TorRouterCost: 2e5,
InfiltrationBribeBaseAmount: 1e5,
InfiltrationMoneyValue: 5e3,
InfiltrationRepValue: 1.4,
InfiltrationExpPow: 0.8,
WSEAccountCost: 2e8,
TIXAPICost: 5e9,
MarketData4SCost: 1e9,
MarketDataTixApi4SCost: 25e9,
StockMarketCommission: 1e5,
HospitalCostPerHp: 1e5,
IntelligenceCrimeWeight: 0.025,
IntelligenceInfiltrationWeight: 0.1,
IntelligenceCrimeBaseExpGain: 0.05,
IntelligenceProgramBaseExpGain: 2.5,
IntelligenceTerminalHackBaseExpGain: 200,
IntelligenceSingFnBaseExpGain: 1.5,
IntelligenceClassBaseExpGain: 0.01,
MillisecondsPer20Hours: 72e6,
GameCyclesPer20Hours: 36e4,
MillisecondsPer10Hours: 36e6,
GameCyclesPer10Hours: 18e4,
MillisecondsPer8Hours: 288e5,
GameCyclesPer8Hours: 144e3,
MillisecondsPer4Hours: 144e5,
GameCyclesPer4Hours: 72e3,
MillisecondsPer2Hours: 72e5,
GameCyclesPer2Hours: 36e3,
MillisecondsPerHour: 36e5,
GameCyclesPerHour: 18e3,
MillisecondsPerHalfHour: 18e5,
GameCyclesPerHalfHour: 9e3,
MillisecondsPerQuarterHour: 9e5,
GameCyclesPerQuarterHour: 4500,
MillisecondsPerFiveMinutes: 3e5,
GameCyclesPerFiveMinutes: 1500,
BaseFocusBonus: 0.8,
FactionWorkHacking: "Faction Hacking Work",
FactionWorkField: "Faction Field Work",
FactionWorkSecurity: "Faction Security Work",
WorkTypeCompany: "Working for Company",
WorkTypeCompanyPartTime: "Working for Company part-time",
WorkTypeFaction: "Working for Faction",
WorkTypeCreateProgram: "Working on Create a Program",
WorkTypeStudyClass: "Studying or Taking a class at university",
WorkTypeCrime: "Committing a crime",
ClassStudyComputerScience: "studying Computer Science",
ClassDataStructures: "taking a Data Structures course",
ClassNetworks: "taking a Networks course",
ClassAlgorithms: "taking an Algorithms course",
ClassManagement: "taking a Management course",
ClassLeadership: "taking a Leadership course",
ClassGymStrength: "training your strength at a gym",
ClassGymDefense: "training your defense at a gym",
ClassGymDexterity: "training your dexterity at a gym",
ClassGymAgility: "training your agility at a gym",
ClassDataStructuresBaseCost: 40,
ClassNetworksBaseCost: 80,
ClassAlgorithmsBaseCost: 320,
ClassManagementBaseCost: 160,
ClassLeadershipBaseCost: 320,
ClassGymBaseCost: 120,
ClassStudyComputerScienceBaseExp: 0.5,
ClassDataStructuresBaseExp: 1,
ClassNetworksBaseExp: 2,
ClassAlgorithmsBaseExp: 4,
ClassManagementBaseExp: 2,
ClassLeadershipBaseExp: 4,
CrimeShoplift: "shoplift",
CrimeRobStore: "rob a store",
CrimeMug: "mug someone",
CrimeLarceny: "commit larceny",
CrimeDrugs: "deal drugs",
CrimeBondForgery: "forge corporate bonds",
CrimeTraffickArms: "traffick illegal arms",
CrimeHomicide: "commit homicide",
CrimeGrandTheftAuto: "commit grand theft auto",
CrimeKidnap: "kidnap someone for ransom",
CrimeAssassination: "assassinate a high-profile target",
CrimeHeist: "pull off the ultimate heist",
CodingContractBaseFactionRepGain: 2500,
CodingContractBaseCompanyRepGain: 4e3,
CodingContractBaseMoneyGain: 75e6,
TotalNumBitNodes: 24,
LatestUpdate:
"\n v0.55.0 - 2021-09-20 Material UI (hydroflame & community)\n -------------------------------------------\n\n ** Global ** \n\n * The game is now 100% in typescript, react, and Material-UI\n\n ** Misc. **\n\n * Corporations can no longer bribe special factions\n * Infiltration can no longer lose focus of the keyboard.\n * Fix terminal line limit\n * Added theme editor\n * Theme applies on game load (@Nolshine)\n * Sleeves no longer consume all bonus time for some actions\n * Fix a bug where the autocomlete list would get duplicates\n * Fix tutorial not scaling properly on small screens\n * Import should be more consistent\n * Typo with 'help' command\n * Fix infinite loop in casino\n * nerf noodle bar\n",
};
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
HackingLevelMultiplier: 1,
StrengthLevelMultiplier: 1,
DefenseLevelMultiplier: 1,
DexterityLevelMultiplier: 1,
AgilityLevelMultiplier: 1,
CharismaLevelMultiplier: 1,
ServerGrowthRate: 1,
ServerMaxMoney: 1,
ServerStartingMoney: 1,
ServerStartingSecurity: 1,
ServerWeakenRate: 1,
HomeComputerRamCost: 1,
PurchasedServerCost: 1,
PurchasedServerLimit: 1,
PurchasedServerMaxRam: 1,
CompanyWorkMoney: 1,
CrimeMoney: 1,
HacknetNodeMoney: 1,
ManualHackMoney: 1,
ScriptHackMoney: 1,
ScriptHackMoneyGain: 1,
CodingContractMoney: 1,
ClassGymExpGain: 1,
CompanyWorkExpGain: 1,
CrimeExpGain: 1,
FactionWorkExpGain: 1,
HackExpGain: 1,
FactionPassiveRepGain: 1,
FactionWorkRepGain: 1,
RepToDonateToFaction: 1,
AugmentationMoneyCost: 1,
AugmentationRepCost: 1,
InfiltrationMoney: 1,
InfiltrationRep: 1,
FourSigmaMarketDataCost: 1,
FourSigmaMarketDataApiCost: 1,
CorporationValuation: 1,
BladeburnerRank: 1,
BladeburnerSkillCost: 1,
DaedalusAugsRequirement: 1,
GangKarmaRequirement: 1,
};
},
function (e, t, a) {
"use strict";
let n;
a.d(t, "a", function () {
return n;
}),
(function (e) {
(e.Aevum = "Aevum"),
(e.Chongqing = "Chongqing"),
(e.Ishima = "Ishima"),
(e.NewTokyo = "New Tokyo"),
(e.Sector12 = "Sector-12"),
(e.Volhaven = "Volhaven"),
(e.AevumAeroCorp = "AeroCorp"),
(e.AevumBachmanAndAssociates = "Bachman & Associates"),
(e.AevumClarkeIncorporated = "Clarke Incorporated"),
(e.AevumCrushFitnessGym = "Crush Fitness Gym"),
(e.AevumECorp = "ECorp"),
(e.AevumFulcrumTechnologies = "Fulcrum Technologies"),
(e.AevumGalacticCybersystems = "Galactic Cybersystems"),
(e.AevumNetLinkTechnologies = "NetLink Technologies"),
(e.AevumPolice = "Aevum Police Headquarters"),
(e.AevumRhoConstruction = "Rho Construction"),
(e.AevumSnapFitnessGym = "Snap Fitness Gym"),
(e.AevumSummitUniversity = "Summit University"),
(e.AevumWatchdogSecurity = "Watchdog Security"),
(e.AevumCasino = "Iker Molina Casino"),
(e.ChongqingKuaiGongInternational = "KuaiGong International"),
(e.ChongqingSolarisSpaceSystems = "Solaris Space Systems"),
(e.ChongqingChurchOfTheMachineGod = "Church of the Machine God"),
(e.Sector12AlphaEnterprises = "Alpha Enterprises"),
(e.Sector12BladeIndustries = "Blade Industries"),
(e.Sector12CIA = "Central Intelligence Agency"),
(e.Sector12CarmichaelSecurity = "Carmichael Security"),
(e.Sector12CityHall = "Sector-12 City Hall"),
(e.Sector12DeltaOne = "DeltaOne"),
(e.Sector12FoodNStuff = "FoodNStuff"),
(e.Sector12FourSigma = "Four Sigma"),
(e.Sector12IcarusMicrosystems = "Icarus Microsystems"),
(e.Sector12IronGym = "Iron Gym"),
(e.Sector12JoesGuns = "Joe's Guns"),
(e.Sector12MegaCorp = "MegaCorp"),
(e.Sector12NSA = "National Security Agency"),
(e.Sector12PowerhouseGym = "Powerhouse Gym"),
(e.Sector12RothmanUniversity = "Rothman University"),
(e.Sector12UniversalEnergy = "Universal Energy"),
(e.NewTokyoDefComm = "DefComm"),
(e.NewTokyoGlobalPharmaceuticals = "Global Pharmaceuticals"),
(e.NewTokyoNoodleBar = "Noodle Bar"),
(e.NewTokyoVitaLife = "VitaLife"),
(e.IshimaNovaMedical = "Nova Medical"),
(e.IshimaOmegaSoftware = "Omega Software"),
(e.IshimaStormTechnologies = "Storm Technologies"),
(e.VolhavenCompuTek = "CompuTek"),
(e.VolhavenHeliosLabs = "Helios Labs"),
(e.VolhavenLexoCorp = "LexoCorp"),
(e.VolhavenMilleniumFitnessGym = "Millenium Fitness Gym"),
(e.VolhavenNWO = "NWO"),
(e.VolhavenOmniTekIncorporated = "OmniTek Incorporated"),
(e.VolhavenOmniaCybersystems = "Omnia Cybersystems"),
(e.VolhavenSysCoreSecurities = "SysCore Securities"),
(e.VolhavenZBInstituteOfTechnology = "ZB Institute of Technology"),
(e.Hospital = "Hospital"),
(e.Slums = "The Slums"),
(e.TravelAgency = "Travel Agency"),
(e.WorldStockExchange = "World Stock Exchange"),
(e.Void = "The Void");
})(n || (n = {}));
},
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
}),
a.d(t, "b", function () {
return r;
}),
a.d(t, "c", function () {
return i;
});
const n = {
ScriptBaseRamCost: 1.6,
ScriptDomRamCost: 25,
ScriptHackRamCost: 0.1,
ScriptHackAnalyzeRamCost: 1,
ScriptGrowRamCost: 0.15,
ScriptGrowthAnalyzeRamCost: 1,
ScriptWeakenRamCost: 0.15,
ScriptScanRamCost: 0.2,
ScriptPortProgramRamCost: 0.05,
ScriptRunRamCost: 1,
ScriptExecRamCost: 1.3,
ScriptSpawnRamCost: 2,
ScriptScpRamCost: 0.6,
ScriptKillRamCost: 0.5,
ScriptHasRootAccessRamCost: 0.05,
ScriptGetHostnameRamCost: 0.05,
ScriptGetHackingLevelRamCost: 0.05,
ScriptGetMultipliersRamCost: 4,
ScriptGetServerRamCost: 0.1,
ScriptGetServerMaxRam: 0.05,
ScriptGetServerUsedRam: 0.05,
ScriptFileExistsRamCost: 0.1,
ScriptIsRunningRamCost: 0.1,
ScriptHacknetNodesRamCost: 4,
ScriptHNUpgLevelRamCost: 0.4,
ScriptHNUpgRamRamCost: 0.6,
ScriptHNUpgCoreRamCost: 0.8,
ScriptGetStockRamCost: 2,
ScriptBuySellStockRamCost: 2.5,
ScriptGetPurchaseServerRamCost: 0.25,
ScriptPurchaseServerRamCost: 2.25,
ScriptGetPurchasedServerLimit: 0.05,
ScriptGetPurchasedServerMaxRam: 0.05,
ScriptRoundRamCost: 0.05,
ScriptReadWriteRamCost: 1,
ScriptArbScriptRamCost: 1,
ScriptGetScriptRamCost: 0.1,
ScriptGetRunningScriptRamCost: 0.3,
ScriptGetHackTimeRamCost: 0.05,
ScriptGetFavorToDonate: 0.1,
ScriptCodingContractBaseRamCost: 10,
ScriptSleeveBaseRamCost: 4,
ScriptSingularityFn1RamCost: 2,
ScriptSingularityFn2RamCost: 3,
ScriptSingularityFn3RamCost: 5,
ScriptGangApiBaseRamCost: 4,
ScriptBladeburnerApiBaseRamCost: 4,
},
r = {
hacknet: {
numNodes: () => 0,
purchaseNode: () => 0,
getPurchaseNodeCost: () => 0,
getNodeStats: () => 0,
upgradeLevel: () => 0,
upgradeRam: () => 0,
upgradeCore: () => 0,
upgradeCache: () => 0,
getLevelUpgradeCost: () => 0,
getRamUpgradeCost: () => 0,
getCoreUpgradeCost: () => 0,
getCacheUpgradeCost: () => 0,
numHashes: () => 0,
hashCost: () => 0,
spendHashes: () => 0,
},
sprintf: () => 0,
vsprintf: () => 0,
scan: () => n.ScriptScanRamCost,
hack: () => n.ScriptHackRamCost,
hackAnalyzeThreads: () => n.ScriptHackAnalyzeRamCost,
hackAnalyzePercent: () => n.ScriptHackAnalyzeRamCost,
hackChance: () => n.ScriptHackAnalyzeRamCost,
sleep: () => 0,
grow: () => n.ScriptGrowRamCost,
growthAnalyze: () => n.ScriptGrowthAnalyzeRamCost,
weaken: () => n.ScriptWeakenRamCost,
print: () => 0,
tprint: () => 0,
clearLog: () => 0,
disableLog: () => 0,
enableLog: () => 0,
isLogEnabled: () => 0,
getScriptLogs: () => 0,
nuke: () => n.ScriptPortProgramRamCost,
brutessh: () => n.ScriptPortProgramRamCost,
ftpcrack: () => n.ScriptPortProgramRamCost,
relaysmtp: () => n.ScriptPortProgramRamCost,
httpworm: () => n.ScriptPortProgramRamCost,
sqlinject: () => n.ScriptPortProgramRamCost,
run: () => n.ScriptRunRamCost,
exec: () => n.ScriptExecRamCost,
spawn: () => n.ScriptSpawnRamCost,
kill: () => n.ScriptKillRamCost,
killall: () => n.ScriptKillRamCost,
exit: () => 0,
scp: () => n.ScriptScpRamCost,
ls: () => n.ScriptScanRamCost,
ps: () => n.ScriptScanRamCost,
hasRootAccess: () => n.ScriptHasRootAccessRamCost,
getIp: () => n.ScriptGetHostnameRamCost,
getHostname: () => n.ScriptGetHostnameRamCost,
getHackingLevel: () => n.ScriptGetHackingLevelRamCost,
getHackingMultipliers: () => n.ScriptGetMultipliersRamCost,
getHacknetMultipliers: () => n.ScriptGetMultipliersRamCost,
getBitNodeMultipliers: () => n.ScriptGetMultipliersRamCost,
getServer: () => n.ScriptGetMultipliersRamCost / 2,
getServerMoneyAvailable: () => n.ScriptGetServerRamCost,
getServerSecurityLevel: () => n.ScriptGetServerRamCost,
getServerBaseSecurityLevel: () => n.ScriptGetServerRamCost,
getServerMinSecurityLevel: () => n.ScriptGetServerRamCost,
getServerRequiredHackingLevel: () => n.ScriptGetServerRamCost,
getServerMaxMoney: () => n.ScriptGetServerRamCost,
getServerGrowth: () => n.ScriptGetServerRamCost,
getServerNumPortsRequired: () => n.ScriptGetServerRamCost,
getServerRam: () => n.ScriptGetServerRamCost,
getServerMaxRam: () => n.ScriptGetServerMaxRam,
getServerUsedRam: () => n.ScriptGetServerUsedRam,
serverExists: () => n.ScriptGetServerRamCost,
fileExists: () => n.ScriptFileExistsRamCost,
isRunning: () => n.ScriptIsRunningRamCost,
getStockSymbols: () => n.ScriptGetStockRamCost,
getStockPrice: () => n.ScriptGetStockRamCost,
getStockAskPrice: () => n.ScriptGetStockRamCost,
getStockBidPrice: () => n.ScriptGetStockRamCost,
getStockPosition: () => n.ScriptGetStockRamCost,
getStockMaxShares: () => n.ScriptGetStockRamCost,
getStockPurchaseCost: () => n.ScriptGetStockRamCost,
getStockSaleGain: () => n.ScriptGetStockRamCost,
buyStock: () => n.ScriptBuySellStockRamCost,
sellStock: () => n.ScriptBuySellStockRamCost,
shortStock: () => n.ScriptBuySellStockRamCost,
sellShort: () => n.ScriptBuySellStockRamCost,
placeOrder: () => n.ScriptBuySellStockRamCost,
cancelOrder: () => n.ScriptBuySellStockRamCost,
getOrders: () => n.ScriptBuySellStockRamCost,
getStockVolatility: () => n.ScriptBuySellStockRamCost,
getStockForecast: () => n.ScriptBuySellStockRamCost,
purchase4SMarketData: () => n.ScriptBuySellStockRamCost,
purchase4SMarketDataTixApi: () => n.ScriptBuySellStockRamCost,
getPurchasedServerLimit: () => n.ScriptGetPurchasedServerLimit,
getPurchasedServerMaxRam: () => n.ScriptGetPurchasedServerMaxRam,
getPurchasedServerCost: () => n.ScriptGetPurchaseServerRamCost,
purchaseServer: () => n.ScriptPurchaseServerRamCost,
deleteServer: () => n.ScriptPurchaseServerRamCost,
getPurchasedServers: () => n.ScriptPurchaseServerRamCost,
write: () => n.ScriptReadWriteRamCost,
tryWrite: () => n.ScriptReadWriteRamCost,
read: () => n.ScriptReadWriteRamCost,
peek: () => n.ScriptReadWriteRamCost,
clear: () => n.ScriptReadWriteRamCost,
getPortHandle: () => 10 * n.ScriptReadWriteRamCost,
rm: () => n.ScriptReadWriteRamCost,
scriptRunning: () => n.ScriptArbScriptRamCost,
scriptKill: () => n.ScriptArbScriptRamCost,
getScriptName: () => 0,
getScriptRam: () => n.ScriptGetScriptRamCost,
getHackTime: () => n.ScriptGetHackTimeRamCost,
getGrowTime: () => n.ScriptGetHackTimeRamCost,
getWeakenTime: () => n.ScriptGetHackTimeRamCost,
getScriptIncome: () => n.ScriptGetScriptRamCost,
getScriptExpGain: () => n.ScriptGetScriptRamCost,
getRunningScript: () => n.ScriptGetRunningScriptRamCost,
nFormat: () => 0,
getTimeSinceLastAug: () => n.ScriptGetHackTimeRamCost,
prompt: () => 0,
wget: () => 0,
getFavorToDonate: () => n.ScriptGetFavorToDonate,
universityCourse: () => n.ScriptSingularityFn1RamCost,
gymWorkout: () => n.ScriptSingularityFn1RamCost,
travelToCity: () => n.ScriptSingularityFn1RamCost,
purchaseTor: () => n.ScriptSingularityFn1RamCost,
purchaseProgram: () => n.ScriptSingularityFn1RamCost,
getCurrentServer: () => n.ScriptSingularityFn1RamCost,
connect: () => n.ScriptSingularityFn1RamCost,
manualHack: () => n.ScriptSingularityFn1RamCost,
installBackdoor: () => n.ScriptSingularityFn1RamCost,
getStats: () => n.ScriptSingularityFn1RamCost / 4,
getCharacterInformation: () => n.ScriptSingularityFn1RamCost / 4,
getPlayer: () => n.ScriptSingularityFn1RamCost / 4,
hospitalize: () => n.ScriptSingularityFn1RamCost / 4,
isBusy: () => n.ScriptSingularityFn1RamCost / 4,
stopAction: () => n.ScriptSingularityFn1RamCost / 2,
upgradeHomeRam: () => n.ScriptSingularityFn2RamCost,
getUpgradeHomeRamCost: () => n.ScriptSingularityFn2RamCost / 2,
workForCompany: () => n.ScriptSingularityFn2RamCost,
applyToCompany: () => n.ScriptSingularityFn2RamCost,
getCompanyRep: () => n.ScriptSingularityFn2RamCost / 3,
getCompanyFavor: () => n.ScriptSingularityFn2RamCost / 3,
getCompanyFavorGain: () => n.ScriptSingularityFn2RamCost / 4,
checkFactionInvitations: () => n.ScriptSingularityFn2RamCost,
joinFaction: () => n.ScriptSingularityFn2RamCost,
workForFaction: () => n.ScriptSingularityFn2RamCost,
getFactionRep: () => n.ScriptSingularityFn2RamCost / 3,
getFactionFavor: () => n.ScriptSingularityFn2RamCost / 3,
getFactionFavorGain: () => n.ScriptSingularityFn2RamCost / 4,
donateToFaction: () => n.ScriptSingularityFn3RamCost,
createProgram: () => n.ScriptSingularityFn3RamCost,
commitCrime: () => n.ScriptSingularityFn3RamCost,
getCrimeChance: () => n.ScriptSingularityFn3RamCost,
getCrimeStats: () => n.ScriptSingularityFn3RamCost,
getOwnedAugmentations: () => n.ScriptSingularityFn3RamCost,
getOwnedSourceFiles: () => n.ScriptSingularityFn3RamCost,
getAugmentationsFromFaction: () => n.ScriptSingularityFn3RamCost,
getAugmentationCost: () => n.ScriptSingularityFn3RamCost,
getAugmentationPrereq: () => n.ScriptSingularityFn3RamCost,
getAugmentationPrice: () => n.ScriptSingularityFn3RamCost / 2,
getAugmentationRepReq: () => n.ScriptSingularityFn3RamCost / 2,
getAugmentationStats: () => n.ScriptSingularityFn3RamCost,
purchaseAugmentation: () => n.ScriptSingularityFn3RamCost,
softReset: () => n.ScriptSingularityFn3RamCost,
installAugmentations: () => n.ScriptSingularityFn3RamCost,
gang: {
createGang: () => n.ScriptGangApiBaseRamCost / 4,
inGang: () => n.ScriptGangApiBaseRamCost / 4,
getMemberNames: () => n.ScriptGangApiBaseRamCost / 4,
getGangInformation: () => n.ScriptGangApiBaseRamCost / 2,
getOtherGangInformation: () => n.ScriptGangApiBaseRamCost / 2,
getMemberInformation: () => n.ScriptGangApiBaseRamCost / 2,
canRecruitMember: () => n.ScriptGangApiBaseRamCost / 4,
recruitMember: () => n.ScriptGangApiBaseRamCost / 2,
getTaskNames: () => n.ScriptGangApiBaseRamCost / 4,
getTaskStats: () => n.ScriptGangApiBaseRamCost / 4,
setMemberTask: () => n.ScriptGangApiBaseRamCost / 2,
getEquipmentNames: () => n.ScriptGangApiBaseRamCost / 4,
getEquipmentCost: () => n.ScriptGangApiBaseRamCost / 2,
getEquipmentType: () => n.ScriptGangApiBaseRamCost / 2,
getEquipmentStats: () => n.ScriptGangApiBaseRamCost / 2,
purchaseEquipment: () => n.ScriptGangApiBaseRamCost,
ascendMember: () => n.ScriptGangApiBaseRamCost,
setTerritoryWarfare: () => n.ScriptGangApiBaseRamCost / 2,
getChanceToWinClash: () => n.ScriptGangApiBaseRamCost,
getBonusTime: () => 0,
},
bladeburner: {
getContractNames: () => n.ScriptBladeburnerApiBaseRamCost / 10,
getOperationNames: () => n.ScriptBladeburnerApiBaseRamCost / 10,
getBlackOpNames: () => n.ScriptBladeburnerApiBaseRamCost / 10,
getBlackOpRank: () => n.ScriptBladeburnerApiBaseRamCost / 2,
getGeneralActionNames: () => n.ScriptBladeburnerApiBaseRamCost / 10,
getSkillNames: () => n.ScriptBladeburnerApiBaseRamCost / 10,
startAction: () => n.ScriptBladeburnerApiBaseRamCost,
stopBladeburnerAction: () => n.ScriptBladeburnerApiBaseRamCost / 2,
getCurrentAction: () => n.ScriptBladeburnerApiBaseRamCost / 4,
getActionTime: () => n.ScriptBladeburnerApiBaseRamCost,
getActionEstimatedSuccessChance: () => n.ScriptBladeburnerApiBaseRamCost,
getActionRepGain: () => n.ScriptBladeburnerApiBaseRamCost,
getActionCountRemaining: () => n.ScriptBladeburnerApiBaseRamCost,
getActionMaxLevel: () => n.ScriptBladeburnerApiBaseRamCost,
getActionCurrentLevel: () => n.ScriptBladeburnerApiBaseRamCost,
getActionAutolevel: () => n.ScriptBladeburnerApiBaseRamCost,
setActionAutolevel: () => n.ScriptBladeburnerApiBaseRamCost,
setActionLevel: () => n.ScriptBladeburnerApiBaseRamCost,
getRank: () => n.ScriptBladeburnerApiBaseRamCost,
getSkillPoints: () => n.ScriptBladeburnerApiBaseRamCost,
getSkillLevel: () => n.ScriptBladeburnerApiBaseRamCost,
getSkillUpgradeCost: () => n.ScriptBladeburnerApiBaseRamCost,
upgradeSkill: () => n.ScriptBladeburnerApiBaseRamCost,
getTeamSize: () => n.ScriptBladeburnerApiBaseRamCost,
setTeamSize: () => n.ScriptBladeburnerApiBaseRamCost,
getCityEstimatedPopulation: () => n.ScriptBladeburnerApiBaseRamCost,
getCityEstimatedCommunities: () => n.ScriptBladeburnerApiBaseRamCost,
getCityChaos: () => n.ScriptBladeburnerApiBaseRamCost,
getCity: () => n.ScriptBladeburnerApiBaseRamCost,
switchCity: () => n.ScriptBladeburnerApiBaseRamCost,
getStamina: () => n.ScriptBladeburnerApiBaseRamCost,
joinBladeburnerFaction: () => n.ScriptBladeburnerApiBaseRamCost,
joinBladeburnerDivision: () => n.ScriptBladeburnerApiBaseRamCost,
getBonusTime: () => 0,
},
codingcontract: {
attempt: () => n.ScriptCodingContractBaseRamCost,
getContractType: () => n.ScriptCodingContractBaseRamCost / 2,
getData: () => n.ScriptCodingContractBaseRamCost / 2,
getDescription: () => n.ScriptCodingContractBaseRamCost / 2,
getNumTriesRemaining: () => n.ScriptCodingContractBaseRamCost / 5,
},
sleeve: {
getNumSleeves: () => n.ScriptSleeveBaseRamCost,
setToShockRecovery: () => n.ScriptSleeveBaseRamCost,
setToSynchronize: () => n.ScriptSleeveBaseRamCost,
setToCommitCrime: () => n.ScriptSleeveBaseRamCost,
setToUniversityCourse: () => n.ScriptSleeveBaseRamCost,
travel: () => n.ScriptSleeveBaseRamCost,
setToCompanyWork: () => n.ScriptSleeveBaseRamCost,
setToFactionWork: () => n.ScriptSleeveBaseRamCost,
setToGymWorkout: () => n.ScriptSleeveBaseRamCost,
getSleeveStats: () => n.ScriptSleeveBaseRamCost,
getTask: () => n.ScriptSleeveBaseRamCost,
getInformation: () => n.ScriptSleeveBaseRamCost,
getSleeveAugmentations: () => n.ScriptSleeveBaseRamCost,
getSleevePurchasableAugs: () => n.ScriptSleeveBaseRamCost,
purchaseSleeveAug: () => n.ScriptSleeveBaseRamCost,
},
heart: { break: () => 0 },
};
function i(...e) {
if (0 === e.length) return console.warn("No arguments passed to getRamCost()"), 0;
let t = r[e[0]];
for (let a = 1; a < e.length; ++a) {
if (null == t) return console.warn("Invalid function passed to getRamCost: " + e), 0;
const n = typeof t;
if ("function" === n || "number" === n) break;
t = t[e[a]];
}
const a = typeof t;
return "function" === a ? t() : "number" === a ? t : (console.warn(`Unexpected type (${a}) for value [${e}]`), 0);
}
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return r;
}),
a.d(t, "a", function () {
return i;
});
var n = a(173);
const r = {
ActiveScriptsServerPageSize: 10,
ActiveScriptsScriptPageSize: 10,
AutosaveInterval: 60,
CodeInstructionRunTime: 50,
DisableASCIIArt: !1,
DisableHotkeys: !1,
DisableTextEffects: !1,
EnableBashHotkeys: !1,
EnableTimestamps: !1,
Locale: "en",
MaxLogCapacity: 50,
MaxPortCapacity: 50,
MaxTerminalCapacity: 200,
SuppressBuyAugmentationConfirmation: !1,
SuppressFactionInvites: !1,
SuppressHospitalizationPopup: !1,
SuppressMessages: !1,
SuppressTravelConfirmation: !1,
SuppressBladeburnerPopup: !1,
theme: {
primarylight: "#0f0",
primary: "#0c0",
primarydark: "#090",
errorlight: "#f00",
error: "#c00",
errordark: "#900",
secondarylight: "#AAA",
secondary: "#888",
secondarydark: "#666",
warninglight: "#ff0",
warning: "#cc0",
warningdark: "#990",
infolight: "#69f",
info: "#36c",
infodark: "#039",
welllight: "#444",
well: "#222",
white: "#fff",
black: "#000",
hp: "#dd3434",
money: "#ffd700",
hack: "#adff2f",
combat: "#faffdf",
cha: "#a671d1",
int: "#6495ed",
rep: "#faffdf",
disabled: "#66cfbc",
},
},
i = {
ActiveScriptsServerPageSize: r.ActiveScriptsServerPageSize,
ActiveScriptsScriptPageSize: r.ActiveScriptsScriptPageSize,
AutosaveInterval: r.AutosaveInterval,
CodeInstructionRunTime: 25,
DisableASCIIArt: r.DisableASCIIArt,
DisableHotkeys: r.DisableHotkeys,
DisableTextEffects: r.DisableTextEffects,
EnableBashHotkeys: r.EnableBashHotkeys,
EnableTimestamps: r.EnableTimestamps,
Locale: "en",
MaxLogCapacity: r.MaxLogCapacity,
MaxPortCapacity: r.MaxPortCapacity,
MaxTerminalCapacity: r.MaxTerminalCapacity,
OwnedAugmentationsOrder: n.a.AcquirementTime,
PurchaseAugmentationsOrder: n.b.Default,
SuppressBuyAugmentationConfirmation: r.SuppressBuyAugmentationConfirmation,
SuppressFactionInvites: r.SuppressFactionInvites,
SuppressHospitalizationPopup: r.SuppressHospitalizationPopup,
SuppressMessages: r.SuppressMessages,
SuppressTravelConfirmation: r.SuppressTravelConfirmation,
SuppressBladeburnerPopup: r.SuppressBladeburnerPopup,
MonacoTheme: "vs-dark",
MonacoInsertSpaces: !1,
MonacoFontSize: 10,
theme: {
primarylight: r.theme.primarylight,
primary: r.theme.primary,
primarydark: r.theme.primarydark,
errorlight: r.theme.errorlight,
error: r.theme.error,
errordark: r.theme.errordark,
secondarylight: r.theme.secondarylight,
secondary: r.theme.secondary,
secondarydark: r.theme.secondarydark,
warninglight: r.theme.warninglight,
warning: r.theme.warning,
warningdark: r.theme.warningdark,
infolight: r.theme.infolight,
info: r.theme.info,
infodark: r.theme.infodark,
welllight: r.theme.welllight,
well: r.theme.well,
white: r.theme.white,
black: r.theme.black,
hp: r.theme.hp,
money: r.theme.money,
hack: r.theme.hack,
combat: r.theme.combat,
cha: r.theme.cha,
int: r.theme.int,
rep: r.theme.rep,
disabled: r.theme.disabled,
},
init() {
Object.assign(i, r);
},
load(e) {
Object.assign(i, JSON.parse(e));
},
};
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return o;
});
var n = a(349),
r = a(0),
i = a.n(r);
function o(e) {
"string" != typeof e
? n.a.emit(e)
: n.a.emit(i.a.createElement("span", { dangerouslySetInnerHTML: { __html: e } }));
}
},
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(0),
r = a(4),
i = a(131),
o = a(155);
const s = Object(i.a)((e) =>
Object(o.a)({ unbuyable: { color: e.palette.action.disabled }, money: { color: e.colors.money } }),
);
function l(e) {
const t = s();
if (void 0 !== e.player) {
if ("number" != typeof e.money) throw new Error("if player if provided, money should be number, contact dev");
if (!e.player.canAfford(e.money))
return n.createElement("span", { className: t.unbuyable }, r.a.formatMoney(e.money));
}
return n.createElement(
"span",
{ className: t.money },
"number" == typeof e.money ? r.a.formatMoney(e.money) : e.money,
);
}
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {};
},
function (e, t, a) {
"use strict";
function n(e, t) {
if (null == t) return console.log("Reviver WRONGLY called with key: " + e + ", and value: " + t), 0;
if ("object" == typeof t && "string" == typeof t.ctor && void 0 !== t.data) {
if ("AllServersMap" === t.ctor) return console.log("Converting AllServersMap for v0.43.1"), t.data;
const e = n.constructors[t.ctor];
if ("function" == typeof e && "function" == typeof e.fromJSON) return e.fromJSON(t);
}
return t;
}
function r(e, t, a) {
a || (a = Object.keys(t));
const n = {};
for (let e = 0; e < a.length; ++e) {
const r = a[e];
n[r] = t[r];
}
return { ctor: e, data: n };
}
function i(e, t) {
const a = new e();
for (const e in t) a[e] = t[e];
return a;
}
a.d(t, "c", function () {
return n;
}),
a.d(t, "b", function () {
return r;
}),
a.d(t, "a", function () {
return i;
}),
((n || (n = {})).constructors = {});
},
function (e, t, a) {
"use strict";
let n;
a.d(t, "a", function () {
return n;
}),
(function (e) {
(e.Aevum = "Aevum"),
(e.Chongqing = "Chongqing"),
(e.Ishima = "Ishima"),
(e.NewTokyo = "New Tokyo"),
(e.Sector12 = "Sector-12"),
(e.Volhaven = "Volhaven");
})(n || (n = {}));
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return r;
}),
a.d(t, "e", function () {
return i;
}),
a.d(t, "a", function () {
return o;
}),
a.d(t, "c", function () {
return s;
}),
a.d(t, "d", function () {
return l;
});
var n = a(118);
function r(e, t = !1) {
e = Math.floor(e);
const a = Math.floor(e / 1e3),
n = Math.floor(a / 86400),
r = a % 86400,
i = Math.floor(r / 3600),
o = r % 3600,
s = Math.floor(o / 60),
l = o % 60,
c = (() => {
let t = "" + (e % 1e3);
for (; t.length < 3; ) t = "0" + t;
return t;
})();
let u = "";
return (
n > 0 && (u += n + " days "),
i > 0 && (u += i + " hours "),
s > 0 && (u += s + " minutes "),
(u += (t ? `${l}.${c}` : "" + l) + " seconds"),
u
);
}
function i(e) {
if (!o(e)) return "";
if (0 === e.length) return "";
const t = e.concat().sort(),
a = t[0],
n = t[t.length - 1],
r = a.length;
let i = 0;
for (; i < r && ((s = a.charAt(i)), (l = n.charAt(i)), s.toUpperCase() === l.toUpperCase()); ) i++;
var s, l;
return a.substring(0, i);
}
function o(e) {
return e.every(n.a);
}
function s(e, t = 0) {
return e.toLocaleString(void 0, { maximumFractionDigits: t, minimumFractionDigits: t });
}
function l(e) {
let t = "";
const a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
for (let n = 0; n < e; n++) t += a.charAt(Math.floor(Math.random() * a.length));
return t;
}
},
function (e, t, a) {
"use strict";
a.d(t, "d", function () {
return u;
}),
a.d(t, "c", function () {
return m;
}),
a.d(t, "b", function () {
return h;
}),
a.d(t, "g", function () {
return d;
}),
a.d(t, "e", function () {
return p;
}),
a.d(t, "a", function () {
return f;
}),
a.d(t, "f", function () {
return g;
}),
a.d(t, "i", function () {
return y;
}),
a.d(t, "h", function () {
return b;
}),
a.d(t, "j", function () {
return E;
});
var n = a(48),
r = a(787),
i = a(277),
o = a(30),
s = a(21),
l = a(788);
let c = {};
function u(e) {
const t = c[e];
if (t) return t;
if (!Object(l.a)(e))
return (function (e) {
for (const t in c) {
const a = c[t];
if (a.hostname == e) return a;
}
return null;
})(e);
const a = (function (e) {
for (const t in c) {
const a = c[t];
if (a.ip === e) return a;
}
})(e);
return void 0 !== a ? a : null;
}
function m() {
const e = [];
for (const t in c) e.push(c[t]);
return e;
}
function h(e) {
for (const t in c) {
const a = c[t];
if (a.ip === e || a.hostname === e) {
delete c[t];
break;
}
}
}
function d(e) {
return null != c[e];
}
function p() {
const e = Object(i.a)();
return d(e) ? Object(i.a)() : e;
}
function f(e) {
if (u(e.hostname))
throw (
(console.warn("Hostname of the server thats being added: " + e.hostname),
console.warn("The server that already has this IP is: " + c[e.hostname].hostname),
new Error("Error: Trying to add a server with an existing IP"))
);
c[e.hostname] = e;
}
function g(e) {
const t = [];
for (let e = 0; e < 15; e++) t.push([]);
const a = ["hackDifficulty", "moneyAvailable", "requiredHackingSkill", "serverGrowth"],
i = (e) => {
switch (typeof e) {
case "number":
return e;
case "object":
return Object(o.a)(e.min, e.max);
default:
throw Error(`Do not know how to convert the type '${typeof e}' to a number`);
}
};
for (const e of r.a) {
const r = {
hostname: e.hostname,
ip: p(),
numOpenPortsRequired: e.numOpenPortsRequired,
organizationName: e.organizationName,
};
void 0 !== e.maxRamExponent && (r.maxRam = Math.pow(2, i(e.maxRamExponent)));
for (const t of a) void 0 !== e[t] && (r[t] = i(e[t]));
const o = new n.a(r);
for (const t of e.literature || []) o.messages.push(t);
f(o), void 0 !== e.networkLayer && t[i(e.networkLayer) - 1].push(o);
}
const s = (e, t) => {
for (const r of e) (a = r), (n = t()), a.serversOnNetwork.push(n.hostname), n.serversOnNetwork.push(a.hostname);
var a, n;
};
s(t[0], () => e);
for (let e = 1; e < t.length; e++)
s(t[e], () => {
return (a = t[e - 1])[Math.floor(Math.random() * a.length)];
var a;
});
}
function y() {
for (const e in c) delete c[e];
c = {};
}
function b(e) {
c = JSON.parse(e, s.c);
}
function E() {
const e = JSON.parse(JSON.stringify(c), s.c);
for (const t in e) {
const a = e[t];
for (let e = 0; e < a.runningScripts.length; ++e) {
const t = a.runningScripts[e];
(t.logs.length = 0), (t.logs = []);
}
}
return JSON.stringify(e);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return o;
}),
a.d(t, "d", function () {
return s;
}),
a.d(t, "b", function () {
return l;
}),
a.d(t, "c", function () {
return c;
});
var n = a(172),
r = a(494),
i = a(21);
let o = {};
function s(e) {
o = JSON.parse(e, i.c);
for (const e of Object.keys(o))
try {
o[e].getInfo();
} catch (t) {
console.error("deleting " + e), delete o[e];
}
}
function l(e) {
return o.hasOwnProperty(e);
}
function c() {
for (const e in r.a) u(new n.a(e));
}
function u(e) {
if (!(e instanceof n.a)) throw new Error("Invalid argument 'newFactionObject' passed into resetFaction()");
const t = e.name;
l(t) && ((e.favor = o[t].favor), delete o[t]),
(function (e) {
const t = e.name;
o[t] = e;
})(e);
}
},
function (e, t, a) {
"use strict";
a.d(t, "j", function () {
return n;
}),
a.d(t, "d", function () {
return r;
}),
a.d(t, "i", function () {
return i;
}),
a.d(t, "f", function () {
return o;
}),
a.d(t, "b", function () {
return s;
}),
a.d(t, "h", function () {
return l;
}),
a.d(t, "a", function () {
return c;
}),
a.d(t, "e", function () {
return u;
}),
a.d(t, "k", function () {
return m;
}),
a.d(t, "c", function () {
return h;
}),
a.d(t, "g", function () {
return d;
});
const n = [
"Software Engineering Intern",
"Junior Software Engineer",
"Senior Software Engineer",
"Lead Software Developer",
"Head of Software",
"Head of Engineering",
"Vice President of Technology",
"Chief Technology Officer",
],
r = ["IT Intern", "IT Analyst", "IT Manager", "Systems Administrator"],
i = ["Security Engineer"],
o = ["Network Engineer", "Network Administrator"],
s = [
"Business Intern",
"Business Analyst",
"Business Manager",
"Operations Manager",
"Chief Financial Officer",
"Chief Executive Officer",
],
l = [
"Police Officer",
"Police Chief",
"Security Guard",
"Security Officer",
"Security Supervisor",
"Head of Security",
],
c = ["Field Agent", "Secret Agent", "Special Operative"],
u = ["Waiter", "Employee"],
m = ["Software Consultant", "Senior Software Consultant"],
h = ["Business Consultant", "Senior Business Consultant"],
d = ["Part-time Waiter", "Part-time Employee"];
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
}),
a.d(t, "b", function () {
return o;
});
var n = a(0),
r = a.n(n);
const i = { Player: r.a.createContext({}), Router: r.a.createContext({}) },
o = { Player: () => Object(n.useContext)(i.Player), Router: () => Object(n.useContext)(i.Router) };
},
,
,
function (e, t, a) {
"use strict";
function n(e, t) {
const a = Math.min(e, t),
n = Math.max(e, t);
return Math.floor(Math.random() * (n - a + 1)) + a;
}
a.d(t, "a", function () {
return n;
});
},
function (e, t, a) {
"use strict";
let n;
a.d(t, "a", function () {
return n;
}),
(function (e) {
(e[(e.ActiveScripts = 0)] = "ActiveScripts"),
(e[(e.Augmentations = 1)] = "Augmentations"),
(e[(e.BitVerse = 2)] = "BitVerse"),
(e[(e.Bladeburner = 3)] = "Bladeburner"),
(e[(e.City = 4)] = "City"),
(e[(e.Corporation = 5)] = "Corporation"),
(e[(e.CreateProgram = 6)] = "CreateProgram"),
(e[(e.ScriptEditor = 7)] = "ScriptEditor"),
(e[(e.DevMenu = 8)] = "DevMenu"),
(e[(e.Faction = 9)] = "Faction"),
(e[(e.Factions = 10)] = "Factions"),
(e[(e.Gang = 11)] = "Gang"),
(e[(e.Hacknet = 12)] = "Hacknet"),
(e[(e.Infiltration = 13)] = "Infiltration"),
(e[(e.Job = 14)] = "Job"),
(e[(e.Milestones = 15)] = "Milestones"),
(e[(e.Options = 16)] = "Options"),
(e[(e.Resleeves = 17)] = "Resleeves"),
(e[(e.Sleeves = 18)] = "Sleeves"),
(e[(e.Stats = 19)] = "Stats"),
(e[(e.StockMarket = 20)] = "StockMarket"),
(e[(e.Terminal = 21)] = "Terminal"),
(e[(e.Travel = 22)] = "Travel"),
(e[(e.Tutorial = 23)] = "Tutorial"),
(e[(e.Work = 24)] = "Work"),
(e[(e.BladeburnerCinematic = 25)] = "BladeburnerCinematic"),
(e[(e.Location = 26)] = "Location"),
(e[(e.Loading = 27)] = "Loading");
})(n || (n = {}));
},
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return u;
});
var n = a(0),
r = a(8),
i = a(25),
o = a(4),
s = a(18),
l = a(21);
function c(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class u {
constructor(e = { info: "", moneyCost: 0, name: "", repCost: 0 }) {
c(this, "baseCost", 0),
c(this, "baseRepRequirement", 0),
c(this, "isSpecial", !1),
c(this, "level", 0),
c(this, "name", ""),
c(this, "owned", !1),
c(this, "prereqs", []),
c(this, "mults", {}),
c(this, "startingCost", 0),
(this.name = e.name),
(this.info = e.info),
(this.prereqs = e.prereqs ? e.prereqs : []),
(this.baseRepRequirement = e.repCost * r.a.AugmentationRepCost),
(this.baseCost = e.moneyCost * r.a.AugmentationMoneyCost),
(this.startingCost = this.baseCost),
e.isSpecial && (this.isSpecial = !0),
(this.level = 0),
e.hacking_mult && (this.mults.hacking_mult = e.hacking_mult),
e.strength_mult && (this.mults.strength_mult = e.strength_mult),
e.defense_mult && (this.mults.defense_mult = e.defense_mult),
e.dexterity_mult && (this.mults.dexterity_mult = e.dexterity_mult),
e.agility_mult && (this.mults.agility_mult = e.agility_mult),
e.charisma_mult && (this.mults.charisma_mult = e.charisma_mult),
e.hacking_exp_mult && (this.mults.hacking_exp_mult = e.hacking_exp_mult),
e.strength_exp_mult && (this.mults.strength_exp_mult = e.strength_exp_mult),
e.defense_exp_mult && (this.mults.defense_exp_mult = e.defense_exp_mult),
e.dexterity_exp_mult && (this.mults.dexterity_exp_mult = e.dexterity_exp_mult),
e.agility_exp_mult && (this.mults.agility_exp_mult = e.agility_exp_mult),
e.charisma_exp_mult && (this.mults.charisma_exp_mult = e.charisma_exp_mult),
e.hacking_chance_mult && (this.mults.hacking_chance_mult = e.hacking_chance_mult),
e.hacking_speed_mult && (this.mults.hacking_speed_mult = e.hacking_speed_mult),
e.hacking_money_mult && (this.mults.hacking_money_mult = e.hacking_money_mult),
e.hacking_grow_mult && (this.mults.hacking_grow_mult = e.hacking_grow_mult),
e.company_rep_mult && (this.mults.company_rep_mult = e.company_rep_mult),
e.faction_rep_mult && (this.mults.faction_rep_mult = e.faction_rep_mult),
e.crime_money_mult && (this.mults.crime_money_mult = e.crime_money_mult),
e.crime_success_mult && (this.mults.crime_success_mult = e.crime_success_mult),
e.work_money_mult && (this.mults.work_money_mult = e.work_money_mult),
e.hacknet_node_money_mult && (this.mults.hacknet_node_money_mult = e.hacknet_node_money_mult),
e.hacknet_node_purchase_cost_mult &&
(this.mults.hacknet_node_purchase_cost_mult = e.hacknet_node_purchase_cost_mult),
e.hacknet_node_ram_cost_mult && (this.mults.hacknet_node_ram_cost_mult = e.hacknet_node_ram_cost_mult),
e.hacknet_node_core_cost_mult && (this.mults.hacknet_node_core_cost_mult = e.hacknet_node_core_cost_mult),
e.hacknet_node_level_cost_mult && (this.mults.hacknet_node_level_cost_mult = e.hacknet_node_level_cost_mult),
e.bladeburner_max_stamina_mult && (this.mults.bladeburner_max_stamina_mult = e.bladeburner_max_stamina_mult),
e.bladeburner_stamina_gain_mult &&
(this.mults.bladeburner_stamina_gain_mult = e.bladeburner_stamina_gain_mult),
e.bladeburner_analysis_mult && (this.mults.bladeburner_analysis_mult = e.bladeburner_analysis_mult),
e.bladeburner_success_chance_mult &&
(this.mults.bladeburner_success_chance_mult = e.bladeburner_success_chance_mult),
void 0 === e.stats
? (this.stats = (function (e, t, a) {
const r = (e, t = 0) =>
e === 1.0777 - 1 ? "7.77%" : e === 1.777 - 1 ? "77.7%" : o.a.formatPercentage(e, t);
let i = n.createElement(n.Fragment, null, "Effects:");
return (
e.hacking_mult &&
e.hacking_mult == e.strength_mult &&
e.hacking_mult == e.defense_mult &&
e.hacking_mult == e.dexterity_mult &&
e.hacking_mult == e.agility_mult &&
e.hacking_mult == e.charisma_mult
? (i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.hacking_mult - 1),
" all skills",
))
: (e.hacking_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.hacking_mult - 1),
" hacking skill",
)),
e.strength_mult &&
e.strength_mult == e.defense_mult &&
e.strength_mult == e.dexterity_mult &&
e.strength_mult == e.agility_mult
? (i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.strength_mult - 1),
" combat skills",
))
: (e.strength_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.strength_mult - 1),
" strength skill",
)),
e.defense_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.defense_mult - 1),
" defense skill",
)),
e.dexterity_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.dexterity_mult - 1),
" dexterity skill",
)),
e.agility_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.agility_mult - 1),
" agility skill",
))),
e.charisma_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.charisma_mult - 1),
" Charisma skill",
))),
e.hacking_exp_mult &&
e.hacking_exp_mult === e.strength_exp_mult &&
e.hacking_exp_mult === e.defense_exp_mult &&
e.hacking_exp_mult === e.dexterity_exp_mult &&
e.hacking_exp_mult === e.agility_exp_mult &&
e.hacking_exp_mult === e.charisma_exp_mult
? (i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.hacking_exp_mult - 1),
" exp for all skills",
))
: (e.hacking_exp_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.hacking_exp_mult - 1),
" hacking exp",
)),
e.strength_exp_mult &&
e.strength_exp_mult === e.defense_exp_mult &&
e.strength_exp_mult === e.dexterity_exp_mult &&
e.strength_exp_mult === e.agility_exp_mult
? (i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.strength_exp_mult - 1),
" combat exp",
))
: (e.strength_exp_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.strength_exp_mult - 1),
" strength exp",
)),
e.defense_exp_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.defense_exp_mult - 1),
" defense exp",
)),
e.dexterity_exp_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.dexterity_exp_mult - 1),
" dexterity exp",
)),
e.agility_exp_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.agility_exp_mult - 1),
" agility exp",
))),
e.charisma_exp_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.charisma_exp_mult - 1),
" charisma exp",
))),
e.hacking_speed_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.hacking_speed_mult - 1),
" faster hack(), grow(), and weaken()",
)),
e.hacking_chance_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.hacking_chance_mult - 1),
" hack() success chance",
)),
e.hacking_money_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.hacking_money_mult - 1),
" hack() power",
)),
e.hacking_grow_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.hacking_grow_mult - 1),
" grow() power",
)),
e.faction_rep_mult && e.faction_rep_mult === e.company_rep_mult
? (i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.faction_rep_mult - 1),
" reputation from factions and companies",
))
: (e.faction_rep_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.faction_rep_mult - 1),
" reputation from factions",
)),
e.company_rep_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.company_rep_mult - 1),
" reputation from companies",
))),
e.crime_money_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.crime_money_mult - 1),
" crime money",
)),
e.crime_success_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.crime_success_mult - 1),
" crime success rate",
)),
e.work_money_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.work_money_mult - 1),
" work money",
)),
e.hacknet_node_money_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.hacknet_node_money_mult - 1),
" hacknet production",
)),
e.hacknet_node_purchase_cost_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"-",
r(-(e.hacknet_node_purchase_cost_mult - 1)),
" hacknet nodes cost",
)),
e.hacknet_node_level_cost_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"-",
r(-(e.hacknet_node_level_cost_mult - 1)),
" hacknet nodes upgrade cost",
)),
e.bladeburner_max_stamina_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.bladeburner_max_stamina_mult - 1),
" Bladeburner Max Stamina",
)),
e.bladeburner_stamina_gain_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.bladeburner_stamina_gain_mult - 1),
" Bladeburner Stamina gain",
)),
e.bladeburner_analysis_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.bladeburner_analysis_mult - 1),
" Bladeburner Field Analysis effectiveness",
)),
e.bladeburner_success_chance_mult &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"+",
r(e.bladeburner_success_chance_mult - 1),
" Bladeburner Contracts and Operations success chance",
)),
a &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"Start with ",
n.createElement(s.a, { money: a }),
" after installing Augmentations.",
)),
t &&
(i = n.createElement(
n.Fragment,
null,
i,
n.createElement("br", null),
"Start with ",
t.join(" and "),
" after installing Augmentations.",
)),
i
);
})(this.mults, e.programs, e.startingMoney))
: (this.stats = e.stats);
}
addToFactions(e) {
for (let t = 0; t < e.length; ++t) {
const a = i.a[e[t]];
null != a
? a.augmentations.push(this.name)
: console.warn("In Augmentation.addToFactions(), could not find faction with this name: " + e[t]);
}
}
addToAllFactions() {
for (const e in i.a)
if (i.a.hasOwnProperty(e)) {
const t = i.a[e];
if (null == t) {
console.warn("Invalid Faction object in addToAllFactions(). Key value: " + e);
continue;
}
t.augmentations.push(this.name);
}
}
toJSON() {
return Object(l.b)("Augmentation", this);
}
static fromJSON(e) {
return Object(l.a)(u, e.data);
}
}
l.c.constructors.Augmentation = u;
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
}),
a.d(t, "c", function () {
return r;
}),
a.d(t, "b", function () {
return i;
});
const n = {
MoneyGainPerLevel: 1.5,
BaseCost: 1e3,
LevelBaseCost: 1,
RamBaseCost: 3e4,
CoreBaseCost: 5e5,
PurchaseNextMult: 1.85,
UpgradeLevelMult: 1.04,
UpgradeRamMult: 1.28,
UpgradeCoreMult: 1.48,
MaxLevel: 200,
MaxRam: 64,
MaxCores: 16,
},
r = { x1: 1, x5: 5, x10: 10, MAX: "MAX" },
i = {
HashesPerLevel: 0.001,
BaseCost: 5e4,
RamBaseCost: 2e5,
CoreBaseCost: 1e6,
CacheBaseCost: 1e7,
PurchaseMult: 3.2,
UpgradeLevelMult: 1.1,
UpgradeRamMult: 1.4,
UpgradeCoreMult: 1.55,
UpgradeCacheMult: 1.85,
MaxServers: 20,
MaxLevel: 300,
MaxRam: 8192,
MaxCores: 128,
MaxCache: 15,
};
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
Idle: 1,
Contract: 2,
Operation: 3,
BlackOp: 4,
BlackOperation: 4,
Training: 5,
Recruitment: 6,
FieldAnalysis: 7,
"Field Analysis": 7,
Diplomacy: 8,
"Hyperbolic Regeneration Chamber": 9,
};
},
function (e, t, a) {
"use strict";
a.d(t, "f", function () {
return n;
}),
a.d(t, "b", function () {
return m;
}),
a.d(t, "e", function () {
return l;
}),
a.d(t, "c", function () {
return c;
}),
a.d(t, "a", function () {
return s;
}),
a.d(t, "d", function () {
return u;
});
var n,
r = a(2),
i = a(56),
o = a(324);
!(function (e) {
(e[(e.Start = 0)] = "Start"),
(e[(e.GoToCharacterPage = 1)] = "GoToCharacterPage"),
(e[(e.CharacterPage = 2)] = "CharacterPage"),
(e[(e.CharacterGoToTerminalPage = 3)] = "CharacterGoToTerminalPage"),
(e[(e.TerminalIntro = 4)] = "TerminalIntro"),
(e[(e.TerminalHelp = 5)] = "TerminalHelp"),
(e[(e.TerminalLs = 6)] = "TerminalLs"),
(e[(e.TerminalScan = 7)] = "TerminalScan"),
(e[(e.TerminalScanAnalyze1 = 8)] = "TerminalScanAnalyze1"),
(e[(e.TerminalScanAnalyze2 = 9)] = "TerminalScanAnalyze2"),
(e[(e.TerminalConnect = 10)] = "TerminalConnect"),
(e[(e.TerminalAnalyze = 11)] = "TerminalAnalyze"),
(e[(e.TerminalNuke = 12)] = "TerminalNuke"),
(e[(e.TerminalManualHack = 13)] = "TerminalManualHack"),
(e[(e.TerminalHackingMechanics = 14)] = "TerminalHackingMechanics"),
(e[(e.TerminalGoHome = 15)] = "TerminalGoHome"),
(e[(e.TerminalCreateScript = 16)] = "TerminalCreateScript"),
(e[(e.TerminalTypeScript = 17)] = "TerminalTypeScript"),
(e[(e.TerminalFree = 18)] = "TerminalFree"),
(e[(e.TerminalRunScript = 19)] = "TerminalRunScript"),
(e[(e.TerminalGoToActiveScriptsPage = 20)] = "TerminalGoToActiveScriptsPage"),
(e[(e.ActiveScriptsPage = 21)] = "ActiveScriptsPage"),
(e[(e.ActiveScriptsToTerminal = 22)] = "ActiveScriptsToTerminal"),
(e[(e.TerminalTailScript = 23)] = "TerminalTailScript"),
(e[(e.GoToHacknetNodesPage = 24)] = "GoToHacknetNodesPage"),
(e[(e.HacknetNodesIntroduction = 25)] = "HacknetNodesIntroduction"),
(e[(e.HacknetNodesGoToWorldPage = 26)] = "HacknetNodesGoToWorldPage"),
(e[(e.WorldDescription = 27)] = "WorldDescription"),
(e[(e.TutorialPageInfo = 28)] = "TutorialPageInfo"),
(e[(e.End = 29)] = "End");
})(n || (n = {}));
const s = {
currStep: n.Start,
isRunning: !1,
stepIsDone: {
[n.Start]: !1,
[n.GoToCharacterPage]: !1,
[n.CharacterPage]: !1,
[n.CharacterGoToTerminalPage]: !1,
[n.TerminalIntro]: !1,
[n.TerminalHelp]: !1,
[n.TerminalLs]: !1,
[n.TerminalScan]: !1,
[n.TerminalScanAnalyze1]: !1,
[n.TerminalScanAnalyze2]: !1,
[n.TerminalConnect]: !1,
[n.TerminalAnalyze]: !1,
[n.TerminalNuke]: !1,
[n.TerminalManualHack]: !1,
[n.TerminalHackingMechanics]: !1,
[n.TerminalGoHome]: !1,
[n.TerminalCreateScript]: !1,
[n.TerminalTypeScript]: !1,
[n.TerminalFree]: !1,
[n.TerminalRunScript]: !1,
[n.TerminalGoToActiveScriptsPage]: !1,
[n.ActiveScriptsPage]: !1,
[n.ActiveScriptsToTerminal]: !1,
[n.TerminalTailScript]: !1,
[n.GoToHacknetNodesPage]: !1,
[n.HacknetNodesIntroduction]: !1,
[n.HacknetNodesGoToWorldPage]: !1,
[n.WorldDescription]: !1,
[n.TutorialPageInfo]: !1,
[n.End]: !1,
},
};
function l() {
s.isRunning = !0;
}
function c() {
(s.stepIsDone[s.currStep] = !0), s.currStep < n.End && (s.currStep += 1), s.currStep === n.End && m(), o.a.emit();
}
function u() {
s.currStep > n.Start && (s.currStep -= 1), o.a.emit();
}
function m() {
(s.isRunning = !1), r.a.getHomeComputer().messages.push(i.a.HackersStartingHandbook), o.a.emit();
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return m;
});
var n = a(0),
r = a.n(n),
i = a(131),
o = a(155),
s = a(652),
l = a(1171),
c = a(32);
const u = Object(i.a)((e) =>
Object(o.a)({
modal: { display: "flex", alignItems: "center", justifyContent: "center" },
paper: {
backgroundColor: e.palette.background.default,
border: "2px solid " + e.palette.primary.main,
boxShadow: `0px 3px 5px -1px ${e.palette.primary.dark},0px 5px 8px 0px ${e.palette.primary.dark},0px 1px 14px 0px ${e.palette.primary.dark}`,
padding: 2,
maxWidth: "80%",
maxHeight: "80%",
overflow: "auto",
"&::-webkit-scrollbar": { display: "none" },
scrollbarWidth: "none",
},
}),
),
m = (e) => {
const t = u();
return r.a.createElement(
s.a,
{
disableRestoreFocus: !0,
disableScrollLock: !0,
disableEnforceFocus: !0,
disableAutoFocus: !0,
open: e.open,
onClose: e.onClose,
closeAfterTransition: !0,
className: t.modal,
},
r.a.createElement(
l.a,
{ in: e.open },
r.a.createElement("div", { className: t.paper }, r.a.createElement(c.a, { sx: { m: 2 } }, e.children)),
),
);
};
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
});
const n = ["START", "PURCHASE", "PRODUCTION", "SALE", "EXPORT"],
r = {
INITIALSHARES: 1e9,
SHARESPERPRICEUPDATE: 1e6,
IssueNewSharesCooldown: 216e3,
SellSharesCooldown: 18e3,
CyclesPerMarketCycle: 50,
CyclesPerIndustryStateCycle: 50 / n.length,
SecsPerMarketCycle: 10,
Cities: ["Aevum", "Chongqing", "Sector-12", "New Tokyo", "Ishima", "Volhaven"],
WarehouseInitialCost: 5e9,
WarehouseInitialSize: 100,
WarehouseUpgradeBaseCost: 1e9,
OfficeInitialCost: 4e9,
OfficeInitialSize: 3,
OfficeUpgradeBaseCost: 1e9,
BribeThreshold: 1e14,
BribeToRepRatio: 1e9,
ProductProductionCostRatio: 5,
DividendMaxPercentage: 0.5,
EmployeeSalaryMultiplier: 3,
CyclesPerEmployeeRaise: 400,
EmployeeRaiseAmount: 50,
BaseMaxProducts: 3,
AllCorporationStates: n,
AllMaterials: [
"Water",
"Energy",
"Food",
"Plants",
"Metal",
"Hardware",
"Chemicals",
"Drugs",
"Robots",
"AI Cores",
"Real Estate",
],
};
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return u;
}),
a.d(t, "a", function () {
return m;
});
var n = a(0),
r = a.n(n),
i = a(60),
o = a(238),
s = a(131);
function l() {
return (l =
Object.assign ||
function (e) {
for (var t = 1; t < arguments.length; t++) {
var a = arguments[t];
for (var n in a) Object.prototype.hasOwnProperty.call(a, n) && (e[n] = a[n]);
}
return e;
}).apply(this, arguments);
}
const c = Object(s.a)({ root: { borderBottom: "none" }, small: { width: "1px" } }),
u = (e) => r.a.createElement(i.a, l({}, e, { classes: { root: c().root, ...e.classes } })),
m = (e) => r.a.createElement(o.a, l({}, e, { classes: { root: c().small, ...e.classes } }));
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
}),
a.d(t, "b", function () {
return o;
}),
a.d(t, "c", function () {
return s;
});
var n = a(0),
r = a.n(n);
const i = { Corporation: r.a.createContext({}), Division: r.a.createContext({}) },
o = () => Object(n.useContext)(i.Corporation),
s = () => Object(n.useContext)(i.Division);
},
function (e, t, a) {
"use strict";
a.d(t, "ab", function () {
return X;
}),
a.d(t, "db", function () {
return Q;
}),
a.d(t, "eb", function () {
return Z;
}),
a.d(t, "lb", function () {
return ee;
}),
a.d(t, "o", function () {
return te;
}),
a.d(t, "Ib", function () {
return ae;
}),
a.d(t, "ob", function () {
return ne;
}),
a.d(t, "Y", function () {
return re;
}),
a.d(t, "rb", function () {
return ie;
}),
a.d(t, "I", function () {
return oe;
}),
a.d(t, "cb", function () {
return se;
}),
a.d(t, "q", function () {
return le;
}),
a.d(t, "mb", function () {
return ce;
}),
a.d(t, "G", function () {
return ue;
}),
a.d(t, "J", function () {
return me;
}),
a.d(t, "E", function () {
return he;
}),
a.d(t, "F", function () {
return de;
}),
a.d(t, "B", function () {
return pe;
}),
a.d(t, "C", function () {
return fe;
}),
a.d(t, "H", function () {
return ge;
}),
a.d(t, "gb", function () {
return ye;
}),
a.d(t, "pb", function () {
return be;
}),
a.d(t, "fb", function () {
return Ee;
}),
a.d(t, "Cb", function () {
return ve;
}),
a.d(t, "r", function () {
return ke;
}),
a.d(t, "Jb", function () {
return _e;
}),
a.d(t, "z", function () {
return we;
}),
a.d(t, "Db", function () {
return Ce;
}),
a.d(t, "Lb", function () {
return Se;
}),
a.d(t, "A", function () {
return xe;
}),
a.d(t, "Bb", function () {
return Oe;
}),
a.d(t, "Eb", function () {
return Te;
}),
a.d(t, "Ab", function () {
return Me;
}),
a.d(t, "yb", function () {
return Re;
}),
a.d(t, "xb", function () {
return Pe;
}),
a.d(t, "zb", function () {
return Ae;
}),
a.d(t, "Kb", function () {
return Ne;
}),
a.d(t, "y", function () {
return Ie;
}),
a.d(t, "T", function () {
return Fe;
}),
a.d(t, "S", function () {
return je;
}),
a.d(t, "V", function () {
return Be;
}),
a.d(t, "Q", function () {
return De;
}),
a.d(t, "R", function () {
return Ge;
}),
a.d(t, "O", function () {
return Le;
}),
a.d(t, "P", function () {
return We;
}),
a.d(t, "U", function () {
return He;
}),
a.d(t, "vb", function () {
return Ue;
}),
a.d(t, "u", function () {
return qe;
}),
a.d(t, "w", function () {
return Ke;
}),
a.d(t, "ub", function () {
return $e;
}),
a.d(t, "Fb", function () {
return ze;
}),
a.d(t, "v", function () {
return Ye;
}),
a.d(t, "wb", function () {
return Ve;
}),
a.d(t, "t", function () {
return Je;
}),
a.d(t, "x", function () {
return Xe;
}),
a.d(t, "tb", function () {
return Qe;
}),
a.d(t, "Gb", function () {
return Ze;
}),
a.d(t, "nb", function () {
return et;
}),
a.d(t, "Z", function () {
return tt;
}),
a.d(t, "f", function () {
return at;
}),
a.d(t, "N", function () {
return nt;
}),
a.d(t, "ib", function () {
return rt;
}),
a.d(t, "m", function () {
return it;
}),
a.d(t, "l", function () {
return ot;
}),
a.d(t, "e", function () {
return st;
}),
a.d(t, "j", function () {
return lt;
}),
a.d(t, "g", function () {
return ct;
}),
a.d(t, "c", function () {
return ut;
}),
a.d(t, "b", function () {
return mt;
}),
a.d(t, "k", function () {
return ht;
}),
a.d(t, "a", function () {
return dt;
}),
a.d(t, "d", function () {
return pt;
}),
a.d(t, "h", function () {
return ft;
}),
a.d(t, "n", function () {
return gt;
}),
a.d(t, "i", function () {
return yt;
}),
a.d(t, "bb", function () {
return bt;
}),
a.d(t, "jb", function () {
return Et;
}),
a.d(t, "kb", function () {
return vt;
}),
a.d(t, "s", function () {
return kt;
}),
a.d(t, "qb", function () {
return _t;
}),
a.d(t, "hb", function () {
return wt;
}),
a.d(t, "D", function () {
return Ct;
}),
a.d(t, "Hb", function () {
return St;
}),
a.d(t, "X", function () {
return xt;
}),
a.d(t, "p", function () {
return Ot;
}),
a.d(t, "W", function () {
return Tt;
}),
a.d(t, "L", function () {
return Mt;
}),
a.d(t, "K", function () {
return Rt;
}),
a.d(t, "M", function () {
return Pt;
}),
a.d(t, "sb", function () {
return At;
});
var n = a(20),
r = a(152),
i = a(313),
o = a(6),
s = a(8),
l = a(93),
c = a(200),
u = a(58),
m = a(566),
h = a(443),
d = a(81),
p = a(26),
f = a(7),
g = a(68),
y = a(401),
b = a(74),
E = a(172),
v = a(25),
k = a(73),
_ = a(129),
w = a(221),
C = a(22),
S = a(9),
x = a(285),
O = a(231),
T = a(350),
M = a(215),
R = a(24),
P = a(48),
A = a(113),
N = a(14),
I = a(103),
F = a(1122),
j = a(1123),
B = a(318),
D = a(62),
G = a(439),
L = a(351),
W = a(87),
H = a(97),
U = a(4),
q = a(329),
K = a(15),
$ = a(23),
z = a(102),
Y = a(18),
V = a(0),
J = a.n(V);
function X() {
const e = Object(A.f)({
adminRights: !0,
hostname: "home",
ip: Object(R.e)(),
isConnectedTo: !0,
maxRam: 8,
organizationName: "Home PC",
purchasedByPlayer: !0,
});
(this.currentServer = I.a.Home), Object(R.a)(e), this.getHomeComputer().programs.push(g.a.NukeProgram.name);
}
function Q() {
this.getHomeComputer();
(this.currentServer = I.a.Home),
(this.numPeopleKilled = 0),
(this.karma = 0),
(this.hacking_skill = 1),
(this.strength = 1),
(this.defense = 1),
(this.dexterity = 1),
(this.agility = 1),
(this.charisma = 1),
(this.hacking_exp = 0),
(this.strength_exp = 0),
(this.defense_exp = 0),
(this.dexterity_exp = 0),
(this.agility_exp = 0),
(this.charisma_exp = 0),
(this.money = new H.a(1e3)),
(this.city = C.a.Sector12),
(this.location = S.a.TravelAgency),
(this.companyName = ""),
(this.jobs = {}),
(this.purchasedServers = []),
(this.factions = []),
(this.factionInvitations = []),
(this.queuedAugmentations = []),
(this.resleeves = []);
const e = Math.min(3, D.a[10] + (10 === this.bitNodeN ? 1 : 0)) + this.sleevesFromCovenant;
this.sleeves.length > e && (this.sleeves.length = e);
for (let t = this.sleeves.length; t < e; t++) this.sleeves.push(new x.a(this));
for (let e = 0; e < this.sleeves.length; ++e)
this.sleeves[e] instanceof x.a &&
(this.sleeves[e].shock >= 100 ? this.sleeves[e].synchronize(this) : this.sleeves[e].shockRecovery(this));
(this.isWorking = !1),
(this.currentWorkFactionName = ""),
(this.currentWorkFactionDescription = ""),
(this.createProgramName = ""),
(this.className = ""),
(this.crimeType = ""),
(this.workHackExpGainRate = 0),
(this.workStrExpGainRate = 0),
(this.workDefExpGainRate = 0),
(this.workDexExpGainRate = 0),
(this.workAgiExpGainRate = 0),
(this.workChaExpGainRate = 0),
(this.workRepGainRate = 0),
(this.workMoneyGainRate = 0),
(this.workHackExpGained = 0),
(this.workStrExpGained = 0),
(this.workDefExpGained = 0),
(this.workDexExpGained = 0),
(this.workAgiExpGained = 0),
(this.workChaExpGained = 0),
(this.workRepGained = 0),
(this.workMoneyGained = 0),
(this.timeWorked = 0),
(this.lastUpdate = new Date().getTime()),
(this.playtimeSinceLastAug = 0),
(this.scriptProdSinceLastAug = 0),
this.moneySourceA.reset(),
(this.hacknetNodes.length = 0),
this.hashManager.prestige(),
this.reapplyAllAugmentations(!0),
(this.hp = this.max_hp);
}
function Z() {
this.prestigeAugmentation();
for (let e = 0; e < this.sleeves.length; ++e)
this.sleeves[e] instanceof x.a ? this.sleeves[e].prestige(this) : (this.sleeves[e] = new x.a(this));
if (10 === this.bitNodeN)
for (let e = 0; e < this.sleeves.length; e++)
(this.sleeves[e].shock = Math.max(25, this.sleeves[e].shock)),
(this.sleeves[e].sync = Math.max(25, this.sleeves[e].sync));
(this.timeWorked = 0),
(this.gang = null),
Object(k.c)(),
(this.hasWseAccount = !1),
(this.hasTixApiAccess = !1),
(this.has4SData = !1),
(this.has4SDataTixApi = !1),
(this.corporation = null),
this.moneySourceB.reset(),
(this.playtimeSinceLastBitnode = 0),
(this.augmentations = []);
}
function ee(e) {
this.factionInvitations.includes(e) || this.factions.includes(e) || this.factionInvitations.push(e);
}
function te(e, t = 1) {
return Object(O.b)(e, t);
}
function ae() {
(this.hacking_skill = Math.max(
1,
Math.floor(this.calculateSkill(this.hacking_exp, this.hacking_mult * s.a.HackingLevelMultiplier)),
)),
(this.strength = Math.max(
1,
Math.floor(this.calculateSkill(this.strength_exp, this.strength_mult * s.a.StrengthLevelMultiplier)),
)),
(this.defense = Math.max(
1,
Math.floor(this.calculateSkill(this.defense_exp, this.defense_mult * s.a.DefenseLevelMultiplier)),
)),
(this.dexterity = Math.max(
1,
Math.floor(this.calculateSkill(this.dexterity_exp, this.dexterity_mult * s.a.DexterityLevelMultiplier)),
)),
(this.agility = Math.max(
1,
Math.floor(this.calculateSkill(this.agility_exp, this.agility_mult * s.a.AgilityLevelMultiplier)),
)),
(this.charisma = Math.max(
1,
Math.floor(this.calculateSkill(this.charisma_exp, this.charisma_mult * s.a.CharismaLevelMultiplier)),
)),
this.intelligence > 0
? (this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp)))
: (this.intelligence = 0);
const e = this.hp / this.max_hp;
(this.max_hp = Math.floor(10 + this.defense / 10)), (this.hp = Math.round(this.max_hp * e));
}
function ne() {
(this.hacking_chance_mult = 1),
(this.hacking_speed_mult = 1),
(this.hacking_money_mult = 1),
(this.hacking_grow_mult = 1),
(this.hacking_mult = 1),
(this.strength_mult = 1),
(this.defense_mult = 1),
(this.dexterity_mult = 1),
(this.agility_mult = 1),
(this.charisma_mult = 1),
(this.hacking_exp_mult = 1),
(this.strength_exp_mult = 1),
(this.defense_exp_mult = 1),
(this.dexterity_exp_mult = 1),
(this.agility_exp_mult = 1),
(this.charisma_exp_mult = 1),
(this.company_rep_mult = 1),
(this.faction_rep_mult = 1),
(this.crime_money_mult = 1),
(this.crime_success_mult = 1),
(this.hacknet_node_money_mult = 1),
(this.hacknet_node_purchase_cost_mult = 1),
(this.hacknet_node_ram_cost_mult = 1),
(this.hacknet_node_core_cost_mult = 1),
(this.hacknet_node_level_cost_mult = 1),
(this.work_money_mult = 1),
(this.bladeburner_max_stamina_mult = 1),
(this.bladeburner_stamina_gain_mult = 1),
(this.bladeburner_analysis_mult = 1),
(this.bladeburner_success_chance_mult = 1);
}
function re(e) {
const t = this.getHomeComputer();
if (null == t) return !1;
for (let a = 0; a < t.programs.length; ++a) if (e.toLowerCase() == t.programs[a].toLowerCase()) return !0;
return !1;
}
function ie(e) {
isNaN(e) ? console.error("NaN passed into Player.setMoney()") : (this.money = new H.a(e));
}
function oe(e) {
isNaN(e) ? console.error("NaN passed into Player.gainMoney()") : (this.money = this.money.plus(e));
}
function se(e) {
isNaN(e)
? console.error("NaN passed into Player.loseMoney()")
: (this.money.eq(1 / 0) && e === 1 / 0) || (this.money = this.money.minus(e));
}
function le(e) {
return isNaN(e) ? (console.error("NaN passed into Player.canAfford()"), !1) : this.money.gte(e);
}
function ce(e, t) {
this.moneySourceA instanceof q.a ||
(console.warn("Player.moneySourceA was not properly initialized. Resetting"), (this.moneySourceA = new q.a())),
this.moneySourceB instanceof q.a ||
(console.warn("Player.moneySourceB was not properly initialized. Resetting"),
(this.moneySourceB = new q.a())),
this.moneySourceA.record(e, t),
this.moneySourceB.record(e, t);
}
function ue(e) {
isNaN(e)
? console.error("ERR: NaN passed into Player.gainHackingExp()")
: ((this.hacking_exp += e),
this.hacking_exp < 0 && (this.hacking_exp = 0),
(this.hacking_skill = Object(O.b)(this.hacking_exp, this.hacking_mult * s.a.HackingLevelMultiplier)));
}
function me(e) {
isNaN(e)
? console.error("ERR: NaN passed into Player.gainStrengthExp()")
: ((this.strength_exp += e),
this.strength_exp < 0 && (this.strength_exp = 0),
(this.strength = Object(O.b)(this.strength_exp, this.strength_mult * s.a.StrengthLevelMultiplier)));
}
function he(e) {
isNaN(e)
? console.error("ERR: NaN passed into player.gainDefenseExp()")
: ((this.defense_exp += e),
this.defense_exp < 0 && (this.defense_exp = 0),
(this.defense = Object(O.b)(this.defense_exp, this.defense_mult * s.a.DefenseLevelMultiplier)));
}
function de(e) {
isNaN(e)
? console.error("ERR: NaN passed into Player.gainDexterityExp()")
: ((this.dexterity_exp += e),
this.dexterity_exp < 0 && (this.dexterity_exp = 0),
(this.dexterity = Object(O.b)(this.dexterity_exp, this.dexterity_mult * s.a.DexterityLevelMultiplier)));
}
function pe(e) {
isNaN(e)
? console.error("ERR: NaN passed into Player.gainAgilityExp()")
: ((this.agility_exp += e),
this.agility_exp < 0 && (this.agility_exp = 0),
(this.agility = Object(O.b)(this.agility_exp, this.agility_mult * s.a.AgilityLevelMultiplier)));
}
function fe(e) {
isNaN(e)
? console.error("ERR: NaN passed into Player.gainCharismaExp()")
: ((this.charisma_exp += e),
this.charisma_exp < 0 && (this.charisma_exp = 0),
(this.charisma = Object(O.b)(this.charisma_exp, this.charisma_mult * s.a.CharismaLevelMultiplier)));
}
function ge(e) {
isNaN(e)
? console.error("ERROR: NaN passed into Player.gainIntelligenceExp()")
: ((D.a[5] > 0 || this.intelligence > 0) && (this.intelligence_exp += e),
(this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp))));
}
function ye(e) {
const t = e.toLowerCase();
return t.includes("hack")
? this.hacking_skill
: t.includes("str")
? this.strength
: t.includes("def")
? this.defense
: t.includes("dex")
? this.dexterity
: t.includes("agi")
? this.agility
: t.includes("cha")
? this.charisma
: t.includes("int")
? this.intelligence
: 0;
}
function be(e, t, a) {
(this.workType !== f.a.WorkTypeFaction && e === this.workType && t === this.companyName) ||
(e === this.workType && t === this.currentWorkFactionName && a === this.factionWorkType) ||
(this.isWorking && this.singularityStopWork(),
(this.workHackExpGainRate = 0),
(this.workStrExpGainRate = 0),
(this.workDefExpGainRate = 0),
(this.workDexExpGainRate = 0),
(this.workAgiExpGainRate = 0),
(this.workChaExpGainRate = 0),
(this.workRepGainRate = 0),
(this.workMoneyGainRate = 0),
(this.workMoneyLossRate = 0),
(this.workHackExpGained = 0),
(this.workStrExpGained = 0),
(this.workDefExpGained = 0),
(this.workDexExpGained = 0),
(this.workAgiExpGained = 0),
(this.workChaExpGained = 0),
(this.workRepGained = 0),
(this.workMoneyGained = 0),
(this.timeWorked = 0),
(this.timeWorkedCreateProgram = 0),
(this.currentWorkFactionName = ""),
(this.currentWorkFactionDescription = ""),
(this.createProgramName = ""),
(this.className = ""));
}
function Ee(e = 1) {
let t = 1;
this.hasAugmentation(o.a.NeuroreceptorManager) || (t = this.focus ? 1 : f.a.BaseFocusBonus);
const a = t * this.workHackExpGainRate * e,
n = t * this.workStrExpGainRate * e,
r = t * this.workDefExpGainRate * e,
i = t * this.workDexExpGainRate * e,
s = t * this.workAgiExpGainRate * e,
l = t * this.workChaExpGainRate * e,
c = (this.workMoneyGainRate - this.workMoneyLossRate) * e;
this.gainHackingExp(a),
this.gainStrengthExp(n),
this.gainDefenseExp(r),
this.gainDexterityExp(i),
this.gainAgilityExp(s),
this.gainCharismaExp(l),
this.gainMoney(c),
this.className ? this.recordMoneySource(c, "class") : this.recordMoneySource(c, "work"),
(this.workHackExpGained += a),
(this.workStrExpGained += n),
(this.workDefExpGained += r),
(this.workDexExpGained += i),
(this.workAgiExpGained += s),
(this.workChaExpGained += l),
(this.workRepGained += t * this.workRepGainRate * e),
(this.workMoneyGained += t * this.workMoneyGainRate * e),
(this.workMoneyGained -= t * this.workMoneyLossRate * e);
}
function ve(e, t) {
this.resetWorkStatus(f.a.WorkTypeCompany, t),
(this.isWorking = !0),
(this.focus = !0),
(this.companyName = t),
(this.workType = f.a.WorkTypeCompany),
(this.workHackExpGainRate = this.getWorkHackExpGain()),
(this.workStrExpGainRate = this.getWorkStrExpGain()),
(this.workDefExpGainRate = this.getWorkDefExpGain()),
(this.workDexExpGainRate = this.getWorkDexExpGain()),
(this.workAgiExpGainRate = this.getWorkAgiExpGain()),
(this.workChaExpGainRate = this.getWorkChaExpGain()),
(this.workRepGainRate = this.getWorkRepGain()),
(this.workMoneyGainRate = this.getWorkMoneyGain()),
(this.timeNeededToCompleteWork = f.a.MillisecondsPer8Hours),
e.toWork();
}
function ke() {
const e = Object(R.d)(this.companyName);
return e instanceof P.a && e && e.backdoorInstalled ? 0.75 : 0.5;
}
function _e(e) {
let t = !1;
this.timeWorked + f.a._idleSpeed * e >= f.a.MillisecondsPer8Hours &&
((t = !0), (e = Math.round((f.a.MillisecondsPer8Hours - this.timeWorked) / f.a._idleSpeed))),
(this.timeWorked += f.a._idleSpeed * e),
(this.workRepGainRate = this.getWorkRepGain()),
this.processWorkEarnings(e);
const a = u.a[this.companyName];
return (
Object(G.a)(a, this.workRepGainRate, e),
!!(t || this.timeWorked >= f.a.MillisecondsPer8Hours) && (this.finishWork(!1), !0)
);
}
function we(e, t = !1) {
e && (this.workRepGained *= this.cancelationPenalty());
(u.a[this.companyName].playerReputation += this.workRepGained), this.updateSkillLevels();
let a = J.a.createElement(
J.a.Fragment,
null,
"You earned a total of: ",
J.a.createElement("br", null),
J.a.createElement(Y.a, { money: this.workMoneyGained }),
J.a.createElement("br", null),
J.a.createElement(z.a, { reputation: this.workRepGained }),
" reputation for the company ",
J.a.createElement("br", null),
U.a.formatExp(this.workHackExpGained),
" hacking exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workStrExpGained),
" strength exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workDefExpGained),
" defense exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workDexExpGained),
" dexterity exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workAgiExpGained),
" agility exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workChaExpGained),
" charisma exp",
J.a.createElement("br", null),
);
if (
((a = e
? J.a.createElement(
J.a.Fragment,
null,
"You worked a short shift of ",
Object($.b)(this.timeWorked),
" ",
J.a.createElement("br", null),
J.a.createElement("br", null),
"Since you cancelled your work early, you only gained half of the reputation you earned. ",
J.a.createElement("br", null),
J.a.createElement("br", null),
a,
)
: J.a.createElement(
J.a.Fragment,
null,
"You worked a full shift of 8 hours! ",
J.a.createElement("br", null),
J.a.createElement("br", null),
a,
)),
t || Object(K.a)(a),
(this.isWorking = !1),
this.resetWorkStatus(),
t)
) {
return (
"You worked a short shift of " +
Object($.b)(this.timeWorked) +
" and earned $" +
U.a.formatMoney(this.workMoneyGained) +
", " +
U.a.formatReputation(this.workRepGained) +
" reputation, " +
U.a.formatExp(this.workHackExpGained) +
" hacking exp, " +
U.a.formatExp(this.workStrExpGained) +
" strength exp, " +
U.a.formatExp(this.workDefExpGained) +
" defense exp, " +
U.a.formatExp(this.workDexExpGained) +
" dexterity exp, " +
U.a.formatExp(this.workAgiExpGained) +
" agility exp, and " +
U.a.formatExp(this.workChaExpGained) +
" charisma exp."
);
}
return "";
}
function Ce(e, t) {
this.resetWorkStatus(f.a.WorkTypeCompanyPartTime, t),
(this.isWorking = !0),
(this.focus = !0),
(this.companyName = t),
(this.workType = f.a.WorkTypeCompanyPartTime),
(this.workHackExpGainRate = this.getWorkHackExpGain()),
(this.workStrExpGainRate = this.getWorkStrExpGain()),
(this.workDefExpGainRate = this.getWorkDefExpGain()),
(this.workDexExpGainRate = this.getWorkDexExpGain()),
(this.workAgiExpGainRate = this.getWorkAgiExpGain()),
(this.workChaExpGainRate = this.getWorkChaExpGain()),
(this.workRepGainRate = this.getWorkRepGain()),
(this.workMoneyGainRate = this.getWorkMoneyGain()),
(this.timeNeededToCompleteWork = f.a.MillisecondsPer8Hours),
e.toWork();
}
function Se(e) {
let t = !1;
return (
this.timeWorked + f.a._idleSpeed * e >= f.a.MillisecondsPer8Hours &&
((t = !0), (e = Math.round((f.a.MillisecondsPer8Hours - this.timeWorked) / f.a._idleSpeed))),
(this.timeWorked += f.a._idleSpeed * e),
(this.workRepGainRate = this.getWorkRepGain()),
this.processWorkEarnings(e),
!!(t || this.timeWorked >= f.a.MillisecondsPer8Hours) && (this.finishWorkPartTime(), !0)
);
}
function xe(e = !1) {
(u.a[this.companyName].playerReputation += this.workRepGained), this.updateSkillLevels();
const t = J.a.createElement(
J.a.Fragment,
null,
"You worked for ",
Object($.b)(this.timeWorked),
J.a.createElement("br", null),
J.a.createElement("br", null),
"You earned a total of: ",
J.a.createElement("br", null),
J.a.createElement(Y.a, { money: this.workMoneyGained }),
J.a.createElement("br", null),
J.a.createElement(z.a, { reputation: this.workRepGained }),
" reputation for the company ",
J.a.createElement("br", null),
U.a.formatExp(this.workHackExpGained),
" hacking exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workStrExpGained),
" strength exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workDefExpGained),
" defense exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workDexExpGained),
" dexterity exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workAgiExpGained),
" agility exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workChaExpGained),
" charisma exp",
J.a.createElement("br", null),
);
if ((e || Object(K.a)(t), (this.isWorking = !1), this.resetWorkStatus(), e)) {
return (
"You worked for " +
Object($.b)(this.timeWorked) +
" and earned a total of $" +
U.a.formatMoney(this.workMoneyGained) +
", " +
U.a.formatReputation(this.workRepGained) +
" reputation, " +
U.a.formatExp(this.workHackExpGained) +
" hacking exp, " +
U.a.formatExp(this.workStrExpGained) +
" strength exp, " +
U.a.formatExp(this.workDefExpGained) +
" defense exp, " +
U.a.formatExp(this.workDexExpGained) +
" dexterity exp, " +
U.a.formatExp(this.workAgiExpGained) +
" agility exp, and " +
U.a.formatExp(this.workChaExpGained) +
" charisma exp"
);
}
return "";
}
function Oe() {
this.focus = !0;
}
function Te() {
this.focus = !1;
}
function Me(e, t) {
let a = 1 + t.favor / 100;
isNaN(a) && (a = 1),
(this.workRepGainRate *= a),
(this.workRepGainRate *= s.a.FactionWorkRepGain),
(this.isWorking = !0),
(this.focus = !0),
(this.workType = f.a.WorkTypeFaction),
(this.currentWorkFactionName = t.name),
(this.timeNeededToCompleteWork = f.a.MillisecondsPer20Hours),
e.toWork();
}
function Re(e, t) {
this.resetWorkStatus(f.a.WorkTypeFaction, t.name, f.a.FactionWorkHacking),
(this.workHackExpGainRate = 0.15 * this.hacking_exp_mult * s.a.FactionWorkExpGain),
(this.workRepGainRate =
((this.hacking_skill + this.intelligence) / f.a.MaxSkillLevel) *
this.faction_rep_mult *
this.getIntelligenceBonus(0.5)),
(this.factionWorkType = f.a.FactionWorkHacking),
(this.currentWorkFactionDescription = "carrying out hacking contracts"),
this.startFactionWork(e, t);
}
function Pe(e, t) {
this.resetWorkStatus(f.a.WorkTypeFaction, t.name, f.a.FactionWorkField),
(this.workHackExpGainRate = 0.1 * this.hacking_exp_mult * s.a.FactionWorkExpGain),
(this.workStrExpGainRate = 0.1 * this.strength_exp_mult * s.a.FactionWorkExpGain),
(this.workDefExpGainRate = 0.1 * this.defense_exp_mult * s.a.FactionWorkExpGain),
(this.workDexExpGainRate = 0.1 * this.dexterity_exp_mult * s.a.FactionWorkExpGain),
(this.workAgiExpGainRate = 0.1 * this.agility_exp_mult * s.a.FactionWorkExpGain),
(this.workChaExpGainRate = 0.1 * this.charisma_exp_mult * s.a.FactionWorkExpGain),
(this.workRepGainRate = Object(M.a)(this, t)),
(this.factionWorkType = f.a.FactionWorkField),
(this.currentWorkFactionDescription = "carrying out field missions"),
this.startFactionWork(e, t);
}
function Ae(e, t) {
this.resetWorkStatus(f.a.WorkTypeFaction, t.name, f.a.FactionWorkSecurity),
(this.workHackExpGainRate = 0.05 * this.hacking_exp_mult * s.a.FactionWorkExpGain),
(this.workStrExpGainRate = 0.15 * this.strength_exp_mult * s.a.FactionWorkExpGain),
(this.workDefExpGainRate = 0.15 * this.defense_exp_mult * s.a.FactionWorkExpGain),
(this.workDexExpGainRate = 0.15 * this.dexterity_exp_mult * s.a.FactionWorkExpGain),
(this.workAgiExpGainRate = 0.15 * this.agility_exp_mult * s.a.FactionWorkExpGain),
(this.workChaExpGainRate = 0 * this.charisma_exp_mult * s.a.FactionWorkExpGain),
(this.workRepGainRate = Object(M.b)(this, t)),
(this.factionWorkType = f.a.FactionWorkSecurity),
(this.currentWorkFactionDescription = "performing security detail"),
this.startFactionWork(e, t);
}
function Ne(e) {
const t = v.a[this.currentWorkFactionName];
switch (this.factionWorkType) {
case f.a.FactionWorkHacking:
this.workRepGainRate = Object(M.c)(this, t);
break;
case f.a.FactionWorkField:
this.workRepGainRate = Object(M.a)(this, t);
break;
case f.a.FactionWorkSecurity:
this.workRepGainRate = Object(M.b)(this, t);
}
let a = !1;
return (
this.timeWorked + f.a._idleSpeed * e >= f.a.MillisecondsPer20Hours &&
((a = !0), (e = Math.round((f.a.MillisecondsPer20Hours - this.timeWorked) / f.a._idleSpeed))),
(this.timeWorked += f.a._idleSpeed * e),
this.processWorkEarnings(e),
!!(a || this.timeWorked >= f.a.MillisecondsPer20Hours) && (this.finishFactionWork(!1), !0)
);
}
function Ie(e, t = !1) {
const a = v.a[this.currentWorkFactionName];
if (
((a.playerReputation += this.workRepGained),
this.updateSkillLevels(),
t ||
Object(K.a)(
J.a.createElement(
J.a.Fragment,
null,
"You worked for your faction ",
a.name,
" for a total of ",
Object($.b)(this.timeWorked),
" ",
J.a.createElement("br", null),
J.a.createElement("br", null),
"You earned a total of: ",
J.a.createElement("br", null),
J.a.createElement(Y.a, { money: this.workMoneyGained }),
J.a.createElement("br", null),
J.a.createElement(z.a, { reputation: this.workRepGained }),
" reputation for the faction ",
J.a.createElement("br", null),
U.a.formatExp(this.workHackExpGained),
" hacking exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workStrExpGained),
" strength exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workDefExpGained),
" defense exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workDexExpGained),
" dexterity exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workAgiExpGained),
" agility exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workChaExpGained),
" charisma exp",
J.a.createElement("br", null),
),
),
(this.isWorking = !1),
this.resetWorkStatus(),
t)
) {
return (
"You worked for your faction " +
a.name +
" for a total of " +
Object($.b)(this.timeWorked) +
". You earned " +
U.a.formatReputation(this.workRepGained) +
" rep, " +
U.a.formatExp(this.workHackExpGained) +
" hacking exp, " +
U.a.formatExp(this.workStrExpGained) +
" str exp, " +
U.a.formatExp(this.workDefExpGained) +
" def exp, " +
U.a.formatExp(this.workDexExpGained) +
" dex exp, " +
U.a.formatExp(this.workAgiExpGained) +
" agi exp, and " +
U.a.formatExp(this.workChaExpGained) +
" cha exp."
);
}
return "";
}
function Fe() {
let e = 1;
const t = u.a[this.companyName];
D.a[11] > 0 && (e = 1 + t.favor / 100);
const a = this.jobs[this.companyName],
n = d.a[a];
return null == n
? (console.error(`Could not find CompanyPosition object for ${a}. Work salary will be 0`), 0)
: n.baseSalary * t.salaryMultiplier * this.work_money_mult * s.a.CompanyWorkMoney * e;
}
function je() {
const e = u.a[this.companyName],
t = this.jobs[this.companyName],
a = d.a[t];
return null == e || null == a
? (console.error(
[
"Could not find Company object for " + this.companyName,
`or CompanyPosition object for ${t}.`,
"Work hack exp gain will be 0",
].join(" "),
),
0)
: a.hackingExpGain * e.expMultiplier * this.hacking_exp_mult * s.a.CompanyWorkExpGain;
}
function Be() {
const e = u.a[this.companyName],
t = this.jobs[this.companyName],
a = d.a[t];
return null == e || null == a
? (console.error(
[
"Could not find Company object for " + this.companyName,
`or CompanyPosition object for ${t}.`,
"Work str exp gain will be 0",
].join(" "),
),
0)
: a.strengthExpGain * e.expMultiplier * this.strength_exp_mult * s.a.CompanyWorkExpGain;
}
function De() {
const e = u.a[this.companyName],
t = this.jobs[this.companyName],
a = d.a[t];
return null == e || null == a
? (console.error(
[
"Could not find Company object for " + this.companyName,
`or CompanyPosition object for ${t}.`,
"Work def exp gain will be 0",
].join(" "),
),
0)
: a.defenseExpGain * e.expMultiplier * this.defense_exp_mult * s.a.CompanyWorkExpGain;
}
function Ge() {
const e = u.a[this.companyName],
t = this.jobs[this.companyName],
a = d.a[t];
return null == e || null == a
? (console.error(
[
"Could not find Company object for " + this.companyName,
`or CompanyPosition object for ${t}.`,
"Work dex exp gain will be 0",
].join(" "),
),
0)
: a.dexterityExpGain * e.expMultiplier * this.dexterity_exp_mult * s.a.CompanyWorkExpGain;
}
function Le() {
const e = u.a[this.companyName],
t = this.jobs[this.companyName],
a = d.a[t];
return null == e || null == a
? (console.error(
[
"Could not find Company object for " + this.companyName,
`or CompanyPosition object for ${t}.`,
"Work agi exp gain will be 0",
].join(" "),
),
0)
: a.agilityExpGain * e.expMultiplier * this.agility_exp_mult * s.a.CompanyWorkExpGain;
}
function We() {
const e = u.a[this.companyName],
t = this.jobs[this.companyName],
a = d.a[t];
return null == e || null == a
? (console.error(
[
"Could not find Company object for " + this.companyName,
`or CompanyPosition object for ${t}.`,
"Work cha exp gain will be 0",
].join(" "),
),
0)
: a.charismaExpGain * e.expMultiplier * this.charisma_exp_mult * s.a.CompanyWorkExpGain;
}
function He() {
const e = u.a[this.companyName],
t = this.jobs[this.companyName],
a = d.a[t];
if (null == e || null == a)
return (
console.error(
[
"Could not find Company object for " + this.companyName,
`or CompanyPosition object for ${t}.`,
"Work rep gain will be 0",
].join(" "),
),
0
);
let n = a.calculateJobPerformance(
this.hacking_skill,
this.strength,
this.defense,
this.dexterity,
this.agility,
this.charisma,
);
n += this.intelligence / f.a.MaxSkillLevel;
let r = 1 + e.favor / 100;
return isNaN(r) && (r = 1), n * this.company_rep_mult * r;
}
function Ue(e, t, a, n) {
this.resetWorkStatus(),
(this.isWorking = !0),
(this.focus = !0),
(this.workType = f.a.WorkTypeCreateProgram),
(this.createProgramReqLvl = n),
(this.timeNeededToCompleteWork = a);
for (let e = 0; e < this.getHomeComputer().programs.length; ++e) {
const a = this.getHomeComputer().programs[e];
if (a.startsWith(t) && a.endsWith("%-INC")) {
const t = a.split("-");
if (3 != t.length) break;
const n = Number(t[1].slice(0, -1));
if (isNaN(n) || n < 0 || n >= 100) break;
(this.timeWorkedCreateProgram = (n / 100) * this.timeNeededToCompleteWork),
this.getHomeComputer().programs.splice(e, 1);
}
}
(this.createProgramName = t), e.toWork();
}
function qe(e) {
const t = this.createProgramReqLvl;
let a = (this.hacking_skill / t) * this.getIntelligenceBonus(3);
return (
(a = 1 + (a - 1) / 5),
(this.timeWorked += f.a._idleSpeed * e),
(this.timeWorkedCreateProgram += f.a._idleSpeed * e * a),
this.timeWorkedCreateProgram >= this.timeNeededToCompleteWork && (this.finishCreateProgramWork(!1), !0)
);
}
function Ke(e) {
const t = this.createProgramName;
if (!1 === e)
Object(K.a)("You've finished creating " + t + "!
The new program can be found on your home computer."),
this.getHomeComputer().programs.push(t);
else {
const e =
t +
"-" +
(Math.floor((this.timeWorkedCreateProgram / this.timeNeededToCompleteWork) * 1e4) / 100).toString() +
"%-INC";
this.getHomeComputer().programs.push(e);
}
return (
e || this.gainIntelligenceExp(this.createProgramReqLvl / f.a.IntelligenceProgramBaseExpGain),
(this.isWorking = !1),
this.resetWorkStatus(),
"You've finished creating " + t + "! The new program can be found on your home computer."
);
}
function $e(e, t, a, n) {
this.resetWorkStatus(),
(this.isWorking = !0),
(this.focus = !0),
(this.workType = f.a.WorkTypeStudyClass),
(this.className = n);
const r = 1e3 / f.a._idleSpeed;
let i = 0,
o = 0,
l = 0,
c = 0,
u = 0,
m = 0,
h = 0;
const d = this.hashManager;
switch (n) {
case f.a.ClassStudyComputerScience:
o = ((f.a.ClassStudyComputerScienceBaseExp * a) / r) * d.getStudyMult();
break;
case f.a.ClassDataStructures:
(i = (f.a.ClassDataStructuresBaseCost * t) / r),
(o = ((f.a.ClassDataStructuresBaseExp * a) / r) * d.getStudyMult());
break;
case f.a.ClassNetworks:
(i = (f.a.ClassNetworksBaseCost * t) / r), (o = ((f.a.ClassNetworksBaseExp * a) / r) * d.getStudyMult());
break;
case f.a.ClassAlgorithms:
(i = (f.a.ClassAlgorithmsBaseCost * t) / r), (o = ((f.a.ClassAlgorithmsBaseExp * a) / r) * d.getStudyMult());
break;
case f.a.ClassManagement:
(i = (f.a.ClassManagementBaseCost * t) / r), (h = ((f.a.ClassManagementBaseExp * a) / r) * d.getStudyMult());
break;
case f.a.ClassLeadership:
(i = (f.a.ClassLeadershipBaseCost * t) / r), (h = ((f.a.ClassLeadershipBaseExp * a) / r) * d.getStudyMult());
break;
case f.a.ClassGymStrength:
(i = (f.a.ClassGymBaseCost * t) / r), (l = (a / r) * d.getTrainingMult());
break;
case f.a.ClassGymDefense:
(i = (f.a.ClassGymBaseCost * t) / r), (c = (a / r) * d.getTrainingMult());
break;
case f.a.ClassGymDexterity:
(i = (f.a.ClassGymBaseCost * t) / r), (u = (a / r) * d.getTrainingMult());
break;
case f.a.ClassGymAgility:
(i = (f.a.ClassGymBaseCost * t) / r), (m = (a / r) * d.getTrainingMult());
break;
default:
throw new Error("ERR: Invalid/unrecognized class name");
}
(this.workMoneyLossRate = i),
(this.workHackExpGainRate = o * this.hacking_exp_mult * s.a.ClassGymExpGain),
(this.workStrExpGainRate = l * this.strength_exp_mult * s.a.ClassGymExpGain),
(this.workDefExpGainRate = c * this.defense_exp_mult * s.a.ClassGymExpGain),
(this.workDexExpGainRate = u * this.dexterity_exp_mult * s.a.ClassGymExpGain),
(this.workAgiExpGainRate = m * this.agility_exp_mult * s.a.ClassGymExpGain),
(this.workChaExpGainRate = h * this.charisma_exp_mult * s.a.ClassGymExpGain),
e.toWork();
}
function ze(e) {
return (this.timeWorked += f.a._idleSpeed * e), this.processWorkEarnings(e), !1;
}
function Ye(e = !1) {
if (
(this.gainIntelligenceExp(f.a.IntelligenceClassBaseExpGain * Math.round(this.timeWorked / 1e3)),
this.workMoneyGained > 0)
)
throw new Error("ERR: Somehow gained money while taking class");
if (
(this.updateSkillLevels(),
e ||
Object(K.a)(
J.a.createElement(
J.a.Fragment,
null,
"After ",
this.className,
" for ",
Object($.b)(this.timeWorked),
", ",
J.a.createElement("br", null),
"you spent a total of ",
J.a.createElement(Y.a, { money: -this.workMoneyGained }),
". ",
J.a.createElement("br", null),
J.a.createElement("br", null),
"You earned a total of: ",
J.a.createElement("br", null),
U.a.formatExp(this.workHackExpGained),
" hacking exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workStrExpGained),
" strength exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workDefExpGained),
" defense exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workDexExpGained),
" dexterity exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workAgiExpGained),
" agility exp ",
J.a.createElement("br", null),
U.a.formatExp(this.workChaExpGained),
" charisma exp",
J.a.createElement("br", null),
),
),
(this.isWorking = !1),
e)
) {
const e =
"After " +
this.className +
" for " +
Object($.b)(this.timeWorked) +
", you spent a total of " +
U.a.formatMoney(-1 * this.workMoneyGained) +
". You earned a total of: " +
U.a.formatExp(this.workHackExpGained) +
" hacking exp, " +
U.a.formatExp(this.workStrExpGained) +
" strength exp, " +
U.a.formatExp(this.workDefExpGained) +
" defense exp, " +
U.a.formatExp(this.workDexExpGained) +
" dexterity exp, " +
U.a.formatExp(this.workAgiExpGained) +
" agility exp, and " +
U.a.formatExp(this.workChaExpGained) +
" charisma exp";
return this.resetWorkStatus(), e;
}
return this.resetWorkStatus(), "";
}
function Ve(e, t, a, n, r, i, o, l, c, u, m = null) {
(this.crimeType = t),
this.resetWorkStatus(),
(this.isWorking = !0),
(this.focus = !0),
(this.workType = f.a.WorkTypeCrime),
null !== m && ((this.committingCrimeThruSingFn = !0), (this.singFnCrimeWorkerScript = m)),
(this.workHackExpGained = a * this.hacking_exp_mult * s.a.CrimeExpGain),
(this.workStrExpGained = n * this.strength_exp_mult * s.a.CrimeExpGain),
(this.workDefExpGained = r * this.defense_exp_mult * s.a.CrimeExpGain),
(this.workDexExpGained = i * this.dexterity_exp_mult * s.a.CrimeExpGain),
(this.workAgiExpGained = o * this.agility_exp_mult * s.a.CrimeExpGain),
(this.workChaExpGained = l * this.charisma_exp_mult * s.a.CrimeExpGain),
(this.workMoneyGained = c * this.crime_money_mult * s.a.CrimeMoney),
(this.timeNeededToCompleteWork = u),
e.toWork();
}
function Je(e) {
return (
(this.timeWorked += f.a._idleSpeed * e),
this.timeWorked >= this.timeNeededToCompleteWork && (this.finishCrime(!1), !0)
);
}
function Xe(e) {
if (!e) {
if (Object(y.a)(this, this.crimeType)) {
let e = null;
for (const t in b.a)
if (b.a[t].type == this.crimeType) {
e = b.a[t];
break;
}
if (null == e)
return (
Object(K.a)(
`ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`,
),
""
);
this.gainMoney(this.workMoneyGained),
this.recordMoneySource(this.workMoneyGained, "crime"),
(this.karma -= e.karma),
(this.numPeopleKilled += e.kills),
e.intelligence_exp > 0 && this.gainIntelligenceExp(e.intelligence_exp),
(this.workHackExpGained *= 2),
(this.workStrExpGained *= 2),
(this.workDefExpGained *= 2),
(this.workDexExpGained *= 2),
(this.workAgiExpGained *= 2),
(this.workChaExpGained *= 2);
const t = this.singFnCrimeWorkerScript;
this.committingCrimeThruSingFn && null !== t
? null == t.disableLogs.ALL &&
null == t.disableLogs.commitCrime &&
t.scriptRef.log(
"Crime successful! Gained " +
U.a.formatMoney(this.workMoneyGained) +
", " +
U.a.formatExp(this.workHackExpGained) +
" hack exp, " +
U.a.formatExp(this.workStrExpGained) +
" str exp, " +
U.a.formatExp(this.workDefExpGained) +
" def exp, " +
U.a.formatExp(this.workDexExpGained) +
" dex exp, " +
U.a.formatExp(this.workAgiExpGained) +
" agi exp, " +
U.a.formatExp(this.workChaExpGained) +
" cha exp.",
)
: Object(K.a)(
J.a.createElement(
J.a.Fragment,
null,
"Crime successful!",
J.a.createElement("br", null),
J.a.createElement("br", null),
"You gained:",
J.a.createElement("br", null),
J.a.createElement(Y.a, { money: this.workMoneyGained }),
J.a.createElement("br", null),
U.a.formatExp(this.workHackExpGained),
" hacking experience ",
J.a.createElement("br", null),
U.a.formatExp(this.workStrExpGained),
" strength experience",
J.a.createElement("br", null),
U.a.formatExp(this.workDefExpGained),
" defense experience",
J.a.createElement("br", null),
U.a.formatExp(this.workDexExpGained),
" dexterity experience",
J.a.createElement("br", null),
U.a.formatExp(this.workAgiExpGained),
" agility experience",
J.a.createElement("br", null),
U.a.formatExp(this.workChaExpGained),
" charisma experience",
),
);
} else {
(this.workHackExpGained /= 2),
(this.workStrExpGained /= 2),
(this.workDefExpGained /= 2),
(this.workDexExpGained /= 2),
(this.workAgiExpGained /= 2),
(this.workChaExpGained /= 2);
const e = this.singFnCrimeWorkerScript;
this.committingCrimeThruSingFn && null !== e
? null == e.disableLogs.ALL &&
null == e.disableLogs.commitCrime &&
e.scriptRef.log(
"Crime failed! Gained " +
U.a.formatExp(this.workHackExpGained) +
" hack exp, " +
U.a.formatExp(this.workStrExpGained) +
" str exp, " +
U.a.formatExp(this.workDefExpGained) +
" def exp, " +
U.a.formatExp(this.workDexExpGained) +
" dex exp, " +
U.a.formatExp(this.workAgiExpGained) +
" agi exp, " +
U.a.formatExp(this.workChaExpGained) +
" cha exp.",
)
: Object(K.a)(
J.a.createElement(
J.a.Fragment,
null,
"Crime failed!",
J.a.createElement("br", null),
J.a.createElement("br", null),
"You gained:",
J.a.createElement("br", null),
U.a.formatExp(this.workHackExpGained),
" hacking experience ",
J.a.createElement("br", null),
U.a.formatExp(this.workStrExpGained),
" strength experience",
J.a.createElement("br", null),
U.a.formatExp(this.workDefExpGained),
" defense experience",
J.a.createElement("br", null),
U.a.formatExp(this.workDexExpGained),
" dexterity experience",
J.a.createElement("br", null),
U.a.formatExp(this.workAgiExpGained),
" agility experience",
J.a.createElement("br", null),
U.a.formatExp(this.workChaExpGained),
" charisma experience",
),
);
}
this.gainHackingExp(this.workHackExpGained),
this.gainStrengthExp(this.workStrExpGained),
this.gainDefenseExp(this.workDefExpGained),
this.gainDexterityExp(this.workDexExpGained),
this.gainAgilityExp(this.workAgiExpGained),
this.gainCharismaExp(this.workChaExpGained);
}
return (
(this.committingCrimeThruSingFn = !1),
(this.singFnCrimeWorkerScript = null),
(this.isWorking = !1),
(this.crimeType = ""),
this.resetWorkStatus(),
""
);
}
function Qe() {
if (!this.isWorking) return "";
let e = "";
switch (this.workType) {
case f.a.WorkTypeStudyClass:
e = this.finishClass(!0);
break;
case f.a.WorkTypeCompany:
e = this.finishWork(!0, !0);
break;
case f.a.WorkTypeCompanyPartTime:
e = this.finishWorkPartTime(!0);
break;
case f.a.WorkTypeFaction:
e = this.finishFactionWork(!0, !0);
break;
case f.a.WorkTypeCreateProgram:
e = this.finishCreateProgramWork(!0);
break;
case f.a.WorkTypeCrime:
e = this.finishCrime(!0);
break;
default:
return console.error(`Unrecognized work type (${this.workType})`), "";
}
return e;
}
function Ze(e) {
return "number" != typeof e
? (console.warn("Player.takeDamage() called without a numeric argument: " + e), !1)
: ((this.hp -= e), this.hp <= 0 && (this.hospitalize(), !0));
}
function et(e) {
"number" == typeof e
? ((this.hp += e), this.hp > this.max_hp && (this.hp = this.max_hp))
: console.warn("Player.regenerateHp() called without a numeric argument: " + e);
}
function tt() {
const e = Object(L.b)(this);
return (
!1 === N.a.SuppressHospitalizationPopup &&
Object(K.a)(
J.a.createElement(
J.a.Fragment,
null,
"You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged ",
J.a.createElement(Y.a, { money: e }),
),
),
this.loseMoney(e),
this.recordMoneySource(-1 * e, "hospitalization"),
(this.hp = this.max_hp),
e
);
}
function at(e, t = !1) {
let a = null;
"" !== this.companyName && (a = u.a[this.companyName]);
const n = this.jobs[this.companyName],
r = u.a[this.location];
if (!(r instanceof c.a))
return (
console.error(
`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`,
),
!1
);
let i = e;
if (!this.isQualified(r, i)) {
const e = Object(h.a)(r, i);
return t || Object(K.a)("Unforunately, you do not qualify for this position
" + e), !1;
}
for (;;) {
const e = Object(m.a)(i);
if (null == e) break;
if (!r.hasPosition(e)) break;
if (!this.isQualified(r, e)) break;
i = e;
}
if (null != a && a.name == r.name && i.name == n) {
const e = Object(m.a)(i);
if (null == e)
return t || Object(K.a)("You are already at the highest position for your field! No promotion available"), !1;
if (r.hasPosition(e)) {
if (!t) {
const t = Object(h.a)(r, e);
Object(K.a)("Unfortunately, you do not qualify for a promotion
" + t);
}
return !1;
}
return t || Object(K.a)("You are already at the highest position for your field! No promotion available"), !1;
}
return (
(this.jobs[r.name] = i.name),
(this.companyName = this.location),
t ||
Object(K.a)("Congratulations! You were offered a new job at " + this.companyName + " as a " + i.name + "!"),
!0
);
}
function nt(e, t) {
let a = null;
if (("" !== this.companyName && (a = u.a[this.companyName]), null == a || a.name != e.name)) return t;
const n = this.jobs[this.companyName],
r = d.a[n];
return (r.isSoftwareJob() && t.isSoftwareJob()) ||
(r.isITJob() && t.isITJob()) ||
(r.isBusinessJob() && t.isBusinessJob()) ||
(r.isSecurityEngineerJob() && t.isSecurityEngineerJob()) ||
(r.isNetworkEngineerJob() && t.isNetworkEngineerJob()) ||
(r.isSecurityJob() && t.isSecurityJob()) ||
(r.isAgentJob() && t.isAgentJob()) ||
(r.isSoftwareConsultantJob() && t.isSoftwareConsultantJob()) ||
(r.isBusinessConsultantJob() && t.isBusinessConsultantJob()) ||
(r.isPartTimeJob() && t.isPartTimeJob())
? Object(m.a)(r)
: t;
}
function rt(e) {
(this.isWorking = !1), (this.companyName = ""), delete this.jobs[e];
}
function it(e = !1) {
return this.applyForJob(d.a[p.j[0]], e);
}
function ot(e = !1) {
return this.applyForJob(d.a[p.k[0]], e);
}
function st(e = !1) {
return this.applyForJob(d.a[p.d[0]], e);
}
function lt(e = !1) {
const t = u.a[this.location];
return this.isQualified(t, d.a[p.i[0]])
? this.applyForJob(d.a[p.i[0]], e)
: (e || Object(K.a)("Unforunately, you do not qualify for this position"), !1);
}
function ct(e = !1) {
const t = u.a[this.location];
if (this.isQualified(t, d.a[p.f[0]])) {
const t = d.a[p.f[0]];
return this.applyForJob(t, e);
}
return e || Object(K.a)("Unforunately, you do not qualify for this position"), !1;
}
function ut(e = !1) {
return this.applyForJob(d.a[p.b[0]], e);
}
function mt(e = !1) {
return this.applyForJob(d.a[p.c[0]], e);
}
function ht(e = !1) {
return this.applyForJob(d.a[p.h[2]], e);
}
function dt(e = !1) {
const t = u.a[this.location];
if (this.isQualified(t, d.a[p.a[0]])) {
const t = d.a[p.a[0]];
return this.applyForJob(t, e);
}
return e || Object(K.a)("Unforunately, you do not qualify for this position"), !1;
}
function pt(e = !1) {
const t = u.a[this.location];
return this.isQualified(t, d.a[p.e[1]])
? ((this.companyName = t.name),
(this.jobs[t.name] = p.e[1]),
e || Object(K.a)("Congratulations, you are now employed at " + this.companyName),
!0)
: (e || Object(K.a)("Unforunately, you do not qualify for this position"), !1);
}
function ft(e = !1) {
const t = u.a[this.location];
return this.isQualified(t, d.a[p.g[1]])
? ((this.jobs[t.name] = p.g[1]),
e || Object(K.a)("Congratulations, you are now employed part-time at " + this.companyName),
!0)
: (e || Object(K.a)("Unforunately, you do not qualify for this position"), !1);
}
function gt(e = !1) {
const t = u.a[this.location];
return this.isQualified(t, d.a[p.e[0]])
? ((this.companyName = t.name),
(this.jobs[t.name] = p.e[0]),
e || Object(K.a)("Congratulations, you are now employed as a waiter at " + this.companyName),
!0)
: (e || Object(K.a)("Unforunately, you do not qualify for this position"), !1);
}
function yt(e = !1) {
const t = u.a[this.location];
return this.isQualified(t, d.a[p.g[0]])
? ((this.companyName = t.name),
(this.jobs[t.name] = p.g[0]),
e || Object(K.a)("Congratulations, you are now employed as a part-time waiter at " + this.companyName),
!0)
: (e || Object(K.a)("Unforunately, you do not qualify for this position"), !1);
}
function bt(e, t) {
const a = e.jobStatReqOffset,
n = t.requiredHacking > 0 ? t.requiredHacking + a : 0,
r = t.requiredStrength > 0 ? t.requiredStrength + a : 0,
i = t.requiredDefense > 0 ? t.requiredDefense + a : 0,
o = t.requiredDexterity > 0 ? t.requiredDexterity + a : 0,
s = t.requiredDexterity > 0 ? t.requiredDexterity + a : 0,
l = t.requiredCharisma > 0 ? t.requiredCharisma + a : 0;
return (
this.hacking_skill >= n &&
this.strength >= r &&
this.defense >= i &&
this.dexterity >= o &&
this.agility >= s &&
this.charisma >= l &&
e.playerReputation >= t.requiredReputation
);
}
function Et(e = !0) {
e && this.resetMultipliers();
for (let e = 0; e < this.augmentations.length; ++e) {
"HacknetNode NIC Architecture Neural-Upload" === this.augmentations[e].name &&
(this.augmentations[e].name = "Hacknet Node NIC Architecture Neural-Upload");
const t = this.augmentations[e].name,
a = n.a[t];
if (null != a)
if (((a.owned = !0), a.name != o.a.NeuroFluxGovernor)) Object(r.a)(this.augmentations[e], !0);
else for (let t = 0; t < a.level; ++t) Object(r.a)(this.augmentations[e], !0);
else console.warn(`Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${t} will be skipped`);
}
this.updateSkillLevels();
}
function vt() {
for (let e = 0; e < this.sourceFiles.length; ++e) {
const t = "SourceFile" + this.sourceFiles[e].n;
null != B.a[t]
? Object(F.a)(this.sourceFiles[e])
: console.error("Invalid source file number: " + this.sourceFiles[e].n);
}
Object(j.a)();
}
function kt() {
const e = [],
t = this.augmentations.length,
a = Object.keys(this.jobs),
n = Object.values(this.jobs);
function r(e, t = f.a.CorpFactionRepRequirement) {
return (
a.includes(e) &&
(function (e) {
const t = u.a[e];
return null == t ? 0 : t.playerReputation;
})(e) > t
);
}
const i = v.a.Illuminati;
!i.isBanned &&
!i.isMember &&
!i.alreadyInvited &&
t >= 30 &&
this.money.gte(15e10) &&
this.hacking_skill >= 1500 &&
this.strength >= 1200 &&
this.defense >= 1200 &&
this.dexterity >= 1200 &&
this.agility >= 1200 &&
e.push(i);
const o = v.a.Daedalus;
!o.isBanned &&
!o.isMember &&
!o.alreadyInvited &&
t >= Math.round(30 * s.a.DaedalusAugsRequirement) &&
this.money.gte(1e11) &&
(this.hacking_skill >= 2500 ||
(this.strength >= 1500 && this.defense >= 1500 && this.dexterity >= 1500 && this.agility >= 1500)) &&
e.push(o);
const l = v.a["The Covenant"];
!l.isBanned &&
!l.isMember &&
!l.alreadyInvited &&
t >= 20 &&
this.money.gte(75e9) &&
this.hacking_skill >= 850 &&
this.strength >= 850 &&
this.defense >= 850 &&
this.dexterity >= 850 &&
this.agility >= 850 &&
e.push(l);
const c = v.a.ECorp;
c.isBanned || c.isMember || c.alreadyInvited || !r(S.a.AevumECorp) || e.push(c);
const m = v.a.MegaCorp;
m.isBanned || m.isMember || m.alreadyInvited || !r(S.a.Sector12MegaCorp) || e.push(m);
const h = v.a["Bachman & Associates"];
h.isBanned || h.isMember || h.alreadyInvited || !r(S.a.AevumBachmanAndAssociates) || e.push(h);
const d = v.a["Blade Industries"];
d.isBanned || d.isMember || d.alreadyInvited || !r(S.a.Sector12BladeIndustries) || e.push(d);
const p = v.a.NWO;
p.isBanned || p.isMember || p.alreadyInvited || !r(S.a.VolhavenNWO) || e.push(p);
const g = v.a["Clarke Incorporated"];
g.isBanned || g.isMember || g.alreadyInvited || !r(S.a.AevumClarkeIncorporated) || e.push(g);
const y = v.a["OmniTek Incorporated"];
y.isBanned || y.isMember || y.alreadyInvited || !r(S.a.VolhavenOmniTekIncorporated) || e.push(y);
const b = v.a["Four Sigma"];
b.isBanned || b.isMember || b.alreadyInvited || !r(S.a.Sector12FourSigma) || e.push(b);
const E = v.a["KuaiGong International"];
E.isBanned || E.isMember || E.alreadyInvited || !r(S.a.ChongqingKuaiGongInternational) || e.push(E);
const k = v.a["Fulcrum Secret Technologies"],
_ = Object(R.d)(I.a.FulcrumSecretTechnologies);
if (!(_ instanceof P.a)) throw new Error("Fulcrum Secret Technologies should be normal server");
null == _
? console.error("Could not find Fulcrum Secret Technologies Server")
: k.isBanned ||
k.isMember ||
k.alreadyInvited ||
!_.backdoorInstalled ||
!r(S.a.AevumFulcrumTechnologies, 25e4) ||
e.push(k);
const w = v.a.BitRunners,
x = Object(R.d)(I.a.BitRunnersServer);
if (!(x instanceof P.a)) throw new Error("BitRunners should be normal server");
null == x
? console.error("Could not find BitRunners Server")
: w.isBanned || w.isMember || !x.backdoorInstalled || w.alreadyInvited || e.push(w);
const O = v.a["The Black Hand"],
T = Object(R.d)(I.a.TheBlackHandServer);
if (!(T instanceof P.a)) throw new Error("TheBlackHand should be normal server");
null == T
? console.error("Could not find The Black Hand Server")
: O.isBanned || O.isMember || !T.backdoorInstalled || O.alreadyInvited || e.push(O);
const M = v.a.NiteSec,
A = Object(R.d)(I.a.NiteSecServer);
if (!(A instanceof P.a)) throw new Error("NiteSec should be normal server");
null == A
? console.error("Could not find NiteSec Server")
: M.isBanned || M.isMember || !A.backdoorInstalled || M.alreadyInvited || e.push(M);
const N = v.a.Chongqing;
N.isBanned || N.isMember || N.alreadyInvited || !this.money.gte(2e7) || this.city != C.a.Chongqing || e.push(N);
const F = v.a["Sector-12"];
F.isBanned || F.isMember || F.alreadyInvited || !this.money.gte(15e6) || this.city != C.a.Sector12 || e.push(F);
const j = v.a["New Tokyo"];
j.isBanned || j.isMember || j.alreadyInvited || !this.money.gte(2e7) || this.city != C.a.NewTokyo || e.push(j);
const B = v.a.Aevum;
B.isBanned || B.isMember || B.alreadyInvited || !this.money.gte(4e7) || this.city != C.a.Aevum || e.push(B);
const D = v.a.Ishima;
D.isBanned || D.isMember || D.alreadyInvited || !this.money.gte(3e7) || this.city != C.a.Ishima || e.push(D);
const G = v.a.Volhaven;
G.isBanned || G.isMember || G.alreadyInvited || !this.money.gte(5e7) || this.city != C.a.Volhaven || e.push(G);
const L = v.a["Speakers for the Dead"];
!L.isBanned &&
!L.isMember &&
!L.alreadyInvited &&
this.hacking_skill >= 100 &&
this.strength >= 300 &&
this.defense >= 300 &&
this.dexterity >= 300 &&
this.agility >= 300 &&
this.numPeopleKilled >= 30 &&
this.karma <= -45 &&
!a.includes(S.a.Sector12CIA) &&
!a.includes(S.a.Sector12NSA) &&
e.push(L);
const H = v.a["The Dark Army"];
!H.isBanned &&
!H.isMember &&
!H.alreadyInvited &&
this.hacking_skill >= 300 &&
this.strength >= 300 &&
this.defense >= 300 &&
this.dexterity >= 300 &&
this.agility >= 300 &&
this.city == C.a.Chongqing &&
this.numPeopleKilled >= 5 &&
this.karma <= -45 &&
!a.includes(S.a.Sector12CIA) &&
!a.includes(S.a.Sector12NSA) &&
e.push(H);
const U = v.a["The Syndicate"];
!U.isBanned &&
!U.isMember &&
!U.alreadyInvited &&
this.hacking_skill >= 200 &&
this.strength >= 200 &&
this.defense >= 200 &&
this.dexterity >= 200 &&
this.agility >= 200 &&
(this.city == C.a.Aevum || this.city == C.a.Sector12) &&
this.money.gte(1e7) &&
this.karma <= -90 &&
!a.includes(S.a.Sector12CIA) &&
!a.includes(S.a.Sector12NSA) &&
e.push(U);
const q = v.a.Silhouette;
!q.isBanned &&
!q.isMember &&
!q.alreadyInvited &&
(n.includes("Chief Technology Officer") ||
n.includes("Chief Financial Officer") ||
n.includes("Chief Executive Officer")) &&
this.money.gte(15e6) &&
this.karma <= -22 &&
e.push(q);
const K = v.a.Tetrads;
!K.isBanned &&
!K.isMember &&
!K.alreadyInvited &&
(this.city == C.a.Chongqing || this.city == C.a.NewTokyo || this.city == C.a.Ishima) &&
this.strength >= 75 &&
this.defense >= 75 &&
this.dexterity >= 75 &&
this.agility >= 75 &&
this.karma <= -18 &&
e.push(K);
const $ = v.a["Slum Snakes"];
!$.isBanned &&
!$.isMember &&
!$.alreadyInvited &&
this.strength >= 30 &&
this.defense >= 30 &&
this.dexterity >= 30 &&
this.agility >= 30 &&
this.karma <= -9 &&
this.money.gte(1e6) &&
e.push($);
const z = v.a.Netburners;
let Y = 0,
V = 0,
J = 0;
for (let e = 0; e < this.hacknetNodes.length; ++e) {
const t = this.hacknetNodes[e];
if ("string" == typeof t) {
const e = Object(R.d)(t);
if (null === e || !(e instanceof W.a)) throw new Error("player hacknet server was not HacknetServer");
(J += e.level), (Y += e.maxRam), (V += e.cores);
} else (J += t.level), (Y += t.ram), (V += t.cores);
}
!z.isBanned &&
!z.isMember &&
!z.alreadyInvited &&
this.hacking_skill >= 80 &&
Y >= 8 &&
V >= 4 &&
J >= 100 &&
e.push(z);
const X = v.a["Tian Di Hui"];
X.isBanned ||
X.isMember ||
X.alreadyInvited ||
!this.money.gte(1e6) ||
!(this.hacking_skill >= 50) ||
(this.city != C.a.Chongqing && this.city != C.a.NewTokyo && this.city != C.a.Ishima) ||
e.push(X);
const Q = v.a.CyberSec,
Z = Object(R.d)(I.a.CyberSecServer);
if (!(Z instanceof P.a)) throw new Error("cybersec should be normal server");
return (
null == Z
? console.error("Could not find CyberSec Server")
: Q.isBanned || Q.isMember || !Z.backdoorInstalled || Q.alreadyInvited || e.push(Q),
e
);
}
function _t(e) {
this.bitNodeN = e;
}
function wt(e) {
for (const t in this.queuedAugmentations)
if (this.queuedAugmentations[t].name == e)
return void console.warn(`tried to queue ${e} twice, this may be a bug`);
for (const t in this.augmentations)
if (this.augmentations[t].name == e) return void console.warn(`tried to queue ${e} twice, this may be a bug`);
this.queuedAugmentations.push(new i.a(e));
}
function Ct(e, t = 1) {
if (null == e || null == e.type || null == e) return "No reward for this contract";
switch (e.type) {
case l.c.FactionReputation:
if (null == e.name || !(v.a[e.name] instanceof E.a))
return (e.type = l.c.FactionReputationAll), this.gainCodingContractReward(e);
const a = f.a.CodingContractBaseFactionRepGain * t;
return (v.a[e.name].playerReputation += a), `Gained ${a} faction reputation for ${e.name}`;
case l.c.FactionReputationAll:
const n = f.a.CodingContractBaseFactionRepGain * t,
r = ["Bladeburners"],
i = this.factions.slice().filter((e) => !r.includes(e));
if (0 == i.length) return (e.type = l.c.Money), this.gainCodingContractReward(e, t);
const o = Math.floor(n / i.length);
for (const e of i) v.a[e] instanceof E.a && (v.a[e].playerReputation += o);
return `Gained ${o} reputation for each of the following factions: ${i.toString()}`;
case l.c.CompanyReputation: {
if (null == e.name || !(u.a[e.name] instanceof c.a))
return (e.type = l.c.FactionReputationAll), this.gainCodingContractReward(e);
const a = f.a.CodingContractBaseCompanyRepGain * t;
return (u.a[e.name].playerReputation += a), `Gained ${a} company reputation for ${e.name}`;
}
case l.c.Money:
default: {
const e = f.a.CodingContractBaseMoneyGain * t * s.a.CodingContractMoney;
return this.gainMoney(e), this.recordMoneySource(e, "codingcontract"), "Gained " + U.a.formatMoney(e);
}
}
}
function St(e) {
return null == _.a[e]
? (console.warn("Player.travel() called with invalid city: " + e), !1)
: ((this.city = e), !0);
}
function xt(e) {
return null == w.a[e]
? (console.warn("Player.gotoLocation() called with invalid location: " + e), !1)
: ((this.location = e), !0);
}
function Ot() {
return 10 === this.bitNodeN || D.a[10] > 0;
}
function Tt(e) {
this.exploits.includes(e) || this.exploits.push(e);
}
function Mt(e) {
return Object(T.a)(this.intelligence, e);
}
function Rt() {
return this.moneySourceA.casino;
}
function Pt(e) {
return this.hasOwnProperty(e) ? this[e] : 1;
}
function At(e, t) {
this.hasOwnProperty(e) && (this[e] = t);
}
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
Operations: "Operations",
Engineer: "Engineer",
Business: "Business",
Management: "Management",
RandD: "Research & Development",
Training: "Training",
Unassigned: "Unassigned",
};
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return c;
});
var n = a(476),
r = a(8),
i = a(784),
o = a(277),
s = a(21);
function l(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class c extends n.a {
constructor(e = { hostname: "", ip: Object(o.a)() }) {
super(e),
l(this, "backdoorInstalled", !1),
l(this, "baseDifficulty", 1),
l(this, "hackDifficulty", 1),
l(this, "minDifficulty", 1),
l(this, "moneyAvailable", 0),
l(this, "moneyMax", 0),
l(this, "numOpenPortsRequired", 5),
l(this, "openPortCount", 0),
l(this, "purchasedByPlayer", !1),
l(this, "requiredHackingSkill", 1),
l(this, "serverGrowth", 1),
this.hostname.startsWith("hacknet-node-") && (this.hostname = Object(i.a)(10)),
(this.purchasedByPlayer = null != e.purchasedByPlayer && e.purchasedByPlayer),
(this.maxRam = null != e.maxRam ? e.maxRam : 0),
(this.requiredHackingSkill = null != e.requiredHackingSkill ? e.requiredHackingSkill : 1),
(this.moneyAvailable = null != e.moneyAvailable ? e.moneyAvailable * r.a.ServerStartingMoney : 0),
(this.moneyMax = 25 * this.moneyAvailable * r.a.ServerMaxMoney),
(this.hackDifficulty = null != e.hackDifficulty ? e.hackDifficulty * r.a.ServerStartingSecurity : 1),
(this.baseDifficulty = this.hackDifficulty),
(this.minDifficulty = Math.max(1, Math.round(this.hackDifficulty / 3))),
(this.serverGrowth = null != e.serverGrowth ? e.serverGrowth : 1),
(this.numOpenPortsRequired = null != e.numOpenPortsRequired ? e.numOpenPortsRequired : 5);
}
capDifficulty() {
this.hackDifficulty < this.minDifficulty && (this.hackDifficulty = this.minDifficulty),
this.hackDifficulty < 1 && (this.hackDifficulty = 1),
this.hackDifficulty > 100 && (this.hackDifficulty = 100);
}
changeMinimumSecurity(e, t = !1) {
t ? (this.minDifficulty *= e) : (this.minDifficulty += e),
(this.minDifficulty = Math.max(1, this.minDifficulty));
}
changeMaximumMoney(e, t = !1) {
t ? (this.moneyMax *= e) : (this.moneyMax += e);
}
fortify(e) {
(this.hackDifficulty += e), this.capDifficulty();
}
weaken(e) {
(this.hackDifficulty -= e * r.a.ServerWeakenRate), this.capDifficulty();
}
toJSON() {
return Object(s.b)("Server", this);
}
static fromJSON(e) {
return Object(s.a)(c, e.data);
}
}
s.c.constructors.Server = c;
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return s;
}),
a.d(t, "d", function () {
return l;
}),
a.d(t, "b", function () {
return c;
}),
a.d(t, "c", function () {
return u;
}),
a.d(t, "e", function () {
return m;
});
var n = a(0),
r = a.n(n),
i = a(108),
o = a(119);
const s = {
Energy: "Energy",
Utilities: "Water Utilities",
Agriculture: "Agriculture",
Fishing: "Fishing",
Mining: "Mining",
Food: "Food",
Tobacco: "Tobacco",
Chemical: "Chemical",
Pharmaceutical: "Pharmaceutical",
Computer: "Computer Hardware",
Robotics: "Robotics",
Software: "Software",
Healthcare: "Healthcare",
RealEstate: "RealEstate",
},
l = {
Energy: 225e9,
Utilities: 15e10,
Agriculture: 4e10,
Fishing: 8e10,
Mining: 3e11,
Food: 1e10,
Tobacco: 2e10,
Chemical: 7e10,
Pharmaceutical: 2e11,
Computer: 5e11,
Robotics: 1e12,
Software: 25e9,
Healthcare: 75e10,
RealEstate: 6e11,
},
c = {
Energy: (e) =>
r.a.createElement(
r.a.Fragment,
null,
"Engage in the production and distribution of energy.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Starting cost: ",
r.a.createElement(o.a, { money: l.Energy, corp: e }),
r.a.createElement("br", null),
"Recommended starting Industry: NO",
),
Utilities: (e) =>
r.a.createElement(
r.a.Fragment,
null,
"Distribute water and provide wastewater services.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Starting cost: ",
r.a.createElement(o.a, { money: l.Utilities, corp: e }),
r.a.createElement("br", null),
"Recommended starting Industry: NO",
),
Agriculture: (e) =>
r.a.createElement(
r.a.Fragment,
null,
"Cultivate crops and breed livestock to produce food.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Starting cost: ",
r.a.createElement(o.a, { money: l.Agriculture, corp: e }),
r.a.createElement("br", null),
"Recommended starting Industry: YES",
),
Fishing: (e) =>
r.a.createElement(
r.a.Fragment,
null,
"Produce food through the breeding and processing of fish and fish products.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Starting cost: ",
r.a.createElement(o.a, { money: l.Fishing, corp: e }),
r.a.createElement("br", null),
"Recommended starting Industry: NO",
),
Mining: (e) =>
r.a.createElement(
r.a.Fragment,
null,
"Extract and process metals from the earth.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Starting cost: ",
r.a.createElement(o.a, { money: l.Mining, corp: e }),
r.a.createElement("br", null),
"Recommended starting Industry: NO",
),
Food: (e) =>
r.a.createElement(
r.a.Fragment,
null,
"Create your own restaurants all around the world.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Starting cost: ",
r.a.createElement(o.a, { money: l.Food, corp: e }),
r.a.createElement("br", null),
"Recommended starting Industry: YES",
),
Tobacco: (e) =>
r.a.createElement(
r.a.Fragment,
null,
"Create and distribute tobacco and tobacco-related products.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Starting cost: ",
r.a.createElement(o.a, { money: l.Tobacco, corp: e }),
r.a.createElement("br", null),
"Recommended starting Industry: YES",
),
Chemical: (e) =>
r.a.createElement(
r.a.Fragment,
null,
"Produce industrial chemicals.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Starting cost: ",
r.a.createElement(o.a, { money: l.Chemical, corp: e }),
r.a.createElement("br", null),
"Recommended starting Industry: NO",
),
Pharmaceutical: (e) =>
r.a.createElement(
r.a.Fragment,
null,
"Discover, develop, and create new pharmaceutical drugs.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Starting cost: ",
r.a.createElement(o.a, { money: l.Pharmaceutical, corp: e }),
r.a.createElement("br", null),
"Recommended starting Industry: NO",
),
Computer: (e) =>
r.a.createElement(
r.a.Fragment,
null,
"Develop and manufacture new computer hardware and networking infrastructures.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Starting cost: ",
r.a.createElement(o.a, { money: l.Computer, corp: e }),
r.a.createElement("br", null),
"Recommended starting Industry: NO",
),
Robotics: (e) =>
r.a.createElement(
r.a.Fragment,
null,
"Develop and create robots.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Starting cost: ",
r.a.createElement(o.a, { money: l.Robotics, corp: e }),
r.a.createElement("br", null),
"Recommended starting Industry: NO",
),
Software: (e) =>
r.a.createElement(
r.a.Fragment,
null,
"Develop computer software and create AI Cores.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Starting cost: ",
r.a.createElement(o.a, { money: l.Software, corp: e }),
r.a.createElement("br", null),
"Recommended starting Industry: YES",
),
Healthcare: (e) =>
r.a.createElement(
r.a.Fragment,
null,
"Create and manage hospitals.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Starting cost: ",
r.a.createElement(o.a, { money: l.Healthcare, corp: e }),
r.a.createElement("br", null),
"Recommended starting Industry: NO",
),
RealEstate: (e) =>
r.a.createElement(
r.a.Fragment,
null,
"Develop and manage real estate properties.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Starting cost: ",
r.a.createElement(o.a, { money: l.RealEstate, corp: e }),
r.a.createElement("br", null),
"Recommended starting Industry: NO",
),
},
u = {
Energy: Object(i.a)(),
Utilities: Object(i.a)(),
Agriculture: Object(i.a)(),
Fishing: Object(i.a)(),
Mining: Object(i.a)(),
Food: Object(i.b)(),
Tobacco: Object(i.b)(),
Chemical: Object(i.a)(),
Pharmaceutical: Object(i.b)(),
Computer: Object(i.b)(),
Robotics: Object(i.b)(),
Software: Object(i.b)(),
Healthcare: Object(i.b)(),
RealEstate: Object(i.b)(),
};
function m() {
(u.Energy = Object(i.a)()),
(u.Utilities = Object(i.a)()),
(u.Agriculture = Object(i.a)()),
(u.Fishing = Object(i.a)()),
(u.Mining = Object(i.a)()),
(u.Food = Object(i.a)()),
(u.Tobacco = Object(i.a)()),
(u.Chemical = Object(i.a)()),
(u.Pharmaceutical = Object(i.a)()),
(u.Computer = Object(i.a)()),
(u.Robotics = Object(i.a)()),
(u.Software = Object(i.a)()),
(u.Healthcare = Object(i.a)()),
(u.RealEstate = Object(i.a)());
}
},
,
,
function (e, t, a) {
"use strict";
let n;
a.d(t, "a", function () {
return n;
}),
(function (e) {
(e[(e.Company = 0)] = "Company"),
(e[(e.Gym = 1)] = "Gym"),
(e[(e.Hospital = 2)] = "Hospital"),
(e[(e.Slums = 3)] = "Slums"),
(e[(e.Special = 4)] = "Special"),
(e[(e.StockMarket = 5)] = "StockMarket"),
(e[(e.TechVendor = 6)] = "TechVendor"),
(e[(e.TravelAgency = 7)] = "TravelAgency"),
(e[(e.University = 8)] = "University"),
(e[(e.Casino = 9)] = "Casino");
})(n || (n = {}));
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
CityNames: ["Aevum", "Chongqing", "Sector-12", "New Tokyo", "Ishima", "Volhaven"],
CyclesPerSecond: 5,
StaminaGainPerSecond: 0.0085,
BaseStaminaLoss: 0.285,
MaxStaminaToGainFactor: 7e4,
DifficultyToTimeFactor: 10,
DiffMultExponentialFactor: 0.28,
DiffMultLinearFactor: 650,
EffAgiLinearFactor: 1e4,
EffDexLinearFactor: 1e4,
EffAgiExponentialFactor: 0.04,
EffDexExponentialFactor: 0.035,
BaseRecruitmentTimeNeeded: 300,
PopulationThreshold: 1e9,
PopulationExponent: 0.7,
ChaosThreshold: 50,
BaseStatGain: 1,
BaseIntGain: 0.003,
ActionCountGrowthPeriod: 480,
RankToFactionRepFactor: 2,
RankNeededForFaction: 25,
ContractSuccessesPerLevel: 3,
OperationSuccessesPerLevel: 2.5,
RanksPerSkillPoint: 3,
ContractBaseMoneyGain: 25e4,
HrcHpGain: 2,
HrcStaminaGain: 1,
};
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
HackersStartingHandbook: "hackers-starting-handbook.lit",
CorporationManagementHandbook: "corporation-management-handbook.lit",
HistoryOfSynthoids: "history-of-synthoids.lit",
AGreenTomorrow: "A-Green-Tomorrow.lit",
AlphaOmega: "alpha-omega.lit",
SimulatedReality: "simulated-reality.lit",
BeyondMan: "beyond-man.lit",
BrighterThanTheSun: "brighter-than-the-sun.lit",
DemocracyIsDead: "democracy-is-dead.lit",
Sector12Crime: "sector-12-crime.lit",
ManAndMachine: "man-and-machine.lit",
SecretSocieties: "secret-societies.lit",
TheFailedFrontier: "the-failed-frontier.lit",
CodedIntelligence: "coded-intelligence.lit",
SyntheticMuscles: "synthetic-muscles.lit",
TensionsInTechRace: "tensions-in-tech-race.lit",
CostOfImmortality: "cost-of-immortality.lit",
TheHiddenWorld: "the-hidden-world.lit",
TheNewGod: "the-new-god.lit",
NewTriads: "new-triads.lit",
TheSecretWar: "the-secret-war.lit",
};
},
function (e, t, a) {
"use strict";
a.d(t, "g", function () {
return f;
}),
a.d(t, "l", function () {
return g;
}),
a.d(t, "h", function () {
return y;
}),
a.d(t, "a", function () {
return b;
}),
a.d(t, "b", function () {
return E;
}),
a.d(t, "e", function () {
return v;
}),
a.d(t, "f", function () {
return k;
}),
a.d(t, "d", function () {
return _;
}),
a.d(t, "c", function () {
return w;
}),
a.d(t, "n", function () {
return C;
}),
a.d(t, "o", function () {
return S;
}),
a.d(t, "k", function () {
return x;
}),
a.d(t, "j", function () {
return O;
}),
a.d(t, "i", function () {
return T;
}),
a.d(t, "p", function () {
return R;
}),
a.d(t, "m", function () {
return P;
});
var n = a(248),
r = a(230),
i = a(206),
o = a(37),
s = a(87),
l = a(322),
c = a(249),
u = a(323),
m = a(39),
h = a(24),
d = a(48),
p = a(62);
function f(e) {
return 9 === e.bitNodeN || p.a[9] > 0;
}
function g(e) {
if (m.a.isRunning) {
if (m.a.currStep !== m.f.HacknetNodesIntroduction) return -1;
Object(m.c)();
}
const t = e.hacknetNodes.length;
if (f(e)) {
const a = E(e);
if (isNaN(a)) throw new Error("Calculated cost of purchasing HacknetServer is NaN");
return e.canAfford(a) ? (e.loseMoney(a), e.createHacknetServer(), R(e), t) : -1;
}
{
const a = b(e);
if (isNaN(a)) throw new Error("Calculated cost of purchasing HacknetNode is NaN");
if (!e.canAfford(a)) return -1;
const r = "hacknet-node-" + t,
i = new n.a(r, e.hacknet_node_money_mult);
return e.loseMoney(a), e.hacknetNodes.push(i), t;
}
}
function y(e) {
return f(e) && e.hacknetNodes.length >= o.b.MaxServers;
}
function b(e) {
return Object(r.d)(e.hacknetNodes.length + 1, e.hacknet_node_purchase_cost_mult);
}
function E(e) {
return Object(i.f)(e.hacknetNodes.length + 1, e.hacknet_node_purchase_cost_mult);
}
function v(e, t, a) {
if (null == a) throw new Error("getMaxNumberLevelUpgrades() called without maxLevel arg");
if (e.money.lt(t.calculateLevelUpgradeCost(1, e.hacknet_node_level_cost_mult))) return 0;
let n = 1,
r = a - 1;
const i = a - t.level;
if (e.money.gt(t.calculateLevelUpgradeCost(i, e.hacknet_node_level_cost_mult))) return i;
for (; n <= r; ) {
const o = ((n + r) / 2) | 0;
if (
o !== a &&
e.money.gt(t.calculateLevelUpgradeCost(o, e.hacknet_node_level_cost_mult)) &&
e.money.lt(t.calculateLevelUpgradeCost(o + 1, e.hacknet_node_level_cost_mult))
)
return Math.min(i, o);
if (e.money.lt(t.calculateLevelUpgradeCost(o, e.hacknet_node_level_cost_mult))) r = o - 1;
else {
if (!e.money.gt(t.calculateLevelUpgradeCost(o, e.hacknet_node_level_cost_mult))) return Math.min(i, o);
n = o + 1;
}
}
return 0;
}
function k(e, t, a) {
if (null == a) throw new Error("getMaxNumberRamUpgrades() called without maxLevel arg");
if (e.money.lt(t.calculateRamUpgradeCost(1, e.hacknet_node_ram_cost_mult))) return 0;
let n;
if (
((n = t instanceof s.a ? Math.round(Math.log2(a / t.maxRam)) : Math.round(Math.log2(a / t.ram))),
e.money.gt(t.calculateRamUpgradeCost(n, e.hacknet_node_ram_cost_mult)))
)
return n;
for (let a = n - 1; a >= 0; --a)
if (e.money.gt(t.calculateRamUpgradeCost(a, e.hacknet_node_ram_cost_mult))) return a;
return 0;
}
function _(e, t, a) {
if (null == a) throw new Error("getMaxNumberCoreUpgrades() called without maxLevel arg");
if (e.money.lt(t.calculateCoreUpgradeCost(1, e.hacknet_node_core_cost_mult))) return 0;
let n = 1,
r = a - 1;
const i = a - t.cores;
if (e.money.gt(t.calculateCoreUpgradeCost(i, e.hacknet_node_core_cost_mult))) return i;
for (; n <= r; ) {
const o = ((n + r) / 2) | 0;
if (
o != a &&
e.money.gt(t.calculateCoreUpgradeCost(o, e.hacknet_node_core_cost_mult)) &&
e.money.lt(t.calculateCoreUpgradeCost(o + 1, e.hacknet_node_core_cost_mult))
)
return Math.min(i, o);
if (e.money.lt(t.calculateCoreUpgradeCost(o, e.hacknet_node_core_cost_mult))) r = o - 1;
else {
if (!e.money.gt(t.calculateCoreUpgradeCost(o, e.hacknet_node_core_cost_mult))) return Math.min(i, o);
n = o + 1;
}
}
return 0;
}
function w(e, t, a) {
if (null == a) throw new Error("getMaxNumberCacheUpgrades() called without maxLevel arg");
if (!e.canAfford(t.calculateCacheUpgradeCost(1))) return 0;
let n = 1,
r = a - 1;
const i = a - t.cache;
if (e.canAfford(t.calculateCacheUpgradeCost(i))) return i;
for (; n <= r; ) {
const o = ((n + r) / 2) | 0;
if (o != a && e.canAfford(t.calculateCacheUpgradeCost(o)) && !e.canAfford(t.calculateCacheUpgradeCost(o + 1)))
return Math.min(i, o);
if (e.canAfford(t.calculateCacheUpgradeCost(o))) {
if (!e.canAfford(t.calculateCacheUpgradeCost(o))) return Math.min(i, o);
n = o + 1;
} else r = o - 1;
}
return 0;
}
function C(e, t, a = 1) {
const n = Math.round(a),
r = t.calculateLevelUpgradeCost(n, e.hacknet_node_level_cost_mult);
if (isNaN(r) || r <= 0 || n < 0) return !1;
const i = t instanceof s.a;
if (t.level >= (i ? o.b.MaxLevel : o.a.MaxLevel)) return !1;
if (t.level + n > (i ? o.b.MaxLevel : o.a.MaxLevel)) {
return C(e, t, Math.max(0, (i ? o.b.MaxLevel : o.a.MaxLevel) - t.level));
}
return !!e.canAfford(r) && (e.loseMoney(r), t.upgradeLevel(n, e.hacknet_node_money_mult), !0);
}
function S(e, t, a = 1) {
const r = Math.round(a),
i = t.calculateRamUpgradeCost(r, e.hacknet_node_ram_cost_mult);
if (isNaN(i) || i <= 0 || r < 0) return !1;
if (t instanceof s.a && t.maxRam >= o.b.MaxRam) return !1;
if (t instanceof n.a && t.ram >= o.a.MaxRam) return !1;
if (t instanceof s.a) {
if (t.maxRam * Math.pow(2, r) > o.b.MaxRam) {
return S(e, t, Math.max(0, Math.log2(Math.round(o.b.MaxRam / t.maxRam))));
}
} else if (t instanceof n.a && t.ram * Math.pow(2, r) > o.a.MaxRam) {
return S(e, t, Math.max(0, Math.log2(Math.round(o.a.MaxRam / t.ram))));
}
return !!e.canAfford(i) && (e.loseMoney(i), t.upgradeRam(r, e.hacknet_node_money_mult), !0);
}
function x(e, t, a = 1) {
const n = Math.round(a),
r = t.calculateCoreUpgradeCost(n, e.hacknet_node_core_cost_mult);
if (isNaN(r) || r <= 0 || n < 0) return !1;
const i = t instanceof s.a;
if (t.cores >= (i ? o.b.MaxCores : o.a.MaxCores)) return !1;
if (t.cores + n > (i ? o.b.MaxCores : o.a.MaxCores)) {
return x(e, t, Math.max(0, (i ? o.b.MaxCores : o.a.MaxCores) - t.cores));
}
return !!e.canAfford(r) && (e.loseMoney(r), t.upgradeCore(n, e.hacknet_node_money_mult), !0);
}
function O(e, t, a = 1) {
const n = Math.round(a),
r = t.calculateCacheUpgradeCost(n);
if (isNaN(r) || r <= 0 || n < 0) return !1;
if (!(t instanceof s.a)) return console.warn("purchaseCacheUpgrade() called for a non-HacknetNode"), !1;
if (t.cache + n > o.b.MaxCache) {
return O(e, t, Math.max(0, o.b.MaxCache - t.cache));
}
return !!e.canAfford(r) && (e.loseMoney(r), t.upgradeCache(n), !0);
}
function T(e, t) {
return 0 === e.hacknetNodes.length
? 0
: f(e)
? (function (e, t) {
if (!(e.hashManager instanceof l.a))
throw new Error("Player does not have a HashManager (should be in 'hashManager' prop)");
let a = 0;
for (let r = 0; r < e.hacknetNodes.length; ++r) {
const i = e.hacknetNodes[r];
if (i instanceof n.a) throw new Error("player nodes should not be HacketNode");
const o = Object(h.d)(i);
if (!(o instanceof s.a)) throw new Error("player nodes shoud not be Server");
o.updateHashRate(e.hacknet_node_money_mult);
const l = o.process(t);
a += l;
}
return e.hashManager.storeHashes(a), a;
})(e, t)
: e.hacknetNodes[0] instanceof n.a
? (function (e, t) {
let a = 0;
for (let n = 0; n < e.hacknetNodes.length; ++n) {
const r = e.hacknetNodes[n];
if ("string" == typeof r) throw new Error("player node should not be ip string");
a += M(e, t, r);
}
return a;
})(e, t)
: 0;
}
function M(e, t, a) {
const n = a.process(t);
return e.gainMoney(n), e.recordMoneySource(n, "hacknetnode"), n;
}
function R(e) {
if (!(e.hashManager instanceof l.a)) return void console.error("Player does not have a HashManager");
const t = e.hacknetNodes;
if (0 === t.length) return void e.hashManager.updateCapacity(0);
let a = 0;
for (let r = 0; r < t.length; ++r) {
if ("string" != typeof t[r]) return void e.hashManager.updateCapacity(0);
const i = t[r];
if (i instanceof n.a) throw new Error("player nodes should be string but isn't");
const o = Object(h.d)(i);
if (!(o instanceof s.a)) return void e.hashManager.updateCapacity(0);
a += o.hashCapacity;
}
e.hashManager.updateCapacity(a);
}
function P(e, t, a) {
if (!(e.hashManager instanceof l.a)) return console.error("Player does not have a HashManager"), !1;
if (e.hashManager.upgrade(t)) {
const n = c.a[t];
switch (t) {
case "Sell for Money":
e.gainMoney(n.value), e.recordMoneySource(n.value, "hacknetnode");
break;
case "Sell for Corporation Funds": {
const a = e.corporation;
if (null === a) return e.hashManager.refundUpgrade(t), !1;
a.funds = a.funds.plus(n.value);
break;
}
case "Reduce Minimum Security":
try {
const e = Object(h.d)(a);
if (null == e) return console.error("Invalid target specified in purchaseHashUpgrade(): " + a), !1;
if (!(e instanceof d.a)) throw new Error(`'${a}' is not a normal server.`);
e.changeMinimumSecurity(n.value, !0);
} catch (a) {
return e.hashManager.refundUpgrade(t), !1;
}
break;
case "Increase Maximum Money":
try {
const e = Object(h.d)(a);
if (null == e) return console.error("Invalid target specified in purchaseHashUpgrade(): " + a), !1;
if (!(e instanceof d.a)) throw new Error(`'${a}' is not a normal server.`);
e.changeMaximumMoney(n.value, !0);
} catch (a) {
return e.hashManager.refundUpgrade(t), !1;
}
break;
case "Improve Studying":
case "Improve Gym Training":
break;
case "Exchange for Corporation Research": {
const a = e.corporation;
if (null === a) return e.hashManager.refundUpgrade(t), !1;
for (const e of a.divisions) e.sciResearch.qty += n.value;
break;
}
case "Exchange for Bladeburner Rank": {
const a = e.bladeburner;
if (null === a) return e.hashManager.refundUpgrade(t), !1;
a.changeRank(e, n.value);
break;
}
case "Exchange for Bladeburner SP": {
const a = e.bladeburner;
if (null === a) return e.hashManager.refundUpgrade(t), !1;
a.skillPoints += n.value;
break;
}
case "Generate Coding Contract":
Object(u.b)();
break;
default:
return (
console.warn(`Unrecognized upgrade name ${t}. Upgrade has no effect`), e.hashManager.refundUpgrade(t), !1
);
}
return !0;
}
return !1;
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return o;
}),
a.d(t, "b", function () {
return s;
}),
a.d(t, "c", function () {
return l;
});
var n = a(794),
r = a(200),
i = a(21);
let o = {};
function s() {
const e = o;
(o = {}),
n.a.forEach((e) => {
var t;
null != o[(t = e).name] && console.warn("Duplicate Company Position being defined: " + t.name),
(o[t.name] = new r.a(t));
});
for (const t in o) {
const a = o[t];
e[t] instanceof r.a ? ((a.favor = e[t].favor), isNaN(a.favor) && (a.favor = 0)) : (a.favor = 0);
}
}
function l(e) {
o = JSON.parse(e, i.c);
}
},
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
}),
a.d(t, "b", function () {
return i;
});
var n = a(7);
const r = Array(n.a.TotalNumBitNodes + 1);
function i(e) {
for (let e = 0; e < r.length; ++e) r[e] = 0;
for (let t = 0; t < e.sourceFiles.length; ++t) {
const a = e.sourceFiles[t];
r[a.n] = a.lvl;
}
}
},
,
,
,
function (e, t, a) {
"use strict";
let n;
a.d(t, "a", function () {
return n;
}),
(function (e) {
(e.Long = "L"), (e.Short = "S");
})(n || (n = {}));
},
function (module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.d(__webpack_exports__, "l", function () {
return NewIndustry;
}),
__webpack_require__.d(__webpack_exports__, "k", function () {
return NewCity;
}),
__webpack_require__.d(__webpack_exports__, "x", function () {
return UnlockUpgrade;
}),
__webpack_require__.d(__webpack_exports__, "h", function () {
return LevelUpgrade;
}),
__webpack_require__.d(__webpack_exports__, "g", function () {
return IssueDividends;
}),
__webpack_require__.d(__webpack_exports__, "o", function () {
return SellMaterial;
}),
__webpack_require__.d(__webpack_exports__, "p", function () {
return SellProduct;
}),
__webpack_require__.d(__webpack_exports__, "u", function () {
return SetSmartSupply;
}),
__webpack_require__.d(__webpack_exports__, "v", function () {
return SetSmartSupplyUseLeftovers;
}),
__webpack_require__.d(__webpack_exports__, "c", function () {
return BuyMaterial;
}),
__webpack_require__.d(__webpack_exports__, "a", function () {
return AssignJob;
}),
__webpack_require__.d(__webpack_exports__, "y", function () {
return UpgradeOfficeSize;
}),
__webpack_require__.d(__webpack_exports__, "w", function () {
return ThrowParty;
}),
__webpack_require__.d(__webpack_exports__, "m", function () {
return PurchaseWarehouse;
}),
__webpack_require__.d(__webpack_exports__, "z", function () {
return UpgradeWarehouse;
}),
__webpack_require__.d(__webpack_exports__, "b", function () {
return BuyCoffee;
}),
__webpack_require__.d(__webpack_exports__, "f", function () {
return HireAdVert;
}),
__webpack_require__.d(__webpack_exports__, "j", function () {
return MakeProduct;
}),
__webpack_require__.d(__webpack_exports__, "n", function () {
return Research;
}),
__webpack_require__.d(__webpack_exports__, "e", function () {
return ExportMaterial;
}),
__webpack_require__.d(__webpack_exports__, "d", function () {
return CancelExportMaterial;
}),
__webpack_require__.d(__webpack_exports__, "i", function () {
return LimitProductProduction;
}),
__webpack_require__.d(__webpack_exports__, "q", function () {
return SetMaterialMarketTA1;
}),
__webpack_require__.d(__webpack_exports__, "r", function () {
return SetMaterialMarketTA2;
}),
__webpack_require__.d(__webpack_exports__, "s", function () {
return SetProductMarketTA1;
}),
__webpack_require__.d(__webpack_exports__, "t", function () {
return SetProductMarketTA2;
});
var _IndustryData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50),
_Industry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(801),
_data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41),
_OfficeSpace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(325),
_Product__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(352),
_Warehouse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(204),
_Locations_Cities__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(129),
_EmployeePositions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(46),
_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(326),
_ResearchMap__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(279);
function NewIndustry(e, t, a) {
for (let t = 0; t < e.divisions.length; ++t)
if (e.divisions[t].name === a) throw new Error("This division name is already in use!");
const n = _IndustryData__WEBPACK_IMPORTED_MODULE_0__.d[t];
if (void 0 === n) throw new Error(`Invalid industry: '${t}'`);
if (e.funds.lt(n)) throw new Error("Not enough money to create a new division in this industry");
if ("" === a) throw new Error("New division must have a name!");
(e.funds = e.funds.minus(n)),
e.divisions.push(new _Industry__WEBPACK_IMPORTED_MODULE_1__.a({ corp: e, name: a, type: t }));
}
function NewCity(e, t, a) {
if (e.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_2__.a.OfficeInitialCost))
throw new Error("You don't have enough company funds to open a new office!");
(e.funds = e.funds.minus(_data_Constants__WEBPACK_IMPORTED_MODULE_2__.a.OfficeInitialCost)),
(t.offices[a] = new _OfficeSpace__WEBPACK_IMPORTED_MODULE_3__.a({
loc: a,
size: _data_Constants__WEBPACK_IMPORTED_MODULE_2__.a.OfficeInitialSize,
}));
}
function UnlockUpgrade(e, t) {
if (e.funds.lt(t[1])) throw new Error("Insufficient funds");
e.unlock(t);
}
function LevelUpgrade(e, t) {
const a = t[1],
n = t[2],
r = e.upgrades[t[0]],
i = a * Math.pow(n, r);
if (e.funds.lt(i)) throw new Error("Insufficient funds");
e.upgrade(t);
}
function IssueDividends(e, t) {
if (isNaN(t) || t < 0 || t > _data_Constants__WEBPACK_IMPORTED_MODULE_2__.a.DividendMaxPercentage)
throw new Error(
"Invalid value. Must be an integer between 0 and " +
_data_Constants__WEBPACK_IMPORTED_MODULE_2__.a.DividendMaxPercentage,
);
e.dividendPercentage = 100 * t;
}
function SellMaterial(mat, amt, price) {
"" === price && (price = "0"), "" === amt && (amt = "0");
let cost = price.replace(/\s+/g, "");
cost = cost.replace(/[^-()\d/*+.MP]/g, "");
let temp = cost.replace(/MP/g, mat.bCost + "");
try {
temp = eval(temp);
} catch (e) {
throw new Error("Invalid value or expression for sell price field: " + e);
}
if (null == temp || isNaN(parseFloat(temp))) throw new Error("Invalid value or expression for sell price field");
if (
(cost.includes("MP") ? (mat.sCost = cost) : (mat.sCost = temp), amt.includes("MAX") || amt.includes("PROD"))
) {
let q = amt.replace(/\s+/g, "");
q = q.replace(/[^-()\d/*+.MAXPROD]/g, "");
let tempQty = q.replace(/MAX/g, "1");
tempQty = tempQty.replace(/PROD/g, "1");
try {
tempQty = eval(tempQty);
} catch (e) {
throw new Error("Invalid value or expression for sell price field: " + e);
}
if (null == tempQty || isNaN(parseFloat(tempQty)))
throw new Error("Invalid value or expression for sell price field");
(mat.sllman[0] = !0), (mat.sllman[1] = q);
} else {
if (isNaN(parseFloat(amt))) throw new Error("Invalid value for sell quantity field! Must be numeric or 'MAX'");
{
let e = parseFloat(amt);
isNaN(e) && (e = 0),
0 === e ? ((mat.sllman[0] = !1), (mat.sllman[1] = 0)) : ((mat.sllman[0] = !0), (mat.sllman[1] = e));
}
}
}
function SellProduct(product, city, amt, price, all) {
if (price.includes("MP")) {
(price = price.replace(/\s+/g, "")), (price = price.replace(/[^-()\d/*+.MP]/g, ""));
let temp = price.replace(/MP/g, "1");
try {
temp = eval(temp);
} catch (e) {
throw new Error("Invalid value or expression for sell quantity field: " + e);
}
if (null == temp || isNaN(parseFloat(temp)))
throw new Error("Invalid value or expression for sell quantity field.");
product.sCost = price;
} else {
const e = parseFloat(price);
if (isNaN(e)) throw new Error("Invalid value for sell price field");
product.sCost = e;
}
const cities = Object.keys(_Locations_Cities__WEBPACK_IMPORTED_MODULE_6__.a);
if (amt.includes("MAX") || amt.includes("PROD")) {
let qty = amt.replace(/\s+/g, "");
qty = qty.replace(/[^-()\d/*+.MAXPROD]/g, "");
let temp = qty.replace(/MAX/g, "1");
temp = temp.replace(/PROD/g, "1");
try {
temp = eval(temp);
} catch (e) {
throw new Error("Invalid value or expression for sell price field: " + e);
}
if (null == temp || isNaN(parseFloat(temp)))
throw new Error("Invalid value or expression for sell price field");
if (all)
for (let e = 0; e < cities.length; ++e) {
const t = cities[e];
(product.sllman[t][0] = !0), (product.sllman[t][1] = qty);
}
else (product.sllman[city][0] = !0), (product.sllman[city][1] = qty);
} else {
if (isNaN(parseFloat(amt))) throw new Error("Invalid value for sell quantity field! Must be numeric");
{
let e = parseFloat(amt);
if ((isNaN(e) && (e = 0), 0 === e))
if (all)
for (let e = 0; e < cities.length; ++e) {
const t = cities[e];
(product.sllman[t][0] = !1), (product.sllman[t][1] = "");
}
else (product.sllman[city][0] = !1), (product.sllman[city][1] = "");
else if (all)
for (let t = 0; t < cities.length; ++t) {
const a = cities[t];
(product.sllman[a][0] = !0), (product.sllman[a][1] = e);
}
else (product.sllman[city][0] = !0), (product.sllman[city][1] = e);
}
}
}
function SetSmartSupply(e, t) {
e.smartSupplyEnabled = t;
}
function SetSmartSupplyUseLeftovers(e, t, a) {
if (!Object.keys(e.smartSupplyUseLeftovers).includes(t.name)) throw new Error(`Invalid material '${t.name}'`);
e.smartSupplyUseLeftovers[t.name] = a;
}
function BuyMaterial(e, t) {
if (isNaN(t)) throw new Error(`Invalid amount '${t}' to buy material '${e.name}'`);
e.buy = t;
}
function AssignJob(e, t) {
if (!Object.values(_EmployeePositions__WEBPACK_IMPORTED_MODULE_7__.a).includes(t))
throw new Error(`'${t}' is not a valid job.`);
e.pos = t;
}
function UpgradeOfficeSize(e, t, a) {
const n = Math.round(t.size / _data_Constants__WEBPACK_IMPORTED_MODULE_2__.a.OfficeInitialSize);
let r = 0;
for (let e = 0; e < a / _data_Constants__WEBPACK_IMPORTED_MODULE_2__.a.OfficeInitialSize; ++e)
r += Math.pow(1.09, n + e);
const i = _data_Constants__WEBPACK_IMPORTED_MODULE_2__.a.OfficeInitialCost * r;
e.funds.lt(i) || ((t.size += a), (e.funds = e.funds.minus(i)));
}
function ThrowParty(e, t, a) {
const n = a * t.employees.length;
if (e.funds.lt(n)) return 0;
e.funds = e.funds.minus(n);
let r = 0;
for (let e = 0; e < t.employees.length; ++e) r = t.employees[e].throwParty(a);
return r;
}
function PurchaseWarehouse(e, t, a) {
e.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_2__.a.WarehouseInitialCost) ||
t.warehouses[a] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__.a ||
((t.warehouses[a] = new _Warehouse__WEBPACK_IMPORTED_MODULE_5__.a({
corp: e,
industry: t,
loc: a,
size: _data_Constants__WEBPACK_IMPORTED_MODULE_2__.a.WarehouseInitialSize,
})),
(e.funds = e.funds.minus(_data_Constants__WEBPACK_IMPORTED_MODULE_2__.a.WarehouseInitialCost)));
}
function UpgradeWarehouse(e, t, a) {
const n = _data_Constants__WEBPACK_IMPORTED_MODULE_2__.a.WarehouseUpgradeBaseCost * Math.pow(1.07, a.level + 1);
++a.level, a.updateSize(e, t), (e.funds = e.funds.minus(n));
}
function BuyCoffee(e, t, a) {
const n = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__.a[0],
r = a.employees.length * n[1];
e.funds.lt(r) || ((e.funds = e.funds.minus(r)), t.upgrade(n, { corporation: e, office: a }));
}
function HireAdVert(e, t, a) {
const n = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__.a[1],
r = n[1] * Math.pow(n[2], t.upgrades[1]);
e.funds.lt(r) || ((e.funds = e.funds.minus(r)), t.upgrade(n, { corporation: e, office: a }));
}
function MakeProduct(e, t, a, n, r, i) {
if ((r < 0 && (r = 0), i < 0 && (i = 0), null == n || "" === n))
throw new Error("You must specify a name for your product!");
if (isNaN(r)) throw new Error("Invalid value for design investment");
if (isNaN(i)) throw new Error("Invalid value for marketing investment");
if (e.funds.lt(r + i)) throw new Error("You don't have enough company funds to make this large of an investment");
const o = new _Product__WEBPACK_IMPORTED_MODULE_4__.a({
name: n.replace(/[<>]/g, ""),
createCity: a,
designCost: r,
advCost: i,
});
if (t.products[o.name] instanceof _Product__WEBPACK_IMPORTED_MODULE_4__.a)
throw new Error("You already have a product with this name!");
(e.funds = e.funds.minus(r + i)), (t.products[o.name] = o);
}
function Research(e, t) {
const a = _IndustryData__WEBPACK_IMPORTED_MODULE_0__.c[e.type];
if (void 0 === a) throw new Error(`No research tree for industry '${e.type}'`);
if (!a.getAllNodes().includes(t)) throw new Error(`No research named '${t}'`);
const n = _ResearchMap__WEBPACK_IMPORTED_MODULE_9__.a[t];
if (e.sciResearch.qty < n.cost) throw new Error("You do not have enough Scientific Research for " + n.name);
(e.sciResearch.qty -= n.cost), a.research(t), (e.researched[t] = !0);
}
function ExportMaterial(divisionName, cityName, material, amt) {
let sanitizedAmt = amt.replace(/\s+/g, "");
sanitizedAmt = sanitizedAmt.replace(/[^-()\d/*+.MAX]/g, "");
let temp = sanitizedAmt.replace(/MAX/g, "1");
try {
temp = eval(temp);
} catch (e) {
throw new Error("Invalid expression entered for export amount: " + e);
}
const n = parseFloat(temp);
if (null == n || isNaN(n) || n < 0) throw new Error("Invalid amount entered for export");
const exportObj = { ind: divisionName, city: cityName, amt: sanitizedAmt };
material.exp.push(exportObj);
}
function CancelExportMaterial(e, t, a, n) {
for (let r = 0; r < a.exp.length; ++r)
if (a.exp[r].ind === e && a.exp[r].city === t && a.exp[r].amt === n) {
a.exp.splice(r, 1);
break;
}
}
function LimitProductProduction(e, t, a) {
a < 0 || isNaN(a) ? (e.prdman[t][0] = !1) : ((e.prdman[t][0] = !0), (e.prdman[t][1] = a));
}
function SetMaterialMarketTA1(e, t) {
e.marketTa1 = t;
}
function SetMaterialMarketTA2(e, t) {
e.marketTa2 = t;
}
function SetProductMarketTA1(e, t) {
e.marketTa1 = t;
}
function SetProductMarketTA2(e, t) {
e.marketTa2 = t;
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(785),
r = a(786);
const i = {};
for (const e of r.a) i[e.key] = new n.a(e.name, e.create, e.run);
},
function (e, t, a) {
"use strict";
let n;
a.d(t, "a", function () {
return n;
}),
(function (e) {
(e[(e.Idle = 0)] = "Idle"),
(e[(e.Company = 1)] = "Company"),
(e[(e.Faction = 2)] = "Faction"),
(e[(e.Crime = 3)] = "Crime"),
(e[(e.Class = 4)] = "Class"),
(e[(e.Gym = 5)] = "Gym"),
(e[(e.Recovery = 6)] = "Recovery"),
(e[(e.Synchro = 7)] = "Synchro");
})(n || (n = {}));
},
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
}),
a.d(t, "c", function () {
return i;
}),
a.d(t, "b", function () {
return o;
});
var n = a(21);
let r = {
"Slum Snakes": { power: 1, territory: 1 / 7 },
Tetrads: { power: 1, territory: 1 / 7 },
"The Syndicate": { power: 1, territory: 1 / 7 },
"The Dark Army": { power: 1, territory: 1 / 7 },
"Speakers for the Dead": { power: 1, territory: 1 / 7 },
NiteSec: { power: 1, territory: 1 / 7 },
"The Black Hand": { power: 1, territory: 1 / 7 },
};
function i() {
r = {
"Slum Snakes": { power: 1, territory: 1 / 7 },
Tetrads: { power: 1, territory: 1 / 7 },
"The Syndicate": { power: 1, territory: 1 / 7 },
"The Dark Army": { power: 1, territory: 1 / 7 },
"Speakers for the Dead": { power: 1, territory: 1 / 7 },
NiteSec: { power: 1, territory: 1 / 7 },
"The Black Hand": { power: 1, territory: 1 / 7 },
};
}
function o(e) {
r = JSON.parse(e, n.c);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(186),
r = a(7);
const i = {
Shoplift: new n.a("Shoplift", r.a.CrimeShoplift, 2e3, 15e3, 0.05, 0.1, {
dexterity_success_weight: 1,
agility_success_weight: 1,
dexterity_exp: 2,
agility_exp: 2,
}),
RobStore: new n.a("Rob Store", r.a.CrimeRobStore, 6e4, 4e5, 0.2, 0.5, {
hacking_exp: 30,
dexterity_exp: 45,
agility_exp: 45,
hacking_success_weight: 0.5,
dexterity_success_weight: 2,
agility_success_weight: 1,
intelligence_exp: 7.5 * r.a.IntelligenceCrimeBaseExpGain,
}),
Mug: new n.a("Mug", r.a.CrimeMug, 4e3, 36e3, 0.2, 0.25, {
strength_exp: 3,
defense_exp: 3,
dexterity_exp: 3,
agility_exp: 3,
strength_success_weight: 1.5,
defense_success_weight: 0.5,
dexterity_success_weight: 1.5,
agility_success_weight: 0.5,
}),
Larceny: new n.a("Larceny", r.a.CrimeLarceny, 9e4, 8e5, 1 / 3, 1.5, {
hacking_exp: 45,
dexterity_exp: 60,
agility_exp: 60,
hacking_success_weight: 0.5,
dexterity_success_weight: 1,
agility_success_weight: 1,
intelligence_exp: 15 * r.a.IntelligenceCrimeBaseExpGain,
}),
DealDrugs: new n.a("Deal Drugs", r.a.CrimeDrugs, 1e4, 12e4, 1, 0.5, {
dexterity_exp: 5,
agility_exp: 5,
charisma_exp: 10,
charisma_success_weight: 3,
dexterity_success_weight: 2,
agility_success_weight: 1,
}),
BondForgery: new n.a("Bond Forgery", r.a.CrimeBondForgery, 3e5, 45e5, 0.5, 0.1, {
hacking_exp: 100,
dexterity_exp: 150,
charisma_exp: 15,
hacking_success_weight: 0.05,
dexterity_success_weight: 1.25,
intelligence_exp: 60 * r.a.IntelligenceCrimeBaseExpGain,
}),
TraffickArms: new n.a("Traffick Arms", r.a.CrimeTraffickArms, 4e4, 6e5, 2, 1, {
strength_exp: 20,
defense_exp: 20,
dexterity_exp: 20,
agility_exp: 20,
charisma_exp: 40,
charisma_success_weight: 1,
strength_success_weight: 1,
defense_success_weight: 1,
dexterity_success_weight: 1,
agility_success_weight: 1,
}),
Homicide: new n.a("Homicide", r.a.CrimeHomicide, 3e3, 45e3, 1, 3, {
strength_exp: 2,
defense_exp: 2,
dexterity_exp: 2,
agility_exp: 2,
strength_success_weight: 2,
defense_success_weight: 2,
dexterity_success_weight: 0.5,
agility_success_weight: 0.5,
kills: 1,
}),
GrandTheftAuto: new n.a("Grand Theft Auto", r.a.CrimeGrandTheftAuto, 8e4, 16e5, 8, 5, {
strength_exp: 20,
defense_exp: 20,
dexterity_exp: 20,
agility_exp: 80,
charisma_exp: 40,
hacking_success_weight: 1,
strength_success_weight: 1,
dexterity_success_weight: 4,
agility_success_weight: 2,
charisma_success_weight: 2,
intelligence_exp: 16 * r.a.IntelligenceCrimeBaseExpGain,
}),
Kidnap: new n.a("Kidnap", r.a.CrimeKidnap, 12e4, 36e5, 5, 6, {
strength_exp: 80,
defense_exp: 80,
dexterity_exp: 80,
agility_exp: 80,
charisma_exp: 80,
charisma_success_weight: 1,
strength_success_weight: 1,
dexterity_success_weight: 1,
agility_success_weight: 1,
intelligence_exp: 26 * r.a.IntelligenceCrimeBaseExpGain,
}),
Assassination: new n.a("Assassination", r.a.CrimeAssassination, 3e5, 12e6, 8, 10, {
strength_exp: 300,
defense_exp: 300,
dexterity_exp: 300,
agility_exp: 300,
strength_success_weight: 1,
dexterity_success_weight: 2,
agility_success_weight: 1,
intelligence_exp: 65 * r.a.IntelligenceCrimeBaseExpGain,
kills: 1,
}),
Heist: new n.a("Heist", r.a.CrimeHeist, 6e5, 12e7, 18, 15, {
hacking_exp: 450,
strength_exp: 450,
defense_exp: 450,
dexterity_exp: 450,
agility_exp: 450,
charisma_exp: 450,
hacking_success_weight: 1,
strength_success_weight: 1,
defense_success_weight: 1,
dexterity_success_weight: 1,
agility_success_weight: 1,
charisma_success_weight: 1,
intelligence_exp: 130 * r.a.IntelligenceCrimeBaseExpGain,
}),
};
},
function (e, t, a) {
"use strict";
function n(e) {
return function (t) {
t.isTrusted && e();
};
}
a.d(t, "a", function () {
return n;
});
},
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(800),
r = a(315);
const i = {};
n.a.forEach((e) => {
var t;
null != i[(t = e).name] && console.warn("Duplicate Company Position being defined: " + t.name),
(i[t.name] = new r.a(t));
});
},
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return u;
});
var n = a(7),
r = a(476),
i = a(37),
o = a(206),
s = a(277),
l = a(21);
function c(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class u extends r.a {
constructor(e = { hostname: "", ip: Object(s.a)() }) {
super(e),
c(this, "cache", 1),
c(this, "cores", 1),
c(this, "hashCapacity", 0),
c(this, "hashRate", 0),
c(this, "level", 1),
c(this, "onlineTimeSeconds", 0),
c(this, "totalHashesGenerated", 0),
(this.maxRam = 1),
this.updateHashCapacity();
}
calculateCacheUpgradeCost(e) {
return Object(o.a)(this.cache, e);
}
calculateCoreUpgradeCost(e, t) {
return Object(o.b)(this.cores, e, t);
}
calculateLevelUpgradeCost(e, t) {
return Object(o.d)(this.level, e, t);
}
calculateRamUpgradeCost(e, t) {
return Object(o.e)(this.maxRam, e, t);
}
process(e = 1) {
const t = (e * n.a.MilliPerCycle) / 1e3;
this.onlineTimeSeconds += t;
const a = this.hashRate * t;
return (this.totalHashesGenerated += a), a;
}
upgradeCache(e) {
(this.cache = Math.min(i.b.MaxCache, Math.round(this.cache + e))), this.updateHashCapacity();
}
upgradeCore(e, t) {
(this.cores = Math.min(i.b.MaxCores, Math.round(this.cores + e))), this.updateHashRate(t);
}
upgradeLevel(e, t) {
(this.level = Math.min(i.b.MaxLevel, Math.round(this.level + e))), this.updateHashRate(t);
}
upgradeRam(e, t) {
for (let t = 0; t < e; ++t) this.maxRam *= 2;
return (this.maxRam = Math.min(i.b.MaxRam, Math.round(this.maxRam))), this.updateHashRate(t), !0;
}
runScript(e, t) {
super.runScript(e), null != t && "number" == typeof t && this.updateHashRate(t);
}
updateHashCapacity() {
this.hashCapacity = 32 * Math.pow(2, this.cache);
}
updateHashRate(e) {
(this.hashRate = Object(o.c)(this.level, this.ramUsed, this.maxRam, this.cores, e)),
isNaN(this.hashRate) &&
((this.hashRate = 0),
console.error(
"Error calculating Hacknet Server hash production. This is a bug. Please report to game dev",
!1,
));
}
toJSON() {
return Object(l.b)("HacknetServer", this);
}
static fromJSON(e) {
return Object(l.a)(u, e.data);
}
}
l.c.constructors.HacknetServer = u;
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
});
var n = a(9);
const r = {};
(r[n.a.AevumECorp] = "ECP"),
(r[n.a.Sector12MegaCorp] = "MGCP"),
(r[n.a.Sector12BladeIndustries] = "BLD"),
(r[n.a.AevumClarkeIncorporated] = "CLRK"),
(r[n.a.VolhavenOmniTekIncorporated] = "OMTK"),
(r[n.a.Sector12FourSigma] = "FSIG"),
(r[n.a.ChongqingKuaiGongInternational] = "KGI"),
(r[n.a.AevumFulcrumTechnologies] = "FLCM"),
(r[n.a.IshimaStormTechnologies] = "STM"),
(r[n.a.NewTokyoDefComm] = "DCOMM"),
(r[n.a.VolhavenHeliosLabs] = "HLS"),
(r[n.a.NewTokyoVitaLife] = "VITA"),
(r[n.a.Sector12IcarusMicrosystems] = "ICRS"),
(r[n.a.Sector12UniversalEnergy] = "UNV"),
(r[n.a.AevumAeroCorp] = "AERO"),
(r[n.a.VolhavenOmniaCybersystems] = "OMN"),
(r[n.a.ChongqingSolarisSpaceSystems] = "SLRS"),
(r[n.a.NewTokyoGlobalPharmaceuticals] = "GPH"),
(r[n.a.IshimaNovaMedical] = "NVMD"),
(r[n.a.AevumWatchdogSecurity] = "WDS"),
(r[n.a.VolhavenLexoCorp] = "LXO"),
(r[n.a.AevumRhoConstruction] = "RHOC"),
(r[n.a.Sector12AlphaEnterprises] = "APHE"),
(r[n.a.VolhavenSysCoreSecurities] = "SYSC"),
(r[n.a.VolhavenCompuTek] = "CTK"),
(r[n.a.AevumNetLinkTechnologies] = "NTLK"),
(r[n.a.IshimaOmegaSoftware] = "OMGA"),
(r[n.a.Sector12FoodNStuff] = "FNS"),
(r["Sigma Cosmetics"] = "SGC"),
(r["Joes Guns"] = "JGN"),
(r["Catalyst Ventures"] = "CTYS"),
(r["Microdyne Technologies"] = "MDYN"),
(r["Titan Laboratories"] = "TITN");
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return i;
}),
a.d(t, "c", function () {
return o;
}),
a.d(t, "e", function () {
return s;
}),
a.d(t, "d", function () {
return l;
}),
a.d(t, "a", function () {
return c;
}),
a.d(t, "f", function () {
return u;
});
var n = a(8),
r = a(350);
function i(e, t) {
const a = (100 - e.hackDifficulty) / 100,
n = 1.75 * t.hacking_skill,
i = ((n - e.requiredHackingSkill) / n) * a * t.hacking_chance_mult * Object(r.a)(t.intelligence, 1);
return i > 1 ? 1 : i < 0 ? 0 : i;
}
function o(e, t) {
null == e.baseDifficulty && (e.baseDifficulty = e.hackDifficulty);
let a = 3;
return (a += e.baseDifficulty * t.hacking_exp_mult * 0.3), a * n.a.HackExpGain;
}
function s(e, t) {
const a =
(((100 - e.hackDifficulty) / 100) *
((t.hacking_skill - (e.requiredHackingSkill - 1)) / t.hacking_skill) *
t.hacking_money_mult) /
240;
return a < 0 ? 0 : a > 1 ? 1 : a * n.a.ScriptHackMoney;
}
function l(e, t) {
let a = 2.5 * (e.requiredHackingSkill * e.hackDifficulty) + 500;
a /= t.hacking_skill + 50;
return (5 * a) / (t.hacking_speed_mult * Object(r.a)(t.intelligence, 1));
}
function c(e, t) {
return 3.2 * l(e, t);
}
function u(e, t) {
return 4 * l(e, t);
}
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return g;
}),
a.d(t, "b", function () {
return y;
}),
a.d(t, "j", function () {
return b;
}),
a.d(t, "c", function () {
return E;
}),
a.d(t, "i", function () {
return v;
}),
a.d(t, "d", function () {
return k;
}),
a.d(t, "f", function () {
return _;
}),
a.d(t, "h", function () {
return w;
}),
a.d(t, "k", function () {
return S;
}),
a.d(t, "g", function () {
return x;
}),
a.d(t, "e", function () {
return O;
});
var n = a(622),
r = a(292),
i = a(128),
o = a(547),
s = a(806),
l = a(94),
c = a(66),
u = a(88),
m = a(7),
h = a(122),
d = a(4),
p = a(15),
f = a(21);
let g = { lastUpdate: 0, Orders: {}, storedCycles: 0, ticksUntilCycle: 0 };
const y = {};
function b(e, t, a, o, s, l = null) {
if (!(e instanceof i.a))
return (
l
? l.log("placeOrder", `Invalid stock: '${e}'`)
: Object(p.a)("ERROR: Invalid stock passed to placeOrder() function"),
!1
);
if ("number" != typeof t || "number" != typeof a)
return (
l
? l.log("placeOrder", `Invalid arguments: shares='${t}' price='${a}'`)
: Object(p.a)("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),
!1
);
const c = new n.a(e.symbol, t, a, o, s);
if (null == g.Orders) {
const e = {};
for (const t in g) {
const a = g[t];
a instanceof i.a && (e[a.symbol] = []);
}
g.Orders = e;
}
g.Orders[e.symbol].push(c);
const u = { stockMarket: g, symbolToStockMap: y };
return Object(r.a)(e, c.type, c.pos, u), !0;
}
function E(e, t = null) {
if (null == g.Orders) return !1;
if (e.order && e.order instanceof n.a) {
const t = e.order,
a = g.Orders[t.stockSymbol];
for (let e = 0; e < a.length; ++e) if (t == a[e]) return a.splice(e, 1), !0;
return !1;
}
if (e.stock && e.shares && e.price && e.type && e.pos && e.stock instanceof i.a) {
const a = g.Orders[e.stock.symbol],
n = e.stock.symbol + " - " + e.shares + " @ " + d.a.formatMoney(e.price);
for (let r = 0; r < a.length; ++r) {
const i = a[r];
if (e.shares === i.shares && e.price === i.price && e.type === i.type && e.pos === i.pos)
return a.splice(r, 1), t && t.scriptRef.log("Successfully cancelled order: " + n), !0;
}
return t && t.scriptRef.log("Failed to cancel order: " + n), !1;
}
return !1;
}
function v(e) {
g = "" === e ? { lastUpdate: 0, Orders: {}, storedCycles: 0, ticksUntilCycle: 0 } : JSON.parse(e, f.c);
}
function k() {
g = { lastUpdate: 0, Orders: {}, storedCycles: 0, ticksUntilCycle: 0 };
}
function _() {
for (const e in g) g.hasOwnProperty(e) && delete g[e];
for (const e of s.a) {
const t = e.name;
g[t] = new i.a(e);
}
const e = {};
for (const t in g) {
const a = g[t];
a instanceof i.a && (e[a.symbol] = []);
}
(g.Orders = e), (g.storedCycles = 0), (g.lastUpdate = 0), (g.ticksUntilCycle = o.a);
}
function w() {
for (const e in u.a)
if (u.a.hasOwnProperty(e)) {
const t = g[e];
if (null == t) {
console.error("Could not find Stock for " + e);
continue;
}
const a = u.a[e];
y[a] = t;
}
}
const C = 6e3 / m.a.MilliPerCycle;
function S(e = 1) {
if (
((null == g.storedCycles || isNaN(g.storedCycles)) && (g.storedCycles = 0),
(g.storedCycles += e),
g.storedCycles < C)
)
return;
const t = new Date().getTime();
if (t - g.lastUpdate < 4e3) return;
(g.lastUpdate = t),
(g.storedCycles -= C),
(null != g.ticksUntilCycle && "number" == typeof g.ticksUntilCycle) || (g.ticksUntilCycle = o.a),
--g.ticksUntilCycle,
g.ticksUntilCycle <= 0 &&
(function () {
for (const e in g) {
const t = g[e];
if (!(t instanceof i.a)) continue;
Math.random() < 0.45 && ((t.b = !t.b), t.flipForecastForecast()), (g.ticksUntilCycle = o.a);
}
})();
const a = Math.random();
for (const e in g) {
const t = g[e];
if (!(t instanceof i.a)) continue;
let n = (a * t.mv) / 100;
isNaN(n) && (n = 0.02);
let o = 50;
(o = t.b ? (o + t.otlkMag) / 100 : (o - t.otlkMag) / 100),
t.price >= t.cap && ((o = 0.1), (t.b = !1)),
isNaN(o) && (o = 0.5);
const s = Math.random(),
u = { stockMarket: g, symbolToStockMap: y };
s < o
? (t.changePrice(t.price * (1 + n)),
Object(r.a)(t, l.a.LimitBuy, c.a.Short, u),
Object(r.a)(t, l.a.LimitSell, c.a.Long, u),
Object(r.a)(t, l.a.StopBuy, c.a.Long, u),
Object(r.a)(t, l.a.StopSell, c.a.Short, u))
: (t.changePrice(t.price / (1 + n)),
Object(r.a)(t, l.a.LimitBuy, c.a.Long, u),
Object(r.a)(t, l.a.LimitSell, c.a.Short, u),
Object(r.a)(t, l.a.StopBuy, c.a.Short, u),
Object(r.a)(t, l.a.StopSell, c.a.Long, u));
let m = t.otlkMag * n;
t.otlkMag < 5 && (t.otlkMag <= 1 ? (m = 1) : (m *= 10)),
t.cycleForecast(m),
t.cycleForecastForecast(m / 2),
(t.shareTxUntilMovement = Math.min(t.shareTxUntilMovement + 10, t.shareTxForMovement));
}
}
function x() {
_(), w();
}
const O = new h.a();
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
CTRL: 17,
DOWNARROW: 40,
ENTER: 13,
ESC: 27,
TAB: 9,
UPARROW: 38,
0: 48,
1: 49,
2: 50,
3: 51,
4: 52,
5: 53,
6: 54,
7: 55,
8: 56,
9: 57,
A: 65,
B: 66,
C: 67,
D: 68,
E: 69,
F: 70,
G: 71,
H: 72,
I: 73,
J: 74,
K: 75,
L: 76,
M: 77,
N: 78,
O: 79,
P: 80,
Q: 81,
R: 82,
S: 83,
T: 84,
U: 85,
V: 86,
W: 87,
X: 88,
Y: 89,
Z: 90,
};
},
function (e, t, a) {
"use strict";
a.d(t, "d", function () {
return s;
}),
a.d(t, "c", function () {
return l;
}),
a.d(t, "b", function () {
return c;
}),
a.d(t, "a", function () {
return u;
});
var n = a(735),
r = a(21),
i = a(477);
class o {
constructor(e, t, a, n, r, i) {
(this.name = e),
(this.desc = t),
(this.generate = a),
(this.solver = n),
(this.difficulty = r),
(this.numTries = i);
}
}
const s = {};
for (const e of n.a) s[e.name] = new o(e.name, e.desc, e.gen, e.solver, e.difficulty, e.numTries);
let l, c;
!(function (e) {
(e[(e.FactionReputation = 0)] = "FactionReputation"),
(e[(e.FactionReputationAll = 1)] = "FactionReputationAll"),
(e[(e.CompanyReputation = 2)] = "CompanyReputation"),
(e[(e.Money = 3)] = "Money");
})(l || (l = {})),
(function (e) {
(e[(e.Success = 0)] = "Success"), (e[(e.Failure = 1)] = "Failure"), (e[(e.Cancelled = 2)] = "Cancelled");
})(c || (c = {}));
class u {
constructor(e = "", t = "Find Largest Prime Factor", a = null) {
var n, r, i;
if (
((i = 0),
(r = "tries") in (n = this)
? Object.defineProperty(n, r, { value: i, enumerable: !0, configurable: !0, writable: !0 })
: (n[r] = i),
(this.fn = e),
this.fn.endsWith(".cct") || (this.fn += ".cct"),
null == s[t])
)
throw new Error(`Error: invalid contract type: ${t} please contact developer`);
(this.type = t), (this.data = s[t].generate()), (this.reward = a);
}
getData() {
return this.data;
}
getDescription() {
return s[this.type].desc(this.data);
}
getDifficulty() {
return s[this.type].difficulty;
}
getMaxNumTries() {
return s[this.type].numTries;
}
getType() {
return s[this.type].name;
}
isSolution(e) {
return s[this.type].solver(this.data, e);
}
async prompt() {
return new Promise((e) => {
const t = {
c: this,
onClose: () => {
e(c.Cancelled);
},
onAttempt: (t) => {
this.isSolution(t) ? e(c.Success) : e(c.Failure);
},
};
i.a.emit(t);
});
}
toJSON() {
return Object(r.b)("CodingContract", this);
}
static fromJSON(e) {
return Object(r.a)(u, e.data);
}
}
r.c.constructors.CodingContract = u;
},
function (e, t, a) {
"use strict";
let n;
a.d(t, "a", function () {
return n;
}),
(function (e) {
(e.LimitBuy = "Limit Buy Order"),
(e.LimitSell = "Limit Sell Order"),
(e.StopBuy = "Stop Buy Order"),
(e.StopSell = "Stop Sell Order");
})(n || (n = {}));
},
,
,
,
,
,
,
function (e, t, a) {
"use strict";
function n(e) {
return e.endsWith(".js") || e.endsWith(".script") || e.endsWith(".ns");
}
a.d(t, "a", function () {
return n;
});
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(0),
r = a(4),
i = a(131),
o = a(155);
const s = Object(i.a)((e) => Object(o.a)({ reputation: { color: e.colors.rep } }));
function l({ reputation: e }) {
const t = s();
return n.createElement("span", { className: t.reputation }, "number" == typeof e ? r.a.formatReputation(e) : e);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
Home: "home",
FulcrumSecretTechnologies: "fulcrumassets",
CyberSecServer: "CSEC",
NiteSecServer: "avmnite-02h",
TheBlackHandServer: "I.I.I.I",
BitRunnersServer: "run4theh111z",
TheDarkArmyServer: ".",
DaedalusServer: "The-Cave",
WorldDaemon: "w0r1d_d43m0n",
DarkWeb: "darkweb",
};
},
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return s;
});
var n = a(0),
r = a.n(n),
i = a(4),
o = a(18);
function s({ money: e }) {
return r.a.createElement(o.a, { money: i.a.formatMoney(e) + " / sec" });
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return s;
}),
a.d(t, "b", function () {
return l;
});
var n = a(279),
r = a(546);
function i(e) {
const t = n.a[e];
if (null == t) throw new Error("Invalid research name: " + e);
return new r.a({ text: t.name, cost: t.cost });
}
function o() {
const e = i("Hi-Tech R&D Laboratory"),
t = i("AutoBrew"),
a = i("AutoPartyManager"),
n = i("Automatic Drug Administration"),
r = i("Bulk Purchasing"),
o = i("CPH4 Injections"),
s = i("Drones"),
l = i("Drones - Assembly"),
c = i("Drones - Transport"),
u = i("Go-Juice"),
m = i("HRBuddy-Recruitment"),
h = i("HRBuddy-Training"),
d = i("JoyWire"),
p = i("Market-TA.I"),
f = i("Market-TA.II"),
g = i("Overclock"),
y = i("Self-Correcting Assemblers"),
b = i("Sti.mu");
return (
n.addChild(u),
n.addChild(o),
s.addChild(l),
s.addChild(c),
m.addChild(h),
p.addChild(f),
g.addChild(b),
e.addChild(t),
e.addChild(a),
e.addChild(n),
e.addChild(r),
e.addChild(s),
e.addChild(m),
e.addChild(d),
e.addChild(p),
e.addChild(g),
e.addChild(y),
e
);
}
function s() {
const e = new r.b();
return e.setRoot(o()), e;
}
function l() {
const e = new r.b(),
t = o(),
a = i("uPgrade: Fulcrum"),
n = i("uPgrade: Capacity.I"),
s = i("uPgrade: Capacity.II"),
l = i("uPgrade: Dashboard");
return n.addChild(s), a.addChild(n), a.addChild(l), t.addChild(a), e.setRoot(t), e;
}
},
function (e, t, a) {
"use strict";
function n(e) {
return e.startsWith("/") ? e.slice(1) : e;
}
function r(e) {
return e.endsWith("/") ? e.slice(0, -1) : e;
}
function i(e) {
return null != e.match(/^[.a-zA-Z0-9_-]+[.][a-zA-Z0-9]+(?:-\d+(?:\.\d*)?%-INC)?$/);
}
function o(e) {
let t = e;
if (0 === t.length) return !1;
if (1 === t.length) return "/" === t;
if (!t.startsWith("/")) return !1;
(t = t.slice(1)), (t = r(t));
const a = t.split("/");
for (const e of a) if ("." !== e && ".." !== e && null == e.match(/^.?[a-zA-Z0-9_-]+$/)) return !1;
return !0;
}
function s(e) {
if (null == e || "string" != typeof e) return !1;
const t = e;
if (t.length < 3) return !1;
if (t.endsWith("/")) return !1;
const a = t.lastIndexOf("/");
if (-1 === a) return i(t);
const n = t.slice(a + 1);
return o(t.slice(0, a + 1)) && i(n);
}
function l(e) {
let t = e;
if (((t = n(t)), (t = r(t)), -1 === t.lastIndexOf("/"))) return "/";
const a = t.split("/");
return 0 === a.length ? "/" : a[0] + "/";
}
function c(e) {
const t = e,
a = t.lastIndexOf("/");
return -1 === a ? "" : t.slice(0, a + 1);
}
function u(e) {
return !!s(e) && null != e && 0 !== e.length && e.lastIndexOf("/") <= 0;
}
function m(e, t) {
let a = e;
if ((a.startsWith("/") || null == t || (a = t + (t.endsWith("/") ? "" : "/") + a), !o(a))) return null;
(a = n(a)), (a = r(a));
const i = a.split("/"),
s = [];
for (const e of i)
if ("." !== e)
if (".." === e) {
if (null == s.pop()) return null;
} else s.push(e);
return "/" + s.join("/");
}
function h(e, t) {
let a = e;
if ((a.startsWith("/") || null == t || (a = t + (t.endsWith("/") ? "" : "/") + a), !s(a))) return null;
a = n(a);
const r = a.split("/"),
i = [];
for (const e of r)
if ("." !== e)
if (".." === e) {
if (null == i.pop()) return null;
} else i.push(e);
return "/" + i.join("/");
}
a.d(t, "h", function () {
return n;
}),
a.d(t, "i", function () {
return r;
}),
a.d(t, "f", function () {
return o;
}),
a.d(t, "g", function () {
return s;
}),
a.d(t, "d", function () {
return l;
}),
a.d(t, "c", function () {
return c;
}),
a.d(t, "e", function () {
return u;
}),
a.d(t, "a", function () {
return m;
}),
a.d(t, "b", function () {
return h;
});
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return me;
}),
a.d(t, "a", function () {
return he;
});
var n = a(0),
r = a.n(n),
i = a(152),
o = a(284),
s = a(327),
l = a(9),
c = a(221),
u = a(39),
m = a(810),
h = a(324),
d = a(312),
p = a(15),
f = a(24),
g = a(25),
y = a(207),
b = a(91),
E = a(131),
v = a(155),
k = a(32),
_ = a(1),
w = a(31),
C = a(813),
S = a(817),
x = a(835),
O = a(845),
T = a(863),
M = a(895),
R = a(912),
P = a(952),
A = a(966),
N = a(969),
I = a(970),
F = a(1009),
j = a(1018),
B = a(632),
D = a(1049),
G = a(1050),
L = a(534),
W = a(1066),
H = a(1067),
U = a(1072),
q = a(1073),
K = a(1084),
$ = a(1085),
z = a(1095),
Y = a(533),
V = a(1097),
J = a(1106),
X = a(1109),
Q = a(1111),
Z = a(182),
ee = a(1112),
te = a(500),
ae = a(247),
ne = a(349),
re = a(499),
ie = a(495),
oe = a(224),
se = a(27);
const le = Object(E.a)((e) =>
Object(v.a)({ root: { "-ms-overflow-style": "none", "scrollbar-width": "none", margin: e.spacing(0) } }),
);
let ce = "",
ue = "",
me = {
page: () => {
throw new Error("Router called before initialization");
},
toActiveScripts: () => {
throw new Error("Router called before initialization");
},
toAugmentations: () => {
throw new Error("Router called before initialization");
},
toBitVerse: () => {
throw new Error("Router called before initialization");
},
toBladeburner: () => {
throw new Error("Router called before initialization");
},
toStats: () => {
throw new Error("Router called before initialization");
},
toCity: () => {
throw new Error("Router called before initialization");
},
toCorporation: () => {
throw new Error("Router called before initialization");
},
toCreateProgram: () => {
throw new Error("Router called before initialization");
},
toDevMenu: () => {
throw new Error("Router called before initialization");
},
toFaction: () => {
throw new Error("Router called before initialization");
},
toFactions: () => {
throw new Error("Router called before initialization");
},
toGameOptions: () => {
throw new Error("Router called before initialization");
},
toGang: () => {
throw new Error("Router called before initialization");
},
toHacknetNodes: () => {
throw new Error("Router called before initialization");
},
toInfiltration: () => {
throw new Error("Router called before initialization");
},
toJob: () => {
throw new Error("Router called before initialization");
},
toMilestones: () => {
throw new Error("Router called before initialization");
},
toResleeves: () => {
throw new Error("Router called before initialization");
},
toScriptEditor: () => {
throw new Error("Router called before initialization");
},
toSleeves: () => {
throw new Error("Router called before initialization");
},
toStockMarket: () => {
throw new Error("Router called before initialization");
},
toTerminal: () => {
throw new Error("Router called before initialization");
},
toTravel: () => {
throw new Error("Router called before initialization");
},
toTutorial: () => {
throw new Error("Router called before initialization");
},
toWork: () => {
throw new Error("Router called before initialization");
},
toBladeburnerCinematic: () => {
throw new Error("Router called before initialization");
},
toLocation: () => {
throw new Error("Router called before initialization");
},
};
function he({ player: e, engine: t, terminal: a }) {
const E = le(),
[v, he] = Object(n.useState)(
(function (e) {
return e.isWorking ? w.a.Work : w.a.Terminal;
})(e),
),
de = Object(n.useState)(0)[1],
[pe, fe] = Object(n.useState)(e.currentWorkFactionName ? g.a[e.currentWorkFactionName] : void 0);
if (void 0 === pe && v === w.a.Faction) throw new Error("Trying to go to a page without the proper setup");
const [ge, ye] = Object(n.useState)(!1),
[be, Ee] = Object(n.useState)(!1),
[ve, ke] = Object(n.useState)(void 0);
if (void 0 === ve && (v === w.a.Infiltration || v === w.a.Location || v === w.a.Job))
throw new Error("Trying to go to a page without the proper setup");
const [_e, we] = Object(n.useState)("");
function Ce() {
de((e) => e + 1);
}
return (
Object(n.useEffect)(() => h.a.subscribe(Ce), []),
(me = {
page: () => v,
toActiveScripts: () => he(w.a.ActiveScripts),
toAugmentations: () => he(w.a.Augmentations),
toBladeburner: () => he(w.a.Bladeburner),
toStats: () => he(w.a.Stats),
toCorporation: () => he(w.a.Corporation),
toCreateProgram: () => he(w.a.CreateProgram),
toDevMenu: () => he(w.a.DevMenu),
toFaction: (e) => {
he(w.a.Faction), e && fe(e);
},
toFactions: () => he(w.a.Factions),
toGameOptions: () => he(w.a.Options),
toGang: () => he(w.a.Gang),
toHacknetNodes: () => he(w.a.Hacknet),
toMilestones: () => he(w.a.Milestones),
toResleeves: () => he(w.a.Resleeves),
toScriptEditor: (e, t) => {
(ce = e), (ue = t), he(w.a.ScriptEditor);
},
toSleeves: () => he(w.a.Sleeves),
toStockMarket: () => he(w.a.StockMarket),
toTerminal: () => he(w.a.Terminal),
toTutorial: () => he(w.a.Tutorial),
toJob: () => {
ke(c.a[e.companyName]), he(w.a.Job);
},
toCity: () => {
he(w.a.City);
},
toTravel: () => {
e.gotoLocation(l.a.TravelAgency), he(w.a.Travel);
},
toBitVerse: (e, t) => {
ye(e), Ee(t), he(w.a.BitVerse);
},
toInfiltration: (e) => {
ke(e), he(w.a.Infiltration);
},
toWork: () => he(w.a.Work),
toBladeburnerCinematic: () => {
he(w.a.BladeburnerCinematic), we(_e);
},
toLocation: (e) => {
ke(e), he(w.a.Location);
},
}),
Object(n.useEffect)(() => {
(ce = ""), (ue = ""), v !== w.a.Terminal && window.scrollTo(0, 0);
}),
r.a.createElement(
se.a.Player.Provider,
{ value: e },
r.a.createElement(
se.a.Router.Provider,
{ value: me },
r.a.createElement(
C.a,
null,
u.a.isRunning ? r.a.createElement(m.a, null) : r.a.createElement(X.a, { save: () => o.b.saveGame() }),
),
v === w.a.BitVerse
? r.a.createElement(J.a, { flume: ge, enter: oe.a, quick: be })
: v === w.a.Infiltration
? r.a.createElement(P.a, { location: ve })
: v === w.a.BladeburnerCinematic
? r.a.createElement(Q.a, null)
: v === w.a.Work
? r.a.createElement(N.a, null)
: r.a.createElement(
k.a,
{ display: "flex", flexDirection: "row", width: "100%" },
r.a.createElement(S.a, { player: e, router: me, page: v }),
r.a.createElement(
k.a,
{ className: E.root, flexGrow: 1, display: "block", px: 1, height: "100vh" },
v === w.a.Terminal
? r.a.createElement(H.a, { terminal: a, router: me, player: e })
: v === w.a.Sleeves
? r.a.createElement(F.a, null)
: v === w.a.Stats
? r.a.createElement(z.a, null)
: v === w.a.ScriptEditor
? r.a.createElement(L.a, { filename: ce, code: ue, player: e, router: me })
: v === w.a.ActiveScripts
? r.a.createElement(q.a, { workerScripts: Z.a })
: v === w.a.Hacknet
? r.a.createElement(j.a, { player: e })
: v === w.a.CreateProgram
? r.a.createElement(G.a, null)
: v === w.a.Factions
? r.a.createElement(K.a, { player: e, router: me })
: v === w.a.Faction
? r.a.createElement($.a, { faction: pe })
: v === w.a.Milestones
? r.a.createElement(W.a, { player: e })
: v === w.a.Tutorial
? r.a.createElement(U.a, null)
: v === w.a.DevMenu
? r.a.createElement(O.a, { player: e, engine: t, router: me })
: v === w.a.Gang
? r.a.createElement(M.a, null)
: v === w.a.Corporation
? r.a.createElement(R.a, null)
: v === w.a.Bladeburner
? r.a.createElement(T.a, null)
: v === w.a.Resleeves
? r.a.createElement(A.a, null)
: v === w.a.Travel
? r.a.createElement(Y.a, { p: e, router: me })
: v === w.a.StockMarket
? r.a.createElement(V.a, {
buyStockLong: y.a,
buyStockShort: y.d,
cancelOrder: b.c,
eventEmitterForReset: b.e,
initStockMarket: b.g,
p: e,
placeOrder: b.j,
sellStockLong: y.c,
sellStockShort: y.b,
stockMarket: b.a,
})
: v === w.a.City
? r.a.createElement(D.a, null)
: v === w.a.Job || v === w.a.Location
? r.a.createElement(B.a, { loc: ve })
: v === w.a.Options
? r.a.createElement(I.a, {
player: e,
save: () => o.b.saveGame(),
export: () => o.b.exportGame(),
forceKill: () => {
for (const e of Object(f.c)()) e.runningScripts = [];
Object(p.a)("Forcefully deleted all running scripts. Please save and refresh page.");
},
softReset: () => {
Object(p.a)("Soft Reset!"), Object(d.a)(), me.toTerminal();
},
})
: v === w.a.Augmentations
? r.a.createElement(x.a, {
exportGameFn: () => {
o.b.exportGame(), Object(s.c)(e);
},
installAugmentationsFn: () => {
Object(i.d)(), me.toTerminal();
},
})
: r.a.createElement(r.a.Fragment, null, r.a.createElement(_.a, null, "Cannot load")),
),
),
r.a.createElement(ee.a, null),
r.a.createElement(te.b, null),
r.a.createElement(ae.b, null),
r.a.createElement(ne.b, null),
r.a.createElement(re.b, null),
r.a.createElement(ie.b, null),
),
)
);
}
},
,
,
function (e, t, a) {
"use strict";
a.d(t, "f", function () {
return m;
}),
a.d(t, "c", function () {
return h;
}),
a.d(t, "e", function () {
return d;
}),
a.d(t, "d", function () {
return p;
}),
a.d(t, "a", function () {
return f;
}),
a.d(t, "b", function () {
return g;
});
var n = a(24),
r = a(48),
i = a(498),
o = a(8),
s = a(7),
l = a(68),
c = a(56),
u = a(621);
function m(e) {
if ((null != e.ip && Object(n.g)(e.ip) && (e.ip = Object(n.e)()), null != Object(n.d)(e.hostname))) {
let t = e.hostname;
for (let a = 0; a < 200 && ((t = `${e.hostname}-${a}`), null != Object(n.d)(t)); ++a);
e.hostname = t;
}
return new r.a(e);
}
function h(e, t, a, n = 1) {
let r = 1 + (s.a.ServerBaseGrowthRate - 1) / e.hackDifficulty;
r > s.a.ServerMaxGrowthRate && (r = s.a.ServerMaxGrowthRate);
const i = e.serverGrowth / 100,
l = 1 + (n - 1) / 16;
return Math.log(t) / (Math.log(r) * a.hacking_grow_mult * i * o.a.ServerGrowthRate * l);
}
function d(e, t, a, n = 1) {
let r = Object(i.a)(e, t, a, n);
r < 1 && (console.warn("serverGrowth calculated to be less than 1"), (r = 1));
const o = e.moneyAvailable;
if (
((e.moneyAvailable += 1 * t),
(e.moneyAvailable *= r),
Object(u.a)(e.moneyMax) && isNaN(e.moneyAvailable) && (e.moneyAvailable = e.moneyMax),
Object(u.a)(e.moneyMax) && e.moneyAvailable > e.moneyMax && (e.moneyAvailable = e.moneyMax),
o !== e.moneyAvailable)
) {
let t = h(e, e.moneyAvailable / o, a, n);
(t = Math.max(0, t)), e.fortify(2 * s.a.ServerFortifyAmount * Math.ceil(t));
}
return e.moneyAvailable / o;
}
function p(e) {
const t = e.programs.includes(l.a.BitFlume.name);
(e.programs.length = 0),
(e.runningScripts = []),
(e.serversOnNetwork = []),
(e.isConnectedTo = !0),
(e.ramUsed = 0),
e.programs.push(l.a.NukeProgram.name),
t && e.programs.push(l.a.BitFlume.name),
e.scripts.forEach(function (t) {
t.updateRamUsage(e.scripts);
}),
(e.messages.length = 0),
e.messages.push(c.a.HackersStartingHandbook);
}
function f(e, t) {
return t > e.serversOnNetwork.length
? (console.error("Tried to get server on network that was out of range"), null)
: Object(n.d)(e.serversOnNetwork[t]);
}
function g(e) {
return e instanceof r.a && e.backdoorInstalled;
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return u;
});
var n = a(0),
r = a.n(n),
i = a(42),
o = a(189),
s = a(238),
l = a(65),
c = a(1);
function u({ rows: e, title: t, wide: a }) {
const n = a ? s.a : i.a;
return r.a.createElement(
r.a.Fragment,
null,
t && r.a.createElement(c.a, null, t),
r.a.createElement(
n,
{ size: "small", padding: "none" },
r.a.createElement(
o.a,
null,
e.map((e, t) =>
r.a.createElement(
l.a,
{ key: t },
e.map((e, t) =>
r.a.createElement(
i.b,
{ key: t, align: 0 !== t ? "right" : "left" },
r.a.createElement(c.a, { noWrap: !0 }, e),
),
),
),
),
),
),
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = new (a(734).a)();
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(304),
r = a(21);
class i extends n.a {
constructor(e = null) {
super(e), (this.count = 1);
}
getActionTimePenalty() {
return 1.5;
}
getChaosCompetencePenalty() {
return 1;
}
getChaosDifficultyBonus() {
return 1;
}
toJSON() {
return Object(r.b)("BlackOperation", this);
}
static fromJSON(e) {
return Object(r.a)(i, e.data);
}
}
r.c.constructors.BlackOperation = i;
},
function (e, t, a) {
"use strict";
a.d(t, "c", function () {
return g;
}),
a.d(t, "d", function () {
return y;
}),
a.d(t, "b", function () {
return b;
}),
a.d(t, "f", function () {
return E;
}),
a.d(t, "a", function () {
return v;
}),
a.d(t, "e", function () {
return k;
});
var n = a(20),
r = a(313),
i = a(6),
o = a(8),
s = a(7),
l = a(172),
c = a(25),
u = a(2),
m = a(14),
h = a(215),
d = a(62),
p = a(15),
f = a(495);
function g(e) {
u.a.factionInvitations.push(e.name), (e.alreadyInvited = !0), m.a.SuppressFactionInvites || f.a.emit(e);
}
function y(e) {
if (e.isMember) return;
(e.isMember = !0), u.a.factions.push(e.name);
const t = e.getInfo();
for (const e in t.enemies) {
const a = t.enemies[e];
c.a[a] instanceof l.a && (c.a[a].isBanned = !0);
}
for (let t = 0; t < u.a.factionInvitations.length; ++t)
(u.a.factionInvitations[t] == e.name || c.a[u.a.factionInvitations[t]].isBanned) &&
(u.a.factionInvitations.splice(t, 1), t--);
}
function b(e) {
let t = !0;
if (e.prereqs && e.prereqs.length > 0)
for (let a = 0; a < e.prereqs.length; ++a) {
const r = n.a[e.prereqs[a]];
if (null != r) {
if (!1 === r.owned) {
t = !1;
for (let e = 0; e < u.a.queuedAugmentations.length; ++e)
if (u.a.queuedAugmentations[e].name === r.name) {
t = !0;
break;
}
}
} else console.error("Invalid prereq Augmentation " + e.prereqs[a]);
}
return t;
}
function E(e, t, a = !1) {
const l = t.getInfo();
if (b(e))
if (0 !== e.baseCost && u.a.money.lt(e.baseCost * l.augmentationPriceMult)) {
const t = "You don't have enough money to purchase " + e.name;
if (a) return t;
Object(p.a)(t);
} else if (t.playerReputation < e.baseRepRequirement) {
const t = "You don't have enough faction reputation to purchase " + e.name;
if (a) return t;
Object(p.a)(t);
} else if (0 === e.baseCost || u.a.money.gte(e.baseCost * l.augmentationPriceMult)) {
const t = new r.a(e.name);
if (
(e.name == i.a.NeuroFluxGovernor && (t.level = v()),
u.a.queuedAugmentations.push(t),
u.a.loseMoney(e.baseCost * l.augmentationPriceMult),
e.name == i.a.NeuroFluxGovernor)
) {
let t = v();
--t;
const a = Math.pow(s.a.NeuroFluxGovernorLevelMult, t);
(e.baseRepRequirement = 500 * a * o.a.AugmentationRepCost),
(e.baseCost = 75e4 * a * o.a.AugmentationMoneyCost);
for (let t = 0; t < u.a.queuedAugmentations.length - 1; ++t)
e.baseCost *= s.a.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][d.a[11]];
}
for (const e in n.a)
n.a.hasOwnProperty(e) && (n.a[e].baseCost *= s.a.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][d.a[11]]);
if (a) return "You purchased " + e.name;
m.a.SuppressBuyAugmentationConfirmation ||
Object(p.a)(
"You purchased " +
e.name +
". It's enhancements will not take effect until they are installed. To install your augmentations, go to the 'Augmentations' tab on the left-hand navigation menu. Purchasing additional augmentations will now be more expensive.",
);
} else
Object(p.a)(
"Hmm, something went wrong when trying to purchase an Augmentation. Please report this to the game developer with an explanation of how to reproduce this.",
);
else {
const t = "You must first purchase or install " + e.prereqs.join(",") + " before you can purchase this one.";
if (a) return t;
Object(p.a)(t);
}
return "";
}
function v() {
let e = 0;
for (let t = 0; t < u.a.augmentations.length; ++t)
u.a.augmentations[t].name === i.a.NeuroFluxGovernor && (e = u.a.augmentations[t].level);
for (let t = 0; t < u.a.queuedAugmentations.length; ++t)
u.a.queuedAugmentations[t].name == i.a.NeuroFluxGovernor && ++e;
return e + 1;
}
function k(e) {
for (const t in c.a) {
if (t === u.a.currentWorkFactionName) continue;
if (!c.a.hasOwnProperty(t)) continue;
const a = c.a[t];
if (!a.isMember) continue;
if (!a.getInfo().offersWork()) continue;
if (u.a.getGangName() === t) continue;
const n = Math.min(0.1, a.favor / 1e3 + 0.01),
r = Object(h.c)(u.a, a),
i = Object(h.b)(u.a, a),
s = Object(h.a)(u.a, a),
l = Math.max(r * n, i * n, s * n, 1 / 120);
a.playerReputation += l * e * u.a.faction_rep_mult * o.a.FactionPassiveRepGain;
}
}
},
function (e, t, a) {
"use strict";
function n(e) {
return "string" == typeof e || e instanceof String;
}
a.d(t, "a", function () {
return n;
});
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(0),
r = a(4),
i = a(131),
o = a(155);
const s = Object(i.a)((e) =>
Object(o.a)({ unbuyable: { color: e.palette.action.disabled }, money: { color: e.colors.money } }),
);
function l(e) {
const t = s();
return e.corp.funds.gt(e.money)
? n.createElement("span", { className: t.money }, r.a.formatMoney(e.money))
: n.createElement("span", { className: t.unbuyable }, r.a.formatMoney(e.money));
}
},
,
,
function (e, t, a) {
"use strict";
function n() {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (e) {
const t = (16 * Math.random()) | 0;
return ("x" == e ? t : (3 & t) | 8).toString(16);
});
}
a.d(t, "a", function () {
return r;
});
class r {
constructor() {
var e, t, a;
(a = {}),
(t = "subscribers") in (e = this)
? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 })
: (e[t] = a);
}
subscribe(e) {
let t = n();
for (; void 0 !== this.subscribers[t]; ) t = n();
return (
(this.subscribers[t] = e),
() => {
delete this.subscribers[t];
}
);
}
emit(...e) {
for (const t in this.subscribers) {
const a = this.subscribers[t];
void 0 !== a && a(...e);
}
}
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(21);
function r(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class i {
constructor(e = "", t = "") {
r(this, "filename", ""),
r(this, "msg", ""),
r(this, "recvd", !1),
(this.filename = e),
(this.msg = t),
(this.recvd = !1);
}
toJSON() {
return Object(n.b)("Message", this);
}
static fromJSON(e) {
return Object(n.a)(i, e.data);
}
}
n.c.constructors.Message = i;
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
BladesIntuition: "Blade's Intuition",
Cloak: "Cloak",
Marksman: "Marksman",
WeaponProficiency: "Weapon Proficiency",
ShortCircuit: "Short-Circuit",
DigitalObserver: "Digital Observer",
Tracer: "Tracer",
Overclock: "Overclock",
Reaper: "Reaper",
EvasiveSystem: "Evasive System",
Datamancer: "Datamancer",
CybersEdge: "Cyber's Edge",
HandsOfMidas: "Hands of Midas",
Hyperdrive: "Hyperdrive",
};
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
}),
a.d(t, "b", function () {
return i;
});
var n = a(0);
const r = { Gang: a.n(n).a.createContext({}) },
i = () => Object(n.useContext)(r.Gang);
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return c;
});
var n = a(262),
r = a(182),
i = a(255),
o = a(316),
s = a(24),
l = a(278);
function c(e, t, a) {
if (((null != a && "boolean" == typeof a) || (a = !0), e instanceof n.a)) return m(e), !0;
if (e instanceof o.a && "string" == typeof t) {
const n = u(e.pid, a);
if (n) return n;
for (const n of r.a.values())
if (n.name == e.filename && n.hostname == t && Object(l.a)(n.args, e.args)) return m(n, a), !0;
return !1;
}
return "number" == typeof e
? u(e, a)
: (console.error("killWorkerScript() called with invalid argument:"), console.error(e), !1);
}
function u(e, t = !0) {
const a = r.a.get(e);
return a instanceof n.a && (m(a, t), !0);
}
function m(e, t = !0) {
(e.env.stopFlag = !0),
(function (e) {
e instanceof n.a && e.delay && (clearTimeout(e.delay), e.delayResolve && e.delayResolve());
})(e),
(function (e, t = !0) {
if (!(e instanceof n.a))
return console.error("Invalid argument passed into removeWorkerScript():"), void console.error(e);
{
const a = e.hostname,
n = e.name,
o = Object(s.d)(a);
if (null == o) return void console.error("Could not find server on which this script is running: " + a);
for (let t = 0; t < o.runningScripts.length; ++t) {
const a = o.runningScripts[t];
if (a.filename === n && Object(l.a)(a.args, e.args)) {
o.runningScripts.splice(t, 1);
break;
}
}
o.ramUsed = 0;
for (const e of o.runningScripts) o.ramUsed += e.ramUsage * e.threads;
r.a.delete(e.pid) ||
(console.warn("removeWorkerScript() called with WorkerScript that wasn't in the global map:"),
console.warn(e)),
t && i.a.emit();
}
})(e, t);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return s;
});
var n = a(21),
r = a(30);
const i = {
b: !0,
initPrice: 1e4,
marketCap: 1e12,
mv: 1,
name: "",
otlkMag: 0,
spreadPerc: 0,
shareTxForMovement: 1e6,
symbol: "",
};
function o(e) {
let t;
switch (typeof e) {
case "number":
return e;
case "object": {
const a = e;
t = Object(r.a)(a.min, a.max);
break;
}
default:
throw Error(`Do not know how to convert the type '${typeof e}' to a number`);
}
return "object" == typeof e && "number" == typeof e.divisor ? t / e.divisor : t;
}
class s {
constructor(e = i) {
(this.name = e.name),
(this.symbol = e.symbol),
(this.price = o(e.initPrice)),
(this.lastPrice = this.price),
(this.playerShares = 0),
(this.playerAvgPx = 0),
(this.playerShortShares = 0),
(this.playerAvgShortPx = 0),
(this.mv = o(e.mv)),
(this.b = e.b),
(this.otlkMag = e.otlkMag),
(this.otlkMagForecast = this.getAbsoluteForecast()),
(this.cap = Object(r.a)(1e3 * this.price, 25e3 * this.price)),
(this.spreadPerc = o(e.spreadPerc)),
(this.shareTxForMovement = o(e.shareTxForMovement)),
(this.shareTxUntilMovement = this.shareTxForMovement);
const t = e.marketCap / this.price;
this.totalShares = 1e5 * Math.round(t / 1e5);
this.maxShares = 1e5 * Math.round((0.2 * this.totalShares) / 1e5);
}
changeForecastForecast(e) {
(this.otlkMagForecast = e),
this.otlkMagForecast > 100
? (this.otlkMagForecast = 100)
: this.otlkMagForecast < 0 && (this.otlkMagForecast = 0);
}
changePrice(e) {
(this.lastPrice = this.price), (this.price = e);
}
cycleForecast(e = 0.1) {
const t = this.getForecastIncreaseChance();
Math.random() < t
? this.b
? (this.otlkMag += e)
: (this.otlkMag -= e)
: this.b
? (this.otlkMag -= e)
: (this.otlkMag += e),
(this.otlkMag = Math.min(this.otlkMag, 50)),
this.otlkMag < 0 && ((this.otlkMag *= -1), (this.b = !this.b));
}
cycleForecastForecast(e = 0.1) {
Math.random() < 0.5
? this.changeForecastForecast(this.otlkMagForecast + e)
: this.changeForecastForecast(this.otlkMagForecast - e);
}
flipForecastForecast() {
const e = this.otlkMagForecast - 50;
this.otlkMagForecast = 50 + -1 * e;
}
getAbsoluteForecast() {
return this.b ? 50 + this.otlkMag : 50 - this.otlkMag;
}
getAskPrice() {
return this.price * (1 + this.spreadPerc / 100);
}
getBidPrice() {
return this.price * (1 - this.spreadPerc / 100);
}
getForecastIncreaseChance() {
const e = this.otlkMagForecast - this.getAbsoluteForecast();
return (50 + Math.min(Math.max(e, -45), 45)) / 100;
}
influenceForecast(e) {
this.otlkMag > 5 && (this.otlkMag = Math.max(5, this.otlkMag - e));
}
influenceForecastForecast(e) {
this.otlkMagForecast > 50
? ((this.otlkMagForecast -= e), (this.otlkMagForecast = Math.max(50, this.otlkMagForecast)))
: this.otlkMagForecast < 50 &&
((this.otlkMagForecast += e), (this.otlkMagForecast = Math.min(50, this.otlkMagForecast)));
}
toJSON() {
return Object(n.b)("Stock", this);
}
static fromJSON(e) {
return Object(n.a)(s, e.data);
}
}
n.c.constructors.Stock = s;
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {};
},
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return g;
});
var n = a(0),
r = a.n(n),
i = a(511),
o = a.n(i),
s = a(849),
l = a.n(s),
c = a(98),
u = a(512),
m = a.n(u),
h = a(506),
d = a.n(h),
p = a(80),
f = a(29);
function g(e) {
const [t, a] = Object(n.useState)("");
const { label: i, placeholder: s, add: u, subtract: h, reset: g, tons: y } = e;
return r.a.createElement(
r.a.Fragment,
null,
r.a.createElement(p.a, {
label: i,
value: t,
onChange: function (e) {
"" === e.target.value ? a("") : a(parseFloat(e.target.value));
},
placeholder: s,
type: "number",
InputProps: {
startAdornment: r.a.createElement(
r.a.Fragment,
null,
r.a.createElement(
f.a,
{ title: "Add a lot" },
r.a.createElement(
c.a,
{ onClick: y, size: "large" },
r.a.createElement(d.a, { style: { transform: "rotate(-90deg)" } }),
),
),
r.a.createElement(
f.a,
{ title: "Add" },
r.a.createElement(
c.a,
{ onClick: () => u("string" != typeof t ? t : 0), size: "large" },
r.a.createElement(o.a, null),
),
),
),
endAdornment: r.a.createElement(
r.a.Fragment,
null,
r.a.createElement(
f.a,
{ title: "Remove" },
r.a.createElement(
c.a,
{ onClick: () => h("string" != typeof t ? t : 0), size: "large" },
r.a.createElement(l.a, null),
),
),
r.a.createElement(
f.a,
{ title: "Reset" },
r.a.createElement(c.a, { onClick: g, size: "large" }, r.a.createElement(m.a, null)),
),
),
},
}),
);
}
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
}),
a.d(t, "b", function () {
return i;
}),
a.d(t, "c", function () {
return o;
}),
a.d(t, "d", function () {
return s;
}),
a.d(t, "f", function () {
return l;
}),
a.d(t, "e", function () {
return c;
}),
a.d(t, "g", function () {
return m;
}),
a.d(t, "h", function () {
return h;
});
var n = a(115);
let r = {},
i = {};
function o(e) {
r = "" === e ? {} : JSON.parse(e);
}
function s(e) {
i = "" === e ? {} : JSON.parse(e);
}
function l() {
for (const e in r) r.hasOwnProperty(e) && n.a.print("alias " + e + "=" + r[e]);
for (const e in i) i.hasOwnProperty(e) && n.a.print("global alias " + e + "=" + i[e]);
}
function c(e, t = !1) {
const a = e.match(/^([_|\w|!|%|,|@]+)="(.+)"$/);
return (
null != a &&
3 == a.length &&
(t
? (function (e, t) {
e in r && delete r[e];
i[e] = t.trim();
})(a[1], a[2])
: (function (e, t) {
e in i && delete i[e];
r[e] = t.trim();
})(a[1], a[2]),
!0)
);
}
function u(e) {
return i.hasOwnProperty(e) ? i[e] : null;
}
function m(e) {
return r.hasOwnProperty(e) ? (delete r[e], !0) : !!i.hasOwnProperty(e) && (delete i[e], !0);
}
function h(e) {
const t = e.split(" ");
if (t.length > 0) {
if ("unalias" === t[0] || "alias" === t[0]) return t.join(" ");
let e = !0,
o = 0;
for (; e && o < 10; ) {
var a;
o++, (e = !1);
const s =
null === ((i = t[0]), (a = r.hasOwnProperty(i) ? r[i] : null)) || void 0 === a ? void 0 : a.split(" ");
null != s && ((e = !0), t.splice(0, 1, ...s));
for (let a = 0; a < t.length; ++a) {
var n;
const r = null === (n = u(t[a])) || void 0 === n ? void 0 : n.split(" ");
null != r && ((e = !0), t.splice(a, 1, ...r), (a += r.length - 1));
}
}
}
var i;
return t.join(" ");
}
},
function (e, t, a) {
"use strict";
a.d(t, "c", function () {
return i;
}),
a.d(t, "b", function () {
return o;
}),
a.d(t, "d", function () {
return s;
}),
a.d(t, "a", function () {
return l;
});
var n = a(118),
r = a(24);
function i(e, t) {
return new Promise(function (a) {
(t.delay = window.setTimeout(() => {
(t.delay = null), a();
}, e)),
(t.delayResolve = a);
});
}
function o(e, t) {
const a = Object(r.d)(e.hostname);
if (null == a) throw new Error("WorkerScript constructed with invalid server ip: " + e.hostname);
return "|" + a.hostname + "|" + e.name + "|" + t;
}
function s(e, t, a) {
const n = e.scriptRef.threads;
if (!a) return isNaN(n) || n < 1 ? 1 : n;
const r = 0 | a;
if (isNaN(a) || r < 1)
throw o(e, `Invalid thread count passed to ${t}: ${a}. Threads must be a positive number.`);
if (a > n) throw o(e, `Too many threads requested by ${t}. Requested: ${a}. Has: ${n}.`);
return r;
}
function l(e) {
if (!Object(n.a)(e)) return !1;
return 4 == e.split("|").length;
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
class n {
constructor(e, t, a) {
(this.title = e), (this.fn = t), (this.txt = a);
}
}
},
,
,
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return s;
});
var n = a(0),
r = a.n(n),
i = a(1),
o = a(29);
function s(e) {
const [t, a] = Object(n.useState)(!1);
return r.a.createElement(
o.a,
{ open: t, title: r.a.createElement(i.a, null, "Copied!") },
r.a.createElement(
i.a,
{
variant: e.variant,
color: e.color,
onClick: function () {
const t = document.createElement("textarea");
(t.value = e.value),
document.body.appendChild(t),
t.select(),
t.setSelectionRange(0, 1e10),
document.execCommand("copy"),
document.body.removeChild(t),
a(!0),
setTimeout(() => a(!1), 1e3);
},
},
e.value,
),
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "e", function () {
return S;
}),
a.d(t, "d", function () {
return w;
}),
a.d(t, "c", function () {
return v;
}),
a.d(t, "a", function () {
return _;
}),
a.d(t, "b", function () {
return C;
});
var n = a(36),
r = a(20),
i = a(313),
o = a(6),
s = a(8),
l = a(7),
c = a(25),
u = a(2),
m = a(312),
h = a(68),
d = a(62),
p = a(15),
f = a(793),
g = a(314),
y = a(0),
b = a.n(y);
function E(e) {
const t = e.name;
r.a[t] = e;
}
function v() {
for (const e in c.a) c.a.hasOwnProperty(e) && (c.a[e].augmentations = []);
Object(f.a)(r.a);
const e = (function () {
const e = [
{
bonuses: {
hacking_chance_mult: 1.25,
hacking_speed_mult: 1.1,
hacking_money_mult: 1.25,
hacking_grow_mult: 1.1,
},
description:
"Increases the player's hacking chance by 25%.
Increases the player's hacking speed by 10%.
Increases the amount of money the player's gains from hacking by 25%.
Improves grow() by 10%.",
},
{
bonuses: { hacking_mult: 1.15, hacking_exp_mult: 2 },
description:
"Increases the player's hacking skill by 15%.
Increases the player's hacking experience gain rate by 100%.",
},
{
bonuses: {
strength_mult: 1.25,
strength_exp_mult: 2,
defense_mult: 1.25,
defense_exp_mult: 2,
dexterity_mult: 1.25,
dexterity_exp_mult: 2,
agility_mult: 1.25,
agility_exp_mult: 2,
},
description:
"Increases all of the player's combat stats by 25%.
Increases all of the player's combat stat experience gain rate by 100%.",
},
{
bonuses: { charisma_mult: 1.5, charisma_exp_mult: 2 },
description:
"This augmentation increases the player's charisma by 50%.
Increases the player's charisma experience gain rate by 100%.",
},
{
bonuses: {
hacknet_node_money_mult: 1.2,
hacknet_node_purchase_cost_mult: 0.85,
hacknet_node_ram_cost_mult: 0.85,
hacknet_node_core_cost_mult: 0.85,
hacknet_node_level_cost_mult: 0.85,
},
description:
"Increases the amount of money produced by Hacknet Nodes by 20%.
Decreases all costs related to Hacknet Node by 15%.",
},
{
bonuses: { company_rep_mult: 1.25, faction_rep_mult: 1.15, work_money_mult: 1.7 },
description:
"Increases the amount of money the player gains from working by 70%.
Increases the amount of reputation the player gains when working for a company by 25%.
Increases the amount of reputation the player gains for a faction by 15%.",
},
{
bonuses: { crime_success_mult: 2, crime_money_mult: 2 },
description:
"Increases the player's crime success rate by 100%.
Increases the amount of money the player gains from crimes by 100%.",
},
],
t = new g.b(Math.floor(u.a.lastUpdate / 36e5));
for (let e = 0; e < 5; e++) t.step();
return e[Math.floor(e.length * t.random())];
})(),
t = {
name: o.a.UnstableCircadianModulator,
moneyCost: 5e9,
repCost: 362500,
info: "An experimental nanobot injection. Its unstable nature leads to unpredictable results based on your circadian rhythm.",
};
Object.keys(e.bonuses).forEach((a) => (t[a] = e.bonuses[a]));
const a = new n.a(t);
a.addToFactions(["Speakers for the Dead"]),
C(o.a.UnstableCircadianModulator) && delete r.a[o.a.UnstableCircadianModulator],
E(a);
const i = new n.a({
name: o.a.HemoRecirculator,
moneyCost: 45e6,
repCost: 1e4,
info: "A heart implant that greatly increases the body's ability to effectively use and pump blood.",
strength_mult: 1.08,
defense_mult: 1.08,
agility_mult: 1.08,
dexterity_mult: 1.08,
});
i.addToFactions(["Tetrads", "The Dark Army", "The Syndicate"]),
C(o.a.HemoRecirculator) && delete r.a[o.a.HemoRecirculator],
E(i);
const m = new n.a({
name: o.a.Targeting1,
moneyCost: 15e6,
repCost: 5e3,
info: "A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates and enhances balance and hand-eye coordination.",
dexterity_mult: 1.1,
});
m.addToFactions([
"Slum Snakes",
"The Dark Army",
"The Syndicate",
"Sector-12",
"Ishima",
"OmniTek Incorporated",
"KuaiGong International",
"Blade Industries",
]),
C(o.a.Targeting1) && delete r.a[o.a.Targeting1],
E(m);
const p = new n.a({
name: o.a.Targeting2,
moneyCost: 425e5,
repCost: 8750,
info: "This upgraded version of the 'Augmented Targeting' implant is capable of augmenting reality by digitally displaying weaknesses and vital signs of threats.",
prereqs: [o.a.Targeting1],
dexterity_mult: 1.2,
});
p.addToFactions([
"The Dark Army",
"The Syndicate",
"Sector-12",
"OmniTek Incorporated",
"KuaiGong International",
"Blade Industries",
]),
C(o.a.Targeting2) && delete r.a[o.a.Targeting2],
E(p);
const y = new n.a({
name: o.a.Targeting3,
moneyCost: 115e6,
repCost: 27500,
info: "The latest version of the 'Augmented Targeting' implant adds the ability to lock-on and track threats.",
prereqs: [o.a.Targeting2],
dexterity_mult: 1.3,
});
y.addToFactions([
"The Dark Army",
"The Syndicate",
"OmniTek Incorporated",
"KuaiGong International",
"Blade Industries",
"The Covenant",
]),
C(o.a.Targeting3) && delete r.a[o.a.Targeting3],
E(y);
const v = new n.a({
name: o.a.SyntheticHeart,
moneyCost: 2875e6,
repCost: 75e4,
info: "This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood more efficiently than an organic heart.",
agility_mult: 1.5,
strength_mult: 1.5,
});
v.addToFactions([
"KuaiGong International",
"Fulcrum Secret Technologies",
"Speakers for the Dead",
"NWO",
"The Covenant",
"Daedalus",
"Illuminati",
]),
C(o.a.SyntheticHeart) && delete r.a[o.a.SyntheticHeart],
E(v);
const _ = new n.a({
name: o.a.SynfibrilMuscle,
repCost: 437500,
moneyCost: 1125e6,
info: "The myofibrils in human muscles are injected with special chemicals that react with the proteins inside the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. Scientists have named these artificially enhanced units 'synfibrils'.",
strength_mult: 1.3,
defense_mult: 1.3,
});
_.addToFactions([
"KuaiGong International",
"Fulcrum Secret Technologies",
"Speakers for the Dead",
"NWO",
"The Covenant",
"Daedalus",
"Illuminati",
"Blade Industries",
]),
C(o.a.SynfibrilMuscle) && delete r.a[o.a.SynfibrilMuscle],
E(_);
const w = new n.a({
name: o.a.CombatRib1,
repCost: 7500,
moneyCost: 2375e4,
info: "The rib cage is augmented to continuously release boosters into the bloodstream which increase the oxygen-carrying capacity of blood.",
strength_mult: 1.1,
defense_mult: 1.1,
});
w.addToFactions([
"Slum Snakes",
"The Dark Army",
"The Syndicate",
"Volhaven",
"Ishima",
"OmniTek Incorporated",
"KuaiGong International",
"Blade Industries",
]),
C(o.a.CombatRib1) && delete r.a[o.a.CombatRib1],
E(w);
const S = new n.a({
name: o.a.CombatRib2,
repCost: 18750,
moneyCost: 65e6,
info: "An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which improve focus and endurance while decreasing reaction time and fatigue.",
prereqs: [o.a.CombatRib1],
strength_mult: 1.14,
defense_mult: 1.14,
});
S.addToFactions([
"The Dark Army",
"The Syndicate",
"Volhaven",
"OmniTek Incorporated",
"KuaiGong International",
"Blade Industries",
]),
C(o.a.CombatRib2) && delete r.a[o.a.CombatRib2],
E(S);
const x = new n.a({
name: o.a.CombatRib3,
repCost: 35e3,
moneyCost: 12e7,
info: "The latest version of the 'Combat Rib' augmentation releases advanced anabolic steroids that improve muscle mass and physical performance while being safe and free of side effects.",
prereqs: [o.a.CombatRib2],
strength_mult: 1.18,
defense_mult: 1.18,
});
x.addToFactions([
"The Dark Army",
"The Syndicate",
"OmniTek Incorporated",
"KuaiGong International",
"Blade Industries",
"The Covenant",
]),
C(o.a.CombatRib3) && delete r.a[o.a.CombatRib3],
E(x);
const O = new n.a({
name: o.a.NanofiberWeave,
repCost: 37500,
moneyCost: 125e6,
info: "Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, which improves its regenerative and extracellular homeostasis abilities.",
strength_mult: 1.2,
defense_mult: 1.2,
});
O.addToFactions([
"Tian Di Hui",
"The Syndicate",
"The Dark Army",
"Speakers for the Dead",
"Blade Industries",
"Fulcrum Secret Technologies",
"OmniTek Incorporated",
]),
C(o.a.NanofiberWeave) && delete r.a[o.a.NanofiberWeave],
E(O);
const T = new n.a({
name: o.a.SubdermalArmor,
repCost: 875e3,
moneyCost: 325e7,
info: "The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. The material is implanted underneath the skin, and is the most advanced form of defensive enhancement that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to mitigate damage from any fire or electrical traumas.",
defense_mult: 2.2,
});
T.addToFactions(["The Syndicate", "Fulcrum Secret Technologies", "Illuminati", "Daedalus", "The Covenant"]),
C(o.a.SubdermalArmor) && delete r.a[o.a.SubdermalArmor],
E(T);
const M = new n.a({
name: o.a.WiredReflexes,
repCost: 1250,
moneyCost: 25e5,
info: "Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, supercharging the spread of neural signals and increasing reflex speed.",
agility_mult: 1.05,
dexterity_mult: 1.05,
});
M.addToFactions([
"Tian Di Hui",
"Slum Snakes",
"Sector-12",
"Volhaven",
"Aevum",
"Ishima",
"The Syndicate",
"The Dark Army",
"Speakers for the Dead",
]),
C(o.a.WiredReflexes) && delete r.a[o.a.WiredReflexes],
E(M);
const R = new n.a({
name: o.a.GrapheneBoneLacings,
repCost: 1125e3,
moneyCost: 425e7,
info: "Graphene is grafted and fused into the skeletal structure, enhancing bone density and tensile strength.",
strength_mult: 1.7,
defense_mult: 1.7,
});
R.addToFactions(["Fulcrum Secret Technologies", "The Covenant"]),
C(o.a.GrapheneBoneLacings) && delete r.a[o.a.GrapheneBoneLacings],
E(R);
const P = new n.a({
name: o.a.BionicSpine,
repCost: 45e3,
moneyCost: 125e6,
info: "The spine is reconstructed using plasteel and carbon fibers. It is now capable of stimulating and regulating neural signals passing through the spinal cord, improving senses and reaction speed. The 'Bionic Spine' also interfaces with all other 'Bionic' implants.",
strength_mult: 1.15,
defense_mult: 1.15,
agility_mult: 1.15,
dexterity_mult: 1.15,
});
P.addToFactions([
"Speakers for the Dead",
"The Syndicate",
"KuaiGong International",
"OmniTek Incorporated",
"Blade Industries",
]),
C(o.a.BionicSpine) && delete r.a[o.a.BionicSpine],
E(P);
const A = new n.a({
name: o.a.GrapheneBionicSpine,
repCost: 1625e3,
moneyCost: 6e9,
info: "An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene which enhances durability and supercharges all body functions.",
prereqs: [o.a.BionicSpine],
strength_mult: 1.6,
defense_mult: 1.6,
agility_mult: 1.6,
dexterity_mult: 1.6,
});
A.addToFactions(["Fulcrum Secret Technologies", "ECorp"]),
C(o.a.GrapheneBionicSpine) && delete r.a[o.a.GrapheneBionicSpine],
E(A);
const N = new n.a({
name: o.a.BionicLegs,
repCost: 15e4,
moneyCost: 375e6,
info: "Cybernetic legs, created from plasteel and carbon fibers, enhance running speed.",
agility_mult: 1.6,
});
N.addToFactions([
"Speakers for the Dead",
"The Syndicate",
"KuaiGong International",
"OmniTek Incorporated",
"Blade Industries",
]),
C(o.a.BionicLegs) && delete r.a[o.a.BionicLegs],
E(N);
const I = new n.a({
name: o.a.GrapheneBionicLegs,
repCost: 75e4,
moneyCost: 45e8,
info: "An upgrade to the 'Bionic Legs' augmentation. The legs are fused with graphene, greatly enhancing jumping ability.",
prereqs: [o.a.BionicLegs],
agility_mult: 2.5,
});
I.addToFactions(["MegaCorp", "ECorp", "Fulcrum Secret Technologies"]),
C(o.a.GrapheneBionicLegs) && delete r.a[o.a.GrapheneBionicLegs],
E(I);
const F = new n.a({
name: o.a.SpeechProcessor,
repCost: 7500,
moneyCost: 5e7,
info: "A cochlear implant with an embedded computer that analyzes incoming speech. The embedded computer processes characteristics of incoming speech, such as tone and inflection, to pick up on subtle cues and aid in social interactions.",
charisma_mult: 1.2,
});
F.addToFactions([
"Tian Di Hui",
"Chongqing",
"Sector-12",
"New Tokyo",
"Aevum",
"Ishima",
"Volhaven",
"Silhouette",
]),
C(o.a.SpeechProcessor) && delete r.a[o.a.SpeechProcessor],
E(F);
const j = new n.a({
name: o.a.TITN41Injection,
repCost: 25e3,
moneyCost: 19e7,
info: "TITN is a series of viruses that targets and alters the sequences of human DNA in genes that control personality. The TITN-41 strain alters these genes so that the subject becomes more outgoing and socialable.",
charisma_mult: 1.15,
charisma_exp_mult: 1.15,
});
j.addToFactions(["Silhouette"]), C(o.a.TITN41Injection) && delete r.a[o.a.TITN41Injection], E(j);
const B = new n.a({
name: o.a.EnhancedSocialInteractionImplant,
repCost: 375e3,
moneyCost: 1375e6,
info: "A cranial implant that greatly assists in the user's ability to analyze social situations and interactions. The system uses a wide variety of factors such as facial expressions, body language, and the voice tone, and inflection to determine the best course of action during socialsituations. The implant also uses deep learning software to continuously learn new behaviorpatterns and how to best respond.",
charisma_mult: 1.6,
charisma_exp_mult: 1.6,
});
B.addToFactions(["Bachman & Associates", "NWO", "Clarke Incorporated", "OmniTek Incorporated", "Four Sigma"]),
C(o.a.EnhancedSocialInteractionImplant) && delete r.a[o.a.EnhancedSocialInteractionImplant],
E(B);
const D = new n.a({
name: o.a.BitWire,
repCost: 3750,
moneyCost: 1e7,
info: "A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing capabilities.",
hacking_mult: 1.05,
});
D.addToFactions(["CyberSec", "NiteSec"]), C(o.a.BitWire) && delete r.a[o.a.BitWire], E(D);
const G = new n.a({
name: o.a.ArtificialBioNeuralNetwork,
repCost: 275e3,
moneyCost: 3e9,
info: "A network consisting of millions of nanoprocessors is embedded into the brain. The network is meant to mimic the way a biological brain solves a problem, with each nanoprocessor acting similar to the way a neuron would in a neural network. However, these nanoprocessors are programmed to perform computations much faster than organic neurons, allowing the user to solve much more complex problems at a much faster rate.",
hacking_speed_mult: 1.03,
hacking_money_mult: 1.15,
hacking_mult: 1.12,
});
G.addToFactions(["BitRunners", "Fulcrum Secret Technologies"]),
C(o.a.ArtificialBioNeuralNetwork) && delete r.a[o.a.ArtificialBioNeuralNetwork],
E(G);
const L = new n.a({
name: o.a.ArtificialSynapticPotentiation,
repCost: 6250,
moneyCost: 8e7,
info: "The body is injected with a chemical that artificially induces synaptic potentiation, otherwise known as the strengthening of synapses. This results in enhanced cognitive abilities.",
hacking_speed_mult: 1.02,
hacking_chance_mult: 1.05,
hacking_exp_mult: 1.05,
});
L.addToFactions(["The Black Hand", "NiteSec"]),
C(o.a.ArtificialSynapticPotentiation) && delete r.a[o.a.ArtificialSynapticPotentiation],
E(L);
const W = new n.a({
name: o.a.EnhancedMyelinSheathing,
repCost: 1e5,
moneyCost: 1375e6,
info: "Electrical signals are used to induce a new, artificial form of myelinogenesis in the human body. This process results in the proliferation of new, synthetic myelin sheaths in the nervous system. These myelin sheaths can propogate neuro-signals much faster than their organic counterparts, leading to greater processing speeds and better brain function.",
hacking_speed_mult: 1.03,
hacking_exp_mult: 1.1,
hacking_mult: 1.08,
});
W.addToFactions(["Fulcrum Secret Technologies", "BitRunners", "The Black Hand"]),
C(o.a.EnhancedMyelinSheathing) && delete r.a[o.a.EnhancedMyelinSheathing],
E(W);
const H = new n.a({
name: o.a.SynapticEnhancement,
repCost: 2e3,
moneyCost: 75e5,
info: "A small cranial implant that continuously uses weak electrical signals to stimulate the brain and induce stronger synaptic activity. This improves the user's cognitive abilities.",
hacking_speed_mult: 1.03,
});
H.addToFactions(["CyberSec", "Aevum"]), C(o.a.SynapticEnhancement) && delete r.a[o.a.SynapticEnhancement], E(H);
const U = new n.a({
name: o.a.NeuralRetentionEnhancement,
repCost: 2e4,
moneyCost: 25e7,
info: "Chemical injections are used to permanently alter and strengthen the brain's neuronal circuits, strengthening the ability to retain information.",
hacking_exp_mult: 1.25,
});
U.addToFactions(["NiteSec"]),
C(o.a.NeuralRetentionEnhancement) && delete r.a[o.a.NeuralRetentionEnhancement],
E(U);
const q = new n.a({
name: o.a.DataJack,
repCost: 112500,
moneyCost: 45e7,
info: "A brain implant that provides an interface for direct, wireless communication between a computer's main memory and the mind. This implant allows the user to not only access a computer's memory, but also alter and delete it.",
hacking_money_mult: 1.25,
});
q.addToFactions(["BitRunners", "The Black Hand", "NiteSec", "Chongqing", "New Tokyo"]),
C(o.a.DataJack) && delete r.a[o.a.DataJack],
E(q);
const K = new n.a({
name: o.a.ENM,
repCost: 15e3,
moneyCost: 25e7,
info: "A thin device embedded inside the arm containing a wireless module capable of connecting to nearby networks. Once connected, the Netburner Module is capable of capturing and processing all of the traffic on that network. By itself, the Embedded Netburner Module does not do much, but a variety of very powerful upgrades can be installed that allow you to fully control the traffic on a network.",
hacking_mult: 1.08,
});
K.addToFactions([
"BitRunners",
"The Black Hand",
"NiteSec",
"ECorp",
"MegaCorp",
"Fulcrum Secret Technologies",
"NWO",
"Blade Industries",
]),
C(o.a.ENM) && delete r.a[o.a.ENM],
E(K);
const $ = new n.a({
name: o.a.ENMCore,
repCost: 25e4,
moneyCost: 25e8,
info: "The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgrade allows the Embedded Netburner Module to generate its own data on a network.",
prereqs: [o.a.ENM],
hacking_speed_mult: 1.03,
hacking_money_mult: 1.1,
hacking_chance_mult: 1.03,
hacking_exp_mult: 1.07,
hacking_mult: 1.07,
});
$.addToFactions([
"BitRunners",
"The Black Hand",
"ECorp",
"MegaCorp",
"Fulcrum Secret Technologies",
"NWO",
"Blade Industries",
]),
C(o.a.ENMCore) && delete r.a[o.a.ENMCore],
E($);
const z = new n.a({
name: o.a.ENMCoreV2,
repCost: 1e6,
moneyCost: 45e8,
info: "The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgraded firmware allows the Embedded Netburner Module to control information on a network by re-routing traffic, spoofing IP addresses, and altering the data inside network packets.",
prereqs: [o.a.ENMCore],
hacking_speed_mult: 1.05,
hacking_money_mult: 1.3,
hacking_chance_mult: 1.05,
hacking_exp_mult: 1.15,
hacking_mult: 1.08,
});
z.addToFactions([
"BitRunners",
"ECorp",
"MegaCorp",
"Fulcrum Secret Technologies",
"NWO",
"Blade Industries",
"OmniTek Incorporated",
"KuaiGong International",
]),
C(o.a.ENMCoreV2) && delete r.a[o.a.ENMCoreV2],
E(z);
const Y = new n.a({
name: o.a.ENMCoreV3,
repCost: 175e4,
moneyCost: 75e8,
info: "The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into any device on a network.",
prereqs: [o.a.ENMCoreV2],
hacking_speed_mult: 1.05,
hacking_money_mult: 1.4,
hacking_chance_mult: 1.1,
hacking_exp_mult: 1.25,
hacking_mult: 1.1,
});
Y.addToFactions([
"ECorp",
"MegaCorp",
"Fulcrum Secret Technologies",
"NWO",
"Daedalus",
"The Covenant",
"Illuminati",
]),
C(o.a.ENMCoreV3) && delete r.a[o.a.ENMCoreV3],
E(Y);
const V = new n.a({
name: o.a.ENMAnalyzeEngine,
repCost: 625e3,
moneyCost: 6e9,
info: "Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster that vastly outperforms the Netburner Module's native single-core processor.",
prereqs: [o.a.ENM],
hacking_speed_mult: 1.1,
});
V.addToFactions([
"ECorp",
"MegaCorp",
"Fulcrum Secret Technologies",
"NWO",
"Daedalus",
"The Covenant",
"Illuminati",
]),
C(o.a.ENMAnalyzeEngine) && delete r.a[o.a.ENMAnalyzeEngine],
E(V);
const J = new n.a({
name: o.a.ENMDMA,
repCost: 1e6,
moneyCost: 7e9,
info: "This implant installs a Direct Memory Access (DMA) controller into the Embedded Netburner Module. This allows the Module to send and receive data directly to and from the main memory of devices on a network.",
prereqs: [o.a.ENM],
hacking_money_mult: 1.4,
hacking_chance_mult: 1.2,
});
J.addToFactions([
"ECorp",
"MegaCorp",
"Fulcrum Secret Technologies",
"NWO",
"Daedalus",
"The Covenant",
"Illuminati",
]),
C(o.a.ENMDMA) && delete r.a[o.a.ENMDMA],
E(J);
const X = new n.a({
name: o.a.Neuralstimulator,
repCost: 5e4,
moneyCost: 3e9,
info: "A cranial implant that intelligently stimulates certain areas of the brain in order to improve cognitive functions.",
hacking_speed_mult: 1.02,
hacking_chance_mult: 1.1,
hacking_exp_mult: 1.12,
});
X.addToFactions([
"The Black Hand",
"Chongqing",
"Sector-12",
"New Tokyo",
"Aevum",
"Ishima",
"Volhaven",
"Bachman & Associates",
"Clarke Incorporated",
"Four Sigma",
]),
C(o.a.Neuralstimulator) && delete r.a[o.a.Neuralstimulator],
E(X);
const Q = new n.a({
name: o.a.NeuralAccelerator,
repCost: 2e5,
moneyCost: 175e7,
info: "A microprocessor that accelerates the processing speed of biological neural networks. This is a cranial implant that is embedded inside the brain.",
hacking_mult: 1.1,
hacking_exp_mult: 1.15,
hacking_money_mult: 1.2,
});
Q.addToFactions(["BitRunners"]), C(o.a.NeuralAccelerator) && delete r.a[o.a.NeuralAccelerator], E(Q);
const Z = new n.a({
name: o.a.CranialSignalProcessorsG1,
repCost: 1e4,
moneyCost: 7e7,
info: "The first generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.",
hacking_speed_mult: 1.01,
hacking_mult: 1.05,
});
Z.addToFactions(["CyberSec"]),
C(o.a.CranialSignalProcessorsG1) && delete r.a[o.a.CranialSignalProcessorsG1],
E(Z);
const ee = new n.a({
name: o.a.CranialSignalProcessorsG2,
repCost: 18750,
moneyCost: 125e6,
info: "The second generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.",
prereqs: [o.a.CranialSignalProcessorsG1],
hacking_speed_mult: 1.02,
hacking_chance_mult: 1.05,
hacking_mult: 1.07,
});
ee.addToFactions(["CyberSec", "NiteSec"]),
C(o.a.CranialSignalProcessorsG2) && delete r.a[o.a.CranialSignalProcessorsG2],
E(ee);
const te = new n.a({
name: o.a.CranialSignalProcessorsG3,
repCost: 5e4,
moneyCost: 55e7,
info: "The third generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.",
prereqs: [o.a.CranialSignalProcessorsG2],
hacking_speed_mult: 1.02,
hacking_money_mult: 1.15,
hacking_mult: 1.09,
});
te.addToFactions(["NiteSec", "The Black Hand", "BitRunners"]),
C(o.a.CranialSignalProcessorsG3) && delete r.a[o.a.CranialSignalProcessorsG3],
E(te);
const ae = new n.a({
name: o.a.CranialSignalProcessorsG4,
repCost: 125e3,
moneyCost: 11e8,
info: "The fourth generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.",
prereqs: [o.a.CranialSignalProcessorsG3],
hacking_speed_mult: 1.02,
hacking_money_mult: 1.2,
hacking_grow_mult: 1.25,
});
ae.addToFactions(["The Black Hand", "BitRunners"]),
C(o.a.CranialSignalProcessorsG4) && delete r.a[o.a.CranialSignalProcessorsG4],
E(ae);
const ne = new n.a({
name: o.a.CranialSignalProcessorsG5,
repCost: 25e4,
moneyCost: 225e7,
info: "The fifth generation of Cranial Signal Processors. Cranial Signal Processors are a set of specialized microprocessors that are attached to neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations so that the brain doesn't have to.",
prereqs: [o.a.CranialSignalProcessorsG4],
hacking_mult: 1.3,
hacking_money_mult: 1.25,
hacking_grow_mult: 1.75,
});
ne.addToFactions(["BitRunners"]),
C(o.a.CranialSignalProcessorsG5) && delete r.a[o.a.CranialSignalProcessorsG5],
E(ne);
const re = new n.a({
name: o.a.NeuronalDensification,
repCost: 187500,
moneyCost: 1375e6,
info: "The brain is surgically re-engineered to have increased neuronal density by decreasing the neuron gap junction. Then, the body is genetically modified to enhance the production and capabilities of its neural stem cells.",
hacking_mult: 1.15,
hacking_exp_mult: 1.1,
hacking_speed_mult: 1.03,
});
re.addToFactions(["Clarke Incorporated"]),
C(o.a.NeuronalDensification) && delete r.a[o.a.NeuronalDensification],
E(re);
const ie = new n.a({
name: o.a.NuoptimalInjectorImplant,
repCost: 5e3,
moneyCost: 2e7,
info: "This torso implant automatically injects nootropic supplements into the bloodstream to improve memory, increase focus, and provide other cognitive enhancements.",
company_rep_mult: 1.2,
});
ie.addToFactions([
"Tian Di Hui",
"Volhaven",
"New Tokyo",
"Chongqing",
"Clarke Incorporated",
"Four Sigma",
"Bachman & Associates",
]),
C(o.a.NuoptimalInjectorImplant) && delete r.a[o.a.NuoptimalInjectorImplant],
E(ie);
const oe = new n.a({
name: o.a.SpeechEnhancement,
repCost: 2500,
moneyCost: 125e5,
info: "An advanced neural implant that improves your speaking abilities, making you more convincing and likable in conversations and overall improving your social interactions.",
company_rep_mult: 1.1,
charisma_mult: 1.1,
});
oe.addToFactions([
"Tian Di Hui",
"Speakers for the Dead",
"Four Sigma",
"KuaiGong International",
"Clarke Incorporated",
"Bachman & Associates",
]),
C(o.a.SpeechEnhancement) && delete r.a[o.a.SpeechEnhancement],
E(oe);
const se = new n.a({
name: o.a.FocusWire,
repCost: 75e3,
moneyCost: 9e8,
info: "A cranial implant that stops procrastination by blocking specific neural pathways in the brain.",
hacking_exp_mult: 1.05,
strength_exp_mult: 1.05,
defense_exp_mult: 1.05,
dexterity_exp_mult: 1.05,
agility_exp_mult: 1.05,
charisma_exp_mult: 1.05,
company_rep_mult: 1.1,
work_money_mult: 1.2,
});
se.addToFactions(["Bachman & Associates", "Clarke Incorporated", "Four Sigma", "KuaiGong International"]),
C(o.a.FocusWire) && delete r.a[o.a.FocusWire],
E(se);
const le = new n.a({
name: o.a.PCDNI,
repCost: 375e3,
moneyCost: 375e7,
info: "Installs a Direct-Neural Interface jack into your arm that is compatible with most computers. Connecting to a computer through this jack allows you to interface with it using the brain's electrochemical signals.",
company_rep_mult: 1.3,
hacking_mult: 1.08,
});
le.addToFactions(["Four Sigma", "OmniTek Incorporated", "ECorp", "Blade Industries"]),
C(o.a.PCDNI) && delete r.a[o.a.PCDNI],
E(le);
const ce = new n.a({
name: o.a.PCDNIOptimizer,
repCost: 5e5,
moneyCost: 45e8,
info: "This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It improves the performance of the interface and gives the user more control options to a connected computer.",
prereqs: [o.a.PCDNI],
company_rep_mult: 1.75,
hacking_mult: 1.1,
});
ce.addToFactions(["Fulcrum Secret Technologies", "ECorp", "Blade Industries"]),
C(o.a.PCDNIOptimizer) && delete r.a[o.a.PCDNIOptimizer],
E(ce);
const ue = new n.a({
name: o.a.PCDNINeuralNetwork,
repCost: 15e5,
moneyCost: 75e8,
info: "This is an additional installation that upgrades the functionality of the PC Direct-Neural Interface augmentation. When connected to a computer, The Neural Network upgrade allows the user to use their own brain's processing power to aid the computer in computational tasks.",
prereqs: [o.a.PCDNI],
company_rep_mult: 2,
hacking_mult: 1.1,
hacking_speed_mult: 1.05,
});
ue.addToFactions(["Fulcrum Secret Technologies"]),
C(o.a.PCDNINeuralNetwork) && delete r.a[o.a.PCDNINeuralNetwork],
E(ue);
const me = new n.a({
name: o.a.ADRPheromone1,
repCost: 3750,
moneyCost: 175e5,
info: "The body is genetically re-engineered so that it produces the ADR-V1 pheromone, an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, triggers feelings of admiration and approval in other people.",
company_rep_mult: 1.1,
faction_rep_mult: 1.1,
});
me.addToFactions(["Tian Di Hui", "The Syndicate", "NWO", "MegaCorp", "Four Sigma"]),
C(o.a.ADRPheromone1) && delete r.a[o.a.ADRPheromone1],
E(me);
const he = new n.a({
name: o.a.ADRPheromone2,
repCost: 62500,
moneyCost: 55e7,
info: "The body is genetically re-engineered so that it produces the ADR-V2 pheromone, which is similar to but more potent than ADR-V1. This pheromone, when excreted, triggers feelings of admiration, approval, and respect in others.",
company_rep_mult: 1.2,
faction_rep_mult: 1.2,
});
he.addToFactions(["Silhouette", "Four Sigma", "Bachman & Associates", "Clarke Incorporated"]),
C(o.a.ADRPheromone2) && delete r.a[o.a.ADRPheromone2],
E(he);
const de = new n.a({
name: o.a.ShadowsSimulacrum,
repCost: 37500,
moneyCost: 4e8,
info: "A crude but functional matter phase-shifter module that is embedded in the brainstem and cerebellum. This augmentation was developed by criminal organizations and allows the user to project and control holographic simulacrums within a large radius. These simulacrums are commonly used for espionage and surveillance work.",
company_rep_mult: 1.15,
faction_rep_mult: 1.15,
});
de.addToFactions(["The Syndicate", "The Dark Army", "Speakers for the Dead"]),
C(o.a.ShadowsSimulacrum) && delete r.a[o.a.ShadowsSimulacrum],
E(de);
const pe = new n.a({
name: o.a.HacknetNodeCPUUpload,
repCost: 3750,
moneyCost: 11e6,
info: "Uploads the architecture and design details of a Hacknet Node's CPU into the brain. This allows the user to engineer custom hardware and software for the Hacknet Node that provides better performance.",
hacknet_node_money_mult: 1.15,
hacknet_node_purchase_cost_mult: 0.85,
});
pe.addToFactions(["Netburners"]), C(o.a.HacknetNodeCPUUpload) && delete r.a[o.a.HacknetNodeCPUUpload], E(pe);
const fe = new n.a({
name: o.a.HacknetNodeCacheUpload,
repCost: 2500,
moneyCost: 55e5,
info: "Uploads the architecture and design details of a Hacknet Node's main-memory cache into the brain. This allows the user to engineer custom cache hardware for the Hacknet Node that offers better performance.",
hacknet_node_money_mult: 1.1,
hacknet_node_level_cost_mult: 0.85,
});
fe.addToFactions(["Netburners"]), C(o.a.HacknetNodeCacheUpload) && delete r.a[o.a.HacknetNodeCacheUpload], E(fe);
const ge = new n.a({
name: o.a.HacknetNodeNICUpload,
repCost: 1875,
moneyCost: 45e5,
info: "Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that offers better performance.",
hacknet_node_money_mult: 1.1,
hacknet_node_purchase_cost_mult: 0.9,
});
ge.addToFactions(["Netburners"]), C(o.a.HacknetNodeNICUpload) && delete r.a[o.a.HacknetNodeNICUpload], E(ge);
const ye = new n.a({
name: o.a.HacknetNodeKernelDNI,
repCost: 7500,
moneyCost: 4e7,
info: "Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a Hacknet Node. This lets the user access and manipulate the Node's kernel using electrochemical signals.",
hacknet_node_money_mult: 1.25,
});
ye.addToFactions(["Netburners"]), C(o.a.HacknetNodeKernelDNI) && delete r.a[o.a.HacknetNodeKernelDNI], E(ye);
const be = new n.a({
name: o.a.HacknetNodeCoreDNI,
repCost: 12500,
moneyCost: 6e7,
info: "Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using electrochemical signals.",
hacknet_node_money_mult: 1.45,
});
be.addToFactions(["Netburners"]), C(o.a.HacknetNodeCoreDNI) && delete r.a[o.a.HacknetNodeCoreDNI], E(be);
const Ee = new n.a({
name: o.a.NeuroFluxGovernor,
repCost: 1250,
moneyCost: 375e4,
info: "A device that is embedded in the back of the neck. The NeuroFlux Governor monitors and regulates nervous impulses coming to and from the spinal column, essentially 'governing' the body. By doing so, it improves the functionality of the body's nervous system.",
stats: b.a.createElement(
b.a.Fragment,
null,
"This special augmentation can be leveled up infinitely. Each level of this augmentation increases ALL multipliers by 1%, stacking multiplicatively.",
),
hacking_chance_mult: 1.01,
hacking_speed_mult: 1.01,
hacking_money_mult: 1.01,
hacking_grow_mult: 1.01,
hacking_mult: 1.01,
strength_mult: 1.01,
defense_mult: 1.01,
dexterity_mult: 1.01,
agility_mult: 1.01,
charisma_mult: 1.01,
hacking_exp_mult: 1.01,
strength_exp_mult: 1.01,
defense_exp_mult: 1.01,
dexterity_exp_mult: 1.01,
agility_exp_mult: 1.01,
charisma_exp_mult: 1.01,
company_rep_mult: 1.01,
faction_rep_mult: 1.01,
crime_money_mult: 1.01,
crime_success_mult: 1.01,
hacknet_node_money_mult: 1.01,
hacknet_node_purchase_cost_mult: 0.99,
hacknet_node_ram_cost_mult: 0.99,
hacknet_node_core_cost_mult: 0.99,
hacknet_node_level_cost_mult: 0.99,
work_money_mult: 1.01,
});
let ve = 0;
for (let e = 0; e < u.a.augmentations.length; ++e)
u.a.augmentations[e].name === o.a.NeuroFluxGovernor && (ve = u.a.augmentations[e].level);
Ee.level = ve;
let ke = ve;
for (let e = 0; e < u.a.queuedAugmentations.length; ++e)
u.a.queuedAugmentations[e].name === o.a.NeuroFluxGovernor && ++ke;
let _e = Math.pow(l.a.NeuroFluxGovernorLevelMult, ke);
(Ee.baseRepRequirement = 500 * _e * s.a.AugmentationRepCost),
(Ee.baseCost = 75e4 * _e * s.a.AugmentationMoneyCost),
C(o.a.NeuroFluxGovernor) && delete r.a[o.a.NeuroFluxGovernor],
Ee.addToAllFactions(),
E(Ee);
const we = new n.a({
name: o.a.Neurotrainer1,
repCost: 1e3,
moneyCost: 4e6,
info: "A decentralized cranial implant that improves the brain's ability to learn. It is installed by releasing millions of nanobots into the human brain, each of which attaches to a different neural pathway to enhance the brain's ability to retain and retrieve information.",
hacking_exp_mult: 1.1,
strength_exp_mult: 1.1,
defense_exp_mult: 1.1,
dexterity_exp_mult: 1.1,
agility_exp_mult: 1.1,
charisma_exp_mult: 1.1,
});
we.addToFactions(["CyberSec", "Aevum"]), C(o.a.Neurotrainer1) && delete r.a[o.a.Neurotrainer1], E(we);
const Ce = new n.a({
name: o.a.Neurotrainer2,
repCost: 1e4,
moneyCost: 45e6,
info: "A decentralized cranial implant that improves the brain's ability to learn. This is a more powerful version of the Neurotrainer I augmentation, but it does not require Neurotrainer I to be installed as a prerequisite.",
hacking_exp_mult: 1.15,
strength_exp_mult: 1.15,
defense_exp_mult: 1.15,
dexterity_exp_mult: 1.15,
agility_exp_mult: 1.15,
charisma_exp_mult: 1.15,
});
Ce.addToFactions(["BitRunners", "NiteSec"]), C(o.a.Neurotrainer2) && delete r.a[o.a.Neurotrainer2], E(Ce);
const Se = new n.a({
name: o.a.Neurotrainer3,
repCost: 25e3,
moneyCost: 13e7,
info: "A decentralized cranial implant that improves the brain's ability to learn. This is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, but it does not require either of them to be installed as a prerequisite.",
hacking_exp_mult: 1.2,
strength_exp_mult: 1.2,
defense_exp_mult: 1.2,
dexterity_exp_mult: 1.2,
agility_exp_mult: 1.2,
charisma_exp_mult: 1.2,
});
Se.addToFactions(["NWO", "Four Sigma"]), C(o.a.Neurotrainer3) && delete r.a[o.a.Neurotrainer3], E(Se);
const xe = new n.a({
name: o.a.Hypersight,
repCost: 15e4,
moneyCost: 275e7,
info: "A bionic eye implant that grants sight capabilities far beyond those of a natural human. Embedded circuitry within the implant provides the ability to detect heat and movement through solid objects such as walls, thus providing 'x-ray vision'-like capabilities.",
dexterity_mult: 1.4,
hacking_speed_mult: 1.03,
hacking_money_mult: 1.1,
});
xe.addToFactions(["Blade Industries", "KuaiGong International"]),
C(o.a.Hypersight) && delete r.a[o.a.Hypersight],
E(xe);
const Oe = new n.a({
name: o.a.LuminCloaking1,
repCost: 1500,
moneyCost: 5e6,
info: "A skin implant that reinforces the skin with highly-advanced synthetic cells. These cells, when powered, have a negative refractive index. As a result, they bend light around the skin, making the user much harder to see to the naked eye.",
agility_mult: 1.05,
crime_money_mult: 1.1,
});
Oe.addToFactions(["Slum Snakes", "Tetrads"]), C(o.a.LuminCloaking1) && delete r.a[o.a.LuminCloaking1], E(Oe);
const Te = new n.a({
name: o.a.LuminCloaking2,
repCost: 5e3,
moneyCost: 3e7,
info: "This is a more advanced version of the LuminCloaking-V1 augmentation. This skin implant reinforces the skin with highly-advanced synthetic cells. These cells, when powered, are capable of not only bending light but also of bending heat, making the user more resilient as well as stealthy.",
prereqs: [o.a.LuminCloaking1],
agility_mult: 1.1,
defense_mult: 1.1,
crime_money_mult: 1.25,
});
Te.addToFactions(["Slum Snakes", "Tetrads"]), C(o.a.LuminCloaking2) && delete r.a[o.a.LuminCloaking2], E(Te);
const Me = new n.a({
name: o.a.SmartSonar,
repCost: 22500,
moneyCost: 75e6,
info: "A cochlear implant that helps the player detect and locate enemies using sound propagation.",
dexterity_mult: 1.1,
dexterity_exp_mult: 1.15,
crime_money_mult: 1.25,
});
Me.addToFactions(["Slum Snakes"]), C(o.a.SmartSonar) && delete r.a[o.a.SmartSonar], E(Me);
const Re = new n.a({
name: o.a.PowerRecirculator,
repCost: 25e3,
moneyCost: 18e7,
info: "The body's nerves are attached with polypyrrole nanocircuits that are capable of capturing wasted energy, in the form of heat, and converting it back into usable power.",
hacking_mult: 1.05,
strength_mult: 1.05,
defense_mult: 1.05,
dexterity_mult: 1.05,
agility_mult: 1.05,
charisma_mult: 1.05,
hacking_exp_mult: 1.1,
strength_exp_mult: 1.1,
defense_exp_mult: 1.1,
dexterity_exp_mult: 1.1,
agility_exp_mult: 1.1,
charisma_exp_mult: 1.1,
});
Re.addToFactions(["Tetrads", "The Dark Army", "The Syndicate", "NWO"]),
C(o.a.PowerRecirculator) && delete r.a[o.a.PowerRecirculator],
E(Re);
const Pe = new n.a({
name: o.a.QLink,
repCost: 1875e3,
moneyCost: 25e12,
info: "A brain implant that wirelessly connects you to the Illuminati's quantum supercomputer, allowing you to access and use its incredible computing power.",
hacking_mult: 1.75,
hacking_speed_mult: 2,
hacking_chance_mult: 2.5,
hacking_money_mult: 4,
});
Pe.addToFactions(["Illuminati"]), C(o.a.QLink) && delete r.a[o.a.QLink], E(Pe);
const Ae = new n.a({
name: o.a.TheRedPill,
repCost: 25e5,
moneyCost: 0,
info: "It's time to leave the cave.",
stats: null,
});
Ae.addToFactions(["Daedalus"]), C(o.a.TheRedPill) && delete r.a[o.a.TheRedPill], E(Ae);
const Ne = new n.a({
name: o.a.SPTN97,
repCost: 125e4,
moneyCost: 4875e6,
info: "The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an artificially-synthesized gene that was developed by DARPA to create super-soldiers through genetic modification. The gene was outlawed in 2056.",
strength_mult: 1.75,
defense_mult: 1.75,
dexterity_mult: 1.75,
agility_mult: 1.75,
hacking_mult: 1.15,
});
Ne.addToFactions(["The Covenant"]), C(o.a.SPTN97) && delete r.a[o.a.SPTN97], E(Ne);
const Ie = new n.a({
name: o.a.HiveMind,
repCost: 15e5,
moneyCost: 55e8,
info: "A brain implant developed by ECorp. They do not reveal what exactly the implant does, but they promise that it will greatly enhance your abilities.",
hacking_grow_mult: 3,
stats: null,
});
Ie.addToFactions(["ECorp"]), C(o.a.HiveMind) && delete r.a[o.a.HiveMind], E(Ie);
const Fe = new n.a({
name: o.a.CordiARCReactor,
repCost: 1125e3,
moneyCost: 5e9,
info: "The thoracic cavity is equipped with a small chamber designed to hold and sustain hydrogen plasma. The plasma is used to generate fusion power through nuclear fusion, providing limitless amounts of clean energy for the body.",
strength_mult: 1.35,
defense_mult: 1.35,
dexterity_mult: 1.35,
agility_mult: 1.35,
strength_exp_mult: 1.35,
defense_exp_mult: 1.35,
dexterity_exp_mult: 1.35,
agility_exp_mult: 1.35,
});
Fe.addToFactions(["MegaCorp"]), C(o.a.CordiARCReactor) && delete r.a[o.a.CordiARCReactor], E(Fe);
const je = new n.a({
name: o.a.SmartJaw,
repCost: 375e3,
moneyCost: 275e7,
info: "A bionic jaw that contains advanced hardware and software capable of psychoanalyzing and profiling the personality of others using optical imaging software.",
charisma_mult: 1.5,
charisma_exp_mult: 1.5,
company_rep_mult: 1.25,
faction_rep_mult: 1.25,
});
je.addToFactions(["Bachman & Associates"]), C(o.a.SmartJaw) && delete r.a[o.a.SmartJaw], E(je);
const Be = new n.a({
name: o.a.Neotra,
repCost: 562500,
moneyCost: 2875e6,
info: "A highly-advanced techno-organic drug that is injected into the skeletal and integumentary system. The drug permanently modifies the DNA of the body's skin and bone cells, granting them the ability to repair and restructure themselves.",
strength_mult: 1.55,
defense_mult: 1.55,
});
Be.addToFactions(["Blade Industries"]), C(o.a.Neotra) && delete r.a[o.a.Neotra], E(Be);
const De = new n.a({
name: o.a.Xanipher,
repCost: 875e3,
moneyCost: 425e7,
info: "A concoction of advanced nanobots that is orally ingested into the body. These nanobots induce physiological changes and significantly improve the body's functioning in all aspects.",
hacking_mult: 1.2,
strength_mult: 1.2,
defense_mult: 1.2,
dexterity_mult: 1.2,
agility_mult: 1.2,
charisma_mult: 1.2,
hacking_exp_mult: 1.15,
strength_exp_mult: 1.15,
defense_exp_mult: 1.15,
dexterity_exp_mult: 1.15,
agility_exp_mult: 1.15,
charisma_exp_mult: 1.15,
});
De.addToFactions(["NWO"]), C(o.a.Xanipher) && delete r.a[o.a.Xanipher], E(De);
const Ge = new n.a({
name: o.a.HydroflameLeftArm,
repCost: 125e4,
moneyCost: 25e11,
info: "The left arm of a legendary BitRunner who ascended beyond this world. It projects a light blue energy shield that protects the exposed inner parts. Even though it contains no weapons, the advanced tungsten titanium alloy increases the users strength to unbelievable levels. The augmentation gets more powerful over time for seemingly no reason.",
strength_mult: 2.7,
});
Ge.addToFactions(["NWO"]), C(o.a.HydroflameLeftArm) && delete r.a[o.a.HydroflameLeftArm], E(Ge);
const Le = new n.a({
name: o.a.nextSENS,
repCost: 437500,
moneyCost: 1925e6,
info: "The body is genetically re-engineered to maintain a state of negligible senescence, preventing the body from deteriorating with age.",
hacking_mult: 1.2,
strength_mult: 1.2,
defense_mult: 1.2,
dexterity_mult: 1.2,
agility_mult: 1.2,
charisma_mult: 1.2,
});
Le.addToFactions(["Clarke Incorporated"]), C(o.a.nextSENS) && delete r.a[o.a.nextSENS], E(Le);
const We = new n.a({
name: o.a.OmniTekInfoLoad,
repCost: 625e3,
moneyCost: 2875e6,
info: "OmniTek's data and information repository is uploaded into your brain, enhancing your programming and hacking abilities.",
hacking_mult: 1.2,
hacking_exp_mult: 1.25,
});
We.addToFactions(["OmniTek Incorporated"]), C(o.a.OmniTekInfoLoad) && delete r.a[o.a.OmniTekInfoLoad], E(We);
const He = new n.a({
name: o.a.PhotosyntheticCells,
repCost: 562500,
moneyCost: 275e7,
info: "Chloroplasts are added to epidermal stem cells and are applied to the body using a skin graft. The result is photosynthetic skin cells, allowing users to generate their own energy and nutrition using solar power.",
strength_mult: 1.4,
defense_mult: 1.4,
agility_mult: 1.4,
});
He.addToFactions(["KuaiGong International"]),
C(o.a.PhotosyntheticCells) && delete r.a[o.a.PhotosyntheticCells],
E(He);
const Ue = new n.a({
name: o.a.Neurolink,
repCost: 875e3,
moneyCost: 4375e6,
info: "A brain implant that provides a high-bandwidth, direct neural link between your mind and the BitRunners' data servers, which reportedly contain the largest database of hacking tools and information in the world.",
hacking_mult: 1.15,
hacking_exp_mult: 1.2,
hacking_chance_mult: 1.1,
hacking_speed_mult: 1.05,
programs: [h.a.FTPCrackProgram.name, h.a.RelaySMTPProgram.name],
});
Ue.addToFactions(["BitRunners"]), C(o.a.Neurolink) && delete r.a[o.a.Neurolink], E(Ue);
const qe = new n.a({
name: o.a.TheBlackHand,
repCost: 1e5,
moneyCost: 55e7,
info: "A highly advanced bionic hand. This prosthetic not only enhances strength and dexterity but it is also embedded with hardware and firmware that lets the user connect to, access, and hack devices and machines by just touching them.",
strength_mult: 1.15,
dexterity_mult: 1.15,
hacking_mult: 1.1,
hacking_speed_mult: 1.02,
hacking_money_mult: 1.1,
});
qe.addToFactions(["The Black Hand"]), C(o.a.TheBlackHand) && delete r.a[o.a.TheBlackHand], E(qe);
const Ke = new n.a({
name: o.a.CRTX42AA,
repCost: 45e3,
moneyCost: 225e6,
info: "The CRTX42-AA gene is injected into the genome. The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal cortex and improves cognitive abilities.",
hacking_mult: 1.08,
hacking_exp_mult: 1.15,
});
Ke.addToFactions(["NiteSec"]), C(o.a.CRTX42AA) && delete r.a[o.a.CRTX42AA], E(Ke);
const $e = new n.a({
name: o.a.Neuregen,
repCost: 37500,
moneyCost: 375e6,
info: "A drug that genetically modifies the neurons in the brain resulting in neurons never die, continuously regenerate, and strengthen themselves.",
hacking_exp_mult: 1.4,
});
$e.addToFactions(["Chongqing"]), C(o.a.Neuregen) && delete r.a[o.a.Neuregen], E($e);
const ze = new n.a({
name: o.a.CashRoot,
repCost: 12500,
moneyCost: 125e6,
info: b.a.createElement(
b.a.Fragment,
null,
"A collection of digital assets saved on a small chip. The chip is implanted into your wrist. A small jack in the chip allows you to connect it to a computer and upload the assets.",
),
startingMoney: 1e6,
programs: [h.a.BruteSSHProgram.name],
});
ze.addToFactions(["Sector-12"]), C(o.a.CashRoot) && delete r.a[o.a.CashRoot], E(ze);
const Ye = new n.a({
name: o.a.NutriGen,
repCost: 6250,
moneyCost: 25e5,
info: "A thermo-powered artificial nutrition generator. Endogenously synthesizes glucose, amino acids, and vitamins and redistributes them across the body. The device is powered by the body's naturally wasted energy in the form of heat.",
strength_exp_mult: 1.2,
defense_exp_mult: 1.2,
dexterity_exp_mult: 1.2,
agility_exp_mult: 1.2,
});
Ye.addToFactions(["New Tokyo"]), C(o.a.NutriGen) && delete r.a[o.a.NutriGen], E(Ye);
const Ve = new n.a({
name: o.a.PCMatrix,
repCost: 1e5,
moneyCost: 2e9,
info: "A 'Probability Computation Matrix' is installed in the frontal cortex. This implant uses advanced mathematical algorithims to rapidly identify and compute statistical outcomes of nearly every situation.",
charisma_mult: 1.0777,
charisma_exp_mult: 1.0777,
work_money_mult: 1.777,
faction_rep_mult: 1.0777,
company_rep_mult: 1.0777,
crime_success_mult: 1.0777,
crime_money_mult: 1.0777,
programs: [h.a.DeepscanV1.name, h.a.AutoLink.name],
});
Ve.addToFactions(["Aevum"]), C(o.a.PCMatrix) && delete r.a[o.a.PCMatrix], E(Ve);
const Je = new n.a({
name: o.a.INFRARet,
repCost: 7500,
moneyCost: 3e7,
info: "A tiny chip that sits behind the retinae. This implant lets theuser visually detect infrared radiation.",
crime_success_mult: 1.25,
crime_money_mult: 1.1,
dexterity_mult: 1.1,
});
Je.addToFactions(["Ishima"]), C(o.a.INFRARet) && delete r.a[o.a.INFRARet], E(Je);
const Xe = new n.a({
name: o.a.DermaForce,
repCost: 15e3,
moneyCost: 5e7,
info: "Synthetic skin that is grafted onto the body. This skin consists of millions of nanobots capable of projecting high-density muon beams, creating an energy barrier around the user.",
defense_mult: 1.4,
});
Xe.addToFactions(["Volhaven"]), C(o.a.DermaForce) && delete r.a[o.a.DermaForce], E(Xe);
const Qe = new n.a({
name: o.a.GrapheneBrachiBlades,
repCost: 225e3,
moneyCost: 25e8,
info: "An upgrade to the BrachiBlades augmentation. It infuses the retractable blades with an advanced graphene material making them stronger and lighter.",
prereqs: [o.a.BrachiBlades],
strength_mult: 1.4,
defense_mult: 1.4,
crime_success_mult: 1.1,
crime_money_mult: 1.3,
});
Qe.addToFactions(["Speakers for the Dead"]),
C(o.a.GrapheneBrachiBlades) && delete r.a[o.a.GrapheneBrachiBlades],
E(Qe);
const Ze = new n.a({
name: o.a.GrapheneBionicArms,
repCost: 5e5,
moneyCost: 375e7,
info: "An upgrade to the Bionic Arms augmentation. It infuses the prosthetic arms with an advanced graphene material to make them stronger and lighter.",
prereqs: [o.a.BionicArms],
strength_mult: 1.85,
dexterity_mult: 1.85,
});
Ze.addToFactions(["The Dark Army"]), C(o.a.GrapheneBionicArms) && delete r.a[o.a.GrapheneBionicArms], E(Ze);
const et = new n.a({
name: o.a.BrachiBlades,
repCost: 12500,
moneyCost: 9e7,
info: "A set of retractable plasteel blades that are implanted in the arm, underneath the skin.",
strength_mult: 1.15,
defense_mult: 1.15,
crime_success_mult: 1.1,
crime_money_mult: 1.15,
});
et.addToFactions(["The Syndicate"]), C(o.a.BrachiBlades) && delete r.a[o.a.BrachiBlades], E(et);
const tt = new n.a({
name: o.a.BionicArms,
repCost: 62500,
moneyCost: 275e6,
info: "Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.",
strength_mult: 1.3,
dexterity_mult: 1.3,
});
tt.addToFactions(["Tetrads"]), C(o.a.BionicArms) && delete r.a[o.a.BionicArms], E(tt);
const at = new n.a({
name: o.a.SNA,
repCost: 6250,
moneyCost: 3e7,
info: "A cranial implant that affects the user's personality, making them better at negotiation in social situations.",
work_money_mult: 1.1,
company_rep_mult: 1.15,
faction_rep_mult: 1.15,
});
at.addToFactions(["Tian Di Hui"]), C(o.a.SNA) && delete r.a[o.a.SNA], E(at);
const nt = new n.a({
name: o.a.NeuroreceptorManager,
repCost: 75e3,
moneyCost: 55e7,
info: "A brain implant carefully assembled around the synapses, which micromanages the activity and levels of various neuroreceptor chemicals and modulates electrical acvitiy to optimize concentration, allowing the user to multitask much more effectively.",
stats: b.a.createElement(
b.a.Fragment,
null,
"This augmentation removes the penalty for not focusing on actions such as working in a job or working for a faction.",
),
});
nt.addToFactions(["Tian Di Hui"]), C(o.a.NeuroreceptorManager) && delete r.a[o.a.NeuroreceptorManager], E(nt);
if (Object(c.b)("Bladeburners")) {
const e = new n.a({
name: o.a.EsperEyewear,
repCost: 1250,
moneyCost: 165e6,
info: "Ballistic-grade protective and retractable eyewear that was designed specifically for Bladeburner units. This is implanted by installing a mechanical frame in the skull's orbit. This frame interfaces with the brain and allows the user to automatically extrude and extract the eyewear. The eyewear protects against debris, shrapnel, lasers, blinding flashes, and gas. It is also embedded with a data processing chip that can be programmed to display an AR HUD to assist the user in field missions.",
bladeburner_success_chance_mult: 1.03,
dexterity_mult: 1.05,
isSpecial: !0,
});
e.addToFactions(["Bladeburners"]), k(e);
const t = new n.a({
name: o.a.EMS4Recombination,
repCost: 2500,
moneyCost: 275e6,
info: "A DNA recombination of the EMS-4 Gene. This genetic engineering technique was originally used on Bladeburners during the Synthoid uprising to induce wakefulness and concentration, suppress fear, reduce empathy, improve reflexes, and improve memory among other things.",
bladeburner_success_chance_mult: 1.03,
bladeburner_analysis_mult: 1.05,
bladeburner_stamina_gain_mult: 1.02,
isSpecial: !0,
});
t.addToFactions(["Bladeburners"]), k(t);
const a = new n.a({
name: o.a.OrionShoulder,
repCost: 6250,
moneyCost: 55e7,
info: "A bionic shoulder augmentation for the right shoulder. Using cybernetics, the ORION-MKIV shoulder enhances the strength and dexterity of the user's right arm. It also provides protection due to its crystallized graphene plating.",
defense_mult: 1.05,
strength_mult: 1.05,
dexterity_mult: 1.05,
bladeburner_success_chance_mult: 1.04,
isSpecial: !0,
});
a.addToFactions(["Bladeburners"]), k(a);
const r = new n.a({
name: o.a.HyperionV1,
repCost: 12500,
moneyCost: 275e7,
info: "A pair of mini plasma cannons embedded into the hands. The Hyperion is capable of rapidly firing bolts of high-density plasma. The weapon is meant to be used against augmented enemies as the ionized nature of the plasma disrupts the electrical systems of Augmentations. However, it can also be effective against non-augmented enemies due to its high temperature and concussive force.",
bladeburner_success_chance_mult: 1.06,
isSpecial: !0,
});
r.addToFactions(["Bladeburners"]), k(r);
const i = new n.a({
name: o.a.HyperionV2,
repCost: 25e3,
moneyCost: 55e8,
info: "A pair of mini plasma cannons embedded into the hands. This augmentation is more advanced and powerful than the original V1 model. This V2 model is more power-efficient, more accurate, and can fire plasma bolts at a much higher velocity than the V1 model.",
prereqs: [o.a.HyperionV1],
bladeburner_success_chance_mult: 1.08,
isSpecial: !0,
});
i.addToFactions(["Bladeburners"]), k(i);
const s = new n.a({
name: o.a.GolemSerum,
repCost: 31250,
moneyCost: 11e9,
info: "A serum that permanently enhances many aspects of human capabilities, including strength, speed, immune system enhancements, and mitochondrial efficiency. The serum was originally developed by the Chinese military in an attempt to create super soldiers.",
strength_mult: 1.07,
defense_mult: 1.07,
dexterity_mult: 1.07,
agility_mult: 1.07,
bladeburner_stamina_gain_mult: 1.05,
isSpecial: !0,
});
s.addToFactions(["Bladeburners"]), k(s);
const l = new n.a({
name: o.a.VangelisVirus,
repCost: 18750,
moneyCost: 275e7,
info: "A synthetic symbiotic virus that is injected into human brain tissue. The Vangelis virus heightens the senses and focus of its host, and also enhances its intuition.",
dexterity_exp_mult: 1.1,
bladeburner_analysis_mult: 1.1,
bladeburner_success_chance_mult: 1.04,
isSpecial: !0,
});
l.addToFactions(["Bladeburners"]), k(l);
const c = new n.a({
name: o.a.VangelisVirus3,
repCost: 37500,
moneyCost: 11e9,
info: "An improved version of Vangelis, a synthetic symbiotic virus that is injected into human brain tissue. On top of the benefits of the original virus, this also grants an accelerated healing factor and enhanced reflexes.",
prereqs: [o.a.VangelisVirus],
defense_exp_mult: 1.1,
dexterity_exp_mult: 1.1,
bladeburner_analysis_mult: 1.15,
bladeburner_success_chance_mult: 1.05,
isSpecial: !0,
});
c.addToFactions(["Bladeburners"]), k(c);
const u = new n.a({
name: o.a.INTERLINKED,
repCost: 25e3,
moneyCost: 55e8,
info: "The DNA is genetically modified to enhance the human's body extracellular matrix (ECM). This improves the ECM's ability to structurally support the body and grants heightened strength and durability.",
strength_exp_mult: 1.05,
defense_exp_mult: 1.05,
dexterity_exp_mult: 1.05,
agility_exp_mult: 1.05,
bladeburner_max_stamina_mult: 1.1,
isSpecial: !0,
});
u.addToFactions(["Bladeburners"]), k(u);
const m = new n.a({
name: o.a.BladeRunner,
repCost: 2e4,
moneyCost: 825e7,
info: "A cybernetic foot augmentation that was specifically created for Bladeburners during the Synthoid Uprising. The organic musculature of the human foot is enhanced with flexible carbon nanotube matrices that are controlled by intelligent servo-motors.",
agility_mult: 1.05,
bladeburner_max_stamina_mult: 1.05,
bladeburner_stamina_gain_mult: 1.05,
isSpecial: !0,
});
m.addToFactions(["Bladeburners"]), k(m);
const h = new n.a({
name: o.a.BladeArmor,
repCost: 12500,
moneyCost: 1375e6,
info: "A powered exoskeleton suit designed as armor for Bladeburner units. This exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, concussive, thermal, chemical, and electric trauma. It also enhances the user's physical abilities.",
strength_mult: 1.04,
defense_mult: 1.04,
dexterity_mult: 1.04,
agility_mult: 1.04,
bladeburner_stamina_gain_mult: 1.02,
bladeburner_success_chance_mult: 1.03,
isSpecial: !0,
});
h.addToFactions(["Bladeburners"]), k(h);
const d = new n.a({
name: o.a.BladeArmorPowerCells,
repCost: 18750,
moneyCost: 275e7,
info: "Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of more efficiently storing and using power.",
prereqs: [o.a.BladeArmor],
bladeburner_success_chance_mult: 1.05,
bladeburner_stamina_gain_mult: 1.02,
bladeburner_max_stamina_mult: 1.05,
isSpecial: !0,
});
d.addToFactions(["Bladeburners"]), k(d);
const p = new n.a({
name: o.a.BladeArmorEnergyShielding,
repCost: 21250,
moneyCost: 55e8,
info: "Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system that is capable of projecting an energy shielding force field.",
prereqs: [o.a.BladeArmor],
defense_mult: 1.05,
bladeburner_success_chance_mult: 1.06,
isSpecial: !0,
});
p.addToFactions(["Bladeburners"]), k(p);
const f = new n.a({
name: o.a.BladeArmorUnibeam,
repCost: 31250,
moneyCost: 165e8,
info: "Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser weapon. It's precision and accuracy makes it useful for quickly neutralizing threats while keeping casualties to a minimum.",
prereqs: [o.a.BladeArmor],
bladeburner_success_chance_mult: 1.08,
isSpecial: !0,
});
f.addToFactions(["Bladeburners"]), k(f);
const g = new n.a({
name: o.a.BladeArmorOmnibeam,
repCost: 62500,
moneyCost: 275e8,
info: "Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use a multiple-fiber system. This upgraded weapon uses multiple fiber laser modules that combine together to form a single, more powerful beam of up to 2000MW.",
prereqs: [o.a.BladeArmorUnibeam],
bladeburner_success_chance_mult: 1.1,
isSpecial: !0,
});
g.addToFactions(["Bladeburners"]), k(g);
const y = new n.a({
name: o.a.BladeArmorIPU,
repCost: 15e3,
moneyCost: 11e8,
info: "Upgrades the BLADE-51b Tesla Armor with an AI Information Processing Unit that was specially designed to analyze Synthoid related data and information.",
prereqs: [o.a.BladeArmor],
bladeburner_analysis_mult: 1.15,
bladeburner_success_chance_mult: 1.02,
isSpecial: !0,
});
y.addToFactions(["Bladeburners"]), k(y);
const E = new n.a({
name: o.a.BladesSimulacrum,
repCost: 1250,
moneyCost: 15e10,
info: "A highly-advanced matter phase-shifter module that is embedded in the brainstem and cerebellum. This augmentation allows the user to project and control a holographic simulacrum within an extremely large radius. These specially-modified holograms were specifically weaponized by Bladeburner units to be used against Synthoids.",
stats: b.a.createElement(
b.a.Fragment,
null,
"This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time.",
),
isSpecial: !0,
});
E.addToFactions(["Bladeburners"]), k(E);
}
_e = Math.pow(l.a.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][d.a[11]], u.a.queuedAugmentations.length);
for (const e in r.a) r.a.hasOwnProperty(e) && (r.a[e].baseCost *= _e);
u.a.reapplyAllAugmentations();
}
function k(e) {
if (!(e instanceof n.a)) throw new Error("Invalid argument 'newAugObject' passed into resetAugmentation");
const t = e.name;
C(t) && delete r.a[t], E(e);
}
function _(e, t = !1) {
r.a[e.name].owned = !0;
const a = r.a[e.name];
for (const e in a.mults) {
const t = u.a.getMult(e) * a.mults[e];
u.a.setMult(e, t);
}
if (e.name === o.a.NeuroFluxGovernor && !t) {
r.a[e.name].level = e.level;
for (let t = 0; t < u.a.augmentations.length; ++t)
if (u.a.augmentations[t].name == o.a.NeuroFluxGovernor) return void (u.a.augmentations[t].level = e.level);
}
if (!t) {
const t = new i.a(e.name);
u.a.augmentations.push(t);
}
}
function w() {
if (0 == u.a.queuedAugmentations.length)
return Object(p.a)("You have not purchased any Augmentations to install!"), !1;
let e = "",
t = -1;
for (let e = u.a.queuedAugmentations.length - 1; e >= 0; e--)
if (u.a.queuedAugmentations[e].name === o.a.NeuroFluxGovernor) {
t = e;
break;
}
for (let a = 0; a < u.a.queuedAugmentations.length; ++a) {
const n = u.a.queuedAugmentations[a],
i = r.a[n.name];
if (null == i) {
console.error("Invalid augmentation: " + n.name);
continue;
}
if ((_(u.a.queuedAugmentations[a]), n.name === o.a.NeuroFluxGovernor && a !== t)) continue;
let s = "";
n.name === o.a.NeuroFluxGovernor && (s = " - " + n.level), (e += i.name + s + "
");
}
return (
(u.a.queuedAugmentations = []),
Object(p.a)(
"You slowly drift to sleep as scientists put you under in order to install the following Augmentations:
" +
e +
"
You wake up in your home...you feel different...",
),
Object(m.a)(),
!0
);
}
function C(e) {
return r.a.hasOwnProperty(e);
}
function S(e) {
return (e instanceof n.a ? e.name : e) === o.a.NeuroFluxGovernor;
}
},
,
function (e, t, a) {
"use strict";
let n;
a.d(t, "a", function () {
return n;
}),
a.d(t, "b", function () {
return r;
}),
(function (e) {
(e.Weapon = "w"), (e.Armor = "a"), (e.Vehicle = "v"), (e.Rootkit = "r"), (e.Augmentation = "g");
})(n || (n = {}));
const r = [
{ cost: 1e6, mults: { str: 1.04, def: 1.04 }, name: "Baseball Bat", upgType: n.Weapon },
{ cost: 12e6, mults: { str: 1.08, def: 1.08, dex: 1.08 }, name: "Katana", upgType: n.Weapon },
{ cost: 25e6, mults: { str: 1.1, def: 1.1, dex: 1.1, agi: 1.1 }, name: "Glock 18C", upgType: n.Weapon },
{ cost: 5e7, mults: { str: 1.12, def: 1.1, agi: 1.1 }, name: "P90C", upgType: n.Weapon },
{ cost: 6e7, mults: { str: 1.2, def: 1.15 }, name: "Steyr AUG", upgType: n.Weapon },
{ cost: 1e8, mults: { str: 1.25, def: 1.2 }, name: "AK-47", upgType: n.Weapon },
{ cost: 15e7, mults: { str: 1.3, def: 1.25 }, name: "M15A10 Assault Rifle", upgType: n.Weapon },
{ cost: 225e6, mults: { str: 1.3, dex: 1.25, agi: 1.3 }, name: "AWM Sniper Rifle", upgType: n.Weapon },
{ cost: 2e6, mults: { def: 1.04 }, name: "Bulletproof Vest", upgType: n.Armor },
{ cost: 5e6, mults: { def: 1.08 }, name: "Full Body Armor", upgType: n.Armor },
{ cost: 25e6, mults: { def: 1.15, agi: 1.15 }, name: "Liquid Body Armor", upgType: n.Armor },
{ cost: 4e7, mults: { def: 1.2 }, name: "Graphene Plating Armor", upgType: n.Armor },
{ cost: 3e6, mults: { agi: 1.04, cha: 1.04 }, name: "Ford Flex V20", upgType: n.Vehicle },
{ cost: 9e6, mults: { agi: 1.08, cha: 1.08 }, name: "ATX1070 Superbike", upgType: n.Vehicle },
{ cost: 18e6, mults: { agi: 1.12, cha: 1.12 }, name: "Mercedes-Benz S9001", upgType: n.Vehicle },
{ cost: 3e7, mults: { agi: 1.16, cha: 1.16 }, name: "White Ferrari", upgType: n.Vehicle },
{ cost: 5e6, mults: { hack: 1.05 }, name: "NUKE Rootkit", upgType: n.Rootkit },
{ cost: 25e6, mults: { hack: 1.1 }, name: "Soulstealer Rootkit", upgType: n.Rootkit },
{ cost: 75e6, mults: { hack: 1.15 }, name: "Demon Rootkit", upgType: n.Rootkit },
{ cost: 4e7, mults: { hack: 1.12 }, name: "Hmap Node", upgType: n.Rootkit },
{ cost: 75e6, mults: { hack: 1.15 }, name: "Jack the Ripper", upgType: n.Rootkit },
{ cost: 1e10, mults: { str: 1.3, dex: 1.3 }, name: "Bionic Arms", upgType: n.Augmentation },
{ cost: 1e10, mults: { agi: 1.6 }, name: "Bionic Legs", upgType: n.Augmentation },
{
cost: 15e9,
mults: { str: 1.15, def: 1.15, dex: 1.15, agi: 1.15 },
name: "Bionic Spine",
upgType: n.Augmentation,
},
{ cost: 2e10, mults: { str: 1.4, def: 1.4 }, name: "BrachiBlades", upgType: n.Augmentation },
{ cost: 12e9, mults: { str: 1.2, def: 1.2 }, name: "Nanofiber Weave", upgType: n.Augmentation },
{ cost: 25e9, mults: { str: 1.5, agi: 1.5 }, name: "Synthetic Heart", upgType: n.Augmentation },
{ cost: 15e9, mults: { str: 1.3, def: 1.3 }, name: "Synfibril Muscle", upgType: n.Augmentation },
{ cost: 5e9, mults: { hack: 1.05 }, name: "BitWire", upgType: n.Augmentation },
{ cost: 1e10, mults: { hack: 1.15 }, name: "Neuralstimulator", upgType: n.Augmentation },
{ cost: 75e8, mults: { hack: 1.1 }, name: "DataJack", upgType: n.Augmentation },
{ cost: 5e10, mults: { str: 1.7, def: 1.7 }, name: "Graphene Bone Lacings", upgType: n.Augmentation },
];
},
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
Water: 0.05,
Energy: 0.01,
Food: 0.03,
Plants: 0.05,
Metal: 0.1,
Hardware: 0.06,
Chemicals: 0.05,
Drugs: 0.02,
Robots: 0.5,
AICores: 0.1,
RealEstate: 0,
"Real Estate": 0,
"AI Cores": 0,
};
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return O;
}),
a.d(t, "c", function () {
return T;
}),
a.d(t, "e", function () {
return R;
}),
a.d(t, "f", function () {
return A;
}),
a.d(t, "b", function () {
return N;
}),
a.d(t, "d", function () {
return I;
});
var n = a(127),
r = a(262),
i = a(182),
o = a(255),
s = a(437),
l = a(7),
c = a(496),
u = a(140),
m = a(438),
h = a(1119),
d = a(1121),
p = a(316),
f = a(537),
g = a(225),
y = a(24),
b = a(14),
E = a(564),
v = a(15),
k = a(250),
_ = a(435),
w = a(118),
C = a(400),
S = a(258),
x = a(357);
const O = [];
for (let e = 0; e < l.a.NumNetscriptPorts; ++e) O.push(Object(d.a)());
function T() {
for (const e of i.a.values()) (e.env.stopFlag = !0), Object(n.a)(e);
o.a.emit(), i.a.clear();
}
function M(e) {
const t = e.code;
let a, i;
e.running = !0;
try {
const n = (function (e, t) {
const a = Object(S.a)(e, { ecmaVersion: 9, allowReserved: !0, sourceType: "module" }),
n = t.getServer();
if (null == n) throw new Error("Failed to find underlying Server object for script");
let r = "",
i = !1;
if (
(Object(x.b)(a, {
ImportDeclaration: (e) => {
i = !0;
let t = e.source.value;
t.startsWith("./") && (t = t.slice(2));
const a = (function (e) {
for (let t = 0; t < n.scripts.length; ++t) if (n.scripts[t].filename === e) return n.scripts[t];
return null;
})(t);
if (null == a) throw new Error("'Import' failed due to invalid script: " + t);
const o = Object(S.a)(a.code, { ecmaVersion: 9, allowReserved: !0, sourceType: "module" });
if (1 === e.specifiers.length && "ImportNamespaceSpecifier" === e.specifiers[0].type) {
const t = e.specifiers[0].local.name,
a = [],
n = [];
Object(x.b)(o, {
FunctionDeclaration: (e) => {
a.push(e.id.name), n.push(e);
},
}),
(r += "var " + t + ";\n(function (namespace) {\n"),
n.forEach((e) => {
(r += Object(E.generate)(e)), (r += "\n");
}),
a.forEach((e) => {
(r += "namespace." + e + " = " + e), (r += "\n");
}),
(r += "})(" + t + " || (" + t + " = {}));\n");
} else {
const t = [];
e.specifiers.forEach((e) => {
t.push(e.local.name);
});
const a = [];
Object(x.b)(o, {
FunctionDeclaration: (e) => {
t.includes(e.id.name) && a.push(e);
},
}),
a.forEach((e) => {
(r += Object(E.generate)(e)), (r += "\n");
});
}
},
}),
!i)
)
return { code: e, lineOffset: 0 };
let o = 0;
if ("Program" !== a.type || null == a.body) throw new Error("Code could not be properly parsed");
for (let e = a.body.length - 1; e >= 0; --e)
"ImportDeclaration" === a.body[e].type && (a.body.splice(e, 1), ++o);
const s = (r.match(/\n/g) || []).length - o;
e = Object(E.generate)(a);
return { code: (e = r + e), lineOffset: s };
})(t, e);
(a = n.code), (i = n.lineOffset);
} catch (t) {
return (
Object(v.a)("Error processing Imports in " + e.name + ":
" + t),
(e.env.stopFlag = !0),
(e.running = !1),
Object(n.a)(e),
Promise.resolve(e)
);
}
const o = function (t, a) {
const n = Object(m.a)(e);
for (const e in n) {
const i = n[e];
if ("function" == typeof i)
if (
"hack" === e ||
"grow" === e ||
"weaken" === e ||
"sleep" === e ||
"prompt" === e ||
"manualHack" === e
) {
const n = function (...e) {
const a = [];
for (let n = 0; n < e.length - 1; ++n)
"object" == typeof e[n] || e[n].constructor === Array ? a.push(t.pseudoToNative(e[n])) : a.push(e[n]);
const n = e[e.length - 1];
i(...a)
.then(function (e) {
n(e);
})
.catch(function (e) {
e instanceof r.a || console.error(e);
});
};
t.setProperty(a, e, t.createAsyncFunction(n));
} else if (
"sprintf" === e ||
"vsprintf" === e ||
"scp" === e ||
"write" == e ||
"tryWrite" === e ||
"run" === e ||
"exec" === e
) {
const n = function (...e) {
const a = [];
for (let n = 0; n < e.length; ++n)
"object" == typeof e[n] || e[n].constructor === Array ? a.push(t.pseudoToNative(e[n])) : a.push(e[n]);
return i(...a);
};
t.setProperty(a, e, t.createNativeFunction(n));
} else {
const n = function (...e) {
const a = i(...e);
return null == a ? a : a.constructor === Array || a === Object(a) ? t.nativeToPseudo(a) : a;
};
t.setProperty(a, e, t.createNativeFunction(n));
}
else t.setProperty(a, e, t.nativeToPseudo(i));
}
t.setProperty(a, "args", t.nativeToPseudo(e.args));
};
let s;
try {
s = new c.a(a, o, i);
} catch (t) {
return (
Object(v.a)("Syntax ERROR in " + e.name + ":
" + t),
(e.env.stopFlag = !0),
(e.running = !1),
Object(n.a)(e),
Promise.resolve(e)
);
}
return new Promise(function (t, a) {
try {
!(function n() {
try {
if (e.env.stopFlag) return a(e);
s.step() ? setTimeout(n, b.a.CodeInstructionRunTime) : t(e);
} catch (t) {
return (t = t.toString()), Object(u.a)(t) || (t = Object(u.b)(e, t)), (e.errorMessage = t), a(e);
}
})();
} catch (t) {
return Object(w.a)(t) ? ((e.errorMessage = t), a(e)) : t instanceof r.a ? a(t) : a(e);
}
});
}
function R(e, t, a) {
return P(e, t, a) ? (t.runScript(e), e.pid) : 0;
}
function P(e, t, a) {
let l = 1;
e.threads && !isNaN(e.threads) ? (l = e.threads) : (e.threads = 1);
const c = Object(_.a)(Object(f.a)(e) * l);
if (c > t.maxRam - t.ramUsed)
return (
Object(v.a)(
`Not enough RAM to run script ${e.filename} with args ` +
Object(k.a)(e.args) +
". This likely occurred because you re-loaded the game and the script's RAM usage increased (either because of an update to the game or your changes to the script.)",
),
!1
);
t.ramUsed = Object(_.a)(t.ramUsed + c);
const d = Object(s.a)();
if (-1 === d)
throw new Error(
"Failed to start script because could not find available PID. This is most because you have too many scripts running.",
);
const p = new r.a(e, d, m.a);
(p.ramUsage = c), i.a.set(d, p), o.a.emit();
let g = null;
if (p.name.endsWith(".js") || p.name.endsWith(".ns"))
g = (function (e) {
e.running = !0;
let t = null;
function a(a, n) {
return function (...r) {
if (e.env.stopFlag) throw e;
if ("sleep" === a) return n(...r);
if (t)
throw (
((e.errorMessage = Object(u.b)(
e,
Object(C.sprintf)(
"Concurrent calls to Netscript functions not allowed! Did you forget to await hack(), grow(), or some other promise-returning function? (Currently running: %s tried to run: %s)",
t,
a,
),
)),
e)
);
let i;
t = a;
try {
i = n(...r);
} catch (e) {
throw ((t = null), e);
}
return i && void 0 !== i.finally
? i.finally(function () {
t = null;
})
: ((t = null), i);
};
}
for (const t in e.env.vars) "function" == typeof e.env.vars[t] && (e.env.vars[t] = a(t, e.env.vars[t]));
return new Promise((t, a) => {
Object(h.a)(e.getServer().scripts, e)
.then(() => {
t(e);
})
.catch((e) => a(e));
}).catch((t) => {
if (t instanceof Error)
throw (
((e.errorMessage = Object(u.b)(e, t.message + ((t.stack && "\nstack:\n" + t.stack.toString()) || ""))),
e)
);
if (Object(u.a)(t)) throw ((e.errorMessage = t), e);
throw t;
});
})(p);
else if (((g = M(p)), !(g instanceof Promise))) return !1;
return (
g
.then(function (t) {
void 0 !== a &&
a.running &&
((a.scriptRef.onlineExpGained += e.onlineExpGained), (a.scriptRef.onlineMoneyMade += e.onlineMoneyMade)),
Object(n.a)(p),
t.log("", "Script finished running");
})
.catch(function (e) {
if (e instanceof Error)
return (
Object(v.a)("Script runtime unknown error. This is a bug please contact game developer"),
void console.error("Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: " + e.toString())
);
if (e instanceof r.a) {
if (!Object(u.a)(e.errorMessage)) return void e.log("", "Script killed");
{
const t = e.errorMessage.split("|");
if (4 != t.length)
return (
console.error("ERROR: Something wrong with Error text in evaluator..."),
void console.error("Error text: " + e.errorMessage)
);
const a = t[1],
n = t[2],
r = t[3];
let i = `RUNTIME ERROR
${n}@${a}
`;
e.args.length > 0 && (i += `Args: ${Object(k.a)(e.args)}
`),
(i += "
"),
(i += r),
Object(v.a)(i),
e.log("", "Script crashed with runtime error");
}
(e.running = !1), (e.env.stopFlag = !0);
} else {
if (Object(u.a)(e))
return (
Object(v.a)("Script runtime unknown error. This is a bug please contact game developer"),
void console.error(
"ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: " +
e.toString(),
)
);
Object(v.a)("An unknown script died for an unknown reason. This is a bug please contact game dev"),
console.error(e);
}
Object(n.a)(p);
}),
!0
);
}
function A(e = 1) {
const t = (e * l.a._idleSpeed) / 1e3;
for (const e of i.a.values()) e.scriptRef.onlineRunningTime += t;
}
function N() {
const e = -1 !== window.location.href.toLowerCase().indexOf("?noscripts");
e && console.info("Skipping the load of any scripts during startup");
for (const t of Object(y.c)()) {
t.ramUsed = 0;
for (let e = 0; e < t.scripts.length; ++e) t.scripts[e].markUpdated();
if (e) t.runningScripts.length = 0;
else
for (let e = 0; e < t.runningScripts.length; ++e) P(t.runningScripts[e], t), Object(g.c)(t.runningScripts[e]);
}
}
function I(e, t, a, n, i, o = 1) {
if (!(i instanceof r.a)) return 0;
if ("string" != typeof a || !Array.isArray(n))
return (
i.log(e, `Invalid arguments: scriptname='${a} args='${n}'`),
console.error("runScriptFromScript() failed due to invalid arguments"),
0
);
if (null != t.getRunningScript(a, n)) return i.log(e, `'${a}' is already running on '${t.hostname}'`), 0;
for (let t = 0; t < n.length; ++t)
if (null == n[t]) return i.log(e, "Cannot execute a script with null/undefined as an argument"), 0;
for (let r = 0; r < t.scripts.length; ++r)
if (t.scripts[r].filename === a) {
const s = t.scripts[r];
let l = s.ramUsage;
if (0 === (o = Math.round(Number(o)))) return 0;
l *= o;
const c = t.maxRam - t.ramUsed;
if (0 == t.hasAdminRights) return i.log(e, `You do not have root access on '${t.hostname}'`), 0;
if (l > c)
return (
i.log(
e,
`Cannot run script '${a}' (t=${o}) on '${t.hostname}' because there is not enough available RAM!`,
),
0
);
{
i.log(e, `'${a}' on '${t.hostname}' with ${o} threads and args: ${Object(k.a)(n)}.`);
const r = new p.a(s, n);
return (r.threads = o), R(r, t, i);
}
}
return i.log(e, `Could not find script '${a}' on '${t.hostname}'`), 0;
}
},
function (e, t, a) {
"use strict";
let n;
a.d(t, "a", function () {
return n;
}),
(function (e) {
(e[(e.Field = 0)] = "Field"),
(e[(e.Hacking = 1)] = "Hacking"),
(e[(e.None = 2)] = "None"),
(e[(e.Security = 3)] = "Security");
})(n || (n = {}));
},
,
function (e, t, a) {
"use strict";
function n(e) {
const t = Object.assign({}, { progress: 0, totalTicks: 20 }, e);
t.progress = Math.max(Math.min(t.progress, 1), 0);
const a = Math.max(Math.floor(t.progress / (1 / t.totalTicks)), 1),
n = Math.max(t.totalTicks - a, 0);
return `[${"|".repeat(a)}${"-".repeat(n)}]`;
}
a.d(t, "a", function () {
return n;
});
},
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(21);
function r(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class i {
constructor(e = {}) {
r(this, "name", "InitName"),
r(this, "qty", 0),
r(this, "qlt", 0),
r(this, "dmd", 0),
r(this, "dmdR", [0, 0]),
r(this, "cmp", 0),
r(this, "cmpR", [0, 0]),
r(this, "mv", 0),
r(this, "mku", 0),
r(this, "buy", 0),
r(this, "sll", 0),
r(this, "prd", 0),
r(this, "imp", 0),
r(this, "exp", []),
r(this, "totalExp", 0),
r(this, "bCost", 0),
r(this, "sCost", 0),
r(this, "prdman", [!1, 0]),
r(this, "sllman", [!1, 0]),
r(this, "marketTa1", !1),
r(this, "marketTa2", !1),
r(this, "marketTa2Price", 0),
e.name && (this.name = e.name),
this.init();
}
getMarkupLimit() {
return this.qlt / this.mku;
}
init() {
switch (this.name) {
case "Water":
(this.dmd = 75),
(this.dmdR = [65, 85]),
(this.cmp = 50),
(this.cmpR = [40, 60]),
(this.bCost = 1500),
(this.mv = 0.2),
(this.mku = 6);
break;
case "Energy":
(this.dmd = 90),
(this.dmdR = [80, 99]),
(this.cmp = 80),
(this.cmpR = [65, 95]),
(this.bCost = 2e3),
(this.mv = 0.2),
(this.mku = 6);
break;
case "Food":
(this.dmd = 80),
(this.dmdR = [70, 90]),
(this.cmp = 60),
(this.cmpR = [35, 85]),
(this.bCost = 5e3),
(this.mv = 1),
(this.mku = 3);
break;
case "Plants":
(this.dmd = 70),
(this.dmdR = [20, 90]),
(this.cmp = 50),
(this.cmpR = [30, 70]),
(this.bCost = 3e3),
(this.mv = 0.6),
(this.mku = 3.75);
break;
case "Metal":
(this.dmd = 80),
(this.dmdR = [75, 85]),
(this.cmp = 70),
(this.cmpR = [60, 80]),
(this.bCost = 2650),
(this.mv = 1),
(this.mku = 6);
break;
case "Hardware":
(this.dmd = 85),
(this.dmdR = [80, 90]),
(this.cmp = 80),
(this.cmpR = [65, 95]),
(this.bCost = 8e3),
(this.mv = 0.5),
(this.mku = 1);
break;
case "Chemicals":
(this.dmd = 55),
(this.dmdR = [40, 70]),
(this.cmp = 60),
(this.cmpR = [40, 80]),
(this.bCost = 9e3),
(this.mv = 1.2),
(this.mku = 2);
break;
case "Real Estate":
(this.dmd = 50),
(this.dmdR = [5, 99]),
(this.cmp = 50),
(this.cmpR = [25, 75]),
(this.bCost = 8e4),
(this.mv = 1.5),
(this.mku = 1.5);
break;
case "Drugs":
(this.dmd = 60),
(this.dmdR = [45, 75]),
(this.cmp = 70),
(this.cmpR = [40, 99]),
(this.bCost = 4e4),
(this.mv = 1.6),
(this.mku = 1);
break;
case "Robots":
(this.dmd = 90),
(this.dmdR = [80, 9]),
(this.cmp = 90),
(this.cmpR = [80, 9]),
(this.bCost = 75e3),
(this.mv = 0.5),
(this.mku = 1);
break;
case "AI Cores":
(this.dmd = 90),
(this.dmdR = [80, 99]),
(this.cmp = 90),
(this.cmpR = [80, 9]),
(this.bCost = 15e3),
(this.mv = 0.8),
(this.mku = 0.5);
break;
case "Scientific Research":
case "InitName":
break;
default:
console.error("Invalid material type in init(): " + this.name);
}
}
processMarket() {
const e = 1 + (Math.random() * this.mv) / 300,
t = 1 + (Math.random() * this.mv) / 100;
Math.random() < 0.5
? ((this.cmp *= t), this.cmp > this.cmpR[1] && (this.cmp = this.cmpR[1]), (this.bCost *= 1 / e))
: ((this.cmp *= 1 / t), this.cmp < this.cmpR[0] && (this.cmp = this.cmpR[0]), (this.bCost *= e));
const a = 1 + (Math.random() * this.mv) / 100;
Math.random() < 0.5
? ((this.dmd *= a), this.dmd > this.dmdR[1] && (this.dmd = this.dmdR[1]), (this.bCost *= e))
: ((this.dmd *= 1 / a), this.dmd < this.dmdR[0] && (this.dmd = this.dmdR[0]), (this.bCost *= 1 / e));
}
copy() {
const e = new i();
return (
(e.name = this.name),
(e.qty = this.qty),
(e.qlt = this.qlt),
(e.dmd = this.dmd),
(e.cmp = this.cmp),
(e.mv = this.mv),
(e.mku = this.mku),
(e.buy = this.buy),
(e.sll = this.sll),
(e.prd = this.prd),
(e.imp = this.imp),
(e.totalExp = this.totalExp),
(e.bCost = this.bCost),
(e.marketTa1 = this.marketTa1),
(e.marketTa2 = this.marketTa2),
(e.marketTa2Price = this.marketTa2Price),
(e.sCost = this.sCost),
(e.prdman = [this.prdman[0], this.prdman[1]]),
(e.sllman = [this.sllman[0], this.sllman[1]]),
(e.dmdR = this.dmdR.slice()),
(e.cmpR = this.cmpR.slice()),
(e.exp = this.exp.slice().map((e) => ({ ind: e.ind, city: e.city, amt: e.amt }))),
e
);
}
toJSON() {
return Object(n.b)("Material", this);
}
static fromJSON(e) {
return Object(n.a)(i, e.data);
}
}
n.c.constructors.Material = i;
},
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return s;
});
var n = a(494),
r = a(542),
i = a(21);
function o(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class s {
constructor(e = "") {
o(this, "alreadyInvited", !1),
o(this, "augmentations", []),
o(this, "favor", 0),
o(this, "isBanned", !1),
o(this, "isMember", !1),
o(this, "name", ""),
o(this, "playerReputation", 0),
o(this, "rolloverRep", 0),
(this.name = e);
}
getInfo() {
const e = n.a[this.name];
if (null == e)
throw new Error(
`Missing faction from FactionInfos: ${this.name} this probably means the faction got corrupted somehow`,
);
return e;
}
gainFavor() {
null == this.favor && (this.favor = 0), null == this.rolloverRep && (this.rolloverRep = 0);
const e = this.getFavorGain();
2 === e.length
? ((this.favor += e[0]), (this.rolloverRep = e[1]))
: console.error("Invalid result from getFavorGain() function");
}
getFavorGain() {
null == this.favor && (this.favor = 0), null == this.rolloverRep && (this.rolloverRep = 0);
const e = Math.max(0, Object(r.a)(this.favor - 1)) + this.rolloverRep + this.playerReputation,
t = Math.floor(Object(r.b)(e)),
a = Object(r.a)(t);
return [t - this.favor + 1, e - a];
}
toJSON() {
return Object(i.b)("Faction", this);
}
static fromJSON(e) {
return Object(i.a)(s, e.data);
}
}
i.c.constructors.Faction = s;
},
function (e, t, a) {
"use strict";
let n, r;
a.d(t, "b", function () {
return n;
}),
a.d(t, "a", function () {
return r;
}),
(function (e) {
(e[(e.Cost = 0)] = "Cost"),
(e[(e.Default = 1)] = "Default"),
(e[(e.Reputation = 2)] = "Reputation"),
(e[(e.Purchasable = 3)] = "Purchasable");
})(n || (n = {})),
(function (e) {
(e[(e.Alphabetically = 0)] = "Alphabetically"), (e[(e.AcquirementTime = 1)] = "AcquirementTime");
})(r || (r = {}));
},
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(0),
r = a.n(n);
function i(e) {
return (
Object(n.useEffect)(() => {
function t(t) {
if (!t.isTrusted) return;
e.onKeyDown.bind(this)(t);
}
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
}),
r.a.createElement(r.a.Fragment, null)
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return c;
});
var n = a(1457),
r = a(0),
i = a.n(r),
o = a(1455),
s = a(47);
const l = Object(o.a)((e) => ({
root: { backgroundColor: e.palette.background.paper },
bar: { transition: "none", backgroundColor: e.palette.primary.main },
}))(n.a);
function c(e) {
const [t, a] = Object(r.useState)(100);
return (
Object(r.useEffect)(() => {
const t = setInterval(() => {
a((t) => (t <= 0 && e.onExpire(), t - (200 / e.millis) * 100));
}, 200);
return () => {
clearInterval(t);
};
}, []),
i.a.createElement(
s.a,
{ item: !0, xs: 12 },
i.a.createElement(l, { variant: "determinate", value: t, color: "primary" }),
)
);
}
},
function (e, t, a) {
"use strict";
function n(e, t, a) {
function n(e, t, n) {
function r(e, t, a) {
return (1 - a) * e + a * t;
}
for (const i of Object.keys(e)) a[i] = r(e[i], t[i], n);
return e;
}
return t < 0
? n(e.Trivial, e.Trivial, 0)
: t >= 0 && t < 1
? n(e.Trivial, e.Normal, t)
: t >= 1 && t < 2
? n(e.Normal, e.Hard, t - 1)
: t >= 2 && t < 3
? n(e.Hard, e.Impossible, t - 2)
: n(e.Impossible, e.Impossible, 0);
}
a.d(t, "a", function () {
return n;
});
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = new Map();
},
function (e, t, a) {
"use strict";
a.d(t, "c", function () {
return i;
}),
a.d(t, "b", function () {
return o;
}),
a.d(t, "a", function () {
return s;
});
var n = a(0),
r = a(15);
function i(e, t) {
e.gainMoney(t), e.recordMoneySource(t, "casino");
}
function o(e) {
const t = e.getCasinoWinnings() > 1e10;
return (
t &&
Object(r.a)(
n.createElement(n.Fragment, null, "Alright cheater get out of here. You're not allowed here anymore."),
),
t
);
}
class s extends n.Component {
win(e, t) {
e.gainMoney(t), e.recordMoneySource(t, "casino");
}
reachedLimit(e) {
const t = e.getCasinoWinnings() > 1e10;
return (
t &&
Object(r.a)(
n.createElement(n.Fragment, null, "Alright cheater get out of here. You're not allowed here anymore."),
),
t
);
}
}
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return o;
}),
a.d(t, "c", function () {
return s;
}),
a.d(t, "d", function () {
return l;
}),
a.d(t, "a", function () {
return c;
});
var n = a(128),
r = a(66),
i = a(7);
function o(e, t, a) {
if (isNaN(t) || t <= 0 || !(e instanceof n.a)) return null;
t = Math.min(t, e.maxShares);
return a === r.a.Long
? t * e.getAskPrice() + i.a.StockMarketCommission
: t * e.getBidPrice() + i.a.StockMarketCommission;
}
function s(e, t, a) {
if (isNaN(t) || t <= 0 || !(e instanceof n.a)) return null;
t = Math.min(t, e.maxShares);
if (a === r.a.Long) return t * e.getBidPrice() - i.a.StockMarketCommission;
return t * e.playerAvgShortPx + ((e.playerAvgShortPx - e.getAskPrice()) * t - i.a.StockMarketCommission);
}
function l(e, t) {
if (isNaN(t) || t <= 0 || !(e instanceof n.a)) return;
t = Math.min(t, e.maxShares);
const a = e.shareTxUntilMovement;
if (t <= a)
return (
(e.shareTxUntilMovement -= t),
void (
e.shareTxUntilMovement <= 0 &&
((e.shareTxUntilMovement = e.shareTxForMovement),
e.influenceForecast(0.006),
e.influenceForecastForecast((e.mv / 100) * 0.006))
)
);
const r = t - a;
let i = 1 + Math.ceil(r / e.shareTxForMovement);
(e.shareTxUntilMovement = e.shareTxForMovement - ((t - e.shareTxUntilMovement) % e.shareTxForMovement)),
(e.shareTxUntilMovement === e.shareTxForMovement || e.shareTxUntilMovement <= 0) &&
(++i, (e.shareTxUntilMovement = e.shareTxForMovement));
const o = 0.006 * (i - 1),
s = o * (e.mv / 100);
e.influenceForecast(o), e.influenceForecastForecast(s);
}
function c(e, t, a) {
if (!(e instanceof n.a)) return 0;
const o = t === r.a.Long,
s = a - i.a.StockMarketCommission,
l = o ? e.getAskPrice() : e.getBidPrice();
return Math.floor(s / l);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(154),
r = a(911);
const i = {};
n.b.forEach((e) => {
i[e.name] = new r.a(e.name, e.cost, e.upgType, e.mults);
});
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(7);
function r(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class i {
constructor(e = "", t = "", a = 0, n = 0, i = 0, o = 0, s = {}) {
r(this, "difficulty", 0),
r(this, "karma", 0),
r(this, "kills", 0),
r(this, "money", 0),
r(this, "name", ""),
r(this, "time", 0),
r(this, "type", ""),
r(this, "hacking_success_weight", 0),
r(this, "strength_success_weight", 0),
r(this, "defense_success_weight", 0),
r(this, "dexterity_success_weight", 0),
r(this, "agility_success_weight", 0),
r(this, "charisma_success_weight", 0),
r(this, "hacking_exp", 0),
r(this, "strength_exp", 0),
r(this, "defense_exp", 0),
r(this, "dexterity_exp", 0),
r(this, "agility_exp", 0),
r(this, "charisma_exp", 0),
r(this, "intelligence_exp", 0),
(this.name = e),
(this.type = t),
(this.time = a),
(this.money = n),
(this.difficulty = i),
(this.karma = o),
(this.hacking_success_weight = s.hacking_success_weight ? s.hacking_success_weight : 0),
(this.strength_success_weight = s.strength_success_weight ? s.strength_success_weight : 0),
(this.defense_success_weight = s.defense_success_weight ? s.defense_success_weight : 0),
(this.dexterity_success_weight = s.dexterity_success_weight ? s.dexterity_success_weight : 0),
(this.agility_success_weight = s.agility_success_weight ? s.agility_success_weight : 0),
(this.charisma_success_weight = s.charisma_success_weight ? s.charisma_success_weight : 0),
(this.hacking_exp = s.hacking_exp ? s.hacking_exp : 0),
(this.strength_exp = s.strength_exp ? s.strength_exp : 0),
(this.defense_exp = s.defense_exp ? s.defense_exp : 0),
(this.dexterity_exp = s.dexterity_exp ? s.dexterity_exp : 0),
(this.agility_exp = s.agility_exp ? s.agility_exp : 0),
(this.charisma_exp = s.charisma_exp ? s.charisma_exp : 0),
(this.intelligence_exp = s.intelligence_exp ? s.intelligence_exp : 0),
(this.kills = s.kills ? s.kills : 0);
}
commit(e, t, a = 1, n = null) {
return (
a <= 0 && (a = 1),
t.startCrime(
e,
this.type,
this.hacking_exp / a,
this.strength_exp / a,
this.defense_exp / a,
this.dexterity_exp / a,
this.agility_exp / a,
this.charisma_exp / a,
this.money / a,
this.time,
n,
),
this.time
);
}
successRate(e) {
let t =
this.hacking_success_weight * e.hacking_skill +
this.strength_success_weight * e.strength +
this.defense_success_weight * e.defense +
this.dexterity_success_weight * e.dexterity +
this.agility_success_weight * e.agility +
this.charisma_success_weight * e.charisma +
n.a.IntelligenceCrimeWeight * e.intelligence;
return (
(t /= n.a.MaxSkillLevel),
(t /= this.difficulty),
(t *= e.crime_success_mult),
(t *= e.getIntelligenceBonus(1)),
Math.min(t, 1)
);
}
}
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return c;
}),
a.d(t, "a", function () {
return u;
});
var n = a(8),
r = a(22),
i = a(7),
o = a(231),
s = a(350);
function l(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
function c() {
return { hack: 0, str: 0, def: 0, dex: 0, agi: 0, cha: 0, money: 0 };
}
class u {
constructor() {
l(this, "hacking_skill", 1),
l(this, "strength", 1),
l(this, "defense", 1),
l(this, "dexterity", 1),
l(this, "agility", 1),
l(this, "charisma", 1),
l(this, "intelligence", 1),
l(this, "hp", 10),
l(this, "max_hp", 10),
l(this, "hacking_exp", 0),
l(this, "strength_exp", 0),
l(this, "defense_exp", 0),
l(this, "dexterity_exp", 0),
l(this, "agility_exp", 0),
l(this, "charisma_exp", 0),
l(this, "intelligence_exp", 0),
l(this, "hacking_mult", 1),
l(this, "strength_mult", 1),
l(this, "defense_mult", 1),
l(this, "dexterity_mult", 1),
l(this, "agility_mult", 1),
l(this, "charisma_mult", 1),
l(this, "hacking_exp_mult", 1),
l(this, "strength_exp_mult", 1),
l(this, "defense_exp_mult", 1),
l(this, "dexterity_exp_mult", 1),
l(this, "agility_exp_mult", 1),
l(this, "charisma_exp_mult", 1),
l(this, "hacking_chance_mult", 1),
l(this, "hacking_speed_mult", 1),
l(this, "hacking_money_mult", 1),
l(this, "hacking_grow_mult", 1),
l(this, "company_rep_mult", 1),
l(this, "faction_rep_mult", 1),
l(this, "crime_money_mult", 1),
l(this, "crime_success_mult", 1),
l(this, "work_money_mult", 1),
l(this, "hacknet_node_money_mult", 1),
l(this, "hacknet_node_purchase_cost_mult", 1),
l(this, "hacknet_node_ram_cost_mult", 1),
l(this, "hacknet_node_core_cost_mult", 1),
l(this, "hacknet_node_level_cost_mult", 1),
l(this, "bladeburner_max_stamina_mult", 1),
l(this, "bladeburner_stamina_gain_mult", 1),
l(this, "bladeburner_analysis_mult", 1),
l(this, "bladeburner_success_chance_mult", 1),
l(this, "augmentations", []),
l(this, "queuedAugmentations", []),
l(this, "city", r.a.Sector12);
}
applyAugmentation(e) {
for (const t in e.mults)
null == this[t]
? console.warn("Augmentation has unrecognized multiplier property: " + t)
: (this[t] *= e.mults[t]);
}
calculateStat(e, t = 1) {
return Object(o.b)(e, t);
}
getFactionFieldWorkRepGain() {
return (
((0.9 *
(this.hacking_skill / i.a.MaxSkillLevel +
this.strength / i.a.MaxSkillLevel +
this.defense / i.a.MaxSkillLevel +
this.dexterity / i.a.MaxSkillLevel +
this.agility / i.a.MaxSkillLevel +
this.charisma / i.a.MaxSkillLevel)) /
5.5) *
this.faction_rep_mult
);
}
getFactionHackingWorkRepGain() {
return (this.hacking_skill / i.a.MaxSkillLevel) * this.faction_rep_mult;
}
getFactionSecurityWorkRepGain() {
return (
((0.9 *
(this.hacking_skill / i.a.MaxSkillLevel +
this.strength / i.a.MaxSkillLevel +
this.defense / i.a.MaxSkillLevel +
this.dexterity / i.a.MaxSkillLevel +
this.agility / i.a.MaxSkillLevel)) /
4.5) *
this.faction_rep_mult
);
}
resetMultipliers() {
(this.hacking_mult = 1),
(this.strength_mult = 1),
(this.defense_mult = 1),
(this.dexterity_mult = 1),
(this.agility_mult = 1),
(this.charisma_mult = 1),
(this.hacking_exp_mult = 1),
(this.strength_exp_mult = 1),
(this.defense_exp_mult = 1),
(this.dexterity_exp_mult = 1),
(this.agility_exp_mult = 1),
(this.charisma_exp_mult = 1),
(this.company_rep_mult = 1),
(this.faction_rep_mult = 1),
(this.crime_money_mult = 1),
(this.crime_success_mult = 1),
(this.work_money_mult = 1);
}
updateStatLevels() {
(this.hacking_skill = Math.max(
1,
Math.floor(this.calculateStat(this.hacking_exp, this.hacking_mult * n.a.HackingLevelMultiplier)),
)),
(this.strength = Math.max(
1,
Math.floor(this.calculateStat(this.strength_exp, this.strength_mult * n.a.StrengthLevelMultiplier)),
)),
(this.defense = Math.max(
1,
Math.floor(this.calculateStat(this.defense_exp, this.defense_mult * n.a.DefenseLevelMultiplier)),
)),
(this.dexterity = Math.max(
1,
Math.floor(this.calculateStat(this.dexterity_exp, this.dexterity_mult * n.a.DexterityLevelMultiplier)),
)),
(this.agility = Math.max(
1,
Math.floor(this.calculateStat(this.agility_exp, this.agility_mult * n.a.AgilityLevelMultiplier)),
)),
(this.charisma = Math.max(
1,
Math.floor(this.calculateStat(this.charisma_exp, this.charisma_mult * n.a.CharismaLevelMultiplier)),
));
const e = this.hp / this.max_hp;
(this.max_hp = Math.floor(10 + this.defense / 10)), (this.hp = Math.round(this.max_hp * e));
}
getIntelligenceBonus(e) {
return Object(s.a)(this.intelligence, e);
}
}
},
,
,
,
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return s;
}),
a.d(t, "b", function () {
return l;
});
var n = a(0),
r = a.n(n),
i = a(8);
class o {
constructor(e, t, a, n = "", i = r.a.createElement(r.a.Fragment, null)) {
(this.number = e), (this.difficulty = t), (this.name = a), (this.desc = n), (this.info = i);
}
}
const s = {};
function l(e) {
null == e.bitNodeN && (e.bitNodeN = 1);
for (const e in i.a) i.a.hasOwnProperty(e) && (i.a[e] = 1);
switch (e.bitNodeN) {
case 1:
break;
case 2:
(i.a.HackingLevelMultiplier = 0.8),
(i.a.ServerGrowthRate = 0.8),
(i.a.ServerMaxMoney = 0.2),
(i.a.ServerStartingMoney = 0.4),
(i.a.CrimeMoney = 3),
(i.a.InfiltrationMoney = 3),
(i.a.FactionWorkRepGain = 0.5),
(i.a.FactionPassiveRepGain = 0),
(i.a.GangKarmaRequirement = 0);
break;
case 3:
(i.a.HackingLevelMultiplier = 0.8),
(i.a.RepToDonateToFaction = 0.5),
(i.a.AugmentationRepCost = 3),
(i.a.AugmentationMoneyCost = 3),
(i.a.ServerMaxMoney = 0.2),
(i.a.ServerStartingMoney = 0.2),
(i.a.ServerGrowthRate = 0.2),
(i.a.ScriptHackMoney = 0.2),
(i.a.CompanyWorkMoney = 0.25),
(i.a.CrimeMoney = 0.25),
(i.a.HacknetNodeMoney = 0.25),
(i.a.HomeComputerRamCost = 1.5),
(i.a.PurchasedServerCost = 2),
(i.a.GangKarmaRequirement = 3);
break;
case 4:
(i.a.ServerMaxMoney = 0.15),
(i.a.ServerStartingMoney = 0.75),
(i.a.ScriptHackMoney = 0.2),
(i.a.CompanyWorkMoney = 0.1),
(i.a.CrimeMoney = 0.2),
(i.a.HacknetNodeMoney = 0.05),
(i.a.CompanyWorkExpGain = 0.5),
(i.a.ClassGymExpGain = 0.5),
(i.a.FactionWorkExpGain = 0.5),
(i.a.HackExpGain = 0.4),
(i.a.CrimeExpGain = 0.5),
(i.a.FactionWorkRepGain = 0.75);
break;
case 5:
(i.a.ServerMaxMoney = 2),
(i.a.ServerStartingSecurity = 2),
(i.a.ServerStartingMoney = 0.5),
(i.a.ScriptHackMoney = 0.15),
(i.a.HacknetNodeMoney = 0.2),
(i.a.CrimeMoney = 0.5),
(i.a.InfiltrationRep = 1.5),
(i.a.InfiltrationMoney = 1.5),
(i.a.AugmentationMoneyCost = 2),
(i.a.HackExpGain = 0.5),
(i.a.CorporationValuation = 0.5);
break;
case 6:
(i.a.HackingLevelMultiplier = 0.35),
(i.a.ServerMaxMoney = 0.4),
(i.a.ServerStartingMoney = 0.5),
(i.a.ServerStartingSecurity = 1.5),
(i.a.ScriptHackMoney = 0.75),
(i.a.CompanyWorkMoney = 0.5),
(i.a.CrimeMoney = 0.75),
(i.a.InfiltrationMoney = 0.75),
(i.a.CorporationValuation = 0.2),
(i.a.HacknetNodeMoney = 0.2),
(i.a.FactionPassiveRepGain = 0),
(i.a.HackExpGain = 0.25),
(i.a.DaedalusAugsRequirement = 1.166),
(i.a.GangKarmaRequirement = 5);
break;
case 7:
(i.a.BladeburnerRank = 0.6),
(i.a.BladeburnerSkillCost = 2),
(i.a.AugmentationMoneyCost = 3),
(i.a.HackingLevelMultiplier = 0.35),
(i.a.ServerMaxMoney = 0.4),
(i.a.ServerStartingMoney = 0.5),
(i.a.ServerStartingSecurity = 1.5),
(i.a.ScriptHackMoney = 0.5),
(i.a.CompanyWorkMoney = 0.5),
(i.a.CrimeMoney = 0.75),
(i.a.InfiltrationMoney = 0.75),
(i.a.CorporationValuation = 0.2),
(i.a.HacknetNodeMoney = 0.2),
(i.a.FactionPassiveRepGain = 0),
(i.a.HackExpGain = 0.25),
(i.a.FourSigmaMarketDataCost = 2),
(i.a.FourSigmaMarketDataApiCost = 2),
(i.a.DaedalusAugsRequirement = 1.166),
(i.a.GangKarmaRequirement = 5);
break;
case 8:
(i.a.ScriptHackMoney = 0.3),
(i.a.ScriptHackMoneyGain = 0),
(i.a.ManualHackMoney = 0),
(i.a.CompanyWorkMoney = 0),
(i.a.CrimeMoney = 0),
(i.a.HacknetNodeMoney = 0),
(i.a.InfiltrationMoney = 0),
(i.a.RepToDonateToFaction = 0),
(i.a.CorporationValuation = 0),
(i.a.CodingContractMoney = 0),
(i.a.GangKarmaRequirement = 10);
break;
case 9:
(i.a.HackingLevelMultiplier = 0.4),
(i.a.StrengthLevelMultiplier = 0.45),
(i.a.DefenseLevelMultiplier = 0.45),
(i.a.DexterityLevelMultiplier = 0.45),
(i.a.AgilityLevelMultiplier = 0.45),
(i.a.CharismaLevelMultiplier = 0.45),
(i.a.PurchasedServerLimit = 0),
(i.a.HomeComputerRamCost = 5),
(i.a.CrimeMoney = 0.5),
(i.a.ScriptHackMoney = 0.1),
(i.a.HackExpGain = 0.05),
(i.a.ServerStartingMoney = 0.1),
(i.a.ServerMaxMoney = 0.1),
(i.a.ServerStartingSecurity = 2.5),
(i.a.CorporationValuation = 0.5),
(i.a.FourSigmaMarketDataCost = 5),
(i.a.FourSigmaMarketDataApiCost = 4),
(i.a.BladeburnerRank = 0.9),
(i.a.BladeburnerSkillCost = 1.2),
(i.a.GangKarmaRequirement = 3);
break;
case 10:
(i.a.HackingLevelMultiplier = 0.2),
(i.a.StrengthLevelMultiplier = 0.4),
(i.a.DefenseLevelMultiplier = 0.4),
(i.a.DexterityLevelMultiplier = 0.4),
(i.a.AgilityLevelMultiplier = 0.4),
(i.a.CharismaLevelMultiplier = 0.4),
(i.a.CompanyWorkMoney = 0.5),
(i.a.CrimeMoney = 0.5),
(i.a.HacknetNodeMoney = 0.5),
(i.a.ManualHackMoney = 0.5),
(i.a.ScriptHackMoney = 0.5),
(i.a.CodingContractMoney = 0.5),
(i.a.InfiltrationMoney = 0.5),
(i.a.CorporationValuation = 0.5),
(i.a.AugmentationMoneyCost = 5),
(i.a.AugmentationRepCost = 2),
(i.a.HomeComputerRamCost = 1.5),
(i.a.PurchasedServerCost = 5),
(i.a.PurchasedServerLimit = 0.6),
(i.a.PurchasedServerMaxRam = 0.5),
(i.a.BladeburnerRank = 0.8),
(i.a.GangKarmaRequirement = 3);
break;
case 11:
(i.a.HackingLevelMultiplier = 0.5),
(i.a.HackExpGain = 0.5),
(i.a.ServerMaxMoney = 0.1),
(i.a.ServerStartingMoney = 0.1),
(i.a.ServerGrowthRate = 0.2),
(i.a.ServerWeakenRate = 2),
(i.a.CrimeMoney = 3),
(i.a.CompanyWorkMoney = 0.5),
(i.a.HacknetNodeMoney = 0.1),
(i.a.AugmentationMoneyCost = 2),
(i.a.InfiltrationMoney = 2.5),
(i.a.InfiltrationRep = 2.5),
(i.a.CorporationValuation = 0.1),
(i.a.CodingContractMoney = 0.25),
(i.a.FourSigmaMarketDataCost = 4),
(i.a.FourSigmaMarketDataApiCost = 4);
break;
case 12: {
let t = 0;
for (let a = 0; a < e.sourceFiles.length; a++) 12 === e.sourceFiles[a].n && (t = e.sourceFiles[a].lvl);
const a = Math.pow(1.02, t),
n = 1 / a;
(i.a.DaedalusAugsRequirement = Math.min(a, 1.34)),
(i.a.HackingLevelMultiplier = n),
(i.a.StrengthLevelMultiplier = n),
(i.a.DefenseLevelMultiplier = n),
(i.a.DexterityLevelMultiplier = n),
(i.a.AgilityLevelMultiplier = n),
(i.a.CharismaLevelMultiplier = n),
(i.a.ServerMaxMoney = n),
(i.a.ServerStartingMoney = n),
(i.a.ServerGrowthRate = n),
(i.a.ServerWeakenRate = n),
(i.a.ServerStartingSecurity = 1.5),
(i.a.HomeComputerRamCost = a),
(i.a.PurchasedServerCost = a),
(i.a.PurchasedServerLimit = n),
(i.a.PurchasedServerMaxRam = n),
(i.a.ManualHackMoney = n),
(i.a.ScriptHackMoney = n),
(i.a.CompanyWorkMoney = n),
(i.a.CrimeMoney = n),
(i.a.HacknetNodeMoney = n),
(i.a.CodingContractMoney = n),
(i.a.CompanyWorkExpGain = n),
(i.a.ClassGymExpGain = n),
(i.a.FactionWorkExpGain = n),
(i.a.HackExpGain = n),
(i.a.CrimeExpGain = n),
(i.a.FactionWorkRepGain = n),
(i.a.FactionPassiveRepGain = n),
(i.a.RepToDonateToFaction = a),
(i.a.AugmentationRepCost = a),
(i.a.AugmentationMoneyCost = a),
(i.a.InfiltrationMoney = n),
(i.a.InfiltrationRep = n),
(i.a.FourSigmaMarketDataCost = a),
(i.a.FourSigmaMarketDataApiCost = a),
(i.a.CorporationValuation = n),
(i.a.BladeburnerRank = n),
(i.a.BladeburnerSkillCost = a);
break;
}
default:
console.warn("Player.bitNodeN invalid");
}
}
(s.BitNode1 = new o(
1,
0,
"Source Genesis",
"The original BitNode",
r.a.createElement(
r.a.Fragment,
null,
"The first BitNode created by the Enders to imprison the minds of humans. It became the prototype and testing-grounds for all of the BitNodes that followed.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"This is the first BitNode that you play through. It has no special modifications or mechanics.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Destroying this BitNode will give you Source-File 1, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets the player start with 32GB of RAM on his/her home computer when entering a new BitNode, and also increases all of the player's multipliers by:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: 16%",
r.a.createElement("br", null),
"Level 2: 24%",
r.a.createElement("br", null),
"Level 3: 28%",
),
)),
(s.BitNode2 = new o(
2,
0,
"Rise of the Underworld",
"From the shadows, they rose",
r.a.createElement(
r.a.Fragment,
null,
"From the shadows, they rose.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the 2050s. As society and civlization broke down, people quickly succumbed to the innate human impulse of evil and savagery. The organized crime factions quickly rose to the top of the modern world.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"In this BitNode:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Your hacking level is reduced by 20%",
r.a.createElement("br", null),
"The growth rate and maximum amount of money available on servers are significantly decreased",
r.a.createElement("br", null),
"The amount of money gained from crimes and Infiltration is tripled",
r.a.createElement("br", null),
"Certain Factions (Slum Snakes, Tetrads, The Syndicate, The Dark Army, Speakers for the Dead, NiteSec, The Black Hand) give the player the ability to form and manage their own gangs. These gangs will earn the player money and reputation with the corresponding Faction",
r.a.createElement("br", null),
"Every Augmentation in the game will be available through the Factions listed above",
r.a.createElement("br", null),
"For every Faction NOT listed above, reputation gains are halved",
r.a.createElement("br", null),
"You will no longer gain passive reputation with Factions",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Destroying this BitNode will give you Source-File 2, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value. It also increases the player's crime success rate, crime money, and charisma multipliers by:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: 24%",
r.a.createElement("br", null),
"Level 2: 36%",
r.a.createElement("br", null),
"Level 3: 42%",
),
)),
(s.BitNode3 = new o(
3,
0,
"Corporatocracy",
"The Price of Civilization",
r.a.createElement(
r.a.Fragment,
null,
"Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Sometime in the early 21st century economic and political globalization turned the world into a corporatocracy, and it never looked back. Now, the privileged elite will happily bankrupt their own countrymen, decimate their own community, and evict their neighbors from houses in their desperate bid to increase their wealth.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"In this BitNode you can create and manage your own corporation. Running a successful corporation has the potential of generating massive profits. All other forms of income are reduced by 75%. Furthermore: ",
r.a.createElement("br", null),
r.a.createElement("br", null),
"The price and reputation cost of all Augmentations is tripled",
r.a.createElement("br", null),
"The starting and maximum amount of money on servers is reduced by 75%",
r.a.createElement("br", null),
"Server growth rate is reduced by 80%",
r.a.createElement("br", null),
"You now only need 75 favour with a faction in order to donate to it, rather than 150",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Destroying this BitNode will give you Source-File 3, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:",
r.a.createElement("br", null),
"Level 1: 8%",
r.a.createElement("br", null),
"Level 2: 12%",
r.a.createElement("br", null),
"Level 3: 14%",
),
)),
(s.BitNode4 = new o(
4,
1,
"The Singularity",
"The Man and the Machine",
r.a.createElement(
r.a.Fragment,
null,
"The Singularity has arrived. The human race is gone, replaced by artificially superintelligent beings that are more machine than man. ",
r.a.createElement("br", null),
r.a.createElement("br", null),
"In this BitNode, progressing is significantly harder. Experience gain rates for all stats are reduced. Most methods of earning money will now give significantly less.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions. These functions allow you to control most aspects of the game through scripts, including working for factions/companies, purchasing/installing Augmentations, and creating programs.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Destroying this BitNode will give you Source-File 4, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File lets you access and use the Singularity Functions in other BitNodes. Each level of this Source-File will open up more Singularity Functions that you can use.",
),
)),
(s.BitNode5 = new o(
5,
1,
"Artificial Intelligence",
"Posthuman",
r.a.createElement(
r.a.Fragment,
null,
"They said it couldn't be done. They said the human brain, along with its consciousness and intelligence, couldn't be replicated. They said the complexity of the brain results from unpredictable, nonlinear interactions that couldn't be modeled by 1's and 0's. They were wrong.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"In this BitNode:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"The base security level of servers is doubled",
r.a.createElement("br", null),
"The starting money on servers is halved, but the maximum money remains the same",
r.a.createElement("br", null),
"Most methods of earning money now give significantly less",
r.a.createElement("br", null),
"Infiltration gives 50% more reputation and money",
r.a.createElement("br", null),
"Corporations have 50% lower valuations and are therefore less profitable",
r.a.createElement("br", null),
"Augmentations are more expensive",
r.a.createElement("br", null),
"Hacking experience gain rates are reduced",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Destroying this BitNode will give you Source-File 5, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants you a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. ",
r.a.createElement("br", null),
r.a.createElement("br", null),
"In addition, this Source-File will unlock the getBitNodeMultipliers() and getServer() Netscript functions, as well as the formulas API, and will also raise all of your hacking-related multipliers by:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: 8%",
r.a.createElement("br", null),
"Level 2: 12%",
r.a.createElement("br", null),
"Level 3: 14%",
),
)),
(s.BitNode6 = new o(
6,
1,
"Bladeburners",
"Like Tears in Rain",
r.a.createElement(
r.a.Fragment,
null,
"In the middle of the 21st century, OmniTek Incorporated began designing and manufacturing advanced synthetic androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth generation of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than the humans that had created them.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides a new mechanic for progression. Furthermore:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Hacking and Hacknet Nodes will be less profitable",
r.a.createElement("br", null),
"Your hacking level is reduced by 65%",
r.a.createElement("br", null),
"Hacking experience gain from scripts is reduced by 75%",
r.a.createElement("br", null),
"Corporations have 80% lower valuations and are therefore less profitable",
r.a.createElement("br", null),
"Working for companies is 50% less profitable",
r.a.createElement("br", null),
"Crimes and Infiltration are 25% less profitable",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: 8%",
r.a.createElement("br", null),
"Level 2: 12%",
r.a.createElement("br", null),
"Level 3: 14%",
),
)),
(s.BitNode7 = new o(
7,
2,
"Bladeburners 2079",
"More human than humans",
r.a.createElement(
r.a.Fragment,
null,
"In the middle of the 21st century, you were doing cutting-edge work at OmniTek Incorporated as part of the AI design team for advanced synthetic androids, or Synthoids for short. You helped achieve a major technological breakthrough in the sixth generation of the company's Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than the humans that had created them.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"In this BitNode you will be able to access the Bladeburner API, which allows you to access Bladeburner functionality through Netscript. Furthermore: ",
r.a.createElement("br", null),
r.a.createElement("br", null),
"The rank you gain from Bladeburner contracts/operations is reduced by 40%",
r.a.createElement("br", null),
"Bladeburner skills cost twice as many skill points",
r.a.createElement("br", null),
"Augmentations are 3x more expensive",
r.a.createElement("br", null),
"Hacking and Hacknet Nodes will be significantly less profitable",
r.a.createElement("br", null),
"Your hacking level is reduced by 65%",
r.a.createElement("br", null),
"Hacking experience gain from scripts is reduced by 75%",
r.a.createElement("br", null),
"Corporations have 80% lower valuations and are therefore less profitable",
r.a.createElement("br", null),
"Working for companies is 50% less profitable",
r.a.createElement("br", null),
"Crimes and Infiltration are 25% less profitable",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Destroying this BitNode will give you Source-File 7, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: 8%",
r.a.createElement("br", null),
"Level 2: 12%",
r.a.createElement("br", null),
"Level 3: 14%",
),
)),
(s.BitNode8 = new o(
8,
2,
"Ghost of Wall Street",
"Money never sleeps",
r.a.createElement(
r.a.Fragment,
null,
"You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"In this BitNode:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"You start with $250 million",
r.a.createElement("br", null),
"The only way to earn money is by trading on the stock market",
r.a.createElement("br", null),
"You start with a WSE membership and access to the TIX API",
r.a.createElement("br", null),
"You are able to short stocks and place different types of orders (limit/stop)",
r.a.createElement("br", null),
"You can immediately donate to factions to gain reputation",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Destroying this BitNode will give you Source-File 8, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants the following benefits:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: Permanent access to WSE and TIX API",
r.a.createElement("br", null),
"Level 2: Ability to short stocks in other BitNodes",
r.a.createElement("br", null),
"Level 3: Ability to use limit/stop orders in other BitNodes",
r.a.createElement("br", null),
r.a.createElement("br", null),
"This Source-File also increases your hacking growth multipliers by:",
r.a.createElement("br", null),
"Level 1: 12%",
r.a.createElement("br", null),
"Level 2: 18%",
r.a.createElement("br", null),
"Level 3: 21%",
),
)),
(s.BitNode9 = new o(
9,
2,
"Hacktocracy",
"Hacknet Unleashed",
r.a.createElement(
r.a.Fragment,
null,
"When Fulcrum Technologies released their open-source Linux distro Chapeau, it quickly became the OS of choice for the underground hacking community. Chapeau became especially notorious for powering the Hacknet, a global, decentralized network used for nefarious purposes. Fulcrum quickly abandoned the project and dissociated themselves from it.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"This BitNode unlocks the Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers generate hashes, which can be spent on a variety of different upgrades.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"In this BitNode:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Your stats are significantly decreased",
r.a.createElement("br", null),
"You cannnot purchase additional servers",
r.a.createElement("br", null),
"Hacking is significantly less profitable",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Destroying this BitNode will give you Source-File 9, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File grants the following benefits:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: Permanently unlocks the Hacknet Server in other BitNodes",
r.a.createElement("br", null),
"Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode",
r.a.createElement("br", null),
"Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode",
r.a.createElement("br", null),
r.a.createElement("br", null),
"(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing Augmentations)",
r.a.createElement("br", null),
r.a.createElement("br", null),
"This Source-File also increases your hacknet multipliers by:",
r.a.createElement("br", null),
"Level 1: 8%",
r.a.createElement("br", null),
"Level 2: 12%",
r.a.createElement("br", null),
"Level 3: 14%",
),
)),
(s.BitNode10 = new o(
10,
2,
"Digital Carbon",
"Your body is not who you are",
r.a.createElement(
r.a.Fragment,
null,
"In 2084, VitaLife unveiled to the world the Persona Core, a technology that allowed people to digitize their consciousness. Their consciousness could then be transferred into Synthoids or other bodies by trasmitting the digitized data. Human bodies became nothing more than 'sleeves' for the human consciousness. Mankind had finally achieved immortality - at least for those that could afford it.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"This BitNode unlocks Sleeve technology. Sleeve technology allows you to:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"1. Re-sleeve: Purchase and transfer your consciousness into a new body",
r.a.createElement("br", null),
"2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks synchronously",
r.a.createElement("br", null),
r.a.createElement("br", null),
"In this BitNode:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Your stats are significantly decreased",
r.a.createElement("br", null),
"All methods of gaining money are half as profitable (except Stock Market)",
r.a.createElement("br", null),
"Purchased servers are more expensive, have less max RAM, and a lower maximum limit",
r.a.createElement("br", null),
"Augmentations are 5x as expensive and require twice as much reputation",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Destroying this BitNode will give you Source-File 10, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve",
),
)),
(s.BitNode11 = new o(
11,
1,
"The Big Crash",
"Okay. Sell it all.",
r.a.createElement(
r.a.Fragment,
null,
"The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around the world. It was this period of disorder that eventually lead to the governmental reformation of many global superpowers, most notably the USA and China. But just as the world was slowly beginning to recover from these dark times, financial catastrophe hit.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of this chaos and confusion, hackers were able to steal billions of dollars from the world's largest electronic banks, prompting an international banking crisis as governments were unable to bail out insolvent banks. Now, the world is slowly crumbling in the middle of the biggest economic crisis of all time.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"In this BitNode:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Your hacking stat and experience gain are halved",
r.a.createElement("br", null),
"The starting and maximum amount of money available on servers is significantly decreased",
r.a.createElement("br", null),
"The growth rate of servers is significantly reduced",
r.a.createElement("br", null),
"Weakening a server is twice as effective",
r.a.createElement("br", null),
"Company wages are decreased by 50%",
r.a.createElement("br", null),
"Corporation valuations are 90% lower and are therefore significantly less profitable",
r.a.createElement("br", null),
"Hacknet Node production is significantly decreased",
r.a.createElement("br", null),
"Crime and Infiltration are more lucrative",
r.a.createElement("br", null),
"Augmentations are twice as expensive",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Destroying this BitNode will give you Source-File 11, or if you already have this Source-File it will upgrade its level up to a maximum of 3. This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's company salary and reputation gain multipliers by:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: 32%",
r.a.createElement("br", null),
"Level 2: 48%",
r.a.createElement("br", null),
"Level 3: 56%",
r.a.createElement("br", null),
r.a.createElement("br", null),
"It also reduces the price increase for every aug bought by:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: 4%",
r.a.createElement("br", null),
"Level 2: 6%",
r.a.createElement("br", null),
"Level 3: 7%",
),
)),
(s.BitNode12 = new o(
12,
0,
"The Recursion",
"Repeat.",
r.a.createElement(
r.a.Fragment,
null,
"To iterate is human, to recurse divine.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give you Source-File 12, or if you already have this Source-File it will upgrade its level. There is no maximum level for Source-File 12. Each level of Source-File 12 lets you start any BitNodes with NeuroFlux Governor equal to the level of this source file.",
),
)),
(s.BitNode13 = new o(13, 2, "fOS", "COMING SOON")),
(s.BitNode14 = new o(14, 2, "", "COMING SOON")),
(s.BitNode15 = new o(15, 2, "", "COMING SOON")),
(s.BitNode16 = new o(16, 2, "", "COMING SOON")),
(s.BitNode17 = new o(17, 2, "", "COMING SOON")),
(s.BitNode18 = new o(18, 2, "", "COMING SOON")),
(s.BitNode19 = new o(19, 2, "", "COMING SOON")),
(s.BitNode20 = new o(20, 2, "", "COMING SOON")),
(s.BitNode21 = new o(21, 2, "", "COMING SOON")),
(s.BitNode22 = new o(22, 2, "", "COMING SOON")),
(s.BitNode23 = new o(23, 2, "", "COMING SOON")),
(s.BitNode24 = new o(24, 2, "", "COMING SOON"));
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return I;
});
var n = a(21),
r = a(218),
i = a(38),
o = a(620),
s = a(232),
l = a(116),
c = a(304),
u = a(544),
m = a(233),
h = a(23),
d = a(216),
p = a(208),
f = a(366),
g = a(545),
y = a(228),
b = a(30),
E = a(55),
v = a(4),
k = a(8),
_ = a(260),
w = a(172),
C = a(25),
S = a(351),
x = a(224),
O = a(15),
T = a(14),
M = a(20),
R = a(6),
P = a(346),
A = a(117);
function N(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class I {
constructor(e) {
N(this, "numHosp", 0),
N(this, "moneyLost", 0),
N(this, "rank", 0),
N(this, "maxRank", 0),
N(this, "skillPoints", 0),
N(this, "totalSkillPoints", 0),
N(this, "teamSize", 0),
N(this, "teamLost", 0),
N(this, "hpLost", 0),
N(this, "storedCycles", 0),
N(this, "randomEventCounter", Object(b.a)(240, 600)),
N(this, "actionTimeToComplete", 0),
N(this, "actionTimeCurrent", 0),
N(this, "actionTimeOverflow", 0),
N(this, "action", new r.a({ type: i.a.Idle })),
N(this, "cities", {}),
N(this, "city", E.a.CityNames[2]),
N(this, "skills", {}),
N(this, "skillMultipliers", {}),
N(this, "staminaBonus", 0),
N(this, "maxStamina", 0),
N(this, "stamina", 0),
N(this, "contracts", {}),
N(this, "operations", {}),
N(this, "blackops", {}),
N(this, "logging", { general: !0, contracts: !0, ops: !0, blackops: !0, events: !0 }),
N(this, "automateEnabled", !1),
N(this, "automateActionHigh", new r.a({ type: i.a.Idle })),
N(this, "automateThreshHigh", 0),
N(this, "automateActionLow", new r.a({ type: i.a.Idle })),
N(this, "automateThreshLow", 0),
N(this, "consoleHistory", []),
N(this, "consoleLogs", ["Bladeburner Console", "Type 'help' to see console commands"]);
for (let e = 0; e < E.a.CityNames.length; ++e) this.cities[E.a.CityNames[e]] = new f.a(E.a.CityNames[e]);
this.updateSkillMultipliers(),
e && this.calculateMaxStamina(e),
(this.stamina = this.maxStamina),
this.create();
}
getCurrentCity() {
const e = this.cities[this.city];
if (!(e instanceof f.a)) throw new Error("Bladeburner.getCurrentCity() did not properly return a City object");
return e;
}
calculateStaminaPenalty() {
return Math.min(1, this.stamina / (0.5 * this.maxStamina));
}
startAction(e, t) {
if (null != t)
switch (((this.action = t), (this.actionTimeCurrent = 0), t.type)) {
case i.a.Idle:
this.actionTimeToComplete = 0;
break;
case i.a.Contract:
try {
const e = this.getActionObject(t);
if (null == e) throw new Error("Failed to get Contract Object for: " + t.name);
if (e.count < 1) return this.resetAction();
this.actionTimeToComplete = e.getActionTime(this);
} catch (e) {
Object(y.a)(e);
}
break;
case i.a.Operation:
try {
const e = this.getActionObject(t);
if (null == e) throw new Error("Failed to get Operation Object for: " + t.name);
if (e.count < 1) return this.resetAction();
if ("Raid" === t.name && 0 === this.getCurrentCity().commsEst) return this.resetAction();
this.actionTimeToComplete = e.getActionTime(this);
} catch (e) {
Object(y.a)(e);
}
break;
case i.a.BlackOp:
case i.a.BlackOperation:
try {
if (null != this.blackops[t.name]) {
this.resetAction(),
this.log("Error: Tried to start a Black Operation that had already been completed");
break;
}
const e = this.getActionObject(t);
if (null == e) throw new Error("Failed to get BlackOperation object for: " + t.name);
this.actionTimeToComplete = e.getActionTime(this);
} catch (e) {
Object(y.a)(e);
}
break;
case i.a.Recruitment:
this.actionTimeToComplete = this.getRecruitmentTime(e);
break;
case i.a.Training:
case i.a.FieldAnalysis:
case i.a["Field Analysis"]:
this.actionTimeToComplete = 30;
break;
case i.a.Diplomacy:
case i.a["Hyperbolic Regeneration Chamber"]:
this.actionTimeToComplete = 60;
break;
default:
throw new Error("Invalid Action Type in startAction(Bladeburner,player, ): " + t.type);
}
}
upgradeSkill(e) {
const t = e.name;
if ((this.skills[t] ? ++this.skills[t] : (this.skills[t] = 1), isNaN(this.skills[t]) || this.skills[t] < 0))
throw new Error("Level of Skill " + t + " is invalid: " + this.skills[t]);
this.updateSkillMultipliers();
}
executeConsoleCommands(e, t) {
try {
this.consoleHistory[this.consoleHistory.length - 1] != t &&
(this.consoleHistory.push(t), this.consoleHistory.length > 50 && this.consoleHistory.splice(0, 1));
const a = t.split(";");
for (let t = 0; t < a.length; ++t) this.executeConsoleCommand(e, a[t]);
} catch (e) {
Object(y.a)(e);
}
}
postToConsole(e, t = !0) {
t && (this.consoleLogs.push(e), this.consoleLogs.length > 100 && this.consoleLogs.shift());
}
log(e) {
this.postToConsole(`[${Object(P.a)()}] ${e}`);
}
resetAction() {
this.action = new r.a({ type: i.a.Idle });
}
clearConsole() {
this.consoleLogs.length = 0;
}
prestige() {
this.resetAction();
const e = C.a.Bladeburners;
this.rank >= E.a.RankNeededForFaction && Object(A.d)(e);
}
storeCycles(e = 0) {
this.storedCycles += e;
}
getActionIdFromTypeAndName(e = "", t = "") {
if ("" === e || "" === t) return null;
const a = new r.a(),
n = e.toLowerCase().trim(),
o = t.toLowerCase().trim();
switch (n) {
case "contract":
case "contracts":
case "contr":
return (a.type = i.a.Contract), this.contracts.hasOwnProperty(t) ? ((a.name = t), a) : null;
case "operation":
case "operations":
case "op":
case "ops":
return (a.type = i.a.Operation), this.operations.hasOwnProperty(t) ? ((a.name = t), a) : null;
case "blackoperation":
case "black operation":
case "black operations":
case "black op":
case "black ops":
case "blackop":
case "blackops":
return (a.type = i.a.BlackOp), s.a.hasOwnProperty(t) ? ((a.name = t), a) : null;
case "general":
case "general action":
case "gen":
break;
default:
return null;
}
if (n.startsWith("gen")) {
switch (o) {
case "training":
(a.type = i.a.Training), (a.name = "Training");
break;
case "recruitment":
case "recruit":
(a.type = i.a.Recruitment), (a.name = "Recruitment");
break;
case "field analysis":
case "fieldanalysis":
(a.type = i.a["Field Analysis"]), (a.name = "Field Analysis");
break;
case "diplomacy":
(a.type = i.a.Diplomacy), (a.name = "Diplomacy");
break;
case "hyperbolic regeneration chamber":
(a.type = i.a["Hyperbolic Regeneration Chamber"]), (a.name = "Hyperbolic Regeneration Chamber");
break;
default:
return null;
}
return a;
}
return null;
}
executeStartConsoleCommand(e, t) {
if (3 !== t.length)
return (
this.postToConsole("Invalid usage of 'start' console command: start [type] [name]"),
void this.postToConsole("Use 'help start' for more info")
);
const a = t[2];
switch (t[1].toLowerCase()) {
case "general":
case "gen":
null != m.a[a]
? ((this.action.type = i.a[a]), (this.action.name = a), this.startAction(e, this.action))
: this.postToConsole("Invalid action name specified: " + t[2]);
break;
case "contract":
case "contracts":
null != this.contracts[a]
? ((this.action.type = i.a.Contract), (this.action.name = a), this.startAction(e, this.action))
: this.postToConsole("Invalid contract name specified: " + t[2]);
break;
case "ops":
case "op":
case "operations":
case "operation":
null != this.operations[a]
? ((this.action.type = i.a.Operation), (this.action.name = a), this.startAction(e, this.action))
: this.postToConsole("Invalid Operation name specified: " + t[2]);
break;
case "blackops":
case "blackop":
case "black operations":
case "black operation":
null != s.a[a]
? ((this.action.type = i.a.BlackOperation), (this.action.name = a), this.startAction(e, this.action))
: this.postToConsole("Invalid BlackOp name specified: " + t[2]);
break;
default:
this.postToConsole("Invalid action/event type specified: " + t[1]),
this.postToConsole("Examples of valid action/event identifiers are: [general, contract, op, blackop]");
}
}
executeSkillConsoleCommand(e) {
switch (e.length) {
case 1:
this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),
this.postToConsole("Use 'help skill' for more info");
break;
case 2:
if ("list" === e[1].toLowerCase()) {
this.postToConsole("Skills: ");
const e = Object.keys(d.a);
for (let t = 0; t < e.length; ++t) {
const a = d.a[e[t]];
let n = 0;
null != this.skills[a.name] && (n = this.skills[a.name]),
this.postToConsole(a.name + ": Level " + Object(h.c)(n, 0));
}
this.postToConsole(" "), this.postToConsole("Effects: ");
const t = Object.keys(this.skillMultipliers);
for (let e = 0; e < t.length; ++e) {
let a = this.skillMultipliers[t[e]];
if (a && 1 !== a)
switch (((a = Object(h.c)(a, 3)), t[e])) {
case "successChanceAll":
this.postToConsole("Total Success Chance: x" + a);
break;
case "successChanceStealth":
this.postToConsole("Stealth Success Chance: x" + a);
break;
case "successChanceKill":
this.postToConsole("Retirement Success Chance: x" + a);
break;
case "successChanceContract":
this.postToConsole("Contract Success Chance: x" + a);
break;
case "successChanceOperation":
this.postToConsole("Operation Success Chance: x" + a);
break;
case "successChanceEstimate":
this.postToConsole("Synthoid Data Estimate: x" + a);
break;
case "actionTime":
this.postToConsole("Action Time: x" + a);
break;
case "effHack":
this.postToConsole("Hacking Skill: x" + a);
break;
case "effStr":
this.postToConsole("Strength: x" + a);
break;
case "effDef":
this.postToConsole("Defense: x" + a);
break;
case "effDex":
this.postToConsole("Dexterity: x" + a);
break;
case "effAgi":
this.postToConsole("Agility: x" + a);
break;
case "effCha":
this.postToConsole("Charisma: x" + a);
break;
case "effInt":
this.postToConsole("Intelligence: x" + a);
break;
case "stamina":
this.postToConsole("Stamina: x" + a);
break;
default:
console.warn("Unrecognized SkillMult Key: " + t[e]);
}
}
} else
this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),
this.postToConsole("Use 'help skill' for more info");
break;
case 3: {
const t = e[2],
a = d.a[t];
if (
((null != a && a instanceof p.a) ||
this.postToConsole("Invalid skill name (Note that it is case-sensitive): " + t),
"list" === e[1].toLowerCase())
) {
let e = 0;
void 0 !== this.skills[a.name] && (e = this.skills[a.name]),
this.postToConsole(a.name + ": Level " + Object(h.c)(e));
} else if ("level" === e[1].toLowerCase()) {
let e = 0;
this.skills[t] && !isNaN(this.skills[t]) && (e = this.skills[t]);
const n = a.calculateCost(e);
this.skillPoints >= n
? ((this.skillPoints -= n),
this.upgradeSkill(a),
this.log(a.name + " upgraded to Level " + this.skills[t]))
: this.postToConsole(
"You do not have enough Skill Points to upgrade this. You need " + Object(h.c)(n, 0),
);
} else
this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),
this.postToConsole("Use 'help skill' for more info");
break;
}
default:
this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),
this.postToConsole("Use 'help skill' for more info");
}
}
executeLogConsoleCommand(e) {
if (e.length < 3)
return (
this.postToConsole("Invalid usage of log command: log [enable/disable] [action/event]"),
void this.postToConsole("Use 'help log' for more details and examples")
);
let t = !0;
switch ((e[1].toLowerCase().includes("d") && (t = !1), e[2].toLowerCase())) {
case "general":
case "gen":
(this.logging.general = t), this.log("Logging " + (t ? "enabled" : "disabled") + " for general actions");
break;
case "contract":
case "contracts":
(this.logging.contracts = t), this.log("Logging " + (t ? "enabled" : "disabled") + " for Contracts");
break;
case "ops":
case "op":
case "operations":
case "operation":
(this.logging.ops = t), this.log("Logging " + (t ? "enabled" : "disabled") + " for Operations");
break;
case "blackops":
case "blackop":
case "black operations":
case "black operation":
(this.logging.blackops = t), this.log("Logging " + (t ? "enabled" : "disabled") + " for BlackOps");
break;
case "event":
case "events":
(this.logging.events = t), this.log("Logging " + (t ? "enabled" : "disabled") + " for events");
break;
case "all":
(this.logging.general = t),
(this.logging.contracts = t),
(this.logging.ops = t),
(this.logging.blackops = t),
(this.logging.events = t),
this.log("Logging " + (t ? "enabled" : "disabled") + " for everything");
break;
default:
this.postToConsole("Invalid action/event type specified: " + e[2]),
this.postToConsole(
"Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]",
);
}
}
executeHelpConsoleCommand(e) {
if (1 === e.length) for (const e of g.a.helpList) this.postToConsole(e);
else
for (let t = 1; t < e.length; ++t) {
if (!(e[t] in g.a)) continue;
const a = g.a[e[t]];
for (const e of a) this.postToConsole(e);
}
}
executeAutomateConsoleCommand(e) {
if (2 === e.length || 4 === e.length)
if (2 !== e.length)
if (4 !== e.length);
else {
const t = e[1],
a = e[2];
let n = !1;
switch ((e[3].toLowerCase().includes("hi") && (n = !0), t)) {
case "general":
case "gen":
if (null != m.a[a]) {
const e = new r.a({ type: i.a[a], name: a });
n ? (this.automateActionHigh = e) : (this.automateActionLow = e),
this.log("Automate (" + (n ? "HIGH" : "LOW") + ") action set to " + a);
} else this.postToConsole("Invalid action name specified: " + a);
break;
case "contract":
case "contracts":
if (null != this.contracts[a]) {
const e = new r.a({ type: i.a.Contract, name: a });
n ? (this.automateActionHigh = e) : (this.automateActionLow = e),
this.log("Automate (" + (n ? "HIGH" : "LOW") + ") action set to " + a);
} else this.postToConsole("Invalid contract name specified: " + a);
break;
case "ops":
case "op":
case "operations":
case "operation":
if (null != this.operations[a]) {
const e = new r.a({ type: i.a.Operation, name: a });
n ? (this.automateActionHigh = e) : (this.automateActionLow = e),
this.log("Automate (" + (n ? "HIGH" : "LOW") + ") action set to " + a);
} else this.postToConsole("Invalid Operation name specified: " + a);
break;
case "stamina":
isNaN(parseFloat(a))
? this.postToConsole("Invalid value specified for stamina threshold (must be numeric): " + a)
: (n ? (this.automateThreshHigh = Number(a)) : (this.automateThreshLow = Number(a)),
this.log("Automate (" + (n ? "HIGH" : "LOW") + ") stamina threshold set to " + a));
}
}
else {
const t = e[1];
if ("status" === t.toLowerCase())
this.postToConsole("Automation: " + (this.automateEnabled ? "enabled" : "disabled")),
this.postToConsole(
"When your stamina drops to " +
Object(h.c)(this.automateThreshLow, 0) +
", you will automatically switch to " +
this.automateActionLow.name +
". When your stamina recovers to " +
Object(h.c)(this.automateThreshHigh, 0) +
", you will automatically switch to " +
this.automateActionHigh.name +
".",
);
else if (t.toLowerCase().includes("en")) {
if (!(this.automateActionLow instanceof r.a && this.automateActionHigh instanceof r.a))
return this.log("Failed to enable automation. Actions were not set");
(this.automateEnabled = !0), this.log("Bladeburner automation enabled");
} else
t.toLowerCase().includes("d")
? ((this.automateEnabled = !1), this.log("Bladeburner automation disabled"))
: this.log("Invalid argument for 'automate' console command: " + e[1]);
}
else
this.postToConsole(
"Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info",
);
}
parseCommandArguments(e) {
const t = [];
let a = 0,
n = 0;
for (; n < e.length; ) {
const r = e.charAt(n);
if ('"' === r) {
const r = e.indexOf('"', n + 1);
if (-1 !== r && (r === e.length - 1 || " " === e.charAt(r + 1))) {
t.push(e.substr(n + 1, r - n - 1)), (a = n = r === e.length - 1 ? r + 1 : r + 2);
continue;
}
} else if ("'" === r) {
const r = e.indexOf("'", n + 1);
if (-1 !== r && (r === e.length - 1 || " " === e.charAt(r + 1))) {
t.push(e.substr(n + 1, r - n - 1)), (a = n = r === e.length - 1 ? r + 1 : r + 2);
continue;
}
} else " " === r && (t.push(e.substr(a, n - a)), (a = n + 1));
++n;
}
return a !== n && t.push(e.substr(a, n - a)), t;
}
executeConsoleCommand(e, t) {
t = (t = t.trim()).replace(/\s\s+/g, " ");
const a = this.parseCommandArguments(t);
if (!(a.length <= 0))
switch (a[0].toLowerCase()) {
case "automate":
this.executeAutomateConsoleCommand(a);
break;
case "clear":
case "cls":
this.clearConsole();
break;
case "help":
this.executeHelpConsoleCommand(a);
break;
case "log":
this.executeLogConsoleCommand(a);
break;
case "skill":
this.executeSkillConsoleCommand(a);
break;
case "start":
this.executeStartConsoleCommand(e, a);
break;
case "stop":
this.resetAction();
break;
default:
this.postToConsole("Invalid console command");
}
}
triggerMigration(e) {
let t = E.a.CityNames[Object(b.a)(0, 5)];
for (; t === e; ) t = E.a.CityNames[Object(b.a)(0, 5)];
const a = this.cities[t],
n = this.cities[e];
if (null == a || null == n) throw new Error("Failed to find City with name: " + t);
const r = Math.random();
let i = Object(b.a)(3, 15) / 100;
r < 0.05 && n.comms > 0 && ((i *= Object(b.a)(2, 4)), --n.comms, ++a.comms);
const o = Math.round(n.pop * i);
(n.pop -= o), (a.pop += o);
}
triggerPotentialMigration(e, t) {
(null == t || isNaN(t)) &&
console.error("Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()"),
t > 1 && (t /= 100),
Math.random() < t && this.triggerMigration(e);
}
randomEvent() {
const e = Math.random(),
t = E.a.CityNames[Object(b.a)(0, 5)],
a = this.cities[t];
if (!(a instanceof f.a)) throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()");
let n = E.a.CityNames[Object(b.a)(0, 5)];
for (; n === t; ) n = E.a.CityNames[Object(b.a)(0, 5)];
const r = this.cities[n];
if (!(a instanceof f.a && r instanceof f.a))
throw new Error("sourceCity/destCity was not a City object in Bladeburner.randomEvent()");
if (e <= 0.05) {
++a.comms;
const e = Object(b.a)(10, 20) / 100,
t = Math.round(a.pop * e);
(a.pop += t),
this.logging.events &&
this.log("Intelligence indicates that a new Synthoid community was formed in a city");
} else if (e <= 0.1)
if (a.comms <= 0) {
++a.comms;
const e = Object(b.a)(10, 20) / 100,
t = Math.round(a.pop * e);
(a.pop += t),
this.logging.events &&
this.log("Intelligence indicates that a new Synthoid community was formed in a city");
} else {
--a.comms, ++r.comms;
const e = Object(b.a)(10, 20) / 100,
n = Math.round(a.pop * e);
(a.pop -= n),
(r.pop += n),
this.logging.events &&
this.log("Intelligence indicates that a Synthoid community migrated from " + t + " to some other city");
}
else if (e <= 0.3) {
const e = Object(b.a)(8, 24) / 100,
n = Math.round(a.pop * e);
(a.pop += n),
this.logging.events &&
this.log("Intelligence indicates that the Synthoid population of " + t + " just changed significantly");
} else if (e <= 0.5)
this.triggerMigration(t),
this.logging.events &&
this.log(
"Intelligence indicates that a large number of Synthoids migrated from " + t + " to some other city",
);
else if (e <= 0.7)
(a.chaos += 1),
(a.chaos *= 1 + Object(b.a)(5, 20) / 100),
this.logging.events &&
this.log("Tensions between Synthoids and humans lead to riots in " + t + "! Chaos increased");
else if (e <= 0.9) {
const e = Object(b.a)(8, 20) / 100,
n = Math.round(a.pop * e);
(a.pop -= n),
this.logging.events &&
this.log("Intelligence indicates that the Synthoid population of " + t + " just changed significantly");
}
}
gainActionStats(e, t, a) {
const n = t.getDifficulty(),
r = Math.pow(n, E.a.DiffMultExponentialFactor) + n / E.a.DiffMultLinearFactor,
i = this.actionTimeToComplete,
o = a ? 1 : 0.5,
s = i * E.a.BaseStatGain * o * r,
l = i * E.a.BaseIntGain * o * r,
c = this.skillMultipliers.expGain;
e.gainHackingExp(s * t.weights.hack * e.hacking_exp_mult * c),
e.gainStrengthExp(s * t.weights.str * e.strength_exp_mult * c),
e.gainDefenseExp(s * t.weights.def * e.defense_exp_mult * c),
e.gainDexterityExp(s * t.weights.dex * e.dexterity_exp_mult * c),
e.gainAgilityExp(s * t.weights.agi * e.agility_exp_mult * c),
e.gainCharismaExp(s * t.weights.cha * e.charisma_exp_mult * c);
let u = l * t.weights.int * c;
u > 1 && (u = Math.pow(u, 0.8)), e.gainIntelligenceExp(u);
}
getDiplomacyEffectiveness(e) {
return (100 - (Math.pow(e.charisma, 0.045) + e.charisma / 1e3)) / 100;
}
getRecruitmentSuccessChance(e) {
return Math.pow(e.charisma, 0.45) / (this.teamSize + 1);
}
getRecruitmentTime(e) {
const t = e.charisma * this.skillMultipliers.effCha,
a = Math.pow(t, 0.81) + t / 90;
return Math.max(10, Math.round(E.a.BaseRecruitmentTimeNeeded - a));
}
resetSkillMultipliers() {
this.skillMultipliers = {
successChanceAll: 1,
successChanceStealth: 1,
successChanceKill: 1,
successChanceContract: 1,
successChanceOperation: 1,
successChanceEstimate: 1,
actionTime: 1,
effHack: 1,
effStr: 1,
effDef: 1,
effDex: 1,
effAgi: 1,
effCha: 1,
effInt: 1,
stamina: 1,
money: 1,
expGain: 1,
};
}
updateSkillMultipliers() {
this.resetSkillMultipliers();
for (const e in this.skills)
if (this.skills.hasOwnProperty(e)) {
const t = d.a[e];
if (null == t) throw new Error("Could not find Skill Object for: " + e);
const a = this.skills[e];
if (null == a || a <= 0) continue;
const n = Object.keys(this.skillMultipliers);
for (let e = 0; e < n.length; ++e) {
const r = n[e];
if (null != t.getMultiplier(r) && !isNaN(t.getMultiplier(r))) {
const e = t.getMultiplier(r) * a;
let n = 1 + e / 100;
"actionTime" === r && (n = 1 - e / 100), (this.skillMultipliers[r] *= n);
}
}
}
}
completeOperation(e) {
if (this.action.type !== i.a.Operation)
throw new Error("completeOperation() called even though current action is not an Operation");
const t = this.getActionObject(this.action);
if (null == t) throw new Error("Failed to get Contract/Operation Object for: " + this.action.name);
const a = t.teamCount;
if (a >= 1) {
let n;
n = e ? Math.ceil(a / 2) : Math.floor(a);
const r = Object(b.a)(0, n);
(this.teamSize -= r),
(this.teamLost += r),
this.logging.ops && r > 0 && this.log("Lost " + Object(h.c)(r, 0) + " team members during this " + t.name);
}
const n = this.getCurrentCity();
switch (t.name) {
case "Investigation":
e
? (n.improvePopulationEstimateByPercentage(0.4 * this.skillMultipliers.successChanceEstimate),
Math.random() < 0.02 * this.skillMultipliers.successChanceEstimate && n.improveCommunityEstimate(1))
: this.triggerPotentialMigration(this.city, 0.1);
break;
case "Undercover Operation":
e
? (n.improvePopulationEstimateByPercentage(0.8 * this.skillMultipliers.successChanceEstimate),
Math.random() < 0.02 * this.skillMultipliers.successChanceEstimate && n.improveCommunityEstimate(1))
: this.triggerPotentialMigration(this.city, 0.15);
break;
case "Sting Operation":
e && n.changePopulationByPercentage(-0.1, { changeEstEqually: !0, nonZero: !0 }), n.changeChaosByCount(0.1);
break;
case "Raid":
if (e) n.changePopulationByPercentage(-1, { changeEstEqually: !0, nonZero: !0 }), --n.comms, --n.commsEst;
else {
const e = Object(b.a)(-10, -5) / 10;
n.changePopulationByPercentage(e, { nonZero: !0, changeEstEqually: !1 });
}
n.changeChaosByPercentage(Object(b.a)(1, 5));
break;
case "Stealth Retirement Operation":
e && n.changePopulationByPercentage(-0.5, { changeEstEqually: !0, nonZero: !0 }),
n.changeChaosByPercentage(Object(b.a)(-3, -1));
break;
case "Assassination":
e && n.changePopulationByCount(-1, { estChange: -1, estOffset: 0 }),
n.changeChaosByPercentage(Object(b.a)(-5, 5));
break;
default:
throw new Error("Invalid Action name in completeOperation: " + this.action.name);
}
}
getActionObject(e) {
switch (e.type) {
case i.a.Contract:
return this.contracts[e.name];
case i.a.Operation:
return this.operations[e.name];
case i.a.BlackOp:
case i.a.BlackOperation:
return s.a[e.name];
case i.a.Training:
return m.a.Training;
case i.a["Field Analysis"]:
return m.a["Field Analysis"];
case i.a.Recruitment:
return m.a.Recruitment;
case i.a.Diplomacy:
return m.a.Diplomacy;
case i.a["Hyperbolic Regeneration Chamber"]:
return m.a["Hyperbolic Regeneration Chamber"];
default:
return null;
}
}
completeContract(e) {
if (this.action.type !== i.a.Contract)
throw new Error("completeContract() called even though current action is not a Contract");
const t = this.getCurrentCity();
if (e)
switch (this.action.name) {
case "Tracking":
t.improvePopulationEstimateByCount(Object(b.a)(100, 1e3));
break;
case "Bounty Hunter":
t.changePopulationByCount(-1, { estChange: -1, estOffset: 0 }), t.changeChaosByCount(0.02);
break;
case "Retirement":
t.changePopulationByCount(-1, { estChange: -1, estOffset: 0 }), t.changeChaosByCount(0.04);
break;
default:
throw new Error("Invalid Action name in completeContract: " + this.action.name);
}
}
completeAction(e, t) {
switch (this.action.type) {
case i.a.Contract:
case i.a.Operation:
try {
const e = this.action.type === i.a.Operation,
a = this.getActionObject(this.action);
if (null == a) throw new Error("Failed to get Contract/Operation Object for: " + this.action.name);
const n = a.getDifficulty(),
r = Math.pow(n, E.a.DiffMultExponentialFactor) + n / E.a.DiffMultLinearFactor,
o = Math.pow(a.rewardFac, a.level - 1);
if (
((this.stamina -= E.a.BaseStaminaLoss * r), this.stamina < 0 && (this.stamina = 0), a.attempt(this))
) {
this.gainActionStats(t, a, !0), ++a.successes, --a.count;
let n = 0;
if (
(e ||
((n = E.a.ContractBaseMoneyGain * o * this.skillMultipliers.money),
t.gainMoney(n),
t.recordMoneySource(n, "bladeburner")),
e ? a.setMaxLevel(E.a.OperationSuccessesPerLevel) : a.setMaxLevel(E.a.ContractSuccessesPerLevel),
a.rankGain)
) {
const r = Object(_.a)(a.rankGain * o * k.a.BladeburnerRank, 10);
this.changeRank(t, r),
e && this.logging.ops
? this.log(a.name + " successfully completed! Gained " + Object(h.c)(r, 3) + " rank")
: !e &&
this.logging.contracts &&
this.log(
a.name +
" contract successfully completed! Gained " +
Object(h.c)(r, 3) +
" rank and " +
v.a.formatMoney(n),
);
}
e ? this.completeOperation(!0) : this.completeContract(!0);
} else {
this.gainActionStats(t, a, !1), ++a.failures;
let n = 0,
i = 0;
if ((a.rankLoss && ((n = Object(_.a)(a.rankLoss * o, 10)), this.changeRank(t, -1 * n)), a.hpLoss)) {
(i = a.hpLoss * r), (i = Math.ceil(Object(_.a)(i, 10))), (this.hpLost += i);
const e = Object(S.a)(t, i);
t.takeDamage(i) && (++this.numHosp, (this.moneyLost += e));
}
let s = "";
n > 0 && (s += "Lost " + Object(h.c)(n, 3) + " rank. "),
i > 0 && (s += "Took " + Object(h.c)(i, 0) + " damage."),
e && this.logging.ops
? this.log(a.name + " failed! " + s)
: !e && this.logging.contracts && this.log(a.name + " contract failed! " + s),
e ? this.completeOperation(!1) : this.completeContract(!1);
}
a.autoLevel && (a.level = a.maxLevel), this.startAction(t, this.action);
} catch (e) {
Object(y.a)(e);
}
break;
case i.a.BlackOp:
case i.a.BlackOperation:
try {
const a = this.getActionObject(this.action);
if (null == a || !(a instanceof l.a))
throw new Error("Failed to get BlackOperation Object for: " + this.action.name);
const n = a.getDifficulty(),
r = Math.pow(n, E.a.DiffMultExponentialFactor) + n / E.a.DiffMultLinearFactor;
(this.stamina -= E.a.BaseStaminaLoss * r), this.stamina < 0 && (this.stamina = 0);
const i = a.teamCount;
let o;
if (a.attempt(this)) {
this.gainActionStats(t, a, !0), (a.count = 0), (this.blackops[a.name] = !0);
let n = 0;
if (
(a.rankGain && ((n = Object(_.a)(a.rankGain * k.a.BladeburnerRank, 10)), this.changeRank(t, n)),
(o = Math.ceil(i / 2)),
"Operation Daedalus" === a.name)
)
return this.resetAction(), e.toBitVerse(!1, !1);
this.logging.blackops && this.log(a.name + " successful! Gained " + Object(h.c)(n, 1) + " rank");
} else {
this.gainActionStats(t, a, !1);
let e = 0,
n = 0;
if ((a.rankLoss && ((e = Object(_.a)(a.rankLoss, 10)), this.changeRank(t, -1 * e)), a.hpLoss)) {
(n = a.hpLoss * r), (n = Math.ceil(Object(_.a)(n, 10)));
const e = Object(S.a)(t, n);
t.takeDamage(n) && (++this.numHosp, (this.moneyLost += e));
}
(o = Math.floor(i)),
this.logging.blackops &&
this.log(
a.name + " failed! Lost " + Object(h.c)(e, 1) + " rank and took " + Object(h.c)(n, 0) + " damage",
);
}
if ((this.resetAction(), i >= 1)) {
const e = Object(b.a)(1, o);
(this.teamSize -= e),
(this.teamLost += e),
this.logging.blackops && this.log("You lost " + Object(h.c)(e, 0) + " team members during " + a.name);
}
} catch (e) {
Object(y.a)(e);
}
break;
case i.a.Training: {
this.stamina -= 0.5 * E.a.BaseStaminaLoss;
const e = 30 * t.strength_exp_mult,
a = 30 * t.defense_exp_mult,
n = 30 * t.dexterity_exp_mult,
r = 30 * t.agility_exp_mult,
i = 0.04 * this.skillMultipliers.stamina;
t.gainStrengthExp(e),
t.gainDefenseExp(a),
t.gainDexterityExp(n),
t.gainAgilityExp(r),
(this.staminaBonus += i),
this.logging.general &&
this.log(
"Training completed. Gained: " +
Object(h.c)(e, 1) +
" str exp, " +
Object(h.c)(a, 1) +
" def exp, " +
Object(h.c)(n, 1) +
" dex exp, " +
Object(h.c)(r, 1) +
" agi exp, " +
Object(h.c)(i, 3) +
" max stamina",
),
this.startAction(t, this.action);
break;
}
case i.a.FieldAnalysis:
case i.a["Field Analysis"]: {
let e =
0.04 * Math.pow(t.hacking_skill, 0.3) +
0.04 * Math.pow(t.intelligence, 0.9) +
0.02 * Math.pow(t.charisma, 0.3);
if (((e *= t.bladeburner_analysis_mult), isNaN(e) || e < 0))
throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");
const a = 20 * t.hacking_exp_mult,
n = 20 * t.charisma_exp_mult;
t.gainHackingExp(a),
t.gainIntelligenceExp(E.a.BaseIntGain),
t.gainCharismaExp(n),
this.changeRank(t, 0.1 * k.a.BladeburnerRank),
this.getCurrentCity().improvePopulationEstimateByPercentage(
e * this.skillMultipliers.successChanceEstimate,
),
this.logging.general &&
this.log(
"Field analysis completed. Gained 0.1 rank, " +
Object(h.c)(a, 1) +
" hacking exp, and " +
Object(h.c)(n, 1) +
" charisma exp",
),
this.startAction(t, this.action);
break;
}
case i.a.Recruitment: {
const e = this.getRecruitmentSuccessChance(t);
if (Math.random() < e) {
const e = 2 * E.a.BaseStatGain * this.actionTimeToComplete;
t.gainCharismaExp(e),
++this.teamSize,
this.logging.general &&
this.log("Successfully recruited a team member! Gained " + Object(h.c)(e, 1) + " charisma exp");
} else {
const e = E.a.BaseStatGain * this.actionTimeToComplete;
t.gainCharismaExp(e),
this.logging.general &&
this.log("Failed to recruit a team member. Gained " + Object(h.c)(e, 1) + " charisma exp");
}
this.startAction(t, this.action);
break;
}
case i.a.Diplomacy: {
const e = this.getDiplomacyEffectiveness(t);
(this.getCurrentCity().chaos *= e),
this.getCurrentCity().chaos < 0 && (this.getCurrentCity().chaos = 0),
this.logging.general &&
this.log(
"Diplomacy completed. Chaos levels in the current city fell by " + v.a.formatPercentage(1 - e),
),
this.startAction(t, this.action);
break;
}
case i.a["Hyperbolic Regeneration Chamber"]: {
t.regenerateHp(E.a.HrcHpGain);
const e = this.maxStamina * (E.a.HrcStaminaGain / 100);
(this.stamina = Math.min(this.maxStamina, this.stamina + e)),
this.startAction(t, this.action),
this.logging.general &&
this.log(
`Rested in Hyperbolic Regeneration Chamber. Restored ${
E.a.HrcHpGain
} HP and gained ${v.a.formatStamina(e)} stamina`,
);
break;
}
default:
console.error("Bladeburner.completeAction() called for invalid action: " + this.action.type);
}
}
changeRank(e, t) {
if (isNaN(t)) throw new Error("NaN passed into Bladeburner.changeRank()");
(this.rank += t), this.rank < 0 && (this.rank = 0), (this.maxRank = Math.max(this.rank, this.maxRank));
if (Object(C.b)("Bladeburners")) {
const a = C.a.Bladeburners;
if (!(a instanceof w.a))
throw new Error(
"Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button",
);
if (a.isMember) {
const n = 1 + a.favor / 100;
a.playerReputation += E.a.RankToFactionRepFactor * t * e.faction_rep_mult * n;
}
}
const a = (this.totalSkillPoints + 1) * E.a.RanksPerSkillPoint;
if (this.maxRank >= a) {
const e = Math.floor((this.maxRank - a) / E.a.RanksPerSkillPoint + 1);
(this.skillPoints += e), (this.totalSkillPoints += e);
}
}
processAction(e, t, a) {
if (this.action.type !== i.a.Idle) {
if (this.actionTimeToComplete <= 0)
throw new Error(
`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`,
);
if (!(this.action instanceof r.a)) throw new Error("Bladeburner.action is not an ActionIdentifier Object");
return (
(this.actionTimeCurrent += a + this.actionTimeOverflow),
(this.actionTimeOverflow = 0),
this.actionTimeCurrent >= this.actionTimeToComplete
? ((this.actionTimeOverflow = this.actionTimeCurrent - this.actionTimeToComplete),
this.completeAction(e, t))
: void 0
);
}
}
calculateStaminaGainPerSecond(e) {
const t = e.agility * this.skillMultipliers.effAgi,
a = this.maxStamina / E.a.MaxStaminaToGainFactor;
return (
(E.a.StaminaGainPerSecond + a) *
Math.pow(t, 0.17) *
(this.skillMultipliers.stamina * e.bladeburner_stamina_gain_mult)
);
}
calculateMaxStamina(e) {
const t = e.agility * this.skillMultipliers.effAgi,
a = (Math.pow(t, 0.8) + this.staminaBonus) * this.skillMultipliers.stamina * e.bladeburner_max_stamina_mult;
if (this.maxStamina !== a) {
const e = this.maxStamina;
(this.maxStamina = a), (this.stamina = (this.maxStamina * this.stamina) / e);
}
if (isNaN(a)) throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()");
}
create() {
(this.contracts.Tracking = new u.a({
name: "Tracking",
baseDifficulty: 125,
difficultyFac: 1.02,
rewardFac: 1.041,
rankGain: 0.3,
hpLoss: 0.5,
count: Object(b.a)(25, 150),
weights: { hack: 0, str: 0.05, def: 0.05, dex: 0.35, agi: 0.35, cha: 0.1, int: 0.05 },
decays: { hack: 0, str: 0.91, def: 0.91, dex: 0.91, agi: 0.91, cha: 0.9, int: 1 },
isStealth: !0,
})),
(this.contracts["Bounty Hunter"] = new u.a({
name: "Bounty Hunter",
baseDifficulty: 250,
difficultyFac: 1.04,
rewardFac: 1.085,
rankGain: 0.9,
hpLoss: 1,
count: Object(b.a)(5, 150),
weights: { hack: 0, str: 0.15, def: 0.15, dex: 0.25, agi: 0.25, cha: 0.1, int: 0.1 },
decays: { hack: 0, str: 0.91, def: 0.91, dex: 0.91, agi: 0.91, cha: 0.8, int: 0.9 },
isKill: !0,
})),
(this.contracts.Retirement = new u.a({
name: "Retirement",
baseDifficulty: 200,
difficultyFac: 1.03,
rewardFac: 1.065,
rankGain: 0.6,
hpLoss: 1,
count: Object(b.a)(5, 150),
weights: { hack: 0, str: 0.2, def: 0.2, dex: 0.2, agi: 0.2, cha: 0.1, int: 0.1 },
decays: { hack: 0, str: 0.91, def: 0.91, dex: 0.91, agi: 0.91, cha: 0.8, int: 0.9 },
isKill: !0,
})),
(this.operations.Investigation = new c.a({
name: "Investigation",
baseDifficulty: 400,
difficultyFac: 1.03,
rewardFac: 1.07,
reqdRank: 25,
rankGain: 2.2,
rankLoss: 0.2,
count: Object(b.a)(1, 100),
weights: { hack: 0.25, str: 0.05, def: 0.05, dex: 0.2, agi: 0.1, cha: 0.25, int: 0.1 },
decays: { hack: 0.85, str: 0.9, def: 0.9, dex: 0.9, agi: 0.9, cha: 0.7, int: 0.9 },
isStealth: !0,
})),
(this.operations["Undercover Operation"] = new c.a({
name: "Undercover Operation",
baseDifficulty: 500,
difficultyFac: 1.04,
rewardFac: 1.09,
reqdRank: 100,
rankGain: 4.4,
rankLoss: 0.4,
hpLoss: 2,
count: Object(b.a)(1, 100),
weights: { hack: 0.2, str: 0.05, def: 0.05, dex: 0.2, agi: 0.2, cha: 0.2, int: 0.1 },
decays: { hack: 0.8, str: 0.9, def: 0.9, dex: 0.9, agi: 0.9, cha: 0.7, int: 0.9 },
isStealth: !0,
})),
(this.operations["Sting Operation"] = new c.a({
name: "Sting Operation",
baseDifficulty: 650,
difficultyFac: 1.04,
rewardFac: 1.095,
reqdRank: 500,
rankGain: 5.5,
rankLoss: 0.5,
hpLoss: 2.5,
count: Object(b.a)(1, 150),
weights: { hack: 0.25, str: 0.05, def: 0.05, dex: 0.25, agi: 0.1, cha: 0.2, int: 0.1 },
decays: { hack: 0.8, str: 0.85, def: 0.85, dex: 0.85, agi: 0.85, cha: 0.7, int: 0.9 },
isStealth: !0,
})),
(this.operations.Raid = new c.a({
name: "Raid",
baseDifficulty: 800,
difficultyFac: 1.045,
rewardFac: 1.1,
reqdRank: 3e3,
rankGain: 55,
rankLoss: 2.5,
hpLoss: 50,
count: Object(b.a)(1, 150),
weights: { hack: 0.1, str: 0.2, def: 0.2, dex: 0.2, agi: 0.2, cha: 0, int: 0.1 },
decays: { hack: 0.7, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.9 },
isKill: !0,
})),
(this.operations["Stealth Retirement Operation"] = new c.a({
name: "Stealth Retirement Operation",
baseDifficulty: 1e3,
difficultyFac: 1.05,
rewardFac: 1.11,
reqdRank: 2e4,
rankGain: 22,
rankLoss: 2,
hpLoss: 10,
count: Object(b.a)(1, 150),
weights: { hack: 0.1, str: 0.1, def: 0.1, dex: 0.3, agi: 0.3, cha: 0, int: 0.1 },
decays: { hack: 0.7, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.9 },
isStealth: !0,
isKill: !0,
})),
(this.operations.Assassination = new c.a({
name: "Assassination",
baseDifficulty: 1500,
difficultyFac: 1.06,
rewardFac: 1.14,
reqdRank: 5e4,
rankGain: 44,
rankLoss: 4,
hpLoss: 5,
count: Object(b.a)(1, 150),
weights: { hack: 0.1, str: 0.1, def: 0.1, dex: 0.3, agi: 0.3, cha: 0, int: 0.1 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.8 },
isStealth: !0,
isKill: !0,
}));
}
process(e, t) {
if (!1 === x.b && this.blackops.hasOwnProperty("Operation Daedalus")) return e.toBitVerse(!1, !1);
if (!1 === M.a[R.a.BladesSimulacrum].owned && t.isWorking) {
if (this.action.type !== i.a.Idle) {
let e = "Your Bladeburner action was cancelled because you started doing something else.";
this.automateEnabled &&
((e +=
"
Your automation was disabled as well. You will have to re-enable it through the Bladeburner console"),
(this.automateEnabled = !1)),
T.a.SuppressBladeburnerPopup || Object(O.a)(e);
}
this.resetAction();
}
if (
(this.stamina <= 0 &&
(this.log("Your Bladeburner action was cancelled because your stamina hit 0"), this.resetAction()),
this.storedCycles >= E.a.CyclesPerSecond)
) {
let a = Math.floor(this.storedCycles / E.a.CyclesPerSecond);
(a = Math.min(a, 5)),
(this.storedCycles -= a * E.a.CyclesPerSecond),
this.calculateMaxStamina(t),
(this.stamina += this.calculateStaminaGainPerSecond(t) * a),
(this.stamina = Math.min(this.maxStamina, this.stamina));
for (const e of Object.values(this.contracts)) {
const t = o.a[e.name];
if (void 0 === t) throw new Error(`growth formula for action '${e.name}' is undefined`);
e.count += (a * t()) / E.a.ActionCountGrowthPeriod;
}
for (const e of Object.values(this.operations)) {
const t = o.a[e.name];
if (void 0 === t) throw new Error(`growth formula for action '${e.name}' is undefined`);
void 0 !== t && (e.count += (a * t()) / E.a.ActionCountGrowthPeriod);
}
for (const e of E.a.CityNames) {
const t = this.cities[e];
if (!(t instanceof f.a))
throw new Error("Invalid City object when processing passive chaos reduction in Bladeburner.process");
(t.chaos -= 1e-4 * a), (t.chaos = Math.max(0, t.chaos));
}
(this.randomEventCounter -= a),
this.randomEventCounter <= 0 && (this.randomEvent(), (this.randomEventCounter += Object(b.a)(240, 600))),
this.processAction(e, t, a),
this.automateEnabled &&
(this.stamina <= this.automateThreshLow
? (this.action.name === this.automateActionLow.name &&
this.action.type === this.automateActionLow.type) ||
((this.action = new r.a({ type: this.automateActionLow.type, name: this.automateActionLow.name })),
this.startAction(t, this.action))
: this.stamina >= this.automateThreshHigh &&
((this.action.name === this.automateActionHigh.name &&
this.action.type === this.automateActionHigh.type) ||
((this.action = new r.a({
type: this.automateActionHigh.type,
name: this.automateActionHigh.name,
})),
this.startAction(t, this.action))));
}
}
getTypeAndNameFromActionId(e) {
const t = { type: "", name: "" },
a = Object.keys(i.a);
for (let n = 0; n < a.length; ++n)
if (e.type === i.a[a[n]]) {
t.type = a[n];
break;
}
return (
[
"Training",
"Recruitment",
"FieldAnalysis",
"Field Analysis",
"Diplomacy",
"Hyperbolic Regeneration Chamber",
].includes(t.type) && (t.type = "General"),
null == t.type && (t.type = "Idle"),
(t.name = null != e.name ? e.name : "Idle"),
t
);
}
getContractNamesNetscriptFn() {
return Object.keys(this.contracts);
}
getOperationNamesNetscriptFn() {
return Object.keys(this.operations);
}
getBlackOpNamesNetscriptFn() {
return Object.keys(s.a);
}
getGeneralActionNamesNetscriptFn() {
return Object.keys(m.a);
}
getSkillNamesNetscriptFn() {
return Object.keys(d.a);
}
startActionNetscriptFn(e, t, a, n) {
const r = `Invalid action: type='${t}' name='${a}'`,
o = this.getActionIdFromTypeAndName(t, a);
if (null == o) return n.log("bladeburner.startAction", r), !1;
if (o.type === i.a.BlackOp) {
const e = this.getActionObject(o);
if (null == e) throw new Error(`Action not found ${o.type}, ${o.name}`);
if (!(e instanceof l.a)) throw new Error("Action should be BlackOperation but isn't");
if (e.reqdRank > this.rank)
return n.log("bladeburner.startAction", `Insufficient rank to start Black Op '${o.name}'.`), !1;
if (null != this.blackops[o.name])
return n.log("bladeburner.startAction", `Black Op ${o.name} has already been completed.`), !1;
const t = [];
for (const e in s.a) s.a.hasOwnProperty(e) && t.push(e);
t.sort(function (e, t) {
return s.a[e].reqdRank - s.a[t].reqdRank;
});
const r = t.indexOf(o.name);
if (-1 === r) return n.log("bladeburner.startAction", `Invalid Black Op: '${a}'`), !1;
if (r > 0 && null == this.blackops[t[r - 1]])
return (
n.log("bladeburner.startAction", `Preceding Black Op must be completed before starting '${o.name}'.`), !1
);
}
try {
return (
this.startAction(e, o),
n.log("bladeburner.startAction", `Starting bladeburner action with type '${t}' and name ${a}"`),
!0
);
} catch (e) {
return this.resetAction(), n.log("bladeburner.startAction", r), !1;
}
}
getActionTimeNetscriptFn(e, t, a, n) {
const r = `Invalid action: type='${t}' name='${a}'`,
o = this.getActionIdFromTypeAndName(t, a);
if (null == o) return n.log("bladeburner.getActionTime", r), -1;
const s = this.getActionObject(o);
if (null == s) return n.log("bladeburner.getActionTime", r), -1;
switch (o.type) {
case i.a.Contract:
case i.a.Operation:
case i.a.BlackOp:
case i.a.BlackOperation:
return s.getActionTime(this);
case i.a.Training:
case i.a["Field Analysis"]:
case i.a.FieldAnalysis:
return 30;
case i.a.Recruitment:
return this.getRecruitmentTime(e);
case i.a.Diplomacy:
case i.a["Hyperbolic Regeneration Chamber"]:
return 60;
default:
return n.log("bladeburner.getActionTime", r), -1;
}
}
getActionEstimatedSuccessChanceNetscriptFn(e, t, a, n) {
const r = `Invalid action: type='${t}' name='${a}'`,
o = this.getActionIdFromTypeAndName(t, a);
if (null == o) return n.log("bladeburner.getActionEstimatedSuccessChance", r), [-1, -1];
const s = this.getActionObject(o);
if (null == s) return n.log("bladeburner.getActionEstimatedSuccessChance", r), [-1, -1];
switch (o.type) {
case i.a.Contract:
case i.a.Operation:
case i.a.BlackOp:
case i.a.BlackOperation:
return s.getEstSuccessChance(this);
case i.a.Training:
case i.a["Field Analysis"]:
case i.a.FieldAnalysis:
case i.a.Diplomacy:
case i.a["Hyperbolic Regeneration Chamber"]:
return [1, 1];
case i.a.Recruitment: {
const t = this.getRecruitmentSuccessChance(e);
return [t, t];
}
default:
return n.log("bladeburner.getActionEstimatedSuccessChance", r), [-1, -1];
}
}
getActionCountRemainingNetscriptFn(e, t, a) {
const n = `Invalid action: type='${e}' name='${t}'`,
r = this.getActionIdFromTypeAndName(e, t);
if (null == r) return a.log("bladeburner.getActionCountRemaining", n), -1;
const o = this.getActionObject(r);
if (null == o) return a.log("bladeburner.getActionCountRemaining", n), -1;
switch (r.type) {
case i.a.Contract:
case i.a.Operation:
return Math.floor(o.count);
case i.a.BlackOp:
case i.a.BlackOperation:
return null != this.blackops[t] ? 0 : 1;
case i.a.Training:
case i.a.Recruitment:
case i.a["Field Analysis"]:
case i.a.FieldAnalysis:
case i.a.Diplomacy:
case i.a["Hyperbolic Regeneration Chamber"]:
return 1 / 0;
default:
return a.log("bladeburner.getActionCountRemaining", n), -1;
}
}
getSkillLevelNetscriptFn(e, t) {
return "" !== e && d.a.hasOwnProperty(e)
? null == this.skills[e]
? 0
: this.skills[e]
: (t.log("bladeburner.getSkillLevel", `Invalid skill: '${e}'`), -1);
}
getSkillUpgradeCostNetscriptFn(e, t) {
if ("" === e || !d.a.hasOwnProperty(e))
return t.log("bladeburner.getSkillUpgradeCost", `Invalid skill: '${e}'`), -1;
const a = d.a[e];
return null == this.skills[e] ? a.calculateCost(0) : a.calculateCost(this.skills[e]);
}
upgradeSkillNetscriptFn(e, t) {
const a = `Invalid skill: '${e}'`;
if (!d.a.hasOwnProperty(e)) return t.log("bladeburner.upgradeSkill", a), !1;
const n = d.a[e];
let r = 0;
this.skills[e] && !isNaN(this.skills[e]) && (r = this.skills[e]);
const i = n.calculateCost(r);
return n.maxLvl && r >= n.maxLvl
? (t.log("bladeburner.upgradeSkill", `Skill '${e}' is already maxed.`), !1)
: this.skillPoints < i
? (t.log(
"bladeburner.upgradeSkill",
`You do not have enough skill points to upgrade ${e} (You have ${this.skillPoints}, you need ${i})`,
),
!1)
: ((this.skillPoints -= i),
this.upgradeSkill(n),
t.log("bladeburner.upgradeSkill", `'${e}' upgraded to level ${this.skills[e]}`),
!0);
}
getTeamSizeNetscriptFn(e, t, a) {
if ("" === e && "" === t) return this.teamSize;
const n = `Invalid action: type='${e}' name='${t}'`,
r = this.getActionIdFromTypeAndName(e, t);
if (null == r) return a.log("bladeburner.getTeamSize", n), -1;
const o = this.getActionObject(r);
return null == o
? (a.log("bladeburner.getTeamSize", n), -1)
: r.type === i.a.Operation || r.type === i.a.BlackOp || r.type === i.a.BlackOperation
? o.teamCount
: 0;
}
setTeamSizeNetscriptFn(e, t, a, n) {
const r = `Invalid action: type='${e}' name='${t}'`,
o = this.getActionIdFromTypeAndName(e, t);
if (null == o) return n.log("bladeburner.setTeamSize", r), -1;
if (o.type !== i.a.Operation && o.type !== i.a.BlackOp && o.type !== i.a.BlackOperation)
return n.log("bladeburner.setTeamSize", "Only valid for 'Operations' and 'BlackOps'"), -1;
const s = this.getActionObject(o);
if (null == s) return n.log("bladeburner.setTeamSize", r), -1;
let l = Math.round(a);
return isNaN(l) || l < 0
? (n.log("bladeburner.setTeamSize", "Invalid size: " + a), -1)
: (this.teamSize < l && (l = this.teamSize),
(s.teamCount = l),
n.log("bladeburner.setTeamSize", `Team size for '${t}' set to ${l}.`),
l);
}
joinBladeburnerFactionNetscriptFn(e) {
const t = C.a.Bladeburners;
return (
!!t.isMember ||
(this.rank >= E.a.RankNeededForFaction
? (Object(A.d)(t), e.log("bladeburner.joinBladeburnerFaction", "Joined Bladeburners faction."), !0)
: (e.log(
"bladeburner.joinBladeburnerFaction",
`You do not have the required rank (${this.rank}/${E.a.RankNeededForFaction}).`,
),
!1))
);
}
toJSON() {
return Object(n.b)("Bladeburner", this);
}
static fromJSON(e) {
return Object(n.a)(I, e.data);
}
}
n.c.constructors.Bladeburner = I;
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(315),
r = a(26),
i = a(7),
o = a(21);
const s = { name: "", info: "", companyPositions: {}, expMultiplier: 1, salaryMultiplier: 1, jobStatReqOffset: 0 };
class l {
constructor(e = s) {
(this.name = e.name),
(this.info = e.info),
(this.companyPositions = e.companyPositions),
(this.expMultiplier = e.expMultiplier),
(this.salaryMultiplier = e.salaryMultiplier),
(this.jobStatReqOffset = e.jobStatReqOffset),
(this.isPlayerEmployed = !1),
(this.playerReputation = 1),
(this.favor = 0),
(this.rolloverRep = 0),
(this.isMegacorp = !1),
e.isMegacorp && (this.isMegacorp = !0);
}
hasPosition(e) {
return e instanceof n.a ? null != this.companyPositions[e.name] : null != this.companyPositions[e];
}
hasAgentPositions() {
return null != this.companyPositions[r.a[0]];
}
hasBusinessConsultantPositions() {
return null != this.companyPositions[r.c[0]];
}
hasBusinessPositions() {
return null != this.companyPositions[r.b[0]];
}
hasEmployeePositions() {
return null != this.companyPositions[r.e[1]];
}
hasITPositions() {
return null != this.companyPositions[r.d[0]];
}
hasSecurityPositions() {
return null != this.companyPositions[r.h[2]];
}
hasSoftwareConsultantPositions() {
return null != this.companyPositions[r.k[0]];
}
hasSoftwarePositions() {
return null != this.companyPositions[r.j[0]];
}
hasWaiterPositions() {
return null != this.companyPositions[r.e[0]];
}
gainFavor() {
null == this.favor && (this.favor = 0), null == this.rolloverRep && (this.rolloverRep = 0);
const e = this.getFavorGain();
2 == e.length
? ((this.favor += e[0]), (this.rolloverRep = e[1]))
: console.error("Invalid result from getFavorGain() function");
}
getFavorGain() {
null == this.favor && (this.favor = 0), null == this.rolloverRep && (this.rolloverRep = 0);
let e = 0,
t = this.playerReputation + this.rolloverRep,
a = i.a.CompanyReputationToFavorBase * Math.pow(i.a.CompanyReputationToFavorMult, this.favor);
for (; t > 0 && t >= a; ) ++e, (t -= a), (a *= i.a.FactionReputationToFavorMult);
return [e, t];
}
toJSON() {
return Object(o.b)("Company", this);
}
static fromJSON(e) {
return Object(o.a)(l, e.data);
}
}
o.c.constructors.Company = l;
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return c;
}),
a.d(t, "b", function () {
return u;
}),
a.d(t, "c", function () {
return m;
}),
a.d(t, "e", function () {
return h;
}),
a.d(t, "d", function () {
return d;
});
var n = a(24),
r = a(113),
i = a(8),
o = a(7),
s = a(15),
l = a(805);
function c(e) {
const t = Math.round(e);
return isNaN(t) || !Object(l.a)(t) || t > m()
? 1 / 0
: t * o.a.BaseCostFor1GBOfRamServer * i.a.PurchasedServerCost;
}
function u() {
return Math.round(o.a.PurchasedServerLimit * i.a.PurchasedServerLimit);
}
function m() {
const e = Math.round(o.a.PurchasedServerMaxRam * i.a.PurchasedServerMaxRam);
return 1 << (31 - Math.clz32(e));
}
function h(e, t, a, i) {
if (!i.canAfford(a)) return void Object(s.a)("You don't have enough money to purchase this server!");
if (i.purchasedServers.length >= u())
return void Object(s.a)(
"You have reached the maximum limit of " +
u() +
" servers. You cannot purchase any more. You can delete some of your purchased servers using the deleteServer() Netscript function in a script",
);
if ("" == e) return void Object(s.a)("You must enter a hostname for your new server!");
const o = Object(r.f)({
adminRights: !0,
hostname: e,
ip: Object(n.e)(),
isConnectedTo: !1,
maxRam: t,
organizationName: "",
purchasedByPlayer: !0,
});
Object(n.a)(o), i.purchasedServers.push(o.hostname);
const l = i.getHomeComputer();
l.serversOnNetwork.push(o.hostname),
o.serversOnNetwork.push(l.hostname),
i.loseMoney(a),
Object(s.a)("Server successfully purchased with hostname " + e);
}
function d(e) {
const t = e.getUpgradeHomeRamCost();
if (!e.canAfford(t))
return void Object(s.a)("You do not have enough money to purchase additional RAM for your home computer");
const a = e.getHomeComputer();
a.maxRam >= o.a.HomeComputerMaxRam
? Object(s.a)("You cannot upgrade your home computer RAM because it is at its maximum possible value")
: ((a.maxRam *= 2), e.loseMoney(t));
}
},
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(168),
r = a(159),
i = a(21),
o = a(228);
function s(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class l {
constructor(e = {}) {
var t;
s(this, "level", 1),
s(this, "sizeUsed", 0),
s(this, "smartSupplyEnabled", !1),
s(this, "smartSupplyUseLeftovers", {}),
s(this, "smartSupplyStore", 0),
(this.loc = e.loc ? e.loc : ""),
(this.size = e.size ? e.size : 0),
(this.materials = {
Water: new n.a({ name: "Water" }),
Energy: new n.a({ name: "Energy" }),
Food: new n.a({ name: "Food" }),
Plants: new n.a({ name: "Plants" }),
Metal: new n.a({ name: "Metal" }),
Hardware: new n.a({ name: "Hardware" }),
Chemicals: new n.a({ name: "Chemicals" }),
Drugs: new n.a({ name: "Drugs" }),
Robots: new n.a({ name: "Robots" }),
AICores: new n.a({ name: "AI Cores" }),
RealEstate: new n.a({ name: "Real Estate" }),
}),
(this.smartSupplyUseLeftovers = {
Water: !0,
Energy: !0,
Food: !0,
Plants: !0,
Metal: !0,
Hardware: !0,
Chemicals: !0,
Drugs: !0,
Robots: !0,
AICores: !0,
RealEstate: !0,
}),
e.corp && e.industry && this.updateSize(e.corp, e.industry),
null !== (t = e.corp) && void 0 !== t && t.unlockUpgrades[1] && (this.smartSupplyEnabled = !0);
}
updateMaterialSizeUsed() {
this.sizeUsed = 0;
for (const e in this.materials) {
const t = this.materials[e];
r.a.hasOwnProperty(e) && (this.sizeUsed += t.qty * r.a[e]);
}
this.sizeUsed > this.size && console.warn("Warehouse size used greater than capacity, something went wrong");
}
updateSize(e, t) {
try {
this.size = 100 * this.level * e.getStorageMultiplier() * t.getStorageMultiplier();
} catch (e) {
Object(o.a)(e);
}
}
toJSON() {
return Object(i.b)("Warehouse", this);
}
static fromJSON(e) {
return Object(i.a)(l, e.data);
}
}
i.c.constructors.Warehouse = l;
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(906),
r = a(521);
const i = {};
n.a.forEach((e) => {
i[e.name] = new r.a(e.name, e.desc, e.isHacking, e.isCombat, e.params);
});
},
function (e, t, a) {
"use strict";
a.d(t, "c", function () {
return i;
}),
a.d(t, "d", function () {
return o;
}),
a.d(t, "e", function () {
return s;
}),
a.d(t, "b", function () {
return l;
}),
a.d(t, "a", function () {
return c;
}),
a.d(t, "f", function () {
return u;
});
var n = a(8),
r = a(37);
function i(e, t, a, i, o) {
return (
r.b.HashesPerLevel *
e *
Math.pow(1.07, Math.log2(a)) *
(1 + (i - 1) / 5) *
(1 - t / a) *
o *
n.a.HacknetNodeMoney
);
}
function o(e, t = 1, a = 1) {
const n = Math.round(t);
if (isNaN(n) || n < 1) return 0;
if (e >= r.b.MaxLevel) return 1 / 0;
const i = r.b.UpgradeLevelMult;
let o = 0,
s = e;
for (let e = 0; e < n; ++e) (o += Math.pow(i, s)), ++s;
return 10 * r.b.BaseCost * o * a;
}
function s(e, t = 1, a = 1) {
const n = Math.round(t);
if (isNaN(n) || n < 1) return 0;
if (e >= r.b.MaxRam) return 1 / 0;
let i = 0,
o = Math.round(Math.log2(e)),
s = e;
for (let e = 0; e < n; ++e) {
(i += s * r.b.RamBaseCost * Math.pow(r.b.UpgradeRamMult, o)), (s *= 2), ++o;
}
return (i *= a), i;
}
function l(e, t = 1, a = 1) {
const n = Math.round(t);
if (isNaN(n) || n < 1) return 0;
if (e >= r.b.MaxCores) return 1 / 0;
const i = r.b.UpgradeCoreMult;
let o = 0,
s = e;
for (let e = 0; e < n; ++e) (o += Math.pow(i, s - 1)), ++s;
return (o *= r.b.CoreBaseCost), (o *= a), o;
}
function c(e, t = 1) {
const a = Math.round(t);
if (isNaN(a) || a < 1) return 0;
if (e >= r.b.MaxCache) return 1 / 0;
const n = r.b.UpgradeCacheMult;
let i = 0,
o = e;
for (let e = 0; e < a; ++e) (i += Math.pow(n, o - 1)), ++o;
return (i *= r.b.CacheBaseCost), i;
}
function u(e, t = 1) {
return e - 1 >= r.b.MaxServers ? 1 / 0 : r.b.BaseCost * Math.pow(r.b.PurchaseMult, e - 1) * t;
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return m;
}),
a.d(t, "c", function () {
return h;
}),
a.d(t, "d", function () {
return d;
}),
a.d(t, "b", function () {
return p;
});
var n = a(184),
r = a(66),
i = a(7),
o = a(2),
s = a(4),
l = a(18),
c = a(15),
u = a(0);
function m(e, t, a = null, m = {}) {
if ((t = Math.round(t)) <= 0) return !1;
if (null == e || isNaN(t))
return (
a
? a.log("buyStock", `Invalid arguments: stock='${e}' shares='${t}'`)
: !0 !== m.suppressDialog && Object(c.a)("Failed to buy stock. This may be a bug, contact developer"),
!1
);
const h = Object(n.b)(e, t, r.a.Long);
if (null == h) return !1;
if (o.a.money.lt(h))
return (
a
? a.log(
"buyStock",
`You do not have enough money to purchase this position. You need ${s.a.formatMoney(h)}.`,
)
: !0 !== m.suppressDialog &&
Object(c.a)(
u.createElement(
u.Fragment,
null,
"You do not have enough money to purchase this. You need ",
u.createElement(l.a, { money: h }),
),
),
!1
);
if (t + e.playerShares + e.playerShortShares > e.maxShares)
return (
a
? a.log(
"buyStock",
`Purchasing '${t + e.playerShares + e.playerShortShares}' shares would exceed ${e.symbol}'s maximum (${
e.maxShares
}) number of shares`,
)
: !0 !== m.suppressDialog &&
Object(c.a)(
`You cannot purchase this many shares. ${e.symbol} has a maximum of ${s.a.formatShares(
e.maxShares,
)} shares.`,
),
!1
);
const d = e.playerShares * e.playerAvgPx;
o.a.loseMoney(h);
const p = d + h - i.a.StockMarketCommission;
if (
((e.playerShares = Math.round(e.playerShares + t)),
(e.playerAvgPx = p / e.playerShares),
Object(n.d)(e, t),
null != m.rerenderFn && "function" == typeof m.rerenderFn && m.rerenderFn(),
a)
) {
const n = `Bought ${s.a.formatShares(t)} shares of ${e.symbol} for ${s.a.formatMoney(
h,
)}. Paid ${s.a.formatMoney(i.a.StockMarketCommission)} in commission fees.`;
a.log("buyStock", n);
} else
!0 !== m.suppressDialog &&
Object(c.a)(
u.createElement(
u.Fragment,
null,
"Bought ",
s.a.formatShares(t),
" shares of ",
e.symbol,
" for ",
u.createElement(l.a, { money: h }),
". Paid",
" ",
u.createElement(l.a, { money: i.a.StockMarketCommission }),
" in commission fees.",
),
);
return !0;
}
function h(e, t, a = null, i = {}) {
if (null == e || t < 0 || isNaN(t))
return (
a
? a.log("sellStock", `Invalid arguments: stock='${e}' shares='${t}'`)
: !0 !== i.suppressDialog &&
Object(c.a)(
"Failed to sell stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, contact developer",
),
!1
);
if (((t = Math.round(t)) > e.playerShares && (t = e.playerShares), 0 === t)) return !1;
const m = Object(n.c)(e, t, r.a.Long);
if (null == m) return !1;
let h = m - e.playerAvgPx * t;
if (
(isNaN(h) && (h = 0),
o.a.gainMoney(m),
o.a.recordMoneySource(h, "stock"),
a && ((a.scriptRef.onlineMoneyMade += h), (o.a.scriptProdSinceLastAug += h)),
(e.playerShares = Math.round(e.playerShares - t)),
0 === e.playerShares && (e.playerAvgPx = 0),
Object(n.d)(e, t),
null != i.rerenderFn && "function" == typeof i.rerenderFn && i.rerenderFn(),
a)
) {
const n = `Sold ${s.a.formatShares(t)} shares of ${
e.symbol
}. After commissions, you gained a total of ${s.a.formatMoney(m)}.`;
a.log("sellStock", n);
} else
!0 !== i.suppressDialog &&
Object(c.a)(
u.createElement(
u.Fragment,
null,
"Sold ",
s.a.formatShares(t),
" shares of ",
e.symbol,
". After commissions, you gained a total of",
" ",
u.createElement(l.a, { money: m }),
".",
),
);
return !0;
}
function d(e, t, a = null, m = {}) {
if ((t = Math.round(t)) <= 0) return !1;
if (null == e || isNaN(t))
return (
a
? a.log("shortStock", `Invalid arguments: stock='${e}' shares='${t}'`)
: !0 !== m.suppressDialog &&
Object(c.a)(
"Failed to initiate a short position in a stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, so contact developer",
),
!1
);
const h = Object(n.b)(e, t, r.a.Short);
if (null == h) return !1;
if (o.a.money.lt(h))
return (
a
? a.log(
"shortStock",
"You do not have enough money to purchase this short position. You need " + s.a.formatMoney(h),
)
: !0 !== m.suppressDialog &&
Object(c.a)(
u.createElement(
u.Fragment,
null,
"You do not have enough money to purchase this short position. You need ",
u.createElement(l.a, { money: h }),
),
),
!1
);
if (t + e.playerShares + e.playerShortShares > e.maxShares)
return (
a
? a.log(
"shortStock",
`This '${t + e.playerShares + e.playerShortShares}' short shares would exceed ${e.symbol}'s maximum (${
e.maxShares
}) number of shares.`,
)
: !0 !== m.suppressDialog &&
Object(c.a)(`You cannot purchase this many shares. ${e.symbol} has a maximum of ${e.maxShares} shares.`),
!1
);
const d = e.playerShortShares * e.playerAvgShortPx;
o.a.loseMoney(h);
const p = d + h - i.a.StockMarketCommission;
if (
((e.playerShortShares = Math.round(e.playerShortShares + t)),
(e.playerAvgShortPx = p / e.playerShortShares),
Object(n.d)(e, t),
null != m.rerenderFn && "function" == typeof m.rerenderFn && m.rerenderFn(),
a)
) {
const n = `Bought a short position of ${s.a.formatShares(t)} shares of ${e.symbol} for ${s.a.formatMoney(
h,
)}. Paid ${s.a.formatMoney(i.a.StockMarketCommission)} in commission fees.`;
a.log("shortStock", n);
} else
m.suppressDialog ||
Object(c.a)(
u.createElement(
u.Fragment,
null,
"Bought a short position of ",
s.a.formatShares(t),
" shares of ",
e.symbol,
" for",
" ",
u.createElement(l.a, { money: h }),
". Paid ",
u.createElement(l.a, { money: i.a.StockMarketCommission }),
" in commission fees.",
),
);
return !0;
}
function p(e, t, a = null, i = {}) {
if (null == e || isNaN(t) || t < 0)
return (
a
? a.log("sellShort", `Invalid arguments: stock='${e}' shares='${t}'`)
: i.suppressDialog ||
Object(c.a)(
"Failed to sell a short position in a stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, so contact developer",
),
!1
);
if (((t = Math.round(t)) > e.playerShortShares && (t = e.playerShortShares), 0 === t)) return !1;
const m = t * e.playerAvgShortPx,
h = Object(n.c)(e, t, r.a.Short);
if (null == h || isNaN(h) || null == m)
return (
a
? a.log(
"sellShort",
"Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug",
)
: i.suppressDialog ||
Object(c.a)(
"Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug",
),
!1
);
let d = h - m;
if (
(isNaN(d) && (d = 0),
o.a.gainMoney(h),
o.a.recordMoneySource(d, "stock"),
a && ((a.scriptRef.onlineMoneyMade += d), (o.a.scriptProdSinceLastAug += d)),
(e.playerShortShares = Math.round(e.playerShortShares - t)),
0 === e.playerShortShares && (e.playerAvgShortPx = 0),
Object(n.d)(e, t),
null != i.rerenderFn && "function" == typeof i.rerenderFn && i.rerenderFn(),
a)
) {
const n =
`Sold your short position of ${s.a.formatShares(t)} shares of ${
e.symbol
}. After commissions, you gained a total of ` + s.a.formatMoney(h);
a.log("sellShort", n);
} else
i.suppressDialog ||
Object(c.a)(
u.createElement(
u.Fragment,
null,
"Sold your short position of ",
s.a.formatShares(t),
" shares of ",
e.symbol,
". After commissions, you gained a total of ",
u.createElement(l.a, { money: h }),
),
);
return !0;
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(8);
function r(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class i {
constructor(e = { name: "foo", desc: "foo" }) {
if (
(r(this, "baseCost", 1),
r(this, "costInc", 1),
r(this, "maxLvl", 0),
r(this, "successChanceAll", 0),
r(this, "successChanceStealth", 0),
r(this, "successChanceKill", 0),
r(this, "successChanceContract", 0),
r(this, "successChanceOperation", 0),
r(this, "successChanceEstimate", 0),
r(this, "actionTime", 0),
r(this, "effHack", 0),
r(this, "effStr", 0),
r(this, "effDef", 0),
r(this, "effDex", 0),
r(this, "effAgi", 0),
r(this, "effCha", 0),
r(this, "stamina", 0),
r(this, "money", 0),
r(this, "expGain", 0),
!e.name)
)
throw new Error("Failed to initialize Bladeburner Skill. No name was specified in ctor");
if (!e.desc) throw new Error("Failed to initialize Bladeburner Skills. No desc was specified in ctor");
(this.name = e.name),
(this.desc = e.desc),
(this.baseCost = e.baseCost ? e.baseCost : 1),
(this.costInc = e.costInc ? e.costInc : 1),
e.maxLvl && (this.maxLvl = e.maxLvl),
e.successChanceAll && (this.successChanceAll = e.successChanceAll),
e.successChanceStealth && (this.successChanceStealth = e.successChanceStealth),
e.successChanceKill && (this.successChanceKill = e.successChanceKill),
e.successChanceContract && (this.successChanceContract = e.successChanceContract),
e.successChanceOperation && (this.successChanceOperation = e.successChanceOperation),
e.successChanceEstimate && (this.successChanceEstimate = e.successChanceEstimate),
e.actionTime && (this.actionTime = e.actionTime),
e.effHack && (this.effHack = e.effHack),
e.effStr && (this.effStr = e.effStr),
e.effDef && (this.effDef = e.effDef),
e.effDex && (this.effDex = e.effDex),
e.effAgi && (this.effAgi = e.effAgi),
e.effCha && (this.effCha = e.effCha),
e.stamina && (this.stamina = e.stamina),
e.money && (this.money = e.money),
e.expGain && (this.expGain = e.expGain);
}
calculateCost(e) {
return Math.floor((this.baseCost + e * this.costInc) * n.a.BladeburnerSkillCost);
}
getMultiplier(e) {
return "successChanceAll" === e
? this.successChanceAll
: "successChanceStealth" === e
? this.successChanceStealth
: "successChanceKill" === e
? this.successChanceKill
: "successChanceContract" === e
? this.successChanceContract
: "successChanceOperation" === e
? this.successChanceOperation
: "successChanceEstimate" === e
? this.successChanceEstimate
: "actionTime" === e
? this.actionTime
: "effHack" === e
? this.effHack
: "effStr" === e
? this.effStr
: "effDef" === e
? this.effDef
: "effDex" === e
? this.effDex
: "effAgi" === e
? this.effAgi
: "effCha" === e
? this.effCha
: "stamina" === e
? this.stamina
: "money" === e
? this.money
: "expGain" === e
? this.expGain
: 0;
}
}
},
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(0),
r = a(4),
i = a(131),
o = a(155);
const s = Object(i.a)((e) => Object(o.a)({ money: { color: e.colors.money } }));
function l({ hashes: e }) {
const t = s();
return n.createElement("span", { className: t.money }, "number" == typeof e ? r.a.formatHashes(e) : e);
}
},
function (e, t, a) {
"use strict";
let n;
a.d(t, "a", function () {
return n;
}),
a.d(t, "b", function () {
return i;
}),
a.d(t, "c", function () {
return o;
}),
(function (e) {
(e.Bypass = "Bypass"),
(e.PrototypeTampering = "PrototypeTampering"),
(e.Unclickable = "Unclickable"),
(e.UndocumentedFunctionCall = "UndocumentedFunctionCall"),
(e.TimeCompression = "TimeCompression"),
(e.EditSaveFile = "EditSaveFile");
})(n || (n = {}));
const r = {
Bypass: "by circumventing the ram cost of document.",
EditSaveFile: "by editing your save file.",
PrototypeTampering: "by tampering with Numbers prototype.",
TimeCompression: "by compressing time",
Unclickable: "by clicking the unclickable.",
UndocumentedFunctionCall: "by looking beyond the documentation.",
};
function i(e) {
return r[e];
}
function o(e) {
return e.filter((e) => Object.keys(n).includes(e));
}
},
,
function (e, t, a) {
"use strict";
a.d(t, "c", function () {
return o;
}),
a.d(t, "b", function () {
return s;
}),
a.d(t, "a", function () {
return l;
});
var n = a(7),
r = a(8);
function i(e) {
let t = 1 + e.favor / 100;
return isNaN(t) && (t = 1), t * r.a.FactionWorkRepGain;
}
function o(e, t) {
return (
((e.hacking_skill + e.intelligence / 3) / n.a.MaxSkillLevel) *
e.faction_rep_mult *
e.getIntelligenceBonus(1) *
i(t)
);
}
function s(e, t) {
return (
((0.9 *
(e.hacking_skill / n.a.MaxSkillLevel +
e.strength / n.a.MaxSkillLevel +
e.defense / n.a.MaxSkillLevel +
e.dexterity / n.a.MaxSkillLevel +
e.agility / n.a.MaxSkillLevel +
e.intelligence / n.a.MaxSkillLevel)) /
4.5) *
e.faction_rep_mult *
i(t) *
e.getIntelligenceBonus(1)
);
}
function l(e, t) {
return (
((0.9 *
(e.hacking_skill / n.a.MaxSkillLevel +
e.strength / n.a.MaxSkillLevel +
e.defense / n.a.MaxSkillLevel +
e.dexterity / n.a.MaxSkillLevel +
e.agility / n.a.MaxSkillLevel +
e.charisma / n.a.MaxSkillLevel +
e.intelligence / n.a.MaxSkillLevel)) /
5.5) *
e.faction_rep_mult *
i(t) *
e.getIntelligenceBonus(1)
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(208),
r = a(125);
const i = {};
(i[r.a.BladesIntuition] = new n.a({
name: r.a.BladesIntuition,
desc: "Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%",
baseCost: 3,
costInc: 2.1,
successChanceAll: 3,
})),
(i[r.a.Cloak] = new n.a({
name: r.a.Cloak,
desc: "Each level of this skill increases your success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%",
baseCost: 2,
costInc: 1.1,
successChanceStealth: 5.5,
})),
(i[r.a.ShortCircuit] = new n.a({
name: r.a.ShortCircuit,
desc: "Each level of this skill increases your success chance in Contracts, Operations, and BlackOps that involve retirement by 5.5%",
baseCost: 2,
costInc: 2.1,
successChanceKill: 5.5,
})),
(i[r.a.DigitalObserver] = new n.a({
name: r.a.DigitalObserver,
desc: "Each level of this skill increases your success chance in all Operations and BlackOps by 4%",
baseCost: 2,
costInc: 2.1,
successChanceOperation: 4,
})),
(i[r.a.Tracer] = new n.a({
name: r.a.Tracer,
desc: "Each level of this skill increases your success chance in all Contracts by 4%",
baseCost: 2,
costInc: 2.1,
successChanceContract: 4,
})),
(i[r.a.Overclock] = new n.a({
name: r.a.Overclock,
desc: "Each level of this skill decreases the time it takes to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)",
baseCost: 3,
costInc: 1.4,
maxLvl: 90,
actionTime: 1,
})),
(i[r.a.Reaper] = new n.a({
name: r.a.Reaper,
desc: "Each level of this skill increases your effective combat stats for Bladeburner actions by 2%",
baseCost: 2,
costInc: 2.1,
effStr: 2,
effDef: 2,
effDex: 2,
effAgi: 2,
})),
(i[r.a.EvasiveSystem] = new n.a({
name: r.a.EvasiveSystem,
desc: "Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 4%",
baseCost: 2,
costInc: 2.1,
effDex: 4,
effAgi: 4,
})),
(i[r.a.Datamancer] = new n.a({
name: r.a.Datamancer,
desc: "Each level of this skill increases your effectiveness in synthoid population analysis and investigation by 5%. This affects all actions that can potentially increase the accuracy of your synthoid population/community estimates.",
baseCost: 3,
costInc: 1,
successChanceEstimate: 5,
})),
(i[r.a.CybersEdge] = new n.a({
name: r.a.CybersEdge,
desc: "Each level of this skill increases your max stamina by 2%",
baseCost: 1,
costInc: 3,
stamina: 2,
})),
(i[r.a.HandsOfMidas] = new n.a({
name: r.a.HandsOfMidas,
desc: "Each level of this skill increases the amount of money you receive from Contracts by 10%",
baseCost: 2,
costInc: 2.5,
money: 10,
})),
(i[r.a.Hyperdrive] = new n.a({
name: r.a.Hyperdrive,
desc: "Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%",
baseCost: 1,
costInc: 2.5,
expGain: 10,
}));
},
function (e, t, a) {
"use strict";
let n;
a.d(t, "b", function () {
return n;
}),
a.d(t, "a", function () {
return r;
}),
(function (e) {
(e.Clubs = "clubs"), (e.Diamonds = "diamonds"), (e.Hearts = "hearts"), (e.Spades = "spades");
})(n || (n = {}));
class r {
constructor(e, t) {
if (((this.value = e), (this.suit = t), e < 1 || e > 13))
throw new Error("Card instantiated with improper value: " + e);
}
formatValue() {
switch (this.value) {
case 1:
return "A";
case 11:
return "J";
case 12:
return "Q";
case 13:
return "K";
default:
return "" + this.value;
}
}
isRedSuit() {
return this.suit === n.Hearts || this.suit === n.Diamonds;
}
getStringRepresentation() {
return `${this.formatValue()} of ${this.suit}`;
}
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(21);
function r(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class i {
constructor(e = {}) {
r(this, "name", ""), r(this, "type", -1), e.name && (this.name = e.name), e.type && (this.type = e.type);
}
toJSON() {
return Object(n.b)("ActionIdentifier", this);
}
static fromJSON(e) {
return Object(n.a)(i, e.data);
}
}
n.c.constructors.ActionIdentifier = i;
},
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(367),
r = a(129),
i = a(623),
o = a(22),
s = a(809);
const l = {};
function c(e) {
if (!e.name) throw new Error("Invalid constructor parameters for Location. No 'name' property");
return (
l[e.name] instanceof i.a &&
console.warn(`Property with name ${e.name} already exists and is being overwritten`),
(l[e.name] = new i.a(e)),
l[e.name]
);
}
(r.a[o.a.Aevum] = new n.a(o.a.Aevum)),
(r.a[o.a.Chongqing] = new n.a(o.a.Chongqing)),
(r.a[o.a.Ishima] = new n.a(o.a.Ishima)),
(r.a[o.a.NewTokyo] = new n.a(o.a.NewTokyo)),
(r.a[o.a.Sector12] = new n.a(o.a.Sector12)),
(r.a[o.a.Volhaven] = new n.a(o.a.Volhaven)),
(r.a[o.a.Aevum].asciiArt =
"\n [aevum police headquarters] 26 \n o \n I \\ [bachman & associates] \n \\ 56 B \n x \\ [summit university] \n \\ \\ 28 \n \\ [snap fitness gym] x o--L-----------N \n K \\ / \n \\ \\ Q [casino] \n x 58 \\ / [travel agency] \n \\ 94 95 o \n 90 x 59 o------o | \n \\ / \\ | 98 102 103 \n o--------O------x----o 93 96 o-----+------------o o----o \n \\ | \\ / \n [hospital] \\ 61 [ecorp] x 31 99 o-F-o 101 \n o | \n | o---E-- | [fulcrum tech.] \n x 62 / A [aerocorp] \n [crush fitness gym] | / | \n | / | \n o--------D------+--o o \n | |\\ [rho construction] \n H [netlink tech.] | J \n | | \\ \n | 34 x \\ \n [clarke inc.] C | \\ [world stock exchange] \n | | \\ \n | | o-M-------R--------o \n[galactic cybersystems] G 35 x \n | [watchdog security] \n | \n 67 o \n \n [the slums] P "),
(r.a[o.a.Chongqing].asciiArt =
"\n | \n 75 o \n \\ \n o 76 \n 7 | | \n | + 77 \n [world stock exchange] F | \n \\ o 78 [kuaigong international] \n \\ / \n 38 o----x--x------x------A------G-- \n / 39 | 41 [church] \n 37 o + 79 o--x--x-C-0 \n / | / \n / x-----+-----x-----0 [hospital] \n[solaris space system] B | \n | + 80 \n | | \n 34 o E [travel agency] \n | \n | \n x 82 \n [the slums] D "),
(r.a[o.a.Ishima].asciiArt =
"\n o 59 \n o o | \n [storm tech.] | | G [world stock exchange] \n | | 28 | \n 23 o--C------o--------+----x----o | \n / / 25 | 27 \\ x 57 \n / / | \\ | \n / / | \\ | \n o 22 o | \\| 29/56 \n | | o \n | [hospital] D / \\ 3 2 1 \n o | / \\ o-------x------o \n / o / \\ / \n 48 o / 55 x \\ / \n \\ / / x \n \\ / [nova medical] / 4/30 \\ \n 49 x A \\ \n / \\ / \\ \n / \\ [travel agency] F o 31 \n / \\ 51 / \n / o----B------x-----o \n o 50 52 \n [omega soft.] \n [the slums] E "),
(r.a[o.a.NewTokyo].asciiArt =
"\n \n \n o \n \\ \n \\ [defcomm] \n \\ \n o--x---A--x--o [travel agency] \n 7 8 10 G \n [vitalife] o 12 [global pharmaceuticals] \n | \n o--D-x----x-------x-C-+--------x--x-B-x---x-o \n 21 22 23 \\ 24 25 26 27 \n \\ \n [noodle bar] x 14 \n \\ \n \\ \n [hospital] o 15 [world stock exchange] \n | \n o--x--E--x-----x-----x---+---x----x--H--x-o \n | \n | \n o 17 \n \n \n \n F [the slums] \n "),
(r.a[o.a.Sector12].asciiArt =
"\n 78 o 97 \n o [icarus microsystems] / \n N [powerhouse gym] o I \n 1 | | / \n o-----+---x----o 4 A [alpha ent.] o-------o / \n | 3 \\ | \\ / \n | \\ | [iron gym] x 95 \n (79) x \\ | / \\ \n | o-E----+----x----J--o 10 / o----T--o \n | | 8 \\ 94 x \n 80 x [city hall] | x 11 / [world stock exchange]\n | | \\ / \n | C [cia] \\ / \n Q [hospital] | F P [universal energy] \n | o [deltaone] \\ / \n | 35 o---------x 13/92/36 \n L [megacorp] 33 / / \\ \n | o------------o 34 / \\ \n (29) | / [carmichael sec.] D \\ \n o-----+-----x------o / O [rothman university] \n | 31 32 [nsa] M \n | / \n B [blade industries] H \n | / [four sigma] \n | [joe's guns] / \n | / \n 85 o--G--------K--------S-------o 88 [the slums] R \n \n [foodnstuff] [travel agency] "),
(r.a[o.a.Volhaven].asciiArt =
"\n [omnia cybersystems] \n 17 66 68 \n o o------G-------o \n \\ / \\ \n \\ o 65 o 69 \n [syscore sec.] H | | \n \\ | | [millenium fitness gym] \n \\ | 21 22 23 24 | 26 \n o----+--x--x----x---x---+-----x-------D-----o \n 19 | | 28 \n | F [omnitek inc.] \n [hospital] J 63 o \n | / 72 \n 3 | 5 6 / 9 \n o--------+----x-----x----+----------M-------o \n / | | \n / 61 x [helios labs] B [world stock exchange] \n [travel agency] L | | \n / | o \n / E [nwo] / 75 \n / [computek] | / \n / A-------o------I-----o \n 1 o | | \n | [zb] o 77 \n [lexocorp] C \n | \n o \n 57 \n \n \n [the slums] K ");
for (const e of s.a) {
const t = c(e),
a = t.city;
if (null === a) for (const e in r.a) r.a[e].addLocation(t.name);
else r.a[a].addLocation(t.name);
}
},
function (e, t, a) {
"use strict";
function n(e, t) {
return Math.random() * (t - e) + e;
}
function r(e) {
switch (e.keyCode) {
case 38:
case 87:
return "↑";
case 65:
case 37:
return "←";
case 40:
case 83:
return "↓";
case 39:
case 68:
return "→";
}
return "";
}
a.d(t, "b", function () {
return n;
}),
a.d(t, "a", function () {
return r;
});
},
,
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return m;
}),
a.d(t, "c", function () {
return h;
}),
a.d(t, "a", function () {
return d;
});
var n = a(0),
r = a.n(n),
i = a(2),
o = a(312),
s = a(514),
l = a(62),
c = a(318),
u = a(15);
let m = !1;
function h(e) {
m = e;
}
function d(e, t, a, n) {
t
? 0 === l.a[5] && 5 !== n && ((i.a.intelligence = 0), (i.a.intelligence_exp = 0))
: (function (e) {
const t = "SourceFile" + e.toString(),
a = c.a[t];
if (null == a) return void console.error("Could not find source file for Bit node: " + e);
let n = !1,
o = null;
for (let t = 0; t < i.a.sourceFiles.length; ++t)
if (i.a.sourceFiles[t].n === e) {
(n = !0), (o = i.a.sourceFiles[t]);
break;
}
if (n && o)
o.lvl >= 3 && 12 !== o.n
? Object(u.a)(
"The Source-File for the BitNode you just destroyed, " + a.name + ", is already at max level!",
)
: (++o.lvl,
Object(u.a)(
a.name + " was upgraded to level " + o.lvl + " for destroying its corresponding BitNode!",
));
else {
const t = new s.a(e, 1);
i.a.sourceFiles.push(t),
5 === e && 0 === i.a.intelligence && (i.a.intelligence = 1),
Object(u.a)(
r.a.createElement(
r.a.Fragment,
null,
"You received a Source-File for destroying a BitNode!",
r.a.createElement("br", null),
r.a.createElement("br", null),
a.name,
r.a.createElement("br", null),
r.a.createElement("br", null),
a.info,
),
);
}
})(a),
5 === n && 0 === i.a.intelligence && (i.a.intelligence = 1),
(m = !1),
(i.a.bitNodeN = n),
6 === n ? e.toBladeburnerCinematic() : e.toTerminal(),
Object(o.b)(t);
}
},
function (e, t, a) {
"use strict";
a.d(t, "c", function () {
return u;
}),
a.d(t, "a", function () {
return m;
}),
a.d(t, "b", function () {
return h;
});
var n = a(7),
r = a(2),
i = a(48),
o = a(113),
s = a(24),
l = a(4),
c = a(278);
function u(e) {
const t = (new Date().getTime() - r.a.lastUpdate) / 1e3;
let a = e.onlineRunningTime / 14400;
a >= 1 && (a = 1);
for (const a in e.dataMap)
if (e.dataMap.hasOwnProperty(a)) {
if (0 == e.dataMap[a][2] || null == e.dataMap[a][2]) continue;
const n = Object(s.d)(a);
if (null == n) continue;
const c = Math.round(((0.5 * e.dataMap[a][2]) / e.onlineRunningTime) * t);
e.log(`Called on ${n.hostname} ${c} times while offline`);
const u = Object(s.d)(e.server);
if (null === u) throw new Error("getServer of null key?");
if (!(n instanceof i.a)) throw new Error("trying to grow a non-normal server");
const m = Object(o.e)(n, c, r.a, u.cpuCores);
e.log(`'${n.hostname}' grown by ${l.a.format(100 * m - 100, "0.000000%")} while offline`);
}
const c = a * (e.onlineExpGained / e.onlineRunningTime) * t;
r.a.gainHackingExp(c), (e.offlineRunningTime += t), (e.offlineExpGained += c);
for (const a in e.dataMap)
if (e.dataMap.hasOwnProperty(a)) {
if (0 == e.dataMap[a][3] || null == e.dataMap[a][3]) continue;
const r = Object(s.d)(a);
if (null == r) continue;
if (!(r instanceof i.a)) throw new Error("trying to weaken a non-normal server");
const o = Object(s.d)(e.server);
if (null === o) throw new Error("getServer of null key?");
const l = Math.round(((0.5 * e.dataMap[a][3]) / e.onlineRunningTime) * t);
e.log(`Called weaken() on ${r.hostname} ${l} times while offline`);
const c = 1 + (o.cpuCores - 1) / 16;
r.weaken(n.a.ServerWeakenAmount * l * c);
}
}
function m(e, t, a) {
for (let n = 0; n < a.runningScripts.length; ++n)
if (a.runningScripts[n].filename === e && Object(c.a)(a.runningScripts[n].args, t)) return a.runningScripts[n];
return null;
}
function h(e, t) {
for (let a = 0; a < t.runningScripts.length; ++a) if (t.runningScripts[a].pid === e) return t.runningScripts[a];
return null;
}
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
}),
a.d(t, "c", function () {
return o;
}),
a.d(t, "b", function () {
return s;
});
var n = a(15),
r = a(21);
class i {
constructor(e = "", t = "") {
(this.fn = (e.endsWith(".txt") ? e : e + ".txt").replace(/\s+/g, "")), (this.text = t);
}
append(e) {
this.text += e;
}
download() {
const e = this.fn,
t = new Blob([this.text], { type: "text/plain" });
if (window.navigator.msSaveOrOpenBlob) window.navigator.msSaveOrOpenBlob(t, e);
else {
const e = document.createElement("a"),
a = URL.createObjectURL(t);
(e.href = a),
(e.download = this.fn),
document.body.appendChild(e),
e.click(),
setTimeout(() => {
document.body.removeChild(e), window.URL.revokeObjectURL(a);
}, 0);
}
}
read() {
return this.text;
}
show() {
Object(n.a)(`${this.fn}
${this.text}`);
}
toJSON() {
return Object(r.b)("TextFile", this);
}
write(e) {
this.text = e;
}
static fromJSON(e) {
return Object(r.a)(i, e.data);
}
}
function o(e, t) {
const a = e.endsWith(".txt") ? e : e + ".txt";
for (const e of t.textFiles) if (e.fn === a) return e;
return null;
}
function s(e, t, a) {
if (null !== o(e, a)) return void console.error(`A file named "${e}" already exists on server ${a.hostname}.`);
const n = new i(e, t);
return a.textFiles.push(n), n;
}
r.c.constructors.TextFile = i;
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
});
var n = a(15);
function r(e) {
console.error(e),
Object(n.a)(
"Caught an exception: " +
e +
"
Filename: " +
(e.fileName || "UNKNOWN FILE NAME") +
"
Line Number: " +
(e.lineNumber || "UNKNOWN LINE NUMBER") +
"
This is a bug, please report to game developer with this message as well as details about how to reproduce the bug.
If you want to be safe, I suggest refreshing the game WITHOUT saving so that your safe doesn't get corrupted",
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return y;
}),
a.d(t, "b", function () {
return f;
}),
a.d(t, "e", function () {
return p;
}),
a.d(t, "d", function () {
return b;
}),
a.d(t, "c", function () {
return v;
});
var n = a(123),
r = a(20),
i = a(6),
o = a(68),
s = a(2),
l = a(224),
c = a(24),
u = a(14),
m = a(15),
h = a(21);
function d(e, t = !1) {
(e.recvd = !0),
(!t && u.a.SuppressMessages) || p(e),
(function (e, t) {
const a = Object(c.d)(t);
if (null == a) return void console.warn("Could not find server " + t);
for (let t = 0; t < a.messages.length; ++t) {
const n = a.messages[t];
if ("string" != typeof n && e.filename === n.filename) return;
}
a.messages.push(e);
})(e, "home");
}
function p(e) {
const t =
"Message received from unknown sender:
" +
e.msg +
"
This message was saved as " +
e.filename +
" onto your home computer.";
Object(m.a)(t);
}
function f() {
if (l.b) return;
const e = y[E.Jumper0],
t = y[E.Jumper1],
a = y[E.Jumper2],
n = y[E.Jumper3],
c = y[E.Jumper4],
u = y[E.CyberSecTest],
m = y[E.NiteSecTest],
h = y[E.BitRunnersTest],
p = y[E.RedPill];
let f = !1;
if ((r.a[i.a.TheRedPill].owned && (f = !0), p && f && 0 === s.a.sourceFiles.length && !l.b)) d(p, !0);
else if (p && f) l.b || d(p);
else if (e && !e.recvd && s.a.hacking_skill >= 25) {
d(e);
const t = o.a.Flight.name,
a = s.a.getHomeComputer();
a.programs.includes(t) || a.programs.push(t);
} else
t && !t.recvd && s.a.hacking_skill >= 40
? d(t)
: u && !u.recvd && s.a.hacking_skill >= 50
? d(u)
: a && !a.recvd && s.a.hacking_skill >= 175
? d(a)
: m && !m.recvd && s.a.hacking_skill >= 200
? d(m)
: n && !n.recvd && s.a.hacking_skill >= 350
? d(n)
: c && !c.recvd && s.a.hacking_skill >= 490
? d(c)
: h && !h.recvd && s.a.hacking_skill >= 500 && d(h);
}
function g(e) {
y[e.filename] = e;
}
let y = {};
function b(e) {
y = JSON.parse(e, h.c);
}
const E = {
Jumper0: "j0.msg",
Jumper1: "j1.msg",
Jumper2: "j2.msg",
Jumper3: "j3.msg",
Jumper4: "j4.msg",
CyberSecTest: "csec-test.msg",
NiteSecTest: "nitesec-test.msg",
BitRunnersTest: "19dfj3l1nd.msg",
RedPill: "icarus.msg",
};
function v() {
(y = {}),
g(
new n.a(
E.Jumper0,
"I know you can sense it. I know you're searching for it. It's why you spend night after night at your computer.
It's real, I've seen it. And I can help you find it. But not right now. You're not ready yet.
Use this program to track your progress
The fl1ght.exe program was added to your home computer
-jump3R",
),
),
g(
new n.a(
E.Jumper1,
"Soon you will be contacted by a hacking group known as CyberSec. They can help you with your search.
You should join them, garner their favor, and exploit them for their Augmentations. But do not trust them. They are not what they seem. No one is.
-jump3R",
),
),
g(
new n.a(
E.Jumper2,
"Do not try to save the world. There is no world to save. If you want to find the truth, worry only about yourself. Ethics and morals will get you killed.
Watch out for a hacking group known as NiteSec.
-jump3R",
),
),
g(
new n.a(
E.Jumper3,
"You must learn to walk before you can run. And you must run before you can fly. Look for the black hand.
I.I.I.I
-jump3R",
),
),
g(
new n.a(
E.Jumper4,
"To find what you are searching for, you must understand the bits. The bits are all around us. The runners will help you.
-jump3R",
),
),
g(
new n.a(
E.CyberSecTest,
"We've been watching you. Your skills are very impressive. But you're wasting your talents. If you join us, you can put your skills to good use and change the world for the better. If you join us, we can unlock your full potential.
But first, you must pass our test. Find and install the backdoor on our server.
-CyberSec",
),
),
g(
new n.a(
E.NiteSecTest,
"People say that the corrupted governments and corporations rule the world. Yes, maybe they do. But do you know who everyone really fears? People like us. Because they can't hide from us. Because they can't fight shadows and ideas with bullets.
Join us, and people will fear you, too.
Find and install the backdoor on our server. Then, we will contact you again.
-NiteSec",
),
),
g(
new n.a(
E.BitRunnersTest,
"We know what you are doing. We know what drives you. We know what you are looking for.
We can help you find the answers.
run4theh111z",
),
),
g(
new n.a(
E.RedPill,
"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%
)@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)
@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB
DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)",
),
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "c", function () {
return i;
}),
a.d(t, "b", function () {
return o;
}),
a.d(t, "e", function () {
return s;
}),
a.d(t, "a", function () {
return l;
}),
a.d(t, "d", function () {
return c;
});
var n = a(8),
r = a(37);
function i(e, t, a, i) {
return e * r.a.MoneyGainPerLevel * Math.pow(1.035, t - 1) * ((a + 5) / 6) * i * n.a.HacknetNodeMoney;
}
function o(e, t = 1, a = 1) {
const n = Math.round(t);
if (isNaN(n) || n < 1) return 0;
if (e >= r.a.MaxLevel) return 1 / 0;
const i = r.a.UpgradeLevelMult;
let o = 0,
s = e;
for (let e = 0; e < n; ++e) (o += r.a.LevelBaseCost * Math.pow(i, s)), ++s;
return (r.a.BaseCost / 2) * o * a;
}
function s(e, t = 1, a = 1) {
const n = Math.round(t);
if (isNaN(n) || n < 1) return 0;
if (e >= r.a.MaxRam) return 1 / 0;
let i = 0,
o = Math.round(Math.log2(e)),
s = e;
for (let e = 0; e < n; ++e) {
(i += s * r.a.RamBaseCost * Math.pow(r.a.UpgradeRamMult, o)), (s *= 2), ++o;
}
return (i *= a), i;
}
function l(e, t = 1, a = 1) {
const n = Math.round(t);
if (isNaN(n) || n < 1) return 0;
if (e >= r.a.MaxCores) return 1 / 0;
const i = r.a.CoreBaseCost,
o = r.a.UpgradeCoreMult;
let s = 0,
l = e;
for (let e = 0; e < n; ++e) (s += i * Math.pow(o, l - 1)), ++l;
return (s *= a), s;
}
function c(e, t = 1) {
return e <= 0 ? 0 : r.a.BaseCost * Math.pow(r.a.PurchaseNextMult, e - 1) * t;
}
},
function (e, t, a) {
"use strict";
function n(e, t = 1) {
return Math.max(Math.floor(t * (32 * Math.log(e + 534.5) - 200)), 1);
}
function r(e, t = 1) {
return Math.exp((e / t + 200) / 32) - 534.6;
}
a.d(t, "b", function () {
return n;
}),
a.d(t, "a", function () {
return r;
});
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
});
var n = a(116);
const r = {};
(r["Operation Typhoon"] = new n.a({
name: "Operation Typhoon",
baseDifficulty: 2e3,
reqdRank: 2500,
rankGain: 50,
rankLoss: 10,
hpLoss: 100,
weights: { hack: 0.1, str: 0.2, def: 0.2, dex: 0.2, agi: 0.2, cha: 0, int: 0.1 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation Zero"] = new n.a({
name: "Operation Zero",
baseDifficulty: 2500,
reqdRank: 5e3,
rankGain: 60,
rankLoss: 15,
hpLoss: 50,
weights: { hack: 0.2, str: 0.15, def: 0.15, dex: 0.2, agi: 0.2, cha: 0, int: 0.1 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isStealth: !0,
})),
(r["Operation X"] = new n.a({
name: "Operation X",
baseDifficulty: 3e3,
reqdRank: 7500,
rankGain: 75,
rankLoss: 15,
hpLoss: 100,
weights: { hack: 0.1, str: 0.2, def: 0.2, dex: 0.2, agi: 0.2, cha: 0, int: 0.1 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation Titan"] = new n.a({
name: "Operation Titan",
baseDifficulty: 4e3,
reqdRank: 1e4,
rankGain: 100,
rankLoss: 20,
hpLoss: 100,
weights: { hack: 0.1, str: 0.2, def: 0.2, dex: 0.2, agi: 0.2, cha: 0, int: 0.1 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation Ares"] = new n.a({
name: "Operation Ares",
baseDifficulty: 5e3,
reqdRank: 12500,
rankGain: 125,
rankLoss: 20,
hpLoss: 200,
weights: { hack: 0, str: 0.25, def: 0.25, dex: 0.25, agi: 0.25, cha: 0, int: 0 },
decays: { hack: 0, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation Archangel"] = new n.a({
name: "Operation Archangel",
baseDifficulty: 7500,
reqdRank: 15e3,
rankGain: 200,
rankLoss: 20,
hpLoss: 25,
weights: { hack: 0, str: 0.2, def: 0.2, dex: 0.3, agi: 0.3, cha: 0, int: 0 },
decays: { hack: 0, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation Juggernaut"] = new n.a({
name: "Operation Juggernaut",
baseDifficulty: 1e4,
reqdRank: 2e4,
rankGain: 300,
rankLoss: 40,
hpLoss: 300,
weights: { hack: 0, str: 0.25, def: 0.25, dex: 0.25, agi: 0.25, cha: 0, int: 0 },
decays: { hack: 0, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation Red Dragon"] = new n.a({
name: "Operation Red Dragon",
baseDifficulty: 12500,
reqdRank: 25e3,
rankGain: 500,
rankLoss: 50,
hpLoss: 500,
weights: { hack: 0.05, str: 0.2, def: 0.2, dex: 0.25, agi: 0.25, cha: 0, int: 0.05 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation K"] = new n.a({
name: "Operation K",
baseDifficulty: 15e3,
reqdRank: 3e4,
rankGain: 750,
rankLoss: 60,
hpLoss: 1e3,
weights: { hack: 0.05, str: 0.2, def: 0.2, dex: 0.25, agi: 0.25, cha: 0, int: 0.05 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation Deckard"] = new n.a({
name: "Operation Deckard",
baseDifficulty: 2e4,
reqdRank: 4e4,
rankGain: 1e3,
rankLoss: 75,
hpLoss: 200,
weights: { hack: 0, str: 0.24, def: 0.24, dex: 0.24, agi: 0.24, cha: 0, int: 0.04 },
decays: { hack: 0, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation Tyrell"] = new n.a({
name: "Operation Tyrell",
baseDifficulty: 25e3,
reqdRank: 5e4,
rankGain: 1500,
rankLoss: 100,
hpLoss: 500,
weights: { hack: 0.1, str: 0.2, def: 0.2, dex: 0.2, agi: 0.2, cha: 0, int: 0.1 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation Wallace"] = new n.a({
name: "Operation Wallace",
baseDifficulty: 3e4,
reqdRank: 75e3,
rankGain: 2e3,
rankLoss: 150,
hpLoss: 1500,
weights: { hack: 0, str: 0.24, def: 0.24, dex: 0.24, agi: 0.24, cha: 0, int: 0.04 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation Shoulder of Orion"] = new n.a({
name: "Operation Shoulder of Orion",
baseDifficulty: 35e3,
reqdRank: 1e5,
rankGain: 2500,
rankLoss: 500,
hpLoss: 1500,
weights: { hack: 0.1, str: 0.2, def: 0.2, dex: 0.2, agi: 0.2, cha: 0, int: 0.1 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isStealth: !0,
})),
(r["Operation Hyron"] = new n.a({
name: "Operation Hyron",
baseDifficulty: 4e4,
reqdRank: 125e3,
rankGain: 3e3,
rankLoss: 1e3,
hpLoss: 500,
weights: { hack: 0.1, str: 0.2, def: 0.2, dex: 0.2, agi: 0.2, cha: 0, int: 0.1 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation Morpheus"] = new n.a({
name: "Operation Morpheus",
baseDifficulty: 45e3,
reqdRank: 15e4,
rankGain: 4e3,
rankLoss: 1e3,
hpLoss: 100,
weights: { hack: 0.05, str: 0.15, def: 0.15, dex: 0.3, agi: 0.3, cha: 0, int: 0.05 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isStealth: !0,
})),
(r["Operation Ion Storm"] = new n.a({
name: "Operation Ion Storm",
baseDifficulty: 5e4,
reqdRank: 175e3,
rankGain: 5e3,
rankLoss: 1e3,
hpLoss: 5e3,
weights: { hack: 0, str: 0.24, def: 0.24, dex: 0.24, agi: 0.24, cha: 0, int: 0.04 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation Annihilus"] = new n.a({
name: "Operation Annihilus",
baseDifficulty: 55e3,
reqdRank: 2e5,
rankGain: 7500,
rankLoss: 1e3,
hpLoss: 1e4,
weights: { hack: 0, str: 0.24, def: 0.24, dex: 0.24, agi: 0.24, cha: 0, int: 0.04 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation Ultron"] = new n.a({
name: "Operation Ultron",
baseDifficulty: 6e4,
reqdRank: 25e4,
rankGain: 1e4,
rankLoss: 2e3,
hpLoss: 1e4,
weights: { hack: 0.1, str: 0.2, def: 0.2, dex: 0.2, agi: 0.2, cha: 0, int: 0.1 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
isKill: !0,
})),
(r["Operation Centurion"] = new n.a({
name: "Operation Centurion",
baseDifficulty: 7e4,
reqdRank: 3e5,
rankGain: 15e3,
rankLoss: 5e3,
hpLoss: 1e4,
weights: { hack: 0.1, str: 0.2, def: 0.2, dex: 0.2, agi: 0.2, cha: 0, int: 0.1 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
})),
(r["Operation Vindictus"] = new n.a({
name: "Operation Vindictus",
baseDifficulty: 75e3,
reqdRank: 35e4,
rankGain: 2e4,
rankLoss: 2e4,
hpLoss: 2e4,
weights: { hack: 0.1, str: 0.2, def: 0.2, dex: 0.2, agi: 0.2, cha: 0, int: 0.1 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
})),
(r["Operation Daedalus"] = new n.a({
name: "Operation Daedalus",
baseDifficulty: 8e4,
reqdRank: 4e5,
rankGain: 4e4,
rankLoss: 1e4,
hpLoss: 1e5,
weights: { hack: 0.1, str: 0.2, def: 0.2, dex: 0.2, agi: 0.2, cha: 0, int: 0.1 },
decays: { hack: 0.6, str: 0.8, def: 0.8, dex: 0.8, agi: 0.8, cha: 0, int: 0.75 },
}));
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
});
var n = a(283);
const r = {};
!(function () {
let e;
(e = "Training"),
(r[e] = new n.a({ name: e })),
(e = "Field Analysis"),
(r[e] = new n.a({ name: e })),
(e = "Recruitment"),
(r[e] = new n.a({ name: e })),
(e = "Diplomacy"),
(r[e] = new n.a({ name: e })),
(e = "Hyperbolic Regeneration Chamber"),
(r[e] = new n.a({ name: e }));
})();
},
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(198);
function r(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class i {
constructor(e, t) {
r(this, "lvl", 1), r(this, "owned", !1);
const a = "BitNode" + e,
i = n.a[a];
if (null == i) throw new Error("Invalid Bit Node for this Source File");
(this.n = e), (this.name = `Source-File ${e}: ${i.name}`), (this.info = t);
}
}
},
,
,
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return b;
}),
a.d(t, "b", function () {
return E;
});
var n = a(0),
r = a.n(n),
i = a(122),
o = a(127),
s = a(1),
l = a(32),
c = a(10),
u = a(76),
m = a(473),
h = a.n(m),
d = a(1079),
p = a(131),
f = a(155),
g = a(504),
y = a.n(g);
const b = new i.a();
function E() {
const [e, t] = Object(n.useState)([]);
return (
Object(n.useEffect)(
() =>
b.subscribe((e) => {
const a = e.server + "-" + e.filename + e.args.map((e) => "" + e).join("-");
t((t) => [...t, { id: a, script: e }]);
}),
[],
),
r.a.createElement(
r.a.Fragment,
null,
e.map((e) =>
r.a.createElement(k, {
key: e.id,
script: e.script,
id: e.id,
onClose: () => {
return (a = e.id), void t((e) => e.filter((e) => e.id !== a));
var a;
},
}),
),
)
);
}
const v = Object(p.a)(() =>
Object(f.a)({
logs: {
overflowY: "scroll",
overflowX: "hidden",
scrollbarWidth: "auto",
display: "flex",
flexDirection: "column-reverse",
},
}),
);
function k(e) {
const t = v(),
a = Object(n.useRef)(null),
i = Object(n.useState)(!1)[1];
function m() {
i((e) => !e);
}
return (
Object(n.useEffect)(() => {
const e = setInterval(m, 1e3);
return () => clearInterval(e);
}, []),
r.a.createElement(
h.a,
{ handle: "#drag" },
r.a.createElement(
u.a,
{
style: { display: "flex", flexFlow: "column", position: "fixed", left: "40%", top: "30%", zIndex: 1400 },
ref: a,
},
r.a.createElement(
u.a,
{ style: { cursor: "grab" } },
r.a.createElement(
l.a,
{ id: "drag", display: "flex", alignItems: "center" },
r.a.createElement(
s.a,
{ color: "primary", variant: "h6" },
e.script.filename,
" ",
e.script.args.map((e) => "" + e).join(" "),
),
r.a.createElement(
l.a,
{ position: "absolute", right: 0 },
r.a.createElement(
c.a,
{
onClick: function () {
Object(o.a)(e.script, e.script.server, !0), e.onClose();
},
},
"Kill Script",
),
r.a.createElement(c.a, { onClick: e.onClose }, "Close"),
),
),
),
r.a.createElement(
u.a,
{ sx: { overflow: "scroll", overflowWrap: "break-word", whiteSpace: "pre-line" } },
r.a.createElement(
d.ResizableBox,
{
className: t.logs,
height: 500,
width: 500,
handle: r.a.createElement(
"span",
{ style: { position: "absolute", right: "-10px", bottom: "-13px", cursor: "nw-resize" } },
r.a.createElement(y.a, { color: "primary", style: { transform: "rotate(45deg)" } }),
),
},
r.a.createElement(
l.a,
null,
e.script.logs.map((e, t) => r.a.createElement(s.a, { key: t }, e, r.a.createElement("br", null))),
),
),
),
),
)
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return c;
});
var n = a(7),
r = a(230),
i = a(37),
o = a(15),
s = a(21);
function l(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class c {
constructor(e = "", t = 1) {
l(this, "cores", 1),
l(this, "level", 1),
l(this, "moneyGainRatePerSecond", 0),
l(this, "onlineTimeSeconds", 0),
l(this, "ram", 1),
l(this, "totalMoneyGenerated", 0),
(this.name = e),
this.updateMoneyGainRate(t);
}
calculateCoreUpgradeCost(e = 1, t) {
return Object(r.a)(this.cores, e, t);
}
calculateLevelUpgradeCost(e = 1, t) {
return Object(r.b)(this.level, e, t);
}
calculateRamUpgradeCost(e = 1, t) {
return Object(r.e)(this.ram, e, t);
}
process(e = 1) {
const t = (e * n.a.MilliPerCycle) / 1e3;
let a = this.moneyGainRatePerSecond * t;
return (
isNaN(a) && (console.error(`Hacknet Node ${this.name} calculated earnings of NaN`), (a = 0)),
(this.totalMoneyGenerated += a),
(this.onlineTimeSeconds += t),
a
);
}
upgradeCore(e = 1, t) {
(this.cores = Math.min(i.a.MaxCores, Math.round(this.cores + e))), this.updateMoneyGainRate(t);
}
upgradeLevel(e = 1, t) {
(this.level = Math.min(i.a.MaxLevel, Math.round(this.level + e))), this.updateMoneyGainRate(t);
}
upgradeRam(e = 1, t) {
for (let t = 0; t < e; ++t) this.ram *= 2;
(this.ram = Math.round(this.ram)), this.updateMoneyGainRate(t);
}
updateMoneyGainRate(e) {
(this.moneyGainRatePerSecond = Object(r.c)(this.level, this.ram, this.cores, e)),
isNaN(this.moneyGainRatePerSecond) &&
((this.moneyGainRatePerSecond = 0),
Object(o.a)("Error in calculating Hacknet Node production. Please report to game developer"));
}
toJSON() {
return Object(s.b)("HacknetNode", this);
}
static fromJSON(e) {
return Object(s.a)(c, e.data);
}
}
s.c.constructors.HacknetNode = c;
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(797),
r = a(798);
const i = {};
for (const e of r.a) i[(o = e).name] = new n.a(o);
var o;
},
function (e, t, a) {
"use strict";
function n(e) {
const t = [];
for (let a = 0; a < e.length; ++a) {
let r = e[a];
Array.isArray(r) ? (r = n(r)) : "string" == typeof r && (r = `"${r}"`), t.push(r);
}
return `[${t.join(", ")}]`;
}
a.d(t, "a", function () {
return n;
});
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
}),
a.d(t, "b", function () {
return o;
});
var n = a(8),
r = a(7);
function i() {
return r.a.MarketData4SCost * n.a.FourSigmaMarketDataCost;
}
function o() {
return r.a.MarketDataTixApi4SCost * n.a.FourSigmaMarketDataApiCost;
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(0),
r = a(443),
i = a(27),
o = a(10),
s = a(29);
function l(e) {
const t = i.b.Player();
return n.createElement(
n.Fragment,
null,
n.createElement(
s.a,
{
title: n.createElement("span", {
dangerouslySetInnerHTML: {
__html: (function () {
const a = t.getNextCompanyPosition(e.company, e.entryPosType);
return null == a ? "" : e.company.hasPosition(a) ? Object(r.a)(e.company, a, !0) : "";
})(),
},
}),
},
n.createElement(o.a, { onClick: e.onClick }, e.text),
),
n.createElement("br", null),
);
}
},
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = new (a(122).a)();
},
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(291),
r = a(68);
const i = {
BruteSSHProgram: new n.a(r.a.BruteSSHProgram.name, 5e5, "Opens up SSH Ports"),
FTPCrackProgram: new n.a(r.a.FTPCrackProgram.name, 15e5, "Opens up FTP Ports"),
RelaySMTPProgram: new n.a(r.a.RelaySMTPProgram.name, 5e6, "Opens up SMTP Ports"),
HTTPWormProgram: new n.a(r.a.HTTPWormProgram.name, 3e7, "Opens up HTTP Ports"),
SQLInjectProgram: new n.a(r.a.SQLInjectProgram.name, 25e7, "Opens up SQL Ports"),
DeepscanV1: new n.a(r.a.DeepscanV1.name, 5e5, "Enables 'scan-analyze' with a depth up to 5"),
DeepscanV2: new n.a(r.a.DeepscanV2.name, 25e6, "Enables 'scan-analyze' with a depth up to 10"),
AutolinkProgram: new n.a(r.a.AutoLink.name, 1e6, "Enables direct connect via 'scan-analyze'"),
ServerProfilerProgram: new n.a(
r.a.ServerProfiler.name,
1e6,
"Displays hacking and Netscript-related information about a server",
),
};
},
function (e, t, a) {
"use strict";
function n(e, t) {
if (t < 0 || t > 100) return e;
const a = e * (t / 100);
return e + (Math.random() * (2 * a) - a);
}
a.d(t, "a", function () {
return n;
});
},
function (e, t, a) {
"use strict";
let n;
a.d(t, "a", function () {
return n;
}),
(function (e) {
(e[(e.SyntaxError = -1)] = "SyntaxError"),
(e[(e.ImportError = -2)] = "ImportError"),
(e[(e.URLImportError = -3)] = "URLImportError");
})(n || (n = {}));
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return s;
});
var n = a(799),
r = a(13),
i = a(24);
function o(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class s {
constructor(e, t, a) {
o(this, "code", ""),
o(this, "delay", null),
o(this, "disableLogs", {}),
o(this, "dynamicLoadedFns", {}),
o(this, "dynamicRamUsage", r.a.ScriptBaseRamCost),
o(this, "errorMessage", ""),
o(this, "loadedFns", {}),
o(this, "output", ""),
o(this, "ramUsage", 0),
o(this, "running", !1),
(this.name = e.filename),
(this.hostname = e.server);
const s = Math.round(t);
if ("number" != typeof s || isNaN(s)) throw new Error("Invalid PID when constructing WorkerScript: " + t);
(this.pid = s), (e.pid = s);
const l = Object(i.d)(this.hostname);
if (null == l) throw new Error("WorkerScript constructed with invalid server ip: " + this.hostname);
let c = !1;
for (let e = 0; e < l.scripts.length; ++e)
l.scripts[e].filename === this.name && ((c = !0), (this.code = l.scripts[e].code));
if (!c) throw new Error("WorkerScript constructed with invalid script filename: " + this.name);
(this.env = new n.a(null)),
"function" == typeof a && (this.env.vars = a(this)),
this.env.set("args", e.args.slice()),
(this.scriptRef = e),
(this.args = e.args.slice());
}
getServer() {
const e = Object(i.d)(this.hostname);
if (null == e) throw new Error(`Script ${this.name} pid ${this.pid} is running on non-existent server?`);
return e;
}
getScript() {
const e = this.getServer();
for (let t = 0; t < e.scripts.length; ++t) if (e.scripts[t].filename === this.name) return e.scripts[t];
return (
console.error(
"Failed to find underlying Script object in WorkerScript.getScript(). This probably means somethings wrong",
),
null
);
}
getScriptOnServer(e, t) {
null == t && (t = this.getServer());
for (let a = 0; a < t.scripts.length; ++a) if (t.scripts[a].filename === e) return t.scripts[a];
return null;
}
shouldLog(e) {
return null == this.disableLogs[e];
}
log(e, t) {
this.shouldLog(e) &&
(e && t ? this.scriptRef.log(`${e}: ${t}`) : e ? this.scriptRef.log(e) : this.scriptRef.log(t));
}
print(e) {
this.scriptRef.log(e);
}
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
GangRespectToReputationRatio: 25,
MaximumGangMembers: 12,
CyclesPerTerritoryAndPowerUpdate: 100,
AscensionMultiplierRatio: 0.15,
Names: [
"Slum Snakes",
"Tetrads",
"The Syndicate",
"The Dark Army",
"Speakers for the Dead",
"NiteSec",
"The Black Hand",
],
};
},
,
,
,
,
,
,
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
});
var n = a(451);
function r() {
return Object(n.a)(99) + "." + Object(n.a)(9) + "." + Object(n.a)(9) + "." + Object(n.a)(9);
}
},
function (e, t, a) {
"use strict";
function n(e, t) {
if (e.length !== t.length) return !1;
for (let a = 0; a < e.length; ++a)
if (Array.isArray(e[a])) {
if (!Array.isArray(t[a])) return !1;
if (!n(e[a], t[a])) return !1;
} else if (e[a] !== t[a]) return !1;
return !0;
}
a.d(t, "a", function () {
return n;
});
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(795),
r = a(796);
const i = {};
for (const e of r.a)
null != i[(o = e).name] && console.warn("Duplicate Research being defined: " + o.name), (i[o.name] = new n.a(o));
var o;
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(0),
r = a(4),
i = a(131),
o = a(155);
const s = Object(i.a)((e) => Object(o.a)({ favor: { color: e.colors.rep } }));
function l({ favor: e }) {
const t = s();
return n.createElement("span", { className: t.favor }, "number" == typeof e ? r.a.formatFavor(e) : e);
}
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return u;
}),
a.d(t, "c", function () {
return h;
}),
a.d(t, "a", function () {
return d;
});
var n = a(0),
r = a.n(n),
i = a(538),
o = a(731),
s = a(1419),
l = a(122),
c = a(14);
const u = new l.a();
let m;
function h() {
m = Object(i.a)({
colors: {
hp: c.a.theme.hp,
money: c.a.theme.money,
hack: c.a.theme.hack,
combat: c.a.theme.combat,
cha: c.a.theme.cha,
int: c.a.theme.int,
rep: c.a.theme.rep,
},
palette: {
primary: { light: c.a.theme.primarylight, main: c.a.theme.primary, dark: c.a.theme.primarydark },
secondary: { light: c.a.theme.secondarylight, main: c.a.theme.secondary, dark: c.a.theme.secondarydark },
error: { light: c.a.theme.errorlight, main: c.a.theme.error, dark: c.a.theme.errordark },
info: { light: c.a.theme.infolight, main: c.a.theme.info, dark: c.a.theme.infodark },
warning: { light: c.a.theme.warninglight, main: c.a.theme.warning, dark: c.a.theme.warningdark },
background: { default: c.a.theme.black, paper: c.a.theme.well },
action: { disabled: c.a.theme.disabled },
},
typography: {
fontFamily:
"Lucida Console, Lucida Sans Unicode, Fira Mono, Consolas, Courier New, Courier, monospace, Times New Roman",
button: { textTransform: "none" },
},
components: {
MuiInputBase: {
styleOverrides: {
root: { backgroundColor: c.a.theme.well, color: c.a.theme.primary },
input: { "&::placeholder": { userSelect: "none", color: c.a.theme.primarydark } },
},
},
MuiInput: {
styleOverrides: {
root: { backgroundColor: c.a.theme.well, borderBottomColor: "#fff" },
underline: {
"&:hover": { borderBottomColor: c.a.theme.primarydark },
"&:before": { borderBottomColor: c.a.theme.primary },
"&:after": { borderBottomColor: c.a.theme.primarylight },
},
},
},
MuiInputLabel: {
styleOverrides: {
root: { color: c.a.theme.primarydark, userSelect: "none", "&:before": { color: c.a.theme.primarylight } },
},
},
MuiButton: {
styleOverrides: {
root: {
backgroundColor: "#333",
border: "1px solid " + c.a.theme.well,
"&:hover": { backgroundColor: c.a.theme.black },
borderRadius: 0,
},
},
},
MuiSelect: { styleOverrides: { icon: { color: c.a.theme.primary } }, defaultProps: { variant: "standard" } },
MuiTextField: { defaultProps: { variant: "standard" } },
MuiTypography: { defaultProps: { color: "primary" } },
MuiMenu: { styleOverrides: { list: { backgroundColor: c.a.theme.well } } },
MuiMenuItem: { styleOverrides: { root: { color: c.a.theme.primary } } },
MuiAccordionSummary: { styleOverrides: { root: { backgroundColor: "#111" } } },
MuiAccordionDetails: { styleOverrides: { root: { backgroundColor: c.a.theme.black } } },
MuiIconButton: { styleOverrides: { root: { color: c.a.theme.primary } } },
MuiTooltip: {
styleOverrides: {
tooltip: {
fontSize: "1em",
color: c.a.theme.primary,
backgroundColor: c.a.theme.well,
borderRadius: 0,
border: "2px solid white",
maxWidth: "100vh",
},
},
defaultProps: { disableInteractive: !0 },
},
MuiSlider: { styleOverrides: { valueLabel: { color: c.a.theme.primary, backgroundColor: c.a.theme.well } } },
MuiDrawer: {
styleOverrides: {
paper: {
"&::-webkit-scrollbar": { display: "none" },
scrollbarWidth: "none",
backgroundColor: c.a.theme.black,
},
paperAnchorDockedLeft: { borderRight: "1px solid " + c.a.theme.welllight },
},
},
MuiDivider: { styleOverrides: { root: { backgroundColor: c.a.theme.welllight } } },
MuiFormControlLabel: { styleOverrides: { root: { color: c.a.theme.primary } } },
MuiSwitch: {
styleOverrides: {
switchBase: { color: c.a.theme.primarydark },
track: { backgroundColor: c.a.theme.welllight },
},
},
MuiPaper: {
styleOverrides: {
root: { borderRadius: 0, backgroundColor: c.a.theme.black, border: "1px solid " + c.a.theme.welllight },
},
},
MuiTablePagination: { styleOverrides: { select: { color: c.a.theme.primary } } },
MuiTab: {
styleOverrides: {
textColorPrimary: { color: c.a.theme.secondary, "&.Mui-selected": { color: c.a.theme.primary } },
},
},
},
});
}
h();
const d = ({ children: e }) => r.a.createElement(o.a, { injectFirst: !0 }, r.a.createElement(s.a, { theme: m }, e));
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return c;
});
var n = a(2),
r = a(30),
i = a(260),
o = a(21),
s = a(55);
function l(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class c {
constructor(e = null) {
l(this, "name", ""),
l(this, "level", 1),
l(this, "maxLevel", 1),
l(this, "autoLevel", !0),
l(this, "baseDifficulty", 100),
l(this, "difficultyFac", 1.01),
l(this, "rewardFac", 1.02),
l(this, "successes", 0),
l(this, "failures", 0),
l(this, "rankGain", 0),
l(this, "rankLoss", 0),
l(this, "hpLoss", 0),
l(this, "hpLost", 0),
l(this, "isStealth", !1),
l(this, "isKill", !1),
l(this, "count", Object(r.a)(1e3, 25e3)),
l(this, "weights", { hack: 1 / 7, str: 1 / 7, def: 1 / 7, dex: 1 / 7, agi: 1 / 7, cha: 1 / 7, int: 1 / 7 }),
l(this, "decays", { hack: 0.9, str: 0.9, def: 0.9, dex: 0.9, agi: 0.9, cha: 0.9, int: 0.9 }),
l(this, "teamCount", 0),
e && e.name && (this.name = e.name),
e && e.baseDifficulty && (this.baseDifficulty = Object(i.a)(e.baseDifficulty, 10)),
e && e.difficultyFac && (this.difficultyFac = e.difficultyFac),
e && e.rewardFac && (this.rewardFac = e.rewardFac),
e && e.rankGain && (this.rankGain = e.rankGain),
e && e.rankLoss && (this.rankLoss = e.rankLoss),
e && e.hpLoss && (this.hpLoss = e.hpLoss),
e && e.isStealth && (this.isStealth = e.isStealth),
e && e.isKill && (this.isKill = e.isKill),
e && e.count && (this.count = e.count),
e && e.weights && (this.weights = e.weights),
e && e.decays && (this.decays = e.decays);
let t = 0;
for (const e in this.weights) this.weights.hasOwnProperty(e) && (t += this.weights[e]);
if (t - 1 >= 10 * Number.EPSILON)
throw new Error(
"Invalid weights when constructing Action " +
this.name +
". The weights should sum up to 1. They sum up to :1",
);
for (const e in this.decays)
if (this.decays.hasOwnProperty(e) && this.decays[e] > 1)
throw new Error(
"Invalid decays when constructing Action " + this.name + ". Decay value cannot be greater than 1",
);
}
getDifficulty() {
const e = this.baseDifficulty * Math.pow(this.difficultyFac, this.level - 1);
if (isNaN(e)) throw new Error("Calculated NaN in Action.getDifficulty()");
return e;
}
attempt(e) {
return Math.random() < this.getSuccessChance(e);
}
getActionTimePenalty() {
return 1;
}
getActionTime(e) {
let t = this.getDifficulty() / s.a.DifficultyToTimeFactor;
const a = e.skillMultipliers.actionTime,
r = n.a.agility * e.skillMultipliers.effAgi,
i = n.a.dexterity * e.skillMultipliers.effDex,
o =
0.5 *
(Math.pow(r, s.a.EffAgiExponentialFactor) +
Math.pow(i, s.a.EffDexExponentialFactor) +
r / s.a.EffAgiLinearFactor +
i / s.a.EffDexLinearFactor);
return (t = Math.max(1, (t * a) / o)), Math.ceil(t * this.getActionTimePenalty());
}
getTeamSuccessBonus(e) {
return 1;
}
getActionTypeSkillSuccessBonus(e) {
return 1;
}
getChaosCompetencePenalty(e, t) {
const a = e.getCurrentCity();
return t.est
? Math.pow(a.popEst / s.a.PopulationThreshold, s.a.PopulationExponent)
: Math.pow(a.pop / s.a.PopulationThreshold, s.a.PopulationExponent);
}
getChaosDifficultyBonus(e) {
const t = e.getCurrentCity();
if (t.chaos > s.a.ChaosThreshold) {
const e = t.chaos - s.a.ChaosThreshold + 1;
return Math.pow(e, 0.1);
}
return 1;
}
getEstSuccessChance(e) {
function t(e) {
return Math.max(0, Math.min(e, 1));
}
const a = this.getSuccessChance(e, { est: !0 }),
n = this.getSuccessChance(e),
r = Math.abs(n - a);
let i = n - r,
o = n + r;
const s = e.getCurrentCity(),
l = s.pop / s.popEst;
return l < 1 ? (i *= l) : (o *= l), [t(i), t(o)];
}
getSuccessChance(e, t = { est: !1 }) {
if (null == e) throw new Error("Invalid Bladeburner instance passed into Action.getSuccessChance");
let a = this.getDifficulty(),
r = 0;
for (const t in this.weights)
if (this.weights.hasOwnProperty(t)) {
const a = n.a.queryStatFromString(t),
i = "eff" + t.charAt(0).toUpperCase() + t.slice(1);
let o = e.skillMultipliers[i];
null == o && (console.error("Failed to find Bladeburner Skill multiplier for: " + t), (o = 1)),
(r += this.weights[t] * Math.pow(o * a, this.decays[t]));
}
if (
((r *= n.a.getIntelligenceBonus(0.75)),
(r *= e.calculateStaminaPenalty()),
(r *= this.getTeamSuccessBonus(e)),
(r *= this.getChaosCompetencePenalty(e, t)),
(a *= this.getChaosDifficultyBonus(e)),
"Raid" == this.name && e.getCurrentCity().comms <= 0)
)
return 0;
if (
((r *= e.skillMultipliers.successChanceAll),
(r *= this.getActionTypeSkillSuccessBonus(e)),
this.isStealth && (r *= e.skillMultipliers.successChanceStealth),
this.isKill && (r *= e.skillMultipliers.successChanceKill),
(r *= n.a.bladeburner_success_chance_mult),
isNaN(r))
)
throw new Error("Competence calculated as NaN in Action.getSuccessChance()");
return Math.min(1, r / a);
}
getSuccessesNeededForNextLevel(e) {
return Math.ceil(0.5 * this.maxLevel * (2 * e + (this.maxLevel - 1)));
}
setMaxLevel(e) {
this.successes >= this.getSuccessesNeededForNextLevel(e) && ++this.maxLevel;
}
toJSON() {
return Object(o.b)("Action", this);
}
static fromJSON(e) {
return Object(o.a)(c, e.data);
}
}
o.c.constructors.Action = c;
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return w;
}),
a.d(t, "a", function () {
return k;
});
var n = a(139),
r = a(58),
i = a(7),
o = a(25),
s = a(73),
l = a(229),
c = a(2),
u = a(24),
m = a(14),
h = a(62),
d = a(91),
p = a(500),
f = a(327),
g = a(15),
y = a(21),
b = a(353);
function E(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class v {
constructor() {
E(this, "PlayerSave", ""),
E(this, "AllServersSave", ""),
E(this, "CompaniesSave", ""),
E(this, "FactionsSave", ""),
E(this, "AliasesSave", ""),
E(this, "GlobalAliasesSave", ""),
E(this, "MessagesSave", ""),
E(this, "StockMarketSave", ""),
E(this, "SettingsSave", ""),
E(this, "VersionSave", ""),
E(this, "AllGangsSave", ""),
E(this, "LastExportBonus", "");
}
getSaveString() {
(this.PlayerSave = JSON.stringify(c.a)),
(this.AllServersSave = Object(u.j)()),
(this.CompaniesSave = JSON.stringify(r.a)),
(this.FactionsSave = JSON.stringify(o.a)),
(this.AliasesSave = JSON.stringify(n.a)),
(this.GlobalAliasesSave = JSON.stringify(n.b)),
(this.MessagesSave = JSON.stringify(l.a)),
(this.StockMarketSave = JSON.stringify(d.a)),
(this.SettingsSave = JSON.stringify(m.a)),
(this.VersionSave = JSON.stringify(i.a.Version)),
(this.LastExportBonus = JSON.stringify(f.a)),
c.a.inGang() && (this.AllGangsSave = JSON.stringify(s.a));
return btoa(unescape(encodeURIComponent(JSON.stringify(this))));
}
saveGame() {
const e = this.getSaveString();
Object(b.c)(e)
.then(() => p.a.emit())
.catch((e) => console.error(e));
}
exportGame() {
const e = this.getSaveString(),
t = Math.round(Date.now() / 1e3),
a = c.a.bitNodeN,
n = `bitburnerSave_BN${a}x${h.a[a]}_${t}.json`,
r = new Blob([e], { type: "text/plain" });
if (window.navigator.msSaveOrOpenBlob) window.navigator.msSaveOrOpenBlob(r, n);
else {
const e = document.createElement("a"),
t = URL.createObjectURL(r);
(e.href = t),
(e.download = n),
document.body.appendChild(e),
e.click(),
setTimeout(function () {
document.body.removeChild(e), window.URL.revokeObjectURL(t);
}, 0);
}
}
toJSON() {
return Object(y.b)("BitburnerSaveObject", this);
}
static fromJSON(e) {
return Object(y.a)(v, e.data);
}
}
function k(e) {
if (!e) return !1;
e = decodeURIComponent(escape(atob(e)));
const t = JSON.parse(e, y.c);
if (
(Object(c.b)(t.PlayerSave),
Object(u.h)(t.AllServersSave),
Object(r.c)(t.CompaniesSave),
Object(o.d)(t.FactionsSave),
t.hasOwnProperty("AliasesSave"))
)
try {
Object(n.c)(t.AliasesSave);
} catch (e) {
console.warn("Could not load Aliases from save"), Object(n.c)("");
}
else console.warn("Save file did not contain an Aliases property"), Object(n.c)("");
if (t.hasOwnProperty("GlobalAliasesSave"))
try {
Object(n.d)(t.GlobalAliasesSave);
} catch (e) {
console.warn("Could not load GlobalAliases from save"), Object(n.d)("");
}
else console.warn("Save file did not contain a GlobalAliases property"), Object(n.d)("");
if (t.hasOwnProperty("MessagesSave"))
try {
Object(l.d)(t.MessagesSave);
} catch (e) {
console.warn("Could not load Messages from save"), Object(l.c)();
}
else console.warn("Save file did not contain a Messages property"), Object(l.c)();
if (t.hasOwnProperty("StockMarketSave"))
try {
Object(d.i)(t.StockMarketSave);
} catch (e) {
Object(d.i)("");
}
else Object(d.i)("");
if (t.hasOwnProperty("SettingsSave"))
try {
m.a.load(t.SettingsSave);
} catch (e) {
console.error("ERROR: Failed to parse Settings. Re-initing default values"), m.a.init();
}
else m.a.init();
if (t.hasOwnProperty("LastExportBonus"))
try {
f.d(JSON.parse(t.LastExportBonus));
} catch (e) {
f.d(new Date().getTime()), console.error("ERROR: Failed to parse last export bonus Settings " + e);
}
if (c.a.inGang() && t.hasOwnProperty("AllGangsSave"))
try {
Object(s.b)(t.AllGangsSave);
} catch (e) {
console.error("ERROR: Failed to parse AllGangsSave: " + e);
}
if (t.hasOwnProperty("VersionSave"))
try {
const e = JSON.parse(t.VersionSave, y.c);
!(function (e) {
const t = c.a;
if (e <= "0.41.2") {
null != t.companyPosition &&
"string" != typeof t.companyPosition &&
((t.companyPosition = t.companyPosition.data.positionName),
null == t.companyPosition && (t.companyPosition = ""));
for (const e in r.a) {
const t = r.a[e];
if (
(0 == t.name && null != t.companyName && (t.name = t.companyName),
t.companyPositions instanceof Array)
) {
const e = {};
for (let a = 0; a < t.companyPositions.length; ++a) e[t.companyPositions[a]] = !0;
t.companyPositions = e;
}
}
}
e < "0.43.0" &&
("" !== t.companyName &&
null != t.companyPosition &&
"" !== t.companyPosition &&
(t.jobs[t.companyName] = t.companyPosition),
delete t.companyPosition);
})(e),
window.location.href.toLowerCase().includes("bitburner-beta")
? Object(g.a)(
"You are playing on the beta environment! This branch of the game features the latest developments in the game. This version may be unstable.
Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) or the Bitburner subreddit (reddit.com/r/bitburner).
" +
i.a.LatestUpdate,
)
: e != i.a.Version && _();
} catch (e) {
_();
}
else _();
return !0;
}
function _() {
Object(g.a)(
"New update!
Please report any bugs/issues through the github repository or the Bitburner subreddit (reddit.com/r/bitburner).
" +
i.a.LatestUpdate,
);
}
y.c.constructors.BitburnerSaveObject = v;
const w = new v();
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return E;
});
var n = a(69),
r = a(187),
i = a(8),
o = a(186),
s = a(74),
l = a(58),
c = a(200),
u = a(81),
m = a(7),
h = a(172),
d = a(25),
p = a(161),
f = a(22),
g = a(9),
y = a(21);
function b(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class E extends r.a {
constructor(e = null) {
super(),
b(this, "className", ""),
b(this, "crimeType", ""),
b(this, "currentTask", n.a.Idle),
b(this, "currentTaskLocation", ""),
b(this, "currentTaskMaxTime", 0),
b(this, "currentTaskTime", 0),
b(this, "earningsForSleeves", Object(r.b)()),
b(this, "earningsForPlayer", Object(r.b)()),
b(this, "earningsForTask", Object(r.b)()),
b(this, "factionWorkType", p.a.None),
b(this, "gainRatesForTask", Object(r.b)()),
b(this, "gymStatType", ""),
b(this, "logs", []),
b(this, "memory", 1),
b(this, "shock", 1),
b(this, "storedCycles", 0),
b(this, "sync", 1),
null != e && this.shockRecovery(e);
}
commitCrime(e, t) {
const a = s.a[t];
return (
a instanceof o.a &&
(this.currentTask !== n.a.Idle ? this.finishTask(e) : this.resetTaskStatus(),
(this.gainRatesForTask.hack = a.hacking_exp * this.hacking_exp_mult * i.a.CrimeExpGain),
(this.gainRatesForTask.str = a.strength_exp * this.strength_exp_mult * i.a.CrimeExpGain),
(this.gainRatesForTask.def = a.defense_exp * this.defense_exp_mult * i.a.CrimeExpGain),
(this.gainRatesForTask.dex = a.dexterity_exp * this.dexterity_exp_mult * i.a.CrimeExpGain),
(this.gainRatesForTask.agi = a.agility_exp * this.agility_exp_mult * i.a.CrimeExpGain),
(this.gainRatesForTask.cha = a.charisma_exp * this.charisma_exp_mult * i.a.CrimeExpGain),
(this.gainRatesForTask.money = a.money * this.crime_money_mult * i.a.CrimeMoney),
(this.currentTaskLocation = String(this.gainRatesForTask.money)),
(this.crimeType = t),
(this.currentTaskMaxTime = a.time),
(this.currentTask = n.a.Crime),
!0)
);
}
finishTask(e) {
let t = Object(r.b)();
if (this.currentTask === n.a.Crime && this.currentTaskTime >= this.currentTaskMaxTime) {
const a = s.a[this.crimeType];
if (!(a instanceof o.a))
return (
console.error("Invalid data stored in sleeve.crimeType: " + this.crimeType), this.resetTaskStatus(), t
);
if (Math.random() < a.successRate(this)) {
const n = Object(r.b)(),
i = Object.keys(n);
for (let e = 0; e < i.length; ++e) {
const t = i[e];
n[t] = 2 * this.gainRatesForTask[t];
}
(t = this.gainExperience(e, n)),
this.gainMoney(e, this.gainRatesForTask),
(e.karma -= a.karma * (this.sync / 100));
} else t = this.gainExperience(e, this.gainRatesForTask);
return (this.currentTaskTime = 0), t;
}
return this.resetTaskStatus(), t;
}
gainExperience(e, t, a = 1, n = !1) {
if (n)
return (
t.hack > 0 && (this.hacking_exp += t.hack),
t.str > 0 && (this.strength_exp += t.str),
t.def > 0 && (this.defense_exp += t.def),
t.dex > 0 && (this.dexterity_exp += t.dex),
t.agi > 0 && (this.agility_exp += t.agi),
t.cha > 0 && (this.charisma_exp += t.cha),
Object(r.b)()
);
const i = (this.shock / 100) * (this.sync / 100) * a,
o = t.hack * i,
s = t.str * i,
l = t.def * i,
c = t.dex * i,
u = t.agi * i,
m = t.cha * i;
return (
o > 0 &&
((this.hacking_exp += o),
e.gainHackingExp(o),
(this.earningsForPlayer.hack += o),
(this.earningsForTask.hack += o)),
s > 0 &&
((this.strength_exp += s),
e.gainStrengthExp(s),
(this.earningsForPlayer.str += s),
(this.earningsForTask.str += s)),
l > 0 &&
((this.defense_exp += l),
e.gainDefenseExp(l),
(this.earningsForPlayer.def += l),
(this.earningsForTask.def += l)),
c > 0 &&
((this.dexterity_exp += c),
e.gainDexterityExp(c),
(this.earningsForPlayer.dex += c),
(this.earningsForTask.dex += c)),
u > 0 &&
((this.agility_exp += u),
e.gainAgilityExp(u),
(this.earningsForPlayer.agi += u),
(this.earningsForTask.agi += u)),
m > 0 &&
((this.charisma_exp += m),
e.gainCharismaExp(m),
(this.earningsForPlayer.cha += m),
(this.earningsForTask.cha += m)),
(this.earningsForSleeves.hack += o * (this.sync / 100)),
(this.earningsForSleeves.str += s * (this.sync / 100)),
(this.earningsForSleeves.def += l * (this.sync / 100)),
(this.earningsForSleeves.dex += c * (this.sync / 100)),
(this.earningsForSleeves.agi += u * (this.sync / 100)),
(this.earningsForSleeves.cha += m * (this.sync / 100)),
{
hack: o * (this.sync / 100),
str: s * (this.sync / 100),
def: l * (this.sync / 100),
dex: c * (this.sync / 100),
agi: u * (this.sync / 100),
cha: m * (this.sync / 100),
money: 0,
}
);
}
gainMoney(e, t, a = 1) {
const n = t.money * a;
(this.earningsForTask.money += n),
(this.earningsForPlayer.money += n),
e.gainMoney(n),
e.recordMoneySource(n, "sleeves");
}
getMemoryUpgradeCost(e) {
const t = Math.round(e);
if (t < 0) return 0;
if (this.memory + t > 100) return this.getMemoryUpgradeCost(100 - this.memory);
let a = 0,
n = this.memory - 1;
for (let t = 0; t < e; ++t) (a += Math.pow(1.02, n)), ++n;
return 1e12 * a;
}
getRepGain(e) {
if (this.currentTask !== n.a.Faction) {
if (this.currentTask === n.a.Company) {
const t = this.currentTaskLocation,
a = l.a[t];
if (null == a) return console.error("Invalid company found when trying to calculate rep gain: " + t), 0;
const n = u.a[e.jobs[t]];
if (null == n)
return (
console.error("Invalid company position name found when trying to calculate rep gain: " + e.jobs[t]), 0
);
const r = n.calculateJobPerformance(
this.hacking_skill,
this.strength,
this.defense,
this.dexterity,
this.agility,
this.charisma,
),
i = 1 + a.favor / 100;
return r * this.company_rep_mult * i;
}
return 0;
}
{
let e = 1;
const t = d.a[this.currentTaskLocation];
switch ((null != t && (e = 1 + t.favor / 100), this.factionWorkType)) {
case p.a.Hacking:
return this.getFactionHackingWorkRepGain() * (this.shock / 100) * e;
case p.a.Field:
return this.getFactionFieldWorkRepGain() * (this.shock / 100) * e;
case p.a.Security:
return this.getFactionSecurityWorkRepGain() * (this.shock / 100) * e;
default:
return (
console.warn("Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): " + this.factionWorkType),
0
);
}
}
}
installAugmentation(e) {
(this.hacking_exp = 0),
(this.strength_exp = 0),
(this.defense_exp = 0),
(this.dexterity_exp = 0),
(this.agility_exp = 0),
(this.charisma_exp = 0),
this.applyAugmentation(e),
this.augmentations.push({ name: e.name, level: 1 }),
this.updateStatLevels();
}
log(e) {
this.logs.push(e), this.logs.length > 50 && this.logs.shift();
}
prestige(e) {
(this.hacking_exp = 0),
(this.strength_exp = 0),
(this.defense_exp = 0),
(this.dexterity_exp = 0),
(this.agility_exp = 0),
(this.charisma_exp = 0),
this.resetTaskStatus(),
(this.earningsForSleeves = Object(r.b)()),
(this.earningsForPlayer = Object(r.b)()),
this.shockRecovery(e),
(this.augmentations = []),
this.resetMultipliers(),
(this.shock = 1),
(this.storedCycles = 0),
(this.sync = Math.max(this.memory, 1)),
(this.logs = []);
}
process(e, t = 1) {
const a = 1e3 / m.a.MilliPerCycle;
if (((this.storedCycles += t), this.storedCycles < a)) return null;
let i = this.storedCycles;
i = Math.min(i, 15);
let o = i * m.a.MilliPerCycle;
0 !== this.currentTaskMaxTime &&
this.currentTaskTime + o > this.currentTaskMaxTime &&
((o = this.currentTaskMaxTime - this.currentTaskTime),
(i = Math.floor(o / m.a.MilliPerCycle)),
(o < 0 || i < 0) && (console.warn("Sleeve.process() calculated negative cycle usage"), (o = 0), (i = 0))),
(this.currentTaskTime += o),
(this.shock = Math.min(100, this.shock + 1e-4 * i));
let s = Object(r.b)();
switch (this.currentTask) {
case n.a.Idle:
break;
case n.a.Class:
case n.a.Gym:
this.updateTaskGainRates(e),
(s = this.gainExperience(e, this.gainRatesForTask, i)),
this.gainMoney(e, this.gainRatesForTask, i);
break;
case n.a.Faction: {
(s = this.gainExperience(e, this.gainRatesForTask, i)), this.gainMoney(e, this.gainRatesForTask, i);
const t = d.a[this.currentTaskLocation];
if (!(t instanceof h.a)) {
console.error("Invalid faction for Sleeve task: " + this.currentTaskLocation);
break;
}
t.playerReputation += this.getRepGain(e) * i;
break;
}
case n.a.Company: {
(s = this.gainExperience(e, this.gainRatesForTask, i)), this.gainMoney(e, this.gainRatesForTask, i);
const t = l.a[this.currentTaskLocation];
if (!(t instanceof c.a)) {
console.error("Invalid company for Sleeve task: " + this.currentTaskLocation);
break;
}
t.playerReputation += this.getRepGain(e) * i;
break;
}
case n.a.Recovery:
(this.shock = Math.min(100, this.shock + 2e-4 * i)), this.shock >= 100 && this.resetTaskStatus();
break;
case n.a.Synchro:
(this.sync = Math.min(100, this.sync + 2e-4 * e.getIntelligenceBonus(0.5) * i)),
this.sync >= 100 && this.resetTaskStatus();
}
return (
0 !== this.currentTaskMaxTime &&
this.currentTaskTime >= this.currentTaskMaxTime &&
(this.currentTask === n.a.Crime ? (s = this.finishTask(e)) : this.finishTask(e)),
this.updateStatLevels(),
(this.storedCycles -= i),
s
);
}
resetTaskStatus() {
console.error(""),
(this.earningsForTask = Object(r.b)()),
(this.gainRatesForTask = Object(r.b)()),
(this.currentTask = n.a.Idle),
(this.currentTaskTime = 0),
(this.currentTaskMaxTime = 0),
(this.factionWorkType = p.a.None),
(this.crimeType = ""),
(this.currentTaskLocation = ""),
(this.gymStatType = ""),
(this.className = "");
}
shockRecovery(e) {
return (
this.currentTask !== n.a.Idle ? this.finishTask(e) : this.resetTaskStatus(),
(this.currentTask = n.a.Recovery),
!0
);
}
synchronize(e) {
return (
this.currentTask !== n.a.Idle ? this.finishTask(e) : this.resetTaskStatus(),
(this.currentTask = n.a.Synchro),
!0
);
}
takeUniversityCourse(e, t, a) {
this.currentTask !== n.a.Idle ? this.finishTask(e) : this.resetTaskStatus();
let r = 1;
switch (t.toLowerCase()) {
case g.a.AevumSummitUniversity.toLowerCase():
if (this.city !== f.a.Aevum) return !1;
(this.currentTaskLocation = g.a.AevumSummitUniversity), (r = 4);
break;
case g.a.Sector12RothmanUniversity.toLowerCase():
if (this.city !== f.a.Sector12) return !1;
(this.currentTaskLocation = g.a.Sector12RothmanUniversity), (r = 3);
break;
case g.a.VolhavenZBInstituteOfTechnology.toLowerCase():
if (this.city !== f.a.Volhaven) return !1;
(this.currentTaskLocation = g.a.VolhavenZBInstituteOfTechnology), (r = 5);
break;
default:
return !1;
}
switch (a.toLowerCase()) {
case "study computer science":
break;
case "data structures":
this.gainRatesForTask.money = m.a.ClassDataStructuresBaseCost * r * -1;
break;
case "networks":
this.gainRatesForTask.money = m.a.ClassNetworksBaseCost * r * -1;
break;
case "algorithms":
this.gainRatesForTask.money = m.a.ClassAlgorithmsBaseCost * r * -1;
break;
case "management":
this.gainRatesForTask.money = m.a.ClassManagementBaseCost * r * -1;
break;
case "leadership":
this.gainRatesForTask.money = m.a.ClassLeadershipBaseCost * r * -1;
break;
default:
return !1;
}
return (this.className = a), (this.currentTask = n.a.Class), !0;
}
travel(e, t) {
return e.loseMoney(m.a.TravelCost), (this.city = t), !0;
}
tryBuyAugmentation(e, t) {
return (
!!e.canAfford(t.startingCost) &&
!this.augmentations.some((e) => e.name === t.name) &&
(e.loseMoney(t.startingCost), this.installAugmentation(t), !0)
);
}
updateTaskGainRates(e) {
if (this.currentTask !== n.a.Class)
if (this.currentTask !== n.a.Gym)
console.warn("Sleeve.updateTaskGainRates() called for unexpected task type " + this.currentTask);
else {
let t = 1;
switch (this.currentTaskLocation.toLowerCase()) {
case g.a.AevumCrushFitnessGym.toLowerCase():
t = 2;
break;
case g.a.AevumSnapFitnessGym.toLowerCase():
t = 5;
break;
case g.a.Sector12IronGym.toLowerCase():
t = 1;
break;
case g.a.Sector12PowerhouseGym.toLowerCase():
t = 10;
break;
case g.a.VolhavenMilleniumFitnessGym.toLowerCase():
t = 4;
break;
default:
return;
}
const a = 1,
n = e.hashManager.getTrainingMult() * t,
r = this.gymStatType.toLowerCase();
r.includes("str")
? (this.gainRatesForTask.str = a * n * this.strength_exp_mult)
: r.includes("def")
? (this.gainRatesForTask.def = a * n * this.defense_exp_mult)
: r.includes("dex")
? (this.gainRatesForTask.dex = a * n * this.dexterity_exp_mult)
: r.includes("agi") && (this.gainRatesForTask.agi = a * n * this.agility_exp_mult);
}
else {
let t = 1;
switch (this.currentTaskLocation.toLowerCase()) {
case g.a.AevumSummitUniversity.toLowerCase():
t = 3;
break;
case g.a.Sector12RothmanUniversity.toLowerCase():
t = 2;
break;
case g.a.VolhavenZBInstituteOfTechnology.toLowerCase():
t = 4;
break;
default:
return;
}
const a = t * e.hashManager.getStudyMult();
switch (this.className.toLowerCase()) {
case "study computer science":
this.gainRatesForTask.hack = m.a.ClassStudyComputerScienceBaseExp * a * this.hacking_exp_mult;
break;
case "data structures":
this.gainRatesForTask.hack = m.a.ClassDataStructuresBaseExp * a * this.hacking_exp_mult;
break;
case "networks":
this.gainRatesForTask.hack = m.a.ClassNetworksBaseExp * a * this.hacking_exp_mult;
break;
case "algorithms":
this.gainRatesForTask.hack = m.a.ClassAlgorithmsBaseExp * a * this.hacking_exp_mult;
break;
case "management":
this.gainRatesForTask.cha = m.a.ClassManagementBaseExp * a * this.charisma_exp_mult;
break;
case "leadership":
this.gainRatesForTask.cha = m.a.ClassLeadershipBaseExp * a * this.charisma_exp_mult;
}
}
}
upgradeMemory(e) {
e < 0
? console.warn("Sleeve.upgradeMemory() called with negative value: " + e)
: (this.memory = Math.min(100, Math.round(this.memory + e)));
}
workForCompany(e, t) {
if (!(l.a[t] instanceof c.a) || null == e.jobs[t]) return !1;
this.currentTask !== n.a.Idle ? this.finishTask(e) : this.resetTaskStatus();
const a = l.a[t],
r = u.a[e.jobs[t]];
return (
null != a &&
null != r &&
((this.gainRatesForTask.money =
r.baseSalary * a.salaryMultiplier * this.work_money_mult * i.a.CompanyWorkMoney),
(this.gainRatesForTask.hack =
r.hackingExpGain * a.expMultiplier * this.hacking_exp_mult * i.a.CompanyWorkExpGain),
(this.gainRatesForTask.str =
r.strengthExpGain * a.expMultiplier * this.strength_exp_mult * i.a.CompanyWorkExpGain),
(this.gainRatesForTask.def =
r.defenseExpGain * a.expMultiplier * this.defense_exp_mult * i.a.CompanyWorkExpGain),
(this.gainRatesForTask.dex =
r.dexterityExpGain * a.expMultiplier * this.dexterity_exp_mult * i.a.CompanyWorkExpGain),
(this.gainRatesForTask.agi =
r.agilityExpGain * a.expMultiplier * this.agility_exp_mult * i.a.CompanyWorkExpGain),
(this.gainRatesForTask.cha =
r.charismaExpGain * a.expMultiplier * this.charisma_exp_mult * i.a.CompanyWorkExpGain),
(this.currentTaskLocation = t),
(this.currentTask = n.a.Company),
!0)
);
}
workForFaction(e, t, a) {
if ("" === t) return !1;
if (!(d.a[t] instanceof h.a && e.factions.includes(t))) return !1;
this.currentTask !== n.a.Idle ? this.finishTask(e) : this.resetTaskStatus();
const r = d.a[t].getInfo(),
o = a.toLowerCase();
if (o.includes("hack")) {
if (!r.offerHackingWork) return !1;
(this.factionWorkType = p.a.Hacking),
(this.gainRatesForTask.hack = 0.15 * this.hacking_exp_mult * i.a.FactionWorkExpGain);
} else if (o.includes("field")) {
if (!r.offerFieldWork) return !1;
(this.factionWorkType = p.a.Field),
(this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * i.a.FactionWorkExpGain),
(this.gainRatesForTask.str = 0.1 * this.strength_exp_mult * i.a.FactionWorkExpGain),
(this.gainRatesForTask.def = 0.1 * this.defense_exp_mult * i.a.FactionWorkExpGain),
(this.gainRatesForTask.dex = 0.1 * this.dexterity_exp_mult * i.a.FactionWorkExpGain),
(this.gainRatesForTask.agi = 0.1 * this.agility_exp_mult * i.a.FactionWorkExpGain),
(this.gainRatesForTask.cha = 0.1 * this.charisma_exp_mult * i.a.FactionWorkExpGain);
} else {
if (!o.includes("security")) return !1;
if (!r.offerSecurityWork) return !1;
(this.factionWorkType = p.a.Security),
(this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * i.a.FactionWorkExpGain),
(this.gainRatesForTask.str = 0.15 * this.strength_exp_mult * i.a.FactionWorkExpGain),
(this.gainRatesForTask.def = 0.15 * this.defense_exp_mult * i.a.FactionWorkExpGain),
(this.gainRatesForTask.dex = 0.15 * this.dexterity_exp_mult * i.a.FactionWorkExpGain),
(this.gainRatesForTask.agi = 0.15 * this.agility_exp_mult * i.a.FactionWorkExpGain);
}
return (this.currentTaskLocation = t), (this.currentTask = n.a.Faction), !0;
}
workoutAtGym(e, t, a) {
this.currentTask !== n.a.Idle ? this.finishTask(e) : this.resetTaskStatus();
let r = 1;
switch (t.toLowerCase()) {
case g.a.AevumCrushFitnessGym.toLowerCase():
if (this.city != f.a.Aevum) return !1;
(this.currentTaskLocation = g.a.AevumCrushFitnessGym), (r = 3);
break;
case g.a.AevumSnapFitnessGym.toLowerCase():
if (this.city != f.a.Aevum) return !1;
(this.currentTaskLocation = g.a.AevumSnapFitnessGym), (r = 10);
break;
case g.a.Sector12IronGym.toLowerCase():
if (this.city != f.a.Sector12) return !1;
(this.currentTaskLocation = g.a.Sector12IronGym), (r = 1);
break;
case g.a.Sector12PowerhouseGym.toLowerCase():
if (this.city != f.a.Sector12) return !1;
(this.currentTaskLocation = g.a.Sector12PowerhouseGym), (r = 20);
break;
case g.a.VolhavenMilleniumFitnessGym.toLowerCase():
if (this.city != f.a.Volhaven) return !1;
(this.currentTaskLocation = g.a.VolhavenMilleniumFitnessGym), (r = 7);
break;
default:
return !1;
}
const i = a.toLowerCase();
return (
(this.gainRatesForTask.money = m.a.ClassGymBaseCost * r * -1),
!!(i.includes("str") || i.includes("def") || i.includes("dex") || i.includes("agi")) &&
((this.gymStatType = a), (this.currentTask = n.a.Gym), !0)
);
}
toJSON() {
return Object(y.b)("Sleeve", this);
}
static fromJSON(e) {
return Object(y.a)(E, e.data);
}
}
y.c.constructors.Sleeve = E;
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return i;
}),
a.d(t, "a", function () {
return o;
}),
a.d(t, "c", function () {
return s;
});
var n = a(14),
r = a(346);
class i {
constructor(e, t) {
n.a.EnableTimestamps && (e = "[" + Object(r.a)() + "] " + e), (this.text = e), (this.color = t);
}
}
class o {
constructor(e, t) {
n.a.EnableTimestamps && (e = "[" + Object(r.a)() + "] " + e), (this.hostname = t), (this.dashes = e);
}
}
class s {
constructor(e, t) {
(this.time = e), (this.timeLeft = e), (this.action = t);
}
}
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return r;
}),
a.d(t, "a", function () {
return i;
});
var n = a(122);
const r = new n.a(),
i = new n.a();
},
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
class n {
constructor(e, t, a) {
(this.program = e), (this.price = t), (this.description = a);
}
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return m;
});
var n = a(207),
r = a(128),
i = a(94),
o = a(66),
s = a(4),
l = a(18),
c = a(15),
u = a(0);
function m(e, t, a, n) {
const s = n.stockMarket.Orders;
if (null == s) {
const e = {};
for (const t in n.stockMarket) {
const a = n.stockMarket[t];
a instanceof r.a && (e[a.symbol] = []);
}
return void (n.stockMarket.Orders = e);
}
let l = s[e.symbol];
if (null == l || l.constructor !== Array)
return console.error(`Invalid Order book for ${e.symbol} in processOrders(): ${l}`), void (l = []);
for (const r of l)
if (r.type === t && r.pos === a)
switch (r.type) {
case i.a.LimitBuy:
((r.pos === o.a.Long && e.price <= r.price) || (r.pos === o.a.Short && e.price >= r.price)) && h(r, n);
break;
case i.a.LimitSell:
case i.a.StopBuy:
((r.pos === o.a.Long && e.price >= r.price) || (r.pos === o.a.Short && e.price <= r.price)) && h(r, n);
break;
case i.a.StopSell:
((r.pos === o.a.Long && e.price <= r.price) || (r.pos === o.a.Short && e.price >= r.price)) && h(r, n);
break;
default:
return void console.warn("Invalid order type: " + r.type);
}
}
function h(e, t) {
const a = t.symbolToStockMap[e.stockSymbol];
if (!(a instanceof r.a)) return void console.error("Could not find stock for this order: " + e.stockSymbol);
const m = t.stockMarket.Orders[a.symbol],
h = { suppressDialog: !0 };
let d = !0,
p = !1;
switch (e.type) {
case i.a.LimitBuy:
case i.a.StopBuy:
(p = !0),
e.pos === o.a.Long
? (d = Object(n.a)(a, e.shares, null, h) && d)
: e.pos === o.a.Short && (d = Object(n.d)(a, e.shares, null, h) && d);
break;
case i.a.LimitSell:
case i.a.StopSell:
e.pos === o.a.Long
? (d = Object(n.c)(a, e.shares, null, h) && d)
: e.pos === o.a.Short && (d = Object(n.b)(a, e.shares, null, h) && d);
break;
default:
return void console.warn("Invalid order type: " + e.type);
}
const f = e.pos === o.a.Long ? "Long" : "Short";
if (d) {
for (let t = 0; t < m.length; ++t)
if (e == m[t])
return (
m.splice(t, 1),
void Object(c.a)(
u.createElement(
u.Fragment,
null,
e.type,
" for ",
a.symbol,
" @ ",
u.createElement(l.a, { money: e.price }),
" (",
f,
") was filled (",
s.a.formatShares(Math.round(e.shares)),
" shares)",
),
)
);
console.error("Could not find the following Order in Order Book: "), console.error(e);
} else
p &&
Object(c.a)(
u.createElement(
u.Fragment,
null,
"Failed to execute ",
e.type,
" for ",
a.symbol,
" @ ",
u.createElement(l.a, { money: e.price }),
" (",
f,
"). This is most likely because you do not have enough money or the order would exceed the stock's maximum number of shares",
),
);
}
},
,
,
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return g;
});
var n = a(789),
r = a(385),
i = a(386),
o = a(204),
s = a(41),
l = a(8),
c = a(493),
u = a(56),
m = a(15),
h = a(21),
d = a(118),
p = a(97);
function f(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class g {
constructor(e = {}) {
f(this, "name", "The Corporation"),
f(this, "divisions", []),
f(this, "funds", new p.a(15e10)),
f(this, "revenue", new p.a(0)),
f(this, "expenses", new p.a(0)),
f(this, "fundingRound", 0),
f(this, "public", !1),
f(this, "totalShares", s.a.INITIALSHARES),
f(this, "numShares", s.a.INITIALSHARES),
f(this, "shareSalesUntilPriceUpdate", s.a.SHARESPERPRICEUPDATE),
f(this, "shareSaleCooldown", 0),
f(this, "issueNewSharesCooldown", 0),
f(this, "dividendPercentage", 0),
f(this, "dividendTaxPercentage", 50),
f(this, "issuedShares", 0),
f(this, "sharePrice", 0),
f(this, "storedCycles", 0),
f(this, "state", new n.a()),
(this.name = e.name ? e.name : "The Corporation");
const t = Object.keys(r.a).length,
a = Object.keys(i.a).length;
(this.unlockUpgrades = Array(t).fill(0)),
(this.upgrades = Array(a).fill(0)),
(this.upgradeMultipliers = Array(a).fill(1));
}
addFunds(e) {
isFinite(e)
? (this.funds = this.funds.plus(e))
: console.error("Trying to add invalid amount of funds. Report to a developper.");
}
getState() {
return this.state.getState();
}
storeCycles(e = 1) {
this.storedCycles += e;
}
process(e) {
if (this.storedCycles >= s.a.CyclesPerIndustryStateCycle) {
const t = this.getState(),
a = 1,
n = a * s.a.CyclesPerIndustryStateCycle;
if (
((this.storedCycles -= n),
this.divisions.forEach((e) => {
e.process(a, t, this);
}),
this.shareSaleCooldown > 0 && (this.shareSaleCooldown -= n),
this.issueNewSharesCooldown > 0 && (this.issueNewSharesCooldown -= n),
"START" === t)
) {
(this.revenue = new p.a(0)),
(this.expenses = new p.a(0)),
this.divisions.forEach((e) => {
e.lastCycleRevenue !== -1 / 0 &&
e.lastCycleRevenue !== 1 / 0 &&
e.lastCycleExpenses !== -1 / 0 &&
e.lastCycleExpenses !== 1 / 0 &&
((this.revenue = this.revenue.plus(e.lastCycleRevenue)),
(this.expenses = this.expenses.plus(e.lastCycleExpenses)));
});
const t = this.revenue.minus(this.expenses).times(a * s.a.SecsPerMarketCycle);
if (
((isNaN(this.funds) || this.funds === 1 / 0 || this.funds === -1 / 0) &&
(Object(m.a)(
"There was an error calculating your Corporations funds and they got reset to 0. This is a bug. Please report to game developer.
(Your funds have been set to $150b for the inconvenience)",
),
(this.funds = new p.a(15e10))),
this.dividendPercentage > 0 && t > 0)
)
if (
isNaN(this.dividendPercentage) ||
this.dividendPercentage < 0 ||
this.dividendPercentage > 100 * s.a.DividendMaxPercentage
)
console.error("Invalid Corporation dividend percentage: " + this.dividendPercentage);
else {
const a = (this.dividendPercentage / 100) * t,
n = t - a,
r = a / this.totalShares,
i = this.numShares * r * (1 - this.dividendTaxPercentage / 100);
e.gainMoney(i), e.recordMoneySource(i, "corporation"), this.addFunds(n);
}
else this.addFunds(t);
this.updateSharePrice();
}
this.state.nextState();
}
}
determineValuation() {
let e,
t = this.revenue.minus(this.expenses).toNumber();
return (
this.public
? (this.dividendPercentage > 0 && (t *= (100 - this.dividendPercentage) / 100),
(e = this.funds.toNumber() + 85e3 * t),
(e *= Math.pow(1.1, this.divisions.length)),
(e = Math.max(e, 0)))
: ((e = 1e10 + Math.max(this.funds.toNumber(), 0) / 3),
t > 0
? ((e += 315e3 * t), (e *= Math.pow(1.1, this.divisions.length)))
: (e = 1e10 * Math.pow(1.1, this.divisions.length)),
(e -= e % 1e6)),
e * l.a.CorporationValuation
);
}
getTargetSharePrice() {
return this.determineValuation() / (2 * (this.totalShares - this.numShares) + 1);
}
updateSharePrice() {
const e = this.getTargetSharePrice();
this.sharePrice <= e
? (this.sharePrice *= 1 + 0.01 * Math.random())
: (this.sharePrice *= 1 - 0.01 * Math.random()),
this.sharePrice <= 0.01 && (this.sharePrice = 0.01);
}
immediatelyUpdateSharePrice() {
this.sharePrice = this.getTargetSharePrice();
}
calculateShareSale(e) {
let t = e,
a = this.shareSalesUntilPriceUpdate,
n = this.sharePrice,
r = 0,
i = 0;
const o = Math.ceil(e / s.a.SHARESPERPRICEUPDATE);
if (isNaN(o) || o > 1e7)
return (
console.error(
"Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be " + o,
),
[0, 0, 0]
);
for (let e = 0; e < o; ++e) {
if (t < a) {
(i += n * t), (a -= t);
break;
}
(i += n * a),
(a = s.a.SHARESPERPRICEUPDATE),
(t -= a),
(r += a),
(n = this.determineValuation() / (2 * (this.totalShares + r - this.numShares)));
}
return [i, n, a];
}
convertCooldownToString(e) {
const t = e / 5;
return t > 3600
? Math.floor(t / 3600) + " hour(s)"
: t > 60
? Math.floor(t / 60) + " minute(s)"
: Math.floor(t) + " second(s)";
}
unlock(e) {
const t = e[0],
a = e[1];
for (; this.unlockUpgrades.length <= t; ) this.unlockUpgrades.push(0);
this.funds.lt(a)
? Object(m.a)("You don't have enough funds to unlock this!")
: ((this.unlockUpgrades[t] = 1),
(this.funds = this.funds.minus(a)),
5 === t ? (this.dividendTaxPercentage -= 5) : 6 === t && (this.dividendTaxPercentage -= 10));
}
upgrade(e) {
const t = e[0],
a = e[1],
n = e[2],
r = e[3];
for (; this.upgrades.length <= t; ) this.upgrades.push(0);
for (; this.upgradeMultipliers.length <= t; ) this.upgradeMultipliers.push(1);
const i = a * Math.pow(n, this.upgrades[t]);
if (this.funds.lt(i)) Object(m.a)("You don't have enough funds to purchase this!");
else if (
(++this.upgrades[t],
(this.funds = this.funds.minus(i)),
(this.upgradeMultipliers[t] = 1 + this.upgrades[t] * r),
1 === t)
)
for (let e = 0; e < this.divisions.length; ++e) {
const t = this.divisions[e];
for (const e in t.warehouses) {
const a = t.warehouses[e];
0 !== a && t.warehouses.hasOwnProperty(e) && a instanceof o.a && a.updateSize(this, t);
}
}
}
getProductionMultiplier() {
const e = this.upgradeMultipliers[0];
return isNaN(e) || e < 1 ? 1 : e;
}
getStorageMultiplier() {
const e = this.upgradeMultipliers[1];
return isNaN(e) || e < 1 ? 1 : e;
}
getDreamSenseGain() {
const e = this.upgradeMultipliers[2] - 1;
return e <= 0 ? 0 : e;
}
getAdvertisingMultiplier() {
const e = this.upgradeMultipliers[3];
return isNaN(e) || e < 1 ? 1 : e;
}
getEmployeeCreMultiplier() {
const e = this.upgradeMultipliers[4];
return isNaN(e) || e < 1 ? 1 : e;
}
getEmployeeChaMultiplier() {
const e = this.upgradeMultipliers[5];
return isNaN(e) || e < 1 ? 1 : e;
}
getEmployeeIntMultiplier() {
const e = this.upgradeMultipliers[6];
return isNaN(e) || e < 1 ? 1 : e;
}
getEmployeeEffMultiplier() {
const e = this.upgradeMultipliers[7];
return isNaN(e) || e < 1 ? 1 : e;
}
getSalesMultiplier() {
const e = this.upgradeMultipliers[8];
return isNaN(e) || e < 1 ? 1 : e;
}
getScientificResearchMultiplier() {
const e = this.upgradeMultipliers[9];
return isNaN(e) || e < 1 ? 1 : e;
}
getStarterGuide(e) {
const t = e.getHomeComputer();
let a = !1;
const n = u.a.CorporationManagementHandbook;
for (let e = 0; e < t.messages.length; ++e)
if (Object(d.a)(t.messages[e]) && t.messages[e] === n) {
a = !0;
break;
}
a || t.messages.push(n), Object(c.a)(n);
}
toJSON() {
return Object(h.b)("Corporation", this);
}
static fromJSON(e) {
return Object(h.a)(g, e.data);
}
}
h.c.constructors.Corporation = g;
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return s;
});
var n = a(55),
r = a(283),
i = a(21);
function o(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class s extends r.a {
constructor(e = null) {
super(e),
o(this, "reqdRank", 100),
o(this, "teamCount", 0),
e && e.reqdRank && (this.reqdRank = e.reqdRank),
e && e.teamCount && (this.teamCount = e.teamCount);
}
getTeamSuccessBonus(e) {
if (this.teamCount && this.teamCount > 0) {
this.teamCount = Math.min(this.teamCount, e.teamSize);
return Math.pow(this.teamCount, 0.05);
}
return 1;
}
getActionTypeSkillSuccessBonus(e) {
return e.skillMultipliers.successChanceOperation;
}
getChaosDifficultyBonus(e) {
const t = e.getCurrentCity();
if (t.chaos > n.a.ChaosThreshold) {
const e = t.chaos - n.a.ChaosThreshold + 1;
return Math.pow(e, 0.1);
}
return 1;
}
toJSON() {
return Object(i.b)("Operation", this);
}
static fromJSON(e) {
return Object(i.a)(s, e.data);
}
}
i.c.constructors.Operation = s;
},
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return M;
}),
a.d(t, "b", function () {
return R;
});
var n = a(20),
r = a(152),
i = a(6),
o = a(198),
s = a(199),
l = a(58),
c = a(50),
u = a(68),
m = a(172),
h = a(25),
d = a(117),
p = a(57),
f = a(229),
g = a(160),
y = a(2),
b = a(110),
E = a(437),
v = a(56),
k = a(24),
_ = a(113),
w = a(62),
C = a(103),
S = a(91),
x = a(115),
O = a(15),
T = a(97);
function M() {
Object(o.b)(y.a);
const e = y.a.factions.filter(function (e) {
return h.a[e].getInfo().keep;
});
y.a.prestigeAugmentation(), Object(g.c)();
const t = y.a.getHomeComputer();
Object(k.i)(),
Object(k.a)(t),
Object(_.d)(t),
Object(r.b)(i.a.Neurolink) &&
n.a[i.a.Neurolink].owned &&
(t.programs.push(u.a.FTPCrackProgram.name), t.programs.push(u.a.RelaySMTPProgram.name)),
Object(r.b)(i.a.CashRoot) &&
n.a[i.a.CashRoot].owned &&
(y.a.setMoney(1e6), t.programs.push(u.a.BruteSSHProgram.name)),
Object(r.b)(i.a.PCMatrix) &&
n.a[i.a.PCMatrix].owned &&
(t.programs.push(u.a.DeepscanV1.name), t.programs.push(u.a.AutoLink.name)),
Object(k.f)(y.a.getHomeComputer());
for (const e in l.a) l.a.hasOwnProperty(e) && l.a[e].gainFavor();
for (const e in h.a) h.a.hasOwnProperty(e) && h.a[e].gainFavor();
null !== x.a.action && x.a.finishAction(b.b, y.a, !0),
x.a.clear(),
Object(h.c)(),
(y.a.factions = y.a.factions.concat(e)),
y.a.factions.map((e) => (h.a[e].isMember = !0)),
Object(r.c)(),
y.a.reapplyAllSourceFiles(),
Object(l.b)(),
Object(f.c)();
const a = y.a.gang;
if (y.a.inGang() && null !== a) {
const e = h.a[a.facName];
e instanceof m.a && Object(d.d)(e);
}
if (
(y.a.bladeburner instanceof s.a && y.a.bladeburner.prestige(),
8 === y.a.bitNodeN && (y.a.money = new T.a(25e7)),
(8 === y.a.bitNodeN || w.a[8] > 0) && ((y.a.hasWseAccount = !0), (y.a.hasTixApiAccess = !0)),
y.a.hasWseAccount && (Object(S.f)(), Object(S.h)()),
Object(r.b)(i.a.TheRedPill) && n.a[i.a.TheRedPill].owned)
) {
const e = Object(k.d)(C.a.WorldDaemon),
t = Object(k.d)(C.a.DaedalusServer);
e && t && (e.serversOnNetwork.push(t.hostname), t.serversOnNetwork.push(e.hostname));
}
Object(E.b)();
}
function R(e) {
Object(o.b)(y.a), Object(w.b)(y.a), y.a.prestigeSourceFile(), Object(g.c)();
const t = y.a.getHomeComputer();
Object(k.i)(),
Object(k.a)(t),
Object(_.d)(t),
Object(k.f)(y.a.getHomeComputer()),
w.a[9] >= 2 ? t.setMaxRam(128) : w.a[1] > 0 ? t.setMaxRam(32) : t.setMaxRam(8),
(t.cpuCores = 1);
for (const e in l.a) l.a.hasOwnProperty(e) && (l.a[e].favor = 0);
for (const e in h.a) h.a.hasOwnProperty(e) && (h.a[e].favor = 0);
null !== x.a.action && x.a.finishAction(b.b, y.a, !0);
for (const e in n.a) n.a.hasOwnProperty(e) && delete n.a[e];
if (
(w.a[12] > 0 && y.a.augmentations.push({ name: i.a.NeuroFluxGovernor, level: w.a[12] }),
Object(h.c)(),
Object(r.c)(),
y.a.reapplyAllSourceFiles(),
Object(l.b)(),
Object(f.c)(),
3 === y.a.bitNodeN &&
(t.messages.push(v.a.CorporationManagementHandbook),
Object(O.a)(
"You received a copy of the Corporation Management Handbook on your home computer. Read it if you need help getting started with Corporations!",
)),
8 === y.a.bitNodeN && (y.a.money = new T.a(25e7)),
(8 === y.a.bitNodeN || w.a[8] > 0) && ((y.a.hasWseAccount = !0), (y.a.hasTixApiAccess = !0)),
10 === y.a.bitNodeN && Object(O.a)("Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!"),
y.a.hasWseAccount ? (Object(S.f)(), Object(S.h)()) : Object(S.d)(),
(y.a.gang = null),
(y.a.corporation = null),
Object(c.e)(),
(y.a.bladeburner = null),
w.a[9] >= 3)
) {
const e = y.a.createHacknetServer();
(e.level = 100),
(e.cores = 10),
(e.cache = 5),
e.updateHashRate(y.a.hacknet_node_money_mult),
e.updateHashCapacity(),
Object(p.p)(y.a);
}
0 === w.a[5] || e || y.a.gainIntelligenceExp(300), Object(E.b)();
}
},
function (e, t, a) {
"use strict";
function n(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
a.d(t, "a", function () {
return r;
});
class r {
constructor(e = "") {
n(this, "level", 1), n(this, "name", ""), (this.name = e);
}
}
},
function (e, t, a) {
"use strict";
function n(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
a.d(t, "a", function () {
return r;
}),
a.d(t, "b", function () {
return i;
});
const r = new (class {
constructor() {
n(this, "m", 1024), n(this, "a", 341), n(this, "c", 1), (this.x = 0), this.reset();
}
step() {
this.x = (this.a * this.x + this.c) % this.m;
}
random() {
return this.step(), this.x / this.m;
}
reset() {
this.x = new Date().getTime() % this.m;
}
})();
class i {
constructor(e) {
n(this, "s1", 0), n(this, "s2", 0), n(this, "s3", 0);
const t = (e / 1e3) % 3e4;
(this.s1 = t), (this.s2 = t), (this.s3 = t);
}
step() {
(this.s1 = (171 * this.s1) % 30269), (this.s2 = (172 * this.s2) % 30307), (this.s3 = (170 * this.s3) % 30323);
}
random() {
return this.step(), (this.s1 / 30269 + this.s2 / 30307 + this.s3 / 30323) % 1;
}
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(7),
r = a(26);
class i {
constructor(e) {
(this.name = e.name),
(this.nextPosition = e.nextPosition),
(this.baseSalary = e.baseSalary),
(this.repMultiplier = e.repMultiplier),
(this.requiredHacking = null != e.reqdHacking ? e.reqdHacking : 0),
(this.requiredStrength = null != e.reqdStrength ? e.reqdStrength : 0),
(this.requiredDefense = null != e.reqdDefense ? e.reqdDefense : 0),
(this.requiredDexterity = null != e.reqdDexterity ? e.reqdDexterity : 0),
(this.requiredAgility = null != e.reqdAgility ? e.reqdAgility : 0),
(this.requiredCharisma = null != e.reqdCharisma ? e.reqdCharisma : 0),
(this.requiredReputation = null != e.reqdReputation ? e.reqdReputation : 0),
(this.hackingEffectiveness = null != e.hackingEffectiveness ? e.hackingEffectiveness : 0),
(this.strengthEffectiveness = null != e.strengthEffectiveness ? e.strengthEffectiveness : 0),
(this.defenseEffectiveness = null != e.defenseEffectiveness ? e.defenseEffectiveness : 0),
(this.dexterityEffectiveness = null != e.dexterityEffectiveness ? e.dexterityEffectiveness : 0),
(this.agilityEffectiveness = null != e.agilityEffectiveness ? e.agilityEffectiveness : 0),
(this.charismaEffectiveness = null != e.charismaEffectiveness ? e.charismaEffectiveness : 0),
100 !==
Math.round(
this.hackingEffectiveness +
this.strengthEffectiveness +
this.defenseEffectiveness +
this.dexterityEffectiveness +
this.agilityEffectiveness +
this.charismaEffectiveness,
) && console.error(`CompanyPosition ${this.name} parameters do not sum to 100`),
(this.hackingExpGain = null != e.hackingExpGain ? e.hackingExpGain : 0),
(this.strengthExpGain = null != e.strengthExpGain ? e.strengthExpGain : 0),
(this.defenseExpGain = null != e.defenseExpGain ? e.defenseExpGain : 0),
(this.dexterityExpGain = null != e.dexterityExpGain ? e.dexterityExpGain : 0),
(this.agilityExpGain = null != e.agilityExpGain ? e.agilityExpGain : 0),
(this.charismaExpGain = null != e.charismaExpGain ? e.charismaExpGain : 0);
}
calculateJobPerformance(e, t, a, r, i, o) {
const s = (this.hackingEffectiveness * e) / n.a.MaxSkillLevel,
l = (this.strengthEffectiveness * t) / n.a.MaxSkillLevel,
c = (this.defenseEffectiveness * a) / n.a.MaxSkillLevel,
u = (this.dexterityEffectiveness * r) / n.a.MaxSkillLevel,
m = (this.agilityEffectiveness * i) / n.a.MaxSkillLevel,
h = (this.charismaEffectiveness * o) / n.a.MaxSkillLevel;
let d = (this.repMultiplier * (s + l + c + u + m + h)) / 100;
return isNaN(d) && (console.error("Company reputation gain calculated to be NaN"), (d = 0)), d;
}
isSoftwareJob() {
return r.j.includes(this.name);
}
isITJob() {
return r.d.includes(this.name);
}
isSecurityEngineerJob() {
return r.i.includes(this.name);
}
isNetworkEngineerJob() {
return r.f.includes(this.name);
}
isBusinessJob() {
return r.b.includes(this.name);
}
isSecurityJob() {
return r.h.includes(this.name);
}
isAgentJob() {
return r.a.includes(this.name);
}
isSoftwareConsultantJob() {
return r.k.includes(this.name);
}
isBusinessConsultantJob() {
return r.c.includes(this.name);
}
isPartTimeJob() {
return r.g.includes(this.name);
}
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(14),
r = a(115),
i = a(21),
o = a(346);
function s(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class l {
constructor(e = null, t = []) {
s(this, "args", []),
s(this, "dataMap", {}),
s(this, "filename", ""),
s(this, "logs", []),
s(this, "logUpd", !1),
s(this, "offlineExpGained", 0),
s(this, "offlineMoneyMade", 0),
s(this, "offlineRunningTime", 0.01),
s(this, "onlineExpGained", 0),
s(this, "onlineMoneyMade", 0),
s(this, "onlineRunningTime", 0.01),
s(this, "pid", -1),
s(this, "ramUsage", 0),
s(this, "server", ""),
s(this, "threads", 1),
null != e &&
((this.filename = e.filename), (this.args = t), (this.server = e.server), (this.ramUsage = e.ramUsage));
}
log(e) {
this.logs.length > n.a.MaxLogCapacity && this.logs.shift();
let t = e;
n.a.EnableTimestamps && (t = "[" + Object(o.a)() + "] " + t), this.logs.push(t), (this.logUpd = !0);
}
displayLog() {
for (let e = 0; e < this.logs.length; ++e) r.a.print(this.logs[e]);
}
clearLog() {
this.logs.length = 0;
}
recordHack(e, t, a = 1) {
(null != this.dataMap[e] && this.dataMap[e].constructor === Array) || (this.dataMap[e] = [0, 0, 0, 0]),
(this.dataMap[e][0] += t),
(this.dataMap[e][1] += a);
}
recordGrow(e, t = 1) {
(null != this.dataMap[e] && this.dataMap[e].constructor === Array) || (this.dataMap[e] = [0, 0, 0, 0]),
(this.dataMap[e][2] += t);
}
recordWeaken(e, t = 1) {
(null != this.dataMap[e] && this.dataMap[e].constructor === Array) || (this.dataMap[e] = [0, 0, 0, 0]),
(this.dataMap[e][3] += t);
}
toJSON() {
return Object(i.b)("RunningScript", this);
}
static fromJSON(e) {
return Object(i.a)(l, e.data);
}
}
i.c.constructors.RunningScript = l;
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return o;
});
var n = a(0),
r = a.n(n),
i = a(237);
const o = {};
(o.SourceFile1 = new i.a(
1,
r.a.createElement(
r.a.Fragment,
null,
"This Source-File lets the player start with 32GB of RAM on his/her home computer. It also increases all of the player's multipliers by:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: 16%",
r.a.createElement("br", null),
"Level 2: 24%",
r.a.createElement("br", null),
"Level 3: 28%",
),
)),
(o.SourceFile2 = new i.a(
2,
r.a.createElement(
r.a.Fragment,
null,
"This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value. It also increases the player's crime success rate, crime money, and charisma multipliers by:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: 24%",
r.a.createElement("br", null),
"Level 2: 36%",
r.a.createElement("br", null),
"Level 3: 42%",
),
)),
(o.SourceFile3 = new i.a(
3,
r.a.createElement(
r.a.Fragment,
null,
"This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:",
r.a.createElement("br", null),
"Level 1: 8%",
r.a.createElement("br", null),
"Level 2: 12%",
r.a.createElement("br", null),
"Level 3: 14%",
),
)),
(o.SourceFile4 = new i.a(
4,
r.a.createElement(
r.a.Fragment,
null,
"This Source-File lets you access and use the Singularity Functions in every BitNode. Every level of this Source-File opens up more of the Singularity Functions you can use.",
),
)),
(o.SourceFile5 = new i.a(
5,
r.a.createElement(
r.a.Fragment,
null,
"This Source-File grants a special new stat called Intelligence. Intelligence is unique because it is permanent and persistent (it never gets reset back to 1). However, gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels will boost your production for many actions in the game. In addition, this Source-File will unlock the getBitNodeMultipliers() and getServer() Netscript functions, as well as the formulas API, and will raise all of your hacking-related multipliers by:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: 8%",
r.a.createElement("br", null),
"Level 2: 12%",
r.a.createElement("br", null),
"Level 3: 14%",
),
)),
(o.SourceFile6 = new i.a(
6,
r.a.createElement(
r.a.Fragment,
null,
"This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: 8%",
r.a.createElement("br", null),
"Level 2: 12%",
r.a.createElement("br", null),
"Level 3: 14%",
),
)),
(o.SourceFile7 = new i.a(
7,
r.a.createElement(
r.a.Fragment,
null,
"This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: 8%",
r.a.createElement("br", null),
"Level 2: 12%",
r.a.createElement("br", null),
"Level 3: 14%",
),
)),
(o.SourceFile8 = new i.a(
8,
r.a.createElement(
r.a.Fragment,
null,
"This Source-File grants the following benefits:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: Permanent access to WSE and TIX API",
r.a.createElement("br", null),
"Level 2: Ability to short stocks in other BitNodes",
r.a.createElement("br", null),
"Level 3: Ability to use limit/stop orders in other BitNodes",
r.a.createElement("br", null),
r.a.createElement("br", null),
"This Source-File also increases your hacking growth multipliers by:",
r.a.createElement("br", null),
"Level 1: 12%",
r.a.createElement("br", null),
"Level 2: 18%",
r.a.createElement("br", null),
"Level 3: 21%",
),
)),
(o.SourceFile9 = new i.a(
9,
r.a.createElement(
r.a.Fragment,
null,
"This Source-File grants the following benefits:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: Permanently unlocks the Hacknet Server in other BitNodes",
r.a.createElement("br", null),
"Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode",
r.a.createElement("br", null),
"Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode",
r.a.createElement("br", null),
r.a.createElement("br", null),
"(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing Augmentations)",
r.a.createElement("br", null),
r.a.createElement("br", null),
"This Source-File also increases your hacknet multipliers by:",
r.a.createElement("br", null),
"Level 1: 8%",
r.a.createElement("br", null),
"Level 2: 12%",
r.a.createElement("br", null),
"Level 3: 14%",
),
)),
(o.SourceFile10 = new i.a(
10,
r.a.createElement(
r.a.Fragment,
null,
"This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve",
),
)),
(o.SourceFile11 = new i.a(
11,
r.a.createElement(
r.a.Fragment,
null,
"This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's company salary and reputation gain multipliers by:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: 32%",
r.a.createElement("br", null),
"Level 2: 48%",
r.a.createElement("br", null),
"Level 3: 56%",
r.a.createElement("br", null),
r.a.createElement("br", null),
"It also reduces the price increase for every aug bought by:",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Level 1: 4%",
r.a.createElement("br", null),
"Level 2: 6%",
r.a.createElement("br", null),
"Level 3: 7%",
),
)),
(o.SourceFile12 = new i.a(
12,
r.a.createElement(
r.a.Fragment,
null,
"This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.",
),
));
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(0),
r = a.n(n),
i = a(116),
o = a(27),
s = a(10);
function l(e) {
const t = o.b.Player(),
a = e.bladeburner.getActionObject({ name: e.name, type: e.type });
if (null == a) throw new Error("Failed to get Operation Object for: " + e.name);
let n = !1;
return (
a.count < 1 && (n = !0),
"Raid" === e.name && 0 === e.bladeburner.getCurrentCity().comms && (n = !0),
a instanceof i.a && e.bladeburner.rank < a.reqdRank && (n = !0),
r.a.createElement(
s.a,
{
sx: { mx: 1 },
disabled: n,
onClick: function () {
n ||
((e.bladeburner.action.type = e.type),
(e.bladeburner.action.name = e.name),
e.bladeburner.startAction(t, e.bladeburner.action),
e.rerender());
},
},
"Start",
)
);
}
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(491),
r = a(21),
i = a(435);
function o(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
let s = 0;
class l {
constructor(e = "", t = "", a = "", n = []) {
o(this, "code", ""),
o(this, "filename", ""),
o(this, "url", ""),
o(this, "module", ""),
o(this, "dependencies", []),
o(this, "ramUsage", 0),
o(this, "server", ""),
(this.filename = e),
(this.code = t),
(this.ramUsage = 0),
(this.server = a),
(this.module = ""),
(this.moduleSequenceNumber = ++s),
"" !== this.code && this.updateRamUsage(n);
}
download() {
const e = this.filename + ".js",
t = new Blob([this.code], { type: "text/plain" });
if (window.navigator.msSaveOrOpenBlob) window.navigator.msSaveOrOpenBlob(t, e);
else {
const a = document.createElement("a"),
n = URL.createObjectURL(t);
(a.href = n),
(a.download = e),
document.body.appendChild(a),
a.click(),
setTimeout(function () {
document.body.removeChild(a), window.URL.revokeObjectURL(n);
}, 0);
}
}
markUpdated() {
(this.module = ""), (this.moduleSequenceNumber = ++s);
}
saveScript(e, t, a, n) {
(this.code = t.replace(/^\s+|\s+$/g, "")),
(this.filename = e),
(this.server = a),
this.updateRamUsage(n),
this.markUpdated();
}
async updateRamUsage(e) {
const t = await Object(n.a)(this.code, e);
t > 0 && (this.ramUsage = Object(i.a)(t)), this.markUpdated();
}
toJSON() {
return Object(r.b)("Script", this);
}
static fromJSON(e) {
return Object(r.a)(l, e.data);
}
}
r.c.constructors.Script = l;
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return o;
});
var n = a(249),
r = a(21);
function i(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class o {
constructor() {
i(this, "capacity", 0), i(this, "hashes", 0), i(this, "upgrades", {});
for (const e in n.a) this.upgrades[e] = 0;
}
getMult(e) {
const t = n.a[e],
a = this.upgrades[e];
return null == t || null == a
? (console.error("Could not find Hash Study upgrade"), 1)
: 1 + (t.value * a) / 100;
}
getStudyMult() {
return this.getMult("Improve Studying");
}
getTrainingMult() {
return this.getMult("Improve Gym Training");
}
getUpgrade(e) {
const t = n.a[e];
return t || (console.error("Invalid Upgrade Name given to HashManager.getUpgrade(): " + e), null);
}
getUpgradeCost(e) {
const t = this.getUpgrade(e),
a = this.upgrades[e];
return null == t || null == a
? (console.error("Invalid Upgrade Name given to HashManager.getUpgradeCost(): " + e), 1 / 0)
: t.getCost(a);
}
prestige() {
for (const e in n.a) this.upgrades[e] = 0;
(this.hashes = 0), this.updateCapacity(0);
}
refundUpgrade(e) {
const t = n.a[e];
--this.upgrades[e];
const a = this.upgrades[e];
if (null == t || null == a || a < 0)
return void console.error("Invalid Upgrade Name given to HashManager.upgrade(): " + e);
const r = t.getCost(a);
this.hashes += r;
}
storeHashes(e) {
(this.hashes += e), (this.hashes = Math.min(this.hashes, this.capacity));
}
updateCapacity(e) {
e < 0 && (this.capacity = 0), (this.capacity = Math.max(e, 0));
}
upgrade(e) {
if (null == n.a[e]) return console.error("Invalid Upgrade Name given to HashManager.upgrade(): " + e), !1;
const t = this.getUpgradeCost(e);
return !(this.hashes < t) && ((this.hashes -= t), ++this.upgrades[e], !0);
}
toJSON() {
return Object(r.b)("HashManager", this);
}
static fromJSON(e) {
return Object(r.a)(o, e.data);
}
}
r.c.constructors.HashManager = o;
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return u;
}),
a.d(t, "c", function () {
return m;
}),
a.d(t, "a", function () {
return h;
});
var n = a(93),
r = a(25),
i = a(2),
o = a(24),
s = a(103),
l = a(48),
c = a(30);
function u() {
const e = d(),
t = p(),
a = f(),
r = g(a, t),
i = new n.a(r, e, t);
a.addContract(i);
}
function m() {
const e = d(),
t = p(),
a = i.a.getHomeComputer(),
r = g(a, t),
o = new n.a(r, e, t);
a.addContract(o);
}
function h(e) {
let t;
const a = Object.keys(n.d);
t = null != e.problemType && a.includes(e.problemType) ? e.problemType : d();
const r = p();
let i, s;
null != e.server ? ((i = Object(o.d)(e.server)), null == i && (i = f())) : (i = f()),
(s = null != e.fn ? e.fn : g(i, r));
const l = new n.a(s, t, r);
i.addContract(l);
}
function d() {
const e = Object.keys(n.d);
return e[Object(c.a)(0, e.length - 1)];
}
function p() {
const e = { name: "", type: Object(c.a)(0, n.c.Money) };
e.type = (function (e) {
let t = e;
const a = i.a.factions.filter((e) => {
try {
return r.a[e].getInfo().offerHackingWork;
} catch (e) {
return (
console.error("Error when trying to filter Hacking Factions for Coding Contract Generation: " + e), !1
);
}
});
return (
t === n.c.FactionReputation && 0 === a.length && (t = n.c.CompanyReputation),
t === n.c.FactionReputationAll && 0 === a.length && (t = n.c.CompanyReputation),
t === n.c.CompanyReputation && 0 === Object.keys(i.a.jobs).length && (t = n.c.Money),
t
);
})(e.type);
const t = i.a.factions.filter((e) => {
try {
return r.a[e].getInfo().offerHackingWork;
} catch (e) {
return console.error("Error when trying to filter Hacking Factions for Coding Contract Generation: " + e), !1;
}
});
switch (e.type) {
case n.c.FactionReputation: {
const a = t.length,
n = t[Object(c.a)(0, a - 1)];
e.name = n;
break;
}
case n.c.CompanyReputation: {
const t = Object.keys(i.a.jobs);
t.length > 0 ? (e.name = t[Object(c.a)(0, t.length - 1)]) : (e.type = n.c.Money);
break;
}
}
return e;
}
function f() {
const e = Object(o.c)();
let t = Object(c.a)(0, e.length - 1),
a = e[t];
for (let n = 0; n < 200 && (!(a instanceof l.a) || a.purchasedByPlayer || a.hostname === s.a.WorldDaemon); ++n)
(t = Object(c.a)(0, e.length - 1)), (a = e[t]);
return a;
}
function g(e, t) {
let a = "contract-" + Object(c.a)(0, 1e6);
for (let t = 0; t < 1e3 && !(e.contracts.filter((e) => e.fn === a).length <= 0); ++t)
a = "contract-" + Object(c.a)(0, 1e6);
return t.name && (a += "-" + t.name.replace(/\s/g, "")), a;
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = new (a(122).a)();
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return u;
});
var n = a(46),
r = a(41),
i = a(30),
o = a(23),
s = a(21),
l = a(803);
function c(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class u {
constructor(e = {}) {
c(this, "minEne", 0),
c(this, "maxEne", 100),
c(this, "minHap", 0),
c(this, "maxHap", 100),
c(this, "maxMor", 100),
c(this, "employees", []),
c(this, "employeeProd", {
[n.a.Operations]: 0,
[n.a.Engineer]: 0,
[n.a.Business]: 0,
[n.a.Management]: 0,
[n.a.RandD]: 0,
total: 0,
}),
(this.loc = e.loc ? e.loc : ""),
(this.size = e.size ? e.size : 1);
}
atCapacity() {
return this.employees.length >= this.size;
}
process(e = 1, t, a) {
if (a.hasResearch("HRBuddy-Recruitment") && !this.atCapacity()) {
const e = this.hireRandomEmployee();
a.hasResearch("HRBuddy-Training") && void 0 !== e && (e.pos = n.a.Training);
}
(this.maxEne = 100),
(this.maxHap = 100),
(this.maxMor = 100),
a.hasResearch("Go-Juice") && (this.maxEne += 10),
a.hasResearch("JoyWire") && (this.maxHap += 10),
a.hasResearch("Sti.mu") && (this.maxMor += 10);
let r = 1;
t.funds < 0 && a.lastCycleRevenue < 0
? (r = Math.pow(0.99, e))
: t.funds > 0 && a.lastCycleRevenue > 0 && (r = Math.pow(1.01, e));
const i = a.hasResearch("AutoBrew"),
o = a.hasResearch("AutoPartyManager");
let s = 0;
for (let t = 0; t < this.employees.length; ++t) {
const a = this.employees[t];
o
? ((a.mor = this.maxMor), (a.hap = this.maxHap))
: ((a.mor *= r),
(a.hap *= r),
(a.mor = Math.min(a.mor, this.maxMor)),
(a.hap = Math.min(a.hap, this.maxHap))),
i ? (a.ene = this.maxEne) : ((a.ene *= r), (a.ene = Math.min(a.ene, this.maxEne)));
s += a.process(e, this);
}
return this.calculateEmployeeProductivity(t, a), s;
}
calculateEmployeeProductivity(e, t) {
for (const e in this.employeeProd) this.employeeProd[e] = 0;
let a = 0;
for (let n = 0; n < this.employees.length; ++n) {
const r = this.employees[n],
i = r.calculateProductivity(e, t);
(this.employeeProd[r.pos] += i), (a += i);
}
this.employeeProd.total = a;
}
hireRandomEmployee() {
if (this.atCapacity()) return;
if (null != document.getElementById("cmpy-mgmt-hire-employee-popup")) return;
const e = Object(i.a)(50, 100),
t = Object(i.a)(50, 100),
a = Object(i.a)(50, 100),
n = Object(i.a)(50, 100),
s = Object(i.a)(50, 100),
c = r.a.EmployeeSalaryMultiplier * (e + t + a + n + s),
u = new l.a({ intelligence: e, charisma: t, experience: a, creativity: n, efficiency: s, salary: c }),
m = Object(o.d)(7);
for (let e = 0; e < this.employees.length; ++e)
if (this.employees[e].name === m) return this.hireRandomEmployee();
return (u.name = m), this.employees.push(u), u;
}
assignEmployeeToJob(e) {
for (let t = 0; t < this.employees.length; ++t)
if (this.employees[t].pos === n.a.Unassigned) return (this.employees[t].pos = e), !0;
return !1;
}
unassignEmployeeFromJob(e) {
for (let t = 0; t < this.employees.length; ++t)
if (this.employees[t].pos === e) return (this.employees[t].pos = n.a.Unassigned), !0;
return !1;
}
copy() {
const e = new u();
(e.loc = this.loc),
(e.size = this.size),
(e.minEne = this.minEne),
(e.maxEne = this.maxEne),
(e.minHap = this.minHap),
(e.maxHap = this.maxHap),
(e.maxMor = this.maxMor),
(e.employeeProd = {
[n.a.Operations]: this.employeeProd[n.a.Operations],
[n.a.Engineer]: this.employeeProd[n.a.Engineer],
[n.a.Business]: this.employeeProd[n.a.Business],
[n.a.Management]: this.employeeProd[n.a.Management],
[n.a.RandD]: this.employeeProd[n.a.RandD],
total: this.employeeProd.total,
}),
(e.employees = []);
for (const t of this.employees) e.employees.push(t.copy());
return e;
}
toJSON() {
return Object(s.b)("OfficeSpace", this);
}
static fromJSON(e) {
return Object(s.a)(u, e.data);
}
}
s.c.constructors.OfficeSpace = u;
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
0: [0, 5e5, 1, 1.05, "Coffee", "Provide your employees with coffee, increasing their energy by 5%."],
1: [
1,
1e9,
1.06,
1.03,
"AdVert.Inc",
"Hire AdVert.Inc to advertise your company. Each level of this upgrade grants your company a static increase of 3 and 1 to its awareness and popularity, respectively. It will then increase your company's awareness by 1%, and its popularity by a random percentage between 1% and 3%. These effects are increased by other upgrades that increase the power of your advertising.",
],
};
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
}),
a.d(t, "b", function () {
return i;
}),
a.d(t, "c", function () {
return o;
}),
a.d(t, "d", function () {
return s;
});
var n = a(25);
let r = 0;
function i() {
return new Date().getTime() - r > 864e5;
}
function o(e) {
if (i()) {
for (const t of e.factions) n.a[t].favor++;
r = new Date().getTime();
}
}
function s(e) {
r = e;
}
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(21);
function r(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class i {
constructor() {
r(this, "bladeburner", 0),
r(this, "casino", 0),
r(this, "class", 0),
r(this, "codingcontract", 0),
r(this, "corporation", 0),
r(this, "crime", 0),
r(this, "gang", 0),
r(this, "hacking", 0),
r(this, "hacknetnode", 0),
r(this, "hospitalization", 0),
r(this, "infiltration", 0),
r(this, "sleeves", 0),
r(this, "stock", 0),
r(this, "total", 0),
r(this, "work", 0);
}
record(e, t) {
const a = t.toLowerCase();
"number" == typeof this[a]
? ((this[a] += e), (this.total += e))
: console.warn("MoneySourceTracker.record() called with invalid source: " + t);
}
reset() {
for (const e in this) "number" == typeof this[e] && (this[e] = 0);
}
toJSON() {
return Object(n.b)("MoneySourceTracker", this);
}
static fromJSON(e) {
return Object(n.a)(i, e.data);
}
}
n.c.constructors.MoneySourceTracker = i;
},
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
function n() {
const e = new Date(),
t = ("0" + e.getHours()).slice(-2),
a = ("0" + e.getMinutes()).slice(-2);
return `${e.getMonth() + 1}/${e.getDate()} ${t}:${a}`;
}
a.d(t, "a", function () {
return n;
});
},
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return c;
}),
a.d(t, "b", function () {
return m;
});
var n = a(0),
r = a.n(n),
i = a(122),
o = a(40),
s = a(1),
l = a(32);
const c = new i.a();
let u = 0;
function m() {
const [e, t] = Object(n.useState)([]);
return (
Object(n.useEffect)(
() =>
c.subscribe((e) => {
const a = u + "";
u++, t((t) => [...t, { id: a, text: e }]);
}),
[],
),
r.a.createElement(
r.a.Fragment,
null,
e.length > 0 &&
r.a.createElement(
o.a,
{
open: !0,
onClose: function () {
t((e) => e.slice(1, 1e99));
},
},
r.a.createElement(
l.a,
{ overflow: "scroll", sx: { overflowWrap: "break-word", whiteSpace: "pre-line" } },
r.a.createElement(s.a, null, e[0].text),
),
),
)
);
}
},
function (e, t, a) {
"use strict";
function n(e, t = 1) {
return 1 + (t * Math.pow(e, 0.8)) / 600;
}
a.d(t, "a", function () {
return n;
});
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return r;
}),
a.d(t, "a", function () {
return i;
});
var n = a(7);
function r(e) {
let t;
return (
(t = "number" == typeof e.money ? e.money : e.money.toNumber()),
t < 0 ? 0 : Math.min(0.1 * t, (e.max_hp - e.hp) * n.a.HospitalCostPerHp)
);
}
function i(e, t) {
const a = e.hp;
e.hp -= t;
const n = r(e);
return (e.hp = a), n;
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return u;
});
var n = a(46),
r = a(159),
i = a(804),
o = a(452),
s = a(21),
l = a(30);
function c(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class u {
constructor(e = {}) {
c(this, "name", ""),
c(this, "dmd", 0),
c(this, "cmp", 0),
c(this, "mku", 0),
c(this, "pCost", 0),
c(this, "sCost", 0),
c(this, "fin", !1),
c(this, "prog", 0),
c(this, "createCity", ""),
c(this, "designCost", 0),
c(this, "advCost", 0),
c(this, "rat", 0),
c(this, "qlt", 0),
c(this, "per", 0),
c(this, "dur", 0),
c(this, "rel", 0),
c(this, "aes", 0),
c(this, "fea", 0),
c(this, "data", Object(o.a)([0, 0, 0])),
c(this, "loc", ""),
c(this, "siz", 0),
c(this, "reqMats", {}),
c(this, "prdman", Object(o.a)([!1, 0])),
c(this, "sllman", Object(o.a)([!1, 0])),
c(this, "marketTa1", !1),
c(this, "marketTa2", !1),
c(this, "marketTa2Price", Object(o.a)(0)),
(this.name = e.name ? e.name : ""),
(this.dmd = e.demand ? e.demand : 0),
(this.cmp = e.competition ? e.competition : 0),
(this.mku = e.markup ? e.markup : 0),
(this.createCity = e.createCity ? e.createCity : ""),
(this.designCost = e.designCost ? e.designCost : 0),
(this.advCost = e.advCost ? e.advCost : 0),
(this.qlt = e.quality ? e.quality : 0),
(this.per = e.performance ? e.performance : 0),
(this.dur = e.durability ? e.durability : 0),
(this.rel = e.reliability ? e.reliability : 0),
(this.aes = e.aesthetics ? e.aesthetics : 0),
(this.fea = e.features ? e.features : 0),
(this.loc = e.loc ? e.loc : ""),
(this.siz = e.size ? e.size : 0),
(this.reqMats = e.req ? e.req : {});
}
createProduct(e = 1, t = 1) {
this.fin || (this.prog += 0.01 * e * t);
}
finishProduct(e, t) {
this.fin = !0;
const a = this.prog / 100,
i = e[n.a.Engineer] / e.total,
o = e[n.a.Management] / e.total,
s = e[n.a.RandD] / e.total,
c = e[n.a.Operations] / e.total,
u = e[n.a.Business] / e.total,
m =
a *
(1.2 * i + 0.9 * o + 1.3 * s + 1.5 * c + u) *
(1 + Math.pow(this.designCost, 0.1) / 100) *
(1 + Math.pow(t.sciResearch.qty, t.sciFac) / 800);
(this.qlt =
m *
(0.1 * e[n.a.Engineer] +
0.05 * e[n.a.Management] +
0.05 * e[n.a.RandD] +
0.02 * e[n.a.Operations] +
0.02 * e[n.a.Business])),
(this.per =
m *
(0.15 * e[n.a.Engineer] +
0.02 * e[n.a.Management] +
0.02 * e[n.a.RandD] +
0.02 * e[n.a.Operations] +
0.02 * e[n.a.Business])),
(this.dur =
m *
(0.05 * e[n.a.Engineer] +
0.02 * e[n.a.Management] +
0.08 * e[n.a.RandD] +
0.05 * e[n.a.Operations] +
0.05 * e[n.a.Business])),
(this.rel =
m *
(0.02 * e[n.a.Engineer] +
0.08 * e[n.a.Management] +
0.02 * e[n.a.RandD] +
0.05 * e[n.a.Operations] +
0.08 * e[n.a.Business])),
(this.aes =
m *
(0 * e[n.a.Engineer] +
0.08 * e[n.a.Management] +
0.05 * e[n.a.RandD] +
0.02 * e[n.a.Operations] +
0.1 * e[n.a.Business])),
(this.fea =
m *
(0.08 * e[n.a.Engineer] +
0.05 * e[n.a.Management] +
0.02 * e[n.a.RandD] +
0.05 * e[n.a.Operations] +
0.05 * e[n.a.Business])),
this.calculateRating(t);
const h = 1 + Math.pow(this.advCost, 0.1) / 100,
d = Math.max(u + o, 1 / e.total);
(this.mku = 100 / (h * Math.pow(this.qlt + 0.001, 0.65) * d)),
(0 !== this.mku && isFinite(this.mku)) || (this.mku = 1),
(this.dmd = 0 === t.awareness ? 20 : Math.min(100, h * ((t.popularity / t.awareness) * 100))),
(this.cmp = Object(l.a)(0, 70));
for (const e in t.reqMats)
if (t.reqMats.hasOwnProperty(e)) {
const a = t.reqMats[e];
if (void 0 === a) continue;
this.reqMats[e] = a;
}
this.siz = 0;
for (const e in t.reqMats) {
const a = t.reqMats[e];
void 0 !== a && (this.siz += r.a[e] * a);
}
}
calculateRating(e) {
const t = i.a[e.type];
null != t
? ((this.rat = 0),
(this.rat += t.Quality ? this.qlt * t.Quality : 0),
(this.rat += t.Performance ? this.per * t.Performance : 0),
(this.rat += t.Durability ? this.dur * t.Durability : 0),
(this.rat += t.Reliability ? this.rel * t.Reliability : 0),
(this.rat += t.Aesthetics ? this.aes * t.Aesthetics : 0),
(this.rat += t.Features ? this.fea * t.Features : 0))
: console.error("Could not find product rating weights for: " + e);
}
toJSON() {
return Object(s.b)("Product", this);
}
static fromJSON(e) {
return Object(s.a)(u, e.data);
}
}
s.c.constructors.Product = u;
},
function (e, t, a) {
"use strict";
function n() {
return new Promise((e, t) => {
window.indexedDB || t("Indexed DB does not exists");
const a = window.indexedDB.open("bitburnerSave", 1);
(a.onupgradeneeded = function () {
this.result.createObjectStore("savestring");
}),
(a.onerror = function (e) {
t("Failed to get IDB " + e);
}),
(a.onsuccess = function () {
const a = this.result;
a
? e(a.transaction(["savestring"], "readwrite").objectStore("savestring"))
: t("database loadign result was undefined");
});
});
}
function r() {
return new Promise(async (e, t) => {
await n()
.then((t) =>
new Promise((e, a) => {
const n = t.get("save");
(n.onerror = function (e) {
a("Error in Database request to get savestring: " + e);
}),
(n.onsuccess = function () {
e(this.result);
});
}).then((t) => e(t)),
)
.catch((e) => t(e));
});
}
function i(e) {
return n().then(
(t) =>
new Promise((a, n) => {
const r = t.put(e, "save");
(r.onerror = function (e) {
n("Error saving game to IndexedDB: " + e);
}),
(r.onsuccess = () => a());
}),
);
}
function o() {
return n().then((e) => {
e.delete("save");
});
}
a.d(t, "b", function () {
return r;
}),
a.d(t, "c", function () {
return i;
}),
a.d(t, "a", function () {
return o;
});
},
,
,
,
,
,
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(55),
r = a(30),
i = a(21),
o = a(260);
function s(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class l {
constructor(e = n.a.CityNames[2]) {
s(this, "name", ""),
s(this, "pop", 0),
s(this, "popEst", 0),
s(this, "comms", 0),
s(this, "commsEst", 0),
s(this, "chaos", 0),
(this.name = e),
(this.pop = Object(r.a)(n.a.PopulationThreshold, 1.5 * n.a.PopulationThreshold)),
(this.popEst = this.pop * (Math.random() + 0.5)),
(this.comms = Object(r.a)(5, 150)),
(this.commsEst = this.comms + Object(r.a)(-5, 5)),
this.commsEst < 0 && (this.commsEst = 0),
(this.chaos = 0);
}
changeChaosByPercentage(e) {
if (isNaN(e)) throw new Error("NaN passed into City.chaosChaosByPercentage()");
0 !== e && ((this.chaos += this.chaos * (e / 100)), this.chaos < 0 && (this.chaos = 0));
}
improvePopulationEstimateByCount(e) {
if (isNaN(e)) throw new Error("NaN passeed into City.improvePopulationEstimateByCount()");
this.popEst < this.pop
? ((this.popEst += e), this.popEst > this.pop && (this.popEst = this.pop))
: this.popEst > this.pop && ((this.popEst -= e), this.popEst < this.pop && (this.popEst = this.pop));
}
improvePopulationEstimateByPercentage(e, t = 1) {
if (((e *= t), isNaN(e))) throw new Error("NaN passed into City.improvePopulationEstimateByPercentage()");
this.popEst < this.pop
? (++this.popEst, (this.popEst *= 1 + e / 100), this.popEst > this.pop && (this.popEst = this.pop))
: this.popEst > this.pop &&
((this.popEst *= 1 - e / 100), this.popEst < this.pop && (this.popEst = this.pop));
}
improveCommunityEstimate(e = 1) {
if (isNaN(e)) throw new Error("NaN passed into City.improveCommunityEstimate()");
this.commsEst < this.comms
? ((this.commsEst += e), this.commsEst > this.comms && (this.commsEst = this.comms))
: this.commsEst > this.comms &&
((this.commsEst -= e), this.commsEst < this.comms && (this.commsEst = this.comms));
}
changePopulationByCount(e, t = { estChange: 0, estOffset: 0 }) {
if (isNaN(e)) throw new Error("NaN passed into City.changePopulationByCount()");
(this.pop += e),
t.estChange && !isNaN(t.estChange) && (this.popEst += t.estChange),
t.estOffset && (this.popEst = Object(o.a)(this.popEst, t.estOffset)),
(this.popEst = Math.max(this.popEst, 0));
}
changePopulationByPercentage(e, t = { nonZero: !1, changeEstEqually: !1 }) {
if (isNaN(e)) throw new Error("NaN passed into City.changePopulationByPercentage()");
if (0 === e) return 0;
let a = Math.round(this.pop * (e / 100));
return (
t.nonZero && 0 === a && (a = e > 0 ? 1 : -1),
(this.pop += a),
t.changeEstEqually && ((this.popEst += a), this.popEst < 0 && (this.popEst = 0)),
a
);
}
changeChaosByCount(e) {
if (isNaN(e)) throw new Error("NaN passed into City.changeChaosByCount()");
0 !== e && ((this.chaos += e), this.chaos < 0 && (this.chaos = 0));
}
toJSON() {
return Object(i.b)("City", this);
}
static fromJSON(e) {
return Object(i.a)(l, e.data);
}
}
i.c.constructors.City = l;
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
class n {
constructor(e, t = [], a = "") {
(this.name = e), (this.locations = t), (this.asciiArt = a);
}
addLocation(e) {
this.locations.push(e);
}
}
},
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(0),
r = a(1),
i = a(10),
o = a(76),
s = a(32);
function l(e) {
return n.createElement(
s.a,
null,
n.createElement(
o.a,
{ sx: { my: 1, p: 1, width: "100%" } },
n.createElement(i.a, { onClick: e.onClick }, e.buttonText),
n.createElement(r.a, null, e.infoText),
),
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return l;
}),
a.d(t, "a", function () {
return u;
});
var n = a(0),
r = a(1),
i = a(29),
o = a(10),
s = a(80);
let l;
function c(e) {
let t = "",
a = "";
return (
e.tickerDisplayMode === l.Portfolio
? ((t = "Switch to 'All Stocks' Mode"), (a = "Displays all stocks on the WSE"))
: ((t = "Switch to 'Portfolio' Mode"), (a = "Displays only the stocks for which you have shares or orders")),
n.createElement(
i.a,
{ title: n.createElement(r.a, null, a) },
n.createElement(o.a, { onClick: e.changeDisplayMode }, t),
)
);
}
function u(e) {
return n.createElement(
n.Fragment,
null,
n.createElement(c, e),
n.createElement("br", null),
n.createElement(s.a, {
sx: { width: "100%" },
onChange: e.changeWatchlistFilter,
placeholder: "Filter Stocks by symbol (comma-separated list)",
type: "text",
}),
);
}
!(function (e) {
(e[(e.AllStocks = 0)] = "AllStocks"), (e[(e.Portfolio = 1)] = "Portfolio");
})(l || (l = {}));
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return s;
}),
a.d(t, "b", function () {
return l;
}),
a.d(t, "c", function () {
return c;
}),
a.d(t, "d", function () {
return u;
}),
a.d(t, "e", function () {
return m;
}),
a.d(t, "f", function () {
return h;
});
var n = a(25),
r = a(447),
i = a(62),
o = a(8);
function s() {
return 2 === this.bitNodeN || (!(i.a[2] <= 0) && this.karma <= -54e3 * o.a.GangKarmaRequirement);
}
function l() {
const e = this.gang;
if (null === e) throw new Error("Cannot get gang faction because player is not in a gang.");
const t = n.a[e.facName];
if (null == t) throw new Error("Gang has invalid faction name: " + e.facName);
return t;
}
function c() {
if (!this.inGang()) return "";
const e = this.gang;
if (null === e) throw new Error("Cannot get gang faction because player is not in a gang.");
return e.facName;
}
function u(e) {
if (!this.inGang()) return !1;
const t = this.gang;
if (null === t) throw new Error("Cannot get gang faction because player is not in a gang.");
return t.facName === e;
}
function m() {
return null != this.gang && null != this.gang && this.gang instanceof r.a;
}
function h(e, t) {
this.gang = new r.a(e, t);
const a = n.a[e];
if (null == a) throw new Error("Invalid faction name when creating gang: " + e);
a.playerReputation = 0;
}
},
,
,
,
,
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
0: [
0,
2e10,
"Export",
"Develop infrastructure to export your materials to your other facilities. This allows you to move materials around between different divisions and cities.",
],
1: [
1,
25e9,
"Smart Supply",
"Use advanced AI to anticipate your supply needs. This allows you to purchase exactly however many materials you need for production.",
],
2: [
2,
5e9,
"Market Research - Demand",
"Mine and analyze market data to determine the demand of all resources. The demand attribute, which affects sales, will be displayed for every material and product.",
],
3: [
3,
5e9,
"Market Data - Competition",
"Mine and analyze market data to determine how much competition there is on the market for all resources. The competition attribute, which affects sales, will be displayed for every material and product.",
],
4: [
4,
1e10,
"VeChain",
"Use AI and blockchain technology to identify where you can improve your supply chain systems. This upgrade will allow you to view a wide array of useful statistics about your Corporation.",
],
5: [
5,
5e11,
"Shady Accounting",
"Utilize unscrupulous accounting practices and pay off government officials to save money on taxes. This reduces the dividend tax rate by 5%.",
],
6: [
6,
2e12,
"Government Partnership",
"Help national governments further their agendas in exchange for lowered taxes. This reduces the dividend tax rate by 10%",
],
};
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
0: [
0,
2e9,
1.06,
0.03,
"Smart Factories",
"Advanced AI automatically optimizes the operation and productivity of factories. Each level of this upgrade increases your global production by 3% (additive).",
],
1: [
1,
2e9,
1.06,
0.1,
"Smart Storage",
"Advanced AI automatically optimizes your warehouse storage methods. Each level of this upgrade increases your global warehouse storage size by 10% (additive).",
],
2: [
2,
4e9,
1.1,
0.001,
"DreamSense",
"Use DreamSense LCC Technologies to advertise your corporation to consumers through their dreams. Each level of this upgrade provides a passive increase in awareness of all of your companies (divisions) by 0.004 / market cycle,and in popularity by 0.001 / market cycle. A market cycle is approximately 15 seconds.",
],
3: [
3,
4e9,
1.5,
0.005,
"Wilson Analytics",
"Purchase data and analysis from Wilson, a marketing research firm. Each level of this upgrades increases the effectiveness of your advertising by 0.5% (additive).",
],
4: [
4,
1e9,
1.06,
0.1,
"Nuoptimal Nootropic Injector Implants",
"Purchase the Nuoptimal Nootropic Injector augmentation for your employees. Each level of this upgrade globally increases the creativity of your employees by 10% (additive).",
],
5: [
5,
1e9,
1.06,
0.1,
"Speech Processor Implants",
"Purchase the Speech Processor augmentation for your employees. Each level of this upgrade globally increases the charisma of your employees by 10% (additive).",
],
6: [
6,
1e9,
1.06,
0.1,
"Neural Accelerators",
"Purchase the Neural Accelerator augmentation for your employees. Each level of this upgrade globally increases the intelligence of your employees by 10% (additive).",
],
7: [
7,
1e9,
1.06,
0.1,
"FocusWires",
"Purchase the FocusWire augmentation for your employees. Each level of this upgrade globally increases the efficiency of your employees by 10% (additive).",
],
8: [
8,
1e9,
1.07,
0.01,
"ABC SalesBots",
"Always Be Closing. Purchase these robotic salesmen to increase the amount of materials and products you sell. Each level of this upgrade globally increases your sales by 1% (additive).",
],
9: [
9,
5e9,
1.07,
0.05,
"Project Insight",
"Purchase 'Project Insight', a R&D service provided by the secretive Fulcrum Technologies. Each level of this upgrade globally increases the amount of Scientific Research you produce by 5% (additive).",
],
};
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return c;
});
var n = a(0),
r = a.n(n),
i = a(22),
o = a(1),
s = a(29);
function l(e) {
return e.city !== e.currentCity
? r.a.createElement(
s.a,
{ title: r.a.createElement(o.a, null, e.city) },
r.a.createElement(
"span",
{
onClick: () => e.onTravel(e.city),
style: { color: "white", lineHeight: "1em", whiteSpace: "pre", cursor: "pointer" },
},
e.city[0],
),
)
: r.a.createElement("span", null, e.city[0]);
}
function c(e) {
return r.a.createElement(
r.a.Fragment,
null,
r.a.createElement(o.a, { sx: { lineHeight: "1em", whiteSpace: "pre" } }, " ,_ . ._. _. ."),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" , _-\\','|~\\~ ~/ ;-'_ _-' ,;_;_, ~~-",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" /~~-\\_/-'~'--' \\~~| ', ,' / / ~|-_\\_/~/~ ~~--~~~~'--_",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" / ,/'-/~ '\\ ,' _ , '",
r.a.createElement(l, { onTravel: e.onTravel, currentCity: e.currentCity, city: i.a.Volhaven }),
",'|~ ._/-, /~",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" ~/-'~\\_, '-,| '|. ' ~ ,\\ /'~ / /_ /~",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
".-~ '| '',\\~|\\ _\\~ ,_ , ",
r.a.createElement(l, { onTravel: e.onTravel, currentCity: e.currentCity, city: i.a.Chongqing }),
" /,",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" '\\ ",
r.a.createElement(l, { onTravel: e.onTravel, currentCity: e.currentCity, city: i.a.Sector12 }),
" /'~ |_/~\\\\,-,~ \\ \" ,_,/ |",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" | / ._-~'\\_ _~| \\ ) ",
r.a.createElement(l, { onTravel: e.onTravel, currentCity: e.currentCity, city: i.a.NewTokyo }),
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" \\ __-\\ '/ ~ |\\ \\_ / ~",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" ., '\\ |, ~-_ - | \\\\_' ~| /\\ \\~ ,",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" ~-_' _; '\\ '-, \\,' /\\/ |",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" '\\_,~'\\_ \\_ _, /' ' |, /|'",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" / \\_ ~ | / \\ ~'; -,_.",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" | ~\\ | | , '-_, ,; ~ ~\\",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" \\, ",
r.a.createElement(l, { onTravel: e.onTravel, currentCity: e.currentCity, city: i.a.Aevum }),
" / \\ / /| ,-, , -,",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" | ,/ | |' |/ ,- ~ \\ '.",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" ,| ,/ \\ ,/ \\ ",
r.a.createElement(l, { onTravel: e.onTravel, currentCity: e.currentCity, city: i.a.Ishima }),
" |",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" / | ~ -~~-, / _",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" | ,-' ~ /",
),
r.a.createElement(
o.a,
{ sx: { lineHeight: "1em", whiteSpace: "pre" } },
" / ,' ~",
),
r.a.createElement(o.a, { sx: { lineHeight: "1em", whiteSpace: "pre" } }, " ',| ~"),
r.a.createElement(o.a, { sx: { lineHeight: "1em", whiteSpace: "pre" } }, " ~'"),
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(0),
r = a.n(n),
i = a(23),
o = a(876),
s = a(877);
function l(e) {
const t = e.action.getEstSuccessChance(e.bladeburner);
let a = r.a.createElement(r.a.Fragment, null);
return (
(a =
t[0] === t[1]
? r.a.createElement(r.a.Fragment, null, Object(i.c)(100 * t[0], 1), "%")
: r.a.createElement(
r.a.Fragment,
null,
Object(i.c)(100 * t[0], 1),
"% ~ ",
Object(i.c)(100 * t[1], 1),
"%",
)),
r.a.createElement(
r.a.Fragment,
null,
"Estimated success chance: ",
a,
" ",
e.action.isStealth ? r.a.createElement(o.a, null) : r.a.createElement(r.a.Fragment, null),
e.action.isKill ? r.a.createElement(s.a, null) : r.a.createElement(r.a.Fragment, null),
)
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return o;
});
var n = a(0),
r = a.n(n),
i = a(40);
function o(e) {
return r.a.createElement(i.a, { open: e.open, onClose: e.onClose }, e.children);
}
},
,
,
,
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
}),
a.d(t, "b", function () {
return o;
});
var n = a(74),
r = a(15);
function i(e, t) {
let a = 0,
i = !1;
for (const r in n.a) {
const o = n.a[r];
if (o.type == t) {
(a = o.successRate(e)), (i = !0);
break;
}
}
return i
? Math.random() <= a
: (Object(r.a)(`ERR: Unrecognized crime type: ${t} This is probably a bug please contact the developer`), !1);
}
function o(e) {
return e.includes("shoplift")
? n.a.Shoplift
: e.includes("rob") && e.includes("store")
? n.a.RobStore
: e.includes("mug")
? n.a.Mug
: e.includes("larceny")
? n.a.Larceny
: e.includes("drugs")
? n.a.DealDrugs
: e.includes("bond") && e.includes("forge")
? n.a.BondForgery
: e.includes("traffick") && e.includes("arms")
? n.a.TraffickArms
: e.includes("homicide")
? n.a.Homicide
: e.includes("grand") && e.includes("auto")
? n.a.GrandTheftAuto
: e.includes("kidnap")
? n.a.Kidnap
: e.includes("assassinate") || e.includes("assassination")
? n.a.Assassination
: e.includes("heist")
? n.a.Heist
: null;
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return s;
});
var n = a(0),
r = a.n(n),
i = a(4),
o = a(102);
function s({ reputation: e }) {
return r.a.createElement(o.a, { reputation: i.a.formatReputation(e) + " / sec" });
}
},
,
,
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return n;
}),
a.d(t, "a", function () {
return r;
});
const n = 5,
r = 1e13;
},
function (e, t, a) {
"use strict";
a.d(t, "e", function () {
return c;
}),
a.d(t, "b", function () {
return u;
}),
a.d(t, "c", function () {
return m;
}),
a.d(t, "d", function () {
return h;
}),
a.d(t, "a", function () {
return d;
});
var n = a(7),
r = a(8),
i = a(48),
o = a(87),
s = a(24),
l = a(103);
function c() {
return !!Object(s.d)(l.a.DarkWeb);
}
function u() {
const e = Object(s.d)(this.currentServer);
if (null === e) throw new Error("somehow connected to a server that does not exist.");
return e;
}
function m() {
const e = Object(s.d)("home");
if (e instanceof i.a) return e;
throw new Error("home computer was not a normal server");
}
function h() {
const e = this.getHomeComputer().maxRam,
t = Math.log2(e),
a = Math.pow(1.58, t);
return e * n.a.BaseCostFor1GBOfRamHome * a * r.a.HomeComputerRamCost;
}
function d() {
const e = "hacknet-node-" + this.hacknetNodes.length,
t = new o.a({ adminRights: !0, hostname: e, ip: Object(s.e)() });
this.hacknetNodes.push(t.hostname), Object(s.a)(t);
return this.getHomeComputer().serversOnNetwork.push(t.hostname), t.serversOnNetwork.push(l.a.Home), t;
}
},
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
function n(e) {
return +(Math.round(parseFloat(e + "e+2")) + "e-2");
}
a.d(t, "a", function () {
return n;
});
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return l;
}),
a.d(t, "c", function () {
return c;
}),
a.d(t, "a", function () {
return u;
});
var n = a(259),
r = a(2),
i = a(115),
o = a(103),
s = a(4);
function l() {
const e = r.a.getCurrentServer();
null !== e &&
o.a.DarkWeb == e.hostname &&
i.a.print(
"You are now connected to the dark web. From the dark web you can purchase illegal items. Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] to purchase an item.",
);
}
function c() {
for (const e in n.a) {
const t = n.a[e];
i.a.print(`${t.program} - ${s.a.formatMoney(t.price)} - ${t.description}`);
}
}
function u(e) {
e = e.toLowerCase();
let t = null;
for (const a in n.a) {
const r = n.a[a];
r.program.toLowerCase() == e && (t = r);
}
null !== t
? r.a.hasProgram(t.program)
? i.a.print("You already have the " + t.program + " program")
: r.a.money.lt(t.price)
? i.a.print("Not enough money to purchase " + t.program)
: (r.a.loseMoney(t.price),
r.a.getHomeComputer().programs.push(t.program),
i.a.print(
"You have purchased the " + t.program + " program. The new program can be found on your home computer.",
))
: i.a.print("Unrecognized item: " + e);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
}),
a.d(t, "b", function () {
return o;
});
var n = a(182);
let r = 1;
function i() {
let e = r,
t = !1;
for (let a = 0; a < 1e6; ) {
if (!n.a.has(e + a)) {
(t = !0), (e += a);
break;
}
a === Number.MAX_SAFE_INTEGER - 1 ? (a = 1) : ++a;
}
return t ? ((r = e + 1), r >= Number.MAX_SAFE_INTEGER && (r = 1), e) : -1;
}
function o() {
r = 1;
}
},
function (e, t, a) {
"use strict";
(function (e) {
a.d(t, "a", function () {
return Ce;
});
var n = a(400),
r = a(497),
i = a(13),
o = a(255),
s = a(20),
l = a(152),
c = a(312),
u = a(6),
m = a(8),
h = a(401),
d = a(199),
p = a(200),
f = a(58),
g = a(315),
y = a(81),
b = a(7),
E = a(259),
v = a(67),
k = a(385),
_ = a(386),
w = a(89),
C = a(498),
S = a(73),
x = a(25),
O = a(117),
T = a(453),
M = a(230),
R = a(206),
P = a(37),
A = a(87),
N = a(22),
I = a(9),
F = a(115),
j = a(231),
B = a(123),
D = a(2),
G = a(68),
L = a(321),
W = a(225),
H = a(101),
U = a(499),
q = a(24),
K = a(316),
$ = a(113),
z = a(201),
Y = a(48),
V = a(62),
J = a(207),
X = a(439),
Q = a(91),
Z = a(184),
ee = a(94),
te = a(66),
ae = a(88),
ne = a(251),
re = a(109),
ie = a(227),
oe = a(160),
se = a(127),
le = a(182),
ce = a(140),
ue = a(496),
me = a(110),
he = a(4),
de = a(1113),
pe = a(23),
fe = a(247),
ge = a(250),
ye = a(118),
be = a(1114),
Ee = a(1116),
ve = a(1117),
ke = a(1118);
const _e = new ue.a("", () => {});
function we(e) {
if (null == e) return null;
if (
!(
e.hasOwnProperty("properties") &&
e.hasOwnProperty("getter") &&
e.hasOwnProperty("setter") &&
e.hasOwnProperty("proto")
)
)
return e;
let t;
if (e.hasOwnProperty("class") && "Array" === e.class) {
t = [];
const a = _e.getProperty(e, "length");
for (let n = 0; n < a; n++) _e.hasProperty(e, n) && (t[n] = we(_e.getProperty(e, n)));
} else {
t = {};
for (const a in e.properties) {
const n = e.properties[a];
t[a] = we(n);
}
}
return t;
}
function Ce(t) {
const a = function (e, a) {
if (t.dynamicLoadedFns[e]) return;
t.dynamicLoadedFns[e] = !0;
let n = t.scriptRef.threads;
if (
("number" != typeof n &&
(console.warn(`WorkerScript detected NaN for threadcount for ${t.name} on ${t.hostname}`), (n = 1)),
(t.dynamicRamUsage += a * n),
t.dynamicRamUsage > 1.01 * t.ramUsage)
)
throw Object(ce.b)(
t,
`Dynamic RAM usage calculated to be greater than initial RAM usage on fn: ${e}.\n This is probably because you somehow circumvented the static RAM calculation.\n\n Dynamic RAM Usage: ${he.a.formatRAM(
t.dynamicRamUsage,
)}\n Static RAM Usage: ${he.a.formatRAM(
t.ramUsage,
)}\n\n One of these could be the reason:\n * Using eval() to get a reference to a ns function\n const scan = eval('ns.scan');\n\n * Using map access to do the same\n const scan = ns['scan'];\n\n * Saving script in the improper order.\n Increase the cost of an imported script, save it, then run the\n parent. To fix this just re-open & save every script in order\n from most imported to least imported (parent script).\n\n Sorry :(`,
);
},
ue = function (e, t = "") {
const a = Object(q.d)(e);
if (null == a) throw Re(t, "Invalid IP/hostname: " + e);
return a;
},
_e = function (e, a, n, r) {
if ((("string" == typeof n && "" !== n) || (n = "getRunningScript"), !Array.isArray(r)))
throw Object(ce.b)(
t,
`Invalid scriptArgs argument passed into getRunningScript() from ${n}(). This is probably a bug. Please report to game developer`,
);
if (null != e && "string" == typeof e) {
null == a && (a = t.hostname);
const i = ue(a, n);
return Object(W.a)(e, r, i);
}
return t.scriptRef;
},
Se = function (e, t) {
("string" == typeof t && "" !== t) || (t = "getRunningScriptgetRunningScriptByPid");
for (const t of Object(q.c)()) {
const a = Object(W.b)(e, t);
if (a) return a;
}
return null;
},
xe = function (e, t, a) {
return (
Array.isArray(a) || (a = []),
`Cannot find running script ${e} on server ${t} with args: ${Object(ge.a)(a)}`
);
},
Oe = function (e = "") {
if (!D.a.hasWseAccount) throw Re(e, `You don't have WSE Access! Cannot use ${e}()`);
if (!D.a.hasTixApiAccess) throw Re(e, `You don't have TIX API Access! Cannot use ${e}()`);
},
Te = function (e, t = "") {
const a = Q.b[e];
if (null == a) throw Re(t, `Invalid stock symbol: '${e}'`);
return a;
},
Me = function (e, a = "") {
return e instanceof A.a && (t.log(a, "Does not work on Hacknet Servers"), !0);
},
Re = function (e, a) {
const n = new Error().stack;
if (void 0 === n) throw new Error("how did we not throw an error?");
const r = n.split("\n").slice(1),
i = t.getServer().scripts,
o = [];
for (const e of r) {
let t;
for (const a of i) {
a.url && e.includes(a.url) && (t = a.filename);
for (const n of a.dependencies) e.includes(n.url) && (t = n.filename);
}
if (!t) continue;
function s(e) {
const t = e.match(/.*:(\d+):\d+.*/),
a = e.match(/.*at (.+) \(.*/);
return t && a ? { line: t[1], func: a[1] } : null;
}
let a = { line: "-1", func: "unknown" };
const n = s(e);
function l(e) {
const t = e.match(/.*:(\d+):\d+$/),
a = e.lastIndexOf("@");
return t && -1 !== a ? { line: t[1], func: e.slice(0, a) } : null;
}
n && (a = n);
const r = l(e);
r && (a = r), o.push(`${t}:L${a.line}@${a.func}`);
}
t.log(e, a);
let c = `${e}: ${a}`;
return 0 !== o.length && (c += "
Stack:
" + o.join("
")), Object(ce.b)(t, c);
},
Pe = function (e, t) {
if ((V.a[5] < 1 && 5 !== D.a.bitNodeN) || (V.a[t] < 1 && D.a.bitNodeN !== t)) {
let a = "";
throw (
(5 !== t && (a = ` and Source-File ${t}-1`),
Re("formulas." + e, `Requires Source-File 5-1${a} to run.`))
);
}
},
Ae = function (e, t) {
if (4 !== D.a.bitNodeN && V.a[4] < t)
throw Re(e, `This singularity function requires Source-File 4-${t} to run.`);
},
Ne = function (e, t = !1) {
const a = D.a.bladeburner;
if (null === a) throw new Error("Must have joined bladeburner");
if (!(7 === D.a.bitNodeN || D.a.sourceFiles.some((e) => 7 === e.n))) {
throw Re(
"bladeburner." + e,
"You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.",
);
}
if (!t) {
if (!(a instanceof d.a)) {
throw Re("bladeburner." + e, "You must be a member of the Bladeburner division to use this API.");
}
}
},
Ie = function (e, t) {
const a = D.a.bladeburner;
if (null === a) throw new Error("Must have joined bladeburner");
if (!a.cities.hasOwnProperty(t)) throw Re("bladeburner." + e, "Invalid city: " + t);
},
Fe = function (e, t, a) {
const n = ue(t, e).getContract(a);
if (null == n) throw Re("codingcontract." + e, `Cannot find contract '${a}' on server '${t}'`);
return n;
},
je = function (e, t, a) {
const n = D.a.bladeburner;
if (null === n) throw new Error("Must have joined bladeburner");
const r = n.getActionIdFromTypeAndName(t, a);
if (!r) throw Re("bladeburner." + e, `Invalid action type='${t}', name='${a}'`);
const i = n.getActionObject(r);
if (!i) throw Re("bladeburner." + e, `Invalid action type='${t}', name='${a}'`);
return i;
},
Be = function (e, t) {
const a = f.a[t];
if (null == a || !(a instanceof p.a)) throw Re(e, `Invalid company name: '${t}'`);
return a;
},
De = function (e, t) {
if (!Object(x.b)(t)) throw Re(e, "Invalid faction name: '" + t);
return x.a[t];
},
Ge = function (e, t) {
if (!Object(l.b)(t)) throw Re(e, `Invalid augmentation: '${t}'`);
return s.a[t];
};
function Le(e) {
const t = D.a.corporation;
if (null === t) throw new Error("cannot be called without a corporation");
const a = t.divisions.find((t) => t.name === e);
if (void 0 === a) throw new Error(`No division named '${e}'`);
return a;
}
function We(e, t) {
const a = Le(e);
if (!(t in a.offices)) throw new Error(`Invalid city name '${t}'`);
const n = a.offices[t];
if (0 === n) throw new Error(`${a.name} has not expanded to '${t}'`);
return n;
}
function He(e, t) {
const a = Le(e);
if (!(t in a.warehouses)) throw new Error(`Invalid city name '${t}'`);
const n = a.warehouses[t];
if (0 === n) throw new Error(`${a.name} has not expanded to '${t}'`);
return n;
}
function Ue(e, t, a) {
const n = He(e, t).materials[a];
if (void 0 === n) throw new Error(`Invalid material name: '${a}'`);
return n;
}
function qe(e, t) {
const a = Le(e).products[t];
if (void 0 === a) throw new Error(`Invalid product name: '${t}'`);
return a;
}
function Ke(e, t, a) {
const n = We(e, t).employees.find((e) => e.name === a);
if (void 0 === n) throw new Error(`Invalid employee name: '${a}'`);
return n;
}
const $e = function (e = null) {
if (e && Object(ye.a)(e)) {
const t = D.a.getHomeComputer();
for (const a of t.scripts)
if (a.filename === e) {
if (a.ramUsage > t.maxRam - t.ramUsed) return;
const e = new K.a(a, []);
(e.threads = 1), Object(oe.e)(e, t);
}
}
},
ze = function (e, a, { threads: n, stock: r } = {}) {
if (void 0 === e) throw Re("hack", "Takes 1 argument.");
const i = Object(ce.d)(t, "hack", n),
o = Object(q.d)(e);
if (!(o instanceof Y.a)) throw Re("hack", `Invalid IP/hostname: ${e}.`);
if (null == o) throw Re("hack", `Invalid IP/hostname: ${e}.`);
const s = Object(w.d)(o, D.a),
l = Object(T.b)(o, D.a);
if (!l.res) throw Re("hack", l.msg || "");
return (
t.log("hack", `Executing ${e} in ${Object(pe.b)(1e3 * s, !0)} (t=${he.a.formatThreads(i)})`),
Object(ce.c)(1e3 * s, t).then(function () {
if (t.env.stopFlag) return Promise.reject(t);
const e = Object(w.b)(o, D.a),
n = Math.random();
let s = Object(w.c)(o, D.a) * i;
const l = s / 4;
if (n < e) {
const e = Object(w.e)(o, D.a);
let n = Math.ceil((1 / e) * (o.moneyAvailable / o.moneyMax));
isNaN(n) && (n = 1e6);
let c = Math.floor(o.moneyAvailable * e) * i;
c <= 0 && ((c = 0), (s = l)),
c > o.moneyAvailable && (c = o.moneyAvailable),
(o.moneyAvailable -= c),
o.moneyAvailable < 0 && (o.moneyAvailable = 0);
const u = c * m.a.ScriptHackMoneyGain;
return (
D.a.gainMoney(u),
(t.scriptRef.onlineMoneyMade += u),
(D.a.scriptProdSinceLastAug += u),
D.a.recordMoneySource(u, "hacking"),
t.scriptRef.recordHack(o.hostname, u, i),
D.a.gainHackingExp(s),
(t.scriptRef.onlineExpGained += s),
t.log(
"hack",
`Successfully hacked '${o.hostname}' for ${he.a.formatMoney(u)} and ${he.a.formatExp(
s,
)} exp (t=${he.a.formatThreads(i)})`,
),
o.fortify(b.a.ServerFortifyAmount * Math.min(i, n)),
r && Object(X.c)(o, u),
a && (o.backdoorInstalled = !0),
Promise.resolve(u)
);
}
return (
D.a.gainHackingExp(l),
(t.scriptRef.onlineExpGained += l),
t.log(
"hack",
`Failed to hack '${o.hostname}'. Gained ${he.a.formatExp(l)} exp (t=${he.a.formatThreads(i)})`,
),
Promise.resolve(0)
);
})
);
},
Ye = function (e) {
let t = "";
for (let a of e) (a = we(a)), (t += "object" != typeof a ? "" + a : JSON.stringify(a));
return t;
},
Ve = {
updateDynamicRam: a,
makeRuntimeErrorMsg: Re,
string: (e, t, a) => {
if ("string" == typeof a) return a;
if ("number" == typeof a) return a + "";
throw Re(e, t + " should be a string");
},
number: (e, t, a) => {
if ("number" == typeof a) return a;
if (!isNaN(a) && !isNaN(parseFloat(a))) return parseFloat(a);
throw Re(e, t + " should be a number");
},
boolean: (e) => !!e,
},
Je = Object(be.a)(D.a, t, Ve),
Xe = Object(Ee.a)(D.a, t, Ve),
Qe = Object(ve.a)(D.a, t, Ve),
Ze = {
hacknet: Object(ke.a)(D.a, t, Ve),
sprintf: n.sprintf,
vsprintf: n.vsprintf,
scan: function (e = t.hostname) {
a("scan", Object(i.c)("scan"));
const n = Object(q.d)(e);
if (null == n) throw Re("scan", `Invalid IP/hostname: ${e}.`);
const r = [];
for (let e = 0; e < n.serversOnNetwork.length; e++) {
const t = Object($.a)(n, e);
if (null === t) continue;
const a = t.hostname;
null != a && r.push(a);
}
return t.log("scan", `returned ${n.serversOnNetwork.length} connections for ${n.hostname}`), r;
},
hack: function (e, { threads: t, stock: n } = {}) {
return a("hack", Object(i.c)("hack")), ze(e, !1, { threads: t, stock: n });
},
hackAnalyzeThreads: function (e, n) {
a("hackAnalyzeThreads", Object(i.c)("hackAnalyzeThreads"));
const r = ue(e, "hackAnalyzeThreads");
if (!(r instanceof Y.a)) return t.log("hackAnalyzeThreads", "Cannot be executed on this server."), -1;
if (isNaN(n))
throw Re(
"hackAnalyzeThreads",
`Invalid growth argument passed into hackAnalyzeThreads: ${n}. Must be numeric.`,
);
if (n < 0 || n > r.moneyAvailable) return -1;
const o = Object(w.e)(r, D.a);
return n / Math.floor(r.moneyAvailable * o);
},
hackAnalyzePercent: function (e) {
a("hackAnalyzePercent", Object(i.c)("hackAnalyzePercent"));
const n = ue(e, "hackAnalyzePercent");
return n instanceof Y.a
? 100 * Object(w.e)(n, D.a)
: (t.log("hackAnalyzePercent", "Cannot be executed on this server."), !1);
},
hackChance: function (e) {
a("hackChance", Object(i.c)("hackChance"));
const n = ue(e, "hackChance");
return n instanceof Y.a
? Object(w.b)(n, D.a)
: (t.log("hackChance", "Cannot be executed on this server."), !1);
},
sleep: function (e) {
if (void 0 === e) throw Re("sleep", "Takes 1 argument.");
return (
t.log("sleep", `Sleeping for ${e} milliseconds`),
Object(ce.c)(e, t).then(function () {
return Promise.resolve(!0);
})
);
},
grow: function (e, { threads: n, stock: r } = {}) {
a("grow", Object(i.c)("grow"));
const o = Object(ce.d)(t, "grow", n);
if (void 0 === e) throw Re("grow", "Takes 1 argument.");
const s = Object(q.d)(e);
if (!(s instanceof Y.a)) return t.log("grow", "Cannot be executed on this server."), !1;
if (null == s) throw Re("grow", `Invalid IP/hostname: ${e}.`);
const l = Object(q.d)(t.hostname);
if (null === l) throw new Error("Workerscript host is null");
const c = Object(T.a)(s);
if (!c.res) throw Re("grow", c.msg || "");
const u = Object(w.a)(s, D.a);
return (
t.log(
"grow",
`Executing on '${s.hostname}' in ${Object(pe.b)(1e3 * u, !0)} (t=${he.a.formatThreads(o)}).`,
),
Object(ce.c)(1e3 * u, t).then(function () {
if (t.env.stopFlag) return Promise.reject(t);
const e = s.moneyAvailable <= 0 ? 1 : s.moneyAvailable;
Object($.e)(s, o, D.a, l.cpuCores);
const a = s.moneyAvailable;
t.scriptRef.recordGrow(s.hostname, o);
const n = Object(w.c)(s, D.a) * o,
i = a / e - 1;
return (
t.log(
"grow",
`Available money on '${s.hostname}' grown by ${he.a.formatPercentage(
i,
6,
)}. Gained ${he.a.formatExp(n)} hacking exp (t=${he.a.formatThreads(o)}).`,
),
(t.scriptRef.onlineExpGained += n),
D.a.gainHackingExp(n),
r && Object(X.b)(s, a - e),
Promise.resolve(a / e)
);
})
);
},
growthAnalyze: function (e, n, r = 1) {
a("growthAnalyze", Object(i.c)("growthAnalyze"));
const o = ue(e, "growthAnalyze");
if (!(o instanceof Y.a)) return t.log("growthAnalyze", "Cannot be executed on this server."), !1;
if ("number" != typeof n || isNaN(n) || n < 1 || !isFinite(n))
throw Re("growthAnalyze", `Invalid argument: growth must be numeric and >= 1, is ${n}.`);
return Object($.c)(o, Number(n), D.a, r);
},
weaken: function (e, { threads: n } = {}) {
a("weaken", Object(i.c)("weaken"));
const r = Object(ce.d)(t, "weaken", n);
if (void 0 === e) throw Re("weaken", "Takes 1 argument.");
const o = Object(q.d)(e);
if (!(o instanceof Y.a)) return t.log("weaken", "Cannot be executed on this server."), !1;
if (null == o) throw Re("weaken", "Invalid IP/hostname: " + e);
const s = Object(T.c)(o);
if (!s.res) throw Re("weaken", s.msg || "");
const l = Object(w.f)(o, D.a);
return (
t.log(
"weaken",
`Executing on '${o.hostname}' in ${Object(pe.b)(1e3 * l, !0)} (t=${he.a.formatThreads(r)})`,
),
Object(ce.c)(1e3 * l, t).then(function () {
if (t.env.stopFlag) return Promise.reject(t);
const e = Object(q.d)(t.hostname);
if (null === e) return t.log("weaken", "Server is null, did it die?"), Promise.resolve(0);
const a = 1 + (e.cpuCores - 1) / 16;
o.weaken(b.a.ServerWeakenAmount * r * a), t.scriptRef.recordWeaken(o.hostname, r);
const n = Object(w.c)(o, D.a) * r;
return (
t.log(
"weaken",
`'${o.hostname}' security level weakened to ${o.hackDifficulty}. Gained ${he.a.formatExp(
n,
)} hacking exp (t=${he.a.formatThreads(r)})`,
),
(t.scriptRef.onlineExpGained += n),
D.a.gainHackingExp(n),
Promise.resolve(b.a.ServerWeakenAmount * r)
);
})
);
},
print: function (...e) {
if (0 === e.length) throw Re("print", "Takes at least 1 argument.");
t.print(Ye(e));
},
tprint: function (...e) {
if (0 === e.length) throw Re("tprint", "Takes at least 1 argument.");
F.a.print(`${t.scriptRef.filename}: ${Ye(e)}`);
},
tprintf: function (e, ...t) {
F.a.print(Object(n.vsprintf)(e, t));
},
clearLog: function () {
t.scriptRef.clearLog();
},
disableLog: function (e) {
if ("ALL" === e) {
for (e in et) t.disableLogs[e] = !0;
t.log("disableLog", "Disabled logging for all functions");
} else {
if (void 0 === et[e]) throw Re("disableLog", `Invalid argument: ${e}.`);
(t.disableLogs[e] = !0), t.log("disableLog", "Disabled logging for " + e);
}
},
enableLog: function (e) {
if (void 0 === et[e]) throw Re("enableLog", `Invalid argument: ${e}.`);
delete t.disableLogs[e], t.log("enableLog", "Enabled logging for " + e);
},
isLogEnabled: function (e) {
if (void 0 === et[e]) throw Re("isLogEnabled", `Invalid argument: ${e}.`);
return !t.disableLogs[e];
},
getScriptLogs: function (e, a, ...n) {
const r = _e(e, a, "getScriptLogs", n);
return null == r ? (t.log("getScriptLogs", xe(e, a, n)), "") : r.logs.slice();
},
tail: function (e, a = t.hostname, ...n) {
let r;
(r = 0 === arguments.length ? t.scriptRef : "number" == typeof e ? Se(e, "tail") : _e(e, a, "tail", n)),
null != r ? fe.a.emit(r) : t.log("tail", xe(e, a, n));
},
nuke: function (e) {
if ((a("nuke", Object(i.c)("nuke")), void 0 === e)) throw Re("nuke", "Takes 1 argument.");
const n = Object(q.d)(e);
if (!(n instanceof Y.a)) return t.log("nuke", "Cannot be executed on this server."), !1;
if (null == n) throw Re("nuke", `Invalid IP/hostname: ${e}.`);
if (!D.a.hasProgram(G.a.NukeProgram.name)) throw Re("nuke", "You do not have the NUKE.exe virus!");
if (n.openPortCount < n.numOpenPortsRequired)
throw Re("nuke", "Not enough ports opened to use NUKE.exe virus.");
return (
n.hasAdminRights
? t.log("nuke", `Already have root access to '${n.hostname}'.`)
: ((n.hasAdminRights = !0),
t.log("nuke", `Executed NUKE.exe virus on '${n.hostname}' to gain root access.`)),
!0
);
},
brutessh: function (e) {
if ((a("brutessh", Object(i.c)("brutessh")), void 0 === e)) throw Re("brutessh", "Takes 1 argument.");
const n = Object(q.d)(e);
if (!(n instanceof Y.a)) return t.log("brutessh", "Cannot be executed on this server."), !1;
if (null == n) throw Re("brutessh", `Invalid IP/hostname: ${e}.`);
if (!D.a.hasProgram(G.a.BruteSSHProgram.name))
throw Re("brutessh", "You do not have the BruteSSH.exe program!");
return (
n.sshPortOpen
? t.log("brutessh", `SSH Port (22) already opened on '${n.hostname}'.`)
: (t.log("brutessh", `Executed BruteSSH.exe on '${n.hostname}' to open SSH port (22).`),
(n.sshPortOpen = !0),
++n.openPortCount),
!0
);
},
ftpcrack: function (e) {
if ((a("ftpcrack", Object(i.c)("ftpcrack")), void 0 === e)) throw Re("ftpcrack", "Takes 1 argument.");
const n = Object(q.d)(e);
if (!(n instanceof Y.a)) return t.log("ftpcrack", "Cannot be executed on this server."), !1;
if (null == n) throw Re("ftpcrack", `Invalid IP/hostname: ${e}.`);
if (!D.a.hasProgram(G.a.FTPCrackProgram.name))
throw Re("ftpcrack", "You do not have the FTPCrack.exe program!");
return (
n.ftpPortOpen
? t.log("ftpcrack", `FTP Port (21) already opened on '${n.hostname}'.`)
: (t.log("ftpcrack", `Executed FTPCrack.exe on '${n.hostname}' to open FTP port (21).`),
(n.ftpPortOpen = !0),
++n.openPortCount),
!0
);
},
relaysmtp: function (e) {
if ((a("relaysmtp", Object(i.c)("relaysmtp")), void 0 === e)) throw Re("relaysmtp", "Takes 1 argument.");
const n = Object(q.d)(e);
if (!(n instanceof Y.a)) return t.log("relaysmtp", "Cannot be executed on this server."), !1;
if (null == n) throw Re("relaysmtp", `Invalid IP/hostname: ${e}.`);
if (!D.a.hasProgram(G.a.RelaySMTPProgram.name))
throw Re("relaysmtp", "You do not have the relaySMTP.exe program!");
return (
n.smtpPortOpen
? t.log("relaysmtp", `SMTP Port (25) already opened on '${n.hostname}'.`)
: (t.log("relaysmtp", `Executed relaySMTP.exe on '${n.hostname}' to open SMTP port (25).`),
(n.smtpPortOpen = !0),
++n.openPortCount),
!0
);
},
httpworm: function (e) {
if ((a("httpworm", Object(i.c)("httpworm")), void 0 === e)) throw Re("httpworm", "Takes 1 argument");
const n = Object(q.d)(e);
if (!(n instanceof Y.a)) return t.log("httpworm", "Cannot be executed on this server."), !1;
if (null == n) throw Re("httpworm", "Invalid IP/hostname: " + e);
if (!D.a.hasProgram(G.a.HTTPWormProgram.name))
throw Re("httpworm", "You do not have the HTTPWorm.exe program!");
return (
n.httpPortOpen
? t.log("httpworm", `HTTP Port (80) already opened on '${n.hostname}'.`)
: (t.log("httpworm", `Executed HTTPWorm.exe on '${n.hostname}' to open HTTP port (80).`),
(n.httpPortOpen = !0),
++n.openPortCount),
!0
);
},
sqlinject: function (e) {
if ((a("sqlinject", Object(i.c)("sqlinject")), void 0 === e)) throw Re("sqlinject", "Takes 1 argument.");
const n = Object(q.d)(e);
if (!(n instanceof Y.a)) return t.log("sqlinject", "Cannot be executed on this server."), !1;
if (null == n) throw Re("sqlinject", "Invalid IP/hostname: " + e);
if (!D.a.hasProgram(G.a.SQLInjectProgram.name))
throw Re("sqlinject", "You do not have the SQLInject.exe program!");
return (
n.sqlPortOpen
? t.log("sqlinject", `SQL Port (1433) already opened on '${n.hostname}'.`)
: (t.log("sqlinject", `Executed SQLInject.exe on '${n.hostname}' to open SQL port (1433).`),
(n.sqlPortOpen = !0),
++n.openPortCount),
!0
);
},
run: function (e, n = 1, ...r) {
if ((a("run", Object(i.c)("run")), void 0 === e))
throw Re("run", "Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");
if (isNaN(n) || n <= 0) throw Re("run", "Invalid thread count. Must be numeric and > 0, is " + n);
const o = Object(q.d)(t.hostname);
if (null == o) throw Re("run", "Could not find server. This is a bug. Report to dev.");
return Object(oe.d)("run", o, e, r, t, n);
},
exec: function (e, n, r = 1, ...o) {
if ((a("exec", Object(i.c)("exec")), void 0 === e || void 0 === n))
throw Re("exec", "Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");
if (isNaN(r) || r <= 0) throw Re("exec", "Invalid thread count. Must be numeric and > 0, is " + r);
const s = Object(q.d)(n);
if (null == s) throw Re("exec", "Invalid IP/hostname: " + n);
return Object(oe.d)("exec", s, e, o, t, r);
},
spawn: function (e, n, ...r) {
if ((a("spawn", Object(i.c)("spawn")), !e || !n)) throw Re("spawn", "Usage: spawn(scriptname, threads)");
setTimeout(() => {
if (isNaN(n) || n <= 0) throw Re("spawn", "Invalid thread count. Must be numeric and > 0, is " + n);
const a = Object(q.d)(t.hostname);
if (null == a) throw Re("spawn", "Could not find server. This is a bug. Report to dev");
return Object(oe.d)("spawn", a, e, r, t, n);
}, 1e4),
t.log("spawn", `Will execute '${e}' in 10 seconds`),
(t.running = !1),
Object(se.a)(t) && t.log("spawn", "Exiting...");
},
kill: function (e, n, ...r) {
let o;
a("kill", Object(i.c)("kill"));
const s = "number" == typeof e;
if (s) o = Object(se.a)(e);
else {
if (void 0 === e || void 0 === n)
throw Re("kill", "Usage: kill(scriptname, server, [arg1], [arg2]...)");
const a = ue(n),
i = _e(e, n, "kill", r);
if (null == i) return t.log("kill", xe(e, n, r)), !1;
o = Object(se.a)(i, a.hostname);
}
return o
? (s
? t.log("kill", "Killing script with PID " + e)
: t.log("kill", `Killing '${e}' on '${n}' with args: ${Object(ge.a)(r)}.`),
!0)
: (s
? t.log("kill", "No script with PID " + e)
: t.log("kill", `No such script '${e}' on '${n}' with args: ${Object(ge.a)(r)}`),
!1);
},
killall: function (e = t.hostname) {
if ((a("killall", Object(i.c)("killall")), void 0 === e)) throw Re("killall", "Takes 1 argument");
const n = Object(q.d)(e);
if (null == n) throw Re("killall", "Invalid IP/hostname: " + e);
const r = n.runningScripts.length > 0;
for (let e = n.runningScripts.length - 1; e >= 0; --e) Object(se.a)(n.runningScripts[e], n.hostname, !1);
return (
o.a.emit(),
t.log(
"killall",
`Killing all scripts on '${n.hostname}'. May take a few minutes for the scripts to die.`,
),
r
);
},
exit: function () {
(t.running = !1),
Object(se.a)(t) ? t.log("exit", "Exiting...") : t.log("exit", "Failed. This is a bug. Report to dev.");
},
scp: function (e, n, r) {
if ((a("scp", Object(i.c)("scp")), 2 !== arguments.length && 3 !== arguments.length))
throw Re("scp", "Takes 2 or 3 arguments");
if (e && e.constructor === Array) {
let a = !1;
return (
e.forEach(function (e) {
Ce(t).scp(e, n, r) && (a = !0);
}),
a
);
}
if (!Object(re.g)(e)) throw Re("scp", `Invalid filename: '${e}'`);
if (!e.endsWith(".lit") && !Object(H.a)(e) && !e.endsWith("txt"))
throw Re("scp", "Only works for .script, .lit, and .txt files");
let o, s;
if (null != r) {
if (void 0 === e || void 0 === n || void 0 === r) throw Re("scp", "Takes 2 or 3 arguments");
if (((o = Object(q.d)(r)), null == o)) throw Re("scp", "Invalid IP/hostname: " + r);
if (((s = Object(q.d)(n)), null == s)) throw Re("scp", "Invalid IP/hostname: " + n);
} else {
if (null == n) throw Re("scp", "Takes 2 or 3 arguments");
if (void 0 === e || void 0 === n) throw Re("scp", "Takes 2 or 3 arguments");
if (((o = Object(q.d)(n)), null == o)) throw Re("scp", "Invalid IP/hostname: " + n);
if (((s = Object(q.d)(t.hostname)), null == s))
throw Re("scp", "Could not find server ip for this script. This is a bug. Report to dev.");
}
if (e.endsWith(".lit")) {
let a = !1;
for (let t = 0; t < s.messages.length; ++t)
if (!(s.messages[t] instanceof B.a) && s.messages[t] == e) {
a = !0;
break;
}
if (!a) return t.log("scp", `File '${e}' does not exist.`), !1;
for (let a = 0; a < o.messages.length; ++a)
if (o.messages[a] === e) return t.log("scp", `File '${e}' copied over to '${o.hostname}'.`), !0;
return o.messages.push(e), t.log("scp", `File '${e}' copied over to '${o.hostname}'.`), !0;
}
if (e.endsWith(".txt")) {
let a;
for (let t = 0; t < s.textFiles.length; ++t)
if (s.textFiles[t].fn === e) {
a = s.textFiles[t];
break;
}
if (void 0 === a) return t.log("scp", `File '${e}' does not exist.`), !1;
for (let n = 0; n < o.textFiles.length; ++n)
if (o.textFiles[n].fn === e)
return (
(o.textFiles[n].text = a.text), t.log("scp", `File '${e}' copied over to '${o.hostname}'.`), !0
);
const n = new ie.a(a.fn, a.text);
return o.textFiles.push(n), t.log("scp", `File '${e}' copied over to '${o.hostname}'.`), !0;
}
let l = null;
for (let t = 0; t < s.scripts.length; ++t)
if (e == s.scripts[t].filename) {
l = s.scripts[t];
break;
}
if (null == l) return t.log("scp", `File '${e}' does not exist.`), !1;
for (let a = 0; a < o.scripts.length; ++a)
if (e == o.scripts[a].filename) {
t.log("scp", `WARNING: File '${e}' overwritten on '${o.hostname}'`);
const n = o.scripts[a];
return n.code === l.code || ((n.code = l.code), (n.ramUsage = l.ramUsage), n.markUpdated()), !0;
}
const c = new L.a(e);
return (
(c.code = l.code),
(c.ramUsage = l.ramUsage),
(c.server = o.hostname),
o.scripts.push(c),
t.log("scp", `File '${e}' copied over to '${o.hostname}'.`),
!0
);
},
ls: function (e, t) {
if ((a("ls", Object(i.c)("ls")), void 0 === e)) throw Re("ls", "Usage: ls(ip/hostname, [grep filter])");
const n = Object(q.d)(e);
if (null == n) throw Re("ls", "Invalid IP/hostname: " + e);
let r = "";
arguments.length >= 2 && (r = t.toString());
const o = [];
for (let e = 0; e < n.programs.length; e++)
r ? n.programs[e].includes(r) && o.push(n.programs[e]) : o.push(n.programs[e]);
for (let e = 0; e < n.scripts.length; e++)
r ? n.scripts[e].filename.includes(r) && o.push(n.scripts[e].filename) : o.push(n.scripts[e].filename);
for (let e = 0; e < n.messages.length; e++)
if (r) {
const t = n.messages[e];
t instanceof B.a ? t.filename.includes(r) && o.push(t.filename) : t.includes(r) && o.push(t);
} else {
const t = n.messages[e];
t instanceof B.a ? o.push(t.filename) : o.push(t);
}
for (let e = 0; e < n.textFiles.length; e++)
r ? n.textFiles[e].fn.includes(r) && o.push(n.textFiles[e].fn) : o.push(n.textFiles[e].fn);
for (let e = 0; e < n.contracts.length; ++e)
r ? n.contracts[e].fn.includes(r) && o.push(n.contracts[e].fn) : o.push(n.contracts[e].fn);
return o.sort(), o;
},
ps: function (e = t.hostname) {
a("ps", Object(i.c)("ps"));
const n = Object(q.d)(e);
if (null == n) throw Re("ps", "Invalid IP/hostname: " + e);
const r = [];
for (const e in n.runningScripts) {
const t = n.runningScripts[e];
r.push({ filename: t.filename, threads: t.threads, args: t.args.slice(), pid: t.pid });
}
return r;
},
hasRootAccess: function (e) {
if ((a("hasRootAccess", Object(i.c)("hasRootAccess")), void 0 === e))
throw Re("hasRootAccess", "Takes 1 argument");
const t = Object(q.d)(e);
if (null == t) throw Re("hasRootAccess", "Invalid IP/hostname: " + e);
return t.hasAdminRights;
},
getIp: function () {
a("getIp", Object(i.c)("getIp"));
const e = Object(q.d)(t.hostname);
if (null == e) throw Re("getIp", "Could not find server. This is a bug. Report to dev.");
return e.hostname;
},
getHostname: function () {
a("getHostname", Object(i.c)("getHostname"));
const e = Object(q.d)(t.hostname);
if (null == e) throw Re("getHostname", "Could not find server. This is a bug. Report to dev.");
return e.hostname;
},
getHackingLevel: function () {
return (
a("getHackingLevel", Object(i.c)("getHackingLevel")),
D.a.updateSkillLevels(),
t.log("getHackingLevel", "returned " + D.a.hacking_skill),
D.a.hacking_skill
);
},
getHackingMultipliers: function () {
return (
a("getHackingMultipliers", Object(i.c)("getHackingMultipliers")),
{
chance: D.a.hacking_chance_mult,
speed: D.a.hacking_speed_mult,
money: D.a.hacking_money_mult,
growth: D.a.hacking_grow_mult,
}
);
},
getHacknetMultipliers: function () {
return (
a("getHacknetMultipliers", Object(i.c)("getHacknetMultipliers")),
{
production: D.a.hacknet_node_money_mult,
purchaseCost: D.a.hacknet_node_purchase_cost_mult,
ramCost: D.a.hacknet_node_ram_cost_mult,
coreCost: D.a.hacknet_node_core_cost_mult,
levelCost: D.a.hacknet_node_level_cost_mult,
}
);
},
getBitNodeMultipliers: function () {
if ((a("getBitNodeMultipliers", Object(i.c)("getBitNodeMultipliers")), V.a[5] <= 0 && 5 !== D.a.bitNodeN))
throw Re("getBitNodeMultipliers", "Requires Source-File 5 to run.");
return Object.assign({}, m.a);
},
getServer: function (e) {
a("getServer", Object(i.c)("getServer"));
const t = ue(e, "getServer"),
n = Object.assign({}, t);
return (
(n.contracts = []),
(n.messages = []),
(n.runningScripts = []),
(n.scripts = []),
(n.textFiles = []),
(n.programs = []),
(n.serversOnNetwork = []),
n
);
},
getServerMoneyAvailable: function (e) {
a("getServerMoneyAvailable", Object(i.c)("getServerMoneyAvailable"));
const n = ue(e, "getServerMoneyAvailable");
return n instanceof Y.a
? Me(n, "getServerMoneyAvailable")
? 0
: "home" == n.hostname
? (t.log(
"getServerMoneyAvailable",
"returned player's money: " + he.a.formatMoney(D.a.money.toNumber()),
),
D.a.money.toNumber())
: (t.log(
"getServerMoneyAvailable",
`returned ${he.a.formatMoney(n.moneyAvailable)} for '${n.hostname}'`,
),
n.moneyAvailable)
: (t.log("getServerNumPortsRequired", "Cannot be executed on this server."), 0);
},
getServerSecurityLevel: function (e) {
a("getServerSecurityLevel", Object(i.c)("getServerSecurityLevel"));
const n = ue(e, "getServerSecurityLevel");
return n instanceof Y.a
? Me(n, "getServerSecurityLevel")
? 1
: (t.log(
"getServerSecurityLevel",
`returned ${he.a.formatServerSecurity(n.hackDifficulty)} for '${n.hostname}'`,
),
n.hackDifficulty)
: (t.log("getServerNumPortsRequired", "Cannot be executed on this server."), 1);
},
getServerBaseSecurityLevel: function (e) {
a("getServerBaseSecurityLevel", Object(i.c)("getServerBaseSecurityLevel"));
const n = ue(e, "getServerBaseSecurityLevel");
return n instanceof Y.a
? Me(n, "getServerBaseSecurityLevel")
? 1
: (t.log(
"getServerBaseSecurityLevel",
`returned ${he.a.formatServerSecurity(n.baseDifficulty)} for '${n.hostname}'`,
),
n.baseDifficulty)
: (t.log("getServerNumPortsRequired", "Cannot be executed on this server."), 1);
},
getServerMinSecurityLevel: function (e) {
a("getServerMinSecurityLevel", Object(i.c)("getServerMinSecurityLevel"));
const n = ue(e, "getServerMinSecurityLevel");
return n instanceof Y.a
? Me(n, "getServerMinSecurityLevel")
? 1
: (t.log(
"getServerMinSecurityLevel",
`returned ${he.a.formatServerSecurity(n.minDifficulty)} for ${n.hostname}`,
),
n.minDifficulty)
: (t.log("getServerNumPortsRequired", "Cannot be executed on this server."), 1);
},
getServerRequiredHackingLevel: function (e) {
a("getServerRequiredHackingLevel", Object(i.c)("getServerRequiredHackingLevel"));
const n = ue(e, "getServerRequiredHackingLevel");
return n instanceof Y.a
? Me(n, "getServerRequiredHackingLevel")
? 1
: (t.log(
"getServerRequiredHackingLevel",
`returned ${he.a.formatSkill(n.requiredHackingSkill)} for '${n.hostname}'`,
),
n.requiredHackingSkill)
: (t.log("getServerNumPortsRequired", "Cannot be executed on this server."), 1);
},
getServerMaxMoney: function (e) {
a("getServerMaxMoney", Object(i.c)("getServerMaxMoney"));
const n = ue(e, "getServerMaxMoney");
return n instanceof Y.a
? Me(n, "getServerMaxMoney")
? 0
: (t.log("getServerMaxMoney", `returned ${he.a.formatMoney(n.moneyMax)} for '${n.hostname}'`),
n.moneyMax)
: (t.log("getServerNumPortsRequired", "Cannot be executed on this server."), 0);
},
getServerGrowth: function (e) {
a("getServerGrowth", Object(i.c)("getServerGrowth"));
const n = ue(e, "getServerGrowth");
return n instanceof Y.a
? Me(n, "getServerGrowth")
? 1
: (t.log("getServerGrowth", `returned ${n.serverGrowth} for '${n.hostname}'`), n.serverGrowth)
: (t.log("getServerNumPortsRequired", "Cannot be executed on this server."), 1);
},
getServerNumPortsRequired: function (e) {
a("getServerNumPortsRequired", Object(i.c)("getServerNumPortsRequired"));
const n = ue(e, "getServerNumPortsRequired");
return n instanceof Y.a
? Me(n, "getServerNumPortsRequired")
? 5
: (t.log("getServerNumPortsRequired", `returned ${n.numOpenPortsRequired} for '${n.hostname}'`),
n.numOpenPortsRequired)
: (t.log("getServerNumPortsRequired", "Cannot be executed on this server."), 5);
},
getServerRam: function (e) {
a("getServerRam", Object(i.c)("getServerRam"));
const n = ue(e, "getServerRam");
return (
t.log("getServerRam", `returned [${he.a.formatRAM(n.maxRam)}, ${he.a.formatRAM(n.ramUsed)}]`),
[n.maxRam, n.ramUsed]
);
},
getServerMaxRam: function (e) {
a("getServerMaxRam", Object(i.c)("getServerMaxRam"));
const n = ue(e, "getServerMaxRam");
return t.log("getServerMaxRam", "returned " + he.a.formatRAM(n.maxRam)), n.maxRam;
},
getServerUsedRam: function (e) {
a("getServerUsedRam", Object(i.c)("getServerUsedRam"));
const n = ue(e, "getServerUsedRam");
return t.log("getServerUsedRam", "returned " + he.a.formatRAM(n.ramUsed)), n.ramUsed;
},
serverExists: function (e) {
return a("serverExists", Object(i.c)("serverExists")), null !== Object(q.d)(e);
},
fileExists: function (e, n = t.hostname) {
if ((a("fileExists", Object(i.c)("fileExists")), void 0 === e))
throw Re("fileExists", "Usage: fileExists(scriptname, [server])");
const r = Object(q.d)(n);
if (null == r) throw Re("fileExists", "Invalid IP/hostname: " + n);
for (let t = 0; t < r.scripts.length; ++t) if (e == r.scripts[t].filename) return !0;
for (let t = 0; t < r.programs.length; ++t) if (e.toLowerCase() == r.programs[t].toLowerCase()) return !0;
for (let t = 0; t < r.messages.length; ++t)
if (!(r.messages[t] instanceof B.a) && e.toLowerCase() === r.messages[t]) return !0;
return null != Object(ie.c)(e, r);
},
isRunning: function (e, n = t.hostname, ...r) {
if ((a("isRunning", Object(i.c)("isRunning")), void 0 === e || void 0 === n))
throw Re("isRunning", "Usage: isRunning(scriptname, server, [arg1], [arg2]...)");
return "number" == typeof e ? null != Se(e, "isRunning") : null != _e(e, n, "isRunning", r);
},
getStockSymbols: function () {
return a("getStockSymbols", Object(i.c)("getStockSymbols")), Oe("getStockSymbols"), Object.values(ae.a);
},
getStockPrice: function (e) {
a("getStockPrice", Object(i.c)("getStockPrice")), Oe("getStockPrice");
return Te(e, "getStockPrice").price;
},
getStockAskPrice: function (e) {
a("getStockAskPrice", Object(i.c)("getStockAskPrice")), Oe("getStockAskPrice");
return Te(e, "getStockAskPrice").getAskPrice();
},
getStockBidPrice: function (e) {
a("getStockBidPrice", Object(i.c)("getStockBidPrice")), Oe("getStockBidPrice");
return Te(e, "getStockBidPrice").getBidPrice();
},
getStockPosition: function (e) {
a("getStockPosition", Object(i.c)("getStockPosition")), Oe("getStockPosition");
const t = Q.b[e];
if (null == t) throw Re("getStockPosition", "Invalid stock symbol: " + e);
return [t.playerShares, t.playerAvgPx, t.playerShortShares, t.playerAvgShortPx];
},
getStockMaxShares: function (e) {
a("getStockMaxShares", Object(i.c)("getStockMaxShares")), Oe("getStockMaxShares");
return Te(e, "getStockMaxShares").maxShares;
},
getStockPurchaseCost: function (e, t, n) {
a("getStockPurchaseCost", Object(i.c)("getStockPurchaseCost")), Oe("getStockPurchaseCost");
const r = Te(e, "getStockPurchaseCost");
let o;
t = Math.round(t);
const s = n.toLowerCase();
if (s.includes("l")) o = te.a.Long;
else {
if (!s.includes("s")) return 1 / 0;
o = te.a.Short;
}
const l = Object(Z.b)(r, t, o);
return null == l ? 1 / 0 : l;
},
getStockSaleGain: function (e, t, n) {
a("getStockSaleGain", Object(i.c)("getStockSaleGain")), Oe("getStockSaleGain");
const r = Te(e, "getStockSaleGain");
let o;
t = Math.round(t);
const s = n.toLowerCase();
if (s.includes("l")) o = te.a.Long;
else {
if (!s.includes("s")) return 0;
o = te.a.Short;
}
const l = Object(Z.c)(r, t, o);
return null == l ? 0 : l;
},
buyStock: function (e, n) {
a("buyStock", Object(i.c)("buyStock")), Oe("buyStock");
const r = Te(e, "buyStock");
return Object(J.a)(r, n, t, {}) ? r.price : 0;
},
sellStock: function (e, n) {
a("sellStock", Object(i.c)("sellStock")), Oe("sellStock");
const r = Te(e, "sellStock");
return Object(J.c)(r, n, t, {}) ? r.price : 0;
},
shortStock: function (e, n) {
if ((a("shortStock", Object(i.c)("shortStock")), Oe("shortStock"), 8 !== D.a.bitNodeN && V.a[8] <= 1))
throw Re("shortStock", "You must either be in BitNode-8 or you must have Source-File 8 Level 2.");
const r = Te(e, "shortStock");
return Object(J.d)(r, n, t, {}) ? r.price : 0;
},
sellShort: function (e, n) {
if ((a("sellShort", Object(i.c)("sellShort")), Oe("sellShort"), 8 !== D.a.bitNodeN && V.a[8] <= 1))
throw Re("sellShort", "You must either be in BitNode-8 or you must have Source-File 8 Level 2.");
const r = Te(e, "sellShort");
return Object(J.b)(r, n, t, {}) ? r.price : 0;
},
placeOrder: function (e, n, r, o, s) {
if ((a("placeOrder", Object(i.c)("placeOrder")), Oe("placeOrder"), 8 !== D.a.bitNodeN && V.a[8] <= 2))
throw Re("placeOrder", "You must either be in BitNode-8 or you must have Source-File 8 Level 3.");
const l = Te(e, "placeOrder");
let c, u;
const m = o.toLowerCase();
if (m.includes("limit") && m.includes("buy")) c = ee.a.LimitBuy;
else if (m.includes("limit") && m.includes("sell")) c = ee.a.LimitSell;
else if (m.includes("stop") && m.includes("buy")) c = ee.a.StopBuy;
else {
if (!m.includes("stop") || !m.includes("sell")) throw Re("placeOrder", "Invalid order type: " + o);
c = ee.a.StopSell;
}
const h = s.toLowerCase();
if (h.includes("l")) u = te.a.Long;
else {
if (!h.includes("s")) throw Re("placeOrder", "Invalid position type: " + s);
u = te.a.Short;
}
return Object(Q.j)(l, n, r, c, u, t);
},
cancelOrder: function (e, n, r, o, s) {
if ((a("cancelOrder", Object(i.c)("cancelOrder")), Oe("cancelOrder"), 8 !== D.a.bitNodeN && V.a[8] <= 2))
throw Re("cancelOrder", "You must either be in BitNode-8 or you must have Source-File 8 Level 3.");
const l = Te(e, "cancelOrder");
if (isNaN(n) || isNaN(r))
throw Re("cancelOrder", `Invalid shares or price. Must be numeric. shares=${n}, price=${r}`);
let c, u;
const m = o.toLowerCase();
if (m.includes("limit") && m.includes("buy")) c = ee.a.LimitBuy;
else if (m.includes("limit") && m.includes("sell")) c = ee.a.LimitSell;
else if (m.includes("stop") && m.includes("buy")) c = ee.a.StopBuy;
else {
if (!m.includes("stop") || !m.includes("sell")) throw Re("cancelOrder", "Invalid order type: " + o);
c = ee.a.StopSell;
}
const h = s.toLowerCase();
if (h.includes("l")) u = te.a.Long;
else {
if (!h.includes("s")) throw Re("cancelOrder", "Invalid position type: " + s);
u = te.a.Short;
}
const d = { stock: l, shares: n, price: r, type: c, pos: u };
return Object(Q.c)(d, t);
},
getOrders: function () {
if ((a("getOrders", Object(i.c)("getOrders")), Oe("getOrders"), 8 !== D.a.bitNodeN && V.a[8] <= 2))
throw Re("getOrders", "You must either be in BitNode-8 or have Source-File 8 Level 3.");
const e = {},
t = Q.a.Orders;
for (const a in t) {
const n = t[a];
if (n.constructor === Array && n.length > 0) {
e[a] = [];
for (let t = 0; t < n.length; ++t)
e[a].push({ shares: n[t].shares, price: n[t].price, type: n[t].type, position: n[t].pos });
}
}
return e;
},
getStockVolatility: function (e) {
if ((a("getStockVolatility", Object(i.c)("getStockVolatility")), !D.a.has4SDataTixApi))
throw Re("getStockVolatility", "You don't have 4S Market Data TIX API Access!");
return Te(e, "getStockVolatility").mv / 100;
},
getStockForecast: function (e) {
if ((a("getStockForecast", Object(i.c)("getStockForecast")), !D.a.has4SDataTixApi))
throw Re("getStockForecast", "You don't have 4S Market Data TIX API Access!");
const t = Te(e, "getStockForecast");
let n = 50;
return t.b ? (n += t.otlkMag) : (n -= t.otlkMag), n / 100;
},
purchase4SMarketData: function () {
return (
a("purchase4SMarketData", Object(i.c)("purchase4SMarketData")),
Oe("purchase4SMarketData"),
D.a.has4SData
? (t.log("purchase4SMarketData", "Already purchased 4S Market Data."), !0)
: D.a.money.lt(Object(ne.a)())
? (t.log("purchase4SMarketData", "Not enough money to purchase 4S Market Data."), !1)
: ((D.a.has4SData = !0),
D.a.loseMoney(Object(ne.a)()),
t.log("purchase4SMarketData", "Purchased 4S Market Data"),
!0)
);
},
purchase4SMarketDataTixApi: function () {
return (
a("purchase4SMarketDataTixApi", Object(i.c)("purchase4SMarketDataTixApi")),
Oe("purchase4SMarketDataTixApi"),
D.a.has4SDataTixApi
? (t.log("purchase4SMarketDataTixApi", "Already purchased 4S Market Data TIX API"), !0)
: D.a.money.lt(Object(ne.b)())
? (t.log("purchase4SMarketDataTixApi", "Not enough money to purchase 4S Market Data TIX API"), !1)
: ((D.a.has4SDataTixApi = !0),
D.a.loseMoney(Object(ne.b)()),
t.log("purchase4SMarketDataTixApi", "Purchased 4S Market Data TIX API"),
!0)
);
},
getPurchasedServerLimit: function () {
return a("getPurchasedServerLimit", Object(i.c)("getPurchasedServerLimit")), Object(z.b)();
},
getPurchasedServerMaxRam: function () {
return a("getPurchasedServerMaxRam", Object(i.c)("getPurchasedServerMaxRam")), Object(z.c)();
},
getPurchasedServerCost: function (e) {
a("getPurchasedServerCost", Object(i.c)("getPurchasedServerCost"));
const n = Object(z.a)(e);
return n === 1 / 0 ? (t.log("getPurchasedServerCost", `Invalid argument: ram='${e}'`), 1 / 0) : n;
},
purchaseServer: function (e, n) {
a("purchaseServer", Object(i.c)("purchaseServer"));
let r = String(e);
if (((r = r.replace(/\s+/g, "")), "" == r))
return t.log("purchaseServer", `Invalid argument: hostname='${r}'`), "";
if (D.a.purchasedServers.length >= Object(z.b)())
return (
t.log(
"purchaseServer",
`You have reached the maximum limit of ${Object(z.b)()} servers. You cannot purchase any more.`,
),
""
);
const o = Object(z.a)(n);
if (o === 1 / 0) return t.log("purchaseServer", `Invalid argument: ram='${n}'`), "";
if (D.a.money.lt(o))
return t.log("purchaseServer", "Not enough money to purchase server. Need " + he.a.formatMoney(o)), "";
const s = Object($.f)({
ip: Object(q.e)(),
hostname: r,
organizationName: "",
isConnectedTo: !1,
adminRights: !0,
purchasedByPlayer: !0,
maxRam: n,
});
Object(q.a)(s), D.a.purchasedServers.push(s.hostname);
const l = D.a.getHomeComputer();
return (
l.serversOnNetwork.push(s.hostname),
s.serversOnNetwork.push(l.hostname),
D.a.loseMoney(o),
t.log(
"purchaseServer",
`Purchased new server with hostname '${s.hostname}' for ${he.a.formatMoney(o)}`,
),
s.hostname
);
},
deleteServer: function (e) {
a("deleteServer", Object(i.c)("deleteServer"));
let n = String(e);
n = n.replace(/\s\s+/g, "");
const r = Object(q.d)(n);
if (!(r instanceof Y.a)) return t.log("deleteServer", `Invalid argument: hostname='${n}'`), !1;
if (null == r) return t.log("deleteServer", `Invalid argument: hostname='${n}'`), !1;
if (!r.purchasedByPlayer || "home" === r.hostname)
return t.log("deleteServer", "Cannot delete non-purchased server."), !1;
const o = r.hostname;
if (r.isConnectedTo)
return t.log("deleteServer", "You are currently connected to the server you are trying to delete."), !1;
if (o === t.hostname)
return t.log("deleteServer", "Cannot delete the server this script is running on."), !1;
if (r.runningScripts.length > 0)
return (
t.log("deleteServer", `Cannot delete server '${r.hostname}' because it still has scripts running.`),
!1
);
let s = !1;
for (let e = 0; e < D.a.purchasedServers.length; ++e)
if (o == D.a.purchasedServers[e]) {
(s = !0), D.a.purchasedServers.splice(e, 1);
break;
}
if (!s)
return (
t.log(
"deleteServer",
`Could not identify server ${r.hostname} as a purchased server. This is a bug. Report to dev.`,
),
!1
);
Object(q.b)(o), (s = !1);
const l = D.a.getHomeComputer();
for (let e = 0; e < l.serversOnNetwork.length; ++e)
if (o == l.serversOnNetwork[e])
return l.serversOnNetwork.splice(e, 1), t.log("deleteServer", "Deleted server '" + n), !0;
return (
t.log(
"deleteServer",
`Could not find server ${r.hostname} as a purchased server. This is a bug. Report to dev.`,
),
!1
);
},
getPurchasedServers: function (e = !0) {
a("getPurchasedServers", Object(i.c)("getPurchasedServers"));
const t = [];
return (
D.a.purchasedServers.forEach(function (a) {
if (e) {
const e = Object(q.d)(a);
if (null == e)
throw Re("getPurchasedServers", "Could not find server. This is a bug. Report to dev.");
t.push(e.hostname);
} else t.push(a);
}),
t
);
},
write: function (e, n = "", r = "a") {
if ((a("write", Object(i.c)("write")), isNaN(e))) {
if (Object(ye.a)(e)) {
let a = e;
if (!Object(re.g)(a)) throw Re("write", "Invalid filepath: " + a);
0 === a.lastIndexOf("/") && (a = Object(re.h)(a));
try {
n = String(n);
} catch (e) {
throw Re("write", `Invalid data (${e}). Data being written must be convertible to a string`);
}
const i = t.getServer();
if (null == i) throw Re("write", "Error getting Server. This is a bug. Report to dev.");
if (Object(H.a)(a)) {
let e = t.getScriptOnServer(a, i);
return null == e
? ((e = new L.a(a, n, i.hostname, i.scripts)), i.scripts.push(e), e.updateRamUsage(i.scripts))
: ("w" === r ? (e.code = n) : (e.code += n), e.updateRamUsage(i.scripts));
}
{
const e = Object(ie.c)(a, i);
if (null == e) return Object(ie.b)(a, n, i), Promise.resolve();
"w" === r ? e.write(n) : e.append(n);
}
return Promise.resolve();
}
throw Re("write", "Invalid argument: " + e);
}
{
if ((e = Math.round(e)) < 1 || e > b.a.NumNetscriptPorts)
throw Re(
"write",
`Trying to write to invalid port: ${e}. Only ports 1-${b.a.NumNetscriptPorts} are valid.`,
);
const t = oe.a[e - 1];
if (null == t || !(t instanceof Object))
throw Re("write", `Could not find port: ${e}. This is a bug. Report to dev.`);
return t.write(n);
}
},
tryWrite: function (e, t = "") {
if ((a("tryWrite", Object(i.c)("tryWrite")), isNaN(e))) throw Re("tryWrite", "Invalid argument: " + e);
{
if ((e = Math.round(e)) < 1 || e > b.a.NumNetscriptPorts)
throw Re("tryWrite", `Invalid port: ${e}. Only ports 1-${b.a.NumNetscriptPorts} are valid.`);
const a = oe.a[e - 1];
if (null == a || !(a instanceof Object))
throw Re("tryWrite", `Could not find port: ${e}. This is a bug. Report to dev.`);
return a.tryWrite(t);
}
},
read: function (e) {
if ((a("read", Object(i.c)("read")), isNaN(e))) {
if (Object(ye.a)(e)) {
const a = e,
n = Object(q.d)(t.hostname);
if (null == n) throw Re("read", "Error getting Server. This is a bug. Report to dev.");
if (Object(H.a)(a)) {
const e = t.getScriptOnServer(a, n);
return null == e ? "" : e.code;
}
{
const e = Object(ie.c)(a, n);
return null !== e ? e.text : "";
}
}
throw Re("read", "Invalid argument: " + e);
}
{
if ((e = Math.round(e)) < 1 || e > b.a.NumNetscriptPorts)
throw Re("read", `Invalid port: ${e}. Only ports 1-${b.a.NumNetscriptPorts} are valid.`);
const t = oe.a[e - 1];
if (null == t || !(t instanceof Object))
throw Re("read", `Could not find port: ${e}. This is a bug. Report to dev.`);
const a = t.read();
return console.log(a), a;
}
},
peek: function (e) {
if ((a("peek", Object(i.c)("peek")), isNaN(e)))
throw Re(
"peek",
`Invalid argument. Must be a port number between 1 and ${b.a.NumNetscriptPorts}, is ${e}`,
);
if ((e = Math.round(e)) < 1 || e > b.a.NumNetscriptPorts)
throw Re(
"peek",
`Invalid argument. Must be a port number between 1 and ${b.a.NumNetscriptPorts}, is ${e}`,
);
const t = oe.a[e - 1];
if (null == t || !(t instanceof Object))
throw Re("peek", `Could not find port: ${e}. This is a bug. Report to dev.`);
const n = t.peek();
return console.log(n), n;
},
clear: function (e) {
if ((a("clear", Object(i.c)("clear")), !isNaN(e))) {
if ((e = Math.round(e)) < 1 || e > b.a.NumNetscriptPorts)
throw Re(
"clear",
`Trying to clear invalid port: ${e}. Only ports 1-${b.a.NumNetscriptPorts} are valid`,
);
const t = oe.a[e - 1];
if (null == t || !(t instanceof Object))
throw Re("clear", `Could not find port: ${e}. This is a bug. Report to dev.`);
return t.clear();
}
if (!Object(ye.a)(e)) throw Re("clear", "Invalid argument: " + e);
{
const a = e,
n = Object(q.d)(t.hostname);
if (null == n) throw Re("clear", "Error getting Server. This is a bug. Report to dev.");
const r = Object(ie.c)(a, n);
null != r && r.write("");
}
return 0;
},
getPortHandle: function (e) {
if ((a("getPortHandle", Object(i.c)("getPortHandle")), isNaN(e)))
throw Re(
"getPortHandle",
`Invalid port: ${e} Must be an integer between 1 and ${b.a.NumNetscriptPorts}.`,
);
if ((e = Math.round(e)) < 1 || e > b.a.NumNetscriptPorts)
throw Re("getPortHandle", `Invalid port: ${e}. Only ports 1-${b.a.NumNetscriptPorts} are valid.`);
const t = oe.a[e - 1];
if (null == t || !(t instanceof Object))
throw Re("getPortHandle", `Could not find port: ${e}. This is a bug. Report to dev.`);
return t;
},
rm: function (e, n) {
a("rm", Object(i.c)("rm")), (null != n && "" !== n) || (n = t.hostname);
const r = ue(n, "rm").removeFile(e);
return r.res || t.log("rm", r.msg + ""), r.res;
},
scriptRunning: function (e, t) {
a("scriptRunning", Object(i.c)("scriptRunning"));
const n = Object(q.d)(t);
if (null == n) throw Re("scriptRunning", "Invalid IP/hostname: " + t);
for (let t = 0; t < n.runningScripts.length; ++t) if (n.runningScripts[t].filename == e) return !0;
return !1;
},
scriptKill: function (e, t) {
a("scriptKill", Object(i.c)("scriptKill"));
const n = Object(q.d)(t);
if (null == n) throw Re("scriptKill", "Invalid IP/hostname: " + t);
let r = !1;
for (let t = 0; t < n.runningScripts.length; ++t)
n.runningScripts[t].filename == e && (Object(se.a)(n.runningScripts[t], n.hostname), (r = !0));
return r;
},
getScriptName: function () {
return t.name;
},
getScriptRam: function (e, n = t.hostname) {
a("getScriptRam", Object(i.c)("getScriptRam"));
const r = Object(q.d)(n);
if (null == r) throw Re("getScriptRam", "Invalid IP/hostname: " + n);
for (let t = 0; t < r.scripts.length; ++t) if (r.scripts[t].filename == e) return r.scripts[t].ramUsage;
return 0;
},
getRunningScript: function (e, n, ...r) {
let o;
if ((a("getRunningScript", Object(i.c)("getRunningScript")), 0 === r.length)) o = t.scriptRef;
else if ("number" == typeof e) o = Se(e, "getRunningScript");
else {
const t = [];
for (let e = 2; e < r.length; ++e) t.push(r[e]);
o = _e(e, n, "getRunningScript", t);
}
return null === o
? null
: {
args: o.args.slice(),
filename: o.filename,
logs: o.logs.slice(),
offlineExpGained: o.offlineExpGained,
offlineMoneyMade: o.offlineMoneyMade,
offlineRunningTime: o.offlineRunningTime,
onlineExpGained: o.onlineExpGained,
onlineMoneyMade: o.onlineMoneyMade,
onlineRunningTime: o.onlineRunningTime,
pid: o.pid,
ramUsage: o.ramUsage,
server: o.server,
threads: o.threads,
};
},
getHackTime: function (e) {
a("getHackTime", Object(i.c)("getHackTime"));
const n = ue(e, "getHackTime");
return n instanceof Y.a
? Me(n, "getHackTime")
? 1 / 0
: Object(w.d)(n, D.a)
: (t.log("getHackTime", "invalid for this kind of server"), 1 / 0);
},
getGrowTime: function (e) {
a("getGrowTime", Object(i.c)("getGrowTime"));
const n = ue(e, "getGrowTime");
return n instanceof Y.a
? Me(n, "getGrowTime")
? 1 / 0
: Object(w.a)(n, D.a)
: (t.log("getGrowTime", "invalid for this kind of server"), 1 / 0);
},
getWeakenTime: function (e) {
a("getWeakenTime", Object(i.c)("getWeakenTime"));
const n = ue(e, "getWeakenTime");
return n instanceof Y.a
? Me(n, "getWeakenTime")
? 1 / 0
: Object(w.f)(n, D.a)
: (t.log("getWeakenTime", "invalid for this kind of server"), 1 / 0);
},
getScriptIncome: function (e, n, ...r) {
if ((a("getScriptIncome", Object(i.c)("getScriptIncome")), 0 === arguments.length)) {
const e = [];
let t = 0;
for (const e of le.a.values()) t += e.scriptRef.onlineMoneyMade / e.scriptRef.onlineRunningTime;
return e.push(t), e.push(D.a.scriptProdSinceLastAug / (D.a.playtimeSinceLastAug / 1e3)), e;
}
{
const a = Object(q.d)(n);
if (null == a) throw Re("getScriptIncome", "Invalid IP/hostnamed: " + n);
const i = Object(W.a)(e, r, a);
return null == i
? (t.log("getScriptIncome", `No such script '${e}' on '${a.hostname}' with args: ${Object(ge.a)(r)}`),
-1)
: i.onlineMoneyMade / i.onlineRunningTime;
}
},
getScriptExpGain: function (e, n, ...r) {
if ((a("getScriptExpGain", Object(i.c)("getScriptExpGain")), 0 === arguments.length)) {
let e = 0;
for (const t of le.a.values()) e += t.scriptRef.onlineExpGained / t.scriptRef.onlineRunningTime;
return e;
}
{
const a = Object(q.d)(n);
if (null == a) throw Re("getScriptExpGain", "Invalid IP/hostnamed: " + n);
const i = Object(W.a)(e, r, a);
return null == i
? (t.log(
"getScriptExpGain",
`No such script '${e}' on '${a.hostname}' with args: ${Object(ge.a)(r)}`,
),
-1)
: i.onlineExpGained / i.onlineRunningTime;
}
},
nFormat: function (e, t) {
return isNaN(e) || isNaN(parseFloat(e)) || "string" != typeof t ? "" : he.a.format(parseFloat(e), t);
},
tFormat: function (e, t = !1) {
return Object(pe.b)(e, t);
},
getTimeSinceLastAug: function () {
return a("getTimeSinceLastAug", Object(i.c)("getTimeSinceLastAug")), D.a.playtimeSinceLastAug;
},
prompt: function (e) {
return (
Object(ye.a)(e) || (e = JSON.stringify(e)),
new Promise(function (t) {
U.a.emit({ txt: e, resolve: t });
})
);
},
wget: async function (a, n, r = t.hostname) {
if (!Object(H.a)(n) && !n.endsWith(".txt"))
return (
t.log("wget", `Invalid target file: '${n}'. Must be a script or text file.`), Promise.resolve(!1)
);
const i = ue(r, "wget");
return new Promise(function (o) {
e.get(
a,
function (e) {
let a;
return (
(a = Object(H.a)(n) ? i.writeToScriptFile(n, e) : i.writeToTextFile(n, e)),
a.success
? a.overwritten
? (t.log("wget", `Successfully retrieved content and overwrote '${n}' on '${r}'`), o(!0))
: (t.log("wget", `Successfully retrieved content to new file '${n}' on '${r}'`), o(!0))
: (t.log("wget", "Failed."), o(!1))
);
},
"text",
).fail(function (e) {
return t.log("wget", JSON.stringify(e)), o(!1);
});
});
},
getFavorToDonate: function () {
return (
a("getFavorToDonate", Object(i.c)("getFavorToDonate")),
Math.floor(b.a.BaseFavorToDonate * m.a.RepToDonateToFaction)
);
},
universityCourse: function (e, n) {
if ((a("universityCourse", Object(i.c)("universityCourse")), Ae("universityCourse", 1), D.a.isWorking)) {
const e = D.a.singularityStopWork();
t.log("universityCourse", e);
}
let r, o, s;
switch (e.toLowerCase()) {
case I.a.AevumSummitUniversity.toLowerCase():
if (D.a.city != N.a.Aevum)
return (
t.log(
"universityCourse",
"You cannot study at 'Summit University' because you are not in 'Aevum'.",
),
!1
);
D.a.gotoLocation(I.a.AevumSummitUniversity), (r = 4), (o = 3);
break;
case I.a.Sector12RothmanUniversity.toLowerCase():
if (D.a.city != N.a.Sector12)
return (
t.log(
"universityCourse",
"You cannot study at 'Rothman University' because you are not in 'Sector-12'.",
),
!1
);
(D.a.location = I.a.Sector12RothmanUniversity), (r = 3), (o = 2);
break;
case I.a.VolhavenZBInstituteOfTechnology.toLowerCase():
if (D.a.city != N.a.Volhaven)
return (
t.log(
"universityCourse",
"You cannot study at 'ZB Institute of Technology' because you are not in 'Volhaven'.",
),
!1
);
(D.a.location = I.a.VolhavenZBInstituteOfTechnology), (r = 5), (o = 4);
break;
default:
return t.log("universityCourse", `Invalid university name: '${e}'.`), !1;
}
switch (n.toLowerCase()) {
case "Study Computer Science".toLowerCase():
s = b.a.ClassStudyComputerScience;
break;
case "Data Structures".toLowerCase():
s = b.a.ClassDataStructures;
break;
case "Networks".toLowerCase():
s = b.a.ClassNetworks;
break;
case "Algorithms".toLowerCase():
s = b.a.ClassAlgorithms;
break;
case "Management".toLowerCase():
s = b.a.ClassManagement;
break;
case "Leadership".toLowerCase():
s = b.a.ClassLeadership;
break;
default:
return t.log("universityCourse", `Invalid class name: ${n}.`), !1;
}
return D.a.startClass(me.b, r, o, s), t.log("universityCourse", `Started ${s} at ${e}`), !0;
},
gymWorkout: function (e, n) {
if ((a("gymWorkout", Object(i.c)("gymWorkout")), Ae("gymWorkout", 1), D.a.isWorking)) {
const e = D.a.singularityStopWork();
t.log("gymWorkout", e);
}
let r, o;
switch (e.toLowerCase()) {
case I.a.AevumCrushFitnessGym.toLowerCase():
if (D.a.city != N.a.Aevum)
return (
t.log("gymWorkout", "You cannot workout at 'Crush Fitness' because you are not in 'Aevum'."), !1
);
(D.a.location = I.a.AevumCrushFitnessGym), (r = 3), (o = 2);
break;
case I.a.AevumSnapFitnessGym.toLowerCase():
if (D.a.city != N.a.Aevum)
return (
t.log("gymWorkout", "You cannot workout at 'Snap Fitness' because you are not in 'Aevum'."), !1
);
(D.a.location = I.a.AevumSnapFitnessGym), (r = 10), (o = 5);
break;
case I.a.Sector12IronGym.toLowerCase():
if (D.a.city != N.a.Sector12)
return (
t.log("gymWorkout", "You cannot workout at 'Iron Gym' because you are not in 'Sector-12'."), !1
);
(D.a.location = I.a.Sector12IronGym), (r = 1), (o = 1);
break;
case I.a.Sector12PowerhouseGym.toLowerCase():
if (D.a.city != N.a.Sector12)
return (
t.log("gymWorkout", "You cannot workout at 'Powerhouse Gym' because you are not in 'Sector-12'."),
!1
);
(D.a.location = I.a.Sector12PowerhouseGym), (r = 20), (o = 10);
break;
case I.a.VolhavenMilleniumFitnessGym.toLowerCase():
if (D.a.city != N.a.Volhaven)
return (
t.log(
"gymWorkout",
"You cannot workout at 'Millenium Fitness Gym' because you are not in 'Volhaven'.",
),
!1
);
(D.a.location = I.a.VolhavenMilleniumFitnessGym), (r = 7), (o = 4);
break;
default:
return t.log("gymWorkout", `Invalid gym name: ${e}. gymWorkout() failed`), !1;
}
switch (n.toLowerCase()) {
case "strength".toLowerCase():
case "str".toLowerCase():
D.a.startClass(me.b, r, o, b.a.ClassGymStrength);
break;
case "defense".toLowerCase():
case "def".toLowerCase():
D.a.startClass(me.b, r, o, b.a.ClassGymDefense);
break;
case "dexterity".toLowerCase():
case "dex".toLowerCase():
D.a.startClass(me.b, r, o, b.a.ClassGymDexterity);
break;
case "agility".toLowerCase():
case "agi".toLowerCase():
D.a.startClass(me.b, r, o, b.a.ClassGymAgility);
break;
default:
return t.log("gymWorkout", `Invalid stat: ${n}.`), !1;
}
return t.log("gymWorkout", `Started training ${n} at ${e}`), !0;
},
travelToCity: function (e) {
switch ((a("travelToCity", Object(i.c)("travelToCity")), Ae("travelToCity", 1), e)) {
case N.a.Aevum:
case N.a.Chongqing:
case N.a.Sector12:
case N.a.NewTokyo:
case N.a.Ishima:
case N.a.Volhaven:
if (D.a.money.lt(b.a.TravelCost)) throw Re("travelToCity", "Not enough money to travel.");
return D.a.loseMoney(b.a.TravelCost), (D.a.city = e), t.log("travelToCity", "Traveled to " + e), !0;
default:
return t.log("travelToCity", `Invalid city name: '${e}'.`), !1;
}
},
purchaseTor: function () {
if ((a("purchaseTor", Object(i.c)("purchaseTor")), Ae("purchaseTor", 1), D.a.hasTorRouter()))
return t.log("purchaseTor", "You already have a TOR router!"), !1;
if (D.a.money.lt(b.a.TorRouterCost))
return t.log("purchaseTor", "You cannot afford to purchase a Tor router."), !1;
D.a.loseMoney(b.a.TorRouterCost);
const e = Object($.f)({
ip: Object(q.e)(),
hostname: "darkweb",
organizationName: "",
isConnectedTo: !1,
adminRights: !1,
purchasedByPlayer: !1,
maxRam: 1,
});
return (
Object(q.a)(e),
D.a.getHomeComputer().serversOnNetwork.push(e.hostname),
e.serversOnNetwork.push(D.a.getHomeComputer().hostname),
D.a.gainIntelligenceExp(b.a.IntelligenceSingFnBaseExpGain),
t.log("purchaseTor", "You have purchased a Tor router!"),
!0
);
},
purchaseProgram: function (e) {
if ((a("purchaseProgram", Object(i.c)("purchaseProgram")), Ae("purchaseProgram", 1), !D.a.hasTorRouter()))
return t.log("purchaseProgram", "You do not have the TOR router."), !1;
e = e.toLowerCase();
let n = null;
for (const t in E.a) {
const a = E.a[t];
a.program.toLowerCase() == e && (n = a);
}
return null == n
? (t.log("purchaseProgram", `Invalid program name: '${e}.`), !1)
: D.a.money.lt(n.price)
? (t.log(
"purchaseProgram",
`Not enough money to purchase '${n.program}'. Need ${he.a.formatMoney(n.price)}`,
),
!1)
: D.a.hasProgram(n.program)
? (t.log("purchaseProgram", `You already have the '${n.program}' program`), !0)
: (D.a.loseMoney(n.price),
D.a.getHomeComputer().programs.push(n.program),
t.log(
"purchaseProgram",
`You have purchased the '${n.program}' program. The new program can be found on your home computer.`,
),
!0);
},
getCurrentServer: function () {
return (
a("getCurrentServer", Object(i.c)("getCurrentServer")),
Ae("getCurrentServer", 1),
D.a.getCurrentServer().hostname
);
},
connect: function (e) {
if ((a("connect", Object(i.c)("connect")), Ae("connect", 1), !e))
throw Re("connect", `Invalid hostname: '${e}'`);
const t = Object(q.d)(e);
if (null == t) throw Re("connect", `Invalid hostname: '${e}'`);
if ("home" === e)
return (
(D.a.getCurrentServer().isConnectedTo = !1),
(D.a.currentServer = D.a.getHomeComputer().hostname),
(D.a.getCurrentServer().isConnectedTo = !0),
F.a.setcwd("/"),
!0
);
const n = D.a.getCurrentServer();
for (let a = 0; a < n.serversOnNetwork.length; a++) {
const r = Object($.a)(n, a);
if (null !== r && r.hostname == e)
return (
(D.a.getCurrentServer().isConnectedTo = !1),
(D.a.currentServer = t.hostname),
(D.a.getCurrentServer().isConnectedTo = !0),
F.a.setcwd("/"),
!0
);
}
return !1;
},
manualHack: function () {
a("manualHack", Object(i.c)("manualHack")), Ae("manualHack", 1);
const e = D.a.getCurrentServer();
return ze(e.hostname, !0);
},
installBackdoor: function () {
a("installBackdoor", Object(i.c)("installBackdoor")), Ae("installBackdoor", 1);
const e = D.a.getCurrentServer();
if (!(e instanceof Y.a))
return t.log("installBackdoor", "cannot backdoor this kind of server"), Promise.resolve();
const n = e,
r = (Object(w.d)(n, D.a) / 4) * 1e3,
o = Object(T.b)(n, D.a);
if (!o.res) throw Re("installBackdoor", o.msg || "");
return (
t.log("installBackdoor", `Installing backdoor on '${n.hostname}' in ${Object(pe.b)(r, !0)}`),
Object(ce.c)(r, t).then(function () {
return t.env.stopFlag
? Promise.reject(t)
: (t.log("installBackdoor", `Successfully installed backdoor on '${n.hostname}'`),
(n.backdoorInstalled = !0),
Promise.resolve());
})
);
},
getStats: function () {
return (
a("getStats", Object(i.c)("getStats")),
Ae("getStats", 1),
t.log("getStats", "getStats is deprecated, please use getPlayer"),
{
hacking: D.a.hacking_skill,
strength: D.a.strength,
defense: D.a.defense,
dexterity: D.a.dexterity,
agility: D.a.agility,
charisma: D.a.charisma,
intelligence: D.a.intelligence,
}
);
},
getCharacterInformation: function () {
return (
a("getCharacterInformation", Object(i.c)("getCharacterInformation")),
Ae("getCharacterInformation", 1),
t.log("getCharacterInformation", "getCharacterInformation is deprecated, please use getPlayer"),
{
bitnode: D.a.bitNodeN,
city: D.a.city,
factions: D.a.factions.slice(),
hp: D.a.hp,
jobs: Object.keys(D.a.jobs),
jobTitles: Object.values(D.a.jobs),
maxHp: D.a.max_hp,
mult: {
agility: D.a.agility_mult,
agilityExp: D.a.agility_exp_mult,
companyRep: D.a.company_rep_mult,
crimeMoney: D.a.crime_money_mult,
crimeSuccess: D.a.crime_success_mult,
defense: D.a.defense_mult,
defenseExp: D.a.defense_exp_mult,
dexterity: D.a.dexterity_mult,
dexterityExp: D.a.dexterity_exp_mult,
factionRep: D.a.faction_rep_mult,
hacking: D.a.hacking_mult,
hackingExp: D.a.hacking_exp_mult,
strength: D.a.strength_mult,
strengthExp: D.a.strength_exp_mult,
workMoney: D.a.work_money_mult,
},
timeWorked: D.a.timeWorked,
tor: D.a.hasTorRouter(),
workHackExpGain: D.a.workHackExpGained,
workStrExpGain: D.a.workStrExpGained,
workDefExpGain: D.a.workDefExpGained,
workDexExpGain: D.a.workDexExpGained,
workAgiExpGain: D.a.workAgiExpGained,
workChaExpGain: D.a.workChaExpGained,
workRepGain: D.a.workRepGained,
workMoneyGain: D.a.workMoneyGained,
hackingExp: D.a.hacking_exp,
strengthExp: D.a.strength_exp,
defenseExp: D.a.defense_exp,
dexterityExp: D.a.dexterity_exp,
agilityExp: D.a.agility_exp,
charismaExp: D.a.charisma_exp,
}
);
},
getPlayer: function () {
a("getPlayer", Object(i.c)("getPlayer"));
const e = {
hacking_skill: D.a.hacking_skill,
hp: D.a.hp,
max_hp: D.a.max_hp,
strength: D.a.strength,
defense: D.a.defense,
dexterity: D.a.dexterity,
agility: D.a.agility,
charisma: D.a.charisma,
intelligence: D.a.intelligence,
hacking_chance_mult: D.a.hacking_chance_mult,
hacking_speed_mult: D.a.hacking_speed_mult,
hacking_money_mult: D.a.hacking_money_mult,
hacking_grow_mult: D.a.hacking_grow_mult,
hacking_exp: D.a.hacking_exp,
strength_exp: D.a.strength_exp,
defense_exp: D.a.defense_exp,
dexterity_exp: D.a.dexterity_exp,
agility_exp: D.a.agility_exp,
charisma_exp: D.a.charisma_exp,
hacking_mult: D.a.hacking_mult,
strength_mult: D.a.strength_mult,
defense_mult: D.a.defense_mult,
dexterity_mult: D.a.dexterity_mult,
agility_mult: D.a.agility_mult,
charisma_mult: D.a.charisma_mult,
hacking_exp_mult: D.a.hacking_exp_mult,
strength_exp_mult: D.a.strength_exp_mult,
defense_exp_mult: D.a.defense_exp_mult,
dexterity_exp_mult: D.a.dexterity_exp_mult,
agility_exp_mult: D.a.agility_exp_mult,
charisma_exp_mult: D.a.charisma_exp_mult,
company_rep_mult: D.a.company_rep_mult,
faction_rep_mult: D.a.faction_rep_mult,
numPeopleKilled: D.a.numPeopleKilled,
money: D.a.money.toNumber(),
city: D.a.city,
location: D.a.location,
companyName: D.a.companyName,
crime_money_mult: D.a.crime_money_mult,
crime_success_mult: D.a.crime_success_mult,
isWorking: D.a.isWorking,
workType: D.a.workType,
currentWorkFactionName: D.a.currentWorkFactionName,
currentWorkFactionDescription: D.a.currentWorkFactionDescription,
workHackExpGainRate: D.a.workHackExpGainRate,
workStrExpGainRate: D.a.workStrExpGainRate,
workDefExpGainRate: D.a.workDefExpGainRate,
workDexExpGainRate: D.a.workDexExpGainRate,
workAgiExpGainRate: D.a.workAgiExpGainRate,
workChaExpGainRate: D.a.workChaExpGainRate,
workRepGainRate: D.a.workRepGainRate,
workMoneyGainRate: D.a.workMoneyGainRate,
workMoneyLossRate: D.a.workMoneyLossRate,
workHackExpGained: D.a.workHackExpGained,
workStrExpGained: D.a.workStrExpGained,
workDefExpGained: D.a.workDefExpGained,
workDexExpGained: D.a.workDexExpGained,
workAgiExpGained: D.a.workAgiExpGained,
workChaExpGained: D.a.workChaExpGained,
workRepGained: D.a.workRepGained,
workMoneyGained: D.a.workMoneyGained,
createProgramName: D.a.createProgramName,
createProgramReqLvl: D.a.createProgramReqLvl,
className: D.a.className,
crimeType: D.a.crimeType,
work_money_mult: D.a.work_money_mult,
hacknet_node_money_mult: D.a.hacknet_node_money_mult,
hacknet_node_purchase_cost_mult: D.a.hacknet_node_purchase_cost_mult,
hacknet_node_ram_cost_mult: D.a.hacknet_node_ram_cost_mult,
hacknet_node_core_cost_mult: D.a.hacknet_node_core_cost_mult,
hacknet_node_level_cost_mult: D.a.hacknet_node_level_cost_mult,
hasWseAccount: D.a.hasWseAccount,
hasTixApiAccess: D.a.hasTixApiAccess,
has4SData: D.a.has4SData,
has4SDataTixApi: D.a.has4SDataTixApi,
bladeburner_max_stamina_mult: D.a.bladeburner_max_stamina_mult,
bladeburner_stamina_gain_mult: D.a.bladeburner_stamina_gain_mult,
bladeburner_analysis_mult: D.a.bladeburner_analysis_mult,
bladeburner_success_chance_mult: D.a.bladeburner_success_chance_mult,
bitNodeN: D.a.bitNodeN,
totalPlaytime: D.a.totalPlaytime,
playtimeSinceLastAug: D.a.playtimeSinceLastAug,
playtimeSinceLastBitnode: D.a.playtimeSinceLastBitnode,
jobs: {},
factions: D.a.factions.slice(),
tor: D.a.hasTorRouter(),
};
return Object.assign(e.jobs, D.a.jobs), e;
},
hospitalize: function () {
return a("hospitalize", Object(i.c)("hospitalize")), Ae("hospitalize", 1), D.a.hospitalize();
},
isBusy: function () {
return a("isBusy", Object(i.c)("isBusy")), Ae("isBusy", 1), D.a.isWorking;
},
stopAction: function () {
if ((a("stopAction", Object(i.c)("stopAction")), Ae("stopAction", 1), D.a.isWorking)) {
me.b.toTerminal();
const e = D.a.singularityStopWork();
return t.log("stopAction", e), !0;
}
return !1;
},
upgradeHomeRam: function () {
a("upgradeHomeRam", Object(i.c)("upgradeHomeRam")), Ae("upgradeHomeRam", 2);
const e = D.a.getHomeComputer();
if (e.maxRam >= b.a.HomeComputerMaxRam)
return t.log("upgradeHomeRam", "Your home computer is at max RAM."), !1;
const n = D.a.getUpgradeHomeRamCost();
return D.a.money.lt(n)
? (t.log("upgradeHomeRam", "You don't have enough money. Need " + he.a.formatMoney(n)), !1)
: ((e.maxRam *= 2),
D.a.loseMoney(n),
D.a.gainIntelligenceExp(b.a.IntelligenceSingFnBaseExpGain),
t.log(
"upgradeHomeRam",
`Purchased additional RAM for home computer! It now has ${e.maxRam}GB of RAM.`,
),
!0);
},
getUpgradeHomeRamCost: function () {
return (
a("getUpgradeHomeRamCost", Object(i.c)("getUpgradeHomeRamCost")),
Ae("getUpgradeHomeRamCost", 2),
D.a.getUpgradeHomeRamCost()
);
},
workForCompany: function (e) {
if (
(a("workForCompany", Object(i.c)("workForCompany")),
Ae("workForCompany", 2),
null == e && (e = D.a.companyName),
null == e || "" === e || !(f.a[e] instanceof p.a))
)
return t.log("workForCompany", `Invalid company: '${e}'`), !1;
if (!Object.keys(D.a.jobs).includes(e))
return t.log("workForCompany", `You do not have a job at '${e}'`), !1;
const n = D.a.jobs[e],
r = y.a[n];
if ("" === n || !(r instanceof g.a)) return t.log("workForCompany", "You do not have a job"), !1;
if (D.a.isWorking) {
const e = D.a.singularityStopWork();
t.log("workForCompany", e);
}
return (
r.isPartTimeJob() ? D.a.startWorkPartTime(me.b, e) : D.a.startWork(me.b, e),
t.log("workForCompany", `Began working at '${D.a.companyName}' as a '${n}'`),
!0
);
},
applyToCompany: function (e, n) {
let r;
switch (
(a("applyToCompany", Object(i.c)("applyToCompany")),
Ae("applyToCompany", 2),
Be("applyToCompany", e),
(D.a.location = e),
n.toLowerCase())
) {
case "software":
r = D.a.applyForSoftwareJob(!0);
break;
case "software consultant":
r = D.a.applyForSoftwareConsultantJob(!0);
break;
case "it":
r = D.a.applyForItJob(!0);
break;
case "security engineer":
r = D.a.applyForSecurityEngineerJob(!0);
break;
case "network engineer":
r = D.a.applyForNetworkEngineerJob(!0);
break;
case "business":
r = D.a.applyForBusinessJob(!0);
break;
case "business consultant":
r = D.a.applyForBusinessConsultantJob(!0);
break;
case "security":
r = D.a.applyForSecurityJob(!0);
break;
case "agent":
r = D.a.applyForAgentJob(!0);
break;
case "employee":
r = D.a.applyForEmployeeJob(!0);
break;
case "part-time employee":
r = D.a.applyForPartTimeEmployeeJob(!0);
break;
case "waiter":
r = D.a.applyForWaiterJob(!0);
break;
case "part-time waiter":
r = D.a.applyForPartTimeWaiterJob(!0);
break;
default:
return t.log("applyToCompany", `Invalid job: '${n}'.`), !1;
}
return (
r
? t.log("applyToCompany", `You were offered a new job at '${e}' as a '${D.a.jobs[e]}'`)
: t.log("applyToCompany", `You failed to get a new job/promotion at '${e}' in the '${n}' field.`),
r
);
},
getCompanyRep: function (e) {
a("getCompanyRep", Object(i.c)("getCompanyRep")), Ae("getCompanyRep", 2);
return Be("getCompanyRep", e).playerReputation;
},
getCompanyFavor: function (e) {
a("getCompanyFavor", Object(i.c)("getCompanyFavor")), Ae("getCompanyFavor", 2);
return Be("getCompanyFavor", e).favor;
},
getCompanyFavorGain: function (e) {
a("getCompanyFavorGain", Object(i.c)("getCompanyFavorGain")), Ae("getCompanyFavorGain", 2);
return Be("getCompanyFavorGain", e).getFavorGain()[0];
},
checkFactionInvitations: function () {
return (
a("checkFactionInvitations", Object(i.c)("checkFactionInvitations")),
Ae("checkFactionInvitations", 2),
D.a.factionInvitations.slice()
);
},
joinFaction: function (e) {
if (
(a("joinFaction", Object(i.c)("joinFaction")),
Ae("joinFaction", 2),
De("joinFaction", e),
!D.a.factionInvitations.includes(e))
)
return t.log("joinFaction", `You have not been invited by faction '${e}'`), !1;
const n = x.a[e];
Object(O.d)(n);
for (let t = 0; t < D.a.factionInvitations.length; ++t)
(D.a.factionInvitations[t] == e || x.a[D.a.factionInvitations[t]].isBanned) &&
(D.a.factionInvitations.splice(t, 1), t--);
return (
D.a.gainIntelligenceExp(b.a.IntelligenceSingFnBaseExpGain),
t.log("joinFaction", `Joined the '${e}' faction.`),
!0
);
},
workForFaction: function (e, n) {
if (
(a("workForFaction", Object(i.c)("workForFaction")),
Ae("workForFaction", 2),
De("workForFaction", e),
D.a.inGang() && void 0 !== S.a[e])
)
return void t.log("workForFaction", `Faction '${e}' does not offer work at the moment.`);
if (!D.a.factions.includes(e)) return t.log("workForFaction", `You are not a member of '${e}'`), !1;
if (D.a.isWorking) {
const e = D.a.singularityStopWork();
t.log("workForFaction", e);
}
const r = x.a[e],
o = [
"Illuminati",
"Daedalus",
"The Covenant",
"ECorp",
"MegaCorp",
"Bachman & Associates",
"Blade Industries",
"NWO",
"Clarke Incorporated",
"OmniTek Incorporated",
"Four Sigma",
"KuaiGong International",
"Fulcrum Secret Technologies",
"BitRunners",
"The Black Hand",
"NiteSec",
"Chongqing",
"Sector-12",
"New Tokyo",
"Aevum",
"Ishima",
"Volhaven",
"Speakers for the Dead",
"The Dark Army",
"The Syndicate",
"Silhouette",
"Netburners",
"Tian Di Hui",
"CyberSec",
],
s = [
"Illuminati",
"Daedalus",
"The Covenant",
"ECorp",
"MegaCorp",
"Bachman & Associates",
"Blade Industries",
"NWO",
"Clarke Incorporated",
"OmniTek Incorporated",
"Four Sigma",
"KuaiGong International",
"The Black Hand",
"Chongqing",
"Sector-12",
"New Tokyo",
"Aevum",
"Ishima",
"Volhaven",
"Speakers for the Dead",
"The Dark Army",
"The Syndicate",
"Silhouette",
"Tetrads",
"Slum Snakes",
],
l = [
"ECorp",
"MegaCorp",
"Bachman & Associates",
"Blade Industries",
"NWO",
"Clarke Incorporated",
"OmniTek Incorporated",
"Four Sigma",
"KuaiGong International",
"Fulcrum Secret Technologies",
"Chongqing",
"Sector-12",
"New Tokyo",
"Aevum",
"Ishima",
"Volhaven",
"Speakers for the Dead",
"The Syndicate",
"Tetrads",
"Slum Snakes",
"Tian Di Hui",
];
switch (n.toLowerCase()) {
case "hacking":
case "hacking contracts":
case "hackingcontracts":
return o.includes(r.name)
? (D.a.startFactionHackWork(me.b, r),
t.log("workForFaction", `Started carrying out hacking contracts for '${r.name}'`),
!0)
: (t.log("workForFaction", `Faction '${r.name}' do not need help with hacking contracts.`), !1);
case "field":
case "fieldwork":
case "field work":
return s.includes(r.name)
? (D.a.startFactionFieldWork(me.b, r),
t.log("workForFaction", `Started carrying out field missions for '${r.name}'`),
!0)
: (t.log("workForFaction", `Faction '${r.name}' do not need help with field missions.`), !1);
case "security":
case "securitywork":
case "security work":
return l.includes(r.name)
? (D.a.startFactionSecurityWork(me.b, r),
t.log("workForFaction", `Started carrying out security work for '${r.name}'`),
!0)
: (t.log("workForFaction", `Faction '${r.name}' do not need help with security work.`), !1);
default:
t.log("workForFaction", "Invalid work type: '" + n);
}
return !0;
},
getFactionRep: function (e) {
a("getFactionRep", Object(i.c)("getFactionRep")), Ae("getFactionRep", 2);
return De("getFactionRep", e).playerReputation;
},
getFactionFavor: function (e) {
a("getFactionFavor", Object(i.c)("getFactionFavor")), Ae("getFactionFavor", 2);
return De("getFactionFavor", e).favor;
},
getFactionFavorGain: function (e) {
a("getFactionFavorGain", Object(i.c)("getFactionFavorGain")), Ae("getFactionFavorGain", 2);
return De("getFactionFavorGain", e).getFavorGain()[0];
},
donateToFaction: function (e, n) {
a("donateToFaction", Object(i.c)("donateToFaction")), Ae("donateToFaction", 3);
const r = De("donateToFaction", e);
if ("number" != typeof n || n <= 0)
return t.log("donateToFaction", `Invalid donation amount: '${n}'.`), !1;
if (D.a.money.lt(n))
return (
t.log("donateToFaction", `You do not have enough money to donate ${he.a.formatMoney(n)} to '${e}'`),
!1
);
const o = Math.round(b.a.BaseFavorToDonate * m.a.RepToDonateToFaction);
if (r.favor < o)
return (
t.log(
"donateToFaction",
`You do not have enough favor to donate to this faction. Have ${r.favor}, need ${o}`,
),
!1
);
const s = (n / b.a.DonateMoneyToRepDivisor) * D.a.faction_rep_mult;
return (
(r.playerReputation += s),
D.a.loseMoney(n),
t.log(
"donateToFaction",
`${he.a.formatMoney(n)} donated to '${e}' for ${he.a.formatReputation(s)} reputation`,
),
!0
);
},
createProgram: function (e) {
if ((a("createProgram", Object(i.c)("createProgram")), Ae("createProgram", 3), D.a.isWorking)) {
const e = D.a.singularityStopWork();
t.log("createProgram", e);
}
e = e.toLowerCase();
let n = null;
for (const t in G.a) G.a[t].name.toLowerCase() == e && (n = G.a[t]);
if (null == n) return t.log("createProgram", "The specified program does not exist: '" + e), !1;
if (D.a.hasProgram(n.name)) return t.log("createProgram", `You already have the '${n.name}' program`), !1;
const r = n.create;
return null === r
? (t.log("createProgram", `You cannot create the '${n.name}' program`), !1)
: r.req(D.a)
? (D.a.startCreateProgramWork(me.b, n.name, r.time, r.level),
t.log("createProgram", `Began creating program: '${e}'`),
!0)
: (t.log("createProgram", `Hacking level is too low to create '${n.name}' (level ${r.level} req)`), !1);
},
commitCrime: function (e) {
if ((a("commitCrime", Object(i.c)("commitCrime")), Ae("commitCrime", 3), D.a.isWorking)) {
const e = D.a.singularityStopWork();
t.log("commitCrime", e);
}
D.a.gotoLocation(I.a.Slums);
const n = Object(h.b)(e.toLowerCase());
if (null == n) throw Re("commitCrime", `Invalid crime: '${e}'`);
return t.log("commitCrime", `Attempting to commit ${n.name}...`), n.commit(me.b, D.a, 1, t);
},
getCrimeChance: function (e) {
a("getCrimeChance", Object(i.c)("getCrimeChance")), Ae("getCrimeChance", 3);
const t = Object(h.b)(e.toLowerCase());
if (null == t) throw Re("getCrimeChance", "Invalid crime: " + e);
return t.successRate(D.a);
},
getCrimeStats: function (e) {
a("getCrimeStats", Object(i.c)("getCrimeStats")), Ae("getCrimeStats", 3);
const t = Object(h.b)(e.toLowerCase());
if (null == t) throw Re("getCrimeStats", "Invalid crime: " + e);
return Object.assign({}, t);
},
getOwnedAugmentations: function (e = !1) {
a("getOwnedAugmentations", Object(i.c)("getOwnedAugmentations")), Ae("getOwnedAugmentations", 3);
const t = [];
for (let e = 0; e < D.a.augmentations.length; ++e) t.push(D.a.augmentations[e].name);
if (e) for (let e = 0; e < D.a.queuedAugmentations.length; ++e) t.push(D.a.queuedAugmentations[e].name);
return t;
},
getOwnedSourceFiles: function () {
a("getOwnedSourceFiles", Object(i.c)("getOwnedSourceFiles")), Ae("getOwnedSourceFiles", 3);
const e = [];
for (let t = 0; t < D.a.sourceFiles.length; ++t)
e.push({ n: D.a.sourceFiles[t].n, lvl: D.a.sourceFiles[t].lvl });
return e;
},
getAugmentationsFromFaction: function (e) {
a("getAugmentationsFromFaction", Object(i.c)("getAugmentationsFromFaction")),
Ae("getAugmentationsFromFaction", 3);
const t = De("getAugmentationsFromFaction", e);
if (D.a.hasGangWith(e)) {
const e = [];
for (const t in s.a) {
s.a[t].isSpecial || e.push(t);
}
return e;
}
return t.augmentations.slice();
},
getAugmentationCost: function (e) {
a("getAugmentationCost", Object(i.c)("getAugmentationCost")), Ae("getAugmentationCost", 3);
const t = Ge("getAugmentationCost", e);
return [t.baseRepRequirement, t.baseCost];
},
getAugmentationPrereq: function (e) {
a("getAugmentationPrereq", Object(i.c)("getAugmentationPrereq")), Ae("getAugmentationPrereq", 3);
return Ge("getAugmentationPrereq", e).prereqs.slice();
},
getAugmentationPrice: function (e) {
a("getAugmentationPrice", Object(i.c)("getAugmentationPrice")), Ae("getAugmentationPrice", 3);
return Ge("getAugmentationPrice", e).baseCost;
},
getAugmentationRepReq: function (e) {
a("getAugmentationRepReq", Object(i.c)("getAugmentationRepReq")), Ae("getAugmentationRepReq", 3);
return Ge("getAugmentationRepReq", e).baseRepRequirement;
},
getAugmentationStats: function (e) {
a("getAugmentationStats", Object(i.c)("getAugmentationStats")), Ae("getAugmentationStats", 3);
const t = Ge("getAugmentationStats", e);
return Object.assign({}, t.mults);
},
purchaseAugmentation: function (e, n) {
a("purchaseAugmentation", Object(i.c)("purchaseAugmentation")), Ae("purchaseAugmentation", 3);
const r = De("purchaseAugmentation", e),
o = Ge("purchaseAugmentation", n);
let l = [];
if (D.a.hasGangWith(e))
for (const e in s.a) {
s.a[e].isSpecial || l.push(e);
}
else l = r.augmentations;
if (!l.includes(n))
return t.log("purchaseAugmentation", `Faction '${e}' does not have the '${n}' augmentation.`), !1;
if (!(o.name === u.a.NeuroFluxGovernor)) {
for (let e = 0; e < D.a.queuedAugmentations.length; ++e)
if (D.a.queuedAugmentations[e].name === o.name)
return t.log("purchaseAugmentation", `You already have the '${n}' augmentation.`), !1;
for (let e = 0; e < D.a.augmentations.length; ++e)
if (D.a.augmentations[e].name === o.name)
return t.log("purchaseAugmentation", `You already have the '${n}' augmentation.`), !1;
}
if (r.playerReputation < o.baseRepRequirement)
return t.log("purchaseAugmentation", `You do not have enough reputation with '${r.name}'.`), !1;
const c = Object(O.f)(o, r, !0);
return (
t.log("purchaseAugmentation", c),
!(!Object(ye.a)(c) || !c.startsWith("You purchased")) &&
(D.a.gainIntelligenceExp(b.a.IntelligenceSingFnBaseExpGain), !0)
);
},
softReset: function (e) {
a("softReset", Object(i.c)("softReset")),
Ae("softReset", 3),
t.log("softReset", "Soft resetting. This will cause this script to be killed"),
setTimeout(() => {
Object(c.a)(), $e(e);
}, 0),
(t.running = !1),
Object(se.a)(t);
},
installAugmentations: function (e) {
if (
(a("installAugmentations", Object(i.c)("installAugmentations")),
Ae("installAugmentations", 3),
0 === D.a.queuedAugmentations.length)
)
return t.log("installAugmentations", "You do not have any Augmentations to be installed."), !1;
D.a.gainIntelligenceExp(b.a.IntelligenceSingFnBaseExpGain),
t.log("installAugmentations", "Installing Augmentations. This will cause this script to be killed"),
setTimeout(() => {
Object(l.d)(), $e(e);
}, 0),
(t.running = !1),
Object(se.a)(t);
},
gang: Je,
bladeburner: {
getContractNames: function () {
a("getContractNames", Object(i.c)("bladeburner", "getContractNames")), Ne("getContractNames");
const e = D.a.bladeburner;
if (null === e) throw new Error("Should not be called without Bladeburner");
return e.getContractNamesNetscriptFn();
},
getOperationNames: function () {
a("getOperationNames", Object(i.c)("bladeburner", "getOperationNames")), Ne("getOperationNames");
const e = D.a.bladeburner;
if (null === e) throw new Error("Should not be called without Bladeburner");
return e.getOperationNamesNetscriptFn();
},
getBlackOpNames: function () {
a("getBlackOpNames", Object(i.c)("bladeburner", "getBlackOpNames")), Ne("getBlackOpNames");
const e = D.a.bladeburner;
if (null === e) throw new Error("Should not be called without Bladeburner");
return e.getBlackOpNamesNetscriptFn();
},
getBlackOpRank: function (e = "") {
a("getBlackOpRank", Object(i.c)("bladeburner", "getBlackOpRank")), Ne("getBlackOpRank");
return je("getBlackOpRank", "blackops", e).reqdRank;
},
getGeneralActionNames: function () {
a("getGeneralActionNames", Object(i.c)("bladeburner", "getGeneralActionNames")),
Ne("getGeneralActionNames");
const e = D.a.bladeburner;
if (null === e) throw new Error("Should not be called without Bladeburner");
return e.getGeneralActionNamesNetscriptFn();
},
getSkillNames: function () {
a("getSkillNames", Object(i.c)("bladeburner", "getSkillNames")), Ne("getSkillNames");
const e = D.a.bladeburner;
if (null === e) throw new Error("Should not be called without Bladeburner");
return e.getSkillNamesNetscriptFn();
},
startAction: function (e = "", n = "") {
a("startAction", Object(i.c)("bladeburner", "startAction")), Ne("startAction");
const r = D.a.bladeburner;
if (null === r) throw new Error("Should not be called without Bladeburner");
try {
return r.startActionNetscriptFn(D.a, e, n, t);
} catch (e) {
throw Re("bladeburner.startAction", e);
}
},
stopBladeburnerAction: function () {
a("stopBladeburnerAction", Object(i.c)("bladeburner", "stopBladeburnerAction")),
Ne("stopBladeburnerAction");
const e = D.a.bladeburner;
if (null === e) throw new Error("Should not be called without Bladeburner");
return e.resetAction();
},
getCurrentAction: function () {
a("getCurrentAction", Object(i.c)("bladeburner", "getCurrentAction")), Ne("getCurrentAction");
const e = D.a.bladeburner;
if (null === e) throw new Error("Should not be called without Bladeburner");
return e.getTypeAndNameFromActionId(e.action);
},
getActionTime: function (e = "", n = "") {
a("getActionTime", Object(i.c)("bladeburner", "getActionTime")), Ne("getActionTime");
const r = D.a.bladeburner;
if (null === r) throw new Error("Should not be called without Bladeburner");
try {
return r.getActionTimeNetscriptFn(D.a, e, n, t);
} catch (e) {
throw Re("bladeburner.getActionTime", e);
}
},
getActionEstimatedSuccessChance: function (e = "", n = "") {
a("getActionEstimatedSuccessChance", Object(i.c)("bladeburner", "getActionEstimatedSuccessChance")),
Ne("getActionEstimatedSuccessChance");
const r = D.a.bladeburner;
if (null === r) throw new Error("Should not be called without Bladeburner");
try {
return r.getActionEstimatedSuccessChanceNetscriptFn(D.a, e, n, t);
} catch (e) {
throw Re("bladeburner.getActionEstimatedSuccessChance", e);
}
},
getActionRepGain: function (e = "", t = "", n) {
a("getActionRepGain", Object(i.c)("bladeburner", "getActionRepGain")), Ne("getActionRepGain");
const r = je("getActionRepGain", e, t);
let o;
return (
(o = null == n || isNaN(n) ? Math.pow(r.rewardFac, r.level - 1) : Math.pow(r.rewardFac, n - 1)),
r.rankGain * o * m.a.BladeburnerRank
);
},
getActionCountRemaining: function (e = "", n = "") {
a("getActionCountRemaining", Object(i.c)("bladeburner", "getActionCountRemaining")),
Ne("getActionCountRemaining");
const r = D.a.bladeburner;
if (null === r) throw new Error("Should not be called without Bladeburner");
try {
return r.getActionCountRemainingNetscriptFn(e, n, t);
} catch (e) {
throw Re("bladeburner.getActionCountRemaining", e);
}
},
getActionMaxLevel: function (e = "", t = "") {
a("getActionMaxLevel", Object(i.c)("bladeburner", "getActionMaxLevel")), Ne("getActionMaxLevel");
return je("getActionMaxLevel", e, t).maxLevel;
},
getActionCurrentLevel: function (e = "", t = "") {
a("getActionCurrentLevel", Object(i.c)("bladeburner", "getActionCurrentLevel")),
Ne("getActionCurrentLevel");
return je("getActionCurrentLevel", e, t).level;
},
getActionAutolevel: function (e = "", t = "") {
a("getActionAutolevel", Object(i.c)("bladeburner", "getActionAutolevel")), Ne("getActionAutolevel");
return je("getActionCurrentLevel", e, t).autoLevel;
},
setActionAutolevel: function (e = "", t = "", n = !0) {
a("setActionAutolevel", Object(i.c)("bladeburner", "setActionAutolevel")), Ne("setActionAutolevel");
je("setActionAutolevel", e, t).autoLevel = n;
},
setActionLevel: function (e = "", t = "", n = 1) {
a("setActionLevel", Object(i.c)("bladeburner", "setActionLevel")), Ne("setActionLevel");
const r = je("setActionLevel", e, t);
if (n < 1 || n > r.maxLevel)
throw Re("bladeburner.setActionLevel", `Level must be between 1 and ${r.maxLevel}, is ${n}`);
r.level = n;
},
getRank: function () {
a("getRank", Object(i.c)("bladeburner", "getRank")), Ne("getRank");
const e = D.a.bladeburner;
if (null === e) throw new Error("Should not be called without Bladeburner");
return e.rank;
},
getSkillPoints: function () {
a("getSkillPoints", Object(i.c)("bladeburner", "getSkillPoints")), Ne("getSkillPoints");
const e = D.a.bladeburner;
if (null === e) throw new Error("Should not be called without Bladeburner");
return e.skillPoints;
},
getSkillLevel: function (e = "") {
a("getSkillLevel", Object(i.c)("bladeburner", "getSkillLevel")), Ne("getSkillLevel");
const n = D.a.bladeburner;
if (null === n) throw new Error("Should not be called without Bladeburner");
try {
return n.getSkillLevelNetscriptFn(e, t);
} catch (e) {
throw Re("bladeburner.getSkillLevel", e);
}
},
getSkillUpgradeCost: function (e = "") {
a("getSkillUpgradeCost", Object(i.c)("bladeburner", "getSkillUpgradeCost")), Ne("getSkillUpgradeCost");
const n = D.a.bladeburner;
if (null === n) throw new Error("Should not be called without Bladeburner");
try {
return n.getSkillUpgradeCostNetscriptFn(e, t);
} catch (e) {
throw Re("bladeburner.getSkillUpgradeCost", e);
}
},
upgradeSkill: function (e) {
a("upgradeSkill", Object(i.c)("bladeburner", "upgradeSkill")), Ne("upgradeSkill");
const n = D.a.bladeburner;
if (null === n) throw new Error("Should not be called without Bladeburner");
try {
return n.upgradeSkillNetscriptFn(e, t);
} catch (e) {
throw Re("bladeburner.upgradeSkill", e);
}
},
getTeamSize: function (e = "", n = "") {
a("getTeamSize", Object(i.c)("bladeburner", "getTeamSize")), Ne("getTeamSize");
const r = D.a.bladeburner;
if (null === r) throw new Error("Should not be called without Bladeburner");
try {
return r.getTeamSizeNetscriptFn(e, n, t);
} catch (e) {
throw Re("bladeburner.getTeamSize", e);
}
},
setTeamSize: function (e = "", n = "", r) {
a("setTeamSize", Object(i.c)("bladeburner", "setTeamSize")), Ne("setTeamSize");
const o = D.a.bladeburner;
if (null === o) throw new Error("Should not be called without Bladeburner");
try {
return o.setTeamSizeNetscriptFn(e, n, r, t);
} catch (e) {
throw Re("bladeburner.setTeamSize", e);
}
},
getCityEstimatedPopulation: function (e) {
a("getCityEstimatedPopulation", Object(i.c)("bladeburner", "getCityEstimatedPopulation")),
Ne("getCityEstimatedPopulation"),
Ie("getCityEstimatedPopulation", e);
const t = D.a.bladeburner;
if (null === t) throw new Error("Should not be called without Bladeburner");
return t.cities[e].popEst;
},
getCityEstimatedCommunities: function (e) {
a("getCityEstimatedCommunities", Object(i.c)("bladeburner", "getCityEstimatedCommunities")),
Ne("getCityEstimatedCommunities"),
Ie("getCityEstimatedCommunities", e);
const t = D.a.bladeburner;
if (null === t) throw new Error("Should not be called without Bladeburner");
return t.cities[e].commsEst;
},
getCityChaos: function (e) {
a("getCityChaos", Object(i.c)("bladeburner", "getCityChaos")),
Ne("getCityChaos"),
Ie("getCityChaos", e);
const t = D.a.bladeburner;
if (null === t) throw new Error("Should not be called without Bladeburner");
return t.cities[e].chaos;
},
getCity: function () {
a("getCity", Object(i.c)("bladeburner", "getCity")), Ne("getCityChaos");
const e = D.a.bladeburner;
if (null === e) throw new Error("Should not be called without Bladeburner");
return e.city;
},
switchCity: function (e) {
a("switchCity", Object(i.c)("bladeburner", "switchCity")), Ne("switchCity"), Ie("switchCity", e);
const t = D.a.bladeburner;
if (null === t) throw new Error("Should not be called without Bladeburner");
return (t.city = e);
},
getStamina: function () {
a("getStamina", Object(i.c)("bladeburner", "getStamina")), Ne("getStamina");
const e = D.a.bladeburner;
if (null === e) throw new Error("Should not be called without Bladeburner");
return [e.stamina, e.maxStamina];
},
joinBladeburnerFaction: function () {
a("joinBladeburnerFaction", Object(i.c)("bladeburner", "joinBladeburnerFaction")),
Ne("joinBladeburnerFaction", !0);
const e = D.a.bladeburner;
if (null === e) throw new Error("Should not be called without Bladeburner");
return e.joinBladeburnerFactionNetscriptFn(t);
},
joinBladeburnerDivision: function () {
a("joinBladeburnerDivision", Object(i.c)("bladeburner", "joinBladeburnerDivision"));
if (null === D.a.bladeburner) throw new Error("Should not be called without Bladeburner");
if (7 === D.a.bitNodeN || V.a[7] > 0)
return (
8 !== D.a.bitNodeN &&
(D.a.bladeburner instanceof d.a ||
(D.a.strength >= 100 && D.a.defense >= 100 && D.a.dexterity >= 100 && D.a.agility >= 100
? ((D.a.bladeburner = new d.a(D.a)),
t.log("joinBladeburnerDivision", "You have been accepted into the Bladeburner division"),
!0)
: (t.log(
"joinBladeburnerDivision",
"You do not meet the requirements for joining the Bladeburner division",
),
!1)))
);
},
getBonusTime: function () {
a("getBonusTime", Object(i.c)("bladeburner", "getBonusTime")), Ne("getBonusTime");
const e = D.a.bladeburner;
if (null === e) throw new Error("Should not be called without Bladeburner");
return Math.round(e.storedCycles / 5);
},
},
corporation: {
expandIndustry: function (e, t) {
const a = D.a.corporation;
if (null === a) throw new Error("Should not be called without a corporation");
Object(v.l)(a, e, t);
},
expandCity: function (e, t) {
const a = Le(e),
n = D.a.corporation;
if (null === n) throw new Error("Should not be called without a corporation");
Object(v.k)(n, a, t);
},
unlockUpgrade: function (e) {
const t = Object.values(k.a).find((t) => t[2] === e);
if (void 0 === t) throw new Error(`No upgrade named '${e}'`);
const a = D.a.corporation;
if (null === a) throw new Error("Should not be called without a corporation");
Object(v.x)(a, t);
},
levelUpgrade: function (e) {
const t = Object.values(_.a).find((t) => t[4] === e);
if (void 0 === t) throw new Error(`No upgrade named '${e}'`);
const a = D.a.corporation;
if (null === a) throw new Error("Should not be called without a corporation");
Object(v.h)(a, t);
},
issueDividends: function (e) {
const t = D.a.corporation;
if (null === t) throw new Error("Should not be called without a corporation");
Object(v.g)(t, e);
},
sellMaterial: function (e, t, a, n, r) {
const i = Ue(e, t, a);
Object(v.o)(i, n, r);
},
sellProduct: function (e, t, a, n, r, i) {
const o = qe(e, a);
Object(v.p)(o, t, n, r, i);
},
discontinueProduct: function (e, t) {
Le(e).discontinueProduct(qe(e, t));
},
setSmartSupply: function (e, t, a) {
const n = He(e, t);
Object(v.u)(n, a);
},
buyMaterial: function (e, t, a, n) {
const r = Ue(e, t, a);
Object(v.c)(r, n);
},
employees: function (e, t) {
return We(e, t).employees.map((e) => Object.assign({}, e));
},
assignJob: function (e, t, a, n) {
const r = Ke(e, t, a);
Object(v.a)(r, n);
},
hireEmployee: function (e, t) {
We(e, t).hireRandomEmployee();
},
upgradeOfficeSize: function (e, t, a) {
const n = We(e, t),
r = D.a.corporation;
if (null === r) throw new Error("Should not be called without a corporation");
Object(v.y)(r, n, a);
},
throwParty: function (e, t, a) {
const n = We(e, t),
r = D.a.corporation;
if (null === r) throw new Error("Should not be called without a corporation");
Object(v.w)(r, n, a);
},
purchaseWarehouse: function (e, t) {
const a = D.a.corporation;
if (null === a) throw new Error("Should not be called without a corporation");
Object(v.m)(a, Le(e), t);
},
upgradeWarehouse: function (e, t) {
const a = D.a.corporation;
if (null === a) throw new Error("Should not be called without a corporation");
Object(v.z)(a, Le(e), He(e, t));
},
buyCoffee: function (e, t) {
const a = D.a.corporation;
if (null === a) throw new Error("Should not be called without a corporation");
Object(v.b)(a, Le(e), We(e, t));
},
hireAdVert: function (e) {
const t = D.a.corporation;
if (null === t) throw new Error("Should not be called without a corporation");
Object(v.f)(t, Le(e), We(e, "Sector-12"));
},
makeProduct: function (e, t, a, n, r) {
const i = D.a.corporation;
if (null === i) throw new Error("Should not be called without a corporation");
Object(v.j)(i, Le(e), t, a, n, r);
},
research: function (e, t) {
Object(v.n)(Le(e), t);
},
exportMaterial: function (e, t, a, n, r, i) {
Object(v.e)(a, n, Ue(e, t, r), i + "");
},
cancelExportMaterial: function (e, t, a, n, r, i) {
Object(v.d)(a, n, Ue(e, t, r), i + "");
},
setMaterialMarketTA1: function (e, t, a, n) {
Object(v.q)(Ue(e, t, a), n);
},
setMaterialMarketTA2: function (e, t, a, n) {
Object(v.r)(Ue(e, t, a), n);
},
setProductMarketTA1: function (e, t, a) {
Object(v.s)(qe(e, t), a);
},
setProductMarketTA2: function (e, t, a) {
Object(v.t)(qe(e, t), a);
},
getDivision: function (e) {
return Le(e);
},
getOffice: function (e, t) {
return We(e, t);
},
getWarehouse: function (e, t) {
return He(e, t);
},
getMaterial: function (e, t, a) {
return Ue(e, t, a);
},
getProduct: function (e, t) {
return qe(e, t);
},
getEmployee: function (e, t, a) {
return Ke(e, t, a);
},
},
codingcontract: {
attempt: function (e, n, r = t.hostname, { returnReward: o } = {}) {
a("attempt", Object(i.c)("codingcontract", "attempt"));
const s = Fe("attempt", r, n);
if (Object(de.a)(e)) {
const t = [];
for (let a = 0; a < e.length; ++a) t.push(["[", e[a].toString(), "]"].join(""));
e = t.join(",");
} else e = String(e);
const l = s.reward;
if (null === l) throw new Error("Somehow solved a contract that didn't have a reward");
const c = ue(r, "codingcontract.attempt");
if (s.isSolution(e)) {
const e = D.a.gainCodingContractReward(l, s.getDifficulty());
return (
t.log("attempt", `Successfully completed Coding Contract '${n}'. Reward: ${e}`),
c.removeContract(n),
!o || e
);
}
return (
++s.tries,
s.tries >= s.getMaxNumTries()
? (t.log("attempt", `Coding Contract attempt '${n}' failed. Contract is now self-destructing`),
c.removeContract(n))
: t.log(
"attempt",
`Coding Contract attempt '${n}' failed. ${s.getMaxNumTries() - s.tries} attempts remaining.`,
),
!!o && ""
);
},
getContractType: function (e, n = t.hostname) {
a("getContractType", Object(i.c)("codingcontract", "getContractType"));
return Fe("getContractType", n, e).getType();
},
getData: function (e, n = t.hostname) {
a("getData", Object(i.c)("codingcontract", "getData"));
const r = Fe("getData", n, e).getData();
if (r.constructor === Array) {
const e = r.slice();
for (let t = 0; t < e.length; ++t) r[t].constructor === Array && (e[t] = r[t].slice());
return e;
}
return r;
},
getDescription: function (e, n = t.hostname) {
a("getDescription", Object(i.c)("codingcontract", "getDescription"));
return Fe("getDescription", n, e).getDescription();
},
getNumTriesRemaining: function (e, n = t.hostname) {
a("getNumTriesRemaining", Object(i.c)("codingcontract", "getNumTriesRemaining"));
const r = Fe("getNumTriesRemaining", n, e);
return r.getMaxNumTries() - r.tries;
},
},
sleeve: Xe,
formulas: {
basic: {
calculateSkill: function (e, t = 1) {
return Pe("basic.calculateSkill", 5), Object(j.b)(e, t);
},
calculateExp: function (e, t = 1) {
return Pe("basic.calculateExp", 5), Object(j.a)(e, t);
},
hackChance: function (e, t) {
return Pe("basic.hackChance", 5), Object(w.b)(e, t);
},
hackExp: function (e, t) {
return Pe("basic.hackExp", 5), Object(w.c)(e, t);
},
hackPercent: function (e, t) {
return Pe("basic.hackPercent", 5), Object(w.e)(e, t);
},
growPercent: function (e, t, a, n = 1) {
return Pe("basic.growPercent", 5), Object(C.a)(e, t, a, n);
},
hackTime: function (e, t) {
return Pe("basic.hackTime", 5), Object(w.d)(e, t);
},
growTime: function (e, t) {
return Pe("basic.growTime", 5), Object(w.a)(e, t);
},
weakenTime: function (e, t) {
return Pe("basic.weakenTime", 5), Object(w.f)(e, t);
},
},
hacknetNodes: {
moneyGainRate: function (e, t, a, n = 1) {
return Pe("hacknetNodes.moneyGainRate", 5), Object(M.c)(e, t, a, n);
},
levelUpgradeCost: function (e, t = 1, a = 1) {
return Pe("hacknetNodes.levelUpgradeCost", 5), Object(M.b)(e, t, a);
},
ramUpgradeCost: function (e, t = 1, a = 1) {
return Pe("hacknetNodes.ramUpgradeCost", 5), Object(M.e)(e, t, a);
},
coreUpgradeCost: function (e, t = 1, a = 1) {
return Pe("hacknetNodes.coreUpgradeCost", 5), Object(M.a)(e, t, a);
},
hacknetNodeCost: function (e, t) {
return Pe("hacknetNodes.hacknetNodeCost", 5), Object(M.d)(e, t);
},
constants: function () {
return Pe("hacknetNodes.constants", 5), Object.assign({}, P.a);
},
},
hacknetServers: {
hashGainRate: function (e, t, a, n, r = 1) {
return Pe("hacknetServers.hashGainRate", 9), Object(R.c)(e, t, a, n, r);
},
levelUpgradeCost: function (e, t = 1, a = 1) {
return Pe("hacknetServers.levelUpgradeCost", 9), Object(R.d)(e, t, a);
},
ramUpgradeCost: function (e, t = 1, a = 1) {
return Pe("hacknetServers.ramUpgradeCost", 9), Object(R.e)(e, t, a);
},
coreUpgradeCost: function (e, t = 1, a = 1) {
return Pe("hacknetServers.coreUpgradeCost", 9), Object(R.b)(e, t, a);
},
cacheUpgradeCost: function (e, t = 1) {
return Pe("hacknetServers.cacheUpgradeCost", 9), Object(R.a)(e, t);
},
hashUpgradeCost: function (e, t) {
Pe("hacknetServers.hashUpgradeCost", 9);
const a = D.a.hashManager.getUpgrade(e);
if (!a) throw Re("formulas.hacknetServers.calculateHashUpgradeCost", "Invalid Hash Upgrade: " + e);
return a.getCost(t);
},
hacknetServerCost: function (e, t) {
return Pe("hacknetServers.hacknetServerCost", 9), Object(R.f)(e, t);
},
constants: function () {
return Pe("hacknetServers.constants", 9), Object.assign({}, P.b);
},
},
},
flags: function (e) {
e = we(e);
const a = {};
for (const t of e) {
let e = String;
"number" == typeof t[1]
? (e = Number)
: "boolean" == typeof t[1]
? (e = Boolean)
: Array.isArray(t[1]) && (e = [String]);
const n = t[0].length > 1 ? 2 : 1;
a["-".repeat(n) + t[0]] = e;
}
const n = r(a, { argv: t.args });
for (const t of e) (n.hasOwnProperty("--" + t[0]) && n.hasOwnProperty("-" + t[0])) || (n[t[0]] = t[1]);
for (const e of Object.keys(n)) {
if (!e.startsWith("-")) continue;
const t = n[e];
delete n[e];
const a = 2 === e.length ? 1 : 2;
n[e.slice(a)] = t;
}
return n;
},
...Qe,
};
const et = Object.fromEntries(
[
...(function e(t, a) {
const n = [];
for (const [r, i] of Object.entries(t))
"function" == typeof i ? n.push(a + r) : "object" == typeof i && n.push(...e(i, r + "."));
return n;
})(Ze, ""),
].map((e) => [e, !0]),
);
return Ze;
}
}.call(this, a(666)));
},
function (e, t, a) {
"use strict";
a.d(t, "c", function () {
return i;
}),
a.d(t, "b", function () {
return o;
}),
a.d(t, "a", function () {
return s;
});
var n = a(128),
r = a(91);
function i(e, t) {
const a = e.organizationName;
let i = null;
if (("string" == typeof a && "" !== a && (i = r.a[a]), !(i instanceof n.a))) return;
const o = t / e.moneyMax;
Math.random() < o && i.changeForecastForecast(i.otlkMagForecast - 0.1);
}
function o(e, t) {
const a = e.organizationName;
let i = null;
if (("string" == typeof a && "" !== a && (i = r.a[a]), !(i instanceof n.a))) return;
const o = t / e.moneyMax;
Math.random() < o && i.changeForecastForecast(i.otlkMagForecast + 0.1);
}
function s(e, t, a) {
const i = e.name;
let o = null;
if (("string" == typeof i && "" !== i && (o = r.a[i]), o instanceof n.a && Math.random() < 0.002 * a)) {
const e = 0.001 * t;
o.changeForecastForecast(o.otlkMagForecast + e);
}
}
},
,
,
,
function (e, t, a) {
"use strict";
function n(e, t, a = !1) {
let n = "";
const r = e.jobStatReqOffset,
i = t.requiredHacking > 0 ? t.requiredHacking + r : 0,
o = t.requiredStrength > 0 ? t.requiredStrength + r : 0,
s = t.requiredDefense > 0 ? t.requiredDefense + r : 0,
l = t.requiredDexterity > 0 ? t.requiredDexterity + r : 0,
c = t.requiredDexterity > 0 ? t.requiredDexterity + r : 0,
u = t.requiredCharisma > 0 ? t.requiredCharisma + r : 0,
m = t.requiredReputation;
return (
a
? ((n = "Requires:
"),
(n += i.toString() + " hacking
"),
(n += o.toString() + " strength
"),
(n += s.toString() + " defense
"),
(n += l.toString() + " dexterity
"),
(n += c.toString() + " agility
"),
(n += u.toString() + " charisma
"),
(n += m.toString() + " reputation"))
: ((n = "(Requires "),
i > 0 && (n += i + " hacking, "),
o > 0 && (n += o + " strength, "),
s > 0 && (n += s + " defense, "),
l > 0 && (n += l + " dexterity, "),
c > 0 && (n += c + " agility, "),
u > 0 && (n += u + " charisma, "),
m > 1 && (n += m + " reputation, "),
(n = n.substring(0, n.length - 2)),
(n += ")")),
n
);
}
a.d(t, "a", function () {
return n;
});
},
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(0),
r = a.n(n),
i = a(1108),
o = a(1),
s = a(10);
function l(e) {
const [t, a] = Object(n.useState)(0),
[l, c] = Object(n.useState)(!1);
return r.a.createElement(
r.a.Fragment,
null,
e.lines.slice(0, t).map((e, t) => r.a.createElement(o.a, { key: t }, e)),
e.lines.length > t &&
r.a.createElement(i.a, {
key: t,
text: e.lines[t],
onDone: function () {
const n = t + 1;
a(n), n >= e.lines.length && (e.onDone && e.auto && e.onDone(), c(!0));
},
}),
!e.auto && e.onDone && l && r.a.createElement(s.a, { onClick: e.onDone }, "Continue ..."),
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return p;
});
var n = a(172),
r = a(25),
i = a(15),
o = a(21),
s = a(228),
l = a(30),
c = a(263),
u = a(7),
m = a(205),
h = a(73),
d = a(1115);
class p {
constructor(e = "", t = !1) {
(this.facName = e),
(this.members = []),
(this.wanted = 1),
(this.respect = 1),
(this.isHackingGang = t),
(this.respectGainRate = 0),
(this.wantedGainRate = 0),
(this.moneyGainRate = 0),
(this.storedCycles = 0),
(this.storedTerritoryAndPowerCycles = 0),
(this.territoryClashChance = 0),
(this.territoryWarfareEngaged = !1),
(this.notifyMemberDeath = !0);
}
getPower() {
return h.a[this.facName].power;
}
getTerritory() {
return h.a[this.facName].territory;
}
process(e = 1, t) {
const a = 1e3 / u.a._idleSpeed;
if (
(isNaN(e) && console.error("NaN passed into Gang.process(): " + e),
(this.storedCycles += e),
this.storedCycles < 2 * a)
)
return;
const n = Math.min(this.storedCycles, 5 * a);
try {
this.processGains(n, t),
this.processExperienceGains(n),
this.processTerritoryAndPowerGains(n),
(this.storedCycles -= n);
} catch (e) {
console.error("Exception caught when processing Gang: " + e);
}
}
processGains(e = 1, t) {
let a = 0,
o = 0,
s = 0,
l = 0;
for (let e = 0; e < this.members.length; ++e) {
(o += this.members[e].calculateRespectGain(this)), (a += this.members[e].calculateMoneyGain(this));
(s += this.members[e].calculateWantedLevelGain(this)), this.members[e].getTask().baseWanted < 0 && l++;
}
(this.respectGainRate = o), (this.wantedGainRate = s), (this.moneyGainRate = a);
const u = o * e;
this.respect += u;
const m = r.a[this.facName];
if (!(m instanceof n.a))
throw (
(Object(i.a)(
"ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev",
),
new Error("Could not find the faction associated with this gang."))
);
const h = 1 + m.favor / 100;
m.playerReputation += (t.faction_rep_mult * u * h) / c.a.GangRespectToReputationRatio;
for (let t = 0; t < this.members.length; ++t) this.members[t].recordEarnedRespect(e, this);
if (!(1 === this.wanted && s < 0)) {
const t = this.wanted;
let a = t + s * e;
(a *= 1 - 0.001 * l), s <= 0 && a > t && (a = 1), (this.wanted = a), this.wanted < 1 && (this.wanted = 1);
}
t.gainMoney(a * e), t.recordMoneySource(a * e, "gang");
}
processTerritoryAndPowerGains(e = 1) {
if (
((this.storedTerritoryAndPowerCycles += e),
this.storedTerritoryAndPowerCycles < c.a.CyclesPerTerritoryAndPowerUpdate)
)
return;
this.storedTerritoryAndPowerCycles -= c.a.CyclesPerTerritoryAndPowerUpdate;
const t = this.facName;
for (const e in h.a)
if (h.a.hasOwnProperty(e))
if (e == t) h.a[e].power += this.calculatePower();
else {
const t = Math.random();
if (t < 0.5) {
const t = 0.005 * h.a[e].power;
h.a[e].power += Math.min(0.85, t);
} else {
const a = 0.75 * t * h.a[e].territory;
h.a[e].power += a;
}
}
this.territoryWarfareEngaged
? (this.territoryClashChance = 1)
: this.territoryClashChance > 0 &&
(this.territoryClashChance = Math.max(0, this.territoryClashChance - 0.01));
for (let e = 0; e < c.a.Names.length; ++e) {
const n = c.a.Names.filter((t) => t !== c.a.Names[e]),
r = Object(l.a)(0, n.length - 1),
i = c.a.Names[e],
o = n[r];
if (!((i !== t && o !== t) || Math.random() < this.territoryClashChance)) continue;
const s = h.a[i].power,
u = s / (s + h.a[o].power);
function a(e, t) {
const a = Math.max(1, 1 + Math.log(h.a[e].power / h.a[t].power) / Math.log(50));
return Math.min(h.a[t].territory, 1e-4 * a * (Math.random() + 0.5));
}
if (Math.random() < u) {
if (h.a[o].territory <= 0) return;
const e = a(i, o);
(h.a[i].territory += e),
(h.a[o].territory -= e),
i === t
? (this.clash(!0), (h.a[o].power *= 1 / 1.01))
: o === t
? this.clash(!1)
: (h.a[o].power *= 1 / 1.01);
} else {
if (h.a[i].territory <= 0) return;
const e = a(o, i);
(h.a[i].territory -= e),
(h.a[o].territory += e),
i === t
? this.clash(!1)
: o === t
? (this.clash(!0), (h.a[i].power *= 1 / 1.01))
: (h.a[i].power *= 1 / 1.01);
}
}
}
processExperienceGains(e = 1) {
for (let t = 0; t < this.members.length; ++t)
this.members[t].gainExperience(e), this.members[t].updateSkillLevels();
}
clash(e = !1) {
let t = 0.01;
if ((e ? (t /= 2) : (h.a[this.facName].power *= 1 / 1.008), !(Math.random() < 0.65)))
for (let e = this.members.length - 1; e >= 0; --e) {
const a = this.members[e];
if ("Territory Warfare" !== a.task) continue;
const n = t / Math.pow(a.def, 0.6);
Math.random() < n && this.killMember(a);
}
}
canRecruitMember() {
return (
!(this.members.length >= c.a.MaximumGangMembers) && this.respect >= this.getRespectNeededToRecruitMember()
);
}
getRespectNeededToRecruitMember() {
if (this.members.length < 3) return 0;
const e = this.members.length - 2;
return Math.pow(5, e);
}
recruitMember(e) {
if ("" === (e = String(e)) || !this.canRecruitMember()) return !1;
if (this.members.filter((t) => t.name === e).length >= 1) return !1;
const t = new d.a(e);
return this.members.push(t), !0;
}
getWantedPenalty() {
return this.respect / (this.respect + this.wanted);
}
calculatePower() {
let e = 0;
for (let t = 0; t < this.members.length; ++t)
m.a.hasOwnProperty(this.members[t].task) &&
"Territory Warfare" === this.members[t].task &&
(e += this.members[t].calculatePower());
return 0.015 * Math.max(0.002, this.getTerritory()) * e;
}
killMember(e) {
const t = this.respect,
a = 0.05 * t + e.earnedRespect;
this.respect = Math.max(0, t - a);
for (let t = 0; t < this.members.length; ++t)
if (e.name === this.members[t].name) {
this.members.splice(t, 1);
break;
}
this.notifyMemberDeath && Object(i.a)(`${e.name} was killed in a gang clash! You lost ${a} respect`);
}
ascendMember(e, t) {
try {
const a = e.ascend();
return (
(this.respect = Math.max(1, this.respect - a.respect)),
t && t.log("ascend", "Ascended Gang member " + e.name),
a
);
} catch (e) {
throw (null == t && Object(s.a)(e), e);
}
}
getDiscount() {
const e = this.getPower(),
t = this.respect,
a = Math.pow(t, 0.01) + t / 5e6 + Math.pow(e, 0.01) + e / 1e6 - 1;
return Math.max(1, a);
}
getAllTaskNames() {
return Object.keys(m.a).filter((e) => {
const t = m.a[e];
return (
null != t &&
"Unassigned" !== t.name &&
(this.isHackingGang === t.isHacking || !this.isHackingGang === t.isCombat)
);
});
}
getUpgradeCost(e) {
return null == e ? 1 / 0 : e.cost / this.getDiscount();
}
toJSON() {
return Object(o.b)("Gang", this);
}
static fromJSON(e) {
return Object(o.a)(p, e.data);
}
}
o.c.constructors.Gang = p;
},
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
});
var n = a(30);
function r(e) {
const t = Math.max(Math.min(e, 255), 0);
return Object(n.a)(0, t);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
});
var n = a(129);
function r(e) {
const t = {},
a = Object.keys(n.a);
for (let n = 0; n < a.length; ++n) t[a[n]] = e;
return t;
}
},
function (e, t, a) {
"use strict";
function n(e, t) {
const a = e.hostname;
return "requiredHackingSkill" in e
? !1 === e.hasAdminRights
? { res: !1, msg: `Cannot ${t} ${a} server because you do not have root access` }
: { res: !0 }
: { res: !1, msg: `Cannot ${t} ${a} server because it is a Hacknet Node` };
}
function r(e, t) {
const a = n(e, "hack");
if (!a.res) return a;
return e.requiredHackingSkill > t.hacking_skill
? { res: !1, msg: `Cannot hack ${e.hostname} server because your hacking skill is not high enough` }
: { res: !0 };
}
function i(e) {
return n(e, "grow");
}
function o(e) {
return n(e, "weaken");
}
a.d(t, "b", function () {
return r;
}),
a.d(t, "a", function () {
return i;
}),
a.d(t, "c", function () {
return o;
});
},
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
class n {
constructor(e) {
this.cards = e;
}
addCards(...e) {
return new n([...this.cards, ...e]);
}
removeByIndex(e) {
if (e >= this.cards.length) throw new Error("Tried to remove invalid card from Hand by index: " + e);
return new n([...this.cards.slice().splice(e, 1)]);
}
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return s;
});
var n = a(0),
r = a(1),
i = a(29),
o = a(10);
function s(e) {
return n.createElement(
i.a,
{ title: null != e.tooltip ? n.createElement(r.a, null, e.tooltip) : "" },
n.createElement(o.a, { onClick: e.onClick }, e.text),
);
}
},
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return m;
});
var n = a(93),
r = a(321),
i = a(109),
o = a(227),
s = a(101),
l = a(277),
c = a(278);
function u(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class m {
constructor(e = { hostname: "", ip: Object(l.a)() }) {
u(this, "contracts", []),
u(this, "cpuCores", 1),
u(this, "ftpPortOpen", !1),
u(this, "hasAdminRights", !1),
u(this, "hostname", ""),
u(this, "httpPortOpen", !1),
u(this, "ip", ""),
u(this, "isConnectedTo", !1),
u(this, "maxRam", 0),
u(this, "messages", []),
u(this, "organizationName", ""),
u(this, "programs", []),
u(this, "ramUsed", 0),
u(this, "runningScripts", []),
u(this, "scripts", []),
u(this, "serversOnNetwork", []),
u(this, "smtpPortOpen", !1),
u(this, "sqlPortOpen", !1),
u(this, "sshPortOpen", !1),
u(this, "textFiles", []),
(this.ip = e.ip ? e.ip : Object(l.a)()),
(this.hostname = e.hostname),
(this.organizationName = null != e.organizationName ? e.organizationName : ""),
(this.isConnectedTo = null != e.isConnectedTo && e.isConnectedTo),
(this.hasAdminRights = null != e.adminRights && e.adminRights);
}
addContract(e) {
this.contracts.push(e);
}
getContract(e) {
for (const t of this.contracts) if (t.fn === e) return t;
return null;
}
getRunningScript(e, t) {
for (const a of this.runningScripts) if (a.filename === e && Object(c.a)(a.args, t)) return a;
return null;
}
getScript(e) {
for (let t = 0; t < this.scripts.length; t++) if (this.scripts[t].filename === e) return this.scripts[t];
return null;
}
isRunning(e) {
for (const t of this.runningScripts) if (t.filename === e) return !0;
return !1;
}
removeContract(e) {
e instanceof n.a
? (this.contracts = this.contracts.filter((t) => t.fn !== e.fn))
: (this.contracts = this.contracts.filter((t) => t.fn !== e));
}
removeFile(e) {
if (e.endsWith(".exe") || null != e.match(/^.+\.exe-\d+(?:\.\d*)?%-INC$/)) {
for (let t = 0; t < this.programs.length; ++t)
if (this.programs[t] === e) return this.programs.splice(t, 1), { res: !0 };
} else if (Object(s.a)(e)) {
for (let t = 0; t < this.scripts.length; ++t)
if (this.scripts[t].filename === e)
return this.isRunning(e)
? { res: !1, msg: "Cannot delete a script that is currently running!" }
: (this.scripts.splice(t, 1), { res: !0 });
} else if (e.endsWith(".lit"))
for (let t = 0; t < this.messages.length; ++t) {
const a = this.messages[t];
if ("string" == typeof a && a === e) return this.messages.splice(t, 1), { res: !0 };
}
else if (e.endsWith(".txt")) {
for (let t = 0; t < this.textFiles.length; ++t)
if (this.textFiles[t].fn === e) return this.textFiles.splice(t, 1), { res: !0 };
} else if (e.endsWith(".cct"))
for (let t = 0; t < this.contracts.length; ++t)
if (this.contracts[t].fn === e) return this.contracts.splice(t, 1), { res: !0 };
return { res: !1, msg: "No such file exists" };
}
runScript(e) {
this.runningScripts.push(e);
}
setMaxRam(e) {
this.maxRam = e;
}
writeToScriptFile(e, t) {
const a = { success: !1, overwritten: !1 };
if (!Object(i.g)(e) || !Object(s.a)(e)) return a;
for (let n = 0; n < this.scripts.length; ++n)
if (e === this.scripts[n].filename) {
const e = this.scripts[n];
return (
(e.code = t), e.updateRamUsage(this.scripts), e.markUpdated(), (a.overwritten = !0), (a.success = !0), a
);
}
const n = new r.a(e, t, this.hostname, this.scripts);
return this.scripts.push(n), (a.success = !0), a;
}
writeToTextFile(e, t) {
const a = { success: !1, overwritten: !1 };
if (!Object(i.g)(e) || !e.endsWith("txt")) return a;
for (let n = 0; n < this.textFiles.length; ++n)
if (this.textFiles[n].fn === e)
return (a.overwritten = !0), (this.textFiles[n].text = t), (a.success = !0), a;
const n = new o.a(e, t);
return this.textFiles.push(n), (a.success = !0), a;
}
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return d;
}),
a.d(t, "b", function () {
return p;
});
var n = a(0),
r = a.n(n),
i = a(92),
o = a(93),
s = a(151),
l = a(40),
c = a(122),
u = a(1),
m = a(80),
h = a(10);
const d = new c.a();
function p() {
const [e, t] = Object(n.useState)(null),
[a, c] = Object(n.useState)("");
if (
(Object(n.useEffect)(() => {
d.subscribe((e) => t(e));
}),
null === e)
)
return r.a.createElement(r.a.Fragment, null);
function p() {
null !== e && (e.onClose(), t(null));
}
const f = o.d[e.c.type],
g = [];
for (const [t, a] of f.desc(e.c.data).split("\n").entries())
g.push(r.a.createElement("span", { key: t, dangerouslySetInnerHTML: { __html: a + "
" } }));
return r.a.createElement(
l.a,
{ open: null !== e, onClose: p },
r.a.createElement(s.a, { variant: "h4", value: e.c.type }),
r.a.createElement(
u.a,
null,
"You are attempting to solve a Coding Contract. You have ",
e.c.getMaxNumTries() - e.c.tries,
" tries remaining, after which the contract will self-destruct.",
),
r.a.createElement("br", null),
r.a.createElement(u.a, null, g),
r.a.createElement("br", null),
r.a.createElement(m.a, {
autoFocus: !0,
placeholder: "Enter Solution here",
value: a,
onChange: function (e) {
c(e.target.value);
},
onKeyDown: function (t) {
if (null === e) return;
const n = t.target.value;
t.keyCode === i.a.ENTER && "" !== n && (t.preventDefault(), e.onAttempt(a));
},
InputProps: {
endAdornment: r.a.createElement(
h.a,
{
onClick: () => {
e.onAttempt(a), p();
},
},
"Solve",
),
},
}),
);
}
},
,
,
,
,
,
,
,
,
,
,
,
,
,
function (module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.d(__webpack_exports__, "a", function () {
return calculateRamUsage;
});
var acorn_walk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(357),
acorn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(258),
_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(261),
_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(13);
const specialReferenceIF = "__SPECIAL_referenceIf",
specialReferenceFOR = "__SPECIAL_referenceFor",
specialReferenceWHILE = "__SPECIAL_referenceWhile",
memCheckGlobalKey = ".__GLOBAL__";
async function parseOnlyRamCalculate(otherScripts, code, workerScript) {
try {
let dependencyMap = {};
const completedParses = new Set(),
parseQueue = [];
function parseCode(e, t) {
const a = parseOnlyCalculateDeps(e, t);
completedParses.add(t);
for (let e = 0; e < a.additionalModules.length; ++e)
completedParses.has(a.additionalModules[e]) || parseQueue.push(a.additionalModules[e]);
dependencyMap = Object.assign(dependencyMap, a.dependencyMap);
}
const initialModule = "__SPECIAL_INITIAL_MODULE__";
for (parseCode(code, initialModule); parseQueue.length > 0; ) {
const nextModule = parseQueue.shift();
if (void 0 === nextModule) throw new Error("nextModule should not be undefined");
let code;
if (nextModule.startsWith("https://") || nextModule.startsWith("http://"))
try {
const module = await eval("import(nextModule)");
code = "";
for (const e in module) "function" == typeof module[e] && (code += module[e].toString() + ";\n");
} catch (e) {
return (
console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`),
_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.URLImportError
);
}
else {
if (!Array.isArray(otherScripts))
return (
console.warn("parseOnlyRamCalculate() not called with array of scripts"),
_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.ImportError
);
let e = null;
const t = nextModule.startsWith("./") ? nextModule.slice(2) : nextModule;
for (const a of otherScripts)
if (a.filename === t) {
e = a;
break;
}
if (null == e) return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.ImportError;
code = e.code;
}
parseCode(code, nextModule);
}
let ram = _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptBaseRamCost;
const unresolvedRefs = Object.keys(dependencyMap).filter((e) => e.startsWith(initialModule)),
resolvedRefs = new Set();
for (; unresolvedRefs.length > 0; ) {
const e = unresolvedRefs.shift();
if (void 0 === e) throw new Error("ref should not be undefined");
if (
("hacknet" !== e ||
resolvedRefs.has("hacknet") ||
(ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptHacknetNodesRamCost),
"document" !== e ||
resolvedRefs.has("document") ||
(ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptDomRamCost),
"window" !== e ||
resolvedRefs.has("window") ||
(ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptDomRamCost),
resolvedRefs.add(e),
e.endsWith(".*"))
) {
const t = e.slice(0, e.length - 2);
for (const e of Object.keys(dependencyMap).filter((e) => e.startsWith(t)))
for (const t of dependencyMap[e] || []) resolvedRefs.has(t) || unresolvedRefs.push(t);
} else for (const t of dependencyMap[e] || []) resolvedRefs.has(t) || unresolvedRefs.push(t);
try {
function applyFuncRam(e) {
if ("function" != typeof e) return 0;
try {
let t;
return (
(t = "AsyncFunction" === e.constructor.name ? 0 : e.apply(null, [])), "number" == typeof t ? t : 0
);
} catch (e) {
return console.error("Error applying function: " + e), 0;
}
}
if (workerScript.loadedFns[e]) continue;
let t;
(workerScript.loadedFns[e] = !0),
(t =
e in workerScript.env.vars.bladeburner
? workerScript.env.vars.bladeburner[e]
: e in workerScript.env.vars.codingcontract
? workerScript.env.vars.codingcontract[e]
: e in workerScript.env.vars.gang
? workerScript.env.vars.gang[e]
: e in workerScript.env.vars.sleeve
? workerScript.env.vars.sleeve[e]
: workerScript.env.vars[e]),
(ram += applyFuncRam(t));
} catch (e) {
continue;
}
}
return ram;
} catch (e) {
return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.SyntaxError;
}
}
function parseOnlyCalculateDeps(e, t) {
const a = Object(acorn__WEBPACK_IMPORTED_MODULE_1__.a)(e, { sourceType: "module", ecmaVersion: "latest" }),
n = t + memCheckGlobalKey,
r = {};
r[n] = new Set();
const i = {},
o = [];
function s(e, a) {
const n = r[e] || (r[e] = new Set()),
o = i[a];
void 0 !== o && n.add(o), n.add(t + "." + a), n.add(a);
}
const l = Object.getOwnPropertyNames(Object.prototype);
function c() {
return {
Identifier: (e, t) => {
l.includes(e.name) || s(t.key, e.name);
},
WhileStatement: (e, t, a) => {
s(t.key, specialReferenceWHILE), e.test && a(e.test, t), e.body && a(e.body, t);
},
DoWhileStatement: (e, t, a) => {
s(t.key, specialReferenceWHILE), e.test && a(e.test, t), e.body && a(e.body, t);
},
ForStatement: (e, t, a) => {
s(t.key, specialReferenceFOR),
e.init && a(e.init, t),
e.test && a(e.test, t),
e.update && a(e.update, t),
e.body && a(e.body, t);
},
IfStatement: (e, t, a) => {
s(t.key, specialReferenceIF),
e.test && a(e.test, t),
e.consequent && a(e.consequent, t),
e.alternate && a(e.alternate, t);
},
MemberExpression: (e, t, a) => {
e.object && a(e.object, t), e.property && a(e.property, t);
},
};
}
return (
acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(
a,
{ key: n },
Object.assign(
{
ImportDeclaration: (e, t) => {
const a = e.source.value;
o.push(a);
const n = r[t.key];
if (void 0 === n) throw new Error("set should not be undefined");
n.add(a + memCheckGlobalKey);
for (let n = 0; n < e.specifiers.length; ++n) {
const o = e.specifiers[n];
if (void 0 !== o.imported && void 0 !== o.local) i[o.local.name] = a + "." + o.imported.name;
else {
const e = r[t.key];
if (void 0 === e) throw new Error("set should not be undefined");
e.add(a + ".*");
}
}
},
FunctionDeclaration: (e) => {
const a = t + "." + e.id.name;
acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(e, { key: a }, c());
},
},
c(),
),
),
{ dependencyMap: r, additionalModules: o }
);
}
async function calculateRamUsage(e, t) {
const a = { loadedFns: {}, env: { vars: _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.b } };
try {
return await parseOnlyRamCalculate(t, e, a);
} catch (e) {
return (
console.error("Failed to parse script for RAM calculations:"),
console.error(e),
_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.SyntaxError
);
}
return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.SyntaxError;
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return u;
}),
a.d(t, "b", function () {
return m;
});
var n = a(0),
r = a.n(n),
i = a(40),
o = a(27),
s = a(122),
l = a(1),
c = a(10);
const u = new s.a();
function m() {
const e = o.b.Router(),
[t, a] = Object(n.useState)(!1);
return (
Object(n.useEffect)(() => u.subscribe(() => a(!0)), []),
r.a.createElement(
i.a,
{ open: t, onClose: () => a(!1) },
r.a.createElement(
l.a,
null,
"WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.",
),
r.a.createElement("br", null),
r.a.createElement("br", null),
r.a.createElement(
c.a,
{
onClick: function () {
e.toBitVerse(!0, !1), a(!1);
},
},
"Travel to the BitVerse",
),
)
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(790),
r = a(15);
function i(e) {
const t = n.a[e];
if (null == t) return;
const a = `${t.title}
${t.txt}`;
Object(r.a)(a);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return o;
});
var n = a(0),
r = a.n(n);
class i {
constructor(e, t, a, n, r, i, o) {
(this.infoText = e),
(this.enemies = t),
(this.offerHackingMission = a),
(this.offerHackingWork = n),
(this.offerFieldWork = r),
(this.offerSecurityWork = i),
(this.augmentationPriceMult = 1),
(this.augmentationRepRequirementMult = 1),
(this.keep = o);
}
offersWork() {
return this.offerFieldWork || this.offerHackingMission || this.offerHackingWork || this.offerSecurityWork;
}
}
const o = {
Illuminati: new i(
r.a.createElement(
r.a.Fragment,
null,
"Humanity never changes. No matter how civilized society becomes, it will eventually fall back into chaos. And from this chaos, we are the invisible hand that guides them to order.",
" ",
),
[],
!0,
!0,
!0,
!1,
!1,
),
Daedalus: new i(
r.a.createElement(
r.a.Fragment,
null,
"Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.",
),
[],
!0,
!0,
!0,
!1,
!1,
),
"The Covenant": new i(
r.a.createElement(
r.a.Fragment,
null,
"Surrender yourself. Give up your empty individuality to become part of something great, something eternal. Become a slave. Submit your mind, body, and soul. Only then can you set yourself free.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Only then can you discover immortality.",
),
[],
!0,
!0,
!0,
!1,
!1,
),
ECorp: new i(
r.a.createElement(
r.a.Fragment,
null,
"ECorp's mission is simple: to connect the world of today with the technology of tomorrow. With our wide range of Internet-related software and commercial hardware, ECorp makes the world's information universally accessible.",
),
[],
!0,
!0,
!0,
!0,
!0,
),
MegaCorp: new i(
r.a.createElement(
r.a.Fragment,
null,
"MegaCorp does what no other dares to do. We imagine. We create. We invent. We create what others have never even dreamed of. Our work fills the world's needs for food, water, power, and transporation on an unprecendented scale, in ways that no other company can.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"In our labs and factories and on the ground with customers, MegaCorp is ushering in a new era for the world.",
),
[],
!0,
!0,
!0,
!0,
!0,
),
"Bachman & Associates": new i(
r.a.createElement(
r.a.Fragment,
null,
"Where Law and Business meet - thats where we are.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Legal Insight - Business Instinct - Innovative Experience.",
),
[],
!0,
!0,
!0,
!0,
!0,
),
"Blade Industries": new i(
r.a.createElement(r.a.Fragment, null, "Augmentation is Salvation."),
[],
!0,
!0,
!0,
!0,
!0,
),
NWO: new i(
r.a.createElement(
r.a.Fragment,
null,
"Humans don't truly desire freedom. They want to be observed, understood, and judged. They want to be given purpose and direction in life. That is why they created God. And that is why they created civilization - not because of willingness, but because of a need to be incorporated into higher orders of structure and meaning.",
),
[],
!0,
!0,
!0,
!0,
!0,
),
"Clarke Incorporated": new i(
r.a.createElement(r.a.Fragment, null, "The Power of the Genome - Unlocked."),
[],
!0,
!0,
!0,
!0,
!0,
),
"OmniTek Incorporated": new i(
r.a.createElement(
r.a.Fragment,
null,
"Simply put, our mission is to design and build robots that make a difference.",
),
[],
!0,
!0,
!0,
!0,
!0,
),
"Four Sigma": new i(
r.a.createElement(
r.a.Fragment,
null,
"The scientific method is the best way to approach investing. Big strategies backed up with big data. Driven by deep learning and innovative ideas. And improved by iteration. That's Four Sigma.",
),
[],
!0,
!0,
!0,
!0,
!0,
),
"KuaiGong International": new i(
r.a.createElement(r.a.Fragment, null, "Dream big. Work hard. Make history."),
[],
!0,
!0,
!0,
!0,
!0,
),
"Fulcrum Secret Technologies": new i(
r.a.createElement(
r.a.Fragment,
null,
"The human organism has an innate desire to worship. That is why they created gods. If there were no gods, it would be necessary to create them. And now we can.",
),
[],
!0,
!0,
!1,
!0,
!0,
),
BitRunners: new i(
r.a.createElement(
r.a.Fragment,
null,
"Our entire lives are controlled by bits. All of our actions, our thoughts, our personal information. It's all transformed into bits, stored in bits, communicated through bits. It’s impossible for any person to move, to live, to operate at any level without the use of bits. And when a person moves, lives, and operates, they leave behind their bits, mere traces of seemingly meaningless fragments of information. But these bits can be reconstructed. Transformed. Used.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Those who run the bits, run the world.",
),
[],
!0,
!0,
!1,
!1,
!1,
),
"The Black Hand": new i(
r.a.createElement(
r.a.Fragment,
null,
"The world, so afraid of strong government, now has no government. Only power - Digital power. Financial power. Technological power. And those at the top rule with an invisible hand. They built a society where the rich get richer, and everyone else suffers.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"So much pain. So many lives. Their darkness must end.",
),
[],
!0,
!0,
!0,
!1,
!1,
),
NiteSec: new i(
r.a.createElement(
r.a.Fragment,
null,
" __..__ ",
r.a.createElement("br", null),
" _.nITESECNIt. ",
r.a.createElement("br", null),
" .-'NITESECNITESEc. ",
r.a.createElement("br", null),
" .' NITESECNITESECn ",
r.a.createElement("br", null),
" / NITESECNITESEC; ",
r.a.createElement("br", null),
" : :NITESECNITESEC; ",
r.a.createElement("br", null),
" ; $ NITESECNITESECN ",
r.a.createElement("br", null),
" : _, ,N'ITESECNITESEC ",
r.a.createElement("br", null),
" : .+^^`, : `NITESECNIT ",
r.a.createElement("br", null),
" ) /), `-,-=,NITESECNI ",
r.a.createElement("br", null),
" / ^ ,-;|NITESECN; ",
r.a.createElement("br", null),
" / _.' '-';NITESECN ",
r.a.createElement("br", null),
" ( , ,-''`^NITE' ",
r.a.createElement("br", null),
" )` :`. .' ",
r.a.createElement("br", null),
" )-- ; `- / ",
r.a.createElement("br", null),
" ' _.-' : ",
r.a.createElement("br", null),
" ( _.-' . ",
r.a.createElement("br", null),
" ------. ",
r.a.createElement("br", null),
" . ",
r.a.createElement("br", null),
" _.nIt ",
r.a.createElement("br", null),
" _.nITESECNi ",
r.a.createElement("br", null),
" nITESECNIT^' ",
r.a.createElement("br", null),
" NITE^' ___ ",
r.a.createElement("br", null),
" / .gP''''Tp. ",
r.a.createElement("br", null),
" : d' . `b ",
r.a.createElement("br", null),
" ; d' o `b ; ",
r.a.createElement("br", null),
" / d; `b| ",
r.a.createElement("br", null),
" /, $; @ `: ",
r.a.createElement("br", null),
" /' $$ ; ",
r.a.createElement("br", null),
" .' $$b o | ",
r.a.createElement("br", null),
" .' d$$$; : ",
r.a.createElement("br", null),
" / .d$$$$; , ; ",
r.a.createElement("br", null),
" d .dNITESEC $ | ",
r.a.createElement("br", null),
" :bp.__.gNITESEC$$ :$ ; ",
r.a.createElement("br", null),
" NITESECNITESECNIT $$b : ",
r.a.createElement("br", null),
),
[],
!0,
!0,
!1,
!1,
!1,
),
Aevum: new i(
r.a.createElement(r.a.Fragment, null, "The Silicon City."),
["Chongqing", "New Tokyo", "Ishima", "Volhaven"],
!0,
!0,
!0,
!0,
!1,
),
Chongqing: new i(
r.a.createElement(r.a.Fragment, null, "Serve the People."),
["Sector-12", "Aevum", "Volhaven"],
!0,
!0,
!0,
!0,
!1,
),
Ishima: new i(
r.a.createElement(r.a.Fragment, null, "The East Asian Order of the Future."),
["Sector-12", "Aevum", "Volhaven"],
!0,
!0,
!0,
!0,
!1,
),
"New Tokyo": new i(
r.a.createElement(r.a.Fragment, null, "Asia's World City."),
["Sector-12", "Aevum", "Volhaven"],
!0,
!0,
!0,
!0,
!1,
),
"Sector-12": new i(
r.a.createElement(r.a.Fragment, null, "The City of the Future."),
["Chongqing", "New Tokyo", "Ishima", "Volhaven"],
!0,
!0,
!0,
!0,
!1,
),
Volhaven: new i(
r.a.createElement(r.a.Fragment, null, "Benefit, Honor, and Glory."),
["Chongqing", "Sector-12", "New Tokyo", "Aevum", "Ishima"],
!0,
!0,
!0,
!0,
!1,
),
"Speakers for the Dead": new i(
r.a.createElement(r.a.Fragment, null, "It is better to reign in Hell than to serve in Heaven."),
[],
!0,
!0,
!0,
!0,
!1,
),
"The Dark Army": new i(
r.a.createElement(
r.a.Fragment,
null,
"The World doesn't care about right or wrong. It only cares about power.",
),
[],
!0,
!0,
!0,
!1,
!1,
),
"The Syndicate": new i(r.a.createElement(r.a.Fragment, null, "Honor holds you back."), [], !0, !0, !0, !0, !1),
Silhouette: new i(
r.a.createElement(
r.a.Fragment,
null,
"Corporations have filled the void of power left behind by the collapse of Western government. The issue is they've become so big that you don't know who they're working for. And if you're employed at one of these corporations, you don't even know who you're working for.",
r.a.createElement("br", null),
r.a.createElement("br", null),
"That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.",
),
[],
!0,
!0,
!0,
!1,
!1,
),
Tetrads: new i(
r.a.createElement(r.a.Fragment, null, "Following the mandate of Heaven and carrying out the way."),
[],
!1,
!1,
!0,
!0,
!1,
),
"Slum Snakes": new i(r.a.createElement(r.a.Fragment, null, "Slum Snakes rule!"), [], !1, !1, !0, !0, !1),
Netburners: new i(
r.a.createElement(r.a.Fragment, null, "~~//*>H4CK||3T 8URN3R5**>?>\\~~"),
[],
!0,
!0,
!1,
!1,
!1,
),
"Tian Di Hui": new i(
r.a.createElement(r.a.Fragment, null, "Obey Heaven and work righteously."),
[],
!0,
!0,
!1,
!0,
!1,
),
CyberSec: new i(
r.a.createElement(
r.a.Fragment,
null,
"The Internet is the first thing that was built that we don't fully understand, the largest experiment in anarchy that we have ever had. And as the world becomes increasingly dominated by it, society approaches the brink of total chaos. We serve only to protect society, to protect humanity, to protect the world from imminent collapse.",
),
[],
!0,
!0,
!1,
!1,
!1,
),
Bladeburners: new i(
r.a.createElement(
r.a.Fragment,
null,
"It's too bad they won't live. But then again, who does?",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Note that for this faction, reputation can only be gained through Bladeburner actions. Completing Bladeburner contracts/operations will increase your reputation.",
),
[],
!1,
!1,
!1,
!1,
!1,
),
};
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return m;
}),
a.d(t, "b", function () {
return h;
});
var n = a(0),
r = a.n(n),
i = a(117),
o = a(40),
s = a(27),
l = a(122),
c = a(1),
u = a(10);
const m = new l.a();
function h() {
const [e, t] = Object(n.useState)(null),
a = s.b.Player();
return (
Object(n.useEffect)(() => m.subscribe((e) => t(e)), []),
r.a.createElement(
o.a,
{ open: null !== e, onClose: () => t(null) },
r.a.createElement(c.a, { variant: "h4" }, "You have received a faction invitation."),
r.a.createElement(
c.a,
null,
"Would you like to join ",
(e || { name: "" }).name,
"? ",
r.a.createElement("br", null),
r.a.createElement("br", null),
"Warning: Joining this faction may prevent you from joining other factions during this run!",
),
r.a.createElement(
u.a,
{
onClick: function () {
if (null === e) return;
-1 === a.factionInvitations.findIndex((t) => t === e.name) &&
console.error("Could not find faction in Player.factionInvitations"),
Object(i.d)(e),
t(null);
},
},
"Join!",
),
r.a.createElement(u.a, { onClick: () => t(null) }, "Decide later"),
)
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
});
var n = a(258),
r = function (e, t, a = 0) {
(this.sourceCode = e),
(this.sourceCodeLineOffset = a),
"string" == typeof e && (e = n.a(e, r.PARSE_OPTIONS)),
(this.ast = e),
(this.initFunc_ = t),
(this.paused_ = !1),
(this.polyfills_ = []),
(this.functionCounter_ = 0),
(this.stepFunctions_ = Object.create(null));
var i,
o,
s = /^step([A-Z]\w*)$/;
for (var l in this)
"function" == typeof this[l] && (i = l.match(s)) && (this.stepFunctions_[i[1]] = this[l].bind(this));
(this.global = this.createScope(this.ast, null)),
(this.ast = n.a(this.polyfills_.join("\n"), r.PARSE_OPTIONS)),
(this.polyfills_ = void 0),
this.stripLocations_(this.ast, void 0, void 0),
((o = new r.State(this.ast, this.global)).done = !1),
(this.stateStack = [o]),
this.run(),
(this.value = void 0),
(this.ast = e),
((o = new r.State(this.ast, this.global)).done = !1),
(this.stateStack.length = 0),
(this.stateStack[0] = o),
(this.nodeConstructor = o.node.constructor),
(this.stateStack = this.stateStack);
};
/**
* @license
* JavaScript Interpreter
*
* Copyright 2013 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ (r.PARSE_OPTIONS = { ecmaVersion: 5, locations: !0 }),
(r.READONLY_DESCRIPTOR = { configurable: !0, enumerable: !0, writable: !1 }),
(r.NONENUMERABLE_DESCRIPTOR = { configurable: !0, enumerable: !1, writable: !0 }),
(r.READONLY_NONENUMERABLE_DESCRIPTOR = { configurable: !0, enumerable: !1, writable: !1 }),
(r.VARIABLE_DESCRIPTOR = { configurable: !1, enumerable: !0, writable: !0 }),
(r.STEP_ERROR = {}),
(r.SCOPE_REFERENCE = {}),
(r.VALUE_IN_DESCRIPTOR = {}),
(r.toStringCycles_ = []),
(r.prototype.getErrorLineNumber = function (e) {
var t = this.sourceCode;
if (null == e || null == e.start) return NaN;
try {
return ((t = t.substring(0, e.start)).match(/\n/g) || []).length + 1 - this.sourceCodeLineOffset;
} catch (e) {
return NaN;
}
}),
(r.prototype.getErrorLineNumberMessage = function (e) {
return isNaN(e)
? " (Unknown line number)"
: e <= 0
? " (Error occurred in an imported function)"
: " (Line Number " +
e +
". This line number is probably incorrect if your script is importing any functions. This is being worked on)";
}),
(r.prototype.appendCode = function (e) {
var t = this.stateStack[0];
if (!t || "Program" !== t.node.type) throw Error("Expecting original AST to start with a Program node.");
if (("string" == typeof e && (e = n.a(e, r.PARSE_OPTIONS)), !e || "Program" !== e.type))
throw Error("Expecting new AST to start with a Program node.");
this.populateScope_(e, t.scope);
for (var a, i = 0; (a = e.body[i]); i++) t.node.body.push(a);
t.done = !1;
}),
(r.prototype.step = function () {
var e = this.stateStack,
t = e[e.length - 1];
if (!t) return !1;
var a = t.node,
n = a.type;
if ("Program" === n && t.done) return !1;
if (this.paused_) return !0;
try {
var i = this.stepFunctions_[n](e, t, a);
} catch (e) {
if (e !== r.STEP_ERROR) throw e;
}
return i && e.push(i), !!a.end || this.step();
}),
(r.prototype.run = function () {
for (; !this.paused_ && this.step(); );
return this.paused_;
}),
(r.prototype.initGlobalScope = function (e) {
this.setProperty(e, "NaN", NaN, r.READONLY_DESCRIPTOR),
this.setProperty(e, "Infinity", 1 / 0, r.READONLY_DESCRIPTOR),
this.setProperty(e, "undefined", void 0, r.READONLY_DESCRIPTOR),
this.setProperty(e, "window", e, r.READONLY_DESCRIPTOR),
this.setProperty(e, "this", e, r.READONLY_DESCRIPTOR),
this.setProperty(e, "self", e),
(this.OBJECT_PROTO = new r.Object(null)),
(this.FUNCTION_PROTO = new r.Object(this.OBJECT_PROTO)),
this.initFunction(e),
this.initObject(e),
(e.proto = this.OBJECT_PROTO),
this.setProperty(e, "constructor", this.OBJECT, r.NONENUMERABLE_DESCRIPTOR),
this.initArray(e),
this.initString(e),
this.initBoolean(e),
this.initNumber(e),
this.initDate(e),
this.initRegExp(e),
this.initError(e),
this.initMath(e),
this.initJSON(e);
var t = this,
a = this.createNativeFunction(function (e) {
throw EvalError("Can't happen");
}, !1);
(a.eval = !0),
this.setProperty(e, "eval", a),
this.setProperty(e, "parseInt", this.createNativeFunction(parseInt, !1)),
this.setProperty(e, "parseFloat", this.createNativeFunction(parseFloat, !1)),
this.setProperty(e, "isNaN", this.createNativeFunction(isNaN, !1)),
this.setProperty(e, "isFinite", this.createNativeFunction(isFinite, !1));
for (
var n = [
[escape, "escape"],
[unescape, "unescape"],
[decodeURI, "decodeURI"],
[decodeURIComponent, "decodeURIComponent"],
[encodeURI, "encodeURI"],
[encodeURIComponent, "encodeURIComponent"],
],
i = 0;
i < n.length;
i++
) {
var o = (function (e) {
return function (a) {
try {
return e(a);
} catch (e) {
t.throwException(t.URI_ERROR, e.message);
}
};
})(n[i][0]);
this.setProperty(e, n[i][1], this.createNativeFunction(o, !1), r.NONENUMERABLE_DESCRIPTOR);
}
(this.OBJECT = this.OBJECT),
(this.OBJECT_PROTO = this.OBJECT_PROTO),
(this.FUNCTION = this.FUNCTION),
(this.FUNCTION_PROTO = this.FUNCTION_PROTO),
(this.ARRAY = this.ARRAY),
(this.ARRAY_PROTO = this.ARRAY_PROTO),
(this.REGEXP = this.REGEXP),
(this.REGEXP_PROTO = this.REGEXP_PROTO),
(this.DATE = this.DATE),
(this.DATE_PROTO = this.DATE_PROTO),
(this.UNDEFINED = void 0),
(this.NULL = null),
(this.NAN = NaN),
(this.TRUE = !0),
(this.FALSE = !1),
(this.STRING_EMPTY = ""),
(this.NUMBER_ZERO = 0),
(this.NUMBER_ONE = 1),
this.initFunc_ && this.initFunc_(this, e);
}),
(r.prototype.initFunction = function (e) {
var t,
a = this,
i = /^[A-Za-z_$][\w$]*$/;
((t = function (e) {
if (a.calledWithNew()) var t = this;
else t = a.createObjectProto(a.FUNCTION_PROTO);
if (arguments.length) var o = String(arguments[arguments.length - 1]);
else o = "";
var s = Array.prototype.slice.call(arguments, 0, -1).join(",").trim();
if (s) {
for (var l = s.split(/\s*,\s*/), c = 0; c < l.length; c++) {
var u = l[c];
i.test(u) || a.throwException(a.SYNTAX_ERROR, "Invalid function argument: " + u);
}
s = l.join(", ");
}
t.parentScope = a.global;
try {
var m = n.a("(function(" + s + ") {" + o + "})", r.PARSE_OPTIONS);
} catch (e) {
a.throwException(a.SYNTAX_ERROR, "Invalid code: " + e.message);
}
return (
1 !== m.body.length && a.throwException(a.SYNTAX_ERROR, "Invalid code in function body."),
(t.node = m.body[0].expression),
a.setProperty(t, "length", t.node.length, r.READONLY_DESCRIPTOR),
t
);
}).id = this.functionCounter_++),
(this.FUNCTION = this.createObjectProto(this.FUNCTION_PROTO)),
this.setProperty(e, "Function", this.FUNCTION),
this.setProperty(this.FUNCTION, "prototype", this.FUNCTION_PROTO),
(this.FUNCTION.nativeFunc = t),
this.setProperty(this.FUNCTION_PROTO, "constructor", this.FUNCTION, r.NONENUMERABLE_DESCRIPTOR),
(this.FUNCTION_PROTO.nativeFunc = function () {}),
(this.FUNCTION_PROTO.nativeFunc.id = this.functionCounter_++),
this.setProperty(this.FUNCTION_PROTO, "length", 0, r.READONLY_DESCRIPTOR);
var o = function (e) {
if (!((e && e.isObject) || a.getScope().strict))
if (null == e) e = a.global;
else {
var t = a.createObjectProto(a.getPrototype(e));
(t.data = e), (e = t);
}
return e;
};
(t = function (e, t) {
var n = a.stateStack[a.stateStack.length - 1];
(n.func_ = this),
(n.funcThis_ = o(e)),
(n.arguments_ = []),
null != t &&
(t.isObject
? (n.arguments_ = a.arrayPseudoToNative(t))
: a.throwException(a.TYPE_ERROR, "CreateListFromArrayLike called on non-object")),
(n.doneExec_ = !1);
}),
this.setNativeFunctionPrototype(this.FUNCTION, "apply", t),
(t = function (e) {
var t = a.stateStack[a.stateStack.length - 1];
(t.func_ = this), (t.funcThis_ = o(e)), (t.arguments_ = []);
for (var n = 1; n < arguments.length; n++) t.arguments_.push(arguments[n]);
t.doneExec_ = !1;
}),
this.setNativeFunctionPrototype(this.FUNCTION, "call", t),
this.polyfills_.push(
"Object.defineProperty(Function.prototype, 'bind',",
"{configurable: true, writable: true, value:",
"function(oThis) {",
"if (typeof this !== 'function') {",
"throw TypeError('What is trying to be bound is not callable');",
"}",
"var aArgs = Array.prototype.slice.call(arguments, 1),",
"fToBind = this,",
"fNOP = function() {},",
"fBound = function() {",
"return fToBind.apply(this instanceof fNOP",
"? this",
": oThis,",
"aArgs.concat(Array.prototype.slice.call(arguments)));",
"};",
"if (this.prototype) {",
"fNOP.prototype = this.prototype;",
"}",
"fBound.prototype = new fNOP();",
"return fBound;",
"}",
"});",
"",
),
(t = function () {
return this.toString();
}),
this.setNativeFunctionPrototype(this.FUNCTION, "toString", t),
this.setProperty(this.FUNCTION, "toString", this.createNativeFunction(t, !1), r.NONENUMERABLE_DESCRIPTOR),
(t = function () {
return this.valueOf();
}),
this.setNativeFunctionPrototype(this.FUNCTION, "valueOf", t),
this.setProperty(this.FUNCTION, "valueOf", this.createNativeFunction(t, !1), r.NONENUMERABLE_DESCRIPTOR);
}),
(r.prototype.initObject = function (e) {
var t,
a = this;
(t = function (e) {
if (null == e) return a.calledWithNew() ? this : a.createObjectProto(a.OBJECT_PROTO);
if (!e.isObject) {
var t = a.createObjectProto(a.getPrototype(e));
return (t.data = e), t;
}
return e;
}),
(this.OBJECT = this.createNativeFunction(t, !0)),
this.setProperty(this.OBJECT, "prototype", this.OBJECT_PROTO),
this.setProperty(this.OBJECT_PROTO, "constructor", this.OBJECT, r.NONENUMERABLE_DESCRIPTOR),
this.setProperty(e, "Object", this.OBJECT);
var n = function (e) {
null == e && a.throwException(a.TYPE_ERROR, "Cannot convert '" + e + "' to object");
};
(t = function (e) {
n(e);
var t = e.isObject ? e.properties : e;
return a.arrayNativeToPseudo(Object.getOwnPropertyNames(t));
}),
this.setProperty(
this.OBJECT,
"getOwnPropertyNames",
this.createNativeFunction(t, !1),
r.NONENUMERABLE_DESCRIPTOR,
),
(t = function (e) {
return n(e), e.isObject && (e = e.properties), a.arrayNativeToPseudo(Object.keys(e));
}),
this.setProperty(this.OBJECT, "keys", this.createNativeFunction(t, !1), r.NONENUMERABLE_DESCRIPTOR),
(t = function (e) {
return null === e
? a.createObjectProto(null)
: ((void 0 !== e && e.isObject) ||
a.throwException(a.TYPE_ERROR, "Object prototype may only be an Object or null"),
a.createObjectProto(e));
}),
this.setProperty(this.OBJECT, "create", this.createNativeFunction(t, !1), r.NONENUMERABLE_DESCRIPTOR),
this.polyfills_.push(
"(function() {",
"var create_ = Object.create;",
"Object.create = function(proto, props) {",
"var obj = create_(proto);",
"props && Object.defineProperties(obj, props);",
"return obj;",
"};",
"})();",
"",
),
(t = function (e, t, n) {
return (
(t = String(t)),
(e && e.isObject) || a.throwException(a.TYPE_ERROR, "Object.defineProperty called on non-object"),
(n && n.isObject) || a.throwException(a.TYPE_ERROR, "Property description must be an object"),
!e.properties[t] &&
e.preventExtensions &&
a.throwException(a.TYPE_ERROR, "Can't define property '" + t + "', object is not extensible"),
a.setProperty(e, t, r.VALUE_IN_DESCRIPTOR, n.properties),
e
);
}),
this.setProperty(this.OBJECT, "defineProperty", this.createNativeFunction(t, !1), r.NONENUMERABLE_DESCRIPTOR),
this.polyfills_.push(
"(function() {",
"var defineProperty_ = Object.defineProperty;",
"Object.defineProperty = function(obj, prop, d1) {",
"var d2 = {};",
"if ('configurable' in d1) d2.configurable = d1.configurable;",
"if ('enumerable' in d1) d2.enumerable = d1.enumerable;",
"if ('writable' in d1) d2.writable = d1.writable;",
"if ('value' in d1) d2.value = d1.value;",
"if ('get' in d1) d2.get = d1.get;",
"if ('set' in d1) d2.set = d1.set;",
"return defineProperty_(obj, prop, d2);",
"};",
"})();",
"Object.defineProperty(Object, 'defineProperties',",
"{configurable: true, writable: true, value:",
"function(obj, props) {",
"var keys = Object.keys(props);",
"for (var i = 0; i < keys.length; i++) {",
"Object.defineProperty(obj, keys[i], props[keys[i]]);",
"}",
"return obj;",
"}",
"});",
"",
),
(t = function (e, t) {
if (
((e && e.isObject) ||
a.throwException(a.TYPE_ERROR, "Object.getOwnPropertyDescriptor called on non-object"),
(t = String(t)) in e.properties)
) {
var n = Object.getOwnPropertyDescriptor(e.properties, t),
r = e.getter[t],
i = e.setter[t];
(r || i) && ((n.get = r), (n.set = i), delete n.value, delete n.writable);
var o = n.value,
s = "value" in n;
delete n.value;
var l = a.nativeToPseudo(n);
return s && a.setProperty(l, "value", o), l;
}
}),
this.setProperty(
this.OBJECT,
"getOwnPropertyDescriptor",
this.createNativeFunction(t, !1),
r.NONENUMERABLE_DESCRIPTOR,
),
(t = function (e) {
return n(e), a.getPrototype(e);
}),
this.setProperty(this.OBJECT, "getPrototypeOf", this.createNativeFunction(t, !1), r.NONENUMERABLE_DESCRIPTOR),
(t = function (e) {
return Boolean(e) && !e.preventExtensions;
}),
this.setProperty(this.OBJECT, "isExtensible", this.createNativeFunction(t, !1), r.NONENUMERABLE_DESCRIPTOR),
(t = function (e) {
return e && e.isObject && (e.preventExtensions = !0), e;
}),
this.setProperty(
this.OBJECT,
"preventExtensions",
this.createNativeFunction(t, !1),
r.NONENUMERABLE_DESCRIPTOR,
),
this.setNativeFunctionPrototype(this.OBJECT, "toString", r.Object.prototype.toString),
this.setNativeFunctionPrototype(this.OBJECT, "toLocaleString", r.Object.prototype.toString),
this.setNativeFunctionPrototype(this.OBJECT, "valueOf", r.Object.prototype.valueOf),
(t = function (e) {
return n(this), this.isObject ? String(e) in this.properties : this.hasOwnProperty(e);
}),
this.setNativeFunctionPrototype(this.OBJECT, "hasOwnProperty", t),
(t = function (e) {
return (
n(this),
this.isObject
? Object.prototype.propertyIsEnumerable.call(this.properties, e)
: this.propertyIsEnumerable(e)
);
}),
this.setNativeFunctionPrototype(this.OBJECT, "propertyIsEnumerable", t),
(t = function (e) {
for (;;) {
if (!(e = a.getPrototype(e))) return !1;
if (e === this) return !0;
}
}),
this.setNativeFunctionPrototype(this.OBJECT, "isPrototypeOf", t);
}),
(r.prototype.initArray = function (e) {
var t,
a = this;
(t = function (e) {
if (a.calledWithNew()) var t = this;
else t = a.createObjectProto(a.ARRAY_PROTO);
var n = arguments[0];
if (1 === arguments.length && "number" == typeof n)
isNaN(r.legalArrayLength(n)) && a.throwException(a.RANGE_ERROR, "Invalid array length"),
(t.properties.length = n);
else {
for (var i = 0; i < arguments.length; i++) t.properties[i] = arguments[i];
t.properties.length = i;
}
return t;
}),
(this.ARRAY = this.createNativeFunction(t, !0)),
(this.ARRAY_PROTO = this.ARRAY.properties.prototype),
this.setProperty(e, "Array", this.ARRAY),
(t = function (e) {
return e && "Array" === e.class;
}),
this.setProperty(this.ARRAY, "isArray", this.createNativeFunction(t, !1), r.NONENUMERABLE_DESCRIPTOR),
(t = function () {
return Array.prototype.pop.call(this.properties);
}),
this.setNativeFunctionPrototype(this.ARRAY, "pop", t),
(t = function (e) {
return Array.prototype.push.apply(this.properties, arguments);
}),
this.setNativeFunctionPrototype(this.ARRAY, "push", t),
(t = function () {
return Array.prototype.shift.call(this.properties);
}),
this.setNativeFunctionPrototype(this.ARRAY, "shift", t),
(t = function (e) {
return Array.prototype.unshift.apply(this.properties, arguments);
}),
this.setNativeFunctionPrototype(this.ARRAY, "unshift", t),
(t = function () {
return Array.prototype.reverse.call(this.properties), this;
}),
this.setNativeFunctionPrototype(this.ARRAY, "reverse", t),
(t = function (e, t) {
var n = Array.prototype.splice.apply(this.properties, arguments);
return a.arrayNativeToPseudo(n);
}),
this.setNativeFunctionPrototype(this.ARRAY, "splice", t),
(t = function (e, t) {
var n = Array.prototype.slice.call(this.properties, e, t);
return a.arrayNativeToPseudo(n);
}),
this.setNativeFunctionPrototype(this.ARRAY, "slice", t),
(t = function (e) {
return Array.prototype.join.call(this.properties, e);
}),
this.setNativeFunctionPrototype(this.ARRAY, "join", t),
(t = function (e) {
for (var t = [], n = 0, r = a.getProperty(this, "length"), i = 0; i < r; i++) {
if (a.hasProperty(this, i)) {
var o = a.getProperty(this, i);
t[n] = o;
}
n++;
}
for (i = 0; i < arguments.length; i++) {
var s = arguments[i];
if (a.isa(s, a.ARRAY))
for (var l = a.getProperty(s, "length"), c = 0; c < l; c++)
a.hasProperty(s, c) && (t[n] = a.getProperty(s, c)), n++;
else t[n] = s;
}
return a.arrayNativeToPseudo(t);
}),
this.setNativeFunctionPrototype(this.ARRAY, "concat", t),
(t = function (e, t) {
return Array.prototype.indexOf.apply(this.properties, arguments);
}),
this.setNativeFunctionPrototype(this.ARRAY, "indexOf", t),
(t = function (e, t) {
return Array.prototype.lastIndexOf.apply(this.properties, arguments);
}),
this.setNativeFunctionPrototype(this.ARRAY, "lastIndexOf", t),
(t = function () {
return Array.prototype.sort.call(this.properties), this;
}),
this.setNativeFunctionPrototype(this.ARRAY, "sort", t),
this.polyfills_.push(
"Object.defineProperty(Array.prototype, 'every',",
"{configurable: true, writable: true, value:",
"function(callbackfn, thisArg) {",
"if (!this || typeof callbackfn !== 'function') throw TypeError();",
"var T, k;",
"var O = Object(this);",
"var len = O.length >>> 0;",
"if (arguments.length > 1) T = thisArg;",
"k = 0;",
"while (k < len) {",
"if (k in O && !callbackfn.call(T, O[k], k, O)) return false;",
"k++;",
"}",
"return true;",
"}",
"});",
"Object.defineProperty(Array.prototype, 'filter',",
"{configurable: true, writable: true, value:",
"function(fun/*, thisArg*/) {",
"if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();",
"var t = Object(this);",
"var len = t.length >>> 0;",
"var res = [];",
"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;",
"for (var i = 0; i < len; i++) {",
"if (i in t) {",
"var val = t[i];",
"if (fun.call(thisArg, val, i, t)) res.push(val);",
"}",
"}",
"return res;",
"}",
"});",
"if (!Array.prototype.find) {",
"Object.defineProperty(Array.prototype, 'find', {",
"value: function(predicate) {",
"if (this == null) {",
"throw new TypeError('\"this\" is null or not defined');",
"}",
"var o = Object(this);",
"var len = o.length >>> 0;",
"if (typeof predicate !== 'function') {",
"throw new TypeError('predicate must be a function');",
"}",
"var thisArg = arguments[1];",
"var k = 0;",
"while (k < len) {",
"var kValue = o[k];",
"if (predicate.call(thisArg, kValue, k, o)) {",
"return kValue;",
"}",
"k++;",
"}",
"return undefined;",
"},",
"configurable: true,",
"writable: true",
"});",
"}",
"if (!Array.prototype.findIndex) {",
"Object.defineProperty(Array.prototype, 'findIndex', {",
"value: function(predicate) {",
"if (this == null) {",
"throw new TypeError('\"this\" is null or not defined');",
"}",
"var o = Object(this);",
"var len = o.length >>> 0;",
"if (typeof predicate !== 'function') {",
"throw new TypeError('predicate must be a function');",
"}",
"var thisArg = arguments[1];",
"var k = 0;",
"while (k < len) {",
"var kValue = o[k];",
"if (predicate.call(thisArg, kValue, k, o)) {",
"return k;",
"}",
"k++;",
"}",
"return -1;",
"},",
"configurable: true,",
"writable: true",
"});",
"}",
"Object.defineProperty(Array.prototype, 'forEach',",
"{configurable: true, writable: true, value:",
"function(callback, thisArg) {",
"if (!this || typeof callback !== 'function') throw TypeError();",
"var T, k;",
"var O = Object(this);",
"var len = O.length >>> 0;",
"if (arguments.length > 1) T = thisArg;",
"k = 0;",
"while (k < len) {",
"if (k in O) callback.call(T, O[k], k, O);",
"k++;",
"}",
"}",
"});",
"Object.defineProperty(Array.prototype, 'includes', {",
"value: function(searchElement, fromIndex) {",
"if (this == null) {",
"throw new TypeError('\"this\" is null or not defined');",
"}",
"// 1. Let O be ? ToObject(this value).",
"var o = Object(this);",
'// 2. Let len be ? ToLength(? Get(O, "length")).',
"var len = o.length >>> 0;",
"// 3. If len is 0, return false.",
"if (len === 0) {",
"return false;",
"}",
"// 4. Let n be ? ToInteger(fromIndex).",
"// (If fromIndex is undefined, this step produces the value 0.)",
"var n = fromIndex | 0;",
"// 5. If n ≥ 0, then",
"// a. Let k be n.",
"// 6. Else n < 0,",
"// a. Let k be len + n.",
"// b. If k < 0, let k be 0.",
"var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);",
"function sameValueZero(x, y) {",
"return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));",
"}",
"// 7. Repeat, while k < len",
"while (k < len) {",
"// a. Let elementK be the result of ? Get(O, ! ToString(k)).",
"// b. If SameValueZero(searchElement, elementK) is true, return true.",
"if (sameValueZero(o[k], searchElement)) {",
"return true;",
"}",
"// c. Increase k by 1. ",
"k++;",
"}",
"// 8. Return false",
"return false;",
"}",
"});",
"Object.defineProperty(Array.prototype, 'map',",
"{configurable: true, writable: true, value:",
"function(callback, thisArg) {",
"if (!this || typeof callback !== 'function') new TypeError;",
"var T, A, k;",
"var O = Object(this);",
"var len = O.length >>> 0;",
"if (arguments.length > 1) T = thisArg;",
"A = new Array(len);",
"k = 0;",
"while (k < len) {",
"if (k in O) A[k] = callback.call(T, O[k], k, O);",
"k++;",
"}",
"return A;",
"}",
"});",
"Object.defineProperty(Array.prototype, 'reduce',",
"{configurable: true, writable: true, value:",
"function(callback /*, initialValue*/) {",
"if (!this || typeof callback !== 'function') throw TypeError();",
"var t = Object(this), len = t.length >>> 0, k = 0, value;",
"if (arguments.length === 2) {",
"value = arguments[1];",
"} else {",
"while (k < len && !(k in t)) k++;",
"if (k >= len) {",
"throw TypeError('Reduce of empty array with no initial value');",
"}",
"value = t[k++];",
"}",
"for (; k < len; k++) {",
"if (k in t) value = callback(value, t[k], k, t);",
"}",
"return value;",
"}",
"});",
"Object.defineProperty(Array.prototype, 'reduceRight',",
"{configurable: true, writable: true, value:",
"function(callback /*, initialValue*/) {",
"if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();",
"var t = Object(this), len = t.length >>> 0, k = len - 1, value;",
"if (arguments.length >= 2) {",
"value = arguments[1];",
"} else {",
"while (k >= 0 && !(k in t)) k--;",
"if (k < 0) {",
"throw TypeError('Reduce of empty array with no initial value');",
"}",
"value = t[k--];",
"}",
"for (; k >= 0; k--) {",
"if (k in t) value = callback(value, t[k], k, t);",
"}",
"return value;",
"}",
"});",
"Object.defineProperty(Array.prototype, 'some',",
"{configurable: true, writable: true, value:",
"function(fun/*, thisArg*/) {",
"if (!this || typeof fun !== 'function') throw TypeError();",
"var t = Object(this);",
"var len = t.length >>> 0;",
"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;",
"for (var i = 0; i < len; i++) {",
"if (i in t && fun.call(thisArg, t[i], i, t)) {",
"return true;",
"}",
"}",
"return false;",
"}",
"});",
"(function() {",
"var sort_ = Array.prototype.sort;",
"Array.prototype.sort = function(opt_comp) {",
"if (typeof opt_comp !== 'function') {",
"return sort_.call(this);",
"}",
"for (var i = 0; i < this.length; i++) {",
"var changes = 0;",
"for (var j = 0; j < this.length - i - 1; j++) {",
"if (opt_comp(this[j], this[j + 1]) > 0) {",
"var swap = this[j];",
"this[j] = this[j + 1];",
"this[j + 1] = swap;",
"changes++;",
"}",
"}",
"if (!changes) break;",
"}",
"return this;",
"};",
"})();",
"Object.defineProperty(Array.prototype, 'toLocaleString',",
"{configurable: true, writable: true, value:",
"function() {",
"var out = [];",
"for (var i = 0; i < this.length; i++) {",
"out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();",
"}",
"return out.join(',');",
"}",
"});",
"",
);
}),
(r.prototype.initString = function (e) {
var t,
a = this;
(t = function (e) {
return (e = String(e)), a.calledWithNew() ? ((this.data = e), this) : e;
}),
(this.STRING = this.createNativeFunction(t, !0)),
this.setProperty(e, "String", this.STRING),
this.setProperty(
this.STRING,
"fromCharCode",
this.createNativeFunction(String.fromCharCode, !1),
r.NONENUMERABLE_DESCRIPTOR,
);
for (
var n = [
"charAt",
"charCodeAt",
"concat",
"indexOf",
"lastIndexOf",
"slice",
"substr",
"substring",
"toLocaleLowerCase",
"toLocaleUpperCase",
"toLowerCase",
"toUpperCase",
"trim",
],
i = 0;
i < n.length;
i++
)
this.setNativeFunctionPrototype(this.STRING, n[i], String.prototype[n[i]]);
(t = function (e, t, n) {
return (
(t = t ? a.pseudoToNative(t) : void 0),
(n = n ? a.pseudoToNative(n) : void 0),
String(this).localeCompare(e, t, n)
);
}),
this.setNativeFunctionPrototype(this.STRING, "localeCompare", t),
(t = function (e, t) {
a.isa(e, a.REGEXP) && (e = e.data);
var n = String(this).split(e, t);
return a.arrayNativeToPseudo(n);
}),
this.setNativeFunctionPrototype(this.STRING, "split", t),
(t = function (e) {
a.isa(e, a.REGEXP) && (e = e.data);
var t = String(this).match(e);
return t && a.arrayNativeToPseudo(t);
}),
this.setNativeFunctionPrototype(this.STRING, "match", t),
(t = function (e) {
return a.isa(e, a.REGEXP) && (e = e.data), String(this).search(e);
}),
this.setNativeFunctionPrototype(this.STRING, "search", t),
(t = function (e, t) {
return a.isa(e, a.REGEXP) && (e = e.data), String(this).replace(e, t);
}),
this.setNativeFunctionPrototype(this.STRING, "replace", t),
this.polyfills_.push(
"(function() {",
"var replace_ = String.prototype.replace;",
"String.prototype.replace = function(substr, newSubstr) {",
"if (typeof newSubstr !== 'function') {",
"return replace_.call(this, substr, newSubstr);",
"}",
"var str = this;",
"if (substr instanceof RegExp) {",
"var subs = [];",
"var m = substr.exec(str);",
"while (m) {",
"m.push(m.index, str);",
"var inject = newSubstr.apply(null, m);",
"subs.push([m.index, m[0].length, inject]);",
"m = substr.global ? substr.exec(str) : null;",
"}",
"for (var i = subs.length - 1; i >= 0; i--) {",
"str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);",
"}",
"} else {",
"var i = str.indexOf(substr);",
"if (i !== -1) {",
"var inject = newSubstr(str.substr(i, substr.length), i, str);",
"str = str.substring(0, i) + inject + str.substring(i + substr.length);",
"}",
"}",
"return str;",
"};",
"})();",
"if (!String.prototype.endsWith) {",
"String.prototype.endsWith = function(search, this_len) {",
"if (this_len === undefined || this_len > this.length) {",
"this_len = this.length;",
"}",
"return this.substring(this_len - search.length, this_len) === search;",
"};",
"}",
"if (!String.prototype.includes) {",
"String.prototype.includes = function(search, start) {",
"'use strict';",
"if (typeof start !== 'number') {",
"start = 0;",
"}",
" ",
"if (start + search.length > this.length) {",
"return false;",
"} else {",
"return this.indexOf(search, start) !== -1;",
"}",
"};",
"}",
"if (!String.prototype.startsWith) {",
"String.prototype.startsWith = function(search, pos) {",
"return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;",
"};",
"}",
"",
);
}),
(r.prototype.initBoolean = function (e) {
var t,
a = this;
(t = function (e) {
return (e = Boolean(e)), a.calledWithNew() ? ((this.data = e), this) : e;
}),
(this.BOOLEAN = this.createNativeFunction(t, !0)),
this.setProperty(e, "Boolean", this.BOOLEAN);
}),
(r.prototype.initNumber = function (e) {
var t,
a = this;
(t = function (e) {
return (e = Number(e)), a.calledWithNew() ? ((this.data = e), this) : e;
}),
(this.NUMBER = this.createNativeFunction(t, !0)),
this.setProperty(e, "Number", this.NUMBER);
for (
var n = ["MAX_VALUE", "MIN_VALUE", "NaN", "NEGATIVE_INFINITY", "POSITIVE_INFINITY"], i = 0;
i < n.length;
i++
)
this.setProperty(this.NUMBER, n[i], Number[n[i]], r.READONLY_NONENUMERABLE_DESCRIPTOR);
(t = function (e) {
try {
return Number(this).toExponential(e);
} catch (e) {
a.throwException(a.ERROR, e.message);
}
}),
this.setNativeFunctionPrototype(this.NUMBER, "toExponential", t),
(t = function (e) {
try {
return Number(this).toFixed(e);
} catch (e) {
a.throwException(a.ERROR, e.message);
}
}),
this.setNativeFunctionPrototype(this.NUMBER, "toFixed", t),
(t = function (e) {
try {
return Number(this).toPrecision(e);
} catch (e) {
a.throwException(a.ERROR, e.message);
}
}),
this.setNativeFunctionPrototype(this.NUMBER, "toPrecision", t),
(t = function (e) {
try {
return Number(this).toString(e);
} catch (e) {
a.throwException(a.ERROR, e.message);
}
}),
this.setNativeFunctionPrototype(this.NUMBER, "toString", t),
(t = function (e, t) {
return (
(e = e ? a.pseudoToNative(e) : void 0),
(t = t ? a.pseudoToNative(t) : void 0),
Number(this).toLocaleString(e, t)
);
}),
this.setNativeFunctionPrototype(this.NUMBER, "toLocaleString", t);
}),
(r.prototype.initDate = function (e) {
var t,
a = this;
(t = function (e, t) {
if (!a.calledWithNew()) return Date();
var n = [null].concat(Array.from(arguments));
return (this.data = new (Function.prototype.bind.apply(Date, n))()), this;
}),
(this.DATE = this.createNativeFunction(t, !0)),
(this.DATE_PROTO = this.DATE.properties.prototype),
this.setProperty(e, "Date", this.DATE),
this.setProperty(this.DATE, "now", this.createNativeFunction(Date.now, !1), r.NONENUMERABLE_DESCRIPTOR),
this.setProperty(this.DATE, "parse", this.createNativeFunction(Date.parse, !1), r.NONENUMERABLE_DESCRIPTOR),
this.setProperty(this.DATE, "UTC", this.createNativeFunction(Date.UTC, !1), r.NONENUMERABLE_DESCRIPTOR);
for (
var n = [
"getDate",
"getDay",
"getFullYear",
"getHours",
"getMilliseconds",
"getMinutes",
"getMonth",
"getSeconds",
"getTime",
"getTimezoneOffset",
"getUTCDate",
"getUTCDay",
"getUTCFullYear",
"getUTCHours",
"getUTCMilliseconds",
"getUTCMinutes",
"getUTCMonth",
"getUTCSeconds",
"getYear",
"setDate",
"setFullYear",
"setHours",
"setMilliseconds",
"setMinutes",
"setMonth",
"setSeconds",
"setTime",
"setUTCDate",
"setUTCFullYear",
"setUTCHours",
"setUTCMilliseconds",
"setUTCMinutes",
"setUTCMonth",
"setUTCSeconds",
"setYear",
"toDateString",
"toISOString",
"toJSON",
"toGMTString",
"toLocaleDateString",
"toLocaleString",
"toLocaleTimeString",
"toTimeString",
"toUTCString",
],
i = 0;
i < n.length;
i++
)
(t = (function (e) {
return function (t) {
for (var n = [], r = 0; r < arguments.length; r++) n[r] = a.pseudoToNative(arguments[r]);
return this.data[e].apply(this.data, n);
};
})(n[i])),
this.setNativeFunctionPrototype(this.DATE, n[i], t);
}),
(r.prototype.initRegExp = function (e) {
var t,
a = this;
(t = function (e, t) {
if (a.calledWithNew()) var n = this;
else n = a.createObjectProto(a.REGEXP_PROTO);
return (e = e ? e.toString() : ""), (t = t ? t.toString() : ""), a.populateRegExp(n, new RegExp(e, t)), n;
}),
(this.REGEXP = this.createNativeFunction(t, !0)),
(this.REGEXP_PROTO = this.REGEXP.properties.prototype),
this.setProperty(e, "RegExp", this.REGEXP),
this.setProperty(this.REGEXP.properties.prototype, "global", void 0, r.READONLY_NONENUMERABLE_DESCRIPTOR),
this.setProperty(this.REGEXP.properties.prototype, "ignoreCase", void 0, r.READONLY_NONENUMERABLE_DESCRIPTOR),
this.setProperty(this.REGEXP.properties.prototype, "multiline", void 0, r.READONLY_NONENUMERABLE_DESCRIPTOR),
this.setProperty(this.REGEXP.properties.prototype, "source", "(?:)", r.READONLY_NONENUMERABLE_DESCRIPTOR),
(t = function (e) {
return this.data.test(e);
}),
this.setNativeFunctionPrototype(this.REGEXP, "test", t),
(t = function (e) {
(e = e.toString()), (this.data.lastIndex = Number(a.getProperty(this, "lastIndex")));
var t = this.data.exec(e);
if ((a.setProperty(this, "lastIndex", this.data.lastIndex), t)) {
for (var n = a.createObjectProto(a.ARRAY_PROTO), r = 0; r < t.length; r++) a.setProperty(n, r, t[r]);
return a.setProperty(n, "index", t.index), a.setProperty(n, "input", t.input), n;
}
return null;
}),
this.setNativeFunctionPrototype(this.REGEXP, "exec", t);
}),
(r.prototype.initError = function (e) {
var t = this;
(this.ERROR = this.createNativeFunction(function (e) {
if (t.calledWithNew()) var a = this;
else a = t.createObject(t.ERROR);
return e && t.setProperty(a, "message", String(e), r.NONENUMERABLE_DESCRIPTOR), a;
}, !0)),
this.setProperty(e, "Error", this.ERROR),
this.setProperty(this.ERROR.properties.prototype, "message", "", r.NONENUMERABLE_DESCRIPTOR),
this.setProperty(this.ERROR.properties.prototype, "name", "Error", r.NONENUMERABLE_DESCRIPTOR);
var a = function (a) {
var n = t.createNativeFunction(function (e) {
if (t.calledWithNew()) var a = this;
else a = t.createObject(n);
return e && t.setProperty(a, "message", String(e), r.NONENUMERABLE_DESCRIPTOR), a;
}, !0);
return (
t.setProperty(n, "prototype", t.createObject(t.ERROR)),
t.setProperty(n.properties.prototype, "name", a, r.NONENUMERABLE_DESCRIPTOR),
t.setProperty(e, a, n),
n
);
};
(this.EVAL_ERROR = a("EvalError")),
(this.RANGE_ERROR = a("RangeError")),
(this.REFERENCE_ERROR = a("ReferenceError")),
(this.SYNTAX_ERROR = a("SyntaxError")),
(this.TYPE_ERROR = a("TypeError")),
(this.URI_ERROR = a("URIError"));
}),
(r.prototype.initMath = function (e) {
var t = this.createObjectProto(this.OBJECT_PROTO);
this.setProperty(e, "Math", t);
for (var a = ["E", "LN2", "LN10", "LOG2E", "LOG10E", "PI", "SQRT1_2", "SQRT2"], n = 0; n < a.length; n++)
this.setProperty(t, a[n], Math[a[n]], r.READONLY_NONENUMERABLE_DESCRIPTOR);
var i = [
"abs",
"acos",
"asin",
"atan",
"atan2",
"ceil",
"cos",
"exp",
"floor",
"log",
"max",
"min",
"pow",
"random",
"round",
"sin",
"sqrt",
"tan",
];
for (n = 0; n < i.length; n++)
this.setProperty(t, i[n], this.createNativeFunction(Math[i[n]], !1), r.NONENUMERABLE_DESCRIPTOR);
}),
(r.prototype.initJSON = function (e) {
var t = this,
a = t.createObjectProto(this.OBJECT_PROTO);
this.setProperty(e, "JSON", a);
var n = function (e) {
try {
var a = JSON.parse(e.toString());
} catch (e) {
t.throwException(t.SYNTAX_ERROR, e.message);
}
return t.nativeToPseudo(a);
};
this.setProperty(a, "parse", this.createNativeFunction(n, !1)),
(n = function (e) {
var a = t.pseudoToNative(e);
try {
var n = JSON.stringify(a);
} catch (e) {
t.throwException(t.TYPE_ERROR, e.message);
}
return n;
}),
this.setProperty(a, "stringify", this.createNativeFunction(n, !1));
}),
(r.prototype.isa = function (e, t) {
if (null == e || !t) return !1;
var a = t.properties.prototype;
if (e === a) return !0;
for (e = this.getPrototype(e); e; ) {
if (e === a) return !0;
e = e.proto;
}
return !1;
}),
(r.legalArrayLength = function (e) {
var t = e >>> 0;
return t === Number(e) ? t : NaN;
}),
(r.legalArrayIndex = function (e) {
var t = e >>> 0;
return String(t) === String(e) && 4294967295 !== t ? t : NaN;
}),
r.Value,
(r.Object = function (e) {
(this.getter = Object.create(null)),
(this.setter = Object.create(null)),
(this.properties = Object.create(null)),
(this.proto = e);
}),
(r.Object.prototype.proto = null),
(r.Object.prototype.isObject = !0),
(r.Object.prototype.class = "Object"),
(r.Object.prototype.data = null),
(r.Object.prototype.toString = function () {
if ("Array" === this.class) {
(n = r.toStringCycles_).push(this);
try {
for (var e = [], t = 0; t < this.properties.length; t++) {
var a = this.properties[t];
e[t] = a && a.isObject && -1 !== n.indexOf(a) ? "..." : a;
}
} finally {
n.pop();
}
return e.join(",");
}
if ("Error" === this.class) {
var n, i, o;
if (-1 !== (n = r.toStringCycles_).indexOf(this)) return "[object Error]";
var s = this;
do {
if ("name" in s.properties) {
i = s.properties.name;
break;
}
} while ((s = s.proto));
s = this;
do {
if ("message" in s.properties) {
o = s.properties.message;
break;
}
} while ((s = s.proto));
n.push(this);
try {
(i = i && i.toString()), (o = o && o.toString());
} finally {
n.pop();
}
return o ? i + ": " + o : String(i);
}
return null !== this.data ? String(this.data) : "[object " + this.class + "]";
}),
(r.Object.prototype.valueOf = function () {
return void 0 === this.data || null === this.data || this.data instanceof RegExp
? this
: this.data instanceof Date
? this.data.valueOf()
: this.data;
}),
(r.prototype.createObject = function (e) {
return this.createObjectProto(e && e.properties.prototype);
}),
(r.prototype.createObjectProto = function (e) {
if ("object" != typeof e) throw Error("Non object prototype");
var t = new r.Object(e);
return (
this.isa(t, this.FUNCTION) &&
(this.setProperty(t, "prototype", this.createObjectProto(this.OBJECT_PROTO || null)),
(t.class = "Function")),
this.isa(t, this.ARRAY) &&
(this.setProperty(t, "length", 0, { configurable: !1, enumerable: !1, writable: !0 }), (t.class = "Array")),
this.isa(t, this.ERROR) && (t.class = "Error"),
t
);
}),
(r.prototype.populateRegExp = function (e, t) {
(e.data = t),
this.setProperty(e, "lastIndex", t.lastIndex, r.NONENUMERABLE_DESCRIPTOR),
this.setProperty(e, "source", t.source, r.READONLY_NONENUMERABLE_DESCRIPTOR),
this.setProperty(e, "global", t.global, r.READONLY_NONENUMERABLE_DESCRIPTOR),
this.setProperty(e, "ignoreCase", t.ignoreCase, r.READONLY_NONENUMERABLE_DESCRIPTOR),
this.setProperty(e, "multiline", t.multiline, r.READONLY_NONENUMERABLE_DESCRIPTOR);
}),
(r.prototype.createFunction = function (e, t) {
var a = this.createObjectProto(this.FUNCTION_PROTO);
return (
(a.parentScope = t),
(a.node = e),
this.setProperty(a, "length", a.node.params.length, r.READONLY_DESCRIPTOR),
a
);
}),
(r.prototype.createNativeFunction = function (e, t) {
var a = this.createObjectProto(this.FUNCTION_PROTO);
return (
(a.nativeFunc = e),
(e.id = this.functionCounter_++),
this.setProperty(a, "length", e.length, r.READONLY_DESCRIPTOR),
t
? this.setProperty(a.properties.prototype, "constructor", a, r.NONENUMERABLE_DESCRIPTOR)
: !1 === t && ((a.illegalConstructor = !0), this.setProperty(a, "prototype", void 0)),
a
);
}),
(r.prototype.createAsyncFunction = function (e) {
var t = this.createObjectProto(this.FUNCTION_PROTO);
return (
(t.asyncFunc = e),
(e.id = this.functionCounter_++),
this.setProperty(t, "length", e.length, r.READONLY_DESCRIPTOR),
t
);
}),
(r.prototype.nativeToPseudo = function (e) {
if (("object" != typeof e && "function" != typeof e) || null === e) return e;
if (e instanceof RegExp) {
var t = this.createObjectProto(this.REGEXP_PROTO);
return this.populateRegExp(t, e), t;
}
if (e instanceof Date) {
var a = this.createObjectProto(this.DATE_PROTO);
return (a.data = e), a;
}
if (e instanceof Function) {
var n = this;
return this.createNativeFunction(function () {
return n.nativeToPseudo(
e.apply(
n,
Array.prototype.slice.call(arguments).map(function (e) {
return n.pseudoToNative(e);
}),
),
);
}, void 0);
}
var r;
if (Array.isArray(e)) {
r = this.createObjectProto(this.ARRAY_PROTO);
for (var i = 0; i < e.length; i++) i in e && this.setProperty(r, i, this.nativeToPseudo(e[i]));
} else
for (var o in ((r = this.createObjectProto(this.OBJECT_PROTO)), e))
this.setProperty(r, o, this.nativeToPseudo(e[o]));
return r;
}),
(r.prototype.pseudoToNative = function (e, t) {
if (("object" != typeof e && "function" != typeof e) || null === e) return e;
if (this.isa(e, this.REGEXP)) return e.data;
if (this.isa(e, this.DATE)) return e.data;
var a,
n = t || { pseudo: [], native: [] };
if (-1 !== (i = n.pseudo.indexOf(e))) return n.native[i];
if ((n.pseudo.push(e), this.isa(e, this.ARRAY))) {
(a = []), n.native.push(a);
for (var r = this.getProperty(e, "length"), i = 0; i < r; i++)
this.hasProperty(e, i) && (a[i] = this.pseudoToNative(this.getProperty(e, i), n));
} else {
var o;
for (var s in ((a = {}), n.native.push(a), e.properties))
(o = e.properties[s]), (a[s] = this.pseudoToNative(o, n));
}
return n.pseudo.pop(), n.native.pop(), a;
}),
(r.prototype.arrayNativeToPseudo = function (e) {
for (
var t = this.createObjectProto(this.ARRAY_PROTO), a = Object.getOwnPropertyNames(e), n = 0;
n < a.length;
n++
)
this.setProperty(t, a[n], e[a[n]]);
return t;
}),
(r.prototype.arrayPseudoToNative = function (e) {
var t = [];
for (var a in e.properties) t[a] = this.getProperty(e, a);
return (t.length = r.legalArrayLength(this.getProperty(e, "length")) || 0), t;
}),
(r.prototype.getPrototype = function (e) {
switch (typeof e) {
case "number":
return this.NUMBER.properties.prototype;
case "boolean":
return this.BOOLEAN.properties.prototype;
case "string":
return this.STRING.properties.prototype;
}
return e ? e.proto : null;
}),
(r.prototype.getProperty = function (e, t, a) {
if (((t = String(t)), null == e)) {
let n;
null != a && null != a.loc && null != a.loc.start && (n = a.loc.start.line),
this.throwException(this.TYPE_ERROR, "Cannot read property '" + t + "' of " + e, n);
}
if ("length" === t) {
if (this.isa(e, this.STRING)) return String(e).length;
} else if (t.charCodeAt(0) < 64 && this.isa(e, this.STRING)) {
var n = r.legalArrayIndex(t);
if (!isNaN(n) && n < String(e).length) return String(e)[n];
}
do {
if (e.properties && t in e.properties) {
var i = e.getter[t];
return i ? ((i.isGetter = !0), i) : e.properties[t];
}
} while ((e = this.getPrototype(e)));
}),
(r.prototype.hasProperty = function (e, t) {
if (!e.isObject) throw TypeError("Primitive data type has no properties");
if ("length" === (t = String(t)) && this.isa(e, this.STRING)) return !0;
if (this.isa(e, this.STRING)) {
var a = r.legalArrayIndex(t);
if (!isNaN(a) && a < String(e).length) return !0;
}
do {
if (e.properties && t in e.properties) return !0;
} while ((e = this.getPrototype(e)));
return !1;
}),
(r.prototype.setProperty = function (e, t, a, n) {
(t = String(t)),
null == e && this.throwException(this.TYPE_ERROR, "Cannot set property '" + t + "' of " + e),
n &&
("get" in n || "set" in n) &&
("value" in n || "writable" in n) &&
this.throwException(
this.TYPE_ERROR,
"Invalid property descriptor. Cannot both specify accessors and a value or writable attribute",
);
var i = !this.stateStack || this.getScope().strict;
if (e.isObject) {
if (this.isa(e, this.STRING)) {
var o = r.legalArrayIndex(t);
if ("length" === t || (!isNaN(o) && o < String(e).length))
return void (
i &&
this.throwException(
this.TYPE_ERROR,
"Cannot assign to read only property '" + t + "' of String '" + e.data + "'",
)
);
}
if ("Array" === e.class) {
var s,
l = e.properties.length;
if ("length" === t) {
if (n) {
if (!("value" in n)) return;
a = n.value;
}
if (
((a = r.legalArrayLength(a)),
isNaN(a) && this.throwException(this.RANGE_ERROR, "Invalid array length"),
a < l)
)
for (s in e.properties) (s = r.legalArrayIndex(s)), !isNaN(s) && a <= s && delete e.properties[s];
} else isNaN((s = r.legalArrayIndex(t))) || (e.properties.length = Math.max(l, s + 1));
}
if (!e.preventExtensions || t in e.properties)
if (n) {
"get" in n && (n.get ? (e.getter[t] = n.get) : delete e.getter[t]),
"set" in n && (n.set ? (e.setter[t] = n.set) : delete e.setter[t]);
var c = {};
"configurable" in n && (c.configurable = n.configurable),
"enumerable" in n && (c.enumerable = n.enumerable),
"writable" in n && ((c.writable = n.writable), delete e.getter[t], delete e.setter[t]),
"value" in n
? ((c.value = n.value), delete e.getter[t], delete e.setter[t])
: a !== r.VALUE_IN_DESCRIPTOR && ((c.value = a), delete e.getter[t], delete e.setter[t]);
try {
Object.defineProperty(e.properties, t, c);
} catch (e) {
this.throwException(this.TYPE_ERROR, "Cannot redefine property: " + t);
}
} else {
if (a === r.VALUE_IN_DESCRIPTOR) throw ReferenceError("Value not specified.");
for (var u = e; !(t in u.properties); )
if (!(u = this.getPrototype(u))) {
u = e;
break;
}
if (u.setter && u.setter[t]) return u.setter[t];
if (u.getter && u.getter[t])
i &&
this.throwException(
this.TYPE_ERROR,
"Cannot set property '" + t + "' of object '" + e + "' which only has a getter",
);
else
try {
e.properties[t] = a;
} catch (a) {
i &&
this.throwException(
this.TYPE_ERROR,
"Cannot assign to read only property '" + t + "' of object '" + e + "'",
);
}
}
else i && this.throwException(this.TYPE_ERROR, "Can't add property '" + t + "', object is not extensible");
} else i && this.throwException(this.TYPE_ERROR, "Can't create property '" + t + "' on '" + e + "'");
}),
(r.prototype.setNativeFunctionPrototype = function (e, t, a) {
this.setProperty(e.properties.prototype, t, this.createNativeFunction(a, !1), r.NONENUMERABLE_DESCRIPTOR);
}),
(r.prototype.getScope = function () {
var e = this.stateStack[this.stateStack.length - 1].scope;
if (!e) throw Error("No scope found.");
return e;
}),
(r.prototype.createScope = function (e, t) {
var a = this.createObjectProto(null);
if (
((a.parentScope = t), t || this.initGlobalScope(a), this.populateScope_(e, a), (a.strict = !1), t && t.strict)
)
a.strict = !0;
else {
var n = e.body && e.body[0];
n &&
n.expression &&
"Literal" === n.expression.type &&
"use strict" === n.expression.value &&
(a.strict = !0);
}
return a;
}),
(r.prototype.createSpecialScope = function (e, t) {
if (!e) throw Error("parentScope required");
var a = t || this.createObjectProto(null);
return (a.parentScope = e), (a.strict = e.strict), a;
}),
(r.prototype.getValueFromScope = function (e, t) {
for (var a = this.getScope(); a && a !== this.global; ) {
if (e in a.properties) return a.properties[e];
a = a.parentScope;
}
if (a === this.global && this.hasProperty(a, e)) return this.getProperty(a, e);
var n,
r = this.stateStack[this.stateStack.length - 1].node;
("UnaryExpression" === r.type && "typeof" === r.operator) ||
(null != t && null != t.loc && null != t.loc.start && (n = t.loc.start.line),
this.throwException(this.REFERENCE_ERROR, e + " is not defined", n));
}),
(r.prototype.setValueToScope = function (e, t) {
for (var a = this.getScope(), n = a.strict; a && a !== this.global; ) {
if (e in a.properties) return void (a.properties[e] = t);
a = a.parentScope;
}
if (a === this.global && (!n || this.hasProperty(a, e))) return this.setProperty(a, e, t);
this.throwException(this.REFERENCE_ERROR, e + " is not defined");
}),
(r.prototype.populateScope_ = function (e, t) {
if ("VariableDeclaration" === e.type)
for (var a = 0; a < e.declarations.length; a++)
this.setProperty(t, e.declarations[a].id.name, void 0, r.VARIABLE_DESCRIPTOR);
else {
if ("FunctionDeclaration" === e.type)
return void this.setProperty(t, e.id.name, this.createFunction(e, t), r.VARIABLE_DESCRIPTOR);
if ("FunctionExpression" === e.type) return;
if ("ExpressionStatement" === e.type) return;
}
var n = e.constructor;
for (var i in e) {
var o = e[i];
if (o && "object" == typeof o)
if (Array.isArray(o))
for (a = 0; a < o.length; a++) o[a] && o[a].constructor === n && this.populateScope_(o[a], t);
else o.constructor === n && this.populateScope_(o, t);
}
}),
(r.prototype.stripLocations_ = function (e, t, a) {
for (var n in (t ? (e.start = t) : delete e.start, a ? (e.end = a) : delete e.end, e))
if (e.hasOwnProperty(n)) {
var r = e[n];
r && "object" == typeof r && this.stripLocations_(r, t, a);
}
}),
(r.prototype.calledWithNew = function () {
return this.stateStack[this.stateStack.length - 1].isConstructor;
}),
(r.prototype.getValue = function (e, t) {
return e[0] === r.SCOPE_REFERENCE ? this.getValueFromScope(e[1], t) : this.getProperty(e[0], e[1], t);
}),
(r.prototype.setValue = function (e, t) {
return e[0] === r.SCOPE_REFERENCE ? this.setValueToScope(e[1], t) : this.setProperty(e[0], e[1], t);
}),
(r.Completion = { NORMAL: 0, BREAK: 1, CONTINUE: 2, RETURN: 3, THROW: 4 }),
(r.prototype.throwException = function (e, t, a) {
if (void 0 === t) var n = e;
else {
n = this.createObject(e);
this.setProperty(n, "message", t, r.NONENUMERABLE_DESCRIPTOR);
}
var i;
throw (
(null != a && (i = this.getErrorLineNumberMessage(a)),
this.unwind(r.Completion.THROW, n, void 0, i),
r.STEP_ERROR)
);
}),
(r.prototype.unwind = function (e, t, a, n = "") {
if (e === r.Completion.NORMAL) throw TypeError("Should not unwind for NORMAL completions");
for (var i = this.stateStack; i.length > 0; i.pop()) {
var o = i[i.length - 1];
switch (o.node.type) {
case "TryStatement":
return void (o.cv = { type: e, value: t, label: a });
case "CallExpression":
case "NewExpression":
if (e === r.Completion.RETURN) return void (o.value = t);
if (e !== r.Completion.THROW) throw Error("Unsynatctic break/continue not rejected by Acorn");
}
if (e === r.Completion.BREAK) {
if (a ? o.labels && -1 !== o.labels.indexOf(a) : o.isLoop || o.isSwitch) return void i.pop();
} else if (e === r.Completion.CONTINUE && (a ? o.labels && -1 !== o.labels.indexOf(a) : o.isLoop)) return;
}
var s;
if (this.isa(t, this.ERROR)) {
var l = {
EvalError: EvalError,
RangeError: RangeError,
ReferenceError: ReferenceError,
SyntaxError: SyntaxError,
TypeError: TypeError,
URIError: URIError,
},
c = this.getProperty(t, "name").toString(),
u = this.getProperty(t, "message").valueOf();
s = (e = l[c] || Error)(u + n);
} else s = String(t) + n;
throw s;
}),
(r.prototype.createGetter_ = function (e, t) {
var a = Array.isArray(t) ? t[0] : t,
n = new this.nodeConstructor();
n.type = "CallExpression";
var i = new r.State(n, this.stateStack[this.stateStack.length - 1].scope);
return (i.doneCallee_ = !0), (i.funcThis_ = a), (i.func_ = e), (i.doneArgs_ = !0), (i.arguments_ = []), i;
}),
(r.prototype.createSetter_ = function (e, t, a) {
var n = Array.isArray(t) ? t[0] : this.global,
i = new this.nodeConstructor();
i.type = "CallExpression";
var o = new r.State(i, this.stateStack[this.stateStack.length - 1].scope);
return (o.doneCallee_ = !0), (o.funcThis_ = n), (o.func_ = e), (o.doneArgs_ = !0), (o.arguments_ = [a]), o;
}),
(r.State = function (e, t) {
(this.node = e), (this.scope = t);
}),
(r.prototype.stepArrayExpression = function (e, t, a) {
var n = a.elements,
i = t.n_ || 0;
for (
t.array_
? (this.setProperty(t.array_, i, t.value), i++)
: ((t.array_ = this.createObjectProto(this.ARRAY_PROTO)), (t.array_.properties.length = n.length));
i < n.length;
) {
if (n[i]) return (t.n_ = i), new r.State(n[i], t.scope);
i++;
}
e.pop(), (e[e.length - 1].value = t.array_);
}),
(r.prototype.stepAssignmentExpression = function (e, t, a) {
if (!t.doneLeft_) {
t.doneLeft_ = !0;
var n = new r.State(a.left, t.scope);
return (n.components = !0), n;
}
if (!t.doneRight_) {
if (
(t.leftReference_ || (t.leftReference_ = t.value),
t.doneGetter_ && (t.leftValue_ = t.value),
!t.doneGetter_ && "=" !== a.operator)
) {
var i = this.getValue(t.leftReference_, a);
if (((t.leftValue_ = i), i && "object" == typeof i && i.isGetter)) {
(i.isGetter = !1), (t.doneGetter_ = !0);
var o = i;
return this.createGetter_(o, t.leftReference_);
}
}
return (t.doneRight_ = !0), new r.State(a.right, t.scope);
}
if (t.doneSetter_) return e.pop(), void (e[e.length - 1].value = t.setterValue_);
var s = t.leftValue_,
l = t.value;
switch (a.operator) {
case "=":
s = l;
break;
case "+=":
s += l;
break;
case "-=":
s -= l;
break;
case "*=":
s *= l;
break;
case "/=":
s /= l;
break;
case "%=":
s %= l;
break;
case "<<=":
s <<= l;
break;
case ">>=":
s >>= l;
break;
case ">>>=":
s >>>= l;
break;
case "&=":
s &= l;
break;
case "^=":
s ^= l;
break;
case "|=":
s |= l;
break;
default:
throw SyntaxError("Unknown assignment expression: " + a.operator);
}
var c = this.setValue(t.leftReference_, s);
if (c) return (t.doneSetter_ = !0), (t.setterValue_ = s), this.createSetter_(c, t.leftReference_, s);
e.pop(), (e[e.length - 1].value = s);
}),
(r.prototype.stepBinaryExpression = function (e, t, a) {
if (!t.doneLeft_) return (t.doneLeft_ = !0), new r.State(a.left, t.scope);
if (!t.doneRight_) return (t.doneRight_ = !0), (t.leftValue_ = t.value), new r.State(a.right, t.scope);
e.pop();
var n,
i = t.leftValue_,
o = t.value;
switch (a.operator) {
case "==":
n = i == o;
break;
case "!=":
n = i != o;
break;
case "===":
n = i === o;
break;
case "!==":
n = i !== o;
break;
case ">":
n = i > o;
break;
case ">=":
n = i >= o;
break;
case "<":
n = i < o;
break;
case "<=":
n = i <= o;
break;
case "+":
n = i + o;
break;
case "-":
n = i - o;
break;
case "*":
n = i * o;
break;
case "/":
n = i / o;
break;
case "%":
n = i % o;
break;
case "&":
n = i & o;
break;
case "|":
n = i | o;
break;
case "^":
n = i ^ o;
break;
case "<<":
n = i << o;
break;
case ">>":
n = i >> o;
break;
case ">>>":
n = i >>> o;
break;
case "in":
if (!o || !o.isObject) {
let e = this.getErrorLineNumber(a);
this.throwException(this.TYPE_ERROR, "'in' expects an object, not '" + o + "'", e);
}
n = this.hasProperty(o, i);
break;
case "instanceof":
if (!this.isa(o, this.FUNCTION)) {
let e = this.getErrorLineNumber(a);
this.throwException(this.TYPE_ERROR, "Right-hand side of instanceof is not an object", e);
}
n = !!i.isObject && this.isa(i, o);
break;
default:
throw SyntaxError("Unknown binary operator: " + a.operator);
}
e[e.length - 1].value = n;
}),
(r.prototype.stepBlockStatement = function (e, t, a) {
var n = t.n_ || 0,
i = a.body[n];
if (i) return (t.n_ = n + 1), new r.State(i, t.scope);
e.pop();
}),
(r.prototype.stepBreakStatement = function (e, t, a) {
var n = a.label && a.label.name;
this.unwind(r.Completion.BREAK, void 0, n);
}),
(r.prototype.stepCallExpression = function (e, t, a) {
if (!t.doneCallee_) {
t.doneCallee_ = 1;
var i = new r.State(a.callee, t.scope);
return (i.components = !0), i;
}
if (1 === t.doneCallee_) {
t.doneCallee_ = 2;
var o = t.value;
if (Array.isArray(o)) {
if (
((t.func_ = this.getValue(o, a)),
o[0] === r.SCOPE_REFERENCE ? (t.directEval_ = "eval" === o[1]) : (t.funcThis_ = o[0]),
(o = t.func_) && "object" == typeof o && o.isGetter)
)
return (o.isGetter = !1), (t.doneCallee_ = 1), this.createGetter_(o, t.value);
} else t.func_ = o;
(t.arguments_ = []), (t.n_ = 0);
}
o = t.func_;
if (!t.doneArgs_) {
if ((0 !== t.n_ && t.arguments_.push(t.value), a.arguments[t.n_]))
return new r.State(a.arguments[t.n_++], t.scope);
if ("NewExpression" === a.type) {
if (o.illegalConstructor) {
let e = this.getErrorLineNumber(a);
this.throwException(this.TYPE_ERROR, o + " is not a constructor", e);
}
var s = o.properties.prototype;
("object" == typeof s && null !== s) || (s = this.OBJECT_PROTO),
(t.funcThis_ = this.createObjectProto(s)),
(t.isConstructor = !0);
} else void 0 === t.funcThis_ && (t.funcThis_ = t.scope.strict ? void 0 : this.global);
t.doneArgs_ = !0;
}
if (t.doneExec_)
e.pop(),
t.isConstructor && "object" != typeof t.value
? (e[e.length - 1].value = t.funcThis_)
: (e[e.length - 1].value = t.value);
else {
if (((t.doneExec_ = !0), !o || !o.isObject)) {
let e = this.getErrorLineNumber(a);
this.throwException(this.TYPE_ERROR, o + " is not a function", e);
}
var l = o.node;
if (l) {
for (var c = this.createScope(l.body, o.parentScope), u = 0; u < l.params.length; u++) {
var m = l.params[u].name,
h = t.arguments_.length > u ? t.arguments_[u] : void 0;
this.setProperty(c, m, h);
}
var d = this.createObjectProto(this.ARRAY_PROTO);
for (u = 0; u < t.arguments_.length; u++) this.setProperty(d, u, t.arguments_[u]);
this.setProperty(c, "arguments", d);
var p = l.id && l.id.name;
return (
p && this.setProperty(c, p, o),
this.setProperty(c, "this", t.funcThis_, r.READONLY_DESCRIPTOR),
(t.value = void 0),
new r.State(l.body, c)
);
}
if (o.eval) {
var f = t.arguments_[0];
if ("string" == typeof f) {
try {
var g = n.a(f.toString(), r.PARSE_OPTIONS);
} catch (e) {
let t = this.getErrorLineNumber(a);
this.throwException(this.SYNTAX_ERROR, "Invalid code: " + e.message, t);
}
var y = new this.nodeConstructor();
return (
(y.type = "EvalProgram_"),
(y.body = g.body),
this.stripLocations_(y, a.start, a.end),
(c = t.directEval_ ? t.scope : this.global).strict
? (c = this.createScope(g, c))
: this.populateScope_(g, c),
(this.value = void 0),
new r.State(y, c)
);
}
t.value = f;
} else if (o.nativeFunc) t.value = o.nativeFunc.apply(t.funcThis_, t.arguments_);
else {
if (o.asyncFunc) {
var b = this,
E = t.arguments_.concat(function (e) {
(t.value = e), (b.paused_ = !1);
});
return (this.paused_ = !0), void o.asyncFunc.apply(t.funcThis_, E);
}
{
let e = this.getErrorLineNumber(a);
this.throwException(this.TYPE_ERROR, o.class + " is not a function", e);
}
}
}
}),
(r.prototype.stepCatchClause = function (e, t, a) {
if (!t.done_) {
t.done_ = !0;
var n = this.createSpecialScope(t.scope);
return this.setProperty(n, a.param.name, t.throwValue), new r.State(a.body, n);
}
e.pop();
}),
(r.prototype.stepConditionalExpression = function (e, t, a) {
var n = t.mode_ || 0;
if (0 === n) return (t.mode_ = 1), new r.State(a.test, t.scope);
if (1 === n) {
t.mode_ = 2;
var i = Boolean(t.value);
if (i && a.consequent) return new r.State(a.consequent, t.scope);
if (!i && a.alternate) return new r.State(a.alternate, t.scope);
this.value = void 0;
}
e.pop(), "ConditionalExpression" === a.type && (e[e.length - 1].value = t.value);
}),
(r.prototype.stepContinueStatement = function (e, t, a) {
var n = a.label && a.label.name;
this.unwind(r.Completion.CONTINUE, void 0, n);
}),
(r.prototype.stepDebuggerStatement = function (e, t, a) {
e.pop();
}),
(r.prototype.stepDoWhileStatement = function (e, t, a) {
if (("DoWhileStatement" === a.type && void 0 === t.test_ && ((t.value = !0), (t.test_ = !0)), !t.test_))
return (t.test_ = !0), new r.State(a.test, t.scope);
if (t.value) {
if (a.body) return (t.test_ = !1), (t.isLoop = !0), new r.State(a.body, t.scope);
} else e.pop();
}),
(r.prototype.stepEmptyStatement = function (e, t, a) {
e.pop();
}),
(r.prototype.stepEvalProgram_ = function (e, t, a) {
var n = t.n_ || 0,
i = a.body[n];
if (i) return (t.n_ = n + 1), new r.State(i, t.scope);
e.pop(), (e[e.length - 1].value = this.value);
}),
(r.prototype.stepExpressionStatement = function (e, t, a) {
if (!t.done_) return (t.done_ = !0), new r.State(a.expression, t.scope);
e.pop(), (this.value = t.value);
}),
(r.prototype.stepForInStatement = function (e, t, a) {
if (!t.doneInit_ && ((t.doneInit_ = !0), a.left.declarations && a.left.declarations[0].init)) {
if (t.scope.strict) {
let e = this.getErrorLineNumber(a);
this.throwException(this.SYNTAX_ERROR, "for-in loop variable declaration may not have an initializer.", e);
}
return new r.State(a.left, t.scope);
}
if (!t.doneObject_)
return (t.doneObject_ = !0), t.variable_ || (t.variable_ = t.value), new r.State(a.right, t.scope);
if (
(t.isLoop || ((t.isLoop = !0), (t.object_ = t.value), (t.visited_ = Object.create(null))), void 0 === t.name_)
)
e: for (;;) {
if (t.object_ && t.object_.isObject)
for (t.props_ || (t.props_ = Object.getOwnPropertyNames(t.object_.properties)); ; ) {
if (void 0 === (n = t.props_.shift())) break;
if (
Object.prototype.hasOwnProperty.call(t.object_.properties, n) &&
!t.visited_[n] &&
((t.visited_[n] = !0), Object.prototype.propertyIsEnumerable.call(t.object_.properties, n))
) {
t.name_ = n;
break e;
}
}
else if (null !== t.object_ && void 0 !== t.object_)
for (t.props_ || (t.props_ = Object.getOwnPropertyNames(t.object_)); ; ) {
var n;
if (void 0 === (n = t.props_.shift())) break;
if (((t.visited_[n] = !0), Object.prototype.propertyIsEnumerable.call(t.object_, n))) {
t.name_ = n;
break e;
}
}
if (((t.object_ = this.getPrototype(t.object_)), (t.props_ = null), null === t.object_))
return void e.pop();
}
if (!t.doneVariable_) {
t.doneVariable_ = !0;
var i = a.left;
if ("VariableDeclaration" !== i.type) {
t.variable_ = null;
var o = new r.State(i, t.scope);
return (o.components = !0), o;
}
t.variable_ = [r.SCOPE_REFERENCE, i.declarations[0].id.name];
}
if ((t.variable_ || (t.variable_ = t.value), !t.doneSetter_)) {
t.doneSetter_ = !0;
var s = t.name_,
l = this.setValue(t.variable_, s);
if (l) return this.createSetter_(l, t.variable_, s);
}
return (
(t.name_ = void 0),
(t.doneVariable_ = !1),
(t.doneSetter_ = !1),
a.body ? new r.State(a.body, t.scope) : void 0
);
}),
(r.prototype.stepForStatement = function (e, t, a) {
var n = t.mode_ || 0;
if (0 === n) {
if (((t.mode_ = 1), a.init)) return new r.State(a.init, t.scope);
} else if (1 === n) {
if (((t.mode_ = 2), a.test)) return new r.State(a.test, t.scope);
} else if (2 === n) {
if (((t.mode_ = 3), !a.test || t.value)) return (t.isLoop = !0), new r.State(a.body, t.scope);
e.pop();
} else if (3 === n && ((t.mode_ = 1), a.update)) return new r.State(a.update, t.scope);
}),
(r.prototype.stepFunctionDeclaration = function (e, t, a) {
e.pop();
}),
(r.prototype.stepFunctionExpression = function (e, t, a) {
e.pop(), (e[e.length - 1].value = this.createFunction(a, t.scope));
}),
(r.prototype.stepIdentifier = function (e, t, a) {
if ((e.pop(), t.components)) e[e.length - 1].value = [r.SCOPE_REFERENCE, a.name];
else {
var n = this.getValueFromScope(a.name, a);
if (n && "object" == typeof n && n.isGetter) {
n.isGetter = !1;
for (var i = t.scope; !this.hasProperty(i, a.name); ) i = i.parentScope;
var o = n;
return this.createGetter_(o, this.global);
}
e[e.length - 1].value = n;
}
}),
(r.prototype.stepIfStatement = r.prototype.stepConditionalExpression),
(r.prototype.stepLabeledStatement = function (e, t, a) {
e.pop();
var n = t.labels || [];
n.push(a.label.name);
var i = new r.State(a.body, t.scope);
return (i.labels = n), i;
}),
(r.prototype.stepLiteral = function (e, t, a) {
e.pop();
var n = a.value;
if (n instanceof RegExp) {
var r = this.createObjectProto(this.REGEXP_PROTO);
this.populateRegExp(r, n), (n = r);
}
e[e.length - 1].value = n;
}),
(r.prototype.stepLogicalExpression = function (e, t, a) {
if ("&&" !== a.operator && "||" !== a.operator) throw SyntaxError("Unknown logical operator: " + a.operator);
if (!t.doneLeft_) return (t.doneLeft_ = !0), new r.State(a.left, t.scope);
if (t.doneRight_) e.pop(), (e[e.length - 1].value = t.value);
else {
if (!(("&&" === a.operator && !t.value) || ("||" === a.operator && t.value)))
return (t.doneRight_ = !0), new r.State(a.right, t.scope);
e.pop(), (e[e.length - 1].value = t.value);
}
}),
(r.prototype.stepMemberExpression = function (e, t, a) {
if (!t.doneObject_) return (t.doneObject_ = !0), new r.State(a.object, t.scope);
var n;
if (a.computed) {
if (!t.doneProperty_) return (t.object_ = t.value), (t.doneProperty_ = !0), new r.State(a.property, t.scope);
n = t.value;
} else (t.object_ = t.value), (n = a.property.name);
if ((e.pop(), t.components)) e[e.length - 1].value = [t.object_, n];
else {
var i = this.getProperty(t.object_, n);
if (i && "object" == typeof i && i.isGetter) {
i.isGetter = !1;
var o = i;
return this.createGetter_(o, t.object_);
}
e[e.length - 1].value = i;
}
}),
(r.prototype.stepNewExpression = r.prototype.stepCallExpression),
(r.prototype.stepObjectExpression = function (e, t, a) {
var n = t.n_ || 0,
i = a.properties[n];
if (t.object_) {
if ("Identifier" === (s = i.key).type) var o = s.name;
else {
if ("Literal" !== s.type) throw SyntaxError("Unknown object structure: " + s.type);
o = s.value;
}
t.properties_[o] || (t.properties_[o] = {}),
(t.properties_[o][i.kind] = t.value),
(t.n_ = ++n),
(i = a.properties[n]);
} else (t.object_ = this.createObjectProto(this.OBJECT_PROTO)), (t.properties_ = Object.create(null));
if (i) return new r.State(i.value, t.scope);
for (var s in t.properties_) {
var l = t.properties_[s];
if ("get" in l || "set" in l) {
var c = { configurable: !0, enumerable: !0, get: l.get, set: l.set };
this.setProperty(t.object_, s, null, c);
} else this.setProperty(t.object_, s, l.init);
}
e.pop(), (e[e.length - 1].value = t.object_);
}),
(r.prototype.stepProgram = function (e, t, a) {
var n = a.body.shift();
if (n) return (t.done = !1), new r.State(n, t.scope);
t.done = !0;
}),
(r.prototype.stepReturnStatement = function (e, t, a) {
if (a.argument && !t.done_) return (t.done_ = !0), new r.State(a.argument, t.scope);
this.unwind(r.Completion.RETURN, t.value, void 0);
}),
(r.prototype.stepSequenceExpression = function (e, t, a) {
var n = t.n_ || 0,
i = a.expressions[n];
if (i) return (t.n_ = n + 1), new r.State(i, t.scope);
e.pop(), (e[e.length - 1].value = t.value);
}),
(r.prototype.stepSwitchStatement = function (e, t, a) {
if (!t.test_) return (t.test_ = 1), new r.State(a.discriminant, t.scope);
for (1 === t.test_ && ((t.test_ = 2), (t.switchValue_ = t.value), (t.defaultCase_ = -1)); ; ) {
var n = t.index_ || 0,
i = a.cases[n];
if (t.matched_ || !i || i.test)
if (i || t.matched_ || -1 === t.defaultCase_) {
if (!i) return void e.pop();
if (!t.matched_ && !t.tested_ && i.test) return (t.tested_ = !0), new r.State(i.test, t.scope);
if (t.matched_ || t.value === t.switchValue_) {
t.matched_ = !0;
var o = t.n_ || 0;
if (i.consequent[o]) return (t.isSwitch = !0), (t.n_ = o + 1), new r.State(i.consequent[o], t.scope);
}
(t.tested_ = !1), (t.n_ = 0), (t.index_ = n + 1);
} else (t.matched_ = !0), (t.index_ = t.defaultCase_);
else (t.defaultCase_ = n), (t.index_ = n + 1);
}
}),
(r.prototype.stepThisExpression = function (e, t, a) {
e.pop(), (e[e.length - 1].value = this.getValueFromScope("this", a));
}),
(r.prototype.stepThrowStatement = function (e, t, a) {
if (!t.done_) return (t.done_ = !0), new r.State(a.argument, t.scope);
this.throwException(t.value);
}),
(r.prototype.stepTryStatement = function (e, t, a) {
if (!t.doneBlock_) return (t.doneBlock_ = !0), new r.State(a.block, t.scope);
if (t.cv && t.cv.type === r.Completion.THROW && !t.doneHandler_ && a.handler) {
t.doneHandler_ = !0;
var n = new r.State(a.handler, t.scope);
return (n.throwValue = t.cv.value), (t.cv = void 0), n;
}
if (!t.doneFinalizer_ && a.finalizer) return (t.doneFinalizer_ = !0), new r.State(a.finalizer, t.scope);
e.pop(), t.cv && this.unwind(t.cv.type, t.cv.value, t.cv.label);
}),
(r.prototype.stepUnaryExpression = function (e, t, a) {
if (!t.done_) {
t.done_ = !0;
var n = new r.State(a.argument, t.scope);
return (n.components = "delete" === a.operator), n;
}
e.pop();
var i = t.value;
if ("-" === a.operator) i = -i;
else if ("+" === a.operator) i = +i;
else if ("!" === a.operator) i = !i;
else if ("~" === a.operator) i = ~i;
else if ("delete" === a.operator) {
var o = !0;
if (Array.isArray(i)) {
var s = i[0];
s === r.SCOPE_REFERENCE && (s = t.scope);
var l = String(i[1]);
try {
delete s.properties[l];
} catch (e) {
t.scope.strict
? this.throwException(this.TYPE_ERROR, "Cannot delete property '" + l + "' of '" + s + "'")
: (o = !1);
}
}
i = o;
} else if ("typeof" === a.operator) i = i && "Function" === i.class ? "function" : typeof i;
else {
if ("void" !== a.operator) throw SyntaxError("Unknown unary operator: " + a.operator);
i = void 0;
}
e[e.length - 1].value = i;
}),
(r.prototype.stepUpdateExpression = function (e, t, a) {
if (!t.doneLeft_) {
t.doneLeft_ = !0;
var n = new r.State(a.argument, t.scope);
return (n.components = !0), n;
}
if ((t.leftSide_ || (t.leftSide_ = t.value), t.doneGetter_ && (t.leftValue_ = t.value), !t.doneGetter_)) {
var i = this.getValue(t.leftSide_, a);
if (((t.leftValue_ = i), i && "object" == typeof i && i.isGetter)) {
(i.isGetter = !1), (t.doneGetter_ = !0);
var o = i;
return this.createGetter_(o, t.leftSide_);
}
}
if (t.doneSetter_) return e.pop(), void (e[e.length - 1].value = t.setterValue_);
var s;
i = Number(t.leftValue_);
if ("++" === a.operator) s = i + 1;
else {
if ("--" !== a.operator) throw SyntaxError("Unknown update expression: " + a.operator);
s = i - 1;
}
var l = a.prefix ? s : i,
c = this.setValue(t.leftSide_, s);
if (c) return (t.doneSetter_ = !0), (t.setterValue_ = l), this.createSetter_(c, t.leftSide_, s);
e.pop(), (e[e.length - 1].value = l);
}),
(r.prototype.stepVariableDeclaration = function (e, t, a) {
var n = a.declarations,
i = t.n_ || 0,
o = n[i];
for (t.init_ && o && (this.setValueToScope(o.id.name, t.value), (t.init_ = !1), (o = n[++i])); o; ) {
if (o.init) return (t.n_ = i), (t.init_ = !0), new r.State(o.init, t.scope);
o = n[++i];
}
e.pop();
}),
(r.prototype.stepWithStatement = function (e, t, a) {
if (!t.doneObject_) return (t.doneObject_ = !0), new r.State(a.object, t.scope);
if (!t.doneBody_) {
t.doneBody_ = !0;
var n = this.createSpecialScope(t.scope, t.value);
return new r.State(a.body, n);
}
e.pop();
}),
(r.prototype.stepWhileStatement = r.prototype.stepDoWhileStatement),
(r.prototype.step = r.prototype.step),
(r.prototype.run = r.prototype.run),
(r.prototype.appendCode = r.prototype.appendCode),
(r.prototype.createObject = r.prototype.createObject),
(r.prototype.createObjectProto = r.prototype.createObjectProto),
(r.prototype.createAsyncFunction = r.prototype.createAsyncFunction),
(r.prototype.createNativeFunction = r.prototype.createNativeFunction),
(r.prototype.getProperty = r.prototype.getProperty),
(r.prototype.setProperty = r.prototype.setProperty),
(r.prototype.nativeToPseudo = r.prototype.nativeToPseudo),
(r.prototype.pseudoToNative = r.prototype.pseudoToNative),
(r.prototype.createPrimitive = function (e) {
return e;
});
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(7),
r = a(8);
function i(e, t, a, i = 1) {
const o = Math.max(Math.floor(t), 0);
let s = 1 + (n.a.ServerBaseGrowthRate - 1) / e.hackDifficulty;
s > n.a.ServerMaxGrowthRate && (s = n.a.ServerMaxGrowthRate);
const l = o * (e.serverGrowth / 100) * r.a.ServerGrowthRate,
c = 1 + (i - 1) / 16;
return Math.pow(s, l * a.hacking_grow_mult * c);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return c;
}),
a.d(t, "b", function () {
return u;
});
var n = a(0),
r = a.n(n),
i = a(122),
o = a(40),
s = a(1),
l = a(10);
const c = new i.a();
function u() {
const [e, t] = Object(n.useState)(null);
return (
Object(n.useEffect)(
() =>
c.subscribe((e) => {
t(e);
}),
[],
),
r.a.createElement(
r.a.Fragment,
null,
null != e &&
r.a.createElement(
o.a,
{
open: !0,
onClose: function () {
null !== e && (e.resolve(!1), t(null));
},
},
r.a.createElement(s.a, null, e.txt),
r.a.createElement(
l.a,
{
onClick: function () {
null !== e && (e.resolve(!0), t(null));
},
},
"Yes",
),
r.a.createElement(
l.a,
{
onClick: function () {
null !== e && (e.resolve(!1), t(null));
},
},
"No",
),
),
)
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return c;
}),
a.d(t, "b", function () {
return u;
});
var n = a(0),
r = a.n(n),
i = a(1443),
o = a(122),
s = a(1),
l = a(76);
const c = new o.a();
function u() {
const [e, t] = Object(n.useState)(!1);
return (
Object(n.useEffect)(() => c.subscribe(() => t(!0))),
r.a.createElement(
i.a,
{
open: e,
anchorOrigin: { vertical: "top", horizontal: "center" },
autoHideDuration: 2e3,
onClose: () => t(!1),
},
r.a.createElement(l.a, { sx: { p: 2 } }, r.a.createElement(s.a, null, "Game Saved!")),
)
);
}
},
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
});
var n = a(68);
function r(e) {
const t = [];
for (const a in n.a) {
const r = n.a[a].create;
null != r && (e.hasProgram(n.a[a].name) || (r.req(e) && t.push(n.a[a])));
}
return t;
}
},
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return g;
});
var n = a(0),
r = a.n(n),
i = a(6),
o = a(305),
s = a(99),
l = a(32),
c = a(1),
u = a(76),
m = a(210),
h = a(71),
d = a.n(h),
p = a(136),
f = a.n(p);
function g(e) {
const [t, a] = Object(n.useState)(!1);
let h = e.aug.name;
return (
null != e.level && e.aug.name === i.a.NeuroFluxGovernor && (h += " - Level " + e.level),
"string" == typeof e.aug.info
? r.a.createElement(
l.a,
{ component: u.a },
r.a.createElement(
o.a,
{ onClick: () => a((e) => !e) },
r.a.createElement(s.a, { primary: r.a.createElement(c.a, { style: { whiteSpace: "pre-wrap" } }, h) }),
t ? r.a.createElement(f.a, { color: "primary" }) : r.a.createElement(d.a, { color: "primary" }),
),
r.a.createElement(
m.a,
{ in: t, unmountOnExit: !0 },
r.a.createElement(
l.a,
{ m: 4 },
r.a.createElement(c.a, { dangerouslySetInnerHTML: { __html: e.aug.info } }),
e.aug.stats &&
r.a.createElement(
r.a.Fragment,
null,
r.a.createElement("br", null),
r.a.createElement("br", null),
r.a.createElement(c.a, null, e.aug.stats),
),
),
),
)
: r.a.createElement(
l.a,
{ component: u.a },
r.a.createElement(
o.a,
{ onClick: () => a((e) => !e) },
r.a.createElement(s.a, { primary: r.a.createElement(c.a, { style: { whiteSpace: "pre-wrap" } }, h) }),
t ? r.a.createElement(f.a, { color: "primary" }) : r.a.createElement(d.a, { color: "primary" }),
),
r.a.createElement(
m.a,
{ in: t, unmountOnExit: !0 },
r.a.createElement(
l.a,
{ m: 4 },
r.a.createElement(
c.a,
null,
e.aug.info,
e.aug.stats &&
r.a.createElement(
r.a.Fragment,
null,
r.a.createElement("br", null),
r.a.createElement("br", null),
e.aug.stats,
),
),
),
),
)
);
}
},
,
,
,
,
,
function (e, t, a) {
"use strict";
function n(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
a.d(t, "a", function () {
return r;
});
class r {
constructor(e, t) {
n(this, "lvl", 1), n(this, "n", 1), (this.n = e), (this.lvl = t);
}
}
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return r;
}),
a.d(t, "a", function () {
return i;
});
var n = a(0);
const r = n.createElement(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
width: "16px",
height: "16px",
viewBox: "0 0 166 132",
style: { fill: "#adff2f" },
},
n.createElement(
"g",
null,
n.createElement("path", {
d: "M132.658-0.18l-24.321,24.321c-7.915-2.71-16.342-4.392-25.087-4.392c-45.84,0-83,46-83,46 s14.1,17.44,35.635,30.844L12.32,120.158l12.021,12.021L144.68,11.841L132.658-0.18z M52.033,80.445 c-2.104-4.458-3.283-9.438-3.283-14.695c0-19.054,15.446-34.5,34.5-34.5c5.258,0,10.237,1.179,14.695,3.284L52.033,80.445z",
}),
n.createElement("path", {
d: "M134.865,37.656l-18.482,18.482c0.884,3.052,1.367,6.275,1.367,9.612c0,19.055-15.446,34.5-34.5,34.5 c-3.337,0-6.56-0.483-9.611-1.367l-10.124,10.124c6.326,1.725,12.934,2.743,19.735,2.743c45.84,0,83-46,83-46 S153.987,50.575,134.865,37.656z",
}),
),
),
i = n.createElement(
"svg",
{
xmlns: "http://www.w3.org/2000/svg",
width: "16px",
height: "16px",
viewBox: "-22 0 511 511.99561",
style: { fill: "#adff2f" },
},
n.createElement("path", {
d: "m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0",
}),
n.createElement("path", {
d: "m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0",
}),
n.createElement("path", {
d: "m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0",
}),
n.createElement("path", {
d: "m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0",
}),
);
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return f;
});
var n = a(0),
r = a.n(n),
i = a(55),
o = a(27),
s = a(1),
l = a(29),
c = a(32),
u = a(98),
m = a(517),
h = a.n(m),
d = a(518),
p = a.n(d);
function f({ action: e, isActive: t, bladeburner: a, rerender: n }) {
const m = o.b.Player(),
d = e.level < e.maxLevel,
f = e.level > 1;
return r.a.createElement(
c.a,
{ display: "flex", flexDirection: "row", alignItems: "center" },
r.a.createElement(
c.a,
{ display: "flex" },
r.a.createElement(
l.a,
{
title: r.a.createElement(
s.a,
null,
e.getSuccessesNeededForNextLevel(i.a.ContractSuccessesPerLevel),
" successes needed for next level",
),
},
r.a.createElement(s.a, null, "Level: ", e.level, " / ", e.maxLevel),
),
),
r.a.createElement(
l.a,
{ title: t ? r.a.createElement(s.a, null, "WARNING: changing the level will restart the Operation") : "" },
r.a.createElement(
u.a,
{
disabled: !d,
onClick: function () {
d && (++e.level, t && a.startAction(m, a.action), n());
},
},
r.a.createElement(h.a, null),
),
),
r.a.createElement(
l.a,
{ title: t ? r.a.createElement(s.a, null, "WARNING: changing the level will restart the Operation") : "" },
r.a.createElement(
u.a,
{
disabled: !f,
onClick: function () {
f && (--e.level, t && a.startAction(m, a.action), n());
},
},
r.a.createElement(p.a, null),
),
),
);
}
},
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return c;
});
var n = a(0),
r = a.n(n),
i = a(1),
o = a(29),
s = a(32),
l = a(142);
function c(e) {
return r.a.createElement(
s.a,
{ display: "flex", flexDirection: "row", alignItems: "center" },
r.a.createElement(
o.a,
{ title: r.a.createElement(i.a, null, "Automatically increase operation level when possible") },
r.a.createElement(i.a, null, " Autolevel:"),
),
r.a.createElement(l.a, {
checked: e.action.autoLevel,
onChange: function (t) {
(e.action.autoLevel = t.target.checked), e.rerender();
},
}),
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return l;
});
var n = a(0),
r = a.n(n),
i = a(883),
o = a(23),
s = a(10);
function l(e) {
const [t, a] = Object(n.useState)(!1);
return r.a.createElement(
r.a.Fragment,
null,
r.a.createElement(
s.a,
{ disabled: 0 === e.bladeburner.teamSize, onClick: () => a(!0) },
"Set Team Size (Curr Size: ",
Object(o.c)(e.action.teamCount, 0),
")",
),
r.a.createElement(i.a, { open: t, onClose: () => a(!1), action: e.action, bladeburner: e.bladeburner }),
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
class n {
constructor(e, t, a, n, r) {
(this.name = e),
(this.desc = t),
(this.isHacking = a),
(this.isCombat = n),
(this.baseRespect = r.baseRespect ? r.baseRespect : 0),
(this.baseWanted = r.baseWanted ? r.baseWanted : 0),
(this.baseMoney = r.baseMoney ? r.baseMoney : 0),
(this.hackWeight = r.hackWeight ? r.hackWeight : 0),
(this.strWeight = r.strWeight ? r.strWeight : 0),
(this.defWeight = r.defWeight ? r.defWeight : 0),
(this.dexWeight = r.dexWeight ? r.dexWeight : 0),
(this.agiWeight = r.agiWeight ? r.agiWeight : 0),
(this.chaWeight = r.chaWeight ? r.chaWeight : 0),
100 !=
Math.round(
this.hackWeight + this.strWeight + this.defWeight + this.dexWeight + this.agiWeight + this.chaWeight,
) && console.error(`GangMemberTask ${this.name} weights do not add up to 100`),
(this.difficulty = r.difficulty ? r.difficulty : 1),
(this.territory = r.territory ? r.territory : { money: 1, respect: 1, wanted: 1 });
}
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(0),
r = a.n(n);
function i() {
const [e, t] = Object(n.useState)(!0);
return (
Object(n.useEffect)(() => {
const e = setInterval(() => t((e) => !e), 1e3);
return () => clearInterval(e);
}),
r.a.createElement(r.a.Fragment, null, e ? "|" : "")
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return l;
}),
a.d(t, "a", function () {
return c;
});
var n = a(967),
r = a(20),
i = a(313),
o = a(6),
s = a(30);
function l(e, t) {
const a = e.getCost();
if (!t.canAfford(a)) return !1;
t.loseMoney(a),
(t.hacking_exp = e.hacking_exp),
(t.strength_exp = e.strength_exp),
(t.defense_exp = e.defense_exp),
(t.dexterity_exp = e.dexterity_exp),
(t.agility_exp = e.agility_exp),
(t.charisma_exp = e.charisma_exp);
for (const e in r.a) r.a[e].owned = !1;
for (let e = t.augmentations.length - 1; e >= 0; --e)
t.augmentations[e].name !== o.a.NeuroFluxGovernor
? t.augmentations.splice(e, 1)
: (r.a[o.a.NeuroFluxGovernor].owned = !0);
for (let a = 0; a < e.augmentations.length; ++a)
t.augmentations.push(new i.a(e.augmentations[a].name)), (r.a[e.augmentations[a].name].owned = !0);
for (let e = t.queuedAugmentations.length - 1; e >= 0; --e) {
const a = t.queuedAugmentations[e].name;
t.augmentations.filter((e) => e.name !== o.a.NeuroFluxGovernor && e.name === a).length >= 1 &&
t.queuedAugmentations.splice(e, 1);
}
return t.reapplyAllAugmentations(!0), t.reapplyAllSourceFiles(), !0;
}
function c() {
const e = [];
for (let t = 0; t < 40; ++t) {
const a = new n.a(),
i = 5 * t + 1;
(a.hacking_exp = i * Object(s.a)(1e3, 5e3)),
(a.strength_exp = i * Object(s.a)(1e3, 5e3)),
(a.defense_exp = i * Object(s.a)(1e3, 5e3)),
(a.dexterity_exp = i * Object(s.a)(1e3, 5e3)),
(a.agility_exp = i * Object(s.a)(1e3, 5e3)),
(a.charisma_exp = i * Object(s.a)(1e3, 5e3));
const l = Math.max(2, Math.ceil((t + 3) / 2)),
c = Object(s.a)(l, l + 2),
u = Object.keys(r.a);
for (let e = 0; e < c; ++e) {
const e = Object(s.a)(0, u.length - 1),
t = u[e];
if (t === o.a.TheRedPill || t === o.a.NeuroFluxGovernor) continue;
const n = r.a[t];
if (null === n) throw new Error("null augmentation: " + t);
a.augmentations.push({ name: n.name, level: 1 }),
a.applyAugmentation(r.a[t]),
a.updateStatLevels(),
u.splice(e, 1);
}
e.push(a);
}
return e;
}
},
,
,
,
,
,
,
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return o;
});
var n = a(20),
r = a(6),
i = a(25);
function o(e, t) {
const a = e.augmentations.map((e) => e.name),
o = [];
function s(e) {
return e.name !== r.a.NeuroFluxGovernor && !a.includes(e.name) && !o.includes(e) && !e.isSpecial;
}
if (t.inGang()) {
const e = t.getGangFaction();
for (const t in n.a) {
const a = n.a[t];
s(a) && e.playerReputation > a.baseRepRequirement && o.push(a);
}
return o;
}
for (const e of t.factions) {
if ("Bladeburners" === e) continue;
if ("Netburners" === e) continue;
const t = i.a[e];
if (null != t)
for (const e of t.augmentations) {
const a = n.a[e];
s(a) && t.playerReputation > a.baseRepRequirement && o.push(a);
}
}
return o;
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return s;
});
var n = a(0),
r = a.n(n),
i = a(4),
o = a(212);
function s({ hashes: e }) {
return r.a.createElement(o.a, { hashes: i.a.formatHashes(e) + " / sec" });
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return y;
});
var n = a(0),
r = a.n(n),
i = a(22),
o = a(1040),
s = a(7),
l = a(14),
c = a(27),
u = a(18),
m = a(388),
h = a(15),
d = a(1),
p = a(32),
f = a(10);
function g(e, t, a) {
const n = s.a.TravelCost;
e.canAfford(n) &&
(e.loseMoney(n),
e.travel(a),
Object(h.a)(r.a.createElement(r.a.Fragment, null, "You are now in ", a, "!")),
t.toCity());
}
function y(e) {
const t = c.b.Player(),
a = c.b.Router(),
h = Object(n.useState)(!1)[1],
[y, b] = Object(n.useState)(!1),
[E, v] = Object(n.useState)(i.a.Sector12);
function k() {
h((e) => !e);
}
function _(e) {
const n = s.a.TravelCost;
t.canAfford(n) && (l.a.SuppressTravelConfirmation ? g(t, a, e) : (b(!0), v(e)));
}
return (
Object(n.useEffect)(() => {
const e = setInterval(k, 1e3);
return () => clearInterval(e);
}, []),
r.a.createElement(
r.a.Fragment,
null,
r.a.createElement(d.a, { variant: "h4" }, "Travel Agency"),
r.a.createElement(
p.a,
{ mx: 2 },
r.a.createElement(
d.a,
null,
"From here, you can travel to any other city! A ticket costs",
" ",
r.a.createElement(u.a, { money: s.a.TravelCost, player: e.p }),
".",
),
l.a.DisableASCIIArt
? r.a.createElement(
r.a.Fragment,
null,
Object.values(i.a)
.filter((t) => t != e.p.city)
.map((e) => {
if (void 0 === Object.entries(i.a).find((t) => t[1] === e))
throw new Error(`could not find key for city '${e}'`);
return r.a.createElement(
r.a.Fragment,
{ key: e },
r.a.createElement(
f.a,
{ onClick: () => _(e), sx: { m: 2 } },
r.a.createElement(d.a, null, "Travel to ", e),
),
r.a.createElement("br", null),
);
}),
)
: r.a.createElement(m.a, { currentCity: e.p.city, onTravel: (e) => _(e) }),
),
r.a.createElement(o.a, { city: E, travel: () => g(t, a, E), open: y, onClose: () => b(!1) }),
)
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "b", function () {
return P;
}),
a.d(t, "a", function () {
return F;
});
var n = a(0),
r = a.n(n),
i = a(1051),
o = a(1064),
s = a(1065),
l = a(109),
c = a(15),
u = a(101),
m = a(321),
h = a(227),
d = a(491),
p = a(261),
f = a(4),
g = a(635),
y = a(636),
b = a(438),
E = a(14),
v = a(39),
k = a(10),
_ = a(1),
w = a(149),
C = a(32),
S = a(80),
x = a(98),
O = a(507),
T = a.n(O);
let M = !1,
R = [];
function P() {
const e = Object(b.a)({});
R = (function e(t) {
let a = [];
const n = Object.keys(t);
for (const r of n)
"object" == typeof t[r] && (a.push(r), (a = a.concat(e(t[r])))), "function" == typeof t[r] && a.push(r);
return a;
})(e);
const t = ["heart", "break", "exploit", "bypass", "corporation"];
R = R.filter((e) => !t.includes(e));
}
let A = "",
N = "",
I = null;
function F(e) {
const t = Object(n.useRef)(null),
[a, b] = Object(n.useState)(e.filename ? e.filename : A),
[O, P] = Object(n.useState)(e.filename ? e.code : N),
[F, j] = Object(n.useState)("RAM: ???"),
[B, D] = Object(n.useState)(!1),
[G, L] = Object(n.useState)({
theme: E.a.MonacoTheme,
insertSpaces: E.a.MonacoInsertSpaces,
fontSize: E.a.MonacoFontSize,
});
function W() {
if (null !== t.current) {
const e = t.current.getPosition();
null !== e && g.a.saveCursor(a, { row: e.lineNumber, column: e.column });
}
if (((I = null), v.a.isRunning && v.a.currStep === v.f.TerminalTypeScript)) {
if ("n00dles.script" !== a) return void Object(c.a)("Leave the script name as 'n00dles'!");
if (-1 == O.replace(/\s/g, "").indexOf("while(true){hack('n00dles');}"))
return void Object(c.a)("Please copy and paste the code from the tutorial!");
const t = e.player.getCurrentServer();
if (null === t) throw new Error("Server should not be null but it is.");
let n = !1;
for (let r = 0; r < t.scripts.length; r++)
a == t.scripts[r].filename && (t.scripts[r].saveScript(a, O, e.player.currentServer, t.scripts), (n = !0));
if (!n) {
const n = new m.a();
n.saveScript(a, O, e.player.currentServer, t.scripts), t.scripts.push(n);
}
return Object(v.c)(), void e.router.toTerminal();
}
if ("" == a) return void Object(c.a)("You must specify a filename!");
if (!Object(l.g)(a))
return void Object(c.a)(
"Script filename can contain only alphanumerics, hyphens, and underscores, and must end with an extension.",
);
const n = e.player.getCurrentServer();
if (null === n) throw new Error("Server should not be null but it is.");
if (Object(u.a)(a)) {
for (let t = 0; t < n.scripts.length; t++)
if (a == n.scripts[t].filename)
return n.scripts[t].saveScript(a, O, e.player.currentServer, n.scripts), void e.router.toTerminal();
const t = new m.a();
t.saveScript(a, O, e.player.currentServer, n.scripts), n.scripts.push(t);
} else {
if (!a.endsWith(".txt"))
return void Object(c.a)(
"Invalid filename. Must be either a script (.script, .js, or .ns) or or text file (.txt)",
);
{
for (let t = 0; t < n.textFiles.length; ++t)
if (n.textFiles[t].fn === a) return n.textFiles[t].write(O), void e.router.toTerminal();
const t = new h.a(a, O);
n.textFiles.push(t);
}
}
e.router.toTerminal();
}
async function H() {
const t = O + "",
a = await Object(d.a)(t, e.player.getCurrentServer().scripts);
if (!(a > 0)) {
switch (a) {
case p.a.ImportError:
j("RAM: Import Error");
break;
case p.a.URLImportError:
j("RAM: HTTP Import Error");
break;
case p.a.SyntaxError:
default:
j("RAM: Syntax Error");
}
return new Promise(() => {});
}
j("RAM: " + f.a.formatRAM(a));
}
return (
Object(n.useEffect)(() => {
void 0 !== e.filename && ((A = e.filename), (N = e.code), (I = null));
}, []),
Object(n.useEffect)(() => {
const e = setInterval(H, 1e3);
return () => clearInterval(e);
}, [O]),
Object(n.useEffect)(() => {
function e(e) {
E.a.DisableHotkeys || (66 == e.keyCode && (e.ctrlKey || e.metaKey) && (e.preventDefault(), W()));
}
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
}),
r.a.createElement(
r.a.Fragment,
null,
r.a.createElement(
C.a,
{ display: "flex", flexDirection: "row", alignItems: "center" },
r.a.createElement(S.a, {
type: "text",
tabIndex: 1,
value: a,
onChange: function (e) {
(A = e.target.value), b(e.target.value);
},
InputProps: { startAdornment: r.a.createElement(_.a, null, "Script name: ") },
}),
r.a.createElement(
x.a,
{ onClick: () => D(!0) },
r.a.createElement(r.a.Fragment, null, r.a.createElement(T.a, null), "options"),
),
),
r.a.createElement(i.a, {
beforeMount: function (e) {
M ||
((M = !0),
e.languages.registerCompletionItemProvider("javascript", {
provideCompletionItems: () => {
const t = [];
for (const a of R)
t.push({
label: a,
kind: e.languages.CompletionItemKind.Function,
insertText: a,
insertTextRules: e.languages.CompletionItemInsertTextRule.InsertAsSnippet,
});
return { suggestions: t };
},
}),
e.languages.typescript.javascriptDefaults.addExtraLib(y.a, "netscript.d.ts"),
e.languages.typescript.typescriptDefaults.addExtraLib(y.a, "netscript.d.ts"));
},
onMount: function (e) {
if (((t.current = e), null === t.current)) return;
const n = g.a.getCursor(a);
-1 !== n.row
? t.current.setPosition({ lineNumber: n.row, column: n.column })
: null !== I && t.current.setPosition({ lineNumber: I.lineNumber, column: I.column + 1 }),
t.current.focus();
},
loading: r.a.createElement(_.a, null, "Loading script editor!"),
height: "90%",
defaultLanguage: "javascript",
defaultValue: O,
onChange: function (e) {
void 0 !== e && ((N = e), null !== t.current && (I = t.current.getPosition()), P(e));
},
theme: G.theme,
options: G,
}),
r.a.createElement(
C.a,
{ display: "flex", flexDirection: "row", sx: { m: 1 }, alignItems: "center" },
r.a.createElement(
k.a,
{
onClick: function () {
if (null === t.current) return;
const e = Object(s.js_beautify)(O, {
indent_with_tabs: !G.insertSpaces,
indent_size: 4,
brace_style: "preserve-inline",
});
t.current.setValue(e);
},
},
"Beautify",
),
r.a.createElement(_.a, { sx: { mx: 1 } }, F),
r.a.createElement(k.a, { onClick: W }, "Save & Close (Ctrl/Cmd + b)"),
r.a.createElement(
w.a,
{ sx: { mx: 1 }, target: "_blank", href: "https://bitburner.readthedocs.io/en/latest/index.html" },
r.a.createElement(_.a, null, " Netscript Documentation"),
),
),
r.a.createElement(o.a, {
open: B,
onClose: () => D(!1),
options: { theme: E.a.MonacoTheme, insertSpaces: E.a.MonacoInsertSpaces, fontSize: E.a.MonacoFontSize },
save: (e) => {
L(e),
(E.a.MonacoTheme = e.theme),
(E.a.MonacoInsertSpaces = e.insertSpaces),
(E.a.MonacoFontSize = e.fontSize);
},
}),
)
);
}
},
,
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return f;
});
var n = a(0),
r = a(104),
i = a(32),
o = a(98),
s = a(638),
l = a.n(s),
c = a(640),
u = a.n(c),
m = a(639),
h = a.n(m),
d = a(303),
p = a.n(d);
function f(e) {
const t = Object(r.a)(),
{ count: a, page: s, rowsPerPage: c, onPageChange: m } = e;
return n.createElement(
i.a,
{ sx: { flexShrink: 0, ml: 2.5 } },
n.createElement(
o.a,
{
onClick: (e) => {
m(e, 0);
},
disabled: 0 === s,
"aria-label": "first page",
},
"rtl" === t.direction ? n.createElement(p.a, null) : n.createElement(l.a, null),
),
n.createElement(
o.a,
{
onClick: (e) => {
m(e, s - 1);
},
disabled: 0 === s,
"aria-label": "previous page",
},
"rtl" === t.direction ? n.createElement(h.a, null) : n.createElement(u.a, null),
),
n.createElement(
o.a,
{
onClick: (e) => {
m(e, s + 1);
},
disabled: s >= Math.ceil(a / c) - 1,
"aria-label": "next page",
},
"rtl" === t.direction ? n.createElement(u.a, null) : n.createElement(h.a, null),
),
n.createElement(
o.a,
{
onClick: (e) => {
m(e, Math.max(0, Math.ceil(a / c) - 1));
},
disabled: s >= Math.ceil(a / c) - 1,
"aria-label": "last page",
},
"rtl" === t.direction ? n.createElement(l.a, null) : n.createElement(p.a, null),
),
);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return r;
});
var n = a(24);
function r(e) {
if (null != e.ramUsage && e.ramUsage > 0) return e.ramUsage;
const t = Object(n.d)(e.server);
if (null == t) return 0;
for (let a = 0; a < t.scripts.length; ++a)
if (t.scripts[a].filename === e.filename) return (e.ramUsage = t.scripts[a].ramUsage), e.ramUsage;
return 0;
}
},
,
,
,
,
function (e, t, a) {
"use strict";
function n(e) {
function t(e, t, a) {
return e * t + a;
}
const a = t(e, Math.log(51) - Math.log(50), Math.log(51));
return t(500, Math.exp(a), -25e3);
}
function r(e) {
return -Math.log(25500 / (e + 25e3)) / Math.log(1.02);
}
a.d(t, "a", function () {
return n;
}),
a.d(t, "b", function () {
return r;
});
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
}),
a.d(t, "b", function () {
return o;
}),
a.d(t, "c", function () {
return s;
});
var n = a(199),
r = a(62);
function i() {
return 8 !== this.bitNodeN && (6 === this.bitNodeN || 7 === this.bitNodeN || r.a[6] > 0 || r.a[7] > 0);
}
function o() {
return null != this.bladeburner && this.bladeburner instanceof n.a;
}
function s() {
this.bladeburner = new n.a(this);
}
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return i;
});
var n = a(283),
r = a(21);
class i extends n.a {
constructor(e = null) {
super(e);
}
getActionTypeSkillSuccessBonus(e) {
return e.skillMultipliers.successChanceContract;
}
toJSON() {
return Object(r.b)("Contract", this);
}
static fromJSON(e) {
return Object(r.a)(i, e.data);
}
}
r.c.constructors.Contract = i;
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return n;
});
const n = {
helpList: [
"Use 'help [command]' to get more information about a particular Bladeburner console command.",
"",
" automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks",
" clear/cls Clear the console",
" help [cmd] Display this help text, or help text for a specific command",
" log [en/dis] [type] Enable or disable logging for events and actions",
" skill [action] [name] Level or display info about your Bladeburner skills",
" start [type] [name] Start a Bladeburner action/task",
" stop Stops your current Bladeburner action/task",
],
automate: [
"automate [var] [val] [hi/low]",
"",
"A simple way to automate your Bladeburner actions. This console command can be used to automatically start an action when your stamina rises above a certain threshold, and automatically switch to another action when your stamina drops below another threshold.",
" automate status - Check the current status of your automation and get a brief description of what it'll do",
" automate en - Enable the automation feature",
" automate dis - Disable the automation feature",
"",
"There are four properties that must be set for this automation to work properly. Here is how to set them:",
"",
" automate stamina 100 high",
" automate contract Tracking high",
" automate stamina 50 low",
" automate general 'Field Analysis' low",
"",
"Using the four console commands above will set the automation to perform Tracking contracts if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below 50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must exactly match whatever the name is in the UI.",
],
clear: ["clear", "", "Clears the console"],
cls: ["cls", "", "Clears the console"],
help: [
"help [command]",
"",
"Running 'help' with no arguments displays the general help text, which lists all console commands and a brief description of what they do. A command can be specified to get more specific help text about that particular command. For example:",
"",
" help automate",
"",
"will display specific information about using the automate console command",
],
log: [
"log [en/dis] [type]",
"",
"Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged in the console. There are also random events that are logged in the console as well. The five categories of things that get logged are:",
"",
"[general, contracts, ops, blackops, events]",
"",
"The logging for these categories can be enabled or disabled like so:",
"",
" log dis contracts - Disables logging that occurs when contracts are completed",
" log en contracts - Enables logging that occurs when contracts are completed",
" log dis events - Disables logging for Bladeburner random events",
"",
"Logging can be universally enabled/disabled using the 'all' keyword:",
"",
" log dis all",
" log en all",
],
skill: [
"skill [action] [name]",
"",
"Level or display information about your skills.",
"",
"To display information about all of your skills and your multipliers, use:",
"",
" skill list",
"",
"To display information about a specific skill, specify the name of the skill afterwards. Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If the name of the skill has whitespace, enclose the name of the skill in double quotation marks:",
"",
" skill list Reaper
skill list 'Digital Observer'",
"",
"This console command can also be used to level up skills:",
"",
" skill level [skill name]",
],
start: [
"start [type] [name]",
"",
"Start an action. An action is specified by its type and its name. The name is case-sensitive. It must appear exactly as it does in the UI. If the name of the action has whitespace, enclose it in double quotation marks. Valid action types include:",
"",
"[general, contract, op, blackop]",
"",
"Examples:",
"",
" start contract Tracking",
" start op 'Undercover Operation'",
],
stop: ["stop", "", "Stop your current action and go idle."],
};
},
function (e, t, a) {
"use strict";
a.d(t, "a", function () {
return o;
}),
a.d(t, "b", function () {
return s;
});
var n = a(279),
r = a(4);
function i(e, t, a) {
return (
t in e ? Object.defineProperty(e, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : (e[t] = a),
e
);
}
class o {
constructor(e = { cost: 0, text: "" }) {
if (
(i(this, "children", []),
i(this, "cost", 0),
i(this, "researched", !1),
i(this, "parent", null),
i(this, "text", ""),
null == n.a[e.text])
)
throw new Error("Invalid Research name used when constructing ResearchTree Node: " + e.text);
(this.text = e.text),
(this.cost = e.cost),
e.children && e.children.length > 0 && (this.children = e.children),
null != e.parent && (this.parent = e.parent);
}
addChild(e) {
this.children.push(e), (e.parent = this);
}
createTreantMarkup() {
const e = [];
for (let t = 0; t < this.children.length; ++t) e.push(this.children[t].createTreantMarkup());
let t = "tooltip";
this.researched
? (t += " researched")
: this.parent && !1 === this.parent.researched
? (t += " locked")
: (t += " unlocked");
const a = n.a[this.text];
return {
children: e,
HTMLclass: t,
innerHTML:
`